1require=function e(t,i,n){function r(s,a){if(!i[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[s]={exports:{}};t[s][0].call(u.exports,function(e){return r(t[s][1][e]||e)},u,u.exports,e,t,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(e,t,i){"use strict";function n(e){const t=e.querySelector(".js-upload-thumbs");return t.innerHTML=null,t}Object.defineProperty(i,"__esModule",{value:!0}),i.cleanThumbnails=n,i.default=function(){Array.from(document.querySelectorAll(".js-upload")).forEach(e=>{const t=e.querySelector("input");t.addEventListener("change",()=>{const i=n(e),{files:r}=t;for(let e=0;e<r.length;e++){const t=new FileReader,n=document.createElement("li"),o=r[e];if(o.type.startsWith("image")){const e=document.createElement("img");e.width=100,n.appendChild(e),i.appendChild(n),t.onload=t=>e.src=t.target.result,t.readAsDataURL(o)}else{const e=document.createElement("span");e.innerText=o.name,n.appendChild(e),i.appendChild(n)}}})})}},{}],2:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){e.forEach(e=>{const t=e.querySelector('input[type="file"]'),i=e.querySelector('input[type="text"]'),n=e.querySelector("img"),r=e.querySelector("button[data-edit]"),s=e.querySelector("button[data-delete]"),c=e.querySelector("[data-thubmnail]"),u=e.querySelector("[uk-spinner]");t.addEventListener("change",()=>{const{files:[e]}=t;if(e){const t=l(),r=new FileReader;
1r.readAsDataURL(e),r.onload=function(){a(r.result,i,n,c,t)}}}),r.addEventListener("click",()=>{a(n.src,i,n,c)}),s.addEventListener("click",()=>{n.src=o.transparentPixel,c.setAttribute("hidden",!0)}),i.value.startsWith("data:image")&&(n.src=i.value),u&&u.remove()})};var n=s(e("tui-image-editor")),r=s(e("uikit/dist/js/uikit.js")),o=e("./ImageUploadEditorSettings.js");function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t,i,r){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:l();const a=new n.default(document.querySelector("#imageEditor"),{includeUI:{loadImage:{path:e,name:"Uploaded image"},menuBarPosition:"bottom",theme:o.theme,locale:o.locale,uiSize:{width:"100%",height:"70vh"}},cssMaxWidth:600,usageStatistics:!1,cssMaxHeight:800});return window.saveAs=function(e){const n=new FileReader;n.readAsDataURL(e),n.onloadend=function(){t.value=n.result,i.src=n.result,r.removeAttribute("hidden"),s.hide()}},a}function l(){return r.default.modal.dialog("<div id='imageEditor'><div uk-spinner class='uk-padding-large uk-width-1-1 uk-text-center'></div></div>",{stack:!0})}},{"./ImageUploadEditorSettings.js":3,"tui-image-editor":400,"uikit/dist/js/uikit.js":401}],3:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.transparentPixel=i.theme=i.locale=void 0;const n=i.transparentPixel="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8Xw8AAoMBgDTD2qgAAAAASUVORK5CYII=";i.theme={"common.bi.image":n,"common.bisize.width":"251px","common.bisize.height":"21px","common.backgroundColor":"#fff","common.border":"1px solid #c1c1c1","header.backgroundImage":"none","header.backgroundColor":"transparent","header.border":"0px","loadButton.backgroundColor":"#fff","loadButton.border":"1px solid #ddd","loadButton.color":"#222","loadButton.fontSize":"12px","loadButton.cursor":"pointer","downloadButton.backgroundColor":"#0f7ae5","downloadButton.border":"1px solid #0f7ae5","downloadButton.color":"#fff","downloadButton.fontSize":"12px","menu.normalIcon.color":"#8a8a8a","menu.activeIcon.color":"#555555","menu.disabledIcon.color":"#434343","menu.hoverIcon.color":"#e9e9e9","menu.iconSize.width":"24px","menu.iconSize.height":"24px","submenu.normalIcon.color":"#8a8a8a","submenu.activeIcon.color":"#555555","submenu.iconSize.width":"32px","submenu.iconSize.height":"32px","submenu.backgroundColor":"rgba(255, 255, 255, 0.9)","submenu.partition.color":"#e5e5e5","submenu.normalLabel.color":"#858585","submenu.normalLabel.fontWeight":"normal","submenu.activeLabel.color":"#000","submenu.activeLabel.fontWeight":"normal","checkbox.border":"1px solid #ccc","checkbox.backgroundColor":"#fff","range.pointer.color":"#333","range.bar.color":"#ccc","range.subbar.color":"#606060","range.disabledPointer.color":"#d3d3d3","range.disabledBar.color":"rgba(85,85,85,0.06)","range.disabledSubbar.color":"rgba(51,51,51,0.2)","range.value.color":"#000","range.value.fontWeight":"normal","range.value.fontSize":"11px","range.value.border":"0","range.value.backgroundColor":"#f5f5f5","range.title.color":"#000","range.title.fontWeight":"lighter","colorpicker.button.border":"0px","colorpicker.title.color":"#000"},i.locale={Download:"Uložit",Load:"Nahrát obrázek"}},{}],4:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("filter-form");if(!e)return;e.querySelectorAll(".alias-selector").forEach(t=>{const i=t.dataset.selector,n=e.querySelector(i);n.style.display="none",t.querySelectorAll(".item").forEach(e=>{e.addEventListener("click",()=>{const i=e.dataset.id;n.value=i,t.dataset.selected=i,t.querySelectorAll(".item").forEach(e=>{e.classList.remove("text-blue")}),e.classList.add("text-blue")})})}),e.querySelectorAll(".item").forEach(t=>{t.addEventListener("click",()=>{e.requestSubmit()})});e.querySelectorAll(".tag").forEach(t=>{t.addEventListener("change",i=>{i.preventDefault();const n=t.value,r=Array.from(e.querySelectorAll(".tag:not(.reset)")).filter(e=>e.checked).length;let o=e.dataset.listUrl;
1"all"===n?r&&e.querySelectorAll(".tag:not(.reset)").forEach(e=>{e.checked=!1}):(e.querySelector(".tag.reset").checked=!1,o+=`/${t.dataset.tagSlug}`),history.pushState(null,"",o),e.requestSubmit()})});const t=e.querySelectorAll(".year"),i=e.querySelector(".choose-year-label");t.forEach(t=>{t.addEventListener("click",t=>{const n=Boolean(Array.from(e.querySelectorAll(".year")).filter(e=>e.checked).length);console.log(n),n?i.classList.add("active"):i.classList.remove("active")})})}},{}],5:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){document.body.classList.contains("page-park-detail")&&function(){const e=window.globalCardSliders.parkDetailBuildings,t=document.querySelectorAll(".page-park-detail .building-card");Array.from(t).forEach((t,i)=>{const n=t.dataset.svgLayerId,r=document.getElementById(n);r&&(t.addEventListener("mouseover",e=>{"1"===t.dataset.isAvailable?r.classList.add("building-plan-hover"):r.classList.add("building-plan-completed-hover")}),t.addEventListener("mouseout",e=>{r.classList.remove("building-plan-hover"),r.classList.remove("building-plan-completed-hover")}),r.addEventListener("mouseover",n=>{e.slideTo(i),"1"===t.dataset.isAvailable?r.classList.add("building-plan-hover"):r.classList.add("building-plan-completed-hover"),t.classList.add("building-card-hover")}),r.addEventListener("mouseout",e=>{r.classList.remove("building-plan-hover"),t.classList.remove("building-card-hover"),r.classList.remove("building-plan-completed-hover")}))})}()}},{}],6:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(!o)return;o.addEventListener("mouseup",e=>{e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})}),function(){const e={offset:window.innerHeight,classes:{initial:"headroom-scroll-btn",pinned:"headroom-scroll-btn--pinned",unpinned:"headroom-scroll-btn--unpinned",top:"headroom-scroll-btn--top",notTop:"headroom-scroll-btn--not-top",bottom:"headroom-scroll-btn--bottom",notBottom:"headroom-scroll-btn--not-bottom",frozen:"headroom-scroll-btn--frozen",pinned:"headroom-scroll-btn--pinned"}};new r.default(o,e).init()}()};var n,r=(n=e("headroom.js"))&&n.__esModule?n:{default:n};const o=document.querySelector(".button-scroll-to-top")},{"headroom.js":244}],7:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelectorAll(".card-slider");window.globalCardSliders=[],Array.from(e).forEach(e=>{const{sliderName:t}=e.dataset,i=parseInt(e.dataset.initialSlideCount);Array.from(e.querySelector(".swiper-wrapper").children).forEach(e=>{e.classList.add("swiper-slide")});const o=new n.Swiper(e.querySelector(".swiper-container"),{direction:"horizontal",loop:!1,slidesPerView:1,slidesPerGroup:1,spaceBetween:32,navigation:{nextEl:e.querySelector(".slider-controls-right"),prevEl:e.querySelector(".slider-controls-left")},pagination:{el:e.querySelector(".slider-controls-counter"),type:"fraction"},breakpoints:{560:{slidesPerView:r(i,1),slidesPerGroup:r(i,1)},1e3:{slidesPerView:i,slidesPerGroup:i}}});window.globalCardSliders[t]=o})};var n=e("swiper");function r(e,t){let i=e-t;return i<=1&&(i=1),i}n.Swiper.use([n.Navigation,n.Pagination])},{swiper:397}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelectorAll("iframe.chart");if(!e.length)return;window.addEventListener("message",t=>{e.forEach(e=>{e.contentWindow===t.source&&(e.style.height=`${t.data+10}px`),e.style.overflow="hidden"})})}},{}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelectorAll(".download-slider");Array.from(e).forEach(e=>{const t=e.dataset.itemCount;new n.Swiper(e.querySelector(".swiper-container"),{direction:"horizontal",loop:t>=3,slidesPerView:1,centeredSlides:!0,speed:500,keyboard:{enabled:!0,onlyInViewport:!0},navigation:{nextEl:e.querySelector(".download-slider-controls-right"),prevEl:e.querySelector(".download-slider-controls-left")},breakpoints:{800:{slidesPerView:"auto"}}})})};var n=e("swiper");n.Swiper.use([n.Navigation])},{swiper:397}],10:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){!function(){const e=document.getElementById("expansion");if(!e||window.innerWidth<1024)return;const t=document.getElementById("earth-animation"),i=parseInt(t.dataset.frames),r=t.dataset.root,o=document.querySelector(".image-frame"),s=[],a=[];let l,c=0,u=0,h=null,d=!1;function f(e){const t=e>=i-20?i:e+20;for(let i=e<=20?1:e-20;i<t;i++)p(i)}function p(e){if(a.includes(e))return;const t=new Image;t.src=`${r}/${String(e).padStart(4,"0")}.webp`,t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.objectFit="cover",a.push(e),s.push(t)}function m(){if(c!==u){c+=(u-c)*.1,c=Math.round(c),o.innerHTML="",o.appendChild(s[c])}}function g(){d=!0;const t=(0,n.getElementPositionData)(e);t.visible?e.style.visibility="visible":e.style.visibility="hidden",t.bottom<=0||t.bottom>1||(h||(h=requestAnimationFrame(v)),clearTimeout(l),l=setTimeout(()=>{d=!1},1e3))}function v(){const t=(0,n.getElementPositionData)(e).bottom,r=Math.min(Math.max(t,0),1);u=Math.floor(r*(i-1)),f(u),m(),d?h=requestAnimationFrame(v):(cancelAnimationFrame(h),h=null)}window.addEventListener("scroll",g),f(1),window.addEventListener("beforeunload",()=>{cancelAnimationFrame(h)})}()};var n=e("../../../../../dev/front/js/import/helper")},{"../../../../../dev/front/js/import/helper":34}],11:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(document.contains(document.querySelector(".flash"))){const e=document.querySelectorAll(".flash");
1Array.from(e).forEach(e=>{e.addEventListener("click",t=>{e.classList.add("is-hidden")})})}}},{}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelector(".fond-pop-up");if(document.body.contains(e)){document.querySelector(".fond-pop-up-closer").addEventListener("click",t=>{t.preventDefault();const i=new Date((new Date).setMonth((new Date).getMonth()+1)).toUTCString();document.cookie=`accolade-fond-cookie-consent=true; expires=${i}; path=/`,e.classList.toggle("fond-pop-up-hidden")})}}},{}],13:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelectorAll(".gallery");Array.from(e).forEach(e=>{const t=e.querySelector(".gallery-main"),i=e.querySelector(".gallery-lightbox");Array.from(t.querySelector(".swiper-wrapper").children).forEach(e=>{e.classList.add("swiper-slide")});const s=new n.Swiper(t.querySelector(".swiper-container"),{direction:"horizontal",freeMode:!0,freeModeSticky:!0,slidesPerView:"auto",slidesPerColumnFill:"column",spaceBetween:32,slidesOffsetBefore:r(t),slidesOffsetAfter:0,grabCursor:!0,navigation:{nextEl:e.querySelector(".slider-main-controls-right"),prevEl:e.querySelector(".slider-main-controls-left")}});let a;o(s,t),window.addEventListener("resize",()=>{clearTimeout(a),a=setTimeout(()=>{s.params.slidesOffsetBefore=r(t),o(s,t)},150)});const l=t.querySelectorAll(".gallery-main-item");Array.from(l).forEach(e=>{e.addEventListener("click",t=>{document.body.classList.add("no-scroll"),i.classList.add("is-active"),c.init();const n=parseInt(e.dataset.id);c.slideTo(n)})}),Array.from(i.querySelector(".swiper-wrapper").children).forEach(e=>{e.classList.add("swiper-slide")});const c=new n.Swiper(i.querySelector(".swiper-container"),{init:!1,direction:"horizontal",freeMode:!1,slidesPerView:1,spaceBetween:0,centeredSlides:!0,navigation:{nextEl:e.querySelector(".slider-lightbox-controls-right"),prevEl:e.querySelector(".slider-lightbox-controls-left")}}),u=document.querySelectorAll(".gallery-lightbox-iframe"),h=i.querySelectorAll(".gallery-lightbox-item, .slider-lightbox-close");function d(){document.body.classList.remove("no-scroll"),i.classList.remove("is-active"),Array.from(u).forEach(e=>{e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})}Array.from(h).forEach(e=>{e.addEventListener("click",e=>{e.target==e.currentTarget&&d()})}),window.addEventListener("keydown",e=>{if(c.el.parentNode.classList.contains("is-active"))switch(e.key){case"ArrowLeft":c.slidePrev();break;case"ArrowRight":c.slideNext();break;case"Escape":d()}})})};var n=e("swiper");function r(e){let t=0;const{width:i}=e.getBoundingClientRect();return t=i>1400?(i-1400)/2:32,t}function o(e,t){const i=t.querySelector(".swiper-wrapper");if(!i)return;const n=e.params.slidesOffsetBefore,r=i.scrollWidth,o=e.width;e.params.slidesOffsetAfter=0,e.update();const s=e.maxTranslate(),a=r+2*n,l=Math.min(o-a,0);e.params.slidesOffsetAfter=s-l,e.update(),e.translate<e.maxTranslate()&&(e.setTranslate(e.maxTranslate()),e.updateProgress(),e.updateActiveIndex())}n.Swiper.use([n.Navigation])},{swiper:397}],14:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(!o)return;(function(){const e={};new r.default(o,e).init()})(),function(){const e=document.querySelector(".page-header-mobile-toggle"),t=document.querySelector(".page-header");e.addEventListener("mouseup",e=>{t.classList.toggle("is-active")})}(),document.querySelectorAll(".page-header-nav-item").forEach(e=>{e.addEventListener("click",()=>{e.querySelector(".page-header-nav-submenu").classList.toggle("is-visible")})}),function(){if("inIframe"in document.querySelector("html").dataset){document.querySelector(".page-header-logo").removeAttribute("href")}}()};var n,r=(n=e("headroom.js"))&&n.__esModule?n:{default:n};const o=document.querySelector(".page-header")},{"headroom.js":244}],15:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("hp-intro-slider");if(!e)return;const t=e.querySelector("#counters"),{youtubeApiKey:i}=e.dataset,n=document.createElement("script");n.id="youtube-api-script",n.src=`https://www.youtube.com/iframe_api?api_key=${i}`;const o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(n,o);
1const s="stopped",a="hp-youtube-desktop";let l,c=!0;const u=new r.Swiper(e,{init:!1,spaceBetween:0,slidesPerView:1,loop:!1,loopedSlides:0,effect:"fade",fadeEffect:{crossFade:!0},autoplay:!1,pagination:{el:e.querySelector(".swiper-pagination"),renderBullet:(t,i)=>{const n=e.querySelectorAll(".swiper-slide:not(.swiper-slide-duplicate)");return`\n <div class="${i}"\n data-index="${t}"\n >\n <div class="progress"\n style="animation-duration: ${parseInt(n[t].dataset.swiperAutoplay)}ms"\n ></div>\n </div>\n `},bulletClass:"step",clickable:!0,bulletActiveClass:"active"}});u.params.autoplay={disableOnInteraction:!1},u.on("autoplayStop",e=>{e.el.classList.add(s)}),u.on("autoplayStart",e=>{e.el.classList.remove(s)}),u.on("slideChangeTransitionEnd",e=>{c=!1;const t=e.realIndex,i=e.slides[t],n=i.dataset.swiperAutoplay,r=i.dataset.video,o=i.dataset.localVideo;e.pagination.bullets[t].querySelector(".progress").style.animationDuration=`${n}ms`,r&&(l=t,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;T(e),C[e].player.seekTo(0),I(e)}()),o&&y(t),M(t)}),u.on("click",e=>{C[l]&&C[l].slide.dataset.video&&-1===C[l].player.getPlayerState()&&I()});const h=768,d=e.querySelectorAll('.swiper-slide[data-local-video="true"]'),f={},p=Array.from(e.querySelectorAll(".swiper-slide"));function m(e){return f[e].videoWrapEl.querySelector(".placeholder")}function g(){return window.innerWidth<h}function v(){return g()?"mobile":"desktop"}function b(e){const t=f[e].videoEl;t.addEventListener("playing",()=>{!function(e){m(e).classList.add("fadeOutAnimation")}(e)},{once:!0}),t.readyState>=2?t.play().catch(()=>{}):t.addEventListener("canplay",()=>{t.play().catch(()=>{})},{once:!0})}function y(e){const t=f[e].videoEl;!function(e){const t=m(e);t.src=g()?t.dataset.placeholderMobile:t.dataset.placeholderDesktop,t.classList.remove("fadeOutAnimation")}(e),function(e){const t=f[e],i=v();t.currentSrc!==i&&(t.currentSrc=i,t.videoEl.querySelectorAll("source").forEach(e=>{const t="mobile"===i?e.dataset.srcMobile||e.dataset.src:e.dataset.srcDesktop||e.dataset.src;t&&(e.src=t)}),t.videoEl.load())}(e),t.currentTime>0&&(t.currentTime=0),b(e)}d.forEach(e=>{const t=e.dataset.localVideoId,i=e.querySelector("#hp-local-video-wrap-"+t),n=i?i.querySelector("video"):null,r=p.indexOf(e);n&&-1!==r&&(f[r]={slide:e,videoWrapEl:i,videoEl:n,localVideoId:t,currentSrc:null},n.addEventListener("play",()=>{u.autoplay.start()}),n.addEventListener("ended",()=>{n.currentTime=0}))});let w=v();window.addEventListener("resize",()=>{const e=v();if(e===w)return;w=e;const t=u.realIndex;f[t]&&y(t)});let _,k=window.innerWidth;const x=e.querySelectorAll('.swiper-slide[data-video="true"]'),C={};function S(){const e=C[arguments.length>0&&void 0!==arguments[0]?arguments[0]:l];return _===a?e.videoWrapEl.dataset.youtubeDesktopId:e.videoWrapEl.dataset.youtubeMobileId}function E(){return C[arguments.length>0&&void 0!==arguments[0]?arguments[0]:l].videoWrapEl.querySelector(".placeholder")}function T(){const e=E(arguments.length>0&&void 0!==arguments[0]?arguments[0]:l);A()?e.src=e.dataset.placeholderDesktop:e.src=e.dataset.placeholderMobile,e.classList.remove("fadeOutAnimation")}function A(){return k>=1024}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;!function(){E(arguments.length>0&&void 0!==arguments[0]?arguments[0]:l).classList.add("fadeOutAnimation")}(e),C[e].player.mute(),C[e].player.playVideo()}function M(e){const i=C[e];i&&"pl-anniversary"===i.videoSlideId?t.classList.add("hidden"):t.classList.remove("hidden")}x.forEach((e,t)=>{const i=e.dataset.videoSlideId,n=e.querySelector("#hp-youtube-wrap-"+i),r=n?n.querySelector("#hp-youtube-canvas-"+i):null,o=r?r.querySelector("#hp-youtube-"+i):null;o&&(C[t]={slide:e,videoWrapEl:n,videoHolder:r,videoEl:o,videoSlideId:i,videoId:o.id,player:null})}),u.on("init",e=>{const t=e.realIndex;l=t,M(t),C[t]&&T(),f[t]&&y(t)}),u.init(),window.onYouTubeIframeAPIReady=function(){Object.keys(C).forEach(e=>{const t=C[e];function i(){return k<420?"hp-youtube-mobile":a}function n(e,t){e.target.loadVideoById(S(t)),function(){const e=C[arguments.length>0&&void 0!==arguments[0]?arguments[0]:l].videoHolder;A()?(e.style.aspectRatio="16/9",e.style.width="100%",e.style.height="auto"):k<=420?(e.style.aspectRatio="9/16",e.style.width="100%",e.style.height="100%"):(e.style.aspectRatio="16/9",e.style.width="auto",e.style.height="100%")}(t)}t.player=new YT.Player(t.videoId,{width:"100%",height:"100%",playerVars:{controls:0,showinfo:0,muted:1,loop:0,modestbranding:0,rel:0},events:{onReady:t=>{n(t,parseInt(e))},onStateChange:t=>{!function(e){-1!==e.data&&5!==e.data||I(),0===e.data&&(T(),I()),1===e.data&&u.autoplay.start(),e.data}(t,parseInt(e))}}}),_=i(),window.addEventListener("resize",e=>{k=window.innerWidth;const t=_,n=i();
1_=n,t!==n&&Object.keys(C).forEach(e=>{C[e].player&&"function"==typeof C[e].player.loadVideoById&&C[e].player.loadVideoById(S(parseInt(e)))})}),window.youtubePlayerReady=n})}};var n,r=e("swiper");(n=e("../YoutubeApiEmbed/YoutubeApiEmbed"))&&n.__esModule;r.Swiper.use([r.Swiper,r.EffectFade,r.Autoplay,r.Pagination])},{"../YoutubeApiEmbed/YoutubeApiEmbed":18,swiper:397}],16:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("tenants-pie-component");if(!e)return;const t=document.getElementById("tenants-logos").querySelectorAll(".part"),i=e.querySelectorAll(".part-text"),n=e.querySelector(".logo");t.forEach(r=>{r.addEventListener("mouseover",i=>{var r;r=i.target.closest(".part").dataset.index,t.forEach(t=>{t.classList.add(t.dataset.index===r?"active":"unactive");const i=e.querySelector(`.part-text[data-index=${r}]`),o=`rotate(${i.dataset.rotate}deg)`;i.classList.add("active"),n.style.webkitTransform=o,n.style.mozTransform=o,n.style.msTransform=o,n.style.oTransform=o,n.style.transform=o})}),r.addEventListener("mouseout",()=>{!function(){t.forEach(e=>{e.classList.remove("active","unactive")}),i.forEach(e=>{e.classList.remove("active")});const e="rotate(0deg)";n.style.webkitTransform=e,n.style.mozTransform=e,n.style.msTransform=e,n.style.oTransform=e,n.style.transform=e}()})})}},{}],17:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelectorAll(".youtube-video-wrapper");if(e.length>0){const t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";const i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i),t.onload=()=>{window.YT.ready(()=>{Array.from(e).forEach(e=>{e.closest("section");const t=e.querySelector(".youtube-video-player"),i=e.querySelector(".youtube-video-curtain"),n=document.querySelector(".page-header"),o=new window.YT.Player(t.id,{height:"1920",width:"1080",videoId:t.dataset.youtubeId,playerVars:{rel:0},events:{onReady:t=>{if(e.dataset.autoplay){i.style.display="none",t.target.mute(),t.target.playVideo();const e=()=>{t.target.unMute()};document.addEventListener("click",e,{once:!0})}}}}),s=(0,r.default)({loop:!1,autoplay:!1,targets:i,easing:"linear",keyframes:[{opacity:1},{opacity:0}],duration:1e3,complete:()=>{n.classList.remove("headroom--pinned"),n.classList.add("headroom--unpinned"),i.style.display="none",o.playVideo()}});i.addEventListener("mousedown",e=>{e.preventDefault(),s.play()})})})}}};var n,r=(n=e("animejs"))&&n.__esModule?n:{default:n}},{animejs:60}],18:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){console.log("initYoutubeApiEmbed");if(!document.querySelector(".youtube-api-embed"))return}},{}],19:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.createGetReq=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const n=new XMLHttpRequest;return n.open("GET",e),n.addEventListener("load",()=>4===n.readyState&&200===n.status?(t(),r.default.notification(o.notificationSuccess)):r.default.notification(o.notificationFailure)),n.addEventListener("error",()=>{i(),r.default.notification(o.notificationFailure)}),n},i.initNetteAjax=function(){[...document.querySelectorAll(".ajax,[data-ajax]")].forEach(e=>{e instanceof HTMLFormElement&&e.addEventListener("submit",async t=>{t.preventDefault(),await l({url:e.action,method:"POST",body:new FormData(e),onSuccess:async e=>{await c(e),(0,s.initSortable)()}}),e.reset(),(0,a.cleanThumbnails)(e)}),e instanceof HTMLAnchorElement&&e.addEventListener("click",async t=>{t.preventDefault(),await l({url:e.href,method:"GET",onSuccess:c})})})},i.makeRequest=l;var n,r=(n=e("uikit"))&&n.__esModule?n:{default:n},o=e("./settings"),s=e("./initilaizers"),a=e("../../../../app/modules/Admin/components/DropUpload/DropUpload");async function l(e){let{url:t,method:i,onSuccess:n,onError:s,body:a}=e;try{const e=await fetch(t,{method:i,headers:{"X-Requested-With":"XMLHttpRequest"},body:a});if(e.status>300)throw Error();r.default.notification(o.notificationSuccess),n(e)}catch(e){r.default.notification(o.notificationFailure),s(e)}}async function c(e){const{snippets:t={},customSnippets:i={}}=await e.json();
1Object.entries(t).forEach(e=>{let[t,i]=e;const n=document.getElementById(t);n&&(n.innerHTML=i)}),Object.entries(i).forEach(e=>{let[t,i]=e;const n=document.getElementById(t);n&&(n.outerHTML=i)})}},{"../../../../app/modules/Admin/components/DropUpload/DropUpload":1,"./initilaizers":21,"./settings":22,uikit:401}],20:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.makeGetRequest=function(e){const t=new XMLHttpRequest;t.open("GET",e),t.addEventListener("load",()=>4===t.readyState&&200===t.status?o.default.notification(s.notificationSuccess):o.default.notification(s.notificationFailure)),t.addEventListener("error",()=>o.default.notification(s.notificationFailure)),t.send()},i.requestSnippets=async function(e){let{endpoint:t,method:i="POST",body:n=null}=e;const o=await fetch(t,{...n&&{body:n},method:i,headers:{"X-Requested-With":"XMLHttpRequest"}});if(o.status>300)throw Error();const{snippets:s}=await o.json();Object.entries(s).forEach(e=>{let[t,i]=e;const n=document.getElementById(t);if(n)if(n.multiple&&window.choicesInstances[n.id]){const e=window.choicesInstances[n.id].getValue(!0);window.choicesInstances[n.id].destroy(),n.innerHTML=i;(0,r.createChoicesInstance)(n).setChoiceByValue(e)}else n.innerHTML=i})},i.toggle=function(e){Object.entries([...e].reduce((e,t)=>{const i=t.dataset.toggler||"reset",n=e[i];return n?n.push(t):e[i]=[t],e},{})).forEach(e=>{let[t,i]=e;const n=document.querySelector(`[data-toggle="${t}"]`);i.some(e=>e.checked)?n?n.classList.remove("uk-hidden"):[...document.querySelectorAll("[data-toggle]")].forEach(e=>e.classList.remove("uk-hidden")):n&&n.classList.add("uk-hidden")})};var n,r=e("./initilaizers"),o=(n=e("uikit"))&&n.__esModule?n:{default:n},s=e("./settings")},{"./initilaizers":21,"./settings":22,uikit:401}],21:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.createChoicesInstance=d,i.initCKEditor=function(){window.CKObserver=window.CKObserver||new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&((0,r.default)(e.target).then(e=>{e.model.document.on("change:data",()=>{e.updateSourceElement()})}).catch(e=>console.error(e.stack)),window.CKObserver.unobserve(e.target))})}),window.CKObserver.disconnect(),document.querySelectorAll(".js-wysiwyg").forEach(e=>{window.CKObserver.observe(e)})},i.initChoices=function(){window.choicesInstances={},document.querySelectorAll(".js-select").forEach(e=>{d(e)}),document.querySelectorAll(".js-text").forEach(e=>{d(e)})},i.initFlatPicker=function(){(0,s.default)(".js-date",{locale:a.Czech,altInput:!0,altFormat:"d.m.Y",dateFormat:"Y-m-d"})},i.initImageEditors=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const i=t.querySelectorAll(".image-editor");if(i.length>0){const{default:t}=await Promise.resolve().then(()=>function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=h(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(e("../../../../app/modules/Admin/components/ImageUploadEditor/ImageUploadEditor.js")));t(i)}},i.initLinkLikeElements=function(){document.querySelectorAll("[data-href]").forEach(e=>e.addEventListener("click",t=>{t.preventDefault();const{href:i}=e.dataset;location.href=i}))},i.initNetteAjax=function(){[...document.querySelectorAll(".ajax,[data-ajax]")].forEach(e=>{e instanceof HTMLFormElement&&e.addEventListener("submit",async t=>{t.preventDefault(),await window.requestSnippets({endpoint:e.action,method:"POST",body:new FormData(e)}),e.reset()}),e instanceof HTMLAnchorElement&&e.addEventListener("click",async t=>{t.preventDefault(),await window.requestSnippets({endpoint:e.href,method:"GET"})})})},i.initPinPoints=function(){const e=document.querySelectorAll('input[type="hidden"][data-image-pin-hidden]'),t=document.querySelectorAll('input[type="text"][data-image-pin-display]'),i=document.querySelectorAll('input[type="button"][data-image-pin-toggle]'),n=document.querySelector("img[data-image-pin-image]"),r=document.querySelector("#distributionImage");let o=0;const s=(e,t)=>{let i=r.querySelector(`span[data-building-id="${o}"]`);i||(i=(()=>{const e=document.createElement("span");return e.dataset.buildingId=o,e.classList.add("uk-position-absolute"),e.style.fontWeight="bold",e.style.backgroundColor="white",e.style.borderRadius="5px",e.style.padding="6px 12px",e.style.transform="translate(-50%, -50%)",e.textContent=o,r.appendChild(e),e})()),i.style.top=`${t}%`,i.style.left=`${e}%`};n&&n.addEventListener("click",i=>{const r=n.getBoundingClientRect(),a=(i.clientX-r.left)/r.width*100,l=(i.clientY-r.top)/r.height*100;((i,n)=>{const r=Array.from(e).find(e=>e.dataset.buildingId===o),s=Array.from(t).find(e=>e.dataset.buildingId===o);r.value=`${n.toFixed(2)}%;${i.toFixed(2)}%`,s.value=`Top to Bottom: ${n.toFixed(2)}% | Left to Right: ${i.toFixed(2)}%`})(a,l),s(a,l)});
1i.forEach(e=>{e.addEventListener("click",()=>{o=e.dataset.buildingId})})},i.initSortable=function(){c.default.util.on(".js-sortable","moved",e=>{let{target:{children:t,dataset:{callback:i,param:n="idList"}}}=e;const r=[...t].map(e=>e.id);(0,l.makeGetRequest)(`${i}&${n}=${r}`)})},i.initTogglers=function(){const e=document.querySelectorAll("[data-toggler]");e.forEach(t=>t.addEventListener("change",()=>(0,l.toggle)(e))),(0,l.toggle)(e)};var n=u(e("choices.js")),r=u(e("../libs/ckeditor/factory.js")),o=e("./settings"),s=u(e("flatpickr")),a=e("flatpickr/dist/l10n/cs"),l=e("./helpers"),c=u(e("uikit"));function u(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}function d(e){const t=new n.default(e,(0,o.choicesOptions)(e));return e.id&&(window.choicesInstances[e.id]=t),t}},{"../../../../app/modules/Admin/components/ImageUploadEditor/ImageUploadEditor.js":2,"../libs/ckeditor/factory.js":25,"./helpers":20,"./settings":22,"choices.js":124,flatpickr:213,"flatpickr/dist/l10n/cs":214,uikit:401}],22:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.notificationSuccess=i.notificationFailure=i.choicesOptions=void 0;i.notificationSuccess={message:"ZmÄna byla úspÄÅ¡nÄ provedena",status:"success",pos:"bottom-center"},i.notificationFailure={message:"NÄco se pokazilo",status:"danger",pos:"bottom-center"};i.choicesOptions=e=>({removeItemButton:!0,shouldSort:!1,loadingText:"NaÄÃtám...",noResultsText:"Nebyly nalezeny žádné výsledky",noChoicesText:"Nenà ze Äeho vybýrat",itemSelectText:"StisknÄte pro výbÄr",addItems:!0,addItemFilter:"num"===e.dataset.addItemFilter?/^\d+$/:null,callbackOnCreateTemplates(t){return{choice:(i,n)=>{const r=e.dataset.rootValues?e.dataset.rootValues.split(","):[];return t(`\n <div \n class="${i.item} ${i.itemChoice} ${n.disabled?i.itemDisabled:i.itemSelectable}" \n data-select-text="${this.config.itemSelectText}" \n data-choice \n ${n.disabled?'data-choice-disabled aria-disabled="true"':"data-choice-selectable"}\n data-id="${n.id}"\n data-value="${n.value}"\n ${n.groupId>0?'role="treeitem"':'role="option"'}\n >\n ${r.indexOf(n.value)>=0?`<strong>${n.label}</strong>`:`<span>${n.label}</span>`}\n </div>\n `)}}}})},{}],23:[function(e,t,i){"use strict";let n;Object.defineProperty(i,"__esModule",{value:!0}),i.Conversion=i.ContextualBalloon=i.ContextWatchdog=i.ContextPlugin=i.Context=i.Config=i.ComponentFactory=i.Command=i.ColorTileView=i.ColorSelectorView=i.ColorPickerView=i.ColorGridView=i.Collection=i.CollapsibleView=i.CodeUI=i.CodeEditing=i.CodeBlockUI=i.CodeBlockEditing=i.CodeBlock=i.Code=i.CloudServicesUploadAdapter=i.CloudServicesCore=i.CloudServices=i.ClipboardPipeline=i.ClipboardMarkersUtils=i.Clipboard=i.ClickObserver=i.ClassicEditor=i.CKFinderUploadAdapter=i.CKFinderUI=i.CKFinderEditing=i.CKFinder=i.CKEditorError=i.CKBoxUI=i.CKBoxImageEditUI=i.CKBoxImageEditEditing=i.CKBoxImageEdit=i.CKBoxEditing=i.CKBox=i.ButtonView=i.ButtonLabelWithHighlightView=i.ButtonLabelView=i.BubblingEventInfo=i.BoxedEditorUIView=i.BookmarkUI=i.BookmarkEditing=i.Bookmark=i.BoldUI=i.BoldEditing=i.Bold=i.BodyCollection=i.BlockToolbar=i.BlockQuoteUI=i.BlockQuoteEditing=i.BlockQuote=i.Base64UploadAdapter=i.BalloonToolbar=i.BalloonPanelView=i.BalloonEditor=i.Autosave=i.Autoformat=i.AutocompleteView=i.AutoMediaEmbed=i.AutoLink=i.AutoImage=i.AttributeOperation=i.AttributeElement=i.AttributeCommand=i.AlignmentUI=i.AlignmentEditing=i.Alignment=i.AdjacentListsSupport=i.AccessibilityHelp=void 0,i.CssTransitionDisablerMixin=Lf,i.DataApiMixin=function(e){return e},i.DomConverter=i.DocumentSelection=i.DocumentListProperties=i.DocumentList=i.DocumentFragment=i.DialogViewPosition=i.DialogView=i.Dialog=i.Delete=i.DefaultMenuBarItems=i.DecoupledEditor=i.DataTransfer=i.DataSchema=i.DataFilter=i.DataController=void 0,i.DomEmitterMixin=Wr,i.DropdownMenuListItemButtonView=i.DropdownButtonView=i.DragDropTarget=i.DragDropBlockToolbar=i.DragDrop=i.DowncastWriter=i.DomWrapperView=i.DomEventObserver=i.DomEventData=void 0,i.Element=i.EditorWatchdog=i.EditorUIView=i.EditorUI=i.Editor=i.EditingView=i.EditingController=i.EasyImage=i.DropdownView=i.DropdownPanelView=i.DropdownMenuRootListView=i.DropdownMenuPanelPositioningFunctions=i.DropdownMenuNestedMenuView=i.DropdownMenuListView=i.DropdownMenuListItemView=void 0,i.ElementApiMixin=$d,i.ElementReplacer=void 0,i.EmitterMixin=A,i.ImageUploadUI=i.ImageUploadProgress=i.ImageUploadEditing=i.ImageUpload=i.ImageToolbar=i.ImageTextAlternativeU
1I=i.ImageTextAlternativeEditing=i.ImageTextAlternative=i.ImageStyleUI=i.ImageStyleEditing=i.ImageStyle=i.ImageSizeAttributes=i.ImageResizeHandles=i.ImageResizeEditing=i.ImageResizeButtons=i.ImageResize=i.ImageInsertViaUrl=i.ImageInsertUI=i.ImageInsert=i.ImageInline=i.ImageEditing=i.ImageCustomResizeUI=i.ImageCaptionUtils=i.ImageCaptionUI=i.ImageCaptionEditing=i.ImageCaption=i.ImageBlockEditing=i.ImageBlock=i.Image=i.IframeView=i.IconView=i.HtmlPageDataProcessor=i.HtmlEmbedUI=i.HtmlEmbedEditing=i.HtmlEmbed=i.HtmlDataProcessor=i.HtmlComment=i.HorizontalLineUI=i.HorizontalLineEditing=i.HorizontalLine=i.History=i.HighlightedTextView=i.HighlightUI=i.HighlightEditing=i.Highlight=i.HeadingUI=i.HeadingEditing=i.HeadingButtonsUI=i.Heading=i.GeneralHtmlSupport=i.GFMDataProcessor=i.FullPage=i.FormHeaderView=i.FontSizeUI=i.FontSizeEditing=i.FontSize=i.FontFamilyUI=i.FontFamilyEditing=i.FontFamily=i.FontColorUI=i.FontColorEditing=i.FontColor=i.FontBackgroundColorUI=i.FontBackgroundColorEditing=i.FontBackgroundColor=i.Font=i.FocusTracker=i.FocusObserver=i.FocusCycler=i.FindPreviousCommand=i.FindNextCommand=i.FindCommand=i.FindAndReplaceUtils=i.FindAndReplaceUI=i.FindAndReplaceEditing=i.FindAndReplace=i.FileRepository=i.FileDialogListItemButtonView=i.FileDialogButtonView=i.EventInfo=i.Essentials=i.Enter=void 0,i.Notification=i.NoOperation=i.MultiRootEditor=i.MultiCommand=i.MoveOperation=i.MouseObserver=i.Model=i.Minimap=i.MergeOperation=i.MenuBarView=i.MenuBarMenuView=i.MenuBarMenuListView=i.MenuBarMenuListItemView=i.MenuBarMenuListItemFileDialogButtonView=i.MenuBarMenuListItemButtonView=i.MentionsView=i.MentionUI=i.MentionListItemView=i.MentionEditing=i.Mention=i.MediaEmbedUI=i.MediaEmbedToolbar=i.MediaEmbedEditing=i.MediaEmbed=i.Matcher=i.MarkerOperation=i.MarkdownToHtml=i.Markdown=i.MSWordNormalizer=i.Locale=i.LiveRange=i.LivePosition=i.ListView=i.ListUtils=i.ListUI=i.ListSeparatorView=i.ListPropertiesUtils=i.ListPropertiesUI=i.ListPropertiesEditing=i.ListProperties=i.ListItemView=i.ListItemGroupView=i.ListItemButtonView=i.ListIndentCommand=i.ListEditing=i.ListCommand=i.List=i.LinkUI=i.LinkImageUI=i.LinkImageEditing=i.LinkImage=i.LinkFormView=i.LinkEditing=i.LinkCommand=i.LinkActionsView=i.Link=i.LegacyTodoListEditing=i.LegacyTodoList=i.LegacyListUtils=i.LegacyListPropertiesEditing=i.LegacyListProperties=i.LegacyListEditing=i.LegacyList=i.LegacyIndentCommand=i.LabeledFieldView=i.LabelWithHighlightView=i.LabelView=i.KeystrokeHandler=i.ItalicUI=i.ItalicEditing=i.Italic=i.InsertTextCommand=i.InsertOperation=i.InsertBookmarkCommand=i.InputView=i.InputTextView=i.InputNumberView=i.Input=i.InlineEditor=i.InlineEditableUIView=i.IndentUI=i.IndentEditing=i.IndentBlock=i.Indent=i.ImageUtils=void 0,i.ObservableMixin=Er,i.Plugin=i.PlainTableOutput=i.PictureEditing=i.PendingActions=i.PastePlainText=i.PasteFromOffice=i.PasteFromMarkdownExperimental=i.ParagraphButtonUI=i.Paragraph=i.PageBreakUI=i.PageBreakEditing=i.PageBreak=i.OperationFactory=i.Observer=void 0,i.TreeWalker=i.TooltipManager=i.ToolbarView=i.ToolbarSeparatorView=i.ToolbarLineBreakView=i.Token=i.TodoListUI=i.TodoListEditing=i.TodoList=i.TodoDocumentList=i.Title=i.TextareaView=i.TextWatcher=i.TextTransformation=i.TextProxy=i.TextPartLanguageUI=i.TextPartLanguageEditing=i.TextPartLanguage=i.Text=i.Template=i.TableUtils=i.TableUI=i.TableToolbar=i.TableSelection=i.TablePropertiesUI=i.TablePropertiesEditing=i.TableProperties=i.TableMouse=i.TableKeyboard=i.TableEditing=i.TableColumnResizeEditing=i.TableColumnResize=i.TableClipboard=i.TableCellWidthEditing=i.TableCellPropertiesUI=i.TableCellPropertiesEditing=i.TableCellProperties=i.TableCaptionUI=i.TableCaptionEditing=i.TableCaption=i.Table=i.TabObserver=i.SwitchButtonView=i.SuperscriptUI=i.SuperscriptEditing=i.Superscript=i.SubscriptUI=i.SubscriptEditing=i.Subscript=i.StylesProcessor=i.StylesMap=i.StyleUtils=i.StyleUI=i.StyleEditing=i.Style=i.StrikethroughUI=i.StrikethroughEditing=i.Strikethrough=i.StickyPanelView=i.StandardEditingModeUI=i.StandardEditingModeEditing=i.StandardEditingMode=i.SplitOperation=i.SplitButtonView=i.SpinnerView=i.SpecialCharactersText=i.SpecialCharactersMathematical=i.SpecialCharactersLatin=i.SpecialCharactersEssentials=i.SpecialCharactersCurrency=i.SpecialCharactersArrows=i.SpecialCharacters=i.SourceEditing=i.SimpleUploadAdapter=i.ShowBlocksUI=i.ShowBlocksEditing=i.ShowBlocksCommand=i.ShowBlocks=i.ShiftEnter=i.SelectAllUI=i.SelectAllEditing=i.SelectAll=i.SearchTextView=i.SearchInfoView=i.RootOperation=i.RootAttributeOperation=i.RestrictedEditingModeUI=i.RestrictedEditingModeEditing=i.RestrictedEditingMode=i.ResizeObserver=i.ReplaceCommand=i.ReplaceAllCommand=i.Renderer=i.RenameOperation=i.RemoveFormatUI=i.RemoveFormatEditing=i.RemoveFormat=i.Rect=i.Range=i.Position=void 0,i.XmlDataProcessor=i.WordCount=i.WidgetTypeAround=i.WidgetToolbarRepository=i.WidgetResize=i.Widget=i.Watchdog=i.WIDGET_SELECTED_CLASS_NAME=i.WIDGET_CLASS_NAME=i.ViewUIElement=i.ViewTreeWalker=i.ViewText=i.ViewRootEditableElement=i.ViewRawElement=i.ViewModel=i.ViewEmptyElement=i.ViewElement=i.ViewEditableElement=i.ViewDocumentFragment=i.ViewDocument=i.ViewContainerElement=i.ViewCollection=i.ViewAttributeElement=i.View=i.UpdateBookmarkCommand=i.UpcastWriter=i.UnlinkCommand=i.UndoUI=i.UndoEditing=i.Undo=i.UnderlineUI=i.UnderlineEditing=i.Underline=i.Typing=i.TwoStepCaretMovement=void 0,i._getModelData=gd,i._getViewData=cd,i._parseModel=yd,i._parseView=dd,i._setModelData=vd,i._setVie
1wData=ud,i._stringifyModel=bd,i._stringifyView=hd,i.abortableDebounce=Or,i.addBackgroundRules=Wh,i.addBorderRules=$h,i.addKeyboardHandlingForGrid=Bf,i.addLinkProtocolIfApplicable=oE,i.addListToDropdown=xm,i.addMarginRules=td,i.addMenuToDropdown=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.menuView=new cm(e.locale,t,i),e.focusTracker.add(e.menuView),e.isOpen?wm(e,n):e.once("change:isOpen",()=>{wm(e,n)},{priority:"highest"})},i.addPaddingRules=id,i.addToolbarToDropdown=_m,i.attachToForm=Wd,i.autoParagraphEmptyRoots=dc,i.blockAutoformatEditing=hb,i.calculateResizeHostAncestorWidth=Cy,i.calculateResizeHostPercentageWidth=Sy,i.clickOutsideHandler=Of,i.compareArrays=Rr,i.count=Lr,i.crc32=ss,i.createDropdown=ym,i.createElement=Nr,i.createImageTypeRegExp=KC,i.createLabeledTextarea=i.createLabeledInputText=i.createLabeledInputNumber=i.createLabeledDropdown=void 0,i.delay=rs,i.diff=h,i.diffToChanges=function(e,t){const i=[];let n=0,r=null;return e.forEach(e=>{"equal"==e?(o(),n++):"insert"==e?(r&&"insert"==r.type?r.values.push(t[n]):(o(),r={type:"insert",index:n,values:[t[n]]}),n++):r&&"delete"==r.type?r.howMany++:(o(),r={type:"delete",index:n,howMany:1})}),o(),i;function o(){r&&(i.push(r),r=null)}},i.disablePlaceholder=function(e,t){const i=t.document;ks.has(i)&&e.change(e=>{const n=ks.get(i),r=n.get(t);e.removeAttribute("data-placeholder",r.hostElement),Es(e,r.hostElement),n.delete(t)})},i.enablePlaceholder=Cs,i.ensureSafeUrl=nE,i.env=void 0,i.exponentialDelay=is,i.fastDiff=l,i.filterGroupAndItemNames=function(e,t){let i=0,n=0;for(const r of t){const t=r,o=t.items,s=e&&!!t.label.match(e);t.labelView.highlightText(s?e:null);for(const t of o){const i=t.children.first,n=i.labelView;if(e){const r=!!i.label.match(e);n.highlightText(r?e:null),t.isVisible=s||r}else t.isVisible=!0,n.highlightText(null)}const a=o.filter(e=>e.isVisible).length;i+=t.items.length,n+=s?t.items.length:a,t.isVisible=s||!!a}return{resultsCount:n,totalItemsCount:i}},i.findAttributeRange=lb,i.findAttributeRangeBound=cb,i.findClosestScrollableAncestor=qr,i.findOptimalInsertionRange=ky,i.first=qo,i.focusChildOnDropdownOpen=Sm,i.getAncestors=Yr,i.getBorderWidths=Xr,i.getBoxSidesShorthandValue=Vh,i.getBoxSidesValueReducer=zh,i.getBoxSidesValues=Fh,i.getCode=Ro,i.getDataFromElement=Zr,i.getEnvKeystrokeText=No,i.getFillerOffset=$s,i.getLabel=wy,i.getLanguageDirection=Ho,i.getLastTextLine=Gv,i.getLocalizedArrowKeyCodeDirection=Fo,i.getLocalizedColorOptions=pp,i.getOptimalPosition=go,i.getPositionShorthandNormalizer=Hh,i.getRangeFromMouseEvent=Kr,i.getShorthandValues=Uh,i.global=void 0,i.hidePlaceholder=Es,i.icons=void 0,i.indexOf=uo,i.injectCssTransitionDisabler=function(e){const t=e;t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})},i.inlineAutoformatEditing=db,i.inlineHighlight=ub,i.insertAt=ho,i.insertToPriorityArray=g,i.isArrowKeyCode=jo,i.isAttachment=Bh,i.isColor=Ch,i.isCombiningMark=as,i.isComment=fo,i.isFocusable=Wf,i.isForwardArrowKeyCode=zo,i.isHighSurrogateHalf=ls,i.isInsideCombinedSymbol=hs,i.isInsideEmojiSequence=fs,i.isInsideSurrogatePair=us,i.isIterable=Br,i.isLength=Ah,i.isLineStyle=Eh,i.isLinkableElement=rE,i.isLowSurrogateHalf=cs,i.isNode=Vr,i.isParagraphable=fc,i.isPercentage=Mh,i.isPosition=Lh,i.isRange=Qr,i.isRepeat=Dh,i.isText=Jr,i.isURL=jh,i.isValidAttributeName=po,i.isViewWithFocusCycler=$f,i.isViewWithFocusTracker=Zo,i.isVisible=mo,i.isWidget=py,i.keyCodes=void 0,i.logError=y,i.logWarning=b,i.mix=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];i.forEach(t=>{const i=Object.getOwnPropertyNames(t),n=Object.getOwnPropertySymbols(t);i.concat(n).forEach(i=>{if(i in e.prototype)return;if("function"==typeof t&&("length"==i||"name"==i||"prototype"==i))return;const n=Object.getOwnPropertyDescriptor(t,i);n.enumerable=!1,Object.defineProperty(e.prototype,i,n)})})},i.needsPlaceholder=Ts,i.normalizeColorOptions=mp,i.normalizeMenuBarConfig=Lg,i.normalizeSingleColorDefinition=gp,i.normalizeToolbarConfig=dm,i.parseBase64EncodedObject=os,i.parseHtml=FP,i.parseKeystroke=Bo,i.plainTextToHtml=Bw,i.releaseDate=i.priorities=void 0,i.remove=yo,i.retry=ts,i.scrollAncestorsToShowTarget=function(e,t,i){ko({parent:Ao(e),getRect:()=>new io(e),ancestorOffset:t,limiterElement:i})},i.scrollViewportToShowTarget=wo,i.secureSourceElement=Gd,i.setDataInElement=lo,i.setHighlightHandling=by,i.setLabel=yy,i.showPlaceholder=Ss,i.spliceArray=ns,i.submitHandler=Rf,i.toArray=Uo,i.toMap=Qo,i.toUnit=co,i.toWidget=my,i.toWidgetEditable=_
1y,i.transformSets=ku,i.uid=p,i.version=void 0,i.viewToModelPositionOutsideModelElement=function(e,t){return(i,n)=>{const{mapper:r,viewPosition:o}=n,s=r.findMappedViewAncestor(o);if(!t(s))return;const a=r.toModelElement(s);n.modelPosition=e.createPositionAt(a,o.isAtStart?"before":"after")}},i.wait=es,i.wrapInParagraph=pc,e("core-js/modules/es.regexp.flags.js");try{n={window:window,document:document}}catch(e){n={window:{},document:{}}}var r=i.global=n;const o=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),s=i.env={isMac:a(o),isWindows:function(e){return e.indexOf("windows")>-1}(o),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(o),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(o),isiOS:function(e){return!!e.match(/iphone|ipad/i)||a(e)&&navigator.maxTouchPoints>0}(o),isAndroid:function(e){return e.indexOf("android")>-1}(o),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(o),get isMediaForcedColors(){return!!r.window.matchMedia&&r.window.matchMedia("(forced-colors: active)").matches},get isMotionReduced(){return!!r.window.matchMedia&&r.window.matchMedia("(prefers-reduced-motion)").matches},features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="Ä".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}};function a(e){return e.indexOf("macintosh")>-1}function l(e,t,i,n){i=i||function(e,t){return e===t};const r=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Array.isArray(t)?t:Array.prototype.slice.call(t),s=function(e,t,i){const n=c(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const r=c(u(e,n),u(t,n),i);return{firstIndex:n,lastIndexOld:e.length-r,lastIndexNew:t.length-r}}(r,o,i),a=n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:r}=e;if(-1===i)return Array(t).fill("equal");let o=[];return i>0&&(o=o.concat(Array(i).fill("equal"))),r-i>
10&&(o=o.concat(Array(r-i).fill("insert"))),n-i>0&&(o=o.concat(Array(n-i).fill("delete"))),r<t&&(o=o.concat(Array(t-r).fill("equal"))),o}(s,o.length):function(e,t){const i=[],{firstIndex:n,lastIndexOld:r,lastIndexNew:o}=t;return o-n>0&&i.push({index:n,type:"insert",values:e.slice(n,o)}),r-n>0&&i.push({index:n+(o-n),type:"delete",howMany:r-n}),i}(o,s);return a}function c(e,t,i){for(let n=0;n<Math.max(e.length,t.length);n++)if(void 0===e[n]||void 0===t[n]||!i(e[n],t[n]))return n;return-1}function u(e,t){return e.slice(t).reverse()}function h(e,t,i){i=i||function(e,t){return e===t};const n=e.length,r=t.length;if(n>200||r>200||n+r>300)return h.fastDiff(e,t,i,!0);let o,s;if(r<n){const i=e;e=t,t=i,o="delete",s="insert"}else o="insert",s="delete";const a=e.length,l=t.length,c=l-a,u={},d={};function f(n){const r=(void 0!==d[n-1]?d[n-1]:-1)+1,c=void 0!==d[n+1]?d[n+1]:-1,h=r>c?-1:1;u[n+h]&&(u[n]=u[n+h].slice(0)),u[n]||(u[n]=[]),u[n].push(r>c?o:s);let f=Math.max(r,c),p=f-n;for(;p<a&&f<l&&i(e[p],t[f]);)p++,f++,u[n].push("equal");return f}let p,m=0;do{for(p=-m;p<c;p++)d[p]=f(p);for(p=c+m;p>c;p--)d[p]=f(p);d[c]=f(c),m++}while(d[c]!==l);return u[c].slice(1)}h.fastDiff=l;class d{source;name;path;stop;off;return;constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}i.EventInfo=d;const f=new Array(256).fill("").map((e,t)=>("0"+t.toString(16)).slice(-2));function p(){const[e,t,i,n]=crypto.getRandomValues(new Uint32Array(4));return"e"+f[255&e]+f[e>>8&255]+f[e>>16&255]+f[e>>24&255]+f[255&t]+f[t>>8&255]+f[t>>16&255]+f[t>>24&255]+f[255&i]+f[i>>8&255]+f[i>>16&255]+f[i>>24&255]+f[255&n]+f[n>>8&255]+f[n>>16&255]+f[n>>24&255]}const m=i.priorities={get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function g(e,t){const i=m.get(t.priority);let n=0,r=e.length;for(;n<r;){const t=n+r>>1;m.get(e[t].priority)<i?r=t:n=t+1}e.splice(n,0,t)}class v extends Error{context;data;constructor(e,t,i){super(function(e,t){const i=new WeakSet,n=t?` ${JSON.stringify(t,(e,t)=>{if("object"==typeof t&&null!==t){if(i.has(t))return`[object ${t.constructor.name}]`;i.add(t)}return t})}`:"";return e+n+w(e)}(e,i)),this.name="CKEditorError",this.context=t,this.data=i}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const i=new v(e.message,t);throw i.stack=e.stack,i}}function b(e,t){console.warn(..._(e,t))}function y(e,t){console.error(..._(e,t))}function w(e){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${e}`}function _(e,t){const i=w(e);return t?[e,t,i]:[e,i]}i.CKEditorError=v;const k=i.version="44.1.0",x=i.releaseDate=new Date(2024,11,16);if(globalThis.CKEDITOR_VERSION)throw new v("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=k;const C=Symbol("listeningTo"),S=Symbol("emitterId"),E=Symbol("delegations"),T=A(Object);function A(e){return e?class extends e{on(e,t,i){this.listenTo(this,e,t,i)}once(e,t,i){var n=this;let r=!1;this.listenTo(this,e,function(e){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];r||(r=!0,e.off(),t.call(n,e,...o))},i)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,i){let n,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};
1this[C]||(this[C]={});const s=this[C];M(e)||I(e);const a=M(e);(n=s[a])||(n=s[a]={emitter:e,callbacks:{}}),(r=n.callbacks[t])||(r=n.callbacks[t]=[]),r.push(i),function(e,t,i,n,r){t._addEventListener?t._addEventListener(i,n,r):e._addEventListener.call(t,i,n,r)}(this,e,t,i,o)}stopListening(e,t,i){const n=this[C];let r=e&&M(e);const o=n&&r?n[r]:void 0,s=o&&t?o.callbacks[t]:void 0;if(!(!n||e&&!o||t&&!s))if(i)L(this,e,t,i),-1!==s.indexOf(i)&&(1===s.length?delete o.callbacks[t]:L(this,e,t,i));else if(s){for(;i=s.pop();)L(this,e,t,i);delete o.callbacks[t]}else if(o){for(t in o.callbacks)this.stopListening(e,t);delete n[r]}else{for(r in n)this.stopListening(n[r].emitter);delete this[C]}}fire(e){try{const r=e instanceof d?e:new d(this,e),o=r.name;let s=function(e,t){if(!e._events)return null;let i=t;do{const t=e._events[i];if(t&&t.callbacks&&t.callbacks.length)return t.callbacks;const n=i.lastIndexOf(":");i=n>-1?i.substring(0,n):""}while(i);return null}(this,o);for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(r.path.push(this),s){s=s.slice();for(let e=0;e<s.length;e++){const t=s[e].callback;if(t.call(this,r,...i),r.off.called&&(delete r.off.called,this._removeEventListener(o,t)),r.stop.called)break}}const a=this[E];if(a){const e=a.get(o),t=a.get("*");e&&O(e,r,i),t&&O(t,r,i)}return r.return}catch(e){v.rethrowUnexpectedError(e,this)}}delegate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return{to:(e,i)=>{this[E]||(this[E]=new Map),t.forEach(t=>{const n=this[E].get(t);n?n.set(e,i):this[E].set(t,new Map([[e,i]]))})}}}stopDelegating(e,t){if(this[E])if(e)if(t){const i=this[E].get(e);i&&i.delete(t)}else this[E].delete(e);else this[E].clear()}_addEventListener(e,t,i){!function(e,t){const i=P(e);if(i[t])return;let n=t,r=null;const o=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},o.push(i[n]),r&&i[n].childEvents.push(r),r=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of o)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(r)}}(this,e);const n=D(this,e),r={callback:t,priority:m.get(i.priority)};for(const e of n)g(e,r)}_removeEventListener(e,t){const i=D(this,e);for(const e of i)for(let i=0;i<e.length;i++)e[i].callback==t&&(e.splice(i,1),i--)}}:T}function I(e,t){e[S]||(e[S]=t||p())}function M(e){return e[S]}function P(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function D(e,t){const i=P(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t<i.childEvents.length;t++){const r=D(e,i.childEvents[t]);n=n.concat(r)}return n}function O(e,t,i){for(let[n,r]of e){r?"function"==typeof r&&(r=r(t.name)):r=t.name;const e=new d(t.source,r);e.path=[...t.path],n.fire(e,...i)}}function L(e,t,i,n){t._removeEventListener?t._removeEventListener(i,n):e._removeEventListener.call(t,i,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(e=>{A[e]=T.prototype[e]});var R="object"==typeof global&&global&&global.Object===Object&&global,B="object"==typeof self&&self&&self.Object===Object&&self,N=R||B||Function("return this")(),j=N.Symbol,F=Object.prototype,z=F.hasOwnProperty,V=F.toString,H=j?j.toStringTag:void 0,U=Object.prototype.toString,W=j?j.toStringTag:void 0;function $(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=z.call(e,H),i=e[H];try{e[H]=void 0;var n=!0}catch(e){}var r=V.call(e);return n&&(t?e[H]=i:delete e[H]),r}(e):function(e){return U.call(e)}(e)}function G(e){return null!=e&&"object"==typeof e}function q(e){return"symbol"==typeof e||G(e)&&"[object Symbol]"==$(e)}function Y(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}var Z=Array.isArray,X=j?j.prototype:void 0,K=X?X.toString:void 0;function J(e){if("string"==typeof e)return e;if(Z(e))return Y(e,J)+"";if(q(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var Q=/\s/,ee=/^\s+/;function te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var ie=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^0o[0-7]+$/i,oe=parseInt;function se(e){if("number"==typeof e)return e;if(q(e))return NaN;if(te(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=te(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Q.test(e.charAt(t)););return t}(e)+1).replace(ee,""):e}(e);var i=ne.test(e);return i||re.test(e)?oe(e.slice(2),i?2:8):ie.test(e)?NaN:+e}function ae(e){return e}function le(e){if(!te(e))return!1;var t=$(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ce=N["__core-js_shared__"],ue=function(){var e=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");
vendor: 4,098 bytes, line 1
1return e?"Symbol(src)_1."+e:""}(),he=Function.prototype.toString;function de(e){if(null!=e){try{return he.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var fe=/^\[object .+?Constructor\]$/,pe=Function.prototype,me=Object.prototype,ge=pe.toString,ve=me.hasOwnProperty,be=RegExp("^"+ge.call(ve).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ye(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!te(e)||(t=e,ue&&ue in t))&&(le(e)?be:fe).test(de(e));var t}(i)?i:void 0}var we=ye(N,"WeakMap"),_e=Object.create,ke=function(){function e(){}return function(t){if(!te(t))return{};if(_e)return _e(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();function xe(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}var Ce=Date.now,Se=function(){try{var e=ye(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ee=function(e){var t=0,i=0;return function(){var n=Ce(),r=16-(n-i);if(i=n,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Se?function(e,t){return Se(e,"toString",{configurable:!0,enumerable:!1,value:(i=t,function(){return i}),writable:!0});var i}:ae),Te=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&Te.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e,t,i){"__proto__"==t&&Se?Se(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function Me(e,t){return e===t||e!=e&&t!=t}var Pe=Object.prototype.hasOwnProperty;function De(e,t,i){var n=e[t];Pe.call(e,t)&&Me(n,i)&&(void 0!==i||t in e)||Ie(e,t,i)}function Oe(e,t,i,n){var r=!i;i||(i={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=void 0;void 0===l&&(l=e[a]),r?Ie(i,a,l):De(i,a,l)}return i}var Le=Math.max;function Re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Be(e){return null!=e&&Re(e.length)&&!le(e)}function Ne(e){return function(e,t){return Ee(function(e,t,i){return t=Le(void 0===t?e.length-1:t,0),function(){for(var n=arguments,r=-1,o=Le(n.length-t,0),s=Array(o);++r<o;)s[r]=n[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=n[r];return a[t]=i(s),function(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}(e,this,a)}}(e,t,ae),e+"")}(function(t,i){var n=-1,r=i.length,o=r>1?i[r-1]:void 0,s=r>2?i[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,s&&function(e,t,i){if(!te(i))return!1;var n=typeof t;return!!("number"==n?Be(i)&&Ae(t,i.length):"string"==n&&t in i)&&Me(i[t],e)}(i[0],i[1],s)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var a=i[n];a&&e(t,a,n,o)}return t})}var je=Object.prototype;function Fe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function ze(e){return G(e)&&"[object Arguments]"==$(e)}var Ve=Object.prototype,He=Ve.hasOwnProperty,Ue=Ve.propertyIsEnumerable,We=ze(function(){return arguments}())?ze:function(e){return G(e)&&He.call(e,"callee")&&!Ue.call(e,"callee")},$e="object"==typeof i&&i&&!i.nodeType&&i,Ge=$e&&"object"==typeof t&&t&&!t.nodeType&&t,qe=Ge&&Ge.exports===$e?N.Buffer:void 0,Ye=(qe?qe.isBuffer:void 0)||function(){return!1},Ze={};function Xe(e){return function(t){return e(t)}}Ze["[object Float32Array]"]=Ze["[object Float64Array]"]=Ze["[object Int8Array]"]=Ze["[object Int16Array]"]=Ze["[object Int32Array]"]=Ze["[object Uint8Array]"]=Ze["[object Uint8ClampedArray]"]=Ze["[object Uint16Array]"]=Ze["[object Uint32Array]"]=!0,Ze["[object Arguments]"]=Ze["[object Array]"]=Ze["[object ArrayBuffer]"]=Ze["[object Boolean]"]=Ze["[object DataView]"]=Ze["[object Date]"]=Ze["[object Error]"]=Ze["[object Function]"]=Ze["[object Map]"]=Ze["[object Number]"]=Ze["[object Object]"]=Ze["[object RegExp]"]=Ze["[object Set]"]=Ze["[object String]"]=Ze["[object WeakMap]"]=!1;var Ke="object"==typeof i&&i&&!i.nodeType&&i,Je=Ke&&"object"==typeof t&&t&&!t.nodeType&&t,Qe=Je&&Je.exports===Ke&&R.process,et=function(){try{return Je&&Je.require&&Je.require("util").t
vendor: 4,760 bytes, line 1
1ypes||Qe&&Qe.binding&&Qe.binding("util")}catch(e){}}(),tt=et&&et.isTypedArray,it=tt?Xe(tt):function(e){return G(e)&&Re(e.length)&&!!Ze[$(e)]},nt=Object.prototype.hasOwnProperty;function rt(e,t){var i=Z(e),n=!i&&We(e),r=!i&&!n&&Ye(e),o=!i&&!n&&!r&&it(e),s=i||n||r||o,a=s?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],l=a.length;for(var c in e)!t&&!nt.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ae(c,l))||a.push(c);return a}function ot(e,t){return function(i){return e(t(i))}}var st=ot(Object.keys,Object),at=Object.prototype.hasOwnProperty;function lt(e){return Be(e)?rt(e):function(e){if(!Fe(e))return st(e);var t=[];for(var i in Object(e))at.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}var ct=Object.prototype.hasOwnProperty;function ut(e){return Be(e)?rt(e,!0):function(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=Fe(e),i=[];for(var n in e)("constructor"!=n||!t&&ct.call(e,n))&&i.push(n);return i}(e)}var ht=Ne(function(e,t){Oe(t,ut(t),e)}),dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ft=/^\w*$/;function pt(e,t){if(Z(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!q(e))||ft.test(e)||!dt.test(e)||null!=t&&e in Object(t)}var mt=ye(Object,"create"),gt=Object.prototype.hasOwnProperty,vt=Object.prototype.hasOwnProperty;function bt(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function yt(e,t){for(var i=e.length;i--;)if(Me(e[i][0],t))return i;return-1}bt.prototype.clear=function(){this.__data__=mt?mt(null):{},this.size=0},bt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},bt.prototype.get=function(e){var t=this.__data__;if(mt){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return gt.call(t,e)?t[e]:void 0},bt.prototype.has=function(e){var t=this.__data__;return mt?void 0!==t[e]:vt.call(t,e)},bt.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=mt&&void 0===t?"__lodash_hash_undefined__":t,this};var wt=Array.prototype.splice;function _t(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}_t.prototype.clear=function(){this.__data__=[],this.size=0},_t.prototype.delete=function(e){var t=this.__data__,i=yt(t,e);return!(i<0||(i==t.length-1?t.pop():wt.call(t,i,1),--this.size,0))},_t.prototype.get=function(e){var t=this.__data__,i=yt(t,e);return i<0?void 0:t[i][1]},_t.prototype.has=function(e){return yt(this.__data__,e)>-1},_t.prototype.set=function(e,t){var i=this.__data__,n=yt(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};var kt=ye(N,"Map");function xt(e,t){var i,n,r=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?r["string"==typeof t?"string":"hash"]:r.map}function Ct(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function St(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var s=e.apply(this,n);return i.cache=o.set(r,s)||o,s};return i.cache=new(St.Cache||Ct),i}Ct.prototype.clear=function(){this.size=0,this.__data__={hash:new bt,map:new(kt||_t),string:new bt}},Ct.prototype.delete=function(e){var t=xt(this,e).delete(e);return this.size-=t?1:0,t},Ct.prototype.get=function(e){return xt(this,e).get(e)},Ct.prototype.has=function(e){return xt(this,e).has(e)},Ct.prototype.set=function(e,t){var i=xt(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},St.Cache=Ct;var Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tt=/\\(\\)?/g,At=function(){var e=St(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Et,function(e,i,n,r){t.push(n?r.replace(Tt,"$1"):i||e)}),t},function(e){return 500===t.size&&t.clear(),e}),t=e.cache;return e}();function It(e){return null==e?"":J(e)}function Mt(e,t){return Z(e)?e:pt(e,t)?[e]:At(It(e))}function Pt(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Dt(e,t){for(var i=0,n=(t=Mt(t,e)).length;null!=e&&i<n;)e=e[Pt(t[i++])];return i&&i==n?e:void 0}function Ot(e,t,i){var n=null==e?void 0:Dt(e,t);return void 0===n?i:n}function Lt(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}var Rt=ot(Object.getPrototypeOf,Object),Bt=Function.prototype,Nt=Object.prototype,jt=Bt.toString,Ft=Nt.hasOwnProperty,zt=jt.call(Object);function Vt(e){if(!G(e)||"[object Object]"!=$(e))return!1;var t=Rt(e);
vendor: 2,879 bytes, line 1
1if(null===t)return!0;var i=Ft.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&jt.call(i)==zt}function Ht(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+t];return o}var Ut=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Wt(e){return Ut.test(e)}var $t="\\ud800-\\udfff",Gt="["+$t+"]",qt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Yt="\\ud83c[\\udffb-\\udfff]",Zt="[^"+$t+"]",Xt="(?:\\ud83c[\\udde6-\\uddff]){2}",Kt="[\\ud800-\\udbff][\\udc00-\\udfff]",Jt="(?:"+qt+"|"+Yt+")?",Qt="[\\ufe0e\\ufe0f]?",ei=Qt+Jt+"(?:\\u200d(?:"+[Zt,Xt,Kt].join("|")+")"+Qt+Jt+")*",ti="(?:"+[Zt+qt+"?",qt,Xt,Kt,Gt].join("|")+")",ii=RegExp(Yt+"(?="+Yt+")|"+ti+ei,"g");var ni=function(e){var t,i,n,r=Wt(e=It(e))?function(e){return Wt(e)?function(e){return e.match(ii)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,o=r?r[0]:e.charAt(0),s=r?(t=r,n=t.length,i=void 0===i?n:i,Ht(t,1,i)).join(""):e.slice(1);return o.toUpperCase()+s};function ri(e){return function(t){return null==e?void 0:e[t]}}var oi=ri({"Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã
":"A","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","Ã":"C","ç":"c","Ã":"D","ð":"d","Ã":"E","Ã":"E","Ã":"E","Ã":"E","è":"e","é":"e","ê":"e","ë":"e","Ã":"I","Ã":"I","Ã":"I","Ã":"I","ì":"i","Ã":"i","î":"i","ï":"i","Ã":"N","ñ":"n","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ã":"U","Ã":"U","Ã":"U","Ã":"U","ù":"u","ú":"u","û":"u","ü":"u","Ã":"Y","ý":"y","ÿ":"y","Ã":"Ae","æ":"ae","Ã":"Th","þ":"th","Ã":"ss","Ä":"A","Ä":"A","Ä":"A","Ä":"a","Ä":"a","Ä
":"a","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"c","Ä":"c","Ä":"c","Ä":"c","Ä":"D","Ä":"D","Ä":"d","Ä":"d","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"G","Ä":"G","Ä ":"G","Ä¢":"G","Ä":"g","Ä":"g","Ä¡":"g","Ä£":"g","Ĥ":"H","Ħ":"H","Ä¥":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Ä®":"I","İ":"I","Ä©":"i","Ä«":"i","Ä":"i","į":"i","ı":"i","Ä´":"J","ĵ":"j","Ķ":"K","Ä·":"k","ĸ":"k","Ĺ":"L","Ä»":"L","Ľ":"L","Ä¿":"L","Å":"L","ĺ":"l","ļ":"l","ľ":"l","Å":"l","Å":"l","Å":"N","Å
":"N","Å":"N","Å":"N","Å":"n","Å":"n","Å":"n","Å":"n","Å":"O","Å":"O","Å":"O","Å":"o","Å":"o","Å":"o","Å":"R","Å":"R","Å":"R","Å":"r","Å":"r","Å":"r","Å":"S","Å":"S","Å":"S","Å ":"S","Å":"s","Å":"s","Å":"s","Å¡":"s","Å¢":"T","Ť":"T","Ŧ":"T","Å£":"t","Å¥":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Å®":"U","Ű":"U","Ų":"U","Å©":"u","Å«":"u","Å":"u","ů":"u","ű":"u","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","Å»":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Å":"Oe","Å":"oe","Å":"'n","Å¿":"s"}
vendor: 8,640 bytes, line 1
1),si=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ai=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),li=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ci=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ui="\\ud800-\\udfff",hi="\\u2700-\\u27bf",di="a-z\\xdf-\\xf6\\xf8-\\xff",fi="A-Z\\xc0-\\xd6\\xd8-\\xde",pi="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",mi="["+pi+"]",gi="\\d+",vi="["+hi+"]",bi="["+di+"]",yi="[^"+ui+pi+gi+hi+di+fi+"]",wi="(?:\\ud83c[\\udde6-\\uddff]){2}",_i="[\\ud800-\\udbff][\\udc00-\\udfff]",ki="["+fi+"]",xi="(?:"+bi+"|"+yi+")",Ci="(?:"+ki+"|"+yi+")",Si="(?:['â](?:d|ll|m|re|s|t|ve))?",Ei="(?:['â](?:D|LL|M|RE|S|T|VE))?",Ti="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ai="[\\ufe0e\\ufe0f]?",Ii=Ai+Ti+"(?:\\u200d(?:"+["[^"+ui+"]",wi,_i].join("|")+")"+Ai+Ti+")*",Mi="(?:"+[vi,wi,_i].join("|")+")"+Ii,Pi=RegExp([ki+"?"+bi+"+"+Si+"(?="+[mi,ki,"$"].join("|")+")",Ci+"+"+Ei+"(?="+[mi,ki+xi,"$"].join("|")+")",ki+"?"+xi+"+"+Si,ki+"+"+Ei,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gi,Mi].join("|"),"g");var Di=RegExp("['â]","g");function Oi(e){var t=this.__data__=new _t(e);this.size=t.size}Oi.prototype.clear=function(){this.__data__=new _t,this.size=0},Oi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Oi.prototype.get=function(e){return this.__data__.get(e)},Oi.prototype.has=function(e){return this.__data__.has(e)},Oi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof _t){var n=i.__data__;if(!kt||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Ct(n)}return i.set(e,t),this.size=i.size,this};var Li="object"==typeof i&&i&&!i.nodeType&&i,Ri=Li&&"object"==typeof t&&t&&!t.nodeType&&t,Bi=Ri&&Ri.exports===Li?N.Buffer:void 0,Ni=Bi?Bi.allocUnsafe:void 0;function ji(e,t){if(t)return e.slice();var i=e.length,n=Ni?Ni(i):new e.constructor(i);return e.copy(n),n}function Fi(){return[]}var zi=Object.prototype.propertyIsEnumerable,Vi=Object.getOwnPropertySymbols,Hi=Vi?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,r=0,o=[];++i<n;){var s=e[i];t(s)&&(o[r++]=s)}return o}(Vi(e),function(t){return zi.call(e,t)}))}:Fi,Ui=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Lt(t,Hi(e)),e=Rt(e);return t}:Fi;function Wi(e,t,i){var n=t(e);return Z(e)?n:Lt(n,i(e))}function $i(e){return Wi(e,lt,Hi)}function Gi(e){return Wi(e,ut,Ui)}var qi=ye(N,"DataView"),Yi=ye(N,"Promise"),Zi=ye(N,"Set"),Xi="[object Map]",Ki="[object Promise]",Ji="[object Set]",Qi="[object WeakMap]",en="[object DataView]",tn=de(qi),nn=de(kt),rn=de(Yi),on=de(Zi),sn=de(we),an=$;(qi&&an(new qi(new ArrayBuffer(1)))!=en||kt&&an(new kt)!=Xi||Yi&&an(Yi.resolve())!=Ki||Zi&&an(new Zi)!=Ji||we&&an(new we)!=Qi)&&(an=function(e){var t=$(e),i="[object Object]"==t?e.constructor:void 0,n=i?de(i):"";if(n)switch(n){case tn:return en;case nn:return Xi;case rn:return Ki;case on:return Ji;case sn:return Qi}return t});var ln=Object.prototype.hasOwnProperty,cn=N.Uint8Array;function un(e){var t=new e.constructor(e.byteLength);return new cn(t).set(new cn(e)),t}var hn=/\w*$/,dn=j?j.prototype:void 0,fn=dn?dn.valueOf:void 0;function pn(e,t){var i=t?un(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function mn(e){return"function"!=typeof e.constructor||Fe(e)?{}:ke(Rt(e))}var gn=et&&et.isMap,vn=gn?Xe(gn):function(e){return G(e)&&"[object Map]"==an(e)},bn=et&&et.isSet,yn=bn?Xe(bn):function(e){return G(e)&&"[object Set]"==an(e)},wn="[object Arguments]",_n="[object Function]",kn="[object Object]",xn={};function Cn(e,t,i,n,r,o){var s,a=1&t,l=2&t,c=4&t;if(i&&(s=r?i(e,n,r,o):i(e)),void 0!==s)return s;if(!te(e))return e;var u=Z(e);if(u){if(s=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&ln.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!a)return xe(e,s)}else{var h=an(e),d=h==_n||"[object GeneratorFunction]"==h;if(Ye(e))return ji(e,a);if(h==kn||h==wn||d&&!r){if(s=l||d?{}:mn(e),!a)return l?function(e,t){return Oe(e,Ui(e),t)}(e,function(e,t){return e&&Oe(t,ut(t),e)}(s,e)):function(e,t){return Oe(e,Hi(e),t)}(e,function(e,t){return e&&Oe(t,lt(t),e)}(s,e))}else{if(!xn[h])return r?e:{};s=function(e,t,i){var n,r,o,s=e.constructor;switch(t){case"[object ArrayBuffer]":return un(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var i=t?un(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return pn(e,i);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(o=new(r=e).constructor(r.source,hn.exec(r))).lastIndex=r.lastIndex,o;case"[object Symbol]":return n=e,fn?Object(fn.call(n)):{}}}(e,h,a)}}o||(o=new Oi);var f=o.get(e);if(f)return f;o.set(e,s),yn(e)?e.forEach(function(n){s.add(Cn(n,t,i,n,e,o))}):vn(e)&&e.forEach(function(n,r){s.set(r,Cn(n,t,i,r,e,o))});var p=u?void 0:(c?l?Gi:$i:l?ut:lt)(e);return function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i););}(p||e,function(n,r){p&&(n=e[r=n]),De(s,r,Cn(n,t,i,r,e,o))}),s}function Sn(e){return Cn(e,4)}function En(e){return Cn(e,5)}function Tn(e,t){return Cn(e,5,t="function"==typeof t?t:void 0)}function An(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Ct;++t<i;)this.add(e[t])}function In(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}function Mn(e,t){return e.has(t)}function Pn(e,t,i,n,r,o){var s=1&i,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,f=2&i?new An:void 0;for(o.set(e,t),o.set(t,e);++h<a;){var p=e[h],m=t[h];if(n)var g=s?n(m,p,h,t,e,o):n(p,m,h,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!In(t,function(e,t){if(!Mn(f,t)&&(p===e||r(p,e,i,n,o)))return f.push(t)})){d=!1;break}}else if(p!==m&&!r(p,m,i,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function Dn(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function On(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}xn[wn]=xn["[object Array]"]=xn["[object ArrayBuffer]"]=xn["[object DataView]"]=xn["[object Boolean]"]=xn["[object Date]"]=xn["[object Float32Array]"]=xn["[object Float64Array]"]=xn["[object Int8Array]"]=xn["[object Int16Array]"]=xn["[object Int32Array]"]=xn["[object Map]"]=xn["[object Number]"]=xn[kn]=xn["[object RegExp]"]=xn["[object Set]"]=xn["[object String]"]=xn["[object Symbol]"]=xn["[object Uint8Array]"]=xn["[object Uint8ClampedArray]"]=xn["[object Uint16Array]"]=xn["[object Uint32Array]"]=!0,xn["[object Error]"]=xn[_n]=xn["[object WeakMap]"]=!1,An.prototype.add=An.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},An.prototype.has=function(e){return this.__data__.has(e)};var Ln=j?j.prototype:void 0,Rn=Ln?Ln.valueOf:void 0,Bn=Object.prototype.hasOwnProperty,Nn="[object Arguments]",jn="[object Array]",Fn="[object Object]",zn=Object.prototype.hasOwnProperty;function Vn(e,t,i,n,r){return e===t||(null==e||null==t||!G(e)&&!G(t)?e!=e&&t!=t:function(e,t,i,n,r,o){var s=Z(e),a=Z(t),l=s?jn:an(e),c=a?jn:an(t),u=(l=l==Nn?Fn:l)==Fn,h=(c=c==Nn?Fn:c)==Fn,d=l==c;if(d&&Ye(e)){if(!Ye(t))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new Oi),s||it(e)?Pn(e,t,i,n,r,o):function(e,t,i,n,r,o,s){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new cn(e),new cn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Me(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Dn;case"[object Set]":var l=1&n;if(a||(a=On),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=Pn(a(e),a(t),n,r,o,s);return s.delete(e),u;case"[object Symbol]":if(Rn)return Rn.call(e)==Rn.call(t)}return!1}(e,t,l,i,n,r,o);if(!(1&i)){var f=u&&zn.call(e,"__wrapped__"),p=h&&zn.call(t,"__wrapped__");
1if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new Oi),r(m,g,i,n,o)}}return!!d&&(o||(o=new Oi),function(e,t,i,n,r,o){var s=1&i,a=$i(e),l=a.length;if(l!=$i(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:Bn.call(t,u)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++c<l;){var m=e[u=a[c]],g=t[u];if(n)var v=s?n(g,m,u,t,e,o):n(m,g,u,e,t,o);if(!(void 0===v?m===g||r(m,g,i,n,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,i,n,r,o))}(e,t,i,n,Vn,r))}function Hn(e){return e==e&&!te(e)}function Un(e,t){return function(i){return null!=i&&i[e]===t&&(void 0!==t||e in Object(i))}}function Wn(e,t){return null!=e&&t in Object(e)}function $n(e){return"function"==typeof e?e:null==e?ae:"object"==typeof e?Z(e)?(t=e[0],i=e[1],pt(t)&&Hn(i)?Un(Pt(t),i):function(e){var n=Ot(e,t);return void 0===n&&n===i?function(e,t){return null!=e&&function(e,t,i){for(var n=-1,r=(t=Mt(t,e)).length,o=!1;++n<r;){var s=Pt(t[n]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&Re(r)&&Ae(s,r)&&(Z(e)||We(e))}(e,t,Wn)}(e,t):Vn(i,n,3)}):function(e){var t=function(e){for(var t=lt(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,Hn(r)]}return t}(e);return 1==t.length&&t[0][2]?Un(t[0][0],t[0][1]):function(i){return i===e||function(e,t,i){var n=i.length,r=n;if(null==e)return!r;for(e=Object(e);n--;){var o=i[n];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<r;){var s=(o=i[n])[0],a=e[s],l=o[1];if(o[2]){if(void 0===a&&!(s in e))return!1}else if(!Vn(l,a,3,void 0,new Oi))return!1}return!0}(i,0,t)}}(e):function(e){return pt(e)?(t=Pt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Dt(t,e)}}(e);var t}(e);var t,i}var Gn=function(e,t,i){for(var n=-1,r=Object(e),o=i(e),s=o.length;s--;){var a=o[++n];if(!1===t(r[a],a,r))break}return e};function qn(e,t){return e&&Gn(e,t,lt)}var Yn,Zn=(Yn=qn,function(e,t){if(null==e)return e;if(!Be(e))return Yn(e,t);for(var i=e.length,n=-1,r=Object(e);++n<i&&!1!==t(r[n],n,r););return e}),Xn=function(){return N.Date.now()},Kn=Math.max,Jn=Math.min;function Qn(e,t,i){var n,r,o,s,a,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var i=n,o=r;return n=r=void 0,c=t,s=e.apply(o,i)}function p(e){var i=e-l;return void 0===l||i>=t||i<0||h&&e-c>=o}function m(){var e=Xn();if(p(e))return g(e);a=setTimeout(m,function(e){var i=t-(e-l);return h?Jn(i,o-(e-c)):i}(e))}function g(e){return a=void 0,d&&n?f(e):(n=r=void 0,s)}function v(){var e=Xn(),i=p(e);if(n=arguments,r=this,l=e,i){if(void 0===a)return function(e){return c=e,a=setTimeout(m,t),u?f(e):s}(l);if(h)return clearTimeout(a),a=setTimeout(m,t),f(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=se(t)||0,te(i)&&(u=!!i.leading,o=(h="maxWait"in i)?Kn(se(i.maxWait)||0,t):o,d="trailing"in i?!!i.trailing:d),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},v.flush=function(){return void 0===a?s:g(Xn())},v}function er(e,t,i){(void 0!==i&&!Me(e[t],i)||void 0===i&&!(t in e))&&Ie(e,t,i)}function tr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function ir(e,t,i,n,r){e!==t&&Gn(t,function(o,s){if(r||(r=new Oi),te(o))!function(e,t,i,n,r,o,s){var a=tr(e,i),l=tr(t,i),c=s.get(l);if(c)er(e,i,c);else{var u,h=o?o(a,l,i+"",e,t,s):void 0,d=void 0===h;if(d){var f=Z(l),p=!f&&Ye(l),m=!f&&!p&&it(l);h=l,f||p||m?Z(a)?h=a:G(u=a)&&Be(u)?h=xe(a):p?(d=!1,h=ji(l,!0)):m?(d=!1,h=pn(l,!0)):h=[]:Vt(l)||We(l)?(h=a,We(a)?h=function(e){return Oe(e,ut(e))}(a):te(a)&&!le(a)||(h=mn(l))):d=!1}d&&(s.set(l,h),r(h,l,n,o,s),s.delete(l)),er(e,i,h)}}(e,t,s,i,ir,n,r);else{var a=n?n(tr(e,s),o,s+"",e,t,r):void 0;void 0===a&&(a=o),er(e,s,a)}},ut)}var nr=Ne(function(e,t,i,n){ir(e,t,i,n)}),rr=ri({"&":"&","<":"<",">":">",'"':""","'":"'"}),or=/[&<>"']/g,sr=RegExp(or.source);function ar(e){return(e=It(e))&&sr.test(e)?e.replace(or,rr):e}var lr=/[\\^$.*+?()[\]{}|]/g,cr=RegExp(lr.source);function ur(e){return(e=It(e))&&cr.test(e)?e.replace(lr,"\\$&"):e}function hr(e,t){var i=-1,n=Be(e)?Array(e.length):[];return Zn(e,function(e,r,o){n[++i]=t(e,r,o)}),n}function dr(e){return"string"==typeof e||!Z(e)&&G(e)&&"[object String]"==$(e)}function fr(e){return G(e)&&1===e.nodeType&&!Vt(e)}function pr(e,t){return Vn(e,t)}var mr=Ne(function(e,t,i){ir(e,t,i)});function gr(e,t,i){return null==e?e:function(e,t,i){if(!te(e))return e;for(var n=-1,r=(t=Mt(t,e)).length,o=r-1,s=e;null!=s&&++n<r;){var a=Pt(t[n]),l=i;if("__proto__"===a||"constructor"===a||"prototype"===a)return e;if(n!=o){var c=s[a];void 0===(l=void 0)&&(l=te(c)?c:Ae(t[n+1])?[]:{})}De(s,a,l),s=s[a]}return e}(e,t,i)}var vr,br=(vr=function(e,t,i){return e+(i?" ":"")+ni(t)},function(e){return function(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)i=t(i,e[n],n,e);return i}(function(e,t){return e=It(e),void 0===t?function(e){return ci.test(e)}(e)?function(e){return e.match(Pi)||[]}(e):function(e){return e.match(li)||[]}(e):e.match(t)||[]}(function(e){return(e=It(e))&&e.replace(si,oi).replace(ai,"")}(e).replace(Di,"")),vr,"")});function yr(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return te(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),Qn(e,t,{leading:n,maxWait:t,trailing:r})}const wr=Symbol("observableProperties"),_r=Symbol("boundObservables"),kr=Symbol("boundProperties"),xr=Symbol("decoratedMethods"),Cr=Symbol("decoratedOriginal"),Sr=Er(A());function Er(e){return e?class extends e{set(e,t){if(te(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);Tr(this);const i=this[wr];if(e in this&&!i.has(e))throw new v("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let r=this.fire(`set:${e}`,e,t,n);void 0===r&&(r=t),n===r&&i.has(e)||(i.set(e,r),this.fire(`change:${e}`,e,r,n))}}),this[e]=t}bind(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!t.length||!Mr(t))throw new v("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new v("observable-bind-duplicate-properties",this);Tr(this);const n=this[kr];
1t.forEach(e=>{if(n.has(e))throw new v("observable-bind-rebind",this)});const r=new Map;return t.forEach(e=>{const t={property:e,to:[]};n.set(e,t),r.set(e,t)}),{to:Ar,toMany:Ir,_observable:this,_bindProperties:t,_to:[],_bindings:r}}unbind(){if(!this[wr])return;const e=this[kr],t=this[_r];for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];if(n.length){if(!Mr(n))throw new v("observable-unbind-wrong-properties",this);n.forEach(i=>{const n=e.get(i);n&&(n.to.forEach(e=>{let[i,r]=e;const o=t.get(i),s=o[r];s.delete(n),s.size||delete o[r],Object.keys(o).length||(t.delete(i),this.stopListening(i,"change"))}),e.delete(i))})}else t.forEach((e,t)=>{this.stopListening(t,"change")}),t.clear(),e.clear()}decorate(e){Tr(this);const t=this[e];if(!t)throw new v("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,(e,i)=>{e.return=t.apply(this,i)}),this[e]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return this.fire(e,i)},this[e][Cr]=t,this[xr]||(this[xr]=[]),this[xr].push(e)}stopListening(e,t,i){if(!e&&this[xr]){for(const e of this[xr])this[e]=this[e][Cr];delete this[xr]}super.stopListening(e,t,i)}[wr];[xr];[kr];[_r]}:Sr}function Tr(e){e[wr]||(Object.defineProperty(e,wr,{value:new Map}),Object.defineProperty(e,_r,{value:new Map}),Object.defineProperty(e,kr,{value:new Map}))}function Ar(){const e=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!t.length)throw new v("observable-bind-to-parse-error",null);const n={to:[]};let r;return"function"==typeof t[t.length-1]&&(n.callback=t.pop()),t.forEach(e=>{if("string"==typeof e)r.properties.push(e);else{if("object"!=typeof e)throw new v("observable-bind-to-parse-error",null);r={observable:e,properties:[]},n.to.push(r)}}),n}(...arguments),t=Array.from(this._bindings.keys()),i=t.length;if(!e.callback&&e.to.length>1)throw new v("observable-bind-to-no-callback",this);if(i>1&&e.callback)throw new v("observable-bind-to-extra-callback",this);var n;e.to.forEach(e=>{if(e.properties.length&&e.properties.length!==i)throw new v("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(t[0]).callback=e.callback),n=this._observable,this._to.forEach(e=>{const t=n[_r];let i;t.get(e.observable)||n.listenTo(e.observable,"change",(r,o)=>{i=t.get(e.observable)[o],i&&i.forEach(e=>{Pr(n,e.property)})})}),function(e){let t;
1e._bindings.forEach((i,n)=>{e._to.forEach(r=>{t=r.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([r.observable,t]),function(e,t,i,n){const r=e[_r],o=r.get(i),s=o||{};s[n]||(s[n]=new Set),s[n].add(t),o||r.set(i,s)}(e._observable,i,r.observable,t)})})}(this),this._bindProperties.forEach(e=>{Pr(this._observable,e)})}function Ir(e,t,i){if(this._bindings.size>1)throw new v("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const i=e.map(e=>[e,t]);return Array.prototype.concat.apply([],i)}(e,t),i)}function Mr(e){return e.every(e=>"string"==typeof e)}function Pr(e,t){const i=e[kr].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map(e=>e[0][e[1]])):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(e=>{Er[e]=Sr.prototype[e]});class Dr{_replacedElements;constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(e=>{let{element:t,newElement:i}=e;t.style.display="",i&&i.remove()}),this._replacedElements=[]}}function Or(e){let t=new AbortController;function i(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return t.abort(),t=new AbortController,e(t.signal,...n)}return i.abort=()=>t.abort(),i}function Lr(e){let t=0;for(const i of e)t++;return t}function Rr(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)if(e[n]!=t[n])return n;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function Br(e){return!(!e||!e[Symbol.iterator])}function Nr(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const r=i&&i.xmlns,o=r?e.createElementNS(r,t):e.createElement(t);for(const e in i)o.setAttribute(e,i[e]);!dr(n)&&Br(n)||(n=[n]);for(let t of n)dr(t)&&(t=e.createTextNode(t)),o.appendChild(t);return o}i.ElementReplacer=Dr;class jr{_config;constructor(e,t){this._config=Object.create(null),t&&this.define(Fr(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Vt(t))return void this._setObjectToTarget(e,t,n);const r=t.split(".");t=r.pop();for(const t of r)Vt(e[t])||(e[t]=Object.create(null)),e=e[t];if(Vt(i))return Vt(e[t])||(e[t]=Object.create(null)),e=e[t],void this._setObjectToTarget(e,i,n);n&&void 0!==e[t]||(e[t]=i)}_getFromSource(e,t){const i=t.split(".");t=i.pop();for(const t of i){if(!Vt(e[t])){e=null;break}e=e[t]}return e?Fr(e[t]):void 0}_setObjectToTarget(e,t,i){Object.keys(t).forEach(n=>{this._setToTarget(e,n,t[n],i)})}}function Fr(e){return Tn(e,zr)}function zr(e){return fr(e)||"function"==typeof e?e:void 0}function Vr(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Hr(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}i.Config=jr;const Ur=Wr(A());function Wr(e){return e?class extends e{listenTo(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Vr(e)||Hr(e)){const r={capture:!!n.useCapture,passive:!!n.usePassive},o=this._getProxyEmitter(e,r)||new $r(e,r);this.listenTo(o,t,i,n)}else super.listenTo(e,t,i,n)}stopListening(e,t,i){if(Vr(e)||Hr(e)){const n=this._getAllProxyEmitters(e);for(const e of n)this.stopListening(e,t,i)}else super.stopListening(e,t,i)}_getProxyEmitter(e,t){return function(e,t){const i=e[C];return i&&i[t]?i[t].emitter:null}(this,Gr(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(t=>this._getProxyEmitter(e,t)).filter(e=>!!e)}}:Ur}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(e
vendor: 12,027 bytes, line 1
1=>{Wr[e]=Ur.prototype[e]});class $r extends(A()){_domNode;_options;constructor(e,t){super(),I(this,Gr(e,t)),this._domNode=e,this._options=t}_domListeners;attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,i){this.attach(e),A().prototype._addEventListener.call(this,e,t,i)}_removeEventListener(e,t){A().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Gr(e,t){let i=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=p())}(e);for(const e of Object.keys(t).sort())t[e]&&(i+="-"+e);return i}function qr(e){let t=e.parentElement;if(!t)return null;for(;"BODY"!=t.tagName;){const e=t.style.overflowY||r.window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)break;if(t=t.parentElement,!t)return null}return t}function Yr(e){const t=[];let i=e;for(;i&&i.nodeType!=Node.DOCUMENT_NODE;)t.unshift(i),i=i.parentNode;return t}function Zr(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Xr(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Kr(e){if(!e.target)return null;const t=e.target.ownerDocument,i=e.clientX,n=e.clientY;let r=null;return t.caretRangeFromPoint&&t.caretRangeFromPoint(i,n)?r=t.caretRangeFromPoint(i,n):e.rangeParent&&(r=t.createRange(),r.setStart(e.rangeParent,e.rangeOffset),r.collapse(!0)),r}function Jr(e){return"[object Text]"==Object.prototype.toString.call(e)}function Qr(e){return"[object Range]"==Object.prototype.toString.apply(e)}function eo(e){return e&&e.parentNode?e.offsetParent===r.document.body?null:e.offsetParent:null}const to=["top","right","bottom","left","width","height"];class io{top;right;bottom;left;width;height;_source;constructor(e){const t=Qr(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),oo(e)||t)if(t){const t=io.getDomRangeRects(e);no(this,io.getBoundingRect(t))}else no(this,e.getBoundingClientRect());else if(Hr(e)){const{innerWidth:t,innerHeight:i}=e;no(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else no(this,e)}clone(){return new io(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new io(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(ro(e))return t;let i,n=e,r=e.parentNode||e.commonAncestorContainer;for(;r&&!ro(r);){const e="visible"===((o=r)instanceof HTMLElement?o.ownerDocument.defaultView.getComputedStyle(o).overflow:"visible");n instanceof HTMLElement&&"absolute"===so(n)&&(i=n);const s=so(r);if(e||i&&("relative"===s&&e||"relative"!==s)){n=r,r=r.parentNode;continue}const a=new io(r),l=t.getIntersection(a);if(!l)return null;l.getArea()<t.getArea()&&(t=l),n=r,r=r.parentNode}var o;return t}isEqual(e){for(const t of to)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:t}=r.window,i=this.clone().moveBy(e,t);if(oo(i._source)){const e=eo(i._source);e&&function(e,t){const i=new io(t),n=Xr(t);let r=0,o=0;r-=i.left,o-=i.top,r+=t.scrollLeft,o+=t.scrollTop,r-=n.left,o-=n.top,e.moveBy(r,o)}(i,e)}return i}excludeScrollbarsAndBorders(){const e=this._source;let t,i,n;if(Hr(e))t=e.innerWidth-e.document.documentElement.clientWidth,i=e.innerHeight-e.document.documentElement.clientHeight,n=e.getComputedStyle(e.document.documentElement).direction;else{const r=Xr(e);t=e.offsetWidth-e.clientWidth-r.left-r.right,i=e.offsetHeight-e.clientHeight-r.top-r.bottom,n=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=r.left,this.top+=r.top,this.right-=r.right,this.bottom-=r.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===n?this.right-=t:this.left+=t,this.height-=i,this.bottom-=i,this}static getDomRangeRects(e){const t=[],i=Array.from(e.getClientRects());if(i.length)for(const e of i)t.push(new io(e));else{let i=e.startContainer;Jr(i)&&(i=i.parentNode);const n=new io(i.getBoundingClientRect());n.right=n.left,n.width=0,t.push(n)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const n of e)i++,t.left=Math.min(t.left,n.left),t.top=Math.min(t.top,n.top),t.right=Math.max(t.right,n.right),t.bottom=Math.max(t.bottom,n.bottom);return 0==i?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new io(t))}}function no(e,t){for(const i of to)e[i]=t[i]}function ro(e){return!!oo(e)&&e===e.ownerDocument.body}function oo(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}function so(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}i.Rect=io;class ao{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(e,t){ao._observerInstance||ao._createObserver(),this._element=e,this._callback=t,ao._addElementCallback(e,t),ao._observerInstance.observe(e)}get element(){return this._element}destroy(){ao._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){ao._elementCallbacks||(ao._elementCallbacks=new Map);let i=ao._elementCallbacks.get(e);i||(i=new Set,ao._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=ao._getElementCallbacks(e);i&&(i.delete(t),i.size||(ao._elementCallbacks.delete(e),ao._observerInstance.unobserve(e))),ao._elementCallbacks&&!ao._elementCallbacks.size&&(ao._observerInstance=null,ao._elementCallbacks=null)}static _getElementCallbacks(e){return ao._elementCallbacks?ao._elementCallbacks.get(e):null}static _createObserver(){ao._observerInstance=new r.window.ResizeObserver(e=>{for(const t of e){const e=ao._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}})}}function lo(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function co(e){return t=>t+e}function uo(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function ho(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function fo(e){return e&&e.nodeType===Node.COMMENT_NODE}function po(e){try{r.document.createAttribute(e)}catch(e){return!1}return!0}function mo(e){return!!e&&(Jr(e)?mo(e.parentElement):!!e.getClientRects&&!!e.getClientRects().length)}function go(e){let{element:t,target:i,positions:n,limiter:o,fitInViewport:s,viewportOffsetConfig:a}=e;le(i)&&(i=i()),le(o)&&(o=o());const l=eo(t),c=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new io(r.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(a),u=new io(t),h=vo(i,c);let d;if(!h||!c.getIntersection(h))return null;const f={targetRect:h,elementRect:u,positionedElementAncestor:l,viewportRect:c};if(o||s){if(o){const e=vo(o,c);e&&(f.limiterRect=e)}d=function(e,t){const{elementRect:i}=t,n=i.getArea(),r=e.map(e=>new bo(e,t)).filter(e=>!!e.name);let o=0,s=null;for(const e of r){const{limiterIntersectionArea:t,viewportIntersectionArea:i}=e;if(t===n)return e;const r=i**2+t**2;r>o&&(o=r,s=e)}return s}(n,f)}else d=new bo(n[0],f);return d}function vo(e,t){const i=new io(e).getVisible();return i?i.getIntersection(t):null}i.ResizeObserver=ao;class bo{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){const i=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!i)return;const{left:n,top:r,name:o,config:s}=i;this.name=o,this.config=s,this._positioningFunctionCoordinates={left:n,top:r},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function yo(e){const t=e.parentNode;t&&t.removeChild(e)}function wo(e){let{target:t,viewportOffset:i=0,ancestorOffset:n=0,alignToTop:r,forceScroll:o}=e;const s=To(t);let a=s,l=null;for(i=function(e){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:e}(i);a;){let e;e=Ao(a==s?t:l),ko({parent:e,getRect:()=>Io(t,a),alignToTop:r,ancestorOffset:n,forceScroll:o});let c=Io(t,a);const u=Io(e,a);if(c.height>u.height){const e=c.getIntersection(u);e&&(c=e)}if(_o({window:a,rect:c,viewportOffset:i,alignToTop:r,forceScroll:o}),a.parent!=a){if(l=a.frameElement,a=a.parent,!l)return}else a=null}}function _o(e){let{window:t,rect:i,alignToTop:n,forceScroll:r,viewportOffset:o}=e;const s=i.clone().moveBy(0,o.bottom),a=i.clone().moveBy(0,-o.top),l=new io(t).excludeScrollbarsAndBorders(),c=n&&r,u=[a,s].every(e=>l.contains(e));let{scrollX:h,scrollY:d}=t;const f=h,p=d;c?d-=l.top-i.top+o.top:u||(Co(a,l)?d-=l.top-i.top+o.top:xo(s,l)&&(d+=n?i.top-l.top-o.top:i.bottom-l.bottom+o.bottom)),u||(So(i,l)?h-=l.left-i.left+o.left:Eo(i,l)&&(h+=i.right-l.right+o.right)),h==f&&d===p||t.scrollTo(h,d)}function ko(e){let{parent:t,getRect:i,alignToTop:n,forceScroll:r,ancestorOffset:o=0,limiterElement:s}=e;const a=To(t),l=n&&r;let c,u,h;const d=s||a.document.body;for(;t!=d;)u=i(),c=new io(t).excludeScrollbarsAndBorders(),h=c.contains(u),l?t.scrollTop-=c.top-u.top+o:h||(Co(u,c)?t.scrollTop-=c.top-u.top+o:xo(u,c)&&(t.scrollTop+=n?u.top-c.top-o:u.bottom-c.bottom+o)),h||(So(u,c)?t.scrollLeft-=c.left-u.left+o:Eo(u,c)&&(t.scrollLeft+=u.right-c.right+o)),t=t.parentNode}function xo(e,t){return e.bottom>t.bottom}function Co(e,t){return e.top<t.top}function So(e,t){return e.left<t.left}function Eo(e,t){return e.right>t.right}function To(e){return Qr(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Ao(e){if(Qr(e)){let t=e.commonAncestorContainer;return Jr(t)&&(t=t.parentNode),t}return e.parentNode}function Io(e,t){const i=To(e),n=new io(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new io(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}const Mo={ctrl:"â",cmd:"â",alt:"â¥",shift:"â§"},Po={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},Do={37:"â",38:"â",39:"â",40:"â",9:"â¥",33:"Page Up",34:"Page Down"},Oo=i.keyCodes=function(){const e={pageup:33,pagedown:34,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++)e[String.fromCharCode(t).toLowerCase()]=t;for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}(),Lo=Object.fromEntries(Object.entries(Oo).map(e=>{let t,[i,n]=e;
1return t=n in Do?Do[n]:i.charAt(0).toUpperCase()+i.slice(1),[n,t]}));function Ro(e){let t;if("string"==typeof e){if(t=Oo[e.toLowerCase()],!t)throw new v("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?Oo.alt:0)+(e.ctrlKey?Oo.ctrl:0)+(e.shiftKey?Oo.shift:0)+(e.metaKey?Oo.cmd:0);return t}function Bo(e){return"string"==typeof e&&(e=function(e){return e.split("+").map(e=>e.trim())}(e)),e.map(e=>"string"==typeof e?function(e){if(e.endsWith("!"))return Ro(e.slice(0,-1));const t=Ro(e);return(s.isMac||s.isiOS)&&t==Oo.ctrl?Oo.cmd:t}(e):e).reduce((e,t)=>t+e,0)}function No(e){let t=Bo(e);return Object.entries(s.isMac||s.isiOS?Mo:Po).reduce((e,i)=>{let[n,r]=i;return t&Oo[n]&&(t&=~Oo[n],e+=r),e},"")+(t?Lo[t]:"")}function jo(e){return e==Oo.arrowright||e==Oo.arrowleft||e==Oo.arrowup||e==Oo.arrowdown}function Fo(e,t){const i="ltr"===t;switch(e){case Oo.arrowleft:return i?"left":"right";case Oo.arrowright:return i?"right":"left";case Oo.arrowup:return"up";case Oo.arrowdown:return"down"}}function zo(e,t){const i=Fo(e,t);return"down"===i||"right"===i}const Vo=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function Ho(e){return Vo.includes(e)?"rtl":"ltr"}function Uo(e){return Array.isArray(e)?e:[e]}function Wo(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0;if("number"!=typeof i)throw new v("translation-service-quantity-not-a-number",null,{quantity:i});const o=n||r.window.CKEDITOR_TRANSLATIONS,s=function(e){return Object.keys(e).length}(o);1===s&&(e=Object.keys(o)[0]);const a=t.id||t.string;if(0===s||!function(e,t,i){return!!i[e]&&!!i[e].dictionary[t]}(e,a,o))return 1!==i?t.plural:t.string;const l=o[e].dictionary,c=o[e].getPluralForm||(e=>1===e?0:1),u=l[a];return"string"==typeof u?u:u[Number(c(i))]}r.window.CKEDITOR_TRANSLATIONS||(r.window.CKEDITOR_TRANSLATIONS={});class $o{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor(){let{uiLanguage:e="en",contentLanguage:t,translations:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=Ho(this.uiLanguage),this.contentLanguageDirection=Ho(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce((e,t)=>mr(e,t)):e}(i),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t=Uo(t),"string"==typeof e&&(e={string:e});const i=e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(e,i)=>i<t.length?t[i]:e)}(Wo(this.uiLanguage,e,i,this.translations),t)}}i.Locale=$o;class Go extends(A()){_items;_itemMap;_idProperty;_bindToCollection;_bindToExternalToInternalMap;_bindToInternalToExternalMap;_skippedIndexesFromExternal;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super();const i=Br(e);if(i||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new v("collection-add-item-invalid-index",this);let i=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),r=t+i;this._items.splice(r,0,n),this._itemMap.set(e,n),this.fire("add",n,r),i++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new v("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,i]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:i}),t}map(e,t){return this._items.map(e,t)}
1forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new v("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,i=(i,n,r)=>{const o=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(n);if(o&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const i=e(n);if(!i)return void this._skippedIndexesFromExternal.push(r);let o=r;for(const e of this._skippedIndexesFromExternal)r>e&&o--;for(const e of t._skippedIndexesFromExternal)o>=e&&o++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,o);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)o<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)i(0,e,t.getIndex(e));this.listenTo(t,"add",i),this.listenTo(t,"remove",(e,t,i)=>{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(i<t&&e.push(t-1),i>t&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let i;if(t in e){if(i=e[t],"string"!=typeof i)throw new v("collection-add-invalid-id",this);if(this.get(i))throw new v("collection-add-item-already-exists",this)}else e[t]=i=p();return i}_remove(e){let t,i,n,r=!1;const o=this._idProperty;if("string"==typeof e?(i=e,n=this._itemMap.get(i),r=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],r=!n,n&&(i=n[o])):(n=e,i=n[o],t=this._items.indexOf(n),r=-1==t||!this._itemMap.get(i)),r)throw new v("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(i);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function qo(e){const t=e.next();return t.done?null:t.value}i.Collection=Go;class Yo extends(Wr(Er())){_elements=new Set;_externalViews=new Set;_blurTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(e){if(Xo(e))this._addElement(e);else if(Zo(e))this._addView(e);else{if(!e.element)throw new v("focustracker-add-view-missing-element",{focusTracker:this,view:e});this._addElement(e.element)}}remove(e){Xo(e)?this._removeElement(e):Zo(e)?this._removeView(e):this._removeElement(e.element)}_addElement(e){if(this._elements.has(e))throw new v("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>{const t=this.externalViews.find(t=>function(e,t){return!!Ko(e,t)||!!t.focusTracker.externalViews.find(t=>Ko(e,t))}(e,t));t?this._focus(t.element):this._focus(e)},{useCapture:!0}),this.listenTo(e,"blur",()=>{this._blur()},{useCapture:!0}),this._elements.add(e)}_removeElement(e){this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e)),e===this.focusedElement&&this._blur()}_addView(e){e.element&&this._addElement(e.element),this.listenTo(e.focusTracker,"change:focusedElement",()=>{e.focusTracker.focusedElement?e.element&&this._focus(e.element):this._blur()}),this._externalViews.add(e)}_removeView(e){e.element&&this._removeElement(e.element),this.stopListening(e.focusTracker),this._externalViews.delete(e)}destroy(){this.stopListening(),this._elements.clear(),this._externalViews.clear(),this.isFocused=!1,this.focusedElement=null}_focus(e){this._clearBlurTimeout(),this.focusedElement=e,this.isFocused=!0}_blur(){this.elements.find(e=>e.contains(document.activeElement))||this.externalViews.find(e=>
1e.focusTracker.isFocused&&!e.focusTracker._blurTimeout)||(this._clearBlurTimeout(),this._blurTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0))}_clearBlurTimeout(){clearTimeout(this._blurTimeout),this._blurTimeout=null}}function Zo(e){return"focusTracker"in e&&e.focusTracker instanceof Yo}function Xo(e){return fr(e)}function Ko(e,t){return!!t.element&&t.element.contains(document.activeElement)&&e.contains(t.element)}i.FocusTracker=Yo;class Jo{_listener;constructor(){this._listener=new(Wr())}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+Ro(t),t)})}set(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Bo(e),r=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,(e,n)=>{i.filter&&!i.filter(n)||(t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0)},{priority:r})}press(e){return!!this._listener.fire("_keydown:"+Ro(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function Qo(e){return Br(e)?new Map(e):function(e){const t=new Map;for(const i in e)t.set(i,e[i]);return t}(e)}function es(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((i,n)=>{const r=t.signal||(new AbortController).signal;r.throwIfAborted();const o=setTimeout(function(){r.removeEventListener("abort",s),i()},e);function s(){clearTimeout(o),n(r.reason)}r.addEventListener("abort",s,{once:!0})})}async function ts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{maxAttempts:i=4,retryDelay:n=is(),signal:r=(new AbortController).signal}=t;r.throwIfAborted();for(let t=0;;t++){try{return await e()}catch(e){if(t+1>=i)throw e}await es(n(t),{signal:r})}}function is(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{delay:t=1e3,factor:i=2,maxDelay:n=1e4}=e;return e=>Math.min(i**e*t,n)}function ns(e,t,i){const n=e.length,r=t.length;for(let t=n-1;t>=i;t--)e[t+r]=e[t];for(let n=0;n<r;n++)e[i+n]=t[n]}function rs(e,t){let i;function n(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];n.cancel(),i=setTimeout(()=>e(...o),t)}return n.cancel=()=>{clearTimeout(i)},n}function os(e){try{if(!e.startsWith("ey"))return null;const t=atob(e.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(t)}catch(e){return null}}function ss(e){const t=Array.isArray(e)?e:[e],i=function(){const e=[];for(let t=0;t<256;t++){let i=t;for(let e=0;e<8;e++)1&i?i=3988292384^i>>>1:i>>>=1;e[t]=i}return e}();let n=-1;const r=t.map(e=>Array.isArray(e)?e.join(""):String(e)).join("");for(let e=0;e<r.length;e++)n=n>>>8^i[255&(n^r.charCodeAt(e))];return n=~n>>>0,n.toString(16).padStart(8,"0")}function as(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function ls(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function cs(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}function us(e,t){return ls(e.charAt(t-1))&&cs(e.charAt(t))}function hs(e,t){return as(e.charAt(t))}i.KeystrokeHandler=Jo;const ds=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map(e=>e.source).join("|")+")";return new RegExp(`${e}|${t}(?:â${t})*`,"ug")}();function fs(e,t){const i=String(e).matchAll(ds);return Array.from(i).some(e=>e.index<t&&t<e.index+e[0].length)}class ps extends(Er()){editor;_disableStack=new Set;constructor(e){super(),this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",ms,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",ms),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}function ms(e){e.return=!1,e.stop()}i.Plugin=ps;class gs extends(Er()){editor;_isEnabledBasedOnSelection;_affectsData;_disableStack;constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.listenTo(e,"change:isReadOnly",()=>{this.refresh()}),this.on("set:isEnabled",t=>{if(!this.affectsData)return;const i=e.model.document.selection,n=!("$graveyard"==i.getFirstPosition().root.rootName)&&e.model.canEditAt(i);(e.isReadOnly||this._isEnabledBasedOnSelection&&!n)&&(t.return=!1,t.stop())},{priority:"highest"}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",vs,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",vs),this.refresh())}execute(){}destroy(){this.stopListening()}}function vs(e){e.return=!1,e.stop()}i.Command=gs;class bs extends gs{_childCommandsDefinitions=[];refresh(){}execute(){const e=this._getFirstEnabledCommand();for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return!!e&&e.execute(i)}registerChildCommand(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find(e=>{let{command:t}=e;return t.isEnabled});return e&&e.command}}i.MultiCommand=bs;class ys extends(A()){_context;_plugins=new Map;_availablePlugins;_contextPlugins;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];super(),this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new v("plugincollection-
1plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=this,r=this._context;!function e(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;t.forEach(t=>{a(t)&&(i.has(t)||(i.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,i)))})}(e),h(e);const o=[...function e(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;return t.map(e=>a(e)?e:n._availablePlugins.get(e)).reduce((t,n)=>i.has(n)?t:(i.add(n),n.requires&&(h(n.requires,n),e(n.requires,i).forEach(e=>t.add(e))),t.add(n)),new Set)}(e.filter(e=>!c(e,t)))];!function(e,t){for(const i of t){if("function"!=typeof i)throw new v("plugincollection-replace-plugin-invalid-type",null,{pluginItem:i});const t=i.pluginName;if(!t)throw new v("plugincollection-replace-plugin-missing-name",null,{pluginItem:i});if(i.requires&&i.requires.length)throw new v("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const r=n._availablePlugins.get(t);if(!r)throw new v("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const o=e.indexOf(r);if(-1===o){if(n._contextPlugins.has(r))return;throw new v("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(r.requires&&r.requires.length)throw new v("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(o,1,i),n._availablePlugins.set(t,i)}}(o,i);const s=function(e){return e.map(e=>{let t=n._contextPlugins.get(e);return t=t||new e(r),n._add(e,t),t})}(o);return d(s,"init").then(()=>d(s,"afterInit")).then(()=>s);function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some(t=>t===e||u(e)===t||u(t)===e)}function u(e){return a(e)?e.pluginName||e.name:e}function h(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.map(e=>a(e)?e:n._availablePlugins.get(e)||e).forEach(e=>{!function(e,t){if(!a(e)){if(t)throw new v("plugincollection-soft-required",r,{missingPlugin:e,requiredBy:u(t)});throw new v("plugincollection-plugin-not-found",r,{plugin:e})}}(e,i),function(e,t){if(l(t)&&!l(e))throw new v("plugincollection-context-required",r,{plugin:u(e),requiredBy:u(t)})}(e,i),function(e,i){if(i&&c(e,t))throw new v("plugincollection-required",r,{plugin:u(e),requiredBy:u(i)})}(e,i)})}function d(e,t){return e.reduce((e,i)=>i[t]?n._contextPlugins.has(i)?e:e.then(i[t].bind(i)):e,Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new v("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}class ws{config;plugins;locale;t;editors;static defaultConfig;static builtinPlugins;_contextOwner=null;constructor(e){const{translations:t,...i}=e||{};this.config=new jr(i,this.constructor.defaultConfig);const n=this.constructor.builtinPlugins;this.config.define("plugins",n),this.plugins=new ys(this,n);const r=this.config.get("language")||{};this.locale=new $o({uiLanguage:"string"==typeof r?r:r.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new Go}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const i of e.concat(t)){if("function"!=typeof i)throw new v("context-initplugins-constructor-only",null,{Plugin:i});if(!0!==i.isContextPlugin)throw new v("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new v("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const i=new this(e);t(i.initPlugins().then(()=>i))})}}i.Context=ws;class _s extends(Er()){context;constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}
1i.ContextPlugin=_s;const ks=new WeakMap;let xs=!1;function Cs(e){let{view:t,element:i,text:n,isDirectHost:r=!0,keepOnFocus:o=!1}=e;const s=t.document;function a(e){ks.get(s).set(i,{text:e,isDirectHost:r,keepOnFocus:o,hostElement:r?i:null}),t.change(e=>As(s,e))}ks.has(s)||(ks.set(s,new Map),s.registerPostFixer(e=>As(s,e)),s.on("change:isComposing",()=>{t.change(e=>As(s,e))},{priority:"high"})),i.is("editableElement")&&i.on("change:placeholder",(e,t,i)=>{a(i)}),i.placeholder?a(i.placeholder):n&&a(n),n&&(xs||b("enableplaceholder-deprecated-text-option"),xs=!0)}function Ss(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function Es(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function Ts(e,t){if(!e.isAttached())return!1;const i=Array.from(e.getChildren()).some(e=>!e.is("uiElement"));if(i)return!1;const n=e.document,r=n.selection.anchor;return!(n.isComposing&&r&&r.parent===e||!t&&n.isFocused&&(!r||r.parent===e))}function As(e,t){const i=ks.get(e),n=[];let r=!1;for(const[e,o]of i)o.isDirectHost&&(n.push(e),Is(t,e,o)&&(r=!0));for(const[e,o]of i){if(o.isDirectHost)continue;const i=Ms(e);i&&(n.includes(i)||(o.hostElement=i,Is(t,e,o)&&(r=!0)))}return r}function Is(e,t,i){const{text:n,isDirectHost:r,hostElement:o}=i;let s=!1;return o.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,o),s=!0),(r||1==t.childCount)&&Ts(o,i.keepOnFocus)?Ss(e,o)&&(s=!0):Es(e,o)&&(s=!0),s}function Ms(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}let Ps=class{is(){throw new Error("is() method is abstract")}},Ds=class extends(A(Ps)){document;parent;constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new v("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getAncestors(t),n=e.getAncestors(t);let r=0;for(;i[r]==n[r]&&i[r];)r++;return 0===r?null:i[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=Rr(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]<i[n]}}isAfter(e){return this!=e&&this.root===e.root&&!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire(`change:${e}`,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=Sn(this);return delete e.parent,e}};Ds.prototype.is=function(e){return"node"===e||"view:node"===e};let Os=i.ViewText=class e extends Ds{_textData;constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(t){return t instanceof e&&(this===t||this.data===t.data)}_clone(){return new e(this.document,this.data)}};Os.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e};let Ls=class extends Ps{textNode;data;offsetInText;constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.data.length)throw new v("view-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.data.length)throw new v("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}};Ls.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class Rs{_patterns=[];constructor(){this.add(...arguments)}add(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),this._patterns.push(e)}match(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(const e of t)for(const t of this._patterns){const i=Bs(e,t);if(i)return{element:e,pattern:t,match:i}}return null}matchAll(){const e=[];for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];for(const t of i)for(const i of this._patterns){const n=Bs(t,i);n&&e.push({element:t,pattern:i,match:n}
1)}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function Bs(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){return e instanceof RegExp?!!t.match(e):e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=new Set(t.getAttributeKeys());return"object"!=typeof e||e instanceof RegExp||Array.isArray(e)?(i.delete("style"),i.delete("class")):(void 0!==e.style&&b("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&b("matcher-pattern-deprecated-attributes-class-key",e)),Ns(e,i,e=>t.getAttribute(e))}(t.attributes,e),!i.attributes)||t.classes&&(i.classes=function(e,t){return Ns(e,t.getClassNames(),()=>{})}(t.classes,e),!i.classes)||t.styles&&(i.styles=function(e,t){return Ns(e,t.getStyleNames(!0),e=>t.getStyle(e))}(t.styles,e),!i.styles)?null:i}function Ns(e,t,i){const n=function(e){if(Array.isArray(e))return e.map(e=>
1"object"!=typeof e||e instanceof RegExp?[e,!0]:(void 0!==e.key&&void 0!==e.value||b("matcher-pattern-missing-key-or-value",e),[e.key,e.value]));if("object"!=typeof e||e instanceof RegExp)return[[e,!0]];const t=[];for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push([i,e[i]]);return t}(e),r=Array.from(t),o=[];if(n.forEach(e=>{let[t,n]=e;r.forEach(e=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(t,e)&&function(e,t,i){if(!0===e)return!0;const n=i(t);return e===n||e instanceof RegExp&&!!String(n).match(e)}(n,e,i)&&o.push(e)})}),n.length&&!(o.length<n.length))return o}i.Matcher=Rs;class js{_styles;_cachedStyleNames=null;_cachedExpandedStyleNames=null;_styleProcessor;constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=function(e){let t=null,i=0,n=0,r=null;const o=new Map;if(""===e)return o;";"!=e.charAt(e.length-1)&&(e+=";");for(let s=0;s<e.length;s++){const a=e.charAt(s);if(null===t)switch(a){case":":r||(r=e.substr(i,s-i),n=s+1);break;case'"':case"'":t=a;break;case";":{const t=e.substr(n,s-n);r&&o.set(r.trim(),t.trim()),r=null,i=s+1;break}}else a===t&&(t=null)}return o}(e);for(const[e,i]of t)this._styleProcessor.toNormalizedForm(e,i,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find(t=>{let[i]=t;return i===e});return Array.isArray(t)}set(e,t){if(this._cachedStyleNames=null,this._cachedExpandedStyleNames=null,te(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){this._cachedStyleNames=null,this._cachedExpandedStyleNames=null;const t=zs(e);!function(e,t){null==e||function(e,t){return null==(e=function(e,t){return t.length<2?e:Dt(e,Ht(t,0,-1))}(e,t=Mt(t,e)))||delete e[Pt((i=t,n=null==i?0:i.length,n?i[n-1]:void 0))];var i,n}(e,t)}(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!te(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find(t=>{let[i]=t;return i===e});return Array.isArray(t)?t[1]:void 0}getStyleNames(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.isEmpty?[]:e?(this._cachedExpandedStyleNames=this._cachedExpandedStyleNames||this._styleProcessor.getStyleNames(this._styles),this._cachedExpandedStyleNames):(this._cachedStyleNames=this._cachedStyleNames||this.getStylesEntries().map(e=>{let[t]=e;return t}),this._cachedStyleNames)}clear(){this._styles={},this._cachedStyleNames=null,this._cachedExpandedStyleNames=null}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),n=Ot(this._styles,i);n&&!Object.keys(n).length&&this.remove(i)}}i.StylesMap=js;class Fs{_normalizers;_extractors;_reducers;_consumables;constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if(te(t))Vs(i,zs(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:r,value:o}=n(t);Vs(i,r,o)}else Vs(i,e,t)}getNormalized(e,t){if(!e)return mr({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return Ot(t,i);const n=i(e,t);if(n)return n}return Ot(t,zs(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);return void 0===i?[]:this._reducers.has(e)?this._reducers.get(e)(i):[[e,i]]}getStyleNames(e){const t=new Set;for(const i of this._consumables.keys()){const n=this.getNormalized(i,e);n&&("object"!=typeof n||Object.keys(n).length)&&t.add(i)}for(const i of Object.keys(e))t.add(i);return Array.from(t)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function zs(e){return e.replace("-",".")}function Vs(e,t,i){let n=i;te(i)&&(n=mr({},Ot(e,t),i)),gr(e,t,n)}i.StylesProcessor=Fs;let Hs=i.ViewElement=class e extends Ds{name;_unsafeAttributesToRender=[];_attrs;_children;_classes;_styles;_customProperties=new Map;constructor(e,t,i,n){if(super(e),this.name=t,this._attrs=function(e){const t=Qo(e);
vendor: 4,924 bytes, line 1
1for(const[e,i]of t)null===i?t.delete(e):"string"!=typeof i&&t.set(e,String(i));return t}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Us(this._classes,e),this._attrs.delete("class")}this._styles=new js(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(t){if(!(t instanceof e))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,i]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==i)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=new Rs(...t);let r=this.parent;for(;r&&!r.is("documentFragment");){if(n.match(r))return r;r=r.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Os(e,t)];Br(t)||(t=[t]);const i=[];for(const n of t)"string"==typeof n?i.push(new Os(e,n)):n instanceof Ls?i.push(new Os(e,n.data)):i.push(n);return i}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(let i=e;i<e+t;i++)this._children[i].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){const i=String(t);this._fireChange("attributes",this),"class"==e?Us(this._classes,i):"style"==e?this._styles.setTo(i):this._attrs.set(e,i)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of Uo(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of Uo(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of Uo(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}};function Us(e,t){const i=t.split(/\s+/);
vendor: 14,019 bytes, line 1
1e.clear(),i.forEach(t=>e.add(t))}Hs.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ws extends Hs{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=$s}}function $s(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}i.ViewContainerElement=Ws,Ws.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Gs extends(Er(Ws)){constructor(e,t,i,n){super(e,t,i,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",t=>t&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}destroy(){this.stopListening()}}i.ViewEditableElement=Gs,Gs.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const qs=Symbol("rootName");class Ys extends Gs{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(qs)}set rootName(e){this._setCustomProperty(qs,e)}set _name(e){this.name=e}}i.ViewRootEditableElement=Ys,Ys.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};let Zs=class{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.boundaries&&!e.startPosition)throw new v("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new v("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Xs._createAt(e.startPosition):this._position=Xs._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i;do{i=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(i&&i.is("view:$text")){if(e.isAtEnd)return this._position=Xs._createAfter(i),this._next();n=i.data[e.offset]}else n=i.getChild(e.offset);if("string"==typeof n){let n;n=this.singleCharacters?1:(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset;const r=new Ls(i,e.offset,n);return e.offset+=n,this._position=e,this._formatReturnValue("text",r,t,e,n)}if(n&&n.is("view:element")){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new Xs(n,0);return this._position=e,this._formatReturnValue("elementStart",n,t,e,1)}if(n&&n.is("view:$text")){if(this.singleCharacters)return e=new Xs(n,0),this._position=e,this._next();let i,r=n.data.length;return n==this._boundaryEndParent?(r=this.boundaries.end.offset,i=new Ls(n,0,r),e=Xs._createAfter(i)):(i=new Ls(n,0,n.data.length),e.offset++),this._position=e,this._formatReturnValue("text",i,t,e,r)}return e=Xs._createAfter(i),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(i.is("view:$text")){if(e.isAtStart)return this._position=Xs._createBefore(i),this._previous();n=i.data[e.offset-1]}else n=i.getChild(e.offset-1);if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const r=new Ls(i,e.offset,n);return this._position=e,this._formatReturnValue("text",r,t,e,n)}if(n&&n.is("view:element"))return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new Xs(n,n.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n&&n.is("view:$text")){if(this.singleCharacters)return e=new Xs(n,n.data.length),this._position=e,this._previous();let i,r=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new Ls(n,t,n.data.length-t),r=i.data.length,e=Xs._createBefore(i)}else i=new Ls(n,0,n.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",i,t,e,r)}return e=Xs._createBefore(i),this._position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,n,r){return t.is("view:$textProxy")&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=Xs._createAfter(t.textNode):(n=Xs._createAfter(t.textNode),this._position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=Xs._createBefore(t.textNode):(n=Xs._createBefore(t.textNode),this._position=n))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:r}}}},Xs=class e extends Ps{parent;offset;constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Gs);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(t){const i=e._createAt(this),n=i.offset+t;return i.offset=n<0?0:n,i}getLastMatchingPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;const i=new Zs(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const n=Rr(t,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]<i[n]?"before":"after"}}getWalker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.startPosition=this,new Zs(e)}clone(){return new e(this.parent,this.offset)}static _createAt(t,i){if(t instanceof e)return new this(t.parent,t.offset);{const n=t;if("end"==i)i=n.is("$text")?n.data.length:n.childCount;else{if("before"==i)return this._createBefore(n);if("after"==i)return this._createAfter(n);if(0!==i&&!i)throw new v("view-createpositionat-offset-required",n)}return new e(n,i)}}static _createAfter(t){if(t.is("$textProxy"))return new e(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new v("view-position-after-root",t,{root:t});return new e(t.parent,t.index+1)}static _createBefore(t){if(t.is("$textProxy"))return new e(t.textNode,t.offsetInText);if(!t.parent)throw new v("view-position-before-root",t,{root:t});return new e(t.parent,t.index)}};i.ViewTreeWalker=Zs,Xs.prototype.is=function(e){return"position"===e||"view:position"===e};let Ks=class e extends Ps{start;end;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new Zs({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let t=this.start.getLastMatchingPosition(Js,{direction:"backward"}),i=this.end.getLastMatchingPosition(Js);return t.parent.is("$text")&&t.isAtStart&&(t=Xs._createBefore(t.parent)),i.parent.is("$text")&&i.isAtEnd&&(i=Xs._createAfter(i.parent)),new e(t,i)}getTrimmed(){let t=this.start.getLastMatchingPosition(Js);if(t.isAfter(this.end)||t.isEqual(this.end))return new e(t,t);let i=this.end.getLastMatchingPosition(Js,{direction:"backward"});const n=t.nodeAfter,r=i.nodeBefore;return n&&n.is("$text")&&(t=new Xs(n,0)),r&&r.is("$text")&&(i=new Xs(r,r.data.length)),new e(t,i)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isCollapsed&&(t=!1);const i=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),n=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return i&&n}getDifference(t){const i=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&i.push(new e(this.start,t.start)),this.containsPosition(t.end)&&i.push(new e(t.end,this.end))):i.push(this.clone()),i}getIntersection(t){if(this.isIntersecting(t)){let i=this.start,n=this.end;return this.containsPosition(t.start)&&(i=t.start),this.containsPosition(t.end)&&(n=t.end),new e(i,n)}return null}getWalker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new Zs(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new e(this.start,this.end)}getItems(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){t.boundaries=e,t.ignoreElementEnd=!0;const i=new Zs(t);for(const e of i)yield e.item}()}getPositions(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){t.boundaries=e;const i=new Zs(t);yield i.position;for(const e of i)yield e.nextPosition}()}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,i,n){return new this(new Xs(e,t),new Xs(i,n))}static _createFromPositionAndShift(e,t){const i=e,n=e.getShiftedBy(t);return t>0?new this(i,n):new this(n,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Xs._createBefore(e),t)}};function Js(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}Ks.prototype.is=function(e){return"range"===e||"view:range"===e};let Qs=class e extends(A(Ps)){_ranges;_lastRangeBackward;_isFake;_fakeSelectionLabel;constructor(){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",arguments.length&&this.setTo(...arguments)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;
1if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=Lr(this.getRanges());if(t!=Lr(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let[r,o,s]=i;if("object"==typeof o&&(s=o,o=void 0),null===r)this._setRanges([]),this._setFakeOptions(s);else if(r instanceof e||r instanceof ea)this._setRanges(r.getRanges(),r.isBackward),this._setFakeOptions({fake:r.isFake,label:r.fakeSelectionLabel});else if(r instanceof Ks)this._setRanges([r],s&&s.backward),this._setFakeOptions(s);else if(r instanceof Xs)this._setRanges([new Ks(r)]),this._setFakeOptions(s);else if(r instanceof Ds){const e=!!s&&!!s.backward;let t;if(void 0===o)throw new v("view-selection-setto-required-second-parameter",this);t="in"==o?Ks._createIn(r):"on"==o?Ks._createOn(r):new Ks(Xs._createAt(r,o)),this._setRanges([t],e),this._setFakeOptions(s)}else{if(!Br(r))throw new v("view-selection-setto-not-selectable",this);this._setRanges(r,s&&s.backward),this._setFakeOptions(s)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new v("view-selection-setfocus-no-ranges",this);const i=Xs._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==i.compareWith(n)?this._addRange(new Ks(i,n),!0):this._addRange(new Ks(n,i)),this.fire("change")}_setRanges(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(e instanceof Ks))throw new v("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new v("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Ks(e.start,e.end))}};Qs.prototype.is=function(e){return"selection"===e||"view:selection"===e};let ea=class extends(A(Ps)){_selection;constructor(){super(),this._selection=new Qs,this._selection.delegate("change").to(this),arguments.length&&this._selection.setTo(...arguments)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(){this._selection.setTo(...arguments)}_setFocus(e,t){this._selection.setFocus(e,t)}};ea.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class ta extends d{startRange;_eventPhase;_currentTarget;constructor(e,t,i){super(e,t),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}i.BubblingEventInfo=ta;const ia=Symbol("bubbling contexts");function na(e){return class extends e{fire(e){try{const r=e instanceof d?e:ne
vendor: 1,532 bytes, line 1
1w d(this,e),o=aa(this);if(!o.size)return;for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(ra(r,"capturing",this),oa(o,"$capture",r,...i))return r.return;const s=r.startRange||this.selection.getFirstRange(),a=s?s.getContainedElement():null,l=!!a&&Boolean(sa(o,a));let c=a||function(e){if(!e)return null;const t=e.start.parent,i=e.end.parent,n=t.getPath(),r=i.getPath();return n.length>r.length?t:i}(s);if(ra(r,"atTarget",c),!l){if(oa(o,"$text",r,...i))return r.return;ra(r,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(oa(o,"$root",r,...i))return r.return}else if(c.is("element")&&oa(o,c.name,r,...i))return r.return;if(oa(o,c,r,...i))return r.return;c=c.parent,ra(r,"bubbling",c)}return ra(r,"bubbling",this),oa(o,"$document",r,...i),r.return}catch(e){v.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,i){const n=Uo(i.context||"$document"),r=aa(this);for(const o of n){let n=r.get(o);n||(n=new(A()),r.set(o,n)),this.listenTo(n,e,t,i)}}_removeEventListener(e,t){const i=aa(this);for(const n of i.values())this.stopListening(n,e,t)}}}{const e=na(Object);["fire","_addEventListener","_removeEventListener"].forEach(t=>{na[t]=e.prototype[t]})}function ra(e,t,i){e instanceof ta&&(e._eventPhase=t,e._currentTarget=i)}function oa(e,t,i){const n="string"==typeof t?e.get(t):sa(e,t);for(var r=arguments.length,o=new Array(r>3?r-3:0),s=3;s<r;s++)o[s-3]=arguments[s];return!!n&&(n.fire(i,...o),i.stop.called)}function sa(e,t){for(const[i,n]of e)if("function"==typeof i&&i(t))return n;return null}
vendor: 8,621 bytes, line 1
1function aa(e){return e[ia]||(e[ia]=new Map),e[ia]}let la=class extends(na(Er())){selection;roots;stylesProcessor;_postFixers=new Set;constructor(e){super(),this.selection=new ea,this.roots=new Go({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}};i.ViewDocument=la;class ca extends Hs{static DEFAULT_PRIORITY=10;_priority=10;_id=null;_clonesGroup=null;constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=ua}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new v("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function ua(){if(ha(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(ha(e)>1)return null;e=e.parent}return!e||ha(e)>1?null:this.childCount}function ha(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}i.ViewAttributeElement=i.AttributeElement=ca,ca.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class da extends Hs{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=fa}_insertChild(e,t){if(t&&(t instanceof Ds||Array.from(t).length>0))throw new v("view-emptyelement-cannot-add",[this,t]);return 0}}function fa(){return null}i.ViewEmptyElement=da,da.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class pa extends Hs{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=ma}_insertChild(e,t){if(t&&(t instanceof Ds||Array.from(t).length>0))throw new v("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function ma(){return null}i.ViewUIElement=pa,pa.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ga extends Hs{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=va}_insertChild(e,t){if(t&&(t instanceof Ds||Array.from(t).length>0))throw new v("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function va(){return null}i.ViewRawElement=ga,ga.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};let ba=class extends(A(Ps)){document;_children=[];_customProperties=new Map;constructor(e,t){super(),this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){return"string"==typeof t?[new Os(e,t)]:(Br(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new Os(e,t):t instanceof Ls?new Os(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(let i=e;i<e+t;i++)this._children[i].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}};i.ViewDocumentFragment=ba,ba.prototype.is=function(e){return"documentFragment"===e||"view:documentFragment"===e};class ya{document;_cloneGroups=new Map;_slotFactory=null;constructor(e){this.document=e}setSelection(){this.document.selection._setTo(...arguments)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new ba(this.document,e)}createText(e){return new Os(this.document,e)}createAttributeElement(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new ca(this.document,e,t);return"number"==typeof i.priority&&(n._priority=i.priority),i.id&&(n._id=i.id),i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createContainerElement(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=null;Vt(i)?n=i:r=i;const o=new Ws(this.document,e,t,r);return n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createEditableElement(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new Gs(this.document,e,t);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createEmptyElement(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new da(this.document,e,t);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createUIElement(e,t,i){const n=new pa(this.document,e,t);return i&&(n.render=i),n}createRawElement(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=new ga(this.document,e,t);return i&&(r.render=i),n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){Vt(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof Xs?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new v("view-writer-break-non-container-element",this.document);if(!t.parent)throw new v("view-writer-break-root",this.document);if(e.isAtStart)return Xs._createBefore(t);if(!e.isAtEnd){const i=t._clone(!1);this.insert(Xs._createAfter(t),i);const n=new Ks(e,Xs._createAt(t,"end")),r=new Xs(i,0);this.move(n,r)}return Xs._createAfter(t)}mergeAttributes(e){const t=e.offset,i=e.parent;if(i.is("$text"))return e;if(i.is("attributeElement")&&0===i.childCount){const e=i.parent,t=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Xs(e,t))}const n=i.getChild(t-1),r=i.getChild(t);if(!n||!r)return e;if(n.is("$text")&&r.is("$text"))return Ca(n,r);if(n.is("attributeElement")&&r.is("attributeElement")&&n.isSimilar(r)){const e=n.childCount;return n._appendChild(r.getChildren()),r._remove(),this._removeFromClonedElementsGroup(r),this.mergeAttributes(new Xs(n,e))}return e}mergeContainers(e){const t=e.nodeBefore,i=e.nodeAfter;if(!(t&&i&&t.is("containerElement")&&i.is("containerElement")))throw new v("view-writer-merge-containers-invalid-position",this.document);const n=t.getChild(t.childCount-1),r=n instanceof Os?Xs._createAt(n,"end"):Xs._createAt(t,"end");return this.move(Ks._createIn(i),Xs._createAt(t,"end")),this.remove(Ks._createOn(i)),r}insert(e,t){Ea(t=Br(t)?[...t]:[t],this.document);const i=t.reduce((e,t)=>
vendor: 10,864 bytes, line 1
1{const i=e[e.length-1],n=!t.is("uiElement");return i&&i.breakAttributes==n?i.nodes.push(t):e.push({breakAttributes:n,nodes:[t]}),e},[]);let n=null,r=e;for(const{nodes:e,breakAttributes:t}of i){const i=this._insertNodes(r,e,t);n||(n=i.start),r=i.end}return n?new Ks(n,r):new Ks(e)}remove(e){const t=e instanceof Ks?e:Ks._createOn(e);if(Aa(t,this.document),t.isCollapsed)return new ba(this.document);const{start:i,end:n}=this._breakAttributesRange(t,!0),r=i.parent,o=n.offset-i.offset,s=r._removeChildren(i.offset,o);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new ba(this.document,s)}clear(e,t){Aa(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of i){const i=n.item;let r;if(i.is("element")&&t.isSimilar(i))r=Ks._createOn(i);else if(!n.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(r=Ks._createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let i;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,r=n.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=n.childCount-r}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof ca))throw new v("view-writer-wrap-invalid-attribute",this.document);if(Aa(e,this.document),e.isCollapsed){let i=e.start;i.parent.is("element")&&!function(e){return Array.from(e.getChildren()).some(e=>!e.is("uiElement"))}(i.parent)&&(i=i.getLastMatchingPosition(e=>e.item.is("uiElement"))),i=this._wrapPosition(i,t);const n=this.document.selection;return n.isCollapsed&&n.getFirstPosition().isEqual(e.start)&&this.setSelection(i),new Ks(i)}return this._wrapRange(e,t)}unwrap(e,t){if(!(t instanceof ca))throw new v("view-writer-unwrap-invalid-attribute",this.document);if(Aa(e,this.document),e.isCollapsed)return e;const{start:i,end:n}=this._breakAttributesRange(e,!0),r=i.parent,o=this._unwrapChildren(r,i.offset,n.offset,t),s=this.mergeAttributes(o.start);s.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new Ks(s,a)}rename(e,t){const i=new Ws(this.document,e,t.getAttributes());return this.insert(Xs._createAfter(t),i),this.move(Ks._createIn(t),Xs._createAt(i,0)),this.remove(Ks._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Xs._createAt(e,t)}createPositionAfter(e){return Xs._createAfter(e)}createPositionBefore(e){return Xs._createBefore(e)}createRange(e,t){return new Ks(e,t)}createRangeOn(e){return Ks._createOn(e)}createRangeIn(e){return Ks._createIn(e)}createSelection(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return new Qs(...t)}createSlot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"children";if(!this._slotFactory)throw new v("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,i){let n,r;if(n=i?wa(e):e.parent.is("$text")?e.parent.parent:e.parent,!n)throw new v("view-writer-invalid-position-container",this.document);r=i?this._breakAttributes(e,!0):e.parent.is("$text")?xa(e):e;const o=n._insertChild(r.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=r.getShiftedBy(o),a=this.mergeAttributes(r);a.isEqual(r)||s.offset--;const l=this.mergeAttributes(s);return new Ks(a,l)}_wrapChildren(e,t,i,n){let r=t;const o=[];for(;r<i;){const t=e.getChild(r),i=t.is("$text"),s=t.is("attributeElement");if(s&&this._wrapAttributeElement(n,t))o.push(new Xs(e,r));else if(i||!s||_a(n,t)){const i=n._clone();t._remove(),i._appendChild(t),e._insertChild(r,i),this._addToClonedElementsGroup(i),o.push(new Xs(e,r))}else this._wrapChildren(t,0,t.childCount,n);r++}let s=0;for(const e of o)e.offset-=s,e.offset!=t&&(this.mergeAttributes(e).isEqual(e)||(s++,i--));return Ks._createFromParentsAndOffsets(e,t,e,i)}_unwrapChildren(e,t,i,n){let r=t;const o=[];for(;r<i;){const t=e.getChild(r);if(t.is("attributeElement"))if(t.isSimilar(n)){const n=t.getChildren(),s=t.childCount;t._remove(),e._insertChild(r,n),this._removeFromClonedElementsGroup(t),o.push(new Xs(e,r),new Xs(e,r+s)),r+=s,i+=s-1}else this._unwrapAttributeElement(n,t)?(o.push(new Xs(e,r),new Xs(e,r+1)),r++):(this._unwrapChildren(t,0,t.childCount,n),r++);else r++}let s=0;for(const e of o)e.offset-=s,e.offset!=t&&e.offset!=i&&(this.mergeAttributes(e).isEqual(e)||(s++,i--));return Ks._createFromParentsAndOffsets(e,t,e,i)}_wrapRange(e,t){const{start:i,end:n}=this._breakAttributesRange(e,!0),r=i.parent,o=this._wrapChildren(r,i.offset,n.offset,t),s=this.mergeAttributes(o.start);s.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new Ks(s,a)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return ka(e.clone());e.parent.is("$text")&&(e=xa(e));const i=this.createAttributeElement("_wrapPosition-fake-element");i._priority=Number.POSITIVE_INFINITY,i.isSimilar=()=>!1,e.parent._insertChild(e.offset,i);const n=new Ks(e,e.getShiftedBy(1));this.wrap(n,t);const r=new Xs(i.parent,i.index);i._remove();const o=r.nodeBefore,s=r.nodeAfter;return o&&o.is("view:$text")&&s&&s.is("view:$text")?Ca(o,s):ka(r)}_wrapAttributeElement(e,t){if(!Ia(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!Ia(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.start,n=e.end;if(Aa(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new Ks(i,i)}const r=this._breakAttributes(n,t),o=r.parent.childCount,s=this._breakAttributes(i,t);return r.offset+=r.parent.childCount-o,new Ks(s,r)}_breakAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new v("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new v("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new v("view-writer-cannot-break-raw-element",this.document);if(!t&&n.is("$text")&&Ta(n.parent))return e.clone();if(Ta(n))return e.clone();if(n.is("$text"))return this._breakAttributes(xa(e),t);if(i==n.childCount){const e=new Xs(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new Xs(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,r=n._clone();n.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const o=n.childCount-i,s=n._removeChildren(i,o);r._appendChild(s);const a=new Xs(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function wa(e){let t=e.parent;for(;!Ta(t);){if(!t)return;t=t.parent}return t}function _a(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function ka(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new Xs(t,t.data.length);const i=e.nodeAfter;return i&&i.is("$text")?new Xs(i,0):e}function xa(e){if(e.offset==e.parent.data.length)return new Xs(e.parent.parent,e.parent.index+1);if(0===e.offset)return new Xs(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new Os(e.root.document,t)),new Xs(e.parent.parent,e.parent.index+1)}function Ca(e,t){const i=e.data.length;return e._data+=t.data,t._remove(),new Xs(e,i)}i.DowncastWriter=ya;const Sa=[Os,ca,Ws,da,ga,pa];function Ea(e,t){for(const i of e){if(!Sa.some(e=>i instanceof e))throw new v("view-writer-insert-invalid-node-type",t);i.is("$text")||Ea(i.getChildren(),t)}}function Ta(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function Aa(e,t){const i=wa(e.start),n=wa(e.end);if(!i||!n||i!==n)throw new v("view-writer-invalid-range-container",t)}function Ia(e,t){return null===e.id&&null===t.id}const Ma=e=>e.createTextNode("Â "),Pa=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText="Â ",t},Da=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},Oa="â ".repeat(7);function La(e){return"string"==typeof e?e.substr(0,7)===Oa:Jr(e)&&e.data.substr(0,7)===Oa}function Ra(e){return 7==e.data.length&&La(e)}function Ba(e){const t="string"==typeof e?e:e.data;return La(e)?t.slice(7):t}function Na(e,t){if(t.keyCode==Oo.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;La(t)&&i<=7&&e.collapse(t,0)}}}let ja=class extends(Er()){domDocuments=new Set;domConverter;markedAttributes=new Set;markedChildren=new Set;markedTexts=new Set;selection;_inlineFiller=null;_fakeSelectionContainer=null;constructor(e,t){super(),this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),s.isBlink&&!s.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()})}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new v("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}
vendor: 4,562 bytes, line 1
1render(){if(this.isComposing&&!s.isAndroid)return;let e=null;const t=!(s.isBlink&&!s.isAndroid&&this.isSelecting);for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Xs._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;La(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Fa(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.childNodes),n=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),r=this._diffNodeLists(i,n),o=this._findUpdateActions(r,i,n,za);if(-1!==o.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const r of o)if("update"===r){const r=t.equal+t.insert,o=t.equal+t.delete,s=e.getChild(r);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,i[o]),yo(n[r]),t.equal++}else t[r]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Xs._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Jr(t.parent)&&La(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!La(e))throw new v("view-renderer-filler-was-lost",this);Ra(e)?e.remove():e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;const n=e.nodeBefore,r=e.nodeAfter;return!(n instanceof Os||r instanceof Os||!(i!==t.getFillerOffset()||n&&n.is("element","br"))||s.isAndroid&&(n||r))}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e);let n=this.domConverter.viewToDom(e).data;const r=t.inlineFillerPosition;r&&r.parent==e.parent&&r.offset==e.index&&(n=Oa+n),this._updateTextNode(i,n)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(t){for(const i of Array.from(t.attributes)){const n=i.name;e.hasAttribute(n)||this.domConverter.removeDomElementAttribute(t,n)}for(const i of e.getAttributeKeys())this.domConverter.setDomElementAttribute(t,i,e.getAttribute(i),e)}}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;if(s.isAndroid){let e=null;for(const t of Array.from(i.childNodes)){if(e&&Jr(e)&&Jr(t)){i.normalize();break}e=t}}const n=t.inlineFillerPosition,r=i.childNodes,o=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));n&&n.parent===e&&Fa(i.ownerDocument,o,n.offset);const a=this._diffNodeLists(r,o),l=this._findUpdateActions(a,r,o,Va);let c=0;const u=new Set;for(const e of l)"delete"===e?(u.add(r[c]),yo(r[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of l)"insert"===e?(ho(i,c,o[c]),c++):"update"===e?(this._updateTextNode(r[c],o[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(o[c])),c++);for(const e of u)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;return i[i.length-1]==t&&i.pop(),i}(e,this._fakeSelectionContainer),h(e,t,Ha.bind(null,this.domConverter))}
vendor: 10,306 bytes, line 1
1_findUpdateActions(e,t,i,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let r=[],o=[],s=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?s.push(i[a.equal+a.insert]):"delete"===l?o.push(t[a.equal+a.delete]):(r=r.concat(h(o,s,n).map(e=>"equal"===e?"update":e)),r.push("equal"),o=[],s=[]),a[l]++;return r.concat(h(o,s,n).map(e=>"equal"===e?"update":e))}_updateTextNode(e,t){const i=e.data;i!=t&&(s.isAndroid&&this.isComposing&&i.replace(/\u00A0/g," ")==t.replace(/\u00A0/g," ")||this._updateTextNodeInternal(e,t))}_updateTextNodeInternal(e,t){const i=l(e.data,t);for(const t of i)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(s.isBlink&&!s.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&s.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent="Â ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||"Â ";const n=t.getSelection(),r=t.createRange();n.removeAllRanges(),r.selectNodeContents(i),n.addRange(r)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(i.parent,i.offset,n.parent,n.offset),s.isGecko&&function(e,t){let i=e.parent,n=e.offset;if(Jr(i)&&Ra(i)&&(n=uo(i)+1,i=i.parentNode),i.nodeType!=Node.ELEMENT_NODE||n!=i.childNodes.length-1)return;const r=i.childNodes[n];r&&"BR"==r.tagName&&t.addRange(t.getRangeAt(0))}(n,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const i=e.activeElement,n=this.domConverter.mapDomToView(i);i&&n&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}};function Fa(e,t,i){const n=t instanceof Array?t:t.childNodes,r=n[i];if(Jr(r))return r.data=Oa+r.data,r;{const r=e.createTextNode(Oa);return Array.isArray(t)?n.splice(i,0,r):ho(t,i,r),r}}function za(e,t){return Vr(e)&&Vr(t)&&!Jr(e)&&!Jr(t)&&!fo(e)&&!fo(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Va(e,t){return Vr(e)&&Vr(t)&&Jr(e)&&Jr(t)}function Ha(e,t,i){return t===i||(Jr(t)&&Jr(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}i.Renderer=ja;const Ua=Da(r.document),Wa=Ma(r.document),$a=Pa(r.document),Ga="data-ck-unsafe-attribute-",qa="data-ck-unsafe-element";class Ya{document;renderingMode;blockFillerMode;preElements;blockElements;inlineObjectElements;unsafeElements;_domDocument;_domToViewMapping=new WeakMap;_viewToDomMapping=new WeakMap;_fakeSelectionMapping=new WeakMap;_rawContentElementMatcher=new Rs;_inlineObjectElementMatcher=new Rs;_elementsWithTemporaryCustomProperties=new Set;constructor(e){let{blockFillerMode:t,renderingMode:i="editing"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.document=e,this.renderingMode=i,this.blockFillerMode=t||("editing"===i?"br":"nbsp"),this.preElements=["pre","textarea"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?r.document:r.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Qs(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of e.children)this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,i){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===i&&("src"===e||"srcset"===e)||"source"===i&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const i=(new DOMParser).parseFromString(t,"text/html"),n=i.createDocumentFragment(),r=i.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);const o=i.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=o.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Ka(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(n)}viewToDom(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const i=e;if(this.mapViewToDom(i)){if(!i.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(i);this._elementsWithTemporaryCustomProperties.add(i)}let n;if(i.is("documentFragment"))n=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(n,i);else{if(i.is("uiElement"))return n="$comment"===i.name?this._domDocument.createComment(i.getCustomProperty("$rawContent")):i.render(this._domDocument,this),t.bind&&this.bindElements(n,i),n;this._shouldRenameElement(i.name)?(Ka(i.name),n=this._createReplacementDomElement(i.name)):n=i.hasAttribute("xmlns")?this._domDocument.createElementNS(i.getAttribute("xmlns"),i.name):this._domDocument.createElement(i.name),i.is("rawElement")&&i.render(n,this),t.bind&&this.bindElements(n,i);for(const e of i.getAttributeKeys())this.setDomElementAttribute(n,e,i.getAttribute(e),i)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(i,t))n instanceof HTMLTemplateElement?n.content.appendChild(e):n.appendChild(e);return n}}setDomElementAttribute(e,t,i,n){const r=this.shouldRenderAttribute(t,i,e.tagName.toLowerCase())||n&&n.shouldRenderUnsafeAttribute(t);r||b("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:i}),po(t)?(e.hasAttribute(t)&&!r?e.removeAttribute(t):e.hasAttribute(Ga+t)&&r&&e.removeAttribute(Ga+t),e.setAttribute(r?t:Ga+t,i)):b("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:i})}removeDomElementAttribute(e,t){t!=qa&&(e.removeAttribute(t),e.removeAttribute(Ga+t))}viewChildrenToDom(e){var t=this;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const n=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const o of e.getChildren()){n===r&&(yield t._getBlockFiller());const e=o.is("element")&&!!o.getCustomProperty("dataPipeline:transparentRendering")&&!qo(o.getAttributes());if(e&&"data"==t.renderingMode)if(o.is("rawElement")){const e=t._domDocument.createElement(o.name);o.render(e,t),yield*[...e.childNodes]}else yield*t.viewChildrenToDom(o,i);else e&&b("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:o}),yield t.viewToDom(o,i);r++}n===r&&(yield t._getBlockFiller())}()}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),n=this._domDocument.createRange();return n.setStart(t.parent,t.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let n=e.offset;return La(i)&&(n+=7),{parent:i,offset:n}}{let i,n,r;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;r=i.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!n)return null;i=n.parentNode,r=n.nextSibling}return Jr(r)&&La(r)?{parent:r,offset:7}:{parent:i,offset:n?uo(n)+1:0}}}domToView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[],n=this._domToView(e,t,i),r=n.next().value;return r?(n.next(),this._processDomInlineNodes(null,i,t),r.is("$text")&&0==r.data.length?null:r):null}domChildrenToView(e){var t=this;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function*(){let r=[];r=e instanceof HTMLTemplateElement?[...e.content.childNodes]:[...e.childNodes];for(let o=0;o<r.length;o++){const s=r[o],a=t._domToView(s,i,n),l=a.next().value;null!==l&&(t._isBlockViewElement(l)&&t._processDomInlineNodes(e,n,i),yield l,a.next())}t._processDomInlineNodes(e,n,i)}()}
vendor: 4,395 bytes, line 1
1domSelectionToView(e){if(function(e){if(!s.isGecko)return!1;if(!e.rangeCount)return!1;const t=e.getRangeAt(0).startContainer;try{Object.prototype.toString.call(t)}catch(e){return!0}return!1}(e))return new Qs([]);if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;Jr(t)&&(t=t.parentNode);const i=this.fakeSelectionToView(t);if(i)return i}const t=this.isDomSelectionBackward(e),i=[];for(let t=0;t<e.rangeCount;t++){const n=e.getRangeAt(t),r=this.domRangeToView(n);r&&i.push(r)}return new Qs(i,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),i=this.domPositionToView(e.endContainer,e.endOffset);return t&&i?new Ks(t,i):null}domPositionToView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,uo(e));const i=this.mapDomToView(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return Xs._createBefore(i);if(Jr(e)){if(Ra(e))return this.domPositionToView(e.parentNode,uo(e));const i=this.findCorrespondingViewText(e);let n=t;return i?(La(e)&&(n-=7,n=n<0?0:n),new Xs(i,n)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new Xs(t,0)}else{const i=e.childNodes[t-1];if(Jr(i)&&Ra(i)||i&&this.isBlockFiller(i))return this.domPositionToView(i.parentNode,uo(i));const n=Jr(i)?this.findCorrespondingViewText(i):this.mapDomToView(i);if(n&&n.parent)return new Xs(n.parent,n.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Ra(e))return null;const t=this.getHostViewElement(e);if(t)return t;const i=e.previousSibling;if(i){if(!this.isElement(i))return null;const e=this.mapDomToView(i);if(e){const t=e.nextSibling;return t instanceof Os?t:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof Os?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:i}=r.window,n=[];Za(t,e=>{const{scrollLeft:t,scrollTop:i}=e;n.push([t,i])}),t.focus(),Za(t,e=>{const[t,i]=n.shift();e.scrollLeft=t,e.scrollTop=i}),r.window.scrollTo(e,i)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),i=this.domSelectionToView(t);i&&i.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Ua):!("BR"!==e.tagName||!Xa(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode($a)||function(e,t){return e.isEqualNode(Wa)&&Xa(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=Yr(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Ma(this._domDocument);case"markedNbsp":return Pa(this._domDocument);case"br":return Da(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Jr(e)&&La(e)&&t<7)return!1;if(this.isElement(e)&&La(e.childNodes[t]))return!1;const i=this.mapDomToView(e);return!i||!i.is("uiElement")&&!i.is("rawElement")}*_domToView(e,t,i){if(this.isBlockFiller(e))return null;const n=this.getHostViewElement(e);
vendor: 4,669 bytes, line 1
1if(n)return n;if(fo(e)&&t.skipComments)return null;if(Jr(e)){if(Ra(e))return null;{const t=e.data;if(""===t)return null;const n=new Os(this.document,t);return i.push(n),n}}{let n=this.mapDomToView(e);if(n)return this._isInlineObjectElement(n)&&i.push(n),n;if(this.isDocumentFragment(e))n=new ba(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);const r=e.attributes;if(r)for(let e=r.length,t=0;t<e;t++)n._setAttribute(r[t].name,r[t].value);if(this._isViewElementWithRawContent(n,t))return n._setCustomProperty("$rawContent",e.innerHTML),this._isBlockViewElement(n)||i.push(n),n;if(fo(e))return n._setCustomProperty("$rawContent",e.data),n}yield n;const r=[];if(!1!==t.withChildren)for(const i of this.domChildrenToView(e,t,r))n._appendChild(i);if(this._isInlineObjectElement(n))i.push(n),this._processDomInlineNodes(null,r,t);else for(const e of r)i.push(e)}}_processDomInlineNodes(e,t,i){if(!t.length)return;if(e&&!this.isDocumentFragment(e)&&!this._isBlockDomElement(e))return;let n=!1;for(let e=0;e<t.length;e++){const r=t[e];if(!r.is("$text")){n=!1;continue}let o,s=!1;if(this._isPreFormatted(r))o=Ba(r.data);else{o=r.data.replace(/[ \n\t\r]{1,}/g," "),s=/[^\S\u00A0]/.test(o.charAt(o.length-1));const a=e>0?t[e-1]:null,l=e+1<t.length?t[e+1]:null,c=!a||a.is("element")&&"br"==a.name||n,u=!l&&!La(r.data);!1!==i.withChildren&&(c&&(o=o.replace(/^ /,"")),u&&(o=o.replace(/ $/,""))),o=Ba(o),o=o.replace(/ \u00A0/g," ");const h=l&&l.is("element")&&"br"!=l.name,d=l&&l.is("$text")&&" "==l.data.charAt(0);(/[ \u00A0]\u00A0$/.test(o)||!l||h||d)&&(o=o.replace(/\u00A0$/," ")),(c||a&&a.is("element")&&"br"!=a.name)&&(o=o.replace(/^\u00A0/," "))}0==o.length&&r.parent?(r._remove(),t.splice(e,1),e--):(r._data=o,n=s)}t.length=0}_processDataFromViewText(e){let t=e.data;if(this._isPreFormatted(e))return t;if(" "==t.charAt(0)){const i=this._getTouchingInlineViewNode(e,!1);!(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i))&&i||(t="Â "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingInlineViewNode(e,!0),n=i&&i.is("$textProxy")&&" "==i.data.charAt(0);" "!=t.charAt(t.length-2)&&i&&!n||(t=t.substr(0,t.length-1)+"Â ")}return t.replace(/ {2}/g," Â ")}_nodeEndsWithSpace(e){if(this._isPreFormatted(e))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_isPreFormatted(e){if(function(e,t){return e.getAncestors().some(e=>e.is("element")&&t.includes(e.name))}(e,this.preElements))return!0;for(const t of e.getAncestors({parentFirst:!0}))if(t.is("element")&&t.hasStyle("white-space")&&"inherit"!==t.getStyle("white-space"))return["pre","pre-wrap","break-spaces"].includes(t.getStyle("white-space"));return!1}_getTouchingInlineViewNode(e,t){const i=new Zs({startPosition:t?Xs._createAfter(e):Xs._createBefore(e),direction:t?"forward":"backward"});for(const{item:e}of i){if(e.is("$textProxy"))return e;if(!e.is("element")||!e.getCustomProperty("dataPipeline:transparentRendering")){if(e.is("element","br"))return null;if(this._isInlineObjectElement(e))return e;if(e.is("containerElement"))return null}}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if(fo(e))return new pa(this.document,"$comment");const i=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Hs(this.document,i)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const i=this._domDocument.createElement("span");if(i.setAttribute(qa,e),t){for(;t.firstChild;)i.appendChild(t.firstChild);for(const e of t.getAttributeNames())i.setAttribute(e,t.getAttribute(e))}return i}}function Za(e,t){let i=e;for(;i;)t(i),i=i.parentElement}function Xa(e,t){const i=e.parentNode;return!!i&&!!i.tagName&&t.includes(i.tagName.toLowerCase())}function Ka(e){"script"===e&&b("domconverter-unsafe-script-element-detected"),"style"===e&&b("domconverter-unsafe-style-element-detected")}i.DomConverter=Ya;class Ja extends(Wr()){view;document;_isEnabled=!1;constructor(e){super(),this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}
1checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}i.Observer=Ja;class Qa{view;document;domEvent;domTarget;constructor(e,t,i){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,ht(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}i.DomEventData=Qa;class el extends Ja{useCapture=!1;usePassive=!1;observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach(t=>{this.listenTo(e,t,(e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)},{useCapture:this.useCapture,usePassive:this.usePassive})})}stopObserving(e){this.stopListening(e)}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Qa(this.view,t,i))}}i.DomEventObserver=el;class tl extends el{domEventType=["keydown","keyup"];onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return Ro(this)}};this.fire(e.type,e,t)}}class il extends Ja{_fireSelectionChangeDoneDebounced;constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Qn(e=>{this.document.fire("selectionChangeDone",e)},200)}observe(){const e=this.document;e.on("arrowKey",(t,i)=>{e.selection.isFake&&this.isEnabled&&i.preventDefault()},{context:"$capture"}),e.on("arrowKey",(t,i)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)},{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new Qs(t.getRanges(),{backward:t.isBackward,fake:!1});e!=Oo.arrowleft&&e!=Oo.arrowup||i.setTo(i.getFirstPosition()),e!=Oo.arrowright&&e!=Oo.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}let nl=class extends Ja{domConverter;_config;_domElements;_mutationObserver;constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,i=new Set,n=new Set;for(const i of e){const e=t.mapDomToView(i.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==i.type||this._isBogusBrMutation(i)||n.add(e))}for(const r of e){const e=t.mapDomToView(r.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===r.type){const e=t.findCorrespondingViewText(r.target);e&&!n.has(e.parent)?i.add(e):!e&&La(r.target)&&n.add(t.mapDomToView(r.target.parentNode))}}const r=[];for(const e of i)r.push({type:"text",node:e});for(const e of n){const i=t.mapViewToDom(e);o=Array.from(e.getChildren()),s=Array.from(t.domChildrenToView(i,{withChildren:!1})),void 0,(void 0===(l=(a="function"==typeof(a=rl)?a:void 0)?a(o,s):void 0)?Vn(o,s,void 0,a):l)||r.push({type:"children",node:e})}var o,s,a,l;r.length&&this.document.fire("mutations",{mutations:r})}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}};function rl(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class ol extends el{_renderTimeoutId=null;_isFocusChanging=!1;
1domEventType=["focus","blur"];constructor(e){super(e),this.useCapture=!0;const t=this.document;t.on("focus",()=>this._handleFocus()),t.on("blur",(e,t)=>this._handleBlur(t)),t.on("beforeinput",()=>{t.isFocused||this._handleFocus()},{priority:"highest"})}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._clearTimeout(),super.destroy()}_handleFocus(){this._clearTimeout(),this._isFocusChanging=!0,this._renderTimeoutId=setTimeout(()=>{this._renderTimeoutId=null,this.flush(),this.view.change(()=>{})},50)}_handleBlur(e){const t=this.document.selection.editableElement;null!==t&&t!==e.target||(this.document.isFocused=!1,this._isFocusChanging=!1,this.view.change(()=>{}))}_clearTimeout(){this._renderTimeoutId&&(clearTimeout(this._renderTimeoutId),this._renderTimeoutId=null)}}i.FocusObserver=ol;class sl extends Ja{mutationObserver;focusObserver;selection;domConverter;_documents;_fireSelectionChangeDoneDebounced;_clearInfiniteLoopInterval;_documentIsSelectingInactivityTimeoutDebounced;_loopbackCounter;constructor(e){super(e),this.mutationObserver=e.getObserver(nl),this.focusObserver=e.getObserver(ol),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Qn(e=>{this.document.fire("selectionChangeDone",e)},200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=Qn(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,i=()=>{this.document.isSelecting&&(this._handleSelectionChange(t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(e,"keydown",i,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",i,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",i,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",()=>{this.document.isComposing&&!s.isAndroid||(this._handleSelectionChange(t),this._documentIsSelectingInactivityTimeoutDebounced())}),this.listenTo(this.view.document,"compositionstart",()=>{this._handleSelectionChange(t)},{priority:"lowest"}),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e){if(!this.isEnabled)return;const t=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(t.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(t);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(i)||!this.domConverter.isDomSelectionCorrect(t))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:t};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class al extends el{domEventType=["compositionstart","compositionupdate","compositionend"];constructor(e){super(e);const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0},{priority:"low"}),t.on("compositionend",()=>{t.isComposing=!1},{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class ll{_files;_native;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._files=t.cacheFiles?cl(e):null,this._native=e}get files(){return this._files||(this._files=cl(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,i){this._native.setDragImage(e,t,i)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function cl(e){const t=Array.from(e.files||[]),i=Array.from(e.items||[]);return t.length?t:i.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}i.DataTransfer=ll;class ul extends el{domEventType="beforeinput";onDomEvent(e){const t=e.getTargetRanges(),i=this.view,n=i.document;let r=null,o=null,a=[];if(e.dataTransfer&&(r=new ll(e.dataTransfer)),null!==e.data?o=e.data:r&&(o=r.getData("text/plain")),n.selection.isFake)a=Array.from(n.selection.getRanges());else if(t.length)a=t.map(e=>{const t=i.domConverter.domPositionToView(e.startContainer,e.startOffset),n=i.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?i.createRange(t,n):n?i.createRange(n):void 0}).filter(e=>!!e);else if(s.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();a=Array.from(i.domConverter.domSelectionToView(t).getRanges())}if(s.isAndroid&&"insertCompositionText"==e.inputType&&o&&o.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[i.createRange(a[0].end)]});else if("insertText"==e.inputType&&o&&o.includes("\n")){const t=o.split(/\n{1,2}/g);let i=a;for(let o=0;o<t.length;o++){const s=t[o];""!=s&&(this.fire(e.type,e,{data:s,dataTransfer:r,targetRanges:i,inputType:e.inputType,isComposing:e.isComposing}),i=[n.selection.getFirstRange()]),o+1<t.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:i}),i=[n.selection.getFirstRange()])}}else this.fire(e.type,e,{data:o,dataTransfer:r,targetRanges:a,inputType:e.inputType,isComposing:e.isComposing})}}class hl extends Ja{constructor(e){super(e),this.document.on("key
1down",(e,t)=>{if(this.isEnabled&&jo(t.keyCode)){const i=new ta(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(i,t),i.stop.called&&e.stop()}})}observe(){}stopObserving(){}}class dl extends Ja{constructor(e){super(e);const t=this.document;t.on("keydown",(e,i)=>{if(!this.isEnabled||i.keyCode!=Oo.tab||i.ctrlKey)return;const n=new ta(t,"tab",t.selection.getFirstRange());t.fire(n,i),n.stop.called&&e.stop()})}observe(){}stopObserving(){}}i.TabObserver=dl;let fl=class extends(Er()){document;domConverter;domRoots=new Map;_renderer;_initialDomRootAttributes=new WeakMap;_observers=new Map;_writer;_ongoingChange=!1;_postFixersInProgress=!1;_renderingDisabled=!1;_hasChangedSinceTheLastRendering=!1;constructor(e){super(),this.document=new la(e),this.domConverter=new Ya(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new ja(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new ya(this.document),this.addObserver(nl),this.addObserver(ol),this.addObserver(sl),this.addObserver(tl),this.addObserver(il),this.addObserver(al),this.addObserver(hl),this.addObserver(ul),this.addObserver(dl),this.document.on("arrowKey",Na,{priority:"low"}),function(e){e.document.on("arrowKey",(t,i)=>function(e,t,i){if(t.keyCode==Oo.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,r=e.focusOffset,o=i.domPositionToView(t,r);if(null===o)return;let s=!1;const a=o.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(s){const t=i.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,e.domConverter),{priority:"low"})}(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0}),s.isiOS&&this.listenTo(this.document,"blur",(e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}),this.listenTo(this.document,"mutations",(e,t)=>{let{mutations:i}=t;i.forEach(e=>this._renderer.markToSync(e.type,e.node))},{priority:"low"}),this.listenTo(this.document,"mutations",()=>{this.forceRender()},{priority:"lowest"})}attachDomRoot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main";const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:r}of Array.from(e.attributes))n[t]=r,"class"===t?this._writer.addClass(r.split(" "),i):i.hasAttribute(t)||this._writer.setAttribute(t,r,i);this._initialDomRootAttributes.set(e,n);const r=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};r(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),i.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),i.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),i.on("change:isReadOnly",()=>this.change(r)),i.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(e=>{let{name:i}=e;return t.removeAttribute(i)});const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}
vendor: 14,987 bytes, line 1
1scrollToTheSelection(){let{alignToTop:e,forceScroll:t,viewportOffset:i=20,ancestorOffset:n=20}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=this.document.selection.getFirstRange();if(!r)return;const o=En({alignToTop:e,forceScroll:t,viewportOffset:i,ancestorOffset:n});"number"==typeof i&&(i={top:i,bottom:i,left:i,right:i});const s={target:this.domConverter.viewRangeToDom(r),viewportOffset:i,ancestorOffset:n,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",s,o),wo(s)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new v("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){v.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(ol).flush(),this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Xs._createAt(e,t)}createPositionAfter(e){return Xs._createAfter(e)}createPositionBefore(e){return Xs._createBefore(e)}createRange(e,t){return new Ks(e,t)}createRangeOn(e){return Ks._createOn(e)}createRangeIn(e){return Ks._createIn(e)}createSelection(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return new Qs(...t)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}};i.EditingView=fl;class pl{is(){throw new Error("is() method is abstract")}}class ml extends pl{textNode;data;offsetInText;constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new v("model-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.offsetSize)throw new v("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}i.TextProxy=ml,ml.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class gl{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;_visitedParent;constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new v("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new v("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=bl._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i,n,r;do{n=this.position,r=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this._position=n,this._visitedParent=r)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=yl(t,i),r=n||wl(t,i,n);if(r&&r.is("model:element")){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=r;return this._position=t,vl("elementStart",r,e,t,1)}if(r&&r.is("model:$text")){let n;if(this.singleCharacters)n=1;else{let e=r.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),n=e-t.offset}const o=t.offset-r.startOffset,s=new ml(r,o,n);return t.offset+=n,this._position=t,vl("text",s,e,t,n)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=i.parent,this.ignoreElementEnd?this._next():vl("elementEnd",i,e,t)}_previous(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&0===t.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const n=t.parent,r=yl(t,n),o=r||_l(t,n,r);if(o&&o.is("model:element"))return t.offset--,this.shallow?(this._position=t,vl("elementStart",o,e,t,1)):(t.path.push(o.maxOffset),this._position=t,this._visitedParent=o,this.ignoreElementEnd?this._previous():vl("elementEnd",o,e,t));if(o&&o.is("model:$text")){let n;if(this.singleCharacters)n=1;else{let e=o.startOffset;this._boundaryStartParent==i&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),n=t.offset-e}const r=t.offset-o.startOffset,s=new ml(o,r-n,n);return t.offset-=n,this._position=t,vl("text",s,e,t,n)}return t.path.pop(),this._position=t,this._visitedParent=i.parent,vl("elementStart",i,e,t,1)}}function vl(e,t,i,n,r){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:r}}}i.TreeWalker=gl;class bl extends pl{root;path;stickiness;constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toNone";if(super(),!e.is("element")&&!e.is("documentFragment"))throw new v("model-position-root-invalid",e);if(!Array.isArray(t)||0===t.length)throw new v("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChildAtOffset(this.path[t]),!e)throw new v("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new v("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return yl(this,this.parent)}get nodeAfter(){const e=this.parent;return wl(this,e,yl(this,e))}get nodeBefore(){const e=this.parent;return _l(this,e,yl(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}isValid(){if(this.offset<0)return!1;let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChildAtOffset(this.path[t]),!e)return!1;return this.offset<=e.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=Rr(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;const i=new gl(t);return i.skip(e),i.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=Rr(this.path,e.path),i="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,i)}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}getShiftedBy(e){const t=this.clone(),i=t.offset+e;return t.offset=i<0?0:i,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let i=0;i<t;i++){const t=this.path[i]-e.path[i];if(t<-1||t>1)return!1;if(1===t)return kl(e,this,i);if(-1===t)return kl(this,e,i)}return this.path.length===e.path.length||(this.path.length>e.path.length?xl(this.path,t):xl(e.path,t))}hasSameParentAs(e){return this.root===e.root&&"same"==Rr(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=bl._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?bl._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=bl._createAt(this);if(this.root!=e.root)return i;if("same"==Rr(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;i.offset-=t}}else if("prefix"==Rr(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;i.path[n]-=t}}return i}_getTransformedByInsertion(e,t){const i=bl._createAt(this);if(this.root!=e.root)return i;if("same"==Rr(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(i.offset+=t);else if("prefix"==Rr(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;e.offset<=this.path[n]&&(i.path[n]+=t)}return i}_getTransformedByMove(e,t,i){if(t=t._getTransformedByDeletion(e,i),e.isEqual(t))return bl._createAt(this);const n=this._getTransformedByDeletion(e,i);return null===n||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(i).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):n._getTransformedByInsertion(t,i)}_getCombined(e,t){const i=e.path.length-1,n=bl._createAt(t);return n.stickiness=this.stickiness,n.offset=n.offset+this.path[i]-e.offset,n.path=[...n.path,...this.path.slice(i+1)],n}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toNone";if(e.is("model:position"))return new bl(e.root,e.path,e.stickiness);{const n=e;if("end"==t)t=n.maxOffset;else{if("before"==t)return this._createBefore(n,i);if("after"==t)return this._createAfter(n,i);if(0!==t&&!t)throw new v("model-createpositionat-offset-required",[this,e])}if(!n.is("element")&&!n.is("documentFragment"))throw new v("model-position-parent-incorrect",[this,e]);const r=n.getPath();return r.push(t),new this(n.root,r,i)}}static _createAfter(e,t){if(!e.parent)throw new v("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new v("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const i=new bl(t.graveyard,e.path);return i.stickiness=e.stickiness,i}if(!t.getRoot(e.root))throw new v("model-position-fromjson-no-root",t,{rootName:e.root});return new bl(t.getRoot(e.root),e.path,e.stickiness)}}function yl(e,t){const i=t.getChildAtOffset(e.offset);return i&&i.is("$text")&&i.startOffset<e.offset?i:null}function wl(e,t,i){return null!==i?null:t.getChildAtOffset(e.offset)}function _l(e,t,i){return null!==i?null:t.getChild(t.offsetToIndex(e.offset)-1)}function kl(e,t,i){return i+1!==e.path.length&&!!xl(t.path,i+1)&&!!function(e,t){let i=e.parent,n=e.path.length-1,r=0;for(;n>=t;){if(e.path[n]+r!==i.maxOffset)return!1;r=1,n--,i=i.parent}return!0}(e,i+1)}function xl(e,t){for(;t<e.length;){if(0!==e[t])return!1;t++}return!0}i.Position=bl,bl.prototype.is=function(e){return"position"===e||"model:position"===e};class Cl extends pl{start;end;constructor(e,t){super(),this.start=bl._createAt(e),this.end=t?bl._createAt(t):bl._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new gl({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==Rr(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isCollapsed&&(t=!1);const i=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),n=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return i&&n}containsItem(e){const t=bl._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Cl(this.start,e.start)),this.containsPosition(e.end)&&t.pu
vendor: 5,613 bytes, line 1
1sh(new Cl(e.end,this.end))):t.push(new Cl(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,i=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(i=e.end),new Cl(t,i)}return null}getJoined(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.isIntersecting(e);if(i||(i=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!i)return null;let n=this.start,r=this.end;return e.start.isBefore(n)&&(n=e.start),e.end.isAfter(r)&&(r=e.end),new Cl(n,r)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,i=bl._createAt(this.start);let n=i.parent;for(;i.path.length>t+1;){const t=n.maxOffset-i.offset;0!==t&&e.push(new Cl(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],n=t-i.offset;0!==n&&e.push(new Cl(i,i.getShiftedBy(n))),i.offset=t,i.path.push(0)}return e}getWalker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new gl(e)}getItems(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){t.boundaries=e,t.ignoreElementEnd=!0;const i=new gl(t);for(const e of i)yield e.item}()}getPositions(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){t.boundaries=e;const i=new gl(t);yield i.position;for(const e of i)yield e.nextPosition}()}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Cl(this.start,this.end)]}getTransformedByOperations(e){const t=[new Cl(this.start,this.end)];for(const i of e)for(let e=0;e<t.length;e++){const n=t[e].getTransformedByOperation(i);t.splice(e,1,...n),e+=n.length-1}for(let e=0;e<t.length;e++){const i=t[e];for(let n=e+1;n<t.length;n++){const e=t[n];(i.containsRange(e)||e.containsRange(i)||i.isEqual(e))&&t.splice(n,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.sourcePosition,n=e.howMany,r=e.targetPosition;return this._getTransformedByMove(i,r,n,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let i=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(i=this.end.getShiftedBy(1)),t.root!=i.root&&(i=this.end.getShiftedBy(-1)),new Cl(t,i)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new Cl(this.start);let t=this.start._getTransformedByMergeOperation(e),i=this.end._getTransformedByMergeOperation(e);return t.root!=i.root&&(i=this.end.getShiftedBy(-1)),t.isAfter(i)?(e.sourcePosition.isBefore(e.targetPosition)?(t=bl._createAt(i),t.offset=0):(e.deletionPosition.isEqual(t)||(i=e.deletionPosition),t=e.targetPosition),new Cl(t,i)):new Cl(t,i)}_getTransformedByInsertion(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&this.containsPosition(e))return[new Cl(this.start,e),new Cl(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const i=new Cl(this.start,this.end);return i.start=i.start._getTransformedByInsertion(e,t),i.end=i.end._getTransformedByInsertion(e,t),[i]}}_getTransformedByMove(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.isCollapsed){const n=this.start._getTransformedByMove(e,t,i);return[new Cl(n)]}const r=Cl._createFromPositionAndShift(e,i),o=t._getTransformedByDeletion(e,i);if(this.containsPosition(t)&&!n&&(r.containsPosition(this.start)||r.containsPosition(this.end))){const n=this.start._getTransformedByMove(e,t,i),r=this.end._getTransformedByMove(e,t,i);return[new Cl(n,r)]}let s;const a=this.getDifference(r);let l=null;const c=this.getIntersection(r);if(1==a.length?l=new Cl(a[0].start._getTransformedByDeletion(e,i),a[0].end._getTransformedByDeletion(e,i)):2==a.length&&(l=new Cl(this.start,this.end._getTransformedByDeletion(e,i))),s=l?l._getTransformedByInsertion(o,i,null!==c||n):[],c){const e=new Cl(c.start._getCombined(r.start,o),c.end._getCombined(r.start,o));2==s.length?s.splice(1,0,e):s.push(e)}return s}_getTransformedByDeletion(e,t){let i=this.start._getTransformedByDeletion(e,t),n=this.end._getTransformedByDeletion(e,t);return null==i&&null==n?null:(null==i&&(i=e),null==n&&(n=e),new Cl(i,n))}static _createFromPositionAndShift(e,t){const i=e,n=e.getShiftedBy(t);return t>0?new this(i,n):new this(n,i)}static _createIn(e){return new this(bl._createAt(e,0),bl._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(bl._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new v("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort((e,t)=>
1e.start.isAfter(t.start)?1:-1);const i=e.indexOf(t),n=new this(t.start,t.end);for(let t=i-1;t>=0&&e[t].end.isEqual(n.start);t--)n.start=bl._createAt(e[t].start);for(let t=i+1;t<e.length&&e[t].start.isEqual(n.end);t++)n.end=bl._createAt(e[t].end);return n}static fromJSON(e,t){return new this(bl.fromJSON(e.start,t),bl.fromJSON(e.end,t))}}i.Range=Cl,Cl.prototype.is=function(e){return"range"===e||"model:range"===e};class Sl extends(A()){_modelToViewMapping=new WeakMap;_viewToModelMapping=new WeakMap;_viewToModelLengthCallbacks=new Map;_markerNameToElements=new Map;_elementToMarkerNames=new Map;_deferredBindingRemovals=new Map;_unboundMarkerNames=new Set;constructor(){super(),this.on("modelToViewPosition",(e,t)=>{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);if(!i)throw new v("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(i),r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=bl._createAt(n,r)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(i)==e&&this._modelToViewMapping.delete(i))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Cl(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Ks(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e){const t={modelPosition:e,mapper:this,isPhantom:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isPhantom};return this.fire("modelToViewPosition",t),t.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e)return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let n=0;for(let i=0;i<t;i++)n+=this.getModelLength(e.getChild(i));return n}getModelLength(e){const t=[e];let i=0;for(;t.length>0;){const e=t.pop(),n=e.name&&this._viewToModelLengthCallbacks.size>0&&this._viewToModelLengthCallbacks.get(e.name);if(n)i+=n(e);else if(this._viewToModelMapping.has(e))i+=1;else if(e.is("$text"))i+=e.data.length;else{if(e.is("uiElement"))continue;for(const i of e.getChildren())t.push(i)}}return i}findPositionIn(e,t){let i,n=0,r=0,o=0;if(e.is("$text"))return new Xs(e,t);for(;r<t;)i=e.getChild(o),n=this.getModelLength(i),r+=n,o++;return r==t?this._moveViewPositionToTextNode(new Xs(e,o)):this.findPositionIn(i,t-(r-n))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,i=e.nodeAfter;return t&&t.is("view:$text")?new Xs(t,t.data.length):i&&i.is("view:$text")?new Xs(i,0):e}}class El{_consumable=new Map;_textProxyRegistry=new Map;
vendor: 5,561 bytes, line 1
1add(e,t){t=Tl(t),e instanceof ml&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Tl(t),e instanceof ml&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Tl(t),e instanceof ml&&(e=this._getSymbolForTextProxy(e));const i=this._consumable.get(e);if(void 0===i)return null;const n=i.get(t);return void 0===n?null:n}revert(e,t){t=Tl(t),e instanceof ml&&(e=this._getSymbolForTextProxy(e));const i=this.test(e,t);return!1===i?(this._consumable.get(e).set(t,!0),!0):!0!==i&&null}verifyAllConsumed(e){const t=[];for(const[i,n]of this._consumable)for(const[r,o]of n){const n=r.split(":")[0];o&&e==n&&t.push({event:r,item:i.name||i.description})}if(t.length)throw new v("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const i=this._textProxyRegistry.get(e.startOffset);if(i){const n=i.get(e.endOffset);n&&(t=n.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,i=e.endOffset,n=e.parent,r=Symbol("$textProxy:"+e.data);let o,s;return o=this._textProxyRegistry.get(t),o||(o=new Map,this._textProxyRegistry.set(t,o)),s=o.get(i),s||(s=new Map,o.set(i,s)),s.set(n,r),r}}function Tl(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}class Al extends(A()){_conversionApi;_firedEventsMap;constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,i){const n=this._createConversionApi(i,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,n);const r=this._reduceChanges(e.getChanges());for(const e of r)"insert"===e.type?this._convertInsert(Cl._createFromPositionAndShift(e.position,e.length),n):"reinsert"===e.type?this._convertReinsert(Cl._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,n):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);n.mapper.flushDeferredBindings();for(const e of n.mapper.flushUnboundMarkerNames()){const i=t.get(e).getRange();this._convertMarkerRemove(e,i,n),this._convertMarkerAdd(e,i,n)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,n);n.consumable.verifyAllConsumed("insert")}convert(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=this._createConversionApi(i,void 0,n);this._convertInsert(e,r);for(const[e,i]of t)this._convertMarkerAdd(e,i,r);r.consumable.verifyAllConsumed("insert")}convertSelection(e,t,i){const n=this._createConversionApi(i);this.fire("cleanSelection",{selection:e},n);const r=e.getFirstPosition().root;if(!n.mapper.toViewElement(r))return;const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(n.consumable,e,o),this.fire("selection",{selection:e},n),e.isCollapsed){for(const t of o)if(n.consumable.test(e,"addMarker:"+t.name)){const i=t.getRange();if(!Il(e.getFirstPosition(),t,n.mapper))continue;const r={item:e,markerName:t.name,markerRange:i};this.fire(`addMarker:${t.name}`,r,n)}for(const t of e.getAttributeKeys())if(n.consumable.test(e,"attribute:"+t)){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,i,n)}}}_convertInsert(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const i of e.getWalker({shallow:!0}))this._testAndFire("insert",Ml(i),t)}_convertRemove(e,t,i,n){this.fire(`remove:${i}`,{position:e,length:t},n)}_convertAttribute(e,t,i,n,r){this._addConsumablesForRange(r.consumable,e,`attribute:${t}`);for(const o of e){const e={item:o.item,range:Cl._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${t}`,e,r)}}_convertReinsert(e,t){const i=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,i);for(const e of i.map(Ml))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,i){if("$graveyard"==t.root.rootName)return;const n=`addMarker:${e}`;if(i.consumable.add(t,n),this.fire(n,{markerName:e,markerRange:t},i),i.consumable.consume(t,n)){this._addConsumablesForRange(i.consumable,t,n);for(const r of t.getItems()){if(!i.consumable.test(r,n))continue;const o={item:r,range:Cl._createOn(r),markerName:e,markerRange:t};this.fire(n,o,i)}}}_convertMarkerRemove(e,t,i){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},i)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const i of t){const t=i.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i)}}return e}_addConsumablesForRange(e,t,i){for(const n of t.getItems())e.add(n,i);return e}_addConsumablesForSelection(e,t,i){e.add(t,"selection");for(const n of i)e.add(t,"addMarker:"+n.name);for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i);return e}_testAndFire(e,t,i){const n=function(e,t){return`${e}:${t.item.is("element")?t.item.name:"$text"}`}(e,t),r=t.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(t.item):t.item,o=this._firedEventsMap.get(i),s=o.get(r);if(s){if(s.has(n))return;s.add(n)}
vendor: 12,883 bytes, line 1
1else o.set(r,new Set([n]));this.fire(n,t,i)}_testAndFireAddAttributes(e,t){const i={item:e,range:Cl._createOn(e)};for(const e of i.item.getAttributeKeys())i.attributeKey=e,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(e),this._testAndFire(`attribute:${e}`,i,t)}_createConversionApi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={...this._conversionApi,consumable:new El,writer:e,options:i,convertItem:e=>this._convertInsert(Cl._createOn(e),n),convertChildren:e=>this._convertInsert(Cl._createIn(e),n,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,n),canReuseView:e=>!t.has(n.mapper.toModelElement(e))};return this._firedEventsMap.set(n,new Map),n}}function Il(e,t,i){const n=t.getRange(),r=Array.from(e.getAncestors());return r.shift(),r.reverse(),!r.some(e=>{if(n.containsItem(e))return!!i.toViewElement(e).getCustomProperty("addHighlight")})}function Ml(e){return{item:e.item,range:Cl._createFromPositionAndShift(e.previousPosition,e.length)}}let Pl=class extends pl{parent=null;_attrs;_index=null;_startOffset=null;constructor(e){super(),this._attrs=Qo(e)}get document(){return null}get index(){return this._index}get startOffset(){return this._startOffset}get offsetSize(){return 1}get endOffset(){return null===this.startOffset?null:this.startOffset+this.offsetSize}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getAncestors(t),n=e.getAncestors(t);let r=0;for(;i[r]==n[r]&&i[r];)r++;return 0===r?null:i[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=Rr(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]<i[n]}}isAfter(e){return this!=e&&this.root===e.root&&!this.isBefore(e)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce((e,t)=>(e[t[0]]=t[1],e),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=Qo(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}};Pl.prototype.is=function(e){return"node"===e||"model:node"===e};class Dl extends(A(pl)){_lastRangeBackward=!1;_attrs=new Map;_ranges=[];constructor(){super(),arguments.length&&this.setTo(...arguments)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Cl(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new Cl(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new Cl(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];let[n,r,o]=t;if("object"==typeof r&&(o=r,r=void 0),null===n)this._setRanges([]);else if(n instanceof Dl)this._setRanges(n.getRanges(),n.isBackward);else if(n&&"function"==typeof n.getRanges)this._setRanges(n.getRanges(),n.isBackward);else if(n instanceof Cl)this._setRanges([n],!!o&&!!o.backward);else if(n instanceof bl)this._setRanges([new Cl(n)]);else if(n instanceof Pl){const e=!!o&&!!o.backward;let t;if("in"==r)t=Cl._createIn(n);else if("on"==r)t=Cl._createOn(n);else{if(void 0===r)throw new v("model-selection-setto-required-second-parameter",[this,n]);t=new Cl(bl._createAt(n,r))}this._setRanges([t],e)}else{if(!Br(n))throw new v("model-selection-setto-not-selectable",[this,n]);this._setRanges(n,o&&!!o.backward)}}_setRanges(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=Array.from(e),n=i.some(t=>{if(!(t instanceof Cl))throw new v("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});(i.length!==this._ranges.length||n)&&(this._replaceAllRanges(i),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new v("model-selection-setfocus-no-ranges",[this,e]);const i=bl._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(n)?(this._pushRange(new Cl(i,n)),this._lastRangeBackward=!0):(this._pushRange(new Cl(n,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Rl(t.start,e);Nl(i,t)&&(yield i);for(const i of t.getWalker()){const n=i.item;"elementEnd"==i.type&&Ll(n,e,t)&&(yield n)}const n=Rl(t.end,e);jl(n,t)&&(yield n)}}containsEntireContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.anchor.root;const t=bl._createAt(e,0),i=bl._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Cl(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new v("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function Ol(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Ll(e,t,i){return Ol(e,t)&&Bl(e,i)}function Rl(e,t){const i=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let r=!1;const o=n.find(e=>!r&&(r=i.isLimit(e),!r&&Ol(e,t)));return n.forEach(e=>t.add(e)),o}function Bl(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);return!i||!t.containsRange(Cl._createOn(i),!0)}function Nl(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(bl._createAt(e,e.maxOffset))&&Bl(e,t))}function jl(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(bl._createAt(e,0))&&Bl(e,t))}Dl.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Fl extends(A(Cl)){constructor(e,t){super(e,t),zl.call(this)}detach(){this.stopListening()}toRange(){return new Cl(this.start,this.end)}static fromRange(e){return new Fl(e.start,e.end)}}function zl(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&Vl.call(this,i)},{priority:"low"})}function Vl(e){const t=this.getTransformedByOperation(e),i=Cl._createFromRanges(t),n=!i.isEqual(this),r=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let o=null;if(n){"$graveyard"==i.root.rootName&&(o="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:o})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:o})}i.LiveRange=Fl,Fl.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};class Hl extends Pl{_data;constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Hl(this.data,this.getAttributes())}static fromJSON(e){return new Hl(e.data,e.attributes)}}i.Text=Hl,Hl.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};const Ul="selection:";class Wl extends(A(pl)){_selection;constructor(e){super(),this._selection=new $l(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(){this._selection.setTo(...arguments)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Ul+e}static _isStoreAttributeKey(e){return e.startsWith(Ul)}}i.DocumentSelection=Wl,Wl.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class $l extends Dl{markers=new Go({idProperty:"name"});_model;_document;_attributePriority=new Map;_selectionRestorePosition=null;_hasChangedRange=!1;_overriddenGravityRegister=new Set;_observedMarkers=new Set;constructor(e){super(),this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>
vendor: 6,947 bytes, line 1
1{this._validateSelectionRanges(this.getRanges())}),this.listenTo(this._model.markers,"update",(e,t,i,n)=>{this._updateMarker(t,n)}),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const i=e.document.differ;for(const n of i.getChanges()){if("insert"!=n.type)continue;const i=n.position.parent;n.length===i.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(i.getAttributeKeys()).filter(e=>e.startsWith(Ul));for(const n of t)e.removeAttribute(n,i)})}}(this._model,t)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(){super.setTo(...arguments),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=p();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new v("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new v("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=Fl.fromRange(e);return t.on("change:range",(e,i,n)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}}),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const i=t.name.split(":",1)[0];if(!this._observedMarkers.has(i))continue;const n=t.getRange();for(const i of this.getRanges())n.containsRange(i,!i.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(e,t){const i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let n=!1;const r=Array.from(this.markers),o=this.markers.has(e);if(t){let i=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){i=!0;break}i&&!o?(this.markers.add(e),n=!0):!i&&o&&(this.markers.remove(e),n=!0)}else o&&(this.markers.remove(e),n=!0);n&&this.fire("change:marker",{oldMarkers:r,directChange:!1})}_updateAttributes(e){const t=Qo(this._getSurroundingAttributes()),i=Qo(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||n.push(e);for(const[e]of i)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t){const i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,i),!0))}_removeAttribute(e){const t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?"normal":"low";return!("low"==t&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,t),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,n]of e)this._setAttribute(i,n,!1)&&t.add(i);return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Ul)){const i=t.substr(10);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let i=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,r=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=Gl(n,t)),i||(i=Gl(r,t)),!this.isGravityOverridden&&!i){let e=n;for(;e&&!i;)e=e.previousSibling,i=Gl(e,t)}if(!i){let e=r;for(;e&&!i;)e=e.nextSibling,i=Gl(e,t)}i||(i=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item)){i=Gl(n.item,t);break}if("text"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function Gl(e,t){if(!e)return null;if(e instanceof ml||e instanceof Hl)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const i=[];for(const[n,r]of e.getAttributes())t.checkAttribute("$text",n)&&!1!==t.getAttributeProperties(n).copyFromObject&&i.push([n,r]);return i}class ql{_nodes=[];_offsetToNode=[];constructor(e){e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._offsetToNode.length}getNode(e){return this._nodes[e]||null}getNodeAtOffset(e){return this._offsetToNode[e]||null}getNodeIndex(e){return e.index}getNodeStartOffset(e){return e.startOffset}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new v("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){if(e==this._offsetToNode.length)return this._nodes.length;const t=this._offsetToNode[e];if(!t)throw new v("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.getNodeIndex(t)}
vendor: 6,111 bytes, line 1
1_insertNodes(e,t){const i=[];for(const e of t){if(!(e instanceof Pl))throw new v("model-nodelist-insertnodes-not-node",this);i.push(e)}let n=this.indexToOffset(e);ns(this._nodes,i,e),ns(this._offsetToNode,function(e){const t=[];let i=0;for(const n of e)for(let e=0;e<n.offsetSize;e++)t[i++]=n;return t}(i),n);for(let t=e;t<this._nodes.length;t++)this._nodes[t]._index=t,this._nodes[t]._startOffset=n,n+=this._nodes[t].offsetSize}_removeNodes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0==t)return[];let i=this.indexToOffset(e);const n=this._nodes.splice(e,t),r=n[n.length-1],o=r.startOffset+r.offsetSize-i;this._offsetToNode.splice(i,o);for(const e of n)e._index=null,e._startOffset=null;for(let t=e;t<this._nodes.length;t++)this._nodes[t]._index=t,this._nodes[t]._startOffset=i,i+=this._nodes[t].offsetSize;return n}_removeNodesArray(e){if(0==e.length)return;for(const t of e)t._index=null,t._startOffset=null;this._nodes=this._nodes.filter(e=>null!==e.index),this._offsetToNode=this._offsetToNode.filter(e=>null!==e.index);let t=0;for(let e=0;e<this._nodes.length;e++)this._nodes[e]._index=e,this._nodes[e]._startOffset=t,t+=this._nodes[e].offsetSize}toJSON(){return this._nodes.map(e=>e.toJSON())}}class Yl extends Pl{name;_children=new ql;constructor(e,t,i){super(t),this.name=e,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildAtOffset(e){return this._children.getNodeAtOffset(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChildAtOffset(i);return t}findAncestor(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).includeSelf?this:this.parent;for(;t;){if(t.name===e)return t;t=t.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(){const e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?function(e){const t=[];for(const i of e)t.push(i._clone(!0));return t}(this._children):void 0;return new Yl(this.name,this.getAttributes(),e)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Hl(e)];Br(e)||(e=[e]);const t=[];for(const i of e)"string"==typeof i?t.push(new Hl(i)):i instanceof ml?t.push(new Hl(i.data,i.getAttributes())):t.push(i);return t}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}_removeChildrenArray(e){this._children._removeNodesArray(e);for(const t of e)t.parent=null}static fromJSON(e){let t;if(e.children){t=[];for(const i of e.children)i.name?t.push(Yl.fromJSON(i)):t.push(Hl.fromJSON(i))}return new Yl(e.name,e.attributes,t)}}i.Element=Yl,Yl.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class Zl{_dispatchers;constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class Xl extends Zl{elementToElement(e){return this.add(function(e){const t=ic(e.model),i=nc(e.view,"container");return t.attributes.length&&(t.children=!0),n=>{n.on(`insert:${t.name}`,Ql(i,lc(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&n.on("reduceChanges",ac(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=ic(e.model),i=nc(e.view,"container");return t.children=!0,n=>{if(n._conversionApi.schema.checkChild(t.name,"$text"))throw new v("conversion-element-to-structure-disallowed-text",n,{elementName:t.name});var r,o;n.on(`insert:${t.name}`,(r=i,o=lc(t),(e,t,i)=>{if(!o(t.item,i.consumable,{preflight:!0}))return;const n=new Map;i.writer._registerSlotFactory(function(e,t,i){return(n,r)=>{const o=n.createContainerElement("$slot");let s=null;if("children"===r)s=Array.from(e.getChildren());else{if("function"!=typeof r)throw new v("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:r});s=Array.from(e.getChildren()).filter(e=>r(e))}return t.set(o,s),o}}(t.item,n,i));const s=r(t.item,i,t);if(i.writer._clearSlotFactory(),!s)return;!function(e,t,i){const n=Array.from(t.values()).flat(),r=new Set(n);if(r.size!=n.length)throw new v("conversion-slot-filter-overlap",i.dispatcher,{element:e});if(r.size!=e.childCount)throw new v("conversion-slot-filter-incomplete",i.dispatcher,{element:e})}(t.item,n,i),o(t.item,i.consumable);const a=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,s),i.writer.insert(a,s),i.convertAttributes(t.item),function(e,t,i,n){i.mapper.on("modelToViewPosition",s,{priority:"highest"});let r=null,o=null;for([r,o]of t)cc(e,o,i,n),i.writer.move(i.writer.createRangeIn(r),i.writer.createPositionBefore(r)),i.writer.remove(r);function s(e,t){const i=t.modelPosition.nodeAfter,n=o.indexOf(i);n<0||(t.viewPosition=t.mapper.findPositionIn(r,n))}i.mapper.off("modelToViewPosition",s)}(s,n,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),n.on("reduceChanges",ac(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t=(e=En(e)).model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;if(t.name&&(i+=":"+t.name),t.values)for(const i of t.values)e.view[i]=nc(e.view[i],"attribute");else e.view=nc(e.view,"attribute");const n=rc(e);return t=>{t.on(i,Jl(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=En(e)).model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;if(t.name&&(i+=":"+t.name),t.values)for(const i of t.values)e.view[i]=oc(e.view[i]);
1else e.view=oc(e.view);const n=rc(e);return t=>{var r;t.on(i,(r=n,(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const n=r(t.attributeOldValue,i,t),o=r(t.attributeNewValue,i,t);if(!n&&!o)return;i.consumable.consume(t.item,e.name);const s=i.mapper.toViewElement(t.item),a=i.writer;if(!s)throw new v("conversion-attribute-to-attribute-on-text",i.dispatcher,t);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e="string"==typeof n.value?n.value.split(/\s+/):n.value;for(const t of e)a.removeClass(t,s)}else if("style"==n.key)if("string"==typeof n.value){const e=new js(a.document.stylesProcessor);e.setTo(n.value);for(const[t]of e.getStylesEntries())a.removeStyle(t,s)}else{const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(n.key,s);if(null!==t.attributeNewValue&&o)if("class"==o.key){const e="string"==typeof o.value?o.value.split(/\s+/):o.value;for(const t of e)a.addClass(t,s)}else if("style"==o.key)if("string"==typeof o.value){const e=new js(a.document.stylesProcessor);e.setTo(o.value);for(const[t,i]of e.getStylesEntries())a.setStyle(t,i,s)}else{const e=Object.keys(o.value);for(const t of e)a.setStyle(t,o.value[t],s)}else a.setAttribute(o.key,o.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=nc(e.view,"ui");return i=>{i.on(`addMarker:${e.model}`,ec(t),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${e.model}`,(e,t,i)=>{const n=i.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}},{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on(`addMarker:${e.model}`,(i=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof Dl||t.item instanceof Wl||t.item.is("$textProxy")))return;const r=sc(i,t,n);if(!r)return;if(!n.consumable.consume(t.item,e.name))return;const o=n.writer,s=Kl(o,r),a=o.document.selection;if(t.item instanceof Dl||t.item instanceof Wl)o.wrap(a.getFirstRange(),s);else{const e=n.mapper.toViewRange(t.range),i=o.wrap(e,s);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,i,n)=>{if(!i.item)return;if(!(i.item instanceof Yl))return;const r=sc(e,i,n);if(!r)return;if(!n.consumable.test(i.item,t.name))return;const o=n.mapper.toViewElement(i.item);if(o&&o.getCustomProperty("addHighlight")){n.consumable.consume(i.item,t.name);for(const e of Cl._createIn(i.item))n.consumable.consume(e.item,t.name);o.getCustomProperty("addHighlight")(o,r,n.writer),n.mapper.bindElementToMarker(o,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,i,n)=>{if(i.markerRange.isCollapsed)return;const r=sc(e,i,n);if(!r)return;const o=Kl(n.writer,r),s=n.mapper.markerNameToElements(i.markerName);if(s){for(const e of s)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement")?n.writer.unwrap(n.writer.createRangeOn(e),o):e.getCustomProperty("removeHighlight")(e,r.id,n.writer);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=En(e)).model;let i=e.view;return i||(i=i=>({group:t,name:i.substr(e.model.length+1)})),n=>{var r;n.on(`addMarker:${t}`,(r=i,(e,t,i)=>{const n=r(t.markerName,i);if(!n)return;const o=t.markerRange;i.consumable.consume(o,e.name)&&(tc(o,!1,i,t,n),tc(o,!0,i,t,n),e.stop())}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${t}`,function(e){return(t,i,n)=>{const r=e(i.markerName,n);if(!r)return;const o=n.mapper.markerNameToElements(i.markerName);if(o){for(const e of o)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(s(`data-${r.group}-start-before`,e),s(`data-${r.group}-start-after`,e),s(`data-${r.group}-end-before`,e),s(`data-${r.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(r.name),0==i.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(i),{priority:e.converterPriority||"normal"})}}(e))}}function Kl(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),"number"==typeof t.priority&&(i._priority=t.priority),i._id=t.id,i}function Jl(e){return(t,i,n)=>{if(!n.consumable.test(i.item,t.name))return;const r=e(i.attributeOldValue,n,i),o=e(i.attributeNewValue,n,i);if(!r&&!o)return;n.consumable.consume(i.item,t.name);const s=n.writer,a=s.document.selection;if(i.item instanceof Dl||i.item instanceof Wl)s.wrap(a.getFirstRange(),o);else{let e=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&r&&(e=s.unwrap(e,r)),null!==i.attributeNewValue&&o&&s.wrap(e,o)}}}function Ql(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hc;return(i,n,r)=>
vendor: 4,270 bytes, line 1
1{if(!t(n.item,r.consumable,{preflight:!0}))return;const o=e(n.item,r,n);if(!o)return;t(n.item,r.consumable);const s=r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(n.item,o),r.writer.insert(s,o),r.convertAttributes(n.item),cc(o,n.item.getChildren(),r,{reconversion:n.reconversion})}}function ec(e){return(t,i,n)=>{i.isOpening=!0;const r=e(i,n);i.isOpening=!1;const o=e(i,n);if(!r||!o)return;const s=i.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,t.name))return;for(const e of s)if(!n.consumable.consume(e.item,t.name))return;const a=n.mapper,l=n.writer;l.insert(a.toViewPosition(s.start),r),n.mapper.bindElementToMarker(r,i.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),o),n.mapper.bindElementToMarker(o,i.markerName)),t.stop()}}function tc(e,t,i,n,r){const o=t?e.start:e.end,s=o.nodeAfter&&o.nodeAfter.is("element")?o.nodeAfter:null,a=o.nodeBefore&&o.nodeBefore.is("element")?o.nodeBefore:null;if(s||a){let e,o;t&&s||!t&&!a?(e=s,o=!0):(e=a,o=!1);const l=i.mapper.toViewElement(e);if(l)return void function(e,t,i,n,r,o){const s=`data-${o.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(o.name),n.writer.setAttribute(s,a.join(","),e),n.mapper.bindElementToMarker(e,r.markerName)}(l,t,o,i,n,r)}!function(e,t,i,n,r){const o=`${r.group}-${t?"start":"end"}`,s=r.name?{name:r.name}:null,a=i.writer.createUIElement(o,s);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,n.markerName)}(i.mapper.toViewPosition(o),t,i,n,r)}function ic(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?Uo(e.attributes):[],children:!!e.children}}function nc(e,t){return"function"==typeof e?e:(i,n)=>function(e,t,i){let n;"string"==typeof e&&(e={name:e});const r=t.writer,o=Object.assign({},e.attributes);if("container"==i)n=r.createContainerElement(e.name,o);else if("attribute"==i){const t={priority:e.priority||ca.DEFAULT_PRIORITY};n=r.createAttributeElement(e.name,o,t)}else n=r.createUIElement(e.name,o);if(e.styles){const t=Object.keys(e.styles);for(const i of t)r.setStyle(i,e.styles[i],n)}if(e.classes){const t=e.classes;if("string"==typeof t)r.addClass(t,n);else for(const e of t)r.addClass(e,n)}return n}(e,n,t)}function rc(e){return e.model.values?(t,i,n)=>{const r=e.view[t];return r?r(t,i,n):null}:e.view}function oc(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function sc(e,t,i){const n="function"==typeof e?e(t,i):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function ac(e){const t=function(e){return(t,i)=>{if(!t.is("element",e.name))return!1;if("attribute"==i.type){if(e.attributes.includes(i.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,i)=>{const n=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const e of i.changes){const r="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(r&&t(r,e)){if(!i.reconvertedElements.has(r)){i.reconvertedElements.add(r);const e=bl._createBefore(r);let t=n.length;for(let i=n.length-1;i>=0;i--){const r=n[i],o=("attribute"==r.type?r.range.start:r.position).compareWith(e);if("before"==o||"remove"==r.type&&"same"==o)break;t=i}n.splice(t,0,{type:"remove",name:r.name,position:e,length:1},{type:"reinsert",name:r.name,position:e,length:1})}}else n.push(e)}i.changes=n}}function lc(e){return function(t,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=["insert"];for(const i of e.attributes)t.hasAttribute(i)&&r.push(`attribute:${i}`);return!!r.every(e=>i.test(t,e))&&(n.preflight||r.forEach(e=>i.consume(t,e)),!0)}}function cc(e,t,i,n){for(const r of t)uc(e.root,r,i,n)||i.convertItem(r)}function uc(e,t,i,n){const{writer:r,mapper:o}=i;if(!n.reconversion)return!1;const s=o.toViewElement(t);return!(!s||s.root==e||!i.canReuseView(s)||(r.move(r.createRangeOn(s),o.toViewPosition(bl._createBefore(t))),0))}function hc(e,t){let{preflight:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i?t.test(e,"insert"):t.consume(e,"insert")}function dc(e){const{schema:t,document:i}=e.model;for(const n of i.getRoots())if(n.isEmpty&&!t.checkChild(n,"$text")&&t.checkChild(n,"paragraph"))return e.insertElement("paragraph",n),!0;return!1}
1function fc(e,t,i){const n=i.createContext(e);return!!i.checkChild(n,"paragraph")&&!!i.checkChild(n.push("paragraph"),t)}function pc(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class mc extends Zl{elementToElement(e){return this.add(gc(e))}elementToAttribute(e){return this.add(function(e){yc(e=En(e));const t=wc(e,!1),i=vc(e.view),n=i?`element:${i}`:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=En(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key,i=void 0===e.view.value?/[\s\S]*/:e.view.value;let n;if("class"==t||"style"==t){const e="class"==t?"classes":"styles";n={[e]:i}}else n={attributes:{[t]:i}};return e.view.name&&(n.name=e.view.name),e.view=n,t}(e)),yc(e,t);const i=wc(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,i)=>{const n="string"==typeof e?e:e(t,i);return i.writer.createElement("$marker",{"data-name":n})}}(e.model);return gc({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){(e=En(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},i=bc(_c(t,"start")),n=bc(_c(t,"end"));return r=>{r.on(`element:${e.view}-start`,i,{priority:e.converterPriority||"normal"}),r.on(`element:${e.view}-end`,n,{priority:e.converterPriority||"normal"});const o=m.low,s=m.highest,a=m.get(e.converterPriority)/s;r.on("element",function(e){return(t,i,n)=>{const r=`data-${e.view}`;function o(t,r){for(const o of r){const r=e.model(o,n),s=n.writer.createElement("$marker",{"data-name":r});n.writer.insert(s,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}(n.consumable.test(i.viewItem,{attributes:r+"-end-after"})||n.consumable.test(i.viewItem,{attributes:r+"-start-after"})||n.consumable.test(i.viewItem,{attributes:r+"-end-before"})||n.consumable.test(i.viewItem,{attributes:r+"-start-before"}))&&(i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor)),n.consumable.consume(i.viewItem,{attributes:r+"-end-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(r+"-end-after").split(",")),n.consumable.consume(i.viewItem,{attributes:r+"-start-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(r+"-start-after").split(",")),n.consumable.consume(i.viewItem,{attributes:r+"-end-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(r+"-end-before").split(",")),n.consumable.consume(i.viewItem,{attributes:r+"-start-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(r+"-start-before").split(",")))}}(t),{priority:o+a})}}(e))}}function gc(e){const t=bc(e=En(e)),i=vc(e.view),n=i?`element:${i}`:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"normal"})}}function vc(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function bc(e){const t=new Rs(e.view);return(i,n,r)=>{const o=t.match(n.viewItem);if(!o)return;const s=o.match;if(s.name=!0,!r.consumable.test(n.viewItem,s))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,n.viewItem,r);a&&r.safeInsert(a,n.modelCursor)&&(r.consumable.consume(n.viewItem,s),r.convertChildren(n.viewItem,a),r.updateConversionResult(a,n))}}function yc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,r="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:n,value:r}}function wc(e,t){const i=new Rs(e.view);return(n,r,o)=>{if(!r.modelRange&&t)return;const s=i.match(r.viewItem);if(!s)return;if(function(e,t){const i="function"==typeof e?e(t):e;return!("object"==typeof i&&!vc(i))&&(!i.classes&&!i.attributes&&!i.styles)}(e.view,r.viewItem)?s.match.name=!0:delete s.match.name,!o.consumable.test(r.viewItem,s.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(r.viewItem,o):e.model.value;if(null===l)return;r.modelRange||Object.assign(r,o.convertChildren(r.viewItem,r.modelCursor));const c=function(e,t,i,n){let r=!1;for(const o of Array.from(e.getItems({shallow:i}
vendor: 1,272 bytes, line 1
1)))n.schema.checkAttribute(o,t.key)&&(r=!0,o.hasAttribute(t.key)||n.writer.setAttribute(t.key,t.value,o));return r}(r.modelRange,{key:a,value:l},t,o);c&&(o.consumable.test(r.viewItem,{name:!0})&&(s.match.name=!0),o.consumable.consume(r.viewItem,s.match))}}function _c(e,t){return{view:`${e.view}-${t}`,model:(t,i)=>{const n=t.getAttribute("name"),r=e.model(n,i);return i.writer.createElement("$marker",{"data-name":r})}}}function kc(e,t){return e.isCollapsed?function(e,t){const i=e.start,n=t.getNearestSelectionRange(i);if(!n){const e=i.getAncestors().reverse().find(e=>t.isObject(e));return e?Cl._createOn(e):null}if(!n.isCollapsed)return n;const r=n.start;return i.isEqual(r)?null:new Cl(r)}(e,t):function(e,t){const{start:i,end:n}=e,r=t.checkChild(i,"$text"),o=t.checkChild(n,"$text"),s=t.getLimitElement(i),a=t.getLimitElement(n);if(s===a){if(r&&o)return null;if(function(e,t,i){const n=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),r=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return n||r}(i,n,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),r=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),o=e?e.start:i,s=r?r.end:n;return new Cl(o,s)}}
1const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,r=l&&(!e||!Cc(i.nodeAfter,t)),o=c&&(!e||!Cc(n.nodeBefore,t));let u=i,h=n;return r&&(u=bl._createBefore(xc(s,t))),o&&(h=bl._createAfter(xc(a,t))),new Cl(u,h)}return null}(e,t)}function xc(e,t){let i=e,n=i;for(;t.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function Cc(e,t){return e&&t.isSelectable(e)}class Sc extends(Er()){model;view;mapper;downcastDispatcher;constructor(e,t){super(),this.model=e,this.view=new fl(t),this.mapper=new Sl,this.downcastDispatcher=new Al({mapper:this.mapper,schema:e.schema});const i=this.model.document,n=i.selection,r=this.model.markers;var o,a,l;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(i,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(i.differ,r,e),this.downcastDispatcher.convertSelection(n,r,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,n)=>{const r=n.newSelection,o=[];for(const e of r.getRanges())o.push(t.toModelRange(e));const s=e.createSelection(o,{backward:r.isBackward});s.isEqual(e.document.selection)||e.change(e=>{e.setSelection(s)})}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(o=this.mapper,a=this.model.schema,l=this.view,(e,t)=>{if(!l.document.isComposing||s.isAndroid)for(let e=0;e<t.targetRanges.length;e++){const i=t.targetRanges[e],n=o.toModelRange(i),r=kc(n,a);r&&!r.isEqual(n)&&(t.targetRanges[e]=o.toViewRange(r))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(r,o)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,i)=>{const n=i.mapper.toViewPosition(t.position),r=t.position.getShiftedBy(t.length),o=i.mapper.toViewPosition(r,{isPhantom:!0}),s=i.writer.createRange(n,o),a=i.writer.remove(s.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e,{defer:!0})},{priority:"low"}),this.downcastDispatcher.on("cleanSelection",(e,t,i)=>{const n=i.writer,r=n.document.selection;for(const e of r.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);n.setSelection(null)}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=t.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const r=[];for(const e of n.getRanges())r.push(i.mapper.toViewRange(e));i.writer.setSelection(r,{backward:n.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=t.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const r=i.writer,o=n.getFirstPosition(),s=i.mapper.toViewPosition(o),a=r.breakAttributes(s);r.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new Ys(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,i=this.model.markers.get(t);if(!i)throw new v("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change(()=>{this.model.markers._refresh(i)})}reconvertItem(e){this.model.change(()=>{this.model.document.differ._refreshItem(e)})}}i.EditingController=Sc;class Ec{_consumables=new Map;add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new Ac(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).
1consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const r=e.getStyleNames();for(const e of r)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Ec),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Ec.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=Ec.createFrom(i,t);return t}}const Tc=["attributes","classes","styles"];class Ac{element;_canConsumeName;_consumables;constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Tc)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Tc)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Tc)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Tc)t in e&&this._revert(t,e[t])}_add(e,t){const i=Uo(t),n=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new v("viewconsumable-invalid-attribute",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const i=Uo(t),n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=Uo(t),n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=Uo(t),n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t)!1===n.get(t)&&n.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Ic extends(Er()){_sourceDefinitions={};_attributeProperties=Object.create(null);_customChildChecks=new Map;_customAttributeChecks=new Map;_genericCheckSymbol=Symbol("$generic");_compiledDefinitions;constructor(){super(),this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new Mc(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new Mc(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new v("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new v("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!(!t||!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!(!t||!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!(!t||!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(e,t)}checkAttribute(e,t){const i=this.getDefinition(e.last);if(!i)return!1;const n=this._evaluateAttributeChecks(e,t);return void 0!==n?n:i.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof bl){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof Yl))throw new v("schema-check-merge-no-element-before",this);if(!(i instanceof Yl))throw new v("schema-check-merge-no-element-after",this);return this.checkMerge(t,i)}if(this.isLimit(e)||this.isLimit(t))return!1;for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e,t){const i=void 0!==t?t:this._genericCheckSymbol,n=this._customChildChecks.get(i)||[];n.push(e),this._customChildChecks.set(i,n)}addAttributeCheck(e,t){const i=void 0!==t?t:this._genericCheckSymbol,n=this._customAttributeChecks.get(i)||[];n.push(e),this._customAttributeChecks.set(i,n)}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||Object.create(null)}getLimitElement(e){let t;for(t=e instanceof bl?e.parent:(e instanceof Cl?[e]:Array.from(e.getRanges())).reduce((e,t)=>
vendor: 4,666 bytes, line 1
1{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i},null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new Hl("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e){let t,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"both";if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new Cl(e);const r=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;"both"!=n&&"backward"!=n||(t=new gl({boundaries:Cl._createIn(r),startPosition:e,direction:"backward"})),"both"!=n&&"forward"!=n||(i=new gl({boundaries:Cl._createIn(r),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(t,i)){const i=e.walker==t?"elementEnd":"elementStart",n=e.value;if(n.type==i&&this.isObject(n.item))return Cl._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new Cl(n.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(e,t,i){const n=i.model;for(const[r,o]of Object.entries(t))n.schema.checkAttribute(e,r)&&i.setAttribute(r,o,e)}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))Uc(this,i,t);else{const e=Cl._createIn(i).getPositions();for(const i of e)Uc(this,i.nodeBefore||i.parent,t)}}getAttributesWithProperty(e,t,i){const n={};for(const[r,o]of e.getAttributes()){const e=this.getAttributeProperties(r);void 0!==e[t]&&(void 0!==i&&i!==e[t]||(n[r]=o))}return n}createContext(e){return new Mc(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const n of i)e[n]=Pc(t[n],n);const n=Object.values(e);for(const t of n)Dc(e,t),Oc(e,t),Lc(e,t),Rc(e,t);for(const t of n)Bc(e,t);for(const t of n)Nc(e,t);for(const t of n)jc(e,t);for(const t of n)Fc(e,t);for(const t of n)zc(e,t);this._compiledDefinitions=function(e){const t={};for(const i of Object.values(e))t[i.name]={name:i.name,isBlock:!!i.isBlock,isContent:!!i.isContent,isInline:!!i.isInline,isLimit:!!i.isLimit,isObject:!!i.isObject,isSelectable:!!i.isSelectable,allowIn:Array.from(i.allowIn).filter(t=>!!e[t]),allowChildren:Array.from(i.allowChildren).filter(t=>!!e[t]),allowAttributes:Array.from(i.allowAttributes)};return t}(e)}_checkContextMatch(e,t){const i=e.last;let n=this._evaluateChildChecks(e,t);if(n=void 0!==n?n:t.allowIn.includes(i.name),!n)return!1;const r=this.getDefinition(i),o=e.trimLast();return!!r&&(0==o.length||this._checkContextMatch(o,r))}_evaluateChildChecks(e,t){const i=this._customChildChecks.get(this._genericCheckSymbol)||[],n=this._customChildChecks.get(t.name)||[];for(const r of[...i,...n]){const i=r(e,t);if(void 0!==i)return i}}_evaluateAttributeChecks(e,t){const i=this._customAttributeChecks.get(this._genericCheckSymbol)||[],n=this._customAttributeChecks.get(t)||[];for(const r of[...i,...n]){const i=r(e,t);if(void 0!==i)return i}}*_getValidRangesForRange(e,t){let i=e.start,n=e.start;for(const r of e.getItems({shallow:!0}))r.is("element")&&(yield*this._getValidRangesForRange(Cl._createIn(r),t)),this.checkAttribute(r,t)||(i.isEqual(n)||(yield new Cl(i,n)),i=bl._createAfter(r)),n=bl._createAfter(r);i.isEqual(n)||(yield new Cl(i,n))}findOptimalInsertionRange(e,t){const i=e.getSelectedElement();if(i&&this.isObject(i)&&!this.isInline(i))return"before"==t||"after"==t?new Cl(bl._createAt(i,t)):Cl._createOn(i);const n=qo(e.getSelectedBlocks());if(!n)return new Cl(e.focus);if(n.isEmpty)return new Cl(bl._createAt(n,0));const r=bl._createAfter(n);return e.focus.isTouching(r)?new Cl(r):new Cl(bl._createBefore(n))}}class Mc{_items;constructor(e){if(e instanceof Mc)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Hc)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Mc([e]);return t._items=[...this._items,...t._items],t}trimLast(){const e=new Mc([]);return e._items=this._items.slice(0,-1),e}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}
vendor: 6,586 bytes, line 1
1endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Pc(e,t){const i={name:t,allowIn:new Set,allowChildren:new Set,disallowIn:new Set,disallowChildren:new Set,allowContentOf:new Set,allowWhere:new Set,allowAttributes:new Set,disallowAttributes:new Set,allowAttributesOf:new Set,inheritTypesFrom:new Set};return function(e,t){for(const i of e){const e=Object.keys(i).filter(e=>e.startsWith("is"));for(const n of e)t[n]=!!i[n]}}(e,i),Vc(e,i,"allowIn"),Vc(e,i,"allowChildren"),Vc(e,i,"disallowIn"),Vc(e,i,"disallowChildren"),Vc(e,i,"allowContentOf"),Vc(e,i,"allowWhere"),Vc(e,i,"allowAttributes"),Vc(e,i,"disallowAttributes"),Vc(e,i,"allowAttributesOf"),Vc(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.add(e),t.allowWhere.add(e),t.allowAttributesOf.add(e),t.inheritTypesFrom.add(e))}}(e,i),i}function Dc(e,t){for(const i of t.allowIn){const n=e[i];n?n.allowChildren.add(t.name):t.allowIn.delete(i)}}function Oc(e,t){for(const i of t.allowChildren){const n=e[i];n?n.allowIn.add(t.name):t.allowChildren.delete(i)}}function Lc(e,t){for(const i of t.disallowIn){const n=e[i];n?n.disallowChildren.add(t.name):t.disallowIn.delete(i)}}function Rc(e,t){for(const i of t.disallowChildren){const n=e[i];n?n.disallowIn.add(t.name):t.disallowChildren.delete(i)}}function Bc(e,t){for(const e of t.disallowChildren)t.allowChildren.delete(e);for(const e of t.disallowIn)t.allowIn.delete(e);for(const e of t.disallowAttributes)t.allowAttributes.delete(e)}function Nc(e,t){for(const i of t.allowContentOf){const n=e[i];n&&(n.disallowChildren.forEach(i=>{t.allowChildren.has(i)||(t.disallowChildren.add(i),e[i].disallowIn.add(t.name))}),n.allowChildren.forEach(i=>{t.disallowChildren.has(i)||(t.allowChildren.add(i),e[i].allowIn.add(t.name))}))}}function jc(e,t){for(const i of t.allowWhere){const n=e[i];n&&(n.disallowIn.forEach(i=>{t.allowIn.has(i)||(t.disallowIn.add(i),e[i].disallowChildren.add(t.name))}),n.allowIn.forEach(i=>{t.disallowIn.has(i)||(t.allowIn.add(i),e[i].allowChildren.add(t.name))}))}}function Fc(e,t){for(const i of t.allowAttributesOf){const n=e[i];if(!n)return;n.allowAttributes.forEach(e=>{t.disallowAttributes.has(e)||t.allowAttributes.add(e)})}}function zc(e,t){for(const i of t.inheritTypesFrom){const n=e[i];if(n){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const i of e)i in t||(t[i]=n[i])}}}function Vc(e,t,i){for(const n of e){let e=n[i];"string"==typeof e&&(e=[e]),Array.isArray(e)&&e.forEach(e=>t[i].add(e))}}function Hc(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Uc(e,t,i){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||i.removeAttribute(n,t)}class Wc extends(A()){conversionApi;_splitParts=new Map;_cursorParents=new Map;_modelCursor=null;_emptyElementsToKeep=new Set;constructor(e){super(),this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["$root"];this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const n of new Mc(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const r=t.createElement(n.name,e);i&&t.insert(r,i),i=bl._createAt(r,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=Ec.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),r=t.createDocumentFragment();if(n){this._removeEmptyElements();const e=this._modelCursor.parent,i=e._removeChildren(0,e.childCount);r._insertChild(0,i),r.markers=function(e,t){const i=new Set,n=new Map,r=Cl._createIn(e).getItems();for(const e of r)e.is("element","$marker")&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),r=t.createPositionBefore(e);n.has(i)?n.get(i).end=r.clone():n.set(i,new Cl(r.clone())),t.remove(e)}return n}(r,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,r}_convertItem(e,t){const i={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof Cl))throw new v("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:bl._createAt(t,0);const n=new Cl(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof Cl&&(n.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:n,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(i[i.length-1])));const r=this._cursorParents.get(e);t.modelCursor=r?n.createPositionAt(r,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:n}=this.conversionApi;let r=i.findAllowedParent(t,e);if(r){if(r===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(r)&&(r=null)}if(!r)return fc(t,e,i)?{position:pc(t,n)}:null;const o=this.conversionApi.writer.split(t,r),s=[];for(const e of o.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),i=e.item;this._registerSplitPair(t,i)}const a=o.range.end.parent;return this._cursorParents.set(e,a),{position:o.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){const e=new Map;
1for(const t of this._splitParts.keys())if(t.isEmpty&&!this._emptyElementsToKeep.has(t)){const i=e.get(t.parent)||[];i.push(t),this._splitParts.delete(t),e.set(t.parent,i)}for(const[t,i]of e)t._removeChildrenArray(i);e.size&&this._removeEmptyElements()}}class $c{getHtml(e){const t=r.document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Gc{domParser;domConverter;htmlWriter;skipComments=!0;constructor(e){this.domParser=new DOMParser,this.domConverter=new Ya(e,{renderingMode:"data"}),this.htmlWriter=new $c}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(e.trim().slice(0,1e4))||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}i.HtmlDataProcessor=Gc;class qc extends(A()){model;mapper;downcastDispatcher;upcastDispatcher;viewDocument;stylesProcessor;htmlProcessor;processor;_viewWriter;constructor(e,t){super(),this.model=e,this.mapper=new Sl,this.downcastDispatcher=new Al({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(r,o)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)},{priority:"lowest"}),this.upcastDispatcher=new Wc({schema:e.schema}),this.viewDocument=new la(t),this.stylesProcessor=t,this.htmlProcessor=new Gc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new ya(this.viewDocument),this.upcastDispatcher.on("text",(e,t,i)=>{let{schema:n,consumable:r,writer:o}=i,s=t.modelCursor;if(!r.test(t.viewItem))return;if(!n.checkChild(s,"$text")){if(!fc(s,"$text",n))return;if(0==t.viewItem.data.trim().length)return;s=pc(s,o)}r.consume(t.viewItem);const a=o.createText(t.viewItem.data);o.insert(a,s),t.modelRange=o.createRange(s,s.getShiftedBy(a.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}},{priority:"lowest"}),Er().prototype.decorate.call(this,"init"),Er().prototype.decorate.call(this,"set"),Er().prototype.decorate.call(this,"get"),Er().prototype.decorate.call(this,"toView"),Er().prototype.decorate.call(this,"toModel"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},dc)},{priority:"lowest"})}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new v("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(t);return n.isAttached()||b("datacontroller-get-detached-root",this),"empty"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.toView(e,t);return this.processor.toData(i)}toView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const r=Cl._createIn(e),o=new ba(i);this.mapper.bindElements(e,o);const s=e.is("documentFragment")?e.markers:function(e){const t=[],i=e.root.document;if(!i)return new Map;const n=Cl._createIn(e);for(const e of i.model.markers){const i=e.getRange(),r=i.isCollapsed,o=i.start.isEqual(n.start)||i.end.isEqual(n.end);if(r&&o)t.push([e.name,i]);else{const r=n.getIntersection(i);r&&t.push([e.name,r])}}return t.sort((e,t)=>
1{let[i,n]=e,[r,o]=t;if("after"!==n.end.compareWith(o.start))return 1;if("before"!==n.start.compareWith(o.end))return-1;switch(n.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(n.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return r.localeCompare(i)}}}),new Map(t)}(e);return this.downcastDispatcher.convert(r,s,n,t),o}init(e){if(this.model.document.version)throw new v("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new v("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},e=>{for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.insert(this.parse(t[i],n),n,0)}}),Promise.resolve()}set(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={};if("string"==typeof e?i.main=e:i=e,!this._checkIfRootsExists(Object.keys(i)))throw new v("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(i)){const n=this.model.document.getRoot(t);e.remove(e.createRangeIn(n)),e.insert(this.parse(i[t],n),n,0)}})}parse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root";const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root";return this.model.change(i=>this.upcastDispatcher.convert(e,i,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}i.DataController=qc;class Yc{_helpers=new Map;_downcast;_upcast;constructor(e,t){this._downcast=Uo(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Uo(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new v("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new v("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of Zc(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of Zc(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of Zc(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers(e){let{name:t,dispatchers:i,isDowncast:n}=e;if(this._helpers.has(t))throw new v("conversion-group-exists",this);const r=n?new Xl(i):new mc(i);this._helpers.set(t,r)}}function*Zc(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},n=e.view[t],r=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Xc(i,n,r)}else yield*Xc(e.model,e.view,e.upcastAlso)}function*Xc(e,t,i){if(yield{model:e,view:t},i)for(const t of Uo(i))yield{model:e,view:t}}i.Conversion=Yc;class Kc{namespaces;domParser;domConverter;htmlWriter;skipComments=!0;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.namespaces=t.namespaces||[],this.domParser=new DOMParser,this.domConverter=new Ya(e,{renderingMode:"data"}),this.htmlWriter=new $c}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{keepOriginalCase:!0,skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e=`<xml ${this.namespaces.map(e=>`xmlns:${e}="nsp"`).join(" ")}>${e}</xml>`;const t=this.domParser.parseFromString(e,"text/xml"),i=t.querySelector("parsererror");
vendor: 12,063 bytes, line 1
1if(i)throw new Error("Parse error - "+i.textContent);const n=t.createDocumentFragment(),r=t.documentElement.childNodes;for(;r.length>0;)n.appendChild(r[0]);return n}}i.XmlDataProcessor=Kc;class Jc{baseVersion;isDocumentOperation;batch;constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function Qc(e,t){const i=iu(t),n=i.reduce((e,t)=>e+t.offsetSize,0),r=e.parent;ru(e);const o=e.index;return r._insertChild(o,i),nu(r,o+i.length),nu(r,o),new Cl(e,e.getShiftedBy(n))}function eu(e){if(!e.isFlat)throw new v("operation-utils-remove-range-not-flat",this);const t=e.start.parent;ru(e.start),ru(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return nu(t,e.start.index),i}function tu(e,t){if(!e.isFlat)throw new v("operation-utils-move-range-not-flat",this);const i=eu(e);return Qc(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function iu(e){const t=[];!function e(i){if("string"==typeof i)t.push(new Hl(i));else if(i instanceof ml)t.push(new Hl(i.data,i.getAttributes()));else if(i instanceof Pl)t.push(i);else if(Br(i))for(const t of i)e(t)}(e);for(let e=1;e<t.length;e++){const i=t[e],n=t[e-1];i instanceof Hl&&n instanceof Hl&&ou(i,n)&&(t.splice(e-1,2,new Hl(n.data+i.data,n.getAttributes())),e--)}return t}function nu(e,t){const i=e.getChild(t-1),n=e.getChild(t);if(i&&n&&i.is("$text")&&n.is("$text")&&ou(i,n)){const r=new Hl(i.data+n.data,i.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,r)}}function ru(e){const t=e.textNode,i=e.parent;if(t){const n=e.offset-t.startOffset,r=t.index;i._removeChildren(r,1);const o=new Hl(t.data.substr(0,n),t.getAttributes()),s=new Hl(t.data.substr(n),t.getAttributes());i._insertChild(r,[o,s])}}function ou(e,t){const i=e.getAttributes(),n=t.getAttributes();for(const e of i){if(e[1]!==t.getAttribute(e[0]))return!1;n.next()}return n.next().done}class su extends Jc{sourcePosition;howMany;targetPosition;constructor(e,t,i,n){super(n),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}get affectedSelectable(){return[Cl._createFromPositionAndShift(this.sourcePosition,this.howMany),Cl._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new su(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new su(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,i=this.sourcePosition.offset,n=this.targetPosition.offset;if(i+this.howMany>e.maxOffset)throw new v("move-operation-nodes-do-not-exist",this);if(e===t&&i<n&&n<i+this.howMany)throw new v("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==Rr(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=i&&this.targetPosition.path[e]<i+this.howMany)throw new v("move-operation-node-into-itself",this)}}_execute(){tu(Cl._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const i=bl.fromJSON(e.sourcePosition,t),n=bl.fromJSON(e.targetPosition,t);return new this(i,e.howMany,n,e.baseVersion)}}i.MoveOperation=su;class au extends Jc{position;nodes;shouldReceiveAttributes;constructor(e,t,i){super(i),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new ql(iu(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new ql([...this.nodes].map(e=>e._clone(!0))),t=new au(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new bl(e,[0]);return new su(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new v("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new ql([...e].map(e=>e._clone(!0))),Qc(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(Yl.fromJSON(t)):i.push(Hl.fromJSON(t));const n=new au(bl.fromJSON(e.position,t),i,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}i.InsertOperation=au;class lu extends Jc{splitPosition;howMany;insertionPosition;graveyardPosition;constructor(e,t,i,n,r){super(r),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=i,this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new bl(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Cl(this.splitPosition,e)}get affectedSelectable(){const e=[Cl._createFromPositionAndShift(this.splitPosition,0),Cl._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Cl._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new lu(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new bl(e,[0]);return new cu(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new v("split-operation-position-invalid",this);if(!e.parent)throw new v("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new v("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new v("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)tu(Cl._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();Qc(this.insertionPosition,t)}tu(new Cl(bl._createAt(e,this.splitPosition.offset),bl._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new bl(e.root,t,"toPrevious")}static fromJSON(e,t){const i=bl.fromJSON(e.splitPosition,t),n=bl.fromJSON(e.insertionPosition,t),r=e.graveyardPosition?bl.fromJSON(e.graveyardPosition,t):null;return new this(i,e.howMany,n,r,e.baseVersion)}}i.SplitOperation=lu;class cu extends Jc{sourcePosition;howMany;targetPosition;graveyardPosition;constructor(e,t,i,n,r){super(r),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new bl(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Cl(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[Cl._createOn(e),Cl._createFromPositionAndShift(this.targetPosition,0),Cl._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new cu(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),i=new bl(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new lu(e,this.howMany,i,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new v("merge-operation-source-position-invalid",this);if(!t.parent)throw new v("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new v("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;tu(Cl._createIn(e),this.targetPosition),tu(Cl._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const i=bl.fromJSON(e.sourcePosition,t),n=bl.fromJSON(e.targetPosition,t),r=bl.fromJSON(e.graveyardPosition,t);return new this(i,e.howMany,n,r,e.baseVersion)}}i.MergeOperation=cu;class uu extends Jc{name;oldRange;newRange;affectsData;_markers;constructor(e,t,i,n,r,o){super(o),this.name=e,this.oldRange=t?t.clone():null,this.newRange=i?i.clone():null,this.affectsData=r,this._markers=n}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new uu(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new uu(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new uu(e.name,e.oldRange?Cl.fromJSON(e.oldRange,t):null,e.newRange?Cl.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}i.MarkerOperation=uu;class hu extends Jc{range;key;oldValue;newValue;constructor(e,t,i,n,r){super(r),this.range=e.clone(),this.key=t,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new hu(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new hu(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new v("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!pr(e.getAttribute(this.key),this.oldValue))throw new v("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new v("attribute-operation-attribute-exists",this,{node:e,ke
vendor: 12,411 bytes, line 1
1y:this.key})}}_execute(){pr(this.oldValue,this.newValue)||function(e,t,i){ru(e.start),ru(e.end);for(const n of e.getItems({shallow:!0})){const e=n.is("$textProxy")?n.textNode:n;null!==i?e._setAttribute(t,i):e._removeAttribute(t),nu(e.parent,e.index)}nu(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new hu(Cl.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}i.AttributeOperation=hu;class du extends Jc{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new du(this.baseVersion)}getReversed(){return new du(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}i.NoOperation=du;class fu extends Jc{position;oldName;newName;constructor(e,t,i,n){super(n),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=i}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new fu(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new fu(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Yl))throw new v("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new v("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new fu(bl.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}i.RenameOperation=fu;class pu extends Jc{root;key;oldValue;newValue;constructor(e,t,i,n,r){super(r),this.root=e,this.key=t,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new pu(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new pu(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new v("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new v("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new v("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new v("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new pu(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}i.RootAttributeOperation=pu;class mu extends Jc{rootName;elementName;isAdd;_document;constructor(e,t,i,n,r){super(r),this.rootName=e,this.elementName=t,this.isAdd=i,this._document=n,this._document.getRoot(this.rootName)||(this._document.createRoot(this.elementName,this.rootName)._isAttached=!1)}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new mu(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new mu(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new mu(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}i.RootOperation=mu;const gu={};gu[hu.className]=hu,gu[au.className]=au,gu[uu.className]=uu,gu[su.className]=su,gu[du.className]=du,gu[Jc.className]=Jc,gu[fu.className]=fu,gu[pu.className]=pu,gu[mu.className]=mu,gu[lu.className]=lu,gu[cu.className]=cu;class vu{static fromJSON(e,t){return gu[e.__className].fromJSON(e,t)}}i.OperationFactory=vu;const bu=new Map;function yu(e,t,i){let n=bu.get(e);n||(n=new Map,bu.set(e,n)),n.set(t,i)}function wu(e){return[e]}function _u(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=function(e,t){const i=bu.get(e);return i&&i.has(t)?i.get(t):wu}(e.constructor,t.constructor);try{return n(e=e.clone(),t,i)}catch(e){throw e}}function ku(e,t,i){e=e.slice(),t=t.slice();const n=new xu(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(e),n.setOriginalOperations(t);const r=n.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:r};const o=new WeakMap;for(const t of e)o.set(t,0);const s={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a<e.length;){const i=e[a],r=o.get(i);if(r==t.length){a++;continue}const s=t[r],l=_u(i,s,n.getContext(i,s,!0)),c=_u(s,i,n.getContext(s,i,!1));n.updateRelation(i,s),n.setOriginalOperations(l,i),n.setOriginalOperations(c,s);for(const e of l)o.set(e,r+c.length);e.splice(a,1,...l),t.splice(r,1,...c)}if(Eu(e),Eu(t),i.padWithNoOps){const i=e.length-s.originalOperationsACount,n=t.length-s.originalOperationsBCount;Su(e,n-i),Su(t,i-n)}return Cu(e,s.nextBaseVersionB),Cu(t,s.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:r}}class xu{originalOperations;_history;_useRelations;_forceWeakRemove;_relations;constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!i,this._relations=new Map}setOriginalOperations(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,i||t)}updateRelation(e,t){if(e instanceof su)t instanceof cu?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof su&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof lu){if(t instanceof cu)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof su)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const i=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const n=i.end.offset-e.splitPosition.offset,r=e.splitPosition.offset-i.start.offset;this._setRelation(e,t,{howMany:n,offset:r})}}}else if(e instanceof cu)t instanceof cu?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof lu?e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource"):t instanceof su&&t.howMany>0&&(e.sourcePosition.isEqual(t.sourcePosition.getShiftedBy(t.howMany))&&this._setRelation(e,t,"mergeSourceAffected"),e.targetPosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeTargetWasBefore"));else if(e instanceof uu){const i=e.newRange;if(!i)return;if(t instanceof cu){const n=i.start.isEqual(t.targetPosition),r=i.start.isEqual(t.deletionPosition),o=i.end.isEqual(t.deletionPosition),s=i.end.isEqual(t.sourcePosition);(n||r||o||s)&&this._setRelation(e,t,{wasInLeftElement:n,wasStartBeforeMergedElement:r,wasEndBeforeMergedElement:o,wasInRightElement:s})}}}getContext(e,t,i){return{aIsStrong:i,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const i=this.originalOperations.get(t),n=this._history.getUndoneOperation(i);if(!n)return null;const r=this.originalOperations.get(e),o=this._relations.get(r);return o&&o.get(n)||null}_setRelation(e,t,i){const n=this.originalOperations.get(e),r=this.originalOperations.get(t);let o=this._relations.get(n);o||(o=new Map,this._relations.set(n,o)),o.set(r,i)}}function Cu(e,t){for(const i of e)i.baseVersion=t++}function Su(e,t){for(let i=0;i<t;i++)e.push(new du(0))}function Eu(e){const t=new Map;for(let i=0;i<e.length;i++){const n=e[i];n instanceof uu&&(-1!==n.baseVersion?t.set(n.name,{op:n,ranges:n.newRange?[n.newRange]:[]}):(n.newRange&&t.get(n.name).ranges.push(n.newRange),e.splice(i,1),i--))}for(const{op:e,ranges:i}of t.values())i.length?e.newRange=Cl._createFromRanges(i):e.newRange=null}function Tu(e,t,i){const n=e.nodes.getNode(0).getAttribute(t);if(n==i)return null;const r=new Cl(e.position,e.position.getShiftedBy(e.howMany));return new hu(r,t,n,i,0)}function Au(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function Iu(e,t){const i=[];for(let n=0;n<e.length;n++){const r=e[n],o=new su(r.start,r.end.offset-r.start.offset,t,0);i.push(o);for(let t=n+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)[0];t=t._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)}return i}yu(hu,hu,(e,t,i)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map(t=>new hu(t,e.key,e.oldValue,e.newValue,0)),r=e.range.getIntersection(t.range);return r&&i.aIsStrong&&n.push(new hu(r,t.key,t.newValue,e.newValue,0)),0==n.length?[new du(0)]:n}return[e]}),yu(hu,au,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new hu(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const n=Tu(t,e.key,e.oldValue);n&&i.unshift(n)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),yu(hu,cu,(e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(Cl._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||i.push(n),i.map(t=>new hu(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),yu(hu,su,(e,t)=>{const i=function(e,t){const i=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,r=[];i.containsRange(e,!0)?n=e:e.start.hasSameParentAs(i.start)?(r=e.getDifference(i),n=e.getIntersection(i)):r=[e];const o=[];for(let e of r){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),n=e.start.hasSameParentAs(i),r=e._getTransformedByInsertion(i,t.howMany,n);o.push(...r)}return n&&o.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),o}(e.range,t);return i.map(t=>new hu(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),yu(hu,lu,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new Cl(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),yu(au,hu,(e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=Tu(e,t.ke
1y,t.newValue);n&&i.push(n)}return i}),yu(au,au,(e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),yu(au,su,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),yu(au,lu,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),yu(au,cu,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),yu(uu,au,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),yu(uu,uu,(e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new du(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),yu(uu,cu,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),yu(uu,su,(e,t)=>{const i=[e];if(e.oldRange&&(e.oldRange=Cl._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){const n=e.newRange._getTransformedByMoveOperation(t);e.newRange=n[0];for(let t=1;t<n.length;t++){const r=e.clone();r.oldRange=null,r.newRange=n[t],r.baseVersion=-1,i.push(r)}}return i}),yu(uu,lu,(e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=bl._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement?e.newRange.start=bl._createAt(t.moveTargetPosition):e.newRange.start=n.start,e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=bl._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=bl._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),yu(cu,au,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),yu(cu,cu,(e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new bl(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new du(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,r="$graveyard"==t.targetPosition.root.rootName;if(r&&!n||(!n||r)&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new su(i,e.howMany,n,0)]}return[new du(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),yu(cu,su,(e,t,i)=>{const n=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new du(0)]:(t.sourcePosition.getShiftedBy(t.howMany).isEqual(e.sourcePosition)?e.sourcePosition.stickiness="toNone":t.targetPosition.isEqual(e.sourcePosition)&&"mergeSourceAffected"==i.abRelation?e.sourcePosition.stickiness="toNext":t.sourcePosition.isEqual(e.targetPosition)?(e.targetPosition.stickiness="toNone",e.howMany-=t.howMany):t.targetPosition.isEqual(e.targetPosition)&&"mergeTargetWasBefore"==i.abRelation?(e.targetPosition.stickiness="toPrevious",e.howMany+=t.howMany):(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany)),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.sourcePosition.stickiness="toPrevious",e.targetPosition.stickiness="toNext",e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),yu(cu,lu,(e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)&&(t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition)||"mergeTargetNotMoved"==i.abRelation))return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e];
vendor: 8,824 bytes, line 1
1if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),yu(su,au,(e,t)=>{const i=Cl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),yu(su,su,(e,t,i)=>{const n=Cl._createFromPositionAndShift(e.sourcePosition,e.howMany),r=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);let o,s=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),o=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Au(e,t)&&Au(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(r,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Iu([n],o);if(r.containsPosition(e.targetPosition)&&r.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Iu([n],o);const l=Rr(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Iu([n],o);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(s=!1):s=!0;const c=[],u=n.getDifference(r);for(const e of u){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==Rr(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);c.push(...n)}const h=n.getIntersection(r);return null!==h&&s&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(h):1==c.length?r.start.isBefore(n.start)||r.start.isEqual(n.start)?c.unshift(h):c.push(h):c.splice(1,0,h)),0===c.length?[new du(e.baseVersion)]:Iu(c,o)}),yu(su,lu,(e,t,i)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const r=Cl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(r.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(r.start.hasSameParentAs(t.splitPosition)&&r.containsPosition(t.splitPosition)){let e=new Cl(t.splitPosition,r.end);return e=e._getTransformedBySplitOperation(t),Iu([new Cl(r.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(n=e.targetPosition);const o=[r._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=r.start.isEqual(t.graveyardPosition)||r.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!i.aWasUndone&&o.push(Cl._createFromPositionAndShift(t.insertionPosition,1))}return Iu(o,n)}),yu(su,cu,(e,t,i)=>{const n=Cl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new du(0)]}else if(!i.aWasUndone){const i=[];let n=t.graveyardPosition.clone(),r=t.targetPosition._getTransformedByMergeOperation(t);const o=e.targetPosition.getTransformedByOperation(t);e.howMany>1&&(i.push(new su(e.sourcePosition,e.howMany-1,o,0)),n=n._getTransformedByMove(e.sourcePosition,o,e.howMany-1),r=r._getTransformedByMove(e.sourcePosition,o,e.howMany-1));const s=t.deletionPosition._getCombined(e.sourcePosition,o),a=new su(n,1,s,0),l=a.getMovedRangeStart().path.slice();l.push(0);const c=new bl(a.targetPosition.root,l);r=r._getTransformedByMove(n,s,1);const u=new su(r,t.howMany,c,0);return i.push(a),i.push(u),i}const r=Cl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=r.start,e.howMany=r.end.offset-r.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),yu(fu,au,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),yu(fu,cu,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),yu(fu,su,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),yu(fu,fu,(e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new du(0)];e.oldName=t.newName}return[e]}),yu(fu,lu,(e,t)=>{if("same"==Rr(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new fu(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),yu(pu,pu,(e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new du(0)];e.oldValue=t.newValue}return[e]}),yu(mu,mu,(e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new du(0)]:[e]),yu(lu,au,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e])),yu(lu,cu,(e,t,i)=>{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const n=new bl(t.graveyardPosition.root,i),r=lu.getInsertionPosition(new bl(t.graveyardPosition.root,i)),o=new lu(n,0,r,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=lu.getInsertionPosition(e.splitPosition),e.graveyardPosition=o.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[o,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=lu.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),yu(lu,su,(e,t,i)=>{const n=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const r=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&r){const i=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),r=n.path.slice();r.push(0);const o=new bl(n.root,r);return[new su(i,e.howMany,o,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const r=e.splitPosition.isEqual(t.targetPosition);if(r&&("insertAtSource"==i.baRelation||"splitBefore"==i.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=lu.getInsertionPosition(e.splitPosition),[e];if(r&&i.abRelation&&i.abRelation.howMany){const{howMany:t,offset:n}=i.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(n),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.
vendor: 6,793 bytes, line 1
1insertionPosition=lu.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=lu.getInsertionPosition(e.splitPosition),[e]}),yu(lu,lu,(e,t,i)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new du(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new du(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,r="$graveyard"==t.splitPosition.root.rootName;if(r&&!n||(!n||r)&&i.aIsStrong){const i=[];return t.howMany&&i.push(new su(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new su(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new du(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const n=new bl(t.insertionPosition.root,i);return[e,new su(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=lu.getInsertionPosition(e.splitPosition),[e]});class Mu extends(A(bl)){constructor(e,t){if(super(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toNone"),!this.root.is("rootElement"))throw new v("model-liveposition-root-not-rootelement",e);Pu.call(this)}detach(){this.stopListening()}toPosition(){return new bl(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function Pu(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&Du.call(this,i)},{priority:"low"})}function Du(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}i.LivePosition=Mu,Mu.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Ou{operations;isUndoable;isLocal;isUndo;isTyping;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},b("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:i=!0,isUndo:n=!1,isTyping:r=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=i,this.isUndo=n,this.isTyping=r}get type(){return b("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Lu{static _statesPriority=[void 0,"refresh","rename","move"];_markerCollection;_changesInElement=new Map;_elementsSnapshots=new Map;_elementChildrenSnapshots=new Map;_elementState=new Map;_changedMarkers=new Map;_changedRoots=new Map;_changeCount=0;_cachedChanges=null;_cachedChangesWithGraveyard=null;_refreshedItems=new Set;constructor(e){this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),i=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),i||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);const n=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of n.getItems({shallow:!0}))this._setElementState(e,"move");break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Cl._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._setElementState(t.position.nodeAfter,"rename");break}case"split":{const e=t.splitPosition.parent;if(!this._isInInsertedElement(e)){this._markRemove(e,t.splitPosition.offset,t.howMany);const i=Cl._createFromPositionAndShift(t.splitPosition,t.howMany);for(const e of i.getItems({shallow:!0}))this._setElementState(e,"move")}this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&(this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1),this._setElementState(t.graveyardPosition.nodeAfter,"move"));break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1),this._setElementState(e,"move");const n=t.targetPosition.parent;if(!this._isInInsertedElement(n)){this._markInsert(n,t.targetPosition.offset,e.maxOffset);const i=Cl._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of i.getItems({shallow:!0}))this._setElementState(e,"move")}break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;
vendor: 7,982 bytes, line 1
1this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),i.range&&i.range.root.is("rootElement")&&!i.range.root._isLoaded&&(i.range=null);let n=this._changedMarkers.get(e);n?n.newMarkerData=i:(n={newMarkerData:i,oldMarkerData:t},this._changedMarkers.set(e,n)),null==n.oldMarkerData.range&&null==i.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldMarkerData.range&&e.push({name:t,range:i.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newMarkerData.range&&e.push({name:t,range:i.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>{let[t,i]=e;return{name:t,data:{oldRange:i.oldMarkerData.range,newRange:i.newMarkerData.range}}})}hasDataChanges(){if(this.getChanges().length)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const i=e.range&&!t.range,n=!e.range&&t.range,r=e.range&&t.range&&!e.range.isEqual(t.range);if(i||n||r)return!0}}return!1}getChanges(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1),n=this._elementChildrenSnapshots.get(e),r=Bu(e.getChildren()),o=Nu(n.length,i);let s=0,a=0;for(const i of o)if("i"===i){const i=this._getDiffActionForNode(r[s].node,"insert"),n=this._elementsSnapshots.get(r[s].node),o=this._getInsertDiff(e,s,i,r[s],n);t.push(o),s++}else if("r"===i){const i=this._getDiffActionForNode(n[a].node,"remove"),r=this._getRemoveDiff(e,s,i,n[a]);t.push(r),a++}else if("a"===i){const i=n[a].attributes,o=r[s].attributes;let l;if("$text"==r[s].name)l=new Cl(bl._createAt(e,s),bl._createAt(e,s+1));else{const t=e.offsetToIndex(s);l=new Cl(bl._createAt(e,s),bl._createAt(e.getChild(t),0))}const c=this._getAttributesDiff(l,i,o);t.push(...c),s++,a++}else s++,a++}t.sort((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1);for(let e=1,i=0;e<t.length;e++){const n=t[i],r=t[e],o="remove"==n.type&&"remove"==r.type&&"$text"==n.name&&"$text"==r.name&&n.position.isEqual(r.position),s="insert"==n.type&&"insert"==r.type&&"$text"==n.name&&"$text"==r.name&&n.position.parent==r.position.parent&&n.position.offset+n.length==r.position.offset,a="attribute"==n.type&&"attribute"==r.type&&n.position.parent==r.position.parent&&n.range.isFlat&&r.range.isFlat&&n.position.offset+n.length==r.position.offset&&n.attributeKey==r.attributeKey&&n.attributeOldValue==r.attributeOldValue&&n.attributeNewValue==r.attributeNewValue;o||s||a?(n.length++,a&&(n.range.end=n.range.end.getShiftedBy(1)),t[e]=null):i=e}t=t.filter(e=>e);for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(ju),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map(e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t})}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementChildrenSnapshots.clear(),this._elementsSnapshots.clear(),this._elementState.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems.clear(),this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e),this._setElementState(e,"refresh");const t=Cl._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const i=this._changedRoots.get(e);void 0!==i.state?(delete i.state,void 0===i.attributes&&this._changedRoots.delete(e)):i.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,i,n){const r=this._changedRoots.get(e)||{name:e},o=r.attributes||{};if(o[t]){const e=o[t];n===e.oldValue?delete o[t]:e.newValue=n}else o[t]={oldValue:i,newValue:n};0===Object.entries(o).length?(delete r.attributes,void 0===r.state&&this._changedRoots.delete(e)):(r.attributes=o,this._changedRoots.set(e,r))}_markInsert(e,t,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"insert",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,n)}_markRemove(e,t,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"remove",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,n),this._removeAllNestedChanges(e,t,i)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshots(e);const i=this._getChangesForElement(e);this._handleChange(t,i),i.push(t);for(let e=0;e<i.length;e++)i[e].howMany<1&&(i.splice(e,1),e--)}_setElementState(e,t){if(!e.is("element"))return;const i=Lu._statesPriority.indexOf(this._elementState.get(e));Lu._statesPriority.indexOf(t)>i&&this._elementState.set(e,t)}_getDiffActionForNode(e,t){if(!e.is("element"))return t;if(!this._elementsSnapshots.has(e))return t;const i=this._elementState.get(e);return i&&"move"!=i?i:t}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshots(e){if(this._elementChildrenSnapshots.has(e))return;const t=Bu(e.getChildren());this._elementChildrenSnapshots.set(e,t);for(const e of t)this._elementsSnapshots.set(e.node,e)}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const i of t){const n=e.offset+e.howMany,r=i.offset+i.howMany;if("insert"==e.type&&("insert"==i.type&&(e.offset<=i.offset?i.offset+=e.howMany:e.offset<r&&(i.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==i.type&&e.offset<i.offset&&(i.offset+=e.howMany),"attribute"==i.type))if(e.offset<=i.offset)i.offset+=e.howMany;else if(e.offset<r){const r=i.howMany;i.howMany=e.offset-i.offset,t.unshift({type:"attribute",offset:n,howMany:r-i.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==i.type)if(n<=i.offset)i.offset-=e.howMany;else if(n<=r)if(e.offset<i.offset){const t=n-i.offset;i.offset=e.offset,i.howMany-=t,e.nodesToHandle-=t}else i.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=i.offset)e.nodesToHandle-=i.howMany,i.howMany=0;else if(e.offset<r){const t=r-e.offset;i.howMany-=t,e.nodesToHandle-=t}if("remove"==i.type&&(n<=i.offset?i.offset-=e.howMany:e.offset<i.offset&&(e.nodesToHandle+=i.howMany,i.howMany=0)),"attribute"==i.type)if(n<=i.offset)i.offset-=e.howMany;else if(e.offset<i.offset){const t=n-i.offset;i.offset=e.offset,i.howMany-=t}else if(e.offset<r)if(n<=r){const n=i.howMany;i.howMany=e.offset-i.offset;
vendor: 19,526 bytes, line 1
1const r=n-i.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:r,count:this._changeCount++})}else i.howMany-=r-e.offset}if("attribute"==e.type){if("insert"==i.type)if(e.offset<i.offset&&n>i.offset){if(n>r){const e={type:"attribute",offset:r,howMany:n-r,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offset<r&&(n>r?(e.nodesToHandle=n-r,e.offset=r):e.nodesToHandle=0);if("remove"==i.type&&e.offset<i.offset&&n>i.offset){const r={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(r,t),t.push(r),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&n<=r?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&n>=r&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i,n,r){const o={type:"insert",position:bl._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++,action:i};return"insert"!=i&&r&&(o.before={name:r.name,attributes:new Map(r.attributes)}),o}_getRemoveDiff(e,t,i,n){return{type:"remove",action:i,position:bl._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,i){const n=[];i=new Map(i);for(const[r,o]of t){const t=i.has(r)?i.get(r):null;t!==o&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:r,attributeOldValue:o,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(r)}for(const[t,r]of i)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:r,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),n=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&n>=e.offset&&n<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,i){const n=new Cl(bl._createAt(e,t),bl._createAt(e,t+i));for(const e of n.getItems({shallow:!0}))e.is("element")&&(this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function Ru(e){return{node:e,name:e.is("$text")?"$text":e.name,attributes:new Map(e.getAttributes())}}function Bu(e){const t=[];for(const i of e)if(i.is("$text"))for(let e=0;e<i.data.length;++e)t.push(Ru(i));else t.push(Ru(i));return t}function Nu(e,t){const i=[];let n=0,r=0;for(const e of t){if(e.offset>n){for(let t=0;t<e.offset-n;t++)i.push("e");r+=e.offset-n}if("insert"==e.type){for(let t=0;t<e.howMany;t++)i.push("i");n=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)i.push("r");n=e.offset,r+=e.howMany}else{if(e.howMany>1500)for(let t=0;t<e.howMany;t++)i.push("a");else i.push(..."a".repeat(e.howMany).split(""));n=e.offset+e.howMany,r+=e.howMany}}if(r<e)for(let t=0;t<e-r-n;t++)i.push("e");return i}function ju(e){const t="position"in e&&"$graveyard"==e.position.root.rootName,i="range"in e&&"$graveyard"==e.range.root.rootName;return!t&&!i}class Fu{_operations=[];_undoPairs=new Map;_undoneOperations=new Set;_baseVersionToOperationIndex=new Map;_version=0;_gaps=new Map;get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new v("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.version;if(!this._operations.length)return[];const i=this._operations[0];void 0===e&&(e=i.baseVersion);let n=t-1;for(const[t,i]of this._gaps)e>t&&e<i&&(e=i),n>t&&n<i&&(n=t-1);if(n<i.baseVersion||e>this.lastOperation.baseVersion)return[];let r=this._baseVersionToOperationIndex.get(e);void 0===r&&(r=0);let o=this._baseVersionToOperationIndex.get(n);return void 0===o&&(o=this._operations.length-1),this._operations.slice(r,o+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}i.History=Fu;class zu extends Yl{rootName;_document;_isAttached=!0;_isLoaded=!0;constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"main";super(t),this._document=e,this.rootName=i}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}zu.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const Vu="$graveyard";class Hu extends(A()){model;history;selection;roots;differ;isReadOnly;_postFixers;_hasSelectionChangedFromTheLastChangeBlock;constructor(e){super(),this.model=e,this.history=new Fu,this.selection=new Wl(this),this.roots=new Go({idProperty:"rootName"}),this.differ=new Lu(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Vu),this.listenTo(e,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&this.history.addOperation(i)},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,i,n,r)=>{const o={...t.getData(),range:n};this.differ.bufferMarkerChange(t.name,r,o),null===i&&t.on("change",(e,i)=>{const n=t.getData();this.differ.bufferMarkerChange(t.name,{...n,range:i},n)})}),this.registerPostFixer(e=>{let t=!1;for(const i of this.roots)i.isAttached()||i.isEmpty||(e.remove(e.createRangeIn(i)),t=!0);for(const i of this.model.markers)i.getRange().root.isAttached()||(e.removeMarker(i),t=!0);return t})}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Vu)}createRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$root",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main";if(this.roots.get(t))throw new v("model-document-createroot-name-exists",this,{name:t});const i=new zu(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}getRootNames(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getRoots(e).map(e=>e.rootName)}getRoots(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.roots.filter(t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Sn(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,n=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return e.start.isValid()&&e.end.isValid()&&Uu(e.start)&&Uu(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function Uu(e){const t=e.textNode;if(t){const i=t.data,n=e.offset-t.startOffset;return!us(i,n)&&!hs(i,n)}return!0}class Wu extends(A()){_markers=new Map;[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof $u?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=e instanceof $u?e.name:e;if(r.includes(","))throw new v("markercollection-incorrect-marker-name",this);const o=this._markers.get(r);if(o){const e=o.getData(),s=o.getRange();let a=!1;return s.isEqual(t)||(o._attachLiveRange(Fl.fromRange(t)),a=!0),i!=o.managedUsingOperations&&(o._managedUsingOperations=i,a=!0),"boolean"==typeof n&&n!=o.affectsData&&(o._affectsData=n,a=!0),a&&this.fire(`update:${r}`,o,s,t,e),o}const s=Fl.fromRange(t),a=new $u(r,s,i,n);return this._markers.set(r,a),this.fire(`update:${r}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof $u?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire(`update:${t}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof $u?e.name:e,i=this._markers.get(t);if(!i)throw new v("markercollection-refresh-marker-not-exists",this);const n=i.getRange();this.fire(`update:${t}`,i,n,n,i.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class $u extends(A(pl)){name;_managedUsingOperations;_affectsData;_liveRange;constructor(e,t,i,n){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}$u.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Gu extends Jc{sourcePosition;howMany;constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new v("detach-operation-on-document-node",this)}_execute(){eu(Cl._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class qu extends pl{markers=new Map;_children=new ql;constructor(e){super(),e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildAtOffset(e){return this._children.getNodeAtOffset(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChildAtOffset(i);return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(Yl.fromJSON(i)):t.push(Hl.fromJSON(i));return new qu(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){return"string"==typeof e?[new Hl(e)]:(Br(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Hl(e):e instanceof ml?new Hl(e.data,e.getAttributes()):e))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}_removeChildrenArray(e){this._children._removeNodesArray(e);for(const t of e)t.parent=null}}i.DocumentFragment=qu,qu.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Yu{model;batch;constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Hl(e,t)}createElement(e,t){return new Yl(e,t)}createDocumentFragment(){return new qu}cloneElement(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e._clone(t)}insert(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._assertWriterUsedCorrectly(),e instanceof Hl&&""==e.data)return;const n=bl._createAt(t,i);if(e.parent){if(Qu(e.root,n.root))return void this.move(Cl._createOn(e),n);if(e.root.document)throw new v("model-writer-insert-forbidden-move",this);this.remove(e)}const r=n.root.document?n.root.document.version:null,o=e instanceof qu?e._removeChildren(0,e.childCount):e,s=new au(n,o,r);if(e instanceof Hl&&(s.shouldReceiveAttributes=!0),this.batch.addOperation(s),this.model.applyOperation(s),e instanceof qu)for(const[t,i]of e.markers){const e=bl._createAt(i.root,0),r={range:new Cl(i.start._getCombined(e,n),i.end._getCombined(e,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,r):this.addMarker(t,r)}}insertText(e,t,i,n){t instanceof qu||t instanceof Yl||t instanceof bl?this.insert(this.createText(e),t,i):this.insert(this.createText(e,t),i,n)}insertElement(e,t,i,n){t instanceof qu||t instanceof Yl||t instanceof bl?this.insert(this.createElement(e),t,i):this.insert(this.createElement(e,t),i,n)}append(e,t){this.insert(e,t,"end")}appendText(e,t,i){t instanceof qu||t instanceof Yl?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),i,"end")}appendElement(e,t,i){t instanceof qu||t instanceof Yl?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),i,"end")}setAttribute(e,t,i){if(this._assertWriterUsedCorrectly(),i instanceof Cl){const n=i.getMinimalFlatRanges();for(const i of n)Zu(this,e,t,i)}else Xu(this,e,t,i)}setAttributes(e,t){for(const[i,n]of Qo(e))this.setAttribute(i,n,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof Cl){const i=t.getMinimalFlatRanges();for(const t of i)Zu(this,e,null,t)}else Xu(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof Cl)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof Cl))throw new v("writer-move-invalid-range",this);if(!e.isFlat)throw new v("writer-move-range-not-flat",this);const n=bl._createAt(t,i);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Qu(e.root,n.root))throw new v("writer-move-different-document",this);const r=e.root.document?e.root.document.version:null,o=new su(e.start,e.end.offset-e.start.offset,n,r);this.batch.addOperation(o),this.model.applyOperation(o)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof Cl?e:Cl._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),Ju(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Yl))throw new v("writer-merge-no-element-before",this);if(!(i instanceof Yl))throw new v("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(){return this.model.createSelection(...arguments)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(Cl._createIn(i),bl._createAt(t,"end")),this.remove(i)}_merge(e){const t=bl._createAt(e.nodeBefore,"end"),i=bl._createAt(e.nodeAfter,0),n=e.root.document.graveyard,r=new bl(n,[0]),o=e.root.document.version,s=new cu(i,e.nodeAfter.maxOffset,t,r,o);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Yl))throw new v("writer-rename-not-element-instance",this);const i=e.root.document?e.root.document.version:null,n=new fu(bl._createBefore(e),e.name,t,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let i,n,r=e.parent;if(!r.parent)throw new v("writer-split-element-no-parent",this);if(t||(t=r.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new v("writer-split-invalid-limit-element",this);do{const t=r.root.document?r.root.document.version:null,o=r.maxOffset-e.offset,s=lu.getInsertionPosition(e),a=new lu(e,o,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),i||n||(i=r,n=e.parent.nextSibling),r=(e=this.createPositionAfter(e.parent)).parent}while(r!==t);return{position:e,range:new Cl(bl._createAt(i,"end"),bl._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new v("writer-wrap-range-not-flat",this);const i=t instanceof Yl?t:new Yl(t);if(i.childCount>0)throw new v("writer-wrap-element-not-empty",this);if(null!==i.parent)throw new v("writer-wrap-element-attached",this);this.insert(i,e.start);const n=new Cl(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,bl._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new v("writer-unwrap-element-no-parent",this);this.move(Cl._createIn(e),this.createPositionAfter(e)),this.remove(e)}
vendor: 7,770 bytes, line 1
1addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new v("writer-addmarker-no-usingoperation",this);const i=t.usingOperation,n=t.range,r=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new v("writer-addmarker-marker-exists",this);if(!n)throw new v("writer-addmarker-no-range",this);return i?(Ku(this,e,null,n,r),this.model.markers.get(e)):this.model.markers._set(e,n,i,r)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,n=this.model.markers.get(i);if(!n)throw new v("writer-updatemarker-marker-not-exists",this);if(!t)return b("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),void this.model.markers._refresh(n);const r="boolean"==typeof t.usingOperation,o="boolean"==typeof t.affectsData,s=o?t.affectsData:n.affectsData;if(!r&&!t.range&&!o)throw new v("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=t.range?t.range:a;r&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?Ku(this,i,null,l,s):(Ku(this,i,a,null,s),this.model.markers._set(i,l,void 0,s)):n.managedUsingOperations?Ku(this,i,a,l,s):this.model.markers._set(i,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new v("writer-removemarker-no-marker",this);const i=this.model.markers.get(t);i.managedUsingOperations?Ku(this,t,i.getRange(),null,i.affectsData):this.model.markers._remove(t)}addRoot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root";this._assertWriterUsedCorrectly();const i=this.model.document.getRoot(e);if(i&&i.isAttached())throw new v("writer-addroot-root-exists",this);const n=this.model.document,r=new mu(e,t,!0,n,n.version);return this.batch.addOperation(r),this.model.applyOperation(r),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new v("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const i=this.model.document,n=new mu(t.rootName,t.name,!1,i,i.version);this.batch.addOperation(n),this.model.applyOperation(n)}setSelection(){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...arguments)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of Qo(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=Wl._getStoreAttributeKey(e);this.setAttribute(n,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=Wl._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new v("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let r=!1;if("move"===e){const e=t;r=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const e=t,i=e.nodeBefore,o=e.nodeAfter,s=n.start.parent==i&&n.start.isAtEnd,a=n.end.parent==o&&0==n.end.offset,l=n.end.nodeAfter==o,c=n.start.nodeAfter==o;r=s||a||l||c}r&&this.updateMarker(i.name,{range:n})}}}function Zu(e,t,i,n){const r=e.model,o=r.document;let s,a,l,c=n.start;for(const e of n.getWalker({shallow:!0}))l=e.item.getAttribute(t),s&&a!=l&&(a!=i&&u(),c=s),s=e.nextPosition,a=l;function u(){const n=new Cl(c,s),l=n.root.document?o.version:null,u=new hu(n,t,a,i,l);e.batch.addOperation(u),r.applyOperation(u)}s instanceof bl&&s!=c&&a!=i&&u()}function Xu(e,t,i,n){const r=e.model,o=r.document,s=n.getAttribute(t);let a,l;if(s!=i){if(n.root===n){const e=n.document?o.version:null;l=new pu(n,t,s,i,e)}else{a=new Cl(bl._createBefore(n),e.createPositionAfter(n));const r=a.root.document?o.version:null;l=new hu(a,t,s,i,r)}e.batch.addOperation(l),r.applyOperation(l)}}function Ku(e,t,i,n,r){const o=e.model,s=o.document,a=new uu(t,i,n,o.markers,!!r,s.version);e.batch.addOperation(a),o.applyOperation(a)}function Ju(e,t,i,n){let r;if(e.root.document){const i=n.document,o=new bl(i.graveyard,[0]);r=new su(e,t,o,i.version)}else r=new Gu(e,t);i.addOperation(r),n.applyOperation(r)}function Qu(e,t){return e===t||e instanceof zu&&t instanceof zu}function eh(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.isCollapsed)return;const n=t.getFirstRange();if("$graveyard"==n.root.rootName)return;const r=e.schema;e.change(e=>{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const n=t.getFirstRange();return n.start.parent!=n.end.parent&&e.checkChild(i,"paragraph")}(r,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),rh(e,e.createPositionAt(i,0),t)}(e,t);const o={};if(!i.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(o,r.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,i=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(n);if(i&&n.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"});const r=i.getLastPosition(),o=t.createRange(r,n);t.hasContent(o,{ignoreMarkers:!0})||(n=r)}}return[Mu.fromPosition(i,"toPrevious"),Mu.fromPosition(n,"toNext")]}(n);s.isTouching(a)||e.remove(e.createRange(s,a)),i.leaveUnmerged||(function(e,t,i){const n=e.model;if(!nh(e.model.schema,t,i))return;const[r,o]=function(e,t){const i=e.getAncestors(),n=t.getAncestors();let r=0;for(;i[r]&&i[r]==n[r];)r++;return[i[r],n[r]]}(t,i);r&&o&&(!n.hasContent(r,{ignoreMarkers:!0})&&n.hasContent(o,{ignoreMarkers:!0})?ih(e,t,i,r.parent):th(e,t,i,r.parent))}(e,s,a),r.removeDisallowedAttributes(s.parent.getChildren(),e)),oh(e,t,s),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!i&&n}(r,s)&&rh(e,s,t,o),s.detach(),a.detach()})}function th(e,t,i,n){const r=t.parent,o=i.parent;if(r!=n&&o!=n){for(t=e.createPositionAfter(r),(i=e.createPositionBefore(o)).isEqual(t)||e.insert(o,t),e.merge(t);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}nh(e.model.schema,t,i)&&th(e,t,i,n)}}function ih(e,t,i,n){const r=t.parent,o=i.parent;if(r!=n&&o!=n){for(t=e.createPositionAfter(r),(i=e.createPositionBefore(o)).isEqual(t)||e.insert(r,i);t.parent.isEmpty;){const i=t.parent;t=e.createPositionBefore(i),e.remove(i)}i=e.createPositionBefore(o),function(e,t){const i=t.nodeBefore,n=t.nodeAfter;i.name!=n.name&&e.rename(i,n.name),e.clearAttributes(i),e.setAttributes(Object.fromEntries(n.getAttributes()),i),e.merge(t)}(e,i),nh(e.model.schema,t,i)&&ih(e,t,i,n)}}function nh(e,t,i){const n=t.parent,r=i.parent;
vendor: 6,135 bytes, line 1
1return n!=r&&!e.isLimit(n)&&!e.isLimit(r)&&function(e,t,i){const n=new Cl(e,t);for(const e of n.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e)}function rh(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=e.createElement("paragraph");e.model.schema.setAllowedAttributes(r,n,e),e.insert(r,t),oh(e,i,e.createPositionAt(r,0))}function oh(e,t,i){t instanceof Wl?e.setSelection(i):t.setTo(i)}function sh(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{i.push(e.start.parent),t.remove(e)}),i.forEach(e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}})}class ah{model;writer;position;canMergeWith;schema;_documentFragment;_documentFragmentPosition;_firstNode=null;_lastNode=null;_lastAutoParagraph=null;_filterAttributesOf=[];_affectedStart=null;_affectedEnd=null;_nodeToSelect=null;constructor(e,t,i){this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),i=this.writer.createPositionAfter(e);if(i.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new v("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Cl._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Cl(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){this._checkAndSplitToAllowedPosition(e)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this.schema.isObject(e)||this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Mu.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleDisallowedNode(e){e.is("element")&&this.handleNodes(e.getChildren())}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new v("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Mu.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Mu.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Yl))return;if(!this._canMergeLeft(e))return;const t=Mu._createBefore(e);t.stickiness="toNext";const i=Mu.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Mu._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Mu._createAt(t.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Yl))return;if(!this._canMergeRight(e))return;const t=Mu._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new v("insertcontent-invalid-insertion-position",this);this.position=bl._createAt(t.nodeBefore,"end");const i=Mu.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Mu._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Mu._createAt(t.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Yl&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Yl&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_insertAutoParagraph(){this._insertPartialFragment();const e=this.writer.createElement("paragraph");this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0)}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}
1else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return this.schema.checkChild(this.position.parent,e)||this._insertAutoParagraph(),!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)||this.schema.checkChild(e,"paragraph")&&this.schema.checkChild("paragraph",t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function lh(e,t){const{isForward:i,walker:n,unit:r,schema:o,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let i=e.position.textNode;for(i||(i=t?e.position.nodeAfter:e.position.nodeBefore);i&&i.is("$text");){const n=e.position.offset-i.startOffset;if(hh(i,n,t))i=t?e.position.nodeAfter:e.position.nodeBefore;else{if(uh(i.data,n,t))break;e.next()}}return e.position}(n,i):function(e,t,i){const n=e.position.textNode;if(n){const r=n.data;let o=e.position.offset-n.startOffset;for(;us(r,o)||"character"==t&&hs(r,o)||i&&fs(r,o);)e.next(),o=e.position.offset-n.startOffset}return e.position}(n,r,s);if(a==(i?"elementStart":"elementEnd")){if(o.isSelectable(l))return bl._createAt(l,i?"after":"before");if(o.checkChild(c,"$text"))return c}else{if(o.isLimit(l))return void n.skip(()=>!0);if(o.checkChild(c,"$text"))return c}}function ch(e,t){const i=e.root,n=bl._createAt(i,t?"end":0);return t?new Cl(e,n):new Cl(n,e)}function uh(e,t,i){const n=t+(i?0:-1);return' ,.?!:;"-()'.includes(e.charAt(n))}function hh(e,t,i){return t===(i?e.offsetSize:0)}let dh=class extends(Er()){markers;document;schema;_pendingChanges;_currentWriter;constructor(){super(),this.markers=new Wu,this.document=new Hu(this),this.schema=new Ic,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,t)=>{t[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(()=>!0,"$marker"),function(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.selection,n=t.schema,r=[];let o=!1;for(const e of i.getRanges()){const t=kc(e,n);t&&!t.isEqual(e)?(r.push(t),o=!0):r.push(e)}return o&&e.setSelection(function(e){const t=[...e],i=new Set;let n=1;for(;n<t.length;){const e=t[n],r=t.slice(0,n);for(const[o,s]of r.entries())if(!i.has(o))if(e.isEqual(s))i.add(o);else if(e.isIntersecting(s)){i.add(o),i.add(n);const r=e.getJoined(s);t.push(r)}n++}return t.filter((e,t)=>!i.has(t))}(r),{backward:i.isBackward}),!1}(t,e))}(this),this.document.registerPostFixer(dc),this.on("insertContent",(e,t)=>{let[i,n]=t;e.return=function(e,t,i){return e.change(n=>{const r=i||e.document.selection;r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const o=new ah(e,n,r.anchor),s=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[i,n]of t.markers){const{start:t,end:r}=n,o=t.isEqual(r);e.push({position:t,name:i,isCollapsed:o},{position:r,name:i,isCollapsed:o})}e.sort((e,t)=>{let{position:i}=e,{position:n}=t;return i.isBefore(n)?1:-1});for(const{position:i,name:r,isCollapsed:o}of e){let e=null,a=null;const l=i.parent===t&&i.isAtStart,c=i.parent===t&&i.isAtEnd;l||c?o&&(a=l?"start":"end"):(e=n.createElement("$marker"),n.insert(e,i)),s.push({name:r,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];o.handleNodes(a);let l=o.getSelectionRange();if(t.is("documentFragment")&&s.length){const e=l?Fl.fromRange(l):null,t={};for(let e=s.length-1;e>=0;e--){const{name:i,element:r,collapsed:a}=s[e],l=!t[i];if(l&&(t[i]=[]),r){const e=n.createPositionAt(r,"before");t[i].push(e),n.remove(r)}else{const e=o.getAffectedRange();if(!e){a&&t[i].push(o.position);continue}a?t[i].push(e[a]):t[i].push(l?e.start:e.end)}}for(const[e,[i,r]]of Object.entries(t))i&&r&&i.root===r.root&&i.root.document&&!n.model.markers.has(e)&&n.addMarker(e,{usingOperation:!0,affectsData:!0,range:new Cl(i,r)});e&&(l=e.toRange(),e.detach())}
1l&&(r instanceof Wl?n.setSelection(l):r.setTo(l));const c=o.getAffectedRange()||e.createRange(r.anchor);return o.destroy(),c})}(this,i,n)}),this.on("insertObject",(e,t)=>{let[i,n,r]=t;e.return=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e.schema.isObject(t))throw new v("insertobject-element-not-an-object",e,{object:t});const r=i||e.document.selection;let o=r;n.findOptimalPosition&&e.schema.isBlock(t)&&(o=e.createSelection(e.schema.findOptimalInsertionRange(r,n.findOptimalPosition)));const s=qo(r.getSelectedBlocks()),a={};return s&&Object.assign(a,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change(i=>{o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});let r=t;const s=o.anchor.parent;!e.schema.checkChild(s,t)&&e.schema.checkChild(s,"paragraph")&&e.schema.checkChild("paragraph",t)&&(r=i.createElement("paragraph"),i.insert(t,r)),e.schema.setAllowedAttributes(r,a,i);const l=e.insertContent(r,o);return l.isCollapsed||n.setSelection&&function(e,t,i,n){const r=e.model;if("on"==i)return void e.setSelection(t,"on");if("after"!=i)throw new v("insertobject-invalid-place-parameter-value",r);let o=t.nextSibling;r.schema.isInline(t)?e.setSelection(t,"after"):(!(o&&r.schema.checkChild(o,"$text"))&&r.schema.checkChild(t.parent,"paragraph")&&(o=e.createElement("paragraph"),r.schema.setAllowedAttributes(o,n,e),r.insertContent(o,e.createPositionAfter(t))),o&&e.setSelection(o,0))}(i,t,n.setSelection,a),l})}(this,i,n,r)}),this.on("canEditAt",e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()})}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Ou,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){v.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Ou):e instanceof Ou||(e=new Ou(e)):e=new Ou,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){v.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i){const n=fh(t,i);for(var r=arguments.length,o=new Array(r>3?r-3:0),s=3;s<r;s++)o[s-3]=arguments[s];return this.fire("insertContent",[e,n,i,...o])}insertObject(e,t,i,n){const r=fh(t,i);for(var o=arguments.length,s=new Array(o>4?o-4:0),a=4;a<o;a++)s[a-4]=arguments[a];return this.fire("insertObject",[e,r,n,n,...s])}deleteContent(e,t){eh(this,e,t)}modifySelection(e,t){!function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=e.schema,r="backward"!=i.direction,o=i.unit?i.unit:"character",s=!!i.treatEmojiAsSingleUnit,a=t.focus,l=new gl({boundaries:ch(a,r),singleCharacters:!0,direction:r?"forward":"backward"}),c={walker:l,schema:n,isForward:r,unit:o,treatEmojiAsSingleUnit:s};let u;for(;u=l.next();){if(u.done)return;const i=lh(c,u.value);if(i)return void(t instanceof Wl?e.change(e=>{e.setSelectionFocus(i)}):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const i=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return i;const r=n.start.root,o=n.start.getCommonPath(n.end),s=r.getNodeByPath(o);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(s,n.start.path[o.length]),e.createPositionAt(s,n.end.path[o.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(i,0),l)[0],r=e.createRange(e.createPositionAt(i,0),t.start);sh(e.createRange(t.end,e.createPositionAt(i,"end")),e),sh(r,e)}return i})}(this,e)}hasContent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=e instanceof Cl?e:Cl._createIn(e);if(i.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:r=!1}=t;if(!r)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=fh(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,i){return new bl(e,t,i)}createPositionAt(e,t){return bl._createAt(e,t)}createPositionAfter(e){return bl._createAfter(e)}createPositionBefore(e){return bl._createBefore(e)}createRange(e,t){return new Cl(e,t)}createRangeIn(e){return Cl._createIn(e)}createRangeOn(e){return Cl._createOn(e)}createSelection(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return new Dl(...t)}createBatch(e){return new Ou(e)}createOperationFromJSON(e){return vu.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;
vendor: 6,116 bytes, line 1
1){const t=this._pendingChanges[0].batch;this._currentWriter=new Yu(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}};function fh(e,t){if(e)return e instanceof Dl||e instanceof Wl?e:e instanceof Pl?t||0===t?new Dl(e,t):e.is("rootElement")?new Dl(e,"in"):new Dl(e,"on"):new Dl(e)}i.Model=dh;class ph extends el{domEventType="click";onDomEvent(e){this.fire(e.type,e)}}i.ClickObserver=ph;class mh extends el{domEventType=["mousedown","mouseup","mouseover","mouseout"];onDomEvent(e){this.fire(e.type,e)}}i.MouseObserver=mh;class gh{document;constructor(e){this.document=e}createDocumentFragment(e){return new ba(this.document,e)}createElement(e,t,i){return new Hs(this.document,e,t,i)}createText(e){return new Os(this.document,e)}clone(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const n=i.getChildIndex(e);return this.removeChildren(n,1,i),this.insertChild(n,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new Hs(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){Vt(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return Xs._createAt(e,t)}createPositionAfter(e){return Xs._createAfter(e)}createPositionBefore(e){return Xs._createBefore(e)}createRange(e,t){return new Ks(e,t)}createRangeOn(e){return Ks._createOn(e)}createRangeIn(e){return Ks._createIn(e)}createSelection(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return new Qs(...t)}}i.UpcastWriter=gh;const vh=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,bh=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,yh=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,wh=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,_h=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,kh=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,xh=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Ch(e){return e.startsWith("#")?vh.test(e):e.startsWith("rgb")?bh.test(e)||yh.test(e):e.startsWith("hsl")?wh.test(e)||_h.test(e):xh.has(e.toLowerCase())}const Sh=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Eh(e){return Sh.includes(e)}const Th=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Ah(e){return Th.test(e)}const Ih=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Mh(e){return Ih.test(e)}const Ph=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Dh(e){return Ph.includes(e)}const Oh=["center","top","bottom","left","right"];function Lh(e){return Oh.includes(e)}const Rh=["fixed","scroll","local"];function Bh(e){return Rh.includes(e)}const Nh=/^url\(/;function jh(e){return Nh.test(e)}function Fh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Uh(e),i=t[0],n=t[2]||i,r=t[1]||i;return{top:i,bottom:n,right:r,left:t[3]||r}}function zh(e){return t=>{const{top:i,right:n,bottom:r,left:o}=t,s=[];return[i,n,o,r].every(e=>
1!!e)?s.push([e,Vh(t)]):(i&&s.push([e+"-top",i]),n&&s.push([e+"-right",n]),r&&s.push([e+"-bottom",r]),o&&s.push([e+"-left",o])),s}}function Vh(e){let{top:t,right:i,bottom:n,left:r}=e;const o=[];return r!==i?o.push(t,i,n,r):n!==t?o.push(t,i,n):i!==t?o.push(t,i):o.push(t),o.join(" ")}function Hh(e){return t=>({path:e,value:Fh(t)})}function Uh(e){const t=e.trim().slice(0,1500).matchAll(kh);return Array.from(t).map(e=>e[0])}function Wh(e){e.setNormalizer("background",e=>{const t={},i=Uh(e);for(const e of i)Dh(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Lh(e)?(t.position=t.position||[],t.position.push(e)):Bh(e)?t.attachment=e:Ch(e)?t.color=e:jh(e)&&(t.image=e);return{path:"background",value:t}}),e.setNormalizer("background-color",e=>({path:"background.color",value:e})),e.setReducer("background",e=>{const t=[];return t.push(["background-color",e.color]),t}),e.setStyleRelation("background",["background-color"])}function $h(e){e.setNormalizer("border",e=>{const{color:t,style:i,width:n}=Jh(e);return{path:"border",value:{color:Fh(t),style:Fh(i),width:Fh(n)}}}),e.setNormalizer("border-top",Gh("top")),e.setNormalizer("border-right",Gh("right")),e.setNormalizer("border-bottom",Gh("bottom")),e.setNormalizer("border-left",Gh("left")),e.setNormalizer("border-color",qh("color")),e.setNormalizer("border-width",qh("width")),e.setNormalizer("border-style",qh("style")),e.setNormalizer("border-top-color",Zh("color","top")),e.setNormalizer("border-top-style",Zh("style","top")),e.setNormalizer("border-top-width",Zh("width","top")),e.setNormalizer("border-right-color",Zh("color","right")),e.setNormalizer("border-right-style",Zh("style","right")),e.setNormalizer("border-right-width",Zh("width","right")),e.setNormalizer("border-bottom-color",Zh("color","bottom")),e.setNormalizer("border-bottom-style",Zh("style","bottom")),e.setNormalizer("border-bottom-width",Zh("width","bottom")),e.setNormalizer("border-left-color",Zh("color","left")),e.setNormalizer("border-left-style",Zh("style","left")),e.setNormalizer("border-left-width",Zh("width","left")),e.setExtractor("border-top",Xh("top")),e.setExtractor("border-right",Xh("right")),e.setExtractor("border-bottom",Xh("bottom")),e.setExtractor("border-left",Xh("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",zh("border-color")),e.setReducer("border-style",zh("border-style")),e.setReducer("border-width",zh("border-width")),e.setReducer("border-top",Qh("top")),e.setReducer("border-right",Qh("right")),e.setReducer("border-bottom",Qh("bottom")),e.setReducer("border-left",Qh("left")),e.setReducer("border",function(){return t=>{const i=Kh(t,"top"),n=Kh(t,"right"),r=Kh(t,"bottom"),o=Kh(t,"left"),s=[i,n,r,o],a={width:e(s,"width"),style:e(s,"style"),color:e(s,"color")},l=ed(a,"all");if(l.length)return l;const c=Object.entries(a).reduce((e,t)=>{let[i,n]=t;return n&&(e.push([`border-${i}`,n]),s.forEach(e=>delete e[i])),e},[]);return[...c,...ed(i,"top"),...ed(n,"right"),...ed(r,"bottom"),...ed(o,"left")]};function e(e,t){return e.map(e=>e[t]).reduce((e,t)=>e==t?e:null)}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Gh(e){return t=>{const{color:i,style:n,width:r}=Jh(t),o={};return void 0!==i&&(o.color={[e]:i}),void 0!==n&&(o.style={[e]:n}),void 0!==r&&(o.width={[e]:r}),{path:"border",value:o}}}function qh(e){return t=>({path:"border",value:Yh(t,e)})}function Yh(e,t){return{[t]:Fh(e)}}function Zh(e,t){return i=>({path:"border",value:{[e]:{[t]:i}}})}function Xh(e){return(t,i)=>{if(i.border)return Kh(i.border,e)}}function Kh(e,t){const i={};return e.width&&e.width[t]&&(i.width=e.width[t]),e.style&&e.style[t]&&(i.style=e.style[t]),e.color&&e.color[t]&&(i.color=e.color[t]),i}function Jh(e){const t={},i=Uh(e);for(const e of i)Ah(e)||/thin|medium|thick/.test(e)?t.width=e:Eh(e)?t.style=e:t.color=e;return t}function Qh(e){return t=>ed(t,e)}function ed(e,t){const i=[];if(e&&e.width&&i.push("width"),e&&e.style&&i.push("style"),e&&e.color&&i.push("color"),3==i.length){const n=i.map(t=>e[t]).join(" ");return["all"==t?["border",n]:[`border-${t}`,n]]}return"all"==t?[]:i.map(i=>[`border-${t}-${i}`,e[i]])}function td(e){e.setNormalizer("margin",Hh("margin")),e.setNormalizer("margin-top",e=>({path:"margin.top",value:e})),e.setNormalizer("margin-right",e=>({path:"margin.right",value:e})),e.setNormalizer("margin-bottom",e=>({path:"margin.bottom",value:e})),e.setNormalizer("margin-left",e=>({path:"margin.left",value:e})),e.setReducer("margin",zh("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function id(e){e.setNormalizer("padding",Hh("padding")),e.setNormalizer("padding-top",e=>({path:"padding.top",value:e})),e.setNormalizer("padding-right",e=>({path:"padding.right",value:e})),e.setNormalizer("padding-bottom",e=>({path:"padding.bottom",value:e})),e.setNormalizer("padding-left",e=>({path:"padding.left",value:e})),e.setReducer("padding",zh("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}const nd="[",rd="]",od="{",sd="}",ad={container:Ws,attribute:ca,empty:da,ui:pa,raw:ga},ld={setContentOf:(e,t)=>{e.innerHTML=t}};function cd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e instanceof fl))throw new TypeError("View needs to be an instance of module:engine/view/view~View.");const i=e.document,n=!!t.withoutSelection,r=t.rootName||"main",o=i.getRoot(r),s={showType:t.showType,showPriority:t.showPriority,renderUIElements:t.renderUIElements,renderRawElements:t.renderRawElements,ignoreRoot:!0,domConverter:t.domConverter};
1return n?cd._stringify(o,null,s):cd._stringify(o,i.selection,s)}function ud(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(e instanceof fl))throw new TypeError("View needs to be an instance of module:engine/view/view~View.");const n=e.document,r=i.rootName||"main",o=n.getRoot(r);e.change(e=>{const i=ud._parse(t,{rootElement:o});i.view&&i.selection&&e.setSelection(i.selection)})}function hd(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=i instanceof Xs||i instanceof Ks?new ea(i):i,new pd(e,t,n).stringify()}function dd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new la(new Fs);t.order=t.order||[];const n=new fd({sameSelectionCharacters:t.sameSelectionCharacters}),r=new Kc(i,{namespaces:Object.keys(ad)});t.inlineObjectElements&&r.domConverter.inlineObjectElements.push(...t.inlineObjectElements);let o=r.toView(e);if(o=md(o),t.rootElement){const e=t.rootElement,i=o._removeChildren(0,o.childCount);e._removeChildren(0,e.childCount),e._appendChild(i),o=e}const s=n.parse(o,t.order);return o.is("documentFragment")&&1===o.childCount&&(o=o.getChild(0)),s.length?{view:o,selection:new ea(s,{backward:!!t.lastRangeBackward})}:(o.parent&&o._remove(),o)}cd._stringify=hd,ud._parse=dd;class fd{sameSelectionCharacters;_positions;constructor(e){this.sameSelectionCharacters=!!e.sameSelectionCharacters}parse(e,t){this._positions=[],this._getPositions(e);let i=this._createRanges();if(t.length){if(t.length!=i.length)throw new Error(`Parse error - there are ${i.length} ranges found, but ranges order array contains ${t.length} elements.`);i=this._sortRanges(i,t)}return i}_getPositions(e){if(e.is("documentFragment")||e.is("element")){const t=[...e.getChildren()];for(const e of t)this._getPositions(e)}if(e.is("$text")){const t=new RegExp(`[${od}${sd}\\${rd}\\${nd}]`,"g");let i,n=e.data,r=0;const o=[];for(;i=t.exec(n);){const e=i.index,t=i[0];o.push({bracket:t,textOffset:e-r}),r++}n=n.replace(t,""),e._data=n;const s=e.index,a=e.parent;n||e._remove();for(const t of o)if(n)if(this.sameSelectionCharacters||!this.sameSelectionCharacters&&(t.bracket==od||t.bracket==sd))this._positions.push({bracket:t.bracket,position:new Xs(e,t.textOffset)});else{if(!this.sameSelectionCharacters&&0!==t.textOffset&&t.textOffset!==n.length)throw new Error(`Parse error - range delimiter '${t.bracket}' is placed inside text node.`);const e=0===t.textOffset?s:s+1;this._positions.push({bracket:t.bracket,position:new Xs(a,e)})}else{if(!this.sameSelectionCharacters&&t.bracket==od||t.bracket==sd)throw new Error(`Parse error - text range delimiter '${t.bracket}' is placed inside empty text node. `);this._positions.push({bracket:t.bracket,position:new Xs(a,s)})}}}_sortRanges(e,t){const i=[];let n=0;for(const r of t){if(void 0===e[r-1])throw new Error("Parse error - provided ranges order is invalid.");i[r-1]=e[n],n++}return i}_createRanges(){const e=[];let t=null;for(const i of this._positions){if(!t&&(i.bracket==rd||i.bracket==sd))throw new Error(`Parse error - end of range was found '${i.bracket}' but range was not started before.`);if(t&&(i.bracket==nd||i.bracket==od))throw new Error(`Parse error - start of range was found '${i.bracket}' but one range is already started.`);i.bracket==nd||i.bracket==od?t=new Ks(i.position,i.position):(t.end=i.position,e.push(t),t=null)}if(null!==t)throw new Error("Parse error - range was started but no end delimiter was found.");return e}}class pd{root;selection;ranges;showType;showPriority;showAttributeElementId;ignoreRoot;sameSelectionCharacters;renderUIElements;renderRawElements;domConverter;constructor(e,t,i){this.root=e,this.selection=t,this.ranges=[],t&&(this.ranges=[...t.getRanges()]),this.showType=!!i.showType,this.showPriority=!!i.showPriority,this.showAttributeElementId=!!i.showAttributeElementId,this.ignoreRoot=!!i.ignoreRoot,this.sameSelectionCharacters=!!i.sameSelectionCharacters,this.renderUIElements=!!i.renderUIElements,this.renderRawElements=!!i.renderRawElements,this.domConverter=i.domConverter||ld}stringify(){let e="";return this._walkView(this.root,t=>{e+=t}),e}_walkView(e,t){const i=this.ignoreRoot&&this.root===e;if(e.is("element")||e.is("documentFragment")){if(e.is("element")&&!i&&t(this._stringifyElementOpen(e)),this.renderUIElements&&e.is("uiElement"))t
1(e.render(document,this.domConverter).innerHTML);else if(this.renderRawElements&&e.is("rawElement")){const i=document.createElement("div");e.render(i,this.domConverter),t(i.innerHTML)}else{let i=0;t(this._stringifyElementRanges(e,i));for(const n of e.getChildren())this._walkView(n,t),i++,t(this._stringifyElementRanges(e,i))}e.is("element")&&!i&&t(this._stringifyElementClose(e))}e.is("$text")&&t(this._stringifyTextRanges(e))}_stringifyElementRanges(e,t){let i="",n="",r="";for(const o of this.ranges)o.start.parent==e&&o.start.offset===t&&(o.isCollapsed?r+=nd+rd:i+=nd),o.end.parent!==e||o.end.offset!==t||o.isCollapsed||(n+=rd);return n+r+i}_stringifyTextRanges(e){const t=e.data.length,i=e.data.split("");let n,r;this.sameSelectionCharacters?(n=nd,r=rd):(n=od,r=sd),i[t]="";const o=i.map(e=>({letter:e,start:"",end:"",collapsed:""}));for(const i of this.ranges){const s=i.start,a=i.end;s.parent==e&&s.offset>=0&&s.offset<=t&&(i.isCollapsed?o[a.offset].collapsed+=n+r:o[s.offset].start+=n),a.parent==e&&a.offset>=0&&a.offset<=t&&!i.isCollapsed&&(o[a.offset].end+=r)}return o.map(e=>e.end+e.collapsed+e.start+e.letter).join("")}_stringifyElementOpen(e){const t=this._stringifyElementPriority(e),i=this._stringifyElementId(e);return`<${[[this._stringifyElementType(e),e.name].filter(e=>""!==e).join(":"),t,i,this._stringifyElementAttributes(e)].filter(e=>""!==e).join(" ")}>`}_stringifyElementClose(e){return`</${[this._stringifyElementType(e),e.name].filter(e=>""!==e).join(":")}>`}_stringifyElementType(e){if(this.showType)for(const t in ad)if(e instanceof ad[t])return t;return""}_stringifyElementPriority(e){return this.showPriority&&e.is("attributeElement")?`view-priority="${e.priority}"`:""}_stringifyElementId(e){return this.showAttributeElementId&&e.is("attributeElement")&&e.id?`view-id="${e.id}"`:""}_stringifyElementAttributes(e){const t=[],i=[...e.getAttributeKeys()].sort();for(const n of i){let i;i="class"===n?[...e.getClassNames()].sort().join(" "):"style"===n?[...e.getStyleNames()].sort().map(t=>`${t}:${e.getStyle(t).replace(/"/g,""")}`).join(";"):e.getAttribute(n),t.push(`${n}="${i}"`)}return t.join(" ")}}function md(e){if(e.is("element")||e.is("documentFragment")){const t=e.is("documentFragment")?new ba(e.document):function(e,t){const i=function(e){const t=e.name.split(":"),i=function(e){const t=parseInt(e,10);return isNaN(t)?null:t}(e.getAttribute("view-priority")),n=e.hasAttribute("view-id")?e.getAttribute("view-id"):null;if(e._removeAttribute("view-priority"),e._removeAttribute("view-id"),1==t.length)return{name:t[0],type:null!==i?"attribute":null,priority:i,id:n};const r=function(e){return e in ad?e:null}(t[0]);if(r)return{name:t[1],type:r,priority:i,id:n};throw new Error(`Parse error - cannot parse element's name: ${e.name}.`)}(t),n=ad[i.type],r=n?new n(e,i.name):new Hs(e,i.name);r.is("attributeElement")&&(null!==i.priority&&(r._priority=i.priority),null!==i.id&&(r._id=i.id));for(const e of t.getAttributeKeys())r._setAttribute(e,t.getAttribute(e));return r}(e.document,e);for(const i of[...e.getChildren()]){if(t.is("emptyElement"))throw new Error("Parse error - cannot parse inside EmptyElement.");if(t.is("uiElement"))throw new Error("Parse error - cannot parse inside UIElement.");if(t.is("rawElement"))throw new Error("Parse error - cannot parse inside RawElement.");t._appendChild(md(i))}return t}return e}function gd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e instanceof dh))throw new TypeError("Model needs to be an instance of module:engine/model/model~Model.");const i=t.rootName||"main",n=e.document.getRoot(i);return gd._stringify(n,t.withoutSelection?null:e.document.selection,t.convertMarkers?e.markers:null)}function vd(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(e instanceof dh))throw new TypeError("Model needs to be an instance of module:engine/model/model~Model.");let n,r=null;const o=e.document.getRoot(i.rootName||"main"),s=vd._parse(t,e.schema,{lastRangeBackward:i.lastRangeBackward,selectionAttributes:i.selectionAttributes,context:[o.name],inlineObjectElements:i.inlineObjectElements});function a(t){if(t.remove(t.createRangeIn(o)),t.insert(n,o),t.setSelection(null),t.removeSelectionAttribute(e.document.selection.getAttributeKeys()),r){const e=[];for(const t of r.getRanges()){const i=new bl(o,t.start.path),n=new bl(o,t.end.path);e.push(new Cl(i,n))}t.setSelection(e,{backward:r.isBackward}),i.selectionAttributes&&t.setSelectionAttribute(r.getAttributes())}}"model"in s?(n=s.model,r=s.selection):n=s,void 0!==i.batchType?e.enqueueChange(i.batchType,a):e.change(a)}function bd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=new dh,r=new Sl;let o,s=null;if(e instanceof zu||e instanceof qu)o=n.createRangeIn(e);else if(e.parent)o=new Cl(n.createPositionBefore(e),n.createPositionAfter(e));else{const t=new qu(e);o=n.createRangeIn(t)}t instanceof Dl||t instanceof Wl?s=t:(t instanceof Cl||t instanceof bl)&&(s=new Dl(t));const a=new Fs,l=new fl(a),c=l.document,u=new Ys(c,"div");u.rootName="main",c.roots.add(u);const h=new Al({mapper:r,schema:n.schema});r.bindElements(e.root,u),h.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(r,o)}),h.on("insert",(e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)},{priority:"lowest"}),h.on("attribute",(e,t,i)=>{if(t.item instanceof Dl||t.item instanceof Wl||t.item.is("$textProxy")){const n=Jl
1((e,i)=>{let{writer:n}=i;return n.createAttributeElement("model-text-with-attributes",{[t.attributeKey]:kd(e)})});n(e,t,i)}}),h.on("insert",Ql(e=>{const t=xd(e.getAttributes(),kd);return new Ws(c,e.name,t)})),h.on("selection",(e,t,i)=>{const n=t.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const r=[];for(const e of n.getRanges())r.push(i.mapper.toViewRange(e));i.writer.setSelection(r,{backward:n.isBackward})}),h.on("selection",(e,t,i)=>{const n=t.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const r=i.writer,o=n.getFirstPosition(),s=i.mapper.toViewPosition(o),a=r.breakAttributes(s);r.setSelection(a)}),h.on("addMarker",ec((e,t)=>{let{writer:i}=t;const n=e.markerName+":"+(e.isOpening?"start":"end");return i.createUIElement(n)}));const d=new Map;if(i)for(const e of Array.from(i).sort((e,t)=>e.name<t.name?1:-1))d.set(e.name,e.getRange());const f=l._writer;h.convert(o,d,f),s&&h.convertSelection(s,i||n.markers,f);let p=hd(u,c.selection,{sameSelectionCharacters:!0});return p=p.substr(5,p.length-11),l.destroy(),p.replace(new RegExp("model-text-with-attributes","g"),"$text")}function yd(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new Sl,r=dd(e=e.replace(new RegExp("\\$text","g"),"model-text-with-attributes"),{sameSelectionCharacters:!0,lastRangeBackward:!!i.lastRangeBackward,inlineObjectElements:i.inlineObjectElements});let o,s=null,a=null;"view"in r&&"selection"in r?(o=r.view,s=r.selection):o=r;const l=new dh,c=new Wc({schema:t});c.on("documentFragment",function(e){return(t,i,n)=>{const r=n.convertChildren(i.viewItem,i.modelCursor);e.bindElements(i.modelCursor.parent,i.viewItem),i=Object.assign(i,r),t.stop()}}(n)),c.on("element:model-text-with-attributes",wd()),c.on("element",function(e){return(t,i,n)=>{const r=i.viewItem.name;if(!n.schema.checkChild(i.modelCursor,r))throw new Error(`Element '${r}' was not allowed in given position.`);const o=xd(i.viewItem.getAttributes(),_d),s=n.writer.createElement(i.viewItem.name,o);n.writer.insert(s,i.modelCursor),e.bindElements(s,i.viewItem),n.convertChildren(i.viewItem,s),i.modelRange=Cl._createOn(s),i.modelCursor=i.modelRange.end,t.stop()}}(n)),c.on("text",wd());let u=l.change(e=>c.convert(o.root,e,i.context||"$root"));if(n.bindElements(u,o.root),1==u.childCount&&(u=u.getChild(0)),s){const e=[];for(const t of s.getRanges())e.push(n.toModelRange(t));a=new Dl(e,{backward:s.isBackward});for(const[e,t]of Qo(i.selectionAttributes||[]))a.setAttribute(e,t)}return a?{model:u,selection:a}:u}function wd(){return(e,t,i)=>{if(!i.schema.checkChild(t.modelCursor,"$text"))throw new Error("Text was not allowed in given position.");let n;if(t.viewItem.is("element")){const e=xd(t.viewItem.getAttributes(),_d),r=t.viewItem.getChild(0);n=i.writer.createText(r.data,e)}else n=i.writer.createText(t.viewItem.data);i.writer.insert(n,t.modelCursor),t.modelRange=Cl._createFromPositionAndShift(t.modelCursor,n.offsetSize),t.modelCursor=t.modelRange.end,e.stop()}}function _d(e){try{return JSON.parse(e)}catch(t){return e}}function kd(e){return Vt(e)?JSON.stringify(e):e}function*xd(e,t){for(const[i,n]of e)yield[i,t(n)]}gd._stringify=bd,vd._parse=yd;class Cd{crashes=[];state="initializing";_crashNumberLimit;_now=Date.now;_minimumNonErrorTimePeriod;_boundErrorHandler;_listeners;constructor(e){if(this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter(e=>e!==t)}_fire(e){const t=this._listeners[e]||[];for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(const e of t)e.apply(this,[null,...n])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const i=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:i}),i?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){return this.crashes.length<=this._crashNumberLimit||(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function Sd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;const i=[e],n=new Set;let r=0;for(;i.length>r;){const o=i[r++];if(!n.has(o)&&Ed(o)&&!t.has(o))if(n.add(o),Symbol.iterator in o)try{for(const e of o)i.push(e)}catch(e){}else for(const e in o)"defaultValue"!==e&&i.push(o[e])}return n}function Ed(e){const t=Object.prototype.toString.call(e),i=typeof e;return!("number"===i||"boolean"===i||"string"===i||"symbol"===i||"function"===i||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function Td(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if(e===t&&"object"==typeof(n=e)&&null!==n)return!0;var n;const r=Sd(e,i),o=Sd(t,i);for(const e of r)if(o.has(e))return!0;return!1}i.Watchdog=Cd;class Ad extends Cd{_editor=null;_lifecyclePromise=null;_throttledSave;_data;_lastDocumentVersion;_elementOrData;_initUsingData=!0;_editables={};_config;_excludedProps;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t),this._throttledSave=yr(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,i)=>e.create(t,i)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(e=>{console.error("An error happened during the editor destroying.",e)}).then(()=>{const e={},t=[],i=this._config.rootsAttributes||{},n={};for(const[r,o]of Object.entries(this._data.roots))o.isLoaded?(e[r]="",n[r]=i[r]||{}):t.push(r);const r={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:n,_watchdogInitialData:this._data};return delete r.initialData,r.extraPlugins.push(Id),this._initUsingData?this.create(e,r,r.context):fr(this._elementOrData)?this.create(this._elementOrData,r,r.context):this.create(this._editables,r,r.context)}).then(()=>{this._fire("restart")})}create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._elementOrData,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._config,i=arguments.length>2?arguments[2]:void 0;return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=i,this._creator(e,this._config))).then(e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")}).finally(()=>{this._lifecyclePromise=null}),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())).finally(()=>{this._lifecyclePromise=null}),this._lifecyclePromise}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)})}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter(e=>e.isAttached()&&"$graveyard"!=e.rootName),{plugins:i}=e,n=i.has("CommentsRepository")&&i.get("CommentsRepository"),r=i.has("TrackChanges")&&i.get("TrackChanges"),o={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};
1t.forEach(e=>{o.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}});for(const t of e.model.markers)t._affectsData&&(o.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return n&&(o.commentThreads=JSON.stringify(n.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),r&&(o.suggestions=JSON.stringify(r.getSuggestions({toJSON:!0,skipNotAttached:!0}))),o}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const i=this.editor.ui.getEditableElement(t);i&&(e[t]=i)}return e}_isErrorComingFromThisItem(e){return Td(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return Tn(e,(e,t)=>fr(e)||"context"===t?e:void 0)}}i.EditorWatchdog=Ad;class Id{editor;_data;constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},e=>{this._restoreCollaborationData(),this._restoreEditorData(e)}),this.editor.data.fire("ready")},{priority:999})}_createNode(e,t){if("name"in t){const i=e.createElement(t.name,t.attributes);if(t.children)for(const n of t.children)i._appendChild(this._createNode(e,n));return i}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach(i=>{let[n,{content:r,attributes:o}]=i;const s=JSON.parse(r),a=JSON.parse(o),l=t.model.document.getRoot(n);for(const[t,i]of a)e.setAttribute(t,i,l);for(const t of s){const i=this._createNode(e,t);e.insert(i,l,"end")}}),Object.entries(this._data.markers).forEach(i=>{let[n,r]=i;const{document:o}=t.model,{rangeJSON:{start:s,end:a},...l}=r,c=o.getRoot(s.root),u=e.createPositionFromPath(c,s.path,s.stickiness),h=e.createPositionFromPath(c,a.path,a.stickiness),d=e.createRange(u,h);e.addMarker(n,{range:d,...l})})}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach(e=>{const t=this.editor.config.get("collaboration.channelId"),i=this.editor.plugins.get("CommentsRepository");i.hasCommentThread(e.threadId)&&i.getCommentThread(e.threadId).remove(),i.addCommentThread({channelId:t,...e})}),t.forEach(e=>{const t=this.editor.plugins.get("TrackChangesEditing");t.hasSuggestion(e.id)?t.getSuggestion(e.id).attributes=e.attributes:t.addSuggestionData(e)})}}const Md=Symbol("MainQueueId");class Pd extends Cd{_watchdogs=new Map;_watchdogConfig;_context=null;_contextProps=new Set;_actionQueues=new Dd;_contextConfig;_item;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t),this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty(()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))})}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._actionQueues.enqueue(Md,()=>(this._contextConfig=e,this._create()))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=Od(e);return Promise.all(t.map(e=>this._actionQueues.enqueue(e.id,()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new Ad(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",(i,n)=>{let{error:r,causesRestart:o}=n;this._fire("itemError",{itemId:e.id,error:r}),o&&this._actionQueues.enqueue(e.id,()=>new Promise(i=>{const n=()=>{t.off("restart",n),this._fire("itemRestart",{itemId:e.id}),i()};t.on("restart",n)}))}),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))}remove(e){const t=Od(e);return Promise.all(t.map(e=>this._actionQueues.enqueue(e,()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))}destroy(){return this._actionQueues.enqueue(Md,()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueues.enqueue(Md,()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(e=>{console.error("An error happened during destroying the context or items.",e)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(e=>(this._context=e,this._contextProps=Sd(this._context),Promise.all(Array.from(this._watchdogs.values()).map(e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(e=>e.destroy())).then(()=>this._destructor(e))})}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return Td(this._context,e.context)}}
1i.ContextWatchdog=Pd;class Dd{_onEmptyCallbacks=[];_queues=new Map;_activeActions=0;onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const i=e===Md;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const n=(i?Promise.all(this._queues.values()):Promise.all([this._queues.get(Md),this._queues.get(e)])).then(t),r=n.catch(()=>{});return this._queues.set(e,r),n.finally(()=>{this._activeActions--,this._queues.get(e)===r&&0===this._activeActions&&this._onEmptyCallbacks.forEach(e=>e())})}}function Od(e){return Array.isArray(e)?e:[e]}class Ld{_commands;constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e){const t=this.get(e);if(!t)throw new v("commandcollection-command-not-found",this,{commandName:e});for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];return t.execute(...n)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class Rd extends Jo{editor;constructor(e){super(),this.editor=e}set(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}const Bd="contentEditing",Nd="common";class jd{keystrokeInfos=new Map;_editor;constructor(e){this._editor=e;const t=e.config.get("menuBar.isVisible"),i=e.locale.t;this.addKeystrokeInfoCategory({id:Bd,label:i("Content editing keystrokes"),description:i("These keyboard shortcuts allow for quick access to content editing features.")});const n=[{label:i("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:i("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:i("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:i("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:i("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:i("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&n.push({label:i("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:i("User interface and content navigation keystrokes"),description:i("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:n}]})}addKeystrokeInfoCategory(e){let{id:t,label:i,description:n,groups:r}=e;this.keystrokeInfos.set(t,{id:t,label:i,description:n,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:t,id:Nd}),r&&r.forEach(e=>{this.addKeystrokeInfoGroup({categoryId:t,...e})})}addKeystrokeInfoGroup(e){let{categoryId:t=Bd,id:i,label:n,keystrokes:r}=e;const o=this.keystrokeInfos.get(t);if(!o)throw new v("accessibility-unknown-keystroke-info-category",this._editor,{groupId:i,categoryId:t});o.groups.set(i,{id:i,label:n,keystrokes:r||[]})}addKeystrokeInfos(e){let{categoryId:t=Bd,groupId:i=Nd,keystrokes:n}=e;if(!this.keystrokeInfos.has(t))throw new v("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:t,keystrokes:n});const r=this.keystrokeInfos.get(t);if(!r.groups.has(i))throw new v("accessibility-unknown-keystroke-info-group",this._editor,{groupId:i,categoryId:t,keystrokes:n});r.groups.get(i).keystrokes.push(...n)}}function Fd(e){return Object.getPrototypeOf(e).constructor.editorName}function zd(e){if(!e)return;const t=Array.isArray(e)?{items:e}:e,i=function e(t){return t.flatMap(t=>"string"==typeof t?[t]:e(t.items))}(t.items||[]);return{isMultiline:i.includes("-"),shouldNotGroupWhenFull:!!t.shouldNotGroupWhenFull,items:(n=i,n.filter(e=>"|"!==e&&"-"!==e))};var n}function Vd(){let e="unknown",t="unknown";return s.isMac?e="mac":s.isWindows?e="windows":s.isiOS?e="ios":s.isAndroid&&(e="android"),s.isGecko?t="gecko":s.isBlink?t="blink":s.isSafari&&(t="safari"),{os:e,browser:t}}class Hd extends(Er()){static get editorName(){return"Editor"}accessibility;commands;config;conversion;data;editing;locale;model;plugins;keystrokes;t;static defaultConfig;static builtinPlugins;_context;_readOnlyLocks;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super(),"sanitizeHtml"in e)throw new v("editor-config-sanitizehtml-not-supported");const t=this.constructor,{translations:i,...n}=t.defaultConfig||{},{translations:r=i,...o}=e,s=e.language||n.language;this._context=e.context||new ws({language:s,translations:r}),this._context._addEditor(this,!e.context);const a=Array.from(t.builtinPlugins||[]);this.config=new jr(o,n),this.config.define("plugins",a),this.config.define(this._context._getEditorConfig()),function(e){let t=e.get("licenseKey");if(!t&&window.CKEDITOR_GLOBAL_LICENSE_KEY&&(t=window.CKEDITOR_GLOBAL_LICENSE_KEY,e.set("licenseKey",t)),!t)throw new v("license-key-missing")}(this.config),this.plugins=new ys(this,a,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new Ld,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new dh,this.on("change:isReadOnly",()=>{this.model.document.isReadOnly=this.isReadOnly});const l=new Fs;this.data=new qc(this.model,l),this.editing=new Sc(this.model,l),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Yc([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new Rd(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new jd(this),function(e){const t=e.config.get("licenseKey"),i=window[Symbol.for("cke distribution")]||"sh";function n(t){e.enableReadOnlyMode(Symbol("invalidLicense")),e._showLicenseError(t)}if("GPL"==t)return void("cloud"==i&&n("distributionChannel"));const r=function(e){const t=e.split(".");return 3!=t.length?null:t[1]}(t);if(!r)return void n("invalid");const o=os(r);if(!o)return void n("invalid");if(!function(e){return["exp","jti","vc"].every(t=>t in e)}(o))return void n("invalid");if(o.distributionChannel&&!Uo(o.distributionChannel).includes(i))return void n("distributionChannel");
1if(ss(function(e){return Object.getOwnPropertyNames(e).sort().filter(t=>"vc"!=t&&null!=e[t]).map(t=>e[t])}(o))!=o.vc.toLowerCase())return void n("invalid");if(new Date(1e3*o.exp)<x)return void n("expired");const s=o.licensedHosts;if(s&&s.length>0&&!function(e){const{hostname:t}=new URL(window.location.href);if(e.includes(t))return!0;const i=t.split(".");return e.filter(e=>e.includes("*")).map(e=>e.split(".")).filter(e=>e.length<=i.length).map(e=>Array(i.length-e.length).fill("*"===e[0]?"*":"").concat(e)).some(e=>i.every((t,i)=>e[i]===t||"*"===e[i]))}(s))n("domainLimit");else if(["evaluation","trial"].includes(o.licenseType)&&1e3*o.exp<Date.now())n("expired");else{if(["evaluation","trial","development"].includes(o.licenseType)){const t=o.licenseType;console.info(`You are using the ${t} version of CKEditor 5 with limited usage. Make sure you will not use it in the production environment.`);const i=setTimeout(()=>{n(`${t}Limit`)},6e5);e.on("destroy",()=>{clearTimeout(i)})}o.usageEndpoint&&e.once("ready",()=>{const i={requestId:p(),requestTime:Math.round(Date.now()/1e3),license:t,editor:Ud(e)};e._sendUsageRequest(o.usageEndpoint,i).then(e=>{const{status:t,message:i}=e;i&&console.warn(i),"ok"!=t&&n("usageLimit")},()=>{y("license-key-validation-endpoint-not-reachable",{url:o.usageEndpoint})})},{priority:"high"})}}(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new v("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new v("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new v("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],n=e.get("extraPlugins")||[],r=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(n),i,r)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(e){try{for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return this.commands.execute(e,...i)}catch(e){v.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(){throw new Error("This is an abstract method.")}static Context=ws;static EditorWatchdog=Ad;static ContextWatchdog=Pd;_showLicenseError(e,t){setTimeout(()=>{if("invalid"==e)throw new v("invalid-license-key");if("expired"==e)throw new v("license-key-expired");
1if("domainLimit"==e)throw new v("license-key-domain-limit");if("featureNotAllowed"==e)throw new v("license-key-plugin-not-allowed",null,{pluginName:t});if("evaluationLimit"==e)throw new v("license-key-evaluation-limit");if("trialLimit"==e)throw new v("license-key-trial-limit");if("developmentLimit"==e)throw new v("license-key-development-limit");if("usageLimit"==e)throw new v("license-key-usage-limit");if("distributionChannel"==e)throw new v("license-key-invalid-distribution-channel")},0),this._showLicenseError=()=>{}}async _sendUsageRequest(e,t){const i=new Headers({"Content-Type":"application/json"}),n=await fetch(new URL(e),{method:"POST",headers:i,body:JSON.stringify(t)});if(!n.ok)throw new Error(`HTTP Response: ${n.status}`);return n.json()}}function Ud(e){const t=function(e){return{sessionId:(localStorage.getItem("__ckeditor-session-id")||localStorage.setItem("__ckeditor-session-id",p()),localStorage.getItem("__ckeditor-session-id")),pageSessionId:(r.window.CKEDITOR_PAGE_SESSION_ID=r.window.CKEDITOR_PAGE_SESSION_ID||p(),r.window.CKEDITOR_PAGE_SESSION_ID),hostname:window.location.hostname,version:globalThis.CKEDITOR_VERSION,type:Fd(e),plugins:(t=e.plugins,Array.from(t).filter(e=>{let[t]=e;return!!t.pluginName}).map(e=>{let[t]=e;const{pluginName:i,isContextPlugin:n,isOfficialPlugin:r,isPremiumPlugin:o}=t;return{isContext:!!n,isOfficial:!!r,isPremium:!!o,name:i}})),distribution:{channel:window[Symbol.for("cke distribution")]||"sh"},env:Vd(),integration:Object.create(null),menuBar:{isVisible:!!e.config.get("menuBar.isVisible")},language:{ui:e.locale.uiLanguage,content:e.locale.contentLanguage},toolbar:{main:zd(e.config.get("toolbar")),block:zd(e.config.get("blockToolbar")),balloon:zd(e.config.get("balloonToolbar"))}};var t}(e);return e.fire("collectUsageData",{setUsageData:function(e,i){if(void 0!==Ot(t,e))throw new v("editor-usage-data-path-already-set",{path:e});gr(t,e,i)}}),t}function Wd(e){if(!le(e.updateSourceElement))throw new v("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let i;const n=t.form,r=()=>e.updateSourceElement();le(n.submit)&&(i=n.submit,n.submit=()=>{r(),i.apply(n)}),n.addEventListener("submit",r),e.on("destroy",()=>{n.removeEventListener("submit",r),i&&(n.submit=i)})}}function $d(e){return class extends e{sourceElement;updateSourceElement(e){if(!this.sourceElement)throw new v("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),i=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!i)return void lo(this.sourceElement,"");const n="string"==typeof e?e:this.data.get();lo(this.sourceElement,n)}}}function Gd(e,t){if(t.ckeditorInstance)throw new v("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",()=>{delete t.ckeditorInstance})}i.Editor=Hd,$d.updateSourceElement=$d(Object).prototype.updateSourceElement;class qd extends _s{_actions;static get pluginName(){return"PendingActions"}static get isOfficialPlugin(){return!0}init(){this.set("hasAny",!1),this._actions=new Go({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new v("pendingactions-add-invalid-message",this);const t=new(Er());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}i.PendingActions=qd;const Yd=i.icons
vendor: 31,093 bytes, line 1
1={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',colorPalette:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',history:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1z"/><path d="M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052z"/><path d="M11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1l4.16-4.482ZM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1h15.6Zm-5.655 6a2.128 2.128 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7Z"/></svg>',imageUpload:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a2.97 2.97 0 0 1-.414-.287 2.998 2.998 0 0 1-1.055-2.03 3.003 3.003 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.134 2.134 0 0 0-1.875-.978Z"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z"/></svg>',imageAssetManager:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.094 2.094 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.133 2.133 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z"/><path clip-rule="evenodd" d="M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.843.843 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.844.844 0 0 1 .247.597Zm-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z"/></svg>',imageUrl:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h7.029a5.401 5.401 0 0 1 .615-4.338l.762-1.232-2.975-2.78a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v6.023c.449.131.887.32 1.307.573l.058.033c.046.028.09.057.135.086V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.15 2.15 0 0 0-1.611.834 2.118 2.118 0 0 0-.438 1.158 2.14 2.14 0 0 0 1.277 2.096 2.132 2.132 0 0 0 2.645-3.11 2.13 2.13 0 0 0-1.873-.978Z"/><path d="M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.647.647 0 0 0-.096.492.664.664 0 0 0 .278.418.7.7 0 0 0 .944-.234 1.741 1.741 0 0 1 2.478-.463 1.869 1.869 0 0 1 .476 2.55.637.637 0 0 0-.071.5.646.646 0 0 0 .309.396.627.627 0 0 0 .869-.19l.027-.041a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.78-.044.066a3.228 3.228 0 0 0 .82 4.403 3.005 3.005 0 0 0 4.275-.798l.13-.197a.626.626 0 0 0 .092-.475.638.638 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.029a1.741 1.741 0 0 1-2.477.461 1.87 1.87 0 0 1-.475-2.55l.029-.047a.647.647 0 0 0 .086-.485.66.66 0 0 0-.275-.408l-.04-.027a.609.609 0 0 0-.845.17Z"/><path d="M15.312 13.925c.24-.36.154-.838-.19-1.067-.346-.23-.82-.124-1.059.236l-1.268 1.907c-.239.36-.153.838.192 1.067.345.23.818.123 1.057-.236l1.268-1.907Z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',textAlternative:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1H3.035Zm10.453 2.61a1.885 1.885 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.903 1.903 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598ZM7.463 8.163a.611.611 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.628.628 0 0 0-.417-.185Zm6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.618.618 0 0 0-.42-.165ZM.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.908.908 0 0 0-.912-.912H.91ZM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516L3.668 13Zm4.947 0h1.801v4.3h2.7v1.4h-4.5V13h-.001Zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9V13h-.001Zm-8.517 1.457-.614 2.059h1.262l-.648-2.059Z"/></svg>',loupe:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.68 13.74h-.001l4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474ZM13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>',previousArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>',nextArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeCustom:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:v="https://vecta.io/nano" viewBox="0 0 20 20"><path d="M.95 1.43a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h.75v6.3H.95a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-.65h1.932l1.539-1.5H5v-.95a.95.95 0 0 0-.95-.95H3.2v-6.3h.85A.95.95 0 0 0 5 5.48v-.55h10v.55a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-3.1a.95.95 0 0 0-.95-.95h-3.1a.95.95 0 0 0-.95.95v1.05H5V2.38a.95.95 0 0 0-.95-.95H.95zm.55 3.5v-2h2v2h-2zm0 9.3v2h2v-2h-2zm15-11.3v2h2v-2h-2z"/><path d="M8.139 20.004v-2.388l7.045-7.048 2.391 2.391-7.046 7.046h-2.39zm11.421-9.101a.64.64 0 0 1-.138.206l-1.165 1.168-2.391-2.391 1.167-1.163a.63.63 0 0 1 .206-.138.635.635 0 0 1 .243-.049.63.63 0 0 1 .449.187l1.491 1.488c.059.059.108.129.138.206s.049.16.049.243a.6.6 0 0 1-.049.243z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2ZM13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7h11Z"/></svg>',objectSizeSmall:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M7 9.5H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2ZM7 11a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4A.5.5 0 0 1 2 11h5Z"/></svg>',objectSizeMedium:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M10 7.5H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2ZM10 9a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6A.5.5 0 0 1 2 9h8Z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',dragIndicator:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>',redo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>',undo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',bulletedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>',numberedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',todoList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',codeBlock:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z"/></svg>',browseFiles:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',heading1:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z"/></svg>',heading2:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z"/></svg>',heading3:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z"/></svg>',heading4:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z"/></svg>',heading5:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z"/></svg>',heading6:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z"/></svg>',horizontalLine:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 9h16v2H2z"/></svg>',html:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2h14zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5l-.001-1.001zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965l-.014-.014zM2 10H1v5h1v-2h2v2h1v-5H4v2H2v-2zm7 0H6v1h1v4h1v-4h1v-1zm8 0h-1v5h3v-1h-2v-4zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5zM10 7v1H4V7h6zm3-2v1H4V5h9zm-3-2v1H4V3h6z"/></svg>',indent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',outdent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>',table:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5.5v3h4v-3H3Zm0 4v3h4v-3H3Zm0 4v3h4v-3H3Zm5 3h4v-3H8v3Zm5 0h4v-3h-4v3Zm4-4v-3h-4v3h4Zm0-4v-3h-4v3h4Zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13.5Zm-6.5-4v-3H8v3h4Zm0-4v-3H8v3h4Z"/></svg>',
vendor: 1,576 bytes, line 1
1remove:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.2 7h9.2c.6 0 1 .4 1 1v9.9c0 .5-.4 1-1 1H5.2a1 1 0 0 1-1-1V8c0-.6.4-1 1-1Zm1 1.5c-.3 0-.5.2-.5.5v8c0 .3.2.5.5.5h.5c.2 0 .5-.2.5-.5V9c0-.3-.3-.5-.5-.5h-.5Zm3.2 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.5Zm3.5 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.5Zm-1.4-7.1H8.3L6.5 3.6H3.8c-.5 0-.7.3-.7.8s.2.7.7.7h12c.6 0 .9-.2.9-.7 0-.5-.3-.8-1-.8h-2.4l-1.8-2.2Z"/></svg>',bookmark:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M5.68 3.417a.238.238 0 0 0-.24.236v12.66l3.793-3.102a1.215 1.215 0 0 1 1.534 0l3.793 3.103V3.654a.238.238 0 0 0-.24-.237H5.68ZM4 3.653C4 2.74 4.752 2 5.68 2h8.64c.928 0 1.68.74 1.68 1.653v13.164c0 1-1.185 1.547-1.967.908L10 14.426l-4.033 3.299c-.782.64-1.967.092-1.967-.908V3.653Z"/></svg>',bookmarkInline:'<svg viewBox="0 0 14 16" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M2 14.436V2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v12.436a.5.5 0 0 1-.819.385l-3.862-3.2a.5.5 0 0 0-.638 0l-3.862 3.2A.5.5 0 0 1 2 14.436Z"/></svg>'};class Zd extends(Er()){total;_reader;_data;constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((i,n)=>{t.onload=()=>{const e=t.result;this._data=e,i(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")}
1,this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}class Xd extends ps{loaders=new Go;_loadersMap=new Map;_pendingAction=null;static get pluginName(){return"FileRepository"}static get isOfficialPlugin(){return!0}static get requires(){return[qd]}init(){this.loaders.on("change",()=>this._updatePendingAction()),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return b("filerepository-no-upload-adapter"),null;const t=new Kd(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof Kd?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,i)=>{e===t&&this._loadersMap.delete(i)})}_updatePendingAction(){const e=this.editor.plugins.get(qd);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,i=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(i(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else e.remove(this._pendingAction),this._pendingAction=null}}i.FileRepository=Xd;class Kd extends(Er()){id;_filePromiseWrapper;_adapter;_reader;constructor(e,t){super(),this.id=p(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Zd,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new v("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e}).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new v("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((i,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,i(e)}).catch(e=>{t.isFulfilled=!0,n(e)})}),t}}i.Base64UploadAdapter=class extends ps{static get requires(){return[Xd]}static get pluginName(){return"Base64UploadAdapter"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(Xd).createUploadAdapter=e=>new Jd(e)}};let Jd=class{loader;reader;constructor(e){this.loader=e}upload(){return new Promise((e,t)=>{const i=this.reader=new window.FileReader;i.addEventListener("load",()=>{e({default:i.result})}),i.addEventListener("error",e=>{t(e)}),i.addEventListener("abort",()=>{t()}),this.loader.file.then(e=>{i.readAsDataURL(e)})})}abort(){this.reader.abort()}};i.SimpleUploadAdapter=class extends ps{static get requires(){return[Xd]}static get pluginName(){return"SimpleUploadAdapter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(Xd).createUploadAdapter=t=>new Qd(t,e):b("simple-upload-adapter-missing-uploadurl"))}};let Qd=class{loader;options;xhr;constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,i){const n=this.xhr,r=this.loader,o=`Couldn't upload file: ${i.name}.`;n.addEventListener("error",()=>t(o)),n.addEventListener("abort",()=>t()),n.addEventListener("load",()=>{const i=n.response;if(!i||i.error)return t(i&&i.error&&i.error.message?i.error.message:o);const r=i.url?{default:i.url}:i.urls;e({...i,urls:r})}),n.upload&&n.upload.addEventListener("progress",e=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)})}_sendRequest(e){const t=this.options.headers||{},i=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=i;const n=new FormData;n.append("upload",e),this.xhr.send(n)}};const ef="ckCsrfToken";i.CKFinderUploadAdapter=class extends ps{static get requires(){return[
1Xd]}static get pluginName(){return"CKFinderUploadAdapter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(Xd).createUploadAdapter=t=>new tf(t,e,this.editor.t))}};class tf{loader;url;t;xhr;constructor(e,t,i){this.loader=e,this.url=t,this.t=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,i){const n=this.xhr,r=this.loader,o=(0,this.t)("Cannot upload file:")+` ${i.name}.`;n.addEventListener("error",()=>t(o)),n.addEventListener("abort",()=>t()),n.addEventListener("load",()=>{const i=n.response;if(!i||!i.uploaded)return t(i&&i.error&&i.error.message?i.error.message:o);e({default:i.url})}),n.upload&&n.upload.addEventListener("progress",e=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",function(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const i of t){const t=i.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(ef);var t,i;return e&&40==e.length||(e=function(){let e="";const t=new Uint8Array(40);window.crypto.getRandomValues(t);for(let i=0;i<t.length;i++){const n="abcdefghijklmnopqrstuvwxyz0123456789".charAt(t[i]%36);e+=Math.random()>.5?n.toUpperCase():n}return e}(),t=ef,i=e,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(i)+";path=/"),e}()),this.xhr.send(t)}}const nf=["left","right","center","justify"];function rf(e){return nf.includes(e)}function of(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function sf(e){const t=e.map(e=>{let t;return t="string"==typeof e?{name:e}:e,t}).filter(e=>{const t=nf.includes(e.name);return t||b("alignment-config-name-not-recognized",{option:e}),t}),i=t.filter(e=>Boolean(e.className)).length;if(i&&i<t.length)throw new v("alignment-config-classnames-are-missing",{configuredOptions:e});return t.forEach((t,i,n)=>{const r=n.slice(i+1);if(r.some(e=>e.name==t.name))throw new v("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className&&r.some(e=>e.className==t.className))throw new v("alignment-config-classname-already-defined",{option:t,configuredOptions:e})}),t}const af="alignment";class lf extends gs{refresh(){const e=this.editor.locale,t=qo(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(t)&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor,i=t.locale,n=t.model,r=n.document,o=e.value;n.change(e=>{const t=Array.from(r.selection.getSelectedBlocks()).filter(e=>this._canBeAligned(e)),n=t[0].getAttribute("alignment");of(o,i)||n===o||!o?function(e,t){for(const i of e)t.removeAttribute(af,i)}(t,e):function(e,t,i){for(const n of e)t.setAttribute(af,i,n)}(t,e,o)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,af)}}class cf extends ps{static get pluginName(){return"AlignmentEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("alignment",{options:nf.map(e=>({name:e}))})}init(){const e=this.editor,t=e.locale,i=e.model.schema,n=sf(e.config.get("alignment.options")).filter(e=>rf(e.name)&&!of(e.name,t)),r=n.some(e=>!!e.className);i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),r?e.conversion.attributeToAttribute(function(e){const t={};for(const i of e)t[i.name]={key:"class",value:i.className};return{model:{key:"alignment",values:e.map(e=>e.name)},view:t}}(n)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:i}of e)t[i]={key:"style",value:{"text-align":i}};return{model:{key:"alignment",values:e.map(e=>e.name)}
vendor: 7,366 bytes, line 1
1,view:t}}(n));const o=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"style",value:{"text-align":i}},model:{key:"alignment",value:i}});return t}(n);for(const t of o)e.conversion.for("upcast").attributeToAttribute(t);const s=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"align",value:i},model:{key:"alignment",value:i}});return t}(n);for(const t of s)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new lf(e))}}i.AlignmentEditing=cf;class uf extends Go{_parentElement;constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{idProperty:"viewUid"}),this.on("add",(e,t,i)=>{this._renderViewIntoCollectionParent(t,i)}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!t.length||!t.every(e=>"string"==typeof e))throw new v("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const i of this)for(const n of t)i.delegate(n).to(e);this.on("add",(i,n)=>{for(const i of t)n.delegate(i).to(e)}),this.on("remove",(i,n)=>{for(const i of t)n.stopDelegating(i,e)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}i.ViewCollection=uf;class hf extends(A()){ns;tag;text;attributes;children;eventListeners;_isRendered;_revertData;constructor(e){super(),Object.assign(this,_f(wf(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new v("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const i of t.children)Tf(i)?yield i:Af(i)&&(yield*e(i))}(this)}static bind(e,t){return{to:(i,n)=>new ff({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n}),if:(i,n,r)=>new pf({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:r})}}static extend(e,t){if(e._isRendered)throw new v("template-extend-render",[this,e]);Sf(e,_f(wf(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new v("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),mf(this.text)?this._bindToObservable({schema:this.text,updater:vf(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,i=e.revertData;for(const n in this.attributes){const r=t.getAttribute(n),o=this.attributes[n];i&&(i.attributes[n]=r);const s=Mf(o)?o[0].ns:null;if(mf(o)){const a=Mf(o)?o[0].value:o;i&&Pf(n)&&a.unshift(r),this._bindToObservable({schema:a,updater:bf(t,n,s),data:e})}else if("style"==n&&"string"!=typeof o[0])this._renderStyleAttribute(o[0],e);else{i&&r&&Pf(n)&&o.unshift(r);const e=o.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(xf,"");Ef(e)||t.setAttributeNS(s,n,e)}}}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const r=e[n];mf(r)?this._bindToObservable({schema:[r],updater:yf(i,n),data:t}):i.style[n]=r}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let r=0;for(const o of this.children)if(If(o)){if(!n){o.setParent(t);for(const e of o)i.appendChild(e.element)}}else if(Tf(o))n||(o.isRendered||o.render(),i.appendChild(o.element));else if(Vr(o))i.appendChild(o);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),o._renderNode({intoFragment:!1,node:i.childNodes[r++],isApplying:!0,revertData:t})}else i.appendChild(o.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map(i=>{const[n,r]=t.split("@");return i.activateDomEventListener(n,r,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable(e){let{schema:t,updater:i,data:n}=e;const r=n.revertData;gf(t,i,n);const o=t.filter(e=>!Ef(e)).filter(e=>e.observable).map(e=>e.activateAttributeListener(t,i,n));r&&r.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const i=e;for(const e in t.attributes){const n=t.attributes[e];null===n?i.removeAttribute(e):i.setAttribute(e,n)}for(let e=0;e<t.children.length;++e)this._revertTemplateFromNode(i.childNodes[e],t.children[e])}}i.Template=hf;class df{attribute;observable;emitter;callback;constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,i){const n=()=>gf(e,t,i);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class ff extends df{eventNameOrFunction;constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,i){const n=(e,i)=>{t&&!i.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class pf extends df{valueIfTrue;constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!Ef(super.getValue(e))&&(this.valueIfTrue||!0)}}function mf(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(mf):e instanceof df)}function gf(e,t,i){let{node:n}=i;const r=function(e,t){return e.map(e=>e instanceof df?e.getValue(t):e)}(e,n);let o;o=1==e.length&&e[0]instanceof pf?r[0]:r.reduce(xf,""),Ef(o)?t.remove():t.set(o)}function vf(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function bf(e,t,i){return{set(n){e.setAttributeNS(i,t,n)},remove(){e.removeAttributeNS(i,t)}}}function yf(e,t){return{set(i){e.style[t]=i},remove(){e.style[t]=null}}}function wf(e){return Tn(e,e=>{if(e&&(e instanceof df||Af(e)||Tf(e)||If(e)))return e})}function _f(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=Uo(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)kf(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=Uo(e[t].value)),kf(e,t)}(e.attributes);const t=[];if(e.children)if(If(e.children))t.push(e.children);else for(const i of e.children)Af(i)||Tf(i)||Vr(i)?t.push(i):t.push(new hf(i));e.children=t}return e}function kf(e,t){e[t]=Uo(e[t])}function xf(e,t){return Ef(t)?e:Ef(e)?t:`${e} ${t}`}
1function Cf(e,t){for(const i in t)e[i]?e[i].push(...t[i]):e[i]=t[i]}function Sf(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),Cf(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),Cf(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new v("ui-template-extend-children-mismatch",e);let i=0;for(const n of t.children)Sf(e.children[i++],n)}}function Ef(e){return!e&&0!==e}function Tf(e){return e instanceof Df}function Af(e){return e instanceof hf}function If(e){return e instanceof uf}function Mf(e){return te(e[0])&&e[0].ns}function Pf(e){return"class"==e||"style"==e}class Df extends(Wr(Er())){element;isRendered;locale;t;template;_viewCollections;_unboundChildren;_bindTemplate;constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Go,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,i)=>{i.locale=e,i.t=e&&e.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=hf.bind(this,this)}createCollection(e){const t=new uf(e);return this._viewCollections.add(t),t}registerChild(e){Br(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Br(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new hf(e)}extendTemplate(e){hf.extend(this.template,e)}render(){if(this.isRendered)throw new v("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}function Of(e){let{emitter:t,activator:i,callback:n,contextElements:r,listenerOptions:o}=e;t.listenTo(document,"mousedown",(e,t)=>{if(!i())return;const o="function"==typeof t.composedPath?t.composedPath():[],s="function"==typeof r?r():r;for(const e of s)if(e.contains(t.target)||o.includes(e))return;n()},o)}function Lf(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(){super(...arguments),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function Rf(e){let{view:t}=e;t.listenTo(t.element,"submit",(e,i)=>{i.preventDefault(),t.fire("submit")},{useCapture:!0})}function Bf(e){let{keystrokeHandler:t,focusTracker:i,gridItems:n,numberOfColumns:r,uiLanguageDirection:o}=e;const s="number"==typeof r?()=>r:r;function a(e){return t=>{const r=n.find(e=>e.element===i.focusedElement),o=n.getIndex(r),s=e(o,n);n.get(s).focus(),t.stopPropagation(),t.preventDefault()}}function l(e,t){return e===t-1?0:e+1}function c(e,t){return 0===e?t-1:e-1}t.set("arrowright",a((e,t)=>"rtl"===o?c(e,t.length):l(e,t.length))),t.set("arrowleft",a((e,t)=>"rtl"===o?l(e,t.length):c(e,t.length))),t.set("arrowup",a((e,t)=>{let i=e-s();return i<0&&(i=e+s()*Math.floor(t.length/s()),i>t.length-1&&(i-=s())),i})),t.set("arrowdown",a((e,t)=>{let i=e+s();return i>t.length-1&&(i=e%s()),i}))}i.View=Df;class Nf extends Df{static presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode
1-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",e=>!e),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox"),"aria-hidden":!0}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:i}of Array.from(e.attributes))Nf.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,i);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}i.IconView=Nf;class jf extends Df{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}i.ButtonLabelView=jf;class Ff extends Df{children;labelView;iconView;keystrokeView;_focusDelayed=null;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new jf;super(e);const i=this.bindTemplate,n=p();this.set("_ariaPressed",!1),this.set("_ariaChecked",!1),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${n}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new Nf,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const r={tag:"button",attributes:{class:["ck","ck-button",i.to("class"),i.if("isEnabled","ck-disabled",e=>!e),i.if("isVisible","ck-hidden",e=>!e),i.to("isOn",e=>e?"ck-on":"ck-off"),i.if("withText","ck-button_with-text"),i.if("withKeystroke","ck-button_with-keystroke")],role:i.to("role"),type:i.to("type",e=>e||"button"),tabindex:i.to("tabindex"),"aria-checked":i.to("_ariaChecked"),"aria-pressed":i.to("_ariaPressed"),"aria-label":i.to("ariaLabel"),"aria-labelledby":i.to("ariaLabelledBy"),"aria-disabled":i.if("isEnabled",!0,e=>!e),"data-cke-tooltip-text":i.to("_tooltipString"),"data-cke-tooltip-position":i.to("tooltipPosition")},children:this.children,on:{click:i.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}};this.bind("_ariaPressed").to(this,"isOn",this,"isToggleable",this,"role",(e,t,i)=>!(!t||zf(i))&&String(!!e)),this.bind("_ariaChecked").to(this,"isOn",this,"isToggleable",this,"role",(e,t,i)=>!(!t||!zf(i))&&String(!!e)),s.isSafari&&(this._focusDelayed||(this._focusDelayed=rs(()=>this.focus(),0)),r.on.mousedown=i.to(()=>{this._focusDelayed()}),r.on.mouseup=i.to(()=>{this._focusDelayed.cancel()})),this.setTemplate(r)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new Df;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>No(e))}]}),e}_getTooltipString(e,t,i){return e?"string"==typeof e?e:(i&&(i=No(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}function zf(e){switch(e){case"radio":case"checkbox":case"option":case"switch":case"menuitemcheckbox":case"menuitemradio":return!0;default:return!1}}i.ButtonView=Ff;class Vf extends Df{children;iconView;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e);const i=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",i.to("class")]},children:this.children}),t.icon&&(this.iconView=new Nf,this.iconView.content=t.icon,this.children.add(this.iconView));const n=new Df(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:i.to("label")}]}),this.children.add(n)}}i.FormHeaderView=Vf;class Hf extends(A()){focusables;focusTracker;keystrokeHandler;actions;constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let i=e.actions[t];"string"==typeof i&&(i=[i]);for(const n of i)e.keystrokeHandler.set(n,(e,i)=>{this[t](),i()},e.keystrokeHandlerOptions)}this.on("forwardCycle",()=>this.focusFirst(),{priority:"low"}),this.on("backwardCycle",()=>this.focusLast(),{priority:"low"})}get first(){return this.focusables.find(Uf)||null}get last(){return this.focusables.filter(Uf).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n}),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}chain(e){const t=()=>null===this.current?null:this.focusables.get(this.current);this.listenTo(e,"forwardCycle",e=>{const i=t();this.focusNext(),i!==t()&&e.stop()},{priority:"low"}),this.listenTo(e,"backwardCycle",e=>{const i=t();this.focusPrevious(),i!==t()&&e.stop()},{priority:"low"})}unchain(e){this.stopListening(e)}
1_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const i=this.current;if(null===i)return this[1===e?"first":"last"];let n=this.focusables.get(i),r=(i+t+e)%t;do{const i=this.focusables.get(r);if(Uf(i)){n=i;break}r=(r+t+e)%t}while(r!==i);return n}}function Uf(e){return Wf(e)&&mo(e.element)}function Wf(e){return!(!("focus"in e)||"function"!=typeof e.focus)}function $f(e){return Wf(e)&&"focusCycler"in e&&e.focusCycler instanceof Hf}i.FocusCycler=Hf;class Gf extends Df{children;keystrokes;focusCycler;_focusTracker;_focusables;constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new Jo,this._focusTracker=new Yo,this._focusables=new uf,this.focusCycler=new Hf({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const e=new Ff(this.locale);let i;for(i in e.on("execute",()=>t.onExecute()),t.onCreate&&t.onCreate(e),t)"onExecute"!=i&&"onCreate"!=i&&e.set(i,t[i]);this.children.add(e)}this._updateFocusCyclableItems()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}}class qf extends Df{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}const Yf=i.DialogViewPosition={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},Zf=co("px");class Xf extends(function(e){return class extends e{_onDragBound=this._onDrag.bind(this);_onDragEndBound=this._onDragEnd.bind(this);_lastDraggingCoordinates={x:0,y:0};constructor(){super(...arguments),this.on("render",()=>{this._attachListeners()}),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(r.document,"mouseup",this._onDragEndBound),this.listenTo(r.document,"touchend",this._onDragEndBound),this.listenTo(r.document,"mousemove",this._onDragBound),this.listenTo(r.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(r.document,"mouseup",this._onDragEndBound),this.stopListening(r.document,"touchend",this._onDragEndBound),this.stopListening(r.document,"mousemove",this._onDragBound),this.stopListening(r.document,"touchmove",this._onDragBound)}_onDragStart(e,t){if(!this._isHandleElementPressed(t))return;this._attachDragListeners();let i=0,n=0;t instanceof MouseEvent?(i=t.clientX,n=t.clientY):(i=t.touches[0].clientX,n=t.touches[0].clientY),this._lastDraggingCoordinates={x:i,y:n},this.isDragging=!0}_onDrag(e,t){if(!this.isDragging)return void this._detachDragListeners();let i=0,n=0;t instanceof MouseEvent?(i=t.clientX,n=t.clientY):(i=t.touches[0].clientX,n=t.touches[0].clientY),t.preventDefault(),this.fire("drag",{deltaX:Math.round(i-this._lastDraggingCoordinates.x),deltaY:Math.round(n-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:i,y:n}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(e){return!!this.dragHandleElement&&(this.dragHandleElement===e.target||e.target instanceof HTMLElement&&this.dragHandleElement.contains(e.target))}}}(Df)){parts;headerView;closeButtonView;actionsView;static defaultOffset=15;contentView;keystrokes;focusTracker;wasMoved=!1;_getCurrentDomRoot;_getViewportOffset;_focusables;_focusCycler;constructor(e,t){let{getCurrentDomRoot:i,getViewportOffset:n}=t;super(e);const r=this.bindTemplate,o=e.t;this.set("className",""),this.set("ariaLabel",o("Editor dialog")),this.set("isModal",!1),this.set("position",Yf.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=i,this._getViewportOffset=n,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new Jo,this.focusTracker=new Yo,this._focusables=new uf,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",r.if("isModal","ck-dialog-overlay__transparent",e=>!e),r.if("_isVisible","ck-hidden",e=>!e)],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",r.if("isModal","ck-dialog_modal"),r.to("className")],role:"dialog","aria-label":r.to("ariaLabel"),style:{to
1p:r.to("_top",e=>Zf(e)),left:r.to("_left",e=>Zf(e)),visibility:r.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",(e,t)=>{e.defaultPrevented||(this.fire("close",{source:"escKeyPress"}),t())}),this.on("drag",(e,t)=>{let{deltaX:i,deltaY:n}=t;this.wasMoved=!0,this.moveBy(i,n)}),this.listenTo(r.window,"resize",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.listenTo(r.document,"scroll",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.on("change:_isVisible",(e,t,i)=>{i&&(this._isTransparent=!0,setTimeout(()=>{this.updatePosition(),this._isTransparent=!1,this.focus()},10))}),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView&&!this.isModal?this.headerView.element:null}setupParts(e){let{icon:t,title:i,hasCloseButton:n=!0,content:r,actionButtons:o}=e;i&&(this.headerView=new Vf(this.locale,{icon:t}),n&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=i,this.ariaLabel=i,this.parts.add(this.headerView,0)),r&&(r instanceof Df&&(r=[r]),this.contentView=new qf(this.locale),this.contentView.children.addMany(r),this.parts.add(this.contentView)),o&&(this.actionsView=new Gf(this.locale),this.actionsView.setButtons(o),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const i=this._getViewportRect(),n=this._getDialogRect();e+n.width>i.right&&(e=i.right-n.width),e<i.left&&(e=i.left),t<i.top&&(t=i.top),this._moveTo(e,t)}_moveTo(e,t){this._left=e,this._top=t}moveBy(e,t){this.moveTo(this._left+e,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let t,i=this.position;this._getCurrentDomRoot()?t=this._getVisibleDomRootRect(e):i=Yf.SCREEN_CENTER;const n=Xf.defaultOffset,r=this._getDialogRect();switch(i){case Yf.EDITOR_TOP_SIDE:if(t){const e="ltr"===this.locale.contentLanguageDirection?t.right-r.width-n:t.left+n;this.moveTo(e,t.top+n)}else this._moveOffScreen();break;case Yf.EDITOR_CENTER:t?this.moveTo(Math.round(t.left+t.width/2-r.width/2),Math.round(t.top+t.height/2-r.height/2)):this._moveOffScreen();break;case Yf.SCREEN_CENTER:this.moveTo(Math.round((e.width-r.width)/2),Math.round((e.height-r.height)/2));break;case Yf.EDITOR_TOP_CENTER:t?this.moveTo(Math.round(t.left+t.width/2-r.width/2),t.top+n):this._moveOffScreen();break;case Yf.EDITOR_BOTTOM_CENTER:t?this.moveTo(Math.round(t.left+t.width/2-r.width/2),t.bottom-r.height-n):this._moveOffScreen();break;case Yf.EDITOR_ABOVE_CENTER:t?this.moveTo(Math.round(t.left+t.width/2-r.width/2),t.top-r.height-n):this._moveOffScreen();break;case Yf.EDITOR_BELOW_CENTER:t?this.moveTo(Math.round(t.left+t.width/2-r.width/2),t.bottom+n):this._moveOffScreen()}}_getVisibleDomRootRect(e){let t=new io(this._getCurrentDomRoot()).getVisible();return t?(t=e.getIntersection(t),t||null):null}_getDialogRect(){return new io(this.element.firstElementChild)}_getViewportRect(){const e=new io(r.window);if(this.isModal)return e;const t={top:0,bottom:0,left:0,right:0,...this._getViewportOffset()};return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e.left+=t.left,e.right-=t.right,e.width-=t.left+t.right,e}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const t of this.contentView.children)Wf(t)&&e.push(t);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element),$f(e)&&this._focusCycler.chain(e.focusCycler)})}_createCloseButton(){const e=new Ff(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:Yd.cancel}),e.on("execute",()=>this.fire("close",{source:"closeButton"})),e}}i.DialogView=Xf;class Kf extends ps{view;static _visibleDialogPlugin;_onHide;static get pluginName(){return"Dialog"}static get isOfficialPlugin(){return!0}constructor(e){super(e);const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set({id:null,isOpen:!1}),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}destroy(){super.destroy(),this._unlockBodyScroll()}_initShowHideListeners(){this.on("show",(e,t)=>{this._show(t)}),this.on("show",(e,t)=>{t.onShow&&t.onShow(this)},{priority:"low"}),this.on("hide",()=>{Kf._visibleDialogPlugin&&Kf._visibleDialogPlugin._hide()}),this.on("hide",()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)},{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",(t,i)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),i())})}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",()=>{if(!this.view)return;
1const t=e.document.differ.getChangedRoots();for(const e of t)e.state&&this.view.updatePosition()})}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show(e){let{id:t,icon:i,title:n,hasCloseButton:r=!0,content:o,actionButtons:s,className:a,isModal:l,position:c,onHide:u}=e;const h=this.editor;this.view=new Xf(h.locale,{getCurrentDomRoot:()=>h.editing.view.getDomRoot(h.model.document.selection.anchor.root.rootName),getViewportOffset:()=>h.ui.viewportOffset});const d=this.view;d.on("close",()=>{this.hide()}),h.ui.view.body.add(d),h.keystrokes.listenTo(d.element),c||(c=l?Yf.SCREEN_CENTER:Yf.EDITOR_CENTER),l&&this._lockBodyScroll(),d.set({position:c,_isVisible:!0,className:a,isModal:l}),d.setupParts({icon:i,title:n,hasCloseButton:r,content:o,actionButtons:s}),this.id=t,u&&(this._onHide=u),this.isOpen=!0,Kf._visibleDialogPlugin=this}hide(){Kf._visibleDialogPlugin&&Kf._visibleDialogPlugin.fire(`hide:${Kf._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.isModal&&this._unlockBodyScroll(),t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,Kf._visibleDialogPlugin=null}_lockBodyScroll(){document.documentElement.classList.add("ck-dialog-scroll-locked")}_unlockBodyScroll(){document.documentElement.classList.remove("ck-dialog-scroll-locked")}}i.Dialog=Kf;class Jf extends Ff{_checkIconHolderView=new Qf;constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new jf),this.set({hasCheckSpace:!1,_hasCheck:this.isToggleable});const t=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-list-item-button",t.if("isToggleable","ck-list-item-button_toggleable")]}}),this.bind("_hasCheck").to(this,"hasCheckSpace",this,"isToggleable",(e,t)=>e||t)}render(){super.render(),this._hasCheck&&this.children.add(this._checkIconHolderView,0),this._watchCheckIconHolderMount()}_watchCheckIconHolderMount(){this._checkIconHolderView.bind("isOn").to(this,"isOn",e=>this.isToggleable&&e),this.on("change:_hasCheck",(e,t,i)=>{const{children:n,_checkIconHolderView:r}=this;i?n.add(r,0):n.remove(r)})}}i.ListItemButtonView=Jf;class Qf extends Df{children;_checkIconView=this._createCheckIconView();constructor(){super();const e=this.bindTemplate;this.children=this.createCollection(),this.set("isOn",!1),this.setTemplate({tag:"span",children:this.children,attributes:{class:["ck","ck-list-item-button__check-holder",e.to("isOn",e=>e?"ck-on":"ck-off")]}})}render(){super.render(),this.isOn&&this.children.add(this._checkIconView,0),this._watchCheckIconMount()}_watchCheckIconMount(){this.on("change:isOn",(e,t,i)=>{const{children:n,_checkIconView:r}=this;i&&!n.has(r)?n.add(r):!i&&n.has(r)&&n.remove(r)})}_createCheckIconView(){const e=new Nf;return e.content=Yd.check,e.extendTemplate({attributes:{class:"ck-list-item-button__check-icon"}}),e}}class ep extends Jf{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}i.MenuBarMenuListItemButtonView=ep;class tp extends Df{id;constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${p()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}i.LabelView=tp;class ip extends Df{constructor(e,t){super(e);const i=e.t,n=new tp;n.text=i("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":n.id,role:"document",tabindex:-1},children:[Nr(document,"p",{},i("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(t.values())),n]})}focus(){this.element.focus()}_createCategories(e){return e.map(e=>{const t=[Nr(document,"h3",{},e.label),...Array.from(e.groups.values()).map(e=>this._createGroup(e)).flat()];return e.description&&t.splice(1,0,Nr(document,"p",{},e.description)),Nr(document,"section",{},t)})}_createGroup(e){const t=e.keystrokes.sort((e,t)=>
1e.label.localeCompare(t.label)).map(e=>this._createGroupRow(e)).flat(),i=[Nr(document,"dl",{},t)];return e.label&&i.unshift(Nr(document,"h4",{},e.label)),i}_createGroupRow(e){const t=this.locale.t,i=Nr(document,"dt"),n=Nr(document,"dd"),r=function(e){return"string"==typeof e?[[e]]:"string"==typeof e[0]?[e]:e}(e.keystroke),o=[];for(const e of r)o.push(e.map(np).join(""));return i.innerHTML=e.label,n.innerHTML=o.join(", ")+(e.mayRequireFn&&s.isMac?` ${t("(may require <kbd>Fn</kbd>)")}`:""),[i,n]}}function np(e){return No(e).split("+").map(e=>`<kbd>${e}</kbd>`).join("+")}var rp='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103V9.125Z"/><path clip-rule="evenodd" d="M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Zm0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Z"/></svg>';class op extends ps{contentView=null;static get requires(){return[Kf]}static get pluginName(){return"AccessibilityHelp"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),e}),e.ui.componentFactory.add("menuBar:accessibilityHelp",()=>{const e=this._createButton(ep);return e.label=t("Accessibility"),e}),e.keystrokes.set("Alt+0",(e,t)=>{this._toggleDialog(),t()}),this._setupRootLabels()}_createButton(e){const t=this.editor,i=t.plugins.get("Dialog"),n=new e(t.locale);return n.set({keystroke:"Alt+0",icon:rp,isToggleable:!0}),n.on("execute",()=>this._toggleDialog()),n.bind("isOn").to(i,"id",e=>"accessibilityHelp"===e),n}_setupRootLabels(){const e=this.editor,t=e.editing.view,i=e.t;function n(e,t){const n=[t.getAttribute("aria-label"),i("Press %0 for help.",[No("Alt+0")])].filter(e=>e).join(". ");e.setAttribute("aria-label",n,t)}e.ui.on("ready",()=>{t.change(e=>{for(const i of t.document.roots)n(e,i)}),e.on("addRoot",(i,r)=>{const o=e.editing.view.document.getRoot(r.rootName);t.change(e=>n(e,o))},{priority:"low"})})}_toggleDialog(){const e=this.editor,t=e.plugins.get("Dialog"),i=e.locale.t;this.contentView||(this.contentView=new ip(e.locale,e.accessibility.keystrokeInfos)),"accessibilityHelp"===t.id?t.hide():t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:i("Accessibility help"),icon:rp,hasCloseButton:!0,content:this.contentView})}}i.AccessibilityHelp=op;class sp extends uf{locale;_bodyCollectionContainer;static _bodyWrapper;constructor(e){super(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new hf({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection,role:"application"},children:this}).render(),sp._bodyWrapper&&sp._bodyWrapper.isConnected||(sp._bodyWrapper=Nr(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(sp._bodyWrapper)),sp._bodyWrapper.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove(),sp._bodyWrapper&&!sp._bodyWrapper.childElementCount&&(sp._bodyWrapper.remove(),delete sp._bodyWrapper)}}i.BodyCollection=sp;class ap extends Ff{toggleSwitchView;constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Df;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}i.SwitchButtonView=ap;class lp extends(up(Ff)){}i.FileDialogButtonView=lp;class cp extends(up(Jf)){}function up(e){return class extends e{buttonView;_fileInputView;constructor(){super(...arguments),this.buttonView=this,this._fileInputView=new hp(this.locale),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",()=>{this._fileInputView.open()}),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}}i.FileDialogListItemButtonView=cp;class hp extends Df{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}var dp='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class fp extends Df{buttonView;children;constructor(e,t){super(e);const i=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.i
1d}focus(){this.buttonView.focus()}_createButtonView(){const e=new Ff(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:dp}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",e=>!e),e.on("execute",()=>{this.isCollapsed=!this.isCollapsed}),e}}function pp(e,t){const i=e.t,n={Black:i("Black"),"Dim grey":i("Dim grey"),Grey:i("Grey"),"Light grey":i("Light grey"),White:i("White"),Red:i("Red"),Orange:i("Orange"),Yellow:i("Yellow"),"Light green":i("Light green"),Green:i("Green"),Aquamarine:i("Aquamarine"),Turquoise:i("Turquoise"),"Light blue":i("Light blue"),Blue:i("Blue"),Purple:i("Purple")};return t.map(e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e})}function mp(e){return e.map(gp).filter(e=>!!e)}function gp(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}i.CollapsibleView=fp;class vp extends Ff{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color",e=>s.isMediaForcedColors?null:e)},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}i.ColorTileView=vp;class bp extends Df{columns;items;focusTracker;keystrokes;constructor(e,t){super(e);const i=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new Yo,this.keystrokes=new Jo,this.items.on("add",(e,t)=>{t.isOn=t.color===this.selectedColor}),i.forEach(e=>{const t=new vp;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})}),this.items.add(t)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",(e,t,i)=>{for(const e of this.items)e.isOn=e.color===i})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),Bf({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}i.ColorGridView=bp;var yp={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
1ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},wp={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function _p(e){var t,i,n=[],r=1;if("string"==typeof e)if(yp[e])n=yp[e].slice(),i="rgb";else if("transparent"===e)r=0,i="rgb",n=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1);r=1,(l=o.length)<=4?(n=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],4===l&&(r=parseInt(o[3]+o[3],16)/255)):(n=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],8===l&&(r=parseInt(o[6]+o[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=t[1],a="rgb"===s;i=o=s.replace(/a$/,"");var l="cmyk"===o?4:"gray"===o?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(e,t){if(/%$/.test(e))return t===l?parseFloat(e)/100:"rgb"===o?255*parseFloat(e)/100:parseFloat(e);if("h"===o[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==wp[e])return wp[e]}return parseFloat(e)}),s===o&&n.push(1),r=a||void 0===n[l]?1:n[l],n=n.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(e){return parseFloat(e)}),i=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(n=[e[0],e[1],e[2]],i="rgb",r=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(i="rgb",n=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",n=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),r=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(r/=100)):(i="rgb",n=[e>>>16,(65280&e)>>>8,255&e]);return{space:i,values:n,alpha:r}}const kp=yp,xp={};for(const e of Object.keys(kp))xp[kp[e]]=e;const Cp={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Sp=Cp;for(const e of Object.keys(Cp)){if(!("channels"in Cp[e]))throw new Error("missing channels property: "+e);if(!("labels"in Cp[e]))throw new Error("missing channel labels property: "+e);if(Cp[e].labels.length!==Cp[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:i}=Cp[e];delete Cp[e].channels,delete Cp[e].labels,Object.defineProperty(Cp[e],"channels",{value:t}),Object.defineProperty(Cp[e],"labels",{value:i})}function Ep(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}Cp.rgb.hsl=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,r=Math.min(t,i,n),o=Math.max(t,i,n),s=o-r;let a,l;o===r?a=0:t===o?a=(i-n)/s:i===o?a=2+(n-t)/s:n===o&&(a=4+(t-i)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(r+o)/2;return l=o===r?0:c<=.5?s/(o+r):s/(2-o-r),[a,100*l,100*c]},Cp.rgb.hsv=function(e){let t,i,n,r,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),h=function(e){return(c-e)/6/u+.5};return 0===u?(r=0,o=0):(o=u/c,t=h(s),i=h(a),n=h(l),s===c?r=n-i:a===c?r=1/3+t-n:l===c&&(r=2/3+i-t),r<0?r+=1:r>1&&(r-=1)),[360*r,100*o,100*c]},Cp.rgb.hwb=function(e){const t=e[0],i=e[1];let n=e[2];const r=Cp.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(i,n));return n=1-1/255*Math.max(t,Math.max(i,n)),[r,100*o,100*n]},Cp.rgb.cmyk=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,r=Math.min(1-t,1-i,1-n);return[100*((1-t-r)/(1-r)||0),100*((1-i-r)/(1-r)||0),100*((1-n-r)/(1-r)||0),100*r]},Cp.rgb.keyword=function(e){const t=xp[e];if(t)return t;let i,n=1/0;for(const t of Object.keys(kp)){const r=Ep(e,kp[t]);r<n&&(n=r,i=t)}return i}
vendor: 7,156 bytes, line 1
1,Cp.keyword.rgb=function(e){return kp[e]},Cp.rgb.xyz=function(e){let t=e[0]/255,i=e[1]/255,n=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*t+.3576*i+.1805*n),100*(.2126*t+.7152*i+.0722*n),100*(.0193*t+.1192*i+.9505*n)]},Cp.rgb.lab=function(e){const t=Cp.rgb.xyz(e);let i=t[0],n=t[1],r=t[2];return i/=95.047,n/=100,r/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(i-n),200*(n-r)]},Cp.hsl.rgb=function(e){const t=e[0]/360,i=e[1]/100,n=e[2]/100;let r,o,s;if(0===i)return s=255*n,[s,s,s];r=n<.5?n*(1+i):n+i-n*i;const a=2*n-r,l=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,s=6*o<1?a+6*(r-a)*o:2*o<1?r:3*o<2?a+(r-a)*(2/3-o)*6:a,l[e]=255*s;return l},Cp.hsl.hsv=function(e){const t=e[0];let i=e[1]/100,n=e[2]/100,r=i;const o=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,r*=o<=1?o:2-o,[t,100*(0===n?2*r/(o+r):2*i/(n+i)),(n+i)/2*100]},Cp.hsv.rgb=function(e){const t=e[0]/60,i=e[1]/100;let n=e[2]/100;const r=Math.floor(t)%6,o=t-Math.floor(t),s=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o));switch(n*=255,r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},Cp.hsv.hsl=function(e){const t=e[0],i=e[1]/100,n=e[2]/100,r=Math.max(n,.01);let o,s;s=(2-i)*n;const a=(2-i)*r;return o=i*r,o/=a<=1?a:2-a,o=o||0,s/=2,[t,100*o,100*s]},Cp.hwb.rgb=function(e){const t=e[0]/360;let i=e[1]/100,n=e[2]/100;const r=i+n;let o;r>1&&(i/=r,n/=r);const s=Math.floor(6*t),a=1-n;o=6*t-s,1&s&&(o=1-o);const l=i+o*(a-i);let c,u,h;switch(s){default:case 6:case 0:c=a,u=l,h=i;break;case 1:c=l,u=a,h=i;break;case 2:c=i,u=a,h=l;break;case 3:c=i,u=l,h=a;break;case 4:c=l,u=i,h=a;break;case 5:c=a,u=i,h=l}return[255*c,255*u,255*h]},Cp.cmyk.rgb=function(e){const t=e[0]/100,i=e[1]/100,n=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},Cp.xyz.rgb=function(e){const t=e[0]/100,i=e[1]/100,n=e[2]/100;let r,o,s;return r=3.2406*t+-1.5372*i+-.4986*n,o=-.9689*t+1.8758*i+.0415*n,s=.0557*t+-.204*i+1.057*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[255*r,255*o,255*s]},Cp.xyz.lab=function(e){let t=e[0],i=e[1],n=e[2];return t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*i-16,500*(t-i),200*(i-n)]},Cp.lab.xyz=function(e){let t,i,n;i=(e[0]+16)/116,t=e[1]/500+i,n=i-e[2]/200;const r=i**3,o=t**3,s=n**3;return i=r>.008856?r:(i-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,i*=100,n*=108.883,[t,i,n]},Cp.lab.lch=function(e){const t=e[0],i=e[1],n=e[2];let r;return r=360*Math.atan2(n,i)/2/Math.PI,r<0&&(r+=360),[t,Math.sqrt(i*i+n*n),r]},Cp.lch.lab=function(e){const t=e[0],i=e[1],n=e[2]/360*2*Math.PI;return[t,i*Math.cos(n),i*Math.sin(n)]},Cp.rgb.ansi16=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const[i,n,r]=e;let o=null===t?Cp.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===o&&(s+=60),s},Cp.hsv.ansi16=function(e){return Cp.rgb.ansi16(Cp.hsv.rgb(e),e[2])},Cp.rgb.ansi256=function(e){const t=e[0],i=e[1],n=e[2];return t===i&&i===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},Cp.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const i=.5*(1+~~(e>50));return[(1&t)*i*255,(t>>1&1)*i*255,(t>>2&1)*i*255]},Cp.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},Cp.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},Cp.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let i=t[0];3===t[0].length&&(i=i.split("").map(e=>e+e).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},Cp.rgb.hcg=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,r=Math.max(Math.max(t,i),n),o=Math.min(Math.min(t,i),n),s=r-o;let a,l;return a=s<1?o/(1-s):0,l=s<=0?0:r===t?(i-n)/s%6:r===i?2+(n-t)/s:4+(t-i)/s,l/=6,l%=1,[360*l,100*s,100*a]},Cp.hsl.hcg=function(e){const t=e[1]/100,i=e[2]/100,n=i<.5?2*t*i:2*t*(1-i);let r=0;return n<1&&(r=(i-.5*n)/(1-n)),[e[0],100*n,100*r]},Cp.hsv.hcg=function(e){const t=e[1]/100,i=e[2]/100,n=t*i;let r=0;return n<1&&(r=(i-n)/(1-n)),[e[0],100*n,100*r]},Cp.hcg.rgb=function(e){const t=e[0]/360,i=e[1]/100,n=e[2]/100;if(0===i)return[255*n,255*n,255*n];const r=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return l=(1-i)*n,[255*(i*r[0]+l),255*(i*r[1]+l),255*(i*r[2]+l)]},Cp.hcg.hsv=function(e){const t=e[1]/100,i=t+e[2]/100*(1-t);let n=0;return i>0&&(n=t/i),[e[0],100*n,100*i]},Cp.hcg.hsl=function(e){const t=e[1]/100,i=e[2]/100*(1-t)+.5*t;let n=0;return i>0&&i<.5?n=t/(2*i):i>=.5&&i<1&&(n=t/(2*(1-i))),[e[0],100*n,100*i]},Cp.hcg.hwb=function(e){const t=e[1]/100,i=t+e[2]/100*(1-t);return[e[0],100*(i-t),100*(1-i)]},Cp.hwb.hcg=function(e){const t=e[1]/100,i=1-e[2]/100,n=i-t;let r=0;return n<1&&(r=(i-n)/(1-n)),[e[0],100*n,100*r]},Cp.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Cp.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Cp.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Cp.gray.hsl=function(e){return[0,0,e[0]]},Cp.gray.hsv=Cp.gray.hsl,Cp.gray.hwb=function(e){return[0,100,e[0]]},Cp.gray.cmyk=function(e){return[0,0,0,e[0]]},Cp.gray.lab=function(e){return[e[0],0,0]},Cp.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(i.length)+i},Cp.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Tp=Sp;function Ap(e,t){return function(i){return t(e(i))}}function Ip(e,t){const i=[t[e].parent,e];let n=Tp[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)i.unshift(t[r].parent),n=Ap(Tp[t[r].parent][r],n),r=t[r].parent;return n.conversion=i,n}const Mp=Sp,Pp=function(e){const t=function(e){const t=function(){const e={},t=Object.keys(Tp);for(let i=t.length,n=0;n<i;n++)e[t[n]]={distance:-1,parent:null};return e}(),i=[e];for(t[e].distance=0;i.length;){const e=i.pop(),n=Object.keys(Tp[e]);for(let r=n.length,o=0;o<r;o++){const r=n[o],s=t[r];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,i.unshift(r))}}return t}(e),i={},n=Object.keys(t);for(let e=n.length,r=0;r<e;r++){const e=n[r];null!==t[e].parent&&(i[e]=Ip(e,t))}return i},Dp={};
1Object.keys(Mp).forEach(e=>{Dp[e]={},Object.defineProperty(Dp[e],"channels",{value:Mp[e].channels}),Object.defineProperty(Dp[e],"labels",{value:Mp[e].labels});const t=Pp(e);Object.keys(t).forEach(i=>{const n=t[i];Dp[e][i]=function(e){const t=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];const r=i[0];if(null==r)return r;r.length>1&&(i=r);const o=e(i);if("object"==typeof o)for(let e=o.length,t=0;t<e;t++)o[t]=Math.round(o[t]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}(n),Dp[e][i].raw=function(e){const t=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];const r=i[0];return null==r?r:(r.length>1&&(i=r),e(i))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})});var Op= 2/** 3 * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5 */ 6function(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(i){if("default"!==i&&!(i in e)){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}})}),Object.freeze(e)}({__proto__:null,default:Dp},[Dp]);function Lp(e,t){if(!e)return"";const i=Rp(e);if(!i)return"";if(i.space===t)return e;if(n=i,!Object.keys(Op).includes(n.space))return"";var n;const r=Op[i.space][t];return r?function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb(${e[0]}, ${e[1]}, ${e[2]})`;case"hsl":return`hsl(${e[0]}, ${e[1]}%, ${e[2]}%)`;case"hwb":return`hwb(${e[0]}, ${e[1]}, ${e[2]})`;case"lab":return`lab(${e[0]}% ${e[1]} ${e[2]})`;case"lch":return`lch(${e[0]}% ${e[1]} ${e[2]})`;default:return""}}(r("hex"===i.space?i.hexValue:i.values),t):""}function Rp(e){if(e.startsWith("#")){const t=_p(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=_p(e);return t.space?t:null}class Bp extends Df{fieldView;labelView;statusView;fieldWrapperChildren;constructor(e,t){super(e);const i=`ck-labeled-field-view-${p()}`,n=`ck-labeled-field-view-status-${p()}`;this.fieldView=t(this,i,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);const r=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",r.to("class"),r.if("isEnabled","ck-disabled",e=>!e),r.if("isEmpty","ck-labeled-field-view_empty"),r.if("isFocused","ck-labeled-field-view_focused"),r.if("placeholder","ck-labeled-field-view_placeholder"),r.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new tp(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Df(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",e=>!e)],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}i.LabeledFieldView=Bp;class Np extends Df{focusTracker;constructor(e){var t;super(e),t=this,this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new Yo,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const i=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",i.if("isFocused","ck-input_focused"),i.if("isEmpty","ck-in
6put-text_empty"),i.if("hasError","ck-error")],id:i.to("id"),placeholder:i.to("placeholder"),tabindex:i.to("tabIndex"),readonly:i.to("isReadOnly"),"aria-invalid":i.if("hasError",!0),"aria-describedby":i.to("ariaDescribedById"),"aria-label":i.to("ariaLabel")},on:{input:i.to(function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];t.fire("input",...i),t._updateIsEmpty()}),change:i.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,i)=>{this._setDomElementValue(i),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class jp extends Np{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}i.InputView=jp;class Fp extends jp{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}i.InputTextView=Fp;class zp extends jp{constructor(e){let{min:t,max:i,step:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e);const r=this.bindTemplate;this.set("min",t),this.set("max",i),this.set("step",n),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:r.to("min"),max:r.to("max"),step:r.to("step")}})}}i.InputNumberView=zp;class Vp extends Np{_resizeObserver;_isUpdateAutoGrowHeightPending=!1;constructor(e){super(e);const t=co("px");this.set("minRows",2),this.set("maxRows",5),this.set("_height",null),this.set("resize","none"),this._resizeObserver=null,this.on("change:minRows",this._validateMinMaxRows.bind(this)),this.on("change:maxRows",this._validateMinMaxRows.bind(this));const i=this.bindTemplate;this.template.tag="textarea",this.extendTemplate({attributes:{class:["ck-textarea"],style:{height:i.to("_height",e=>e?t(e):null),resize:i.to("resize")},rows:i.to("minRows")}})}render(){super.render();let e=!1;this.on("input",()=>{this._updateAutoGrowHeight(!0),this.fire("update")}),this.on("change:value",()=>{r.window.requestAnimationFrame(()=>{mo(this.element)?(this._updateAutoGrowHeight(),this.fire("update")):this._isUpdateAutoGrowHeightPending=!0})}),this._resizeObserver=new ao(this.element,t=>{const i=!!t.contentRect.width&&!!t.contentRect.height;!e&&i&&this._isUpdateAutoGrowHeightPending&&r.window.requestAnimationFrame(()=>{this._updateAutoGrowHeight(),this.fire("update")}),e=i})}destroy(){this._resizeObserver&&this._resizeObserver.destroy()}reset(){super.reset(),this._updateAutoGrowHeight(),this.fire("update")}_updateAutoGrowHeight(e){const t=this.element;if(!t.offsetParent)return void(this._isUpdateAutoGrowHeightPending=!0);this._isUpdateAutoGrowHeightPending=!1;const i=Hp(t,"1"),n=Hp(t,t.value),r=i.ownerDocument.defaultView.getComputedStyle(i),o=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),s=Xr(i),a=parseFloat(r.lineHeight),l=s.top+s.bottom,c=new io(i).height,u=Math.round((n.scrollHeight-o)/a),h=this.maxRows*a+o+l,d=1===u?c:this.minRows*a+o+l;this._height=Math.min(Math.max(Math.max(u,this.minRows)*a+o+l,d),h),e&&(t.scrollTop=t.scrollHeight),i.remove(),n.remove()}_validateMinMaxRows(){if(this.minRows>this.maxRows)throw new v("ui-textarea-view-min-rows-greater-than-max-rows",{textareaView:this,minRows:this.minRows,maxRows:this.maxRows})}}function Hp(e,t){const i=e.cloneNode();return i.style.position="absolute",i.style.top="-99999px",i.style.left="-99999px",i.style.height="auto",i.style.overflow="hidden",i.style.width=e.ownerDocument.defaultView.getComputedStyle(e).width,i.tabIndex=-1,i.rows=1,i.value=t,e.parentNode.insertBefore(i,e),i}i.TextareaView=Vp;class Up extends Df{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",e=>`ck-dropdown__panel_${e}`),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to(e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()})}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():b("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}i.DropdownPanelView=Up;class Wp extends Df{buttonView;panelView;focusTracker;keystrokes;listView;toolbarView;menuView;constructor(e,t,i){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Jo,this.focusTracker=new Yo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",e=>!e)],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.on("change:isOpen",(e,t,i)=>{if(i)if("auto"===this.panelPosition){const e=Wp._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._defaultPanelPositionName}else this.panelView.position=this.panelPosition}),this.keystrokes.listenTo(this.element);const e=(e,t)=>
6{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:i,southWest:n,northEast:r,northWest:o,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Wp.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[i,n,s,a,e,r,o,l,c,t]:[n,i,a,s,e,o,r,c,l,t]}get _defaultPanelPositionName(){return"rtl"===this.locale.uiLanguageDirection?"sw":"se"}static defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})};static _getOptimalPosition=go}i.DropdownView=Wp;class $p extends Ff{arrowView;constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",e=>String(e))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Nf;return e.content=dp,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}i.DropdownButtonView=$p;class Gp extends Ff{id;constructor(e,t,i){super(e),this.id=t,this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem",label:i}),this.extendTemplate({attributes:{class:["ck-dropdown-menu-list__nested-menu__item__button"]}})}}i.DropdownMenuListItemButtonView=Gp;class qp extends Jf{arrowView;constructor(e){super(e);const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-dropdown-menu-list__nested-menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",e=>String(e)),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Nf;return e.content=dp,e.extendTemplate({attributes:{class:"ck-dropdown-menu-list__nested-menu__button__arrow"}}),e}}class Yp extends Df{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",e=>!e)],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}i.ListItemView=Yp;class Zp extends Df{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}i.ListSeparatorView=Zp;class Xp extends Df{labelView;items;children;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new tp;super(e);const i=this.bindTemplate,n=new Kp(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,n]),n.set({role:"group",ariaLabelledBy:t.id}),n.focusTracker.destroy(),n.keystrokes.destroy(),this.items=n.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",i.if("isVisible","ck-hidden",e=>!e)]},children:this.children})}focus(){if(this.items){const e=this.items.find(e=>!(e instanceof Zp));e&&e.focus()}}}i.ListItemGroupView=Xp;class Kp extends Df{focusables;items;focusTracker;keystrokes;_focusCycler;_listItemGroupToChangeListeners=new WeakMap;constructor(e){super(e);const t=this.bindTemplate;this.focusables=new uf,this.items=this.createCollection(),this.focusTracker=new Yo,this.keystrokes=new Jo,this._focusCycler=new Hf({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof Xp?this._registerFocusableItemsGroup(e):e instanceof Yp&&this._registerFocusableListItem(e);this.items.on("change",(e,t)=>{for(const e of t.removed)e instanceof Xp?this._deregisterFocusableItemsGroup(e):e instanceof Yp&&this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof Xp?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,t.index)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,i)=>{for(const e of i.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(i.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+i.index)}}
6_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach((e,i)=>{const n=void 0!==t?t+i:void 0;this._registerFocusableListItem(e,n)});const i=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,i),e.items.on("change",i)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}i.ListView=Kp;class Jp extends Kp{constructor(e){super(e);const t=this.bindTemplate;this.role="menu",this.set("isVisible",!0),this.extendTemplate({attributes:{class:["ck-dropdown-menu-list",t.if("isVisible","ck-hidden",e=>!e)]}})}}i.DropdownMenuListView=Jp;const Qp=i.DropdownMenuPanelPositioningFunctions={eastSouth:e=>({top:e.top,left:e.right-5,name:"es"}),eastNorth:(e,t)=>({top:e.top-t.height+e.height,left:e.right-5,name:"en"}),westSouth:(e,t)=>({top:e.top,left:e.left-t.width+5,name:"ws"}),westNorth:(e,t)=>({top:e.top-t.height+e.height,left:e.left-t.width+5,name:"wn"})};class em extends Yp{childView;constructor(e,t,i){super(e);const n=this.bindTemplate;this.childView=i,this.children.add(i),this.extendTemplate({attributes:{class:["ck-dropdown-menu-list__nested-menu__item"]},on:{mouseenter:n.to("mouseenter")}}),t&&(this.delegate("mouseenter").to(t),i instanceof Gp&&i.delegate("execute").to(t))}}i.DropdownMenuListItemView=em;const tm={toggleMenusAndFocusItemsOnHover(e){e.on("menu:mouseenter",t=>{const[i]=t.path;t.source.focus();for(const n of e.menus){const e=i instanceof em&&i.childView===n;n.isOpen=(t.path.includes(n)||e)&&n.isEnabled}})},closeMenuWhenAnotherOnTheSameLevelOpens(e){e.on("menu:change:isOpen",(t,i,n)=>{if(!n)return;const r=t.source;for(const t of e.menus)r.parentMenuView===t.parentMenuView&&r!==t&&(t.isOpen=!1)})}},im={openOnArrowRightKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowleft":"arrowright";e.keystrokes.set(t,(t,i)=>{e.focusTracker.focusedElement===e.buttonView.element&&e.isEnabled&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),i())})},openOnButtonClick(e){e.buttonView.on("execute",()=>{e.isEnabled&&(e.isOpen=!0)})},openAndFocusOnEnterKeyPress(e){e.keystrokes.set("enter",(t,i)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen=!0,e.panelView.focus(),i())})},closeOnArrowLeftKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowright":"arrowleft";e.keystrokes.set(t,(t,i)=>{e.isOpen&&(e.focus(),e.isOpen=!1,i())})},closeOnEscKey(e){e.keystrokes.set("esc",(t,i)=>{e.isOpen&&(e.focus(),e.isOpen=!1,i())})},closeOnParentClose(e,t){t.on("change:isOpen",(i,n,r)=>{r||i.source!==t||(e.isOpen=!1)})}},nm=co("px"),rm={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class om extends Df{content;_pinWhenIsVisibleCallback;_resizeObserver;constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this._resizeObserver=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",e=>`ck-balloon-panel_${e}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",nm),left:t.to("left",nm)}},children:this.content})}destroy(){this.hide(),super.destroy()}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){const t=sm(e.target);if(t&&!mo(t))return!1;this.show();const i=om.defaultPositions,n=Object.assign({},{element:this.element,positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth],limiter:r.document.body,fitInViewport:!0},e),o=om._getOptimalPosition(n)||rm,s=parseInt(o.left),a=parseInt(o.top),l=o.name,c=o.config||{},{withArrow:u=!0}=c;return this.top=a,this.left=s,this.position=l,this.withArrow=u,!0}pin(e){this.unpin(),this._startPinning(e)&&(this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback))}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){if(!this.attachTo(e))return!1;let t=sm(e.target);const i=e.limiter?sm(e.limiter):r.document.body;if(this.listenTo(r.document,"scroll",(n,r)=>{const o=r.target,s=t&&o.contains(t),a=i&&o.contains(i);!s&&!a&&t&&i||this.attachTo(e)},{useCapture:!0}),this.listenTo(r.window,"resize",()=>{this.attachTo(e)}),!this._resizeObserver&&(t&&Jr(t)&&(t=t.parentElement),t)){const e=()=>{mo(t)||this.unpin()};this._resizeObserver=new ao(t,e)}return!0}_stopPinning(){this.stopListening(r.document,"scroll"),this.stopListening(r.window,"resize"),this._resizeObserver&&(this._resizeObserver.destroy(),this._resizeObserver=null)}static generatePositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sideOffset:t=om.arrowSideOffset,heightOffset:i=om.arrowHeightOffset,stickyVerticalOffset:n=om.stickyVerticalOffset,config:r}=e;return{northWestArrowSouthWest:(e,i)=>
6({top:o(e,i),left:e.left-t,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.left-.25*i.width-t,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.left-.75*i.width+t,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(e,i)=>({top:o(e,i),left:e.left-i.width+t,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(e,i)=>({top:o(e,i),left:e.left+e.width/2-t,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.left+e.width/2-.25*i.width-t,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.left+e.width/2-.75*i.width+t,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(e,i)=>({top:o(e,i),left:e.left+e.width/2-i.width+t,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(e,i)=>({top:o(e,i),left:e.right-t,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.right-.25*i.width-t,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.right-.75*i.width+t,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(e,i)=>({top:o(e,i),left:e.right-i.width+t,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:e=>({top:s(e),left:e.left-t,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(e,i)=>({top:s(e),left:e.left-.25*i.width-t,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(e,t)=>({top:s(e),left:e.left-t.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(e,i)=>({top:s(e),left:e.left-.75*i.width+t,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(e,i)=>({top:s(e),left:e.left-i.width+t,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:e=>({top:s(e),left:e.left+e.width/2-t,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(e,i)=>({top:s(e),left:e.left+e.width/2-.25*i.width-t,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(e,t)=>({top:s(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(e,i)=>({top:s(e),left:e.left+e.width/2-.75*i.width+t,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(e,i)=>({top:s(e),left:e.left+e.width/2-i.width+t,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:e=>({top:s(e),left:e.right-t,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(e,i)=>({top:s(e),left:e.right-.25*i.width-t,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(e,t)=>({top:s(e),left:e.right-t.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(e,i)=>({top:s(e),left:e.right-.75*i.width+t,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(e,i)=>({top:s(e),left:e.right-i.width+t,name:"arrow_ne",...r&&{config:r}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-i,name:"arrow_e",...r&&{config:r}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+i,name:"arrow_w",...r&&{config:r}}),viewportStickyNorth:(e,t,i,o)=>{const s=o||i;return e.getIntersection(s)?s.height-e.height>n?null:{top:s.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...r}}:null}};function o(e,t){return e.top-t.height-i}function s(e){return e.bottom+i}}static arrowSideOffset=25;static arrowHeightOffset=10;static stickyVerticalOffset=20;static _getOptimalPosition=go;static defaultPositions=om.generatePositions()}function sm(e){return fr(e)?e:Qr(e)?e.commonAncestorContainer:"function"==typeof e?sm(e()):null}i.BalloonPanelView=om;class am extends om{constructor(e){super(e);const t=this.bindTemplate;this.set({isVisible:!1,position:"se",class:null,top:0,left:0}),this.extendTemplate({tag:"div",attributes:{class:["ck-reset","ck-dropdown-menu__nested-menu__panel"],tabindex:"-1"},on:{selectstart:t.to(e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()})}})}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const{content:t}=this;t.length&&(1===e?t.first.focus():t.last.focus())}}class lm extends Df{static DELEGATED_EVENTS=["mouseenter","execute","change:isOpen"];id;buttonView;panelView;listView;focusTracker;keystrokes;_bodyCollection;constructor(e,t,i,n,r){super(e),this._bodyCollection=t,this.id=i,this.set({isOpen:!1,isEnabled:!0,panelPosition:"w",class:void 0,parentMenuView:null}),this.keystrokes=new Jo,this.focusTracker=new Yo,this.buttonView=new qp(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.buttonView.label=n,this.panelView=new am(e),this.panelView.isVisible=!0,this.listView=new Jp(e),this.listView.bind("ariaLabel").to(this.buttonView,"label"),this.panelView.content.add(this.listView);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown-menu-list__nested-menu",o.to("class"),o.if("isEnabled","ck-disabled",e=>!e)],role:"presentation"},children:[this.buttonView]}),this.parentMenuView=r,this.parentMenuView&&this._handleParentMenuView(),this._attachBehaviors()}get _panelPositions(){const{westSouth:e,eastSouth:t,westNorth:i,eastNorth:n}=Qp;return"ltr"===this.locale.uiLanguageDirection?[t,n,e,i]:[e,i,t,n]}render(){super.render(),this.panelView.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.focusTracker.add(this.listView),this.keystrokes.listenTo(this.element),this._mountPanelOnOpen()}destroy(){this._removePanelFromBody(),this.panelView.destroy(),super.destroy()}focus(){this.buttonView.focus()}_handleParentMenuView(){this.delegate(...lm.DELEGATED_EVENTS).to(this.parentMenuView),im.closeOnParentClose(this,this.parentMenuView)}_attachBehaviors(){im.openOnButtonClick(this),im.openAndFocusOnEnterKeyPress(this),im.openOnArrowRightKey(this),im.closeOnEscKey(this),im.closeOnArrowLeftKey(this)}_mountPanelOnOpen(){const{panelView:e}=this;this.on("change:isOpen",(t,i,n)=>{t.source===this&&(n||!this._bodyCollection.has(e)?n&&!this._bodyCollection.has(e)&&this._addPanelToBody():this._removePanelFromBody())})}_removePanelFromBody(){const{panelView:e,keystrokes:t}=this;this._bodyCollection.has(e)&&(this._bodyCollection.remove(e),t.stopListening(e.element))}_addPanelToBody(){const{panelView:e,buttonView:t,keystrokes:i}=this;this._bodyCollection.has(e)||(this._bodyCollection.add(e),i.listenTo(e.element),e.pin({positions:this._panelPositions,limiter:r.document.body,element:e.element,target:t.element,fitInViewport:!0}))}}i.DropdownMenuNestedMenuView=lm;class cm extends Jp{_definition;_cachedMenus=[];_cachedButtons=[];_bodyCollection;constructor(e,t,i){super(e),this._bodyCollection=t,this._definition=i,this.set("menuPanelClass",void 0)}get menus(){return Array.from(this._cachedMenus.values())}get buttons(){return Array.from(this._cachedButtons.values())}render(){this._createStructure(this._definition,null),super.render(),tm.toggleMenusAndFocusItemsOnHover(this),tm.closeMenuWhenAnotherOnTheSameLevelOpens(this)}
6closeMenus(){this.menus.forEach(e=>{e.isOpen=!1})}_createStructure(e,t){const i=[];for(const n of e){let e;"menu"in n?(e=new lm(this.locale,this._bodyCollection,n.id,n.menu,t),e.panelView.bind("class").to(this,"menuPanelClass"),t||e.delegate(...lm.DELEGATED_EVENTS).to(this,e=>`menu:${e}`),this._cachedMenus.push(e),this._createStructure(n.children,e)):(e=new Gp(this.locale,n.id,n.label),t||e.delegate("execute").to(this,"menu:execute"),this._cachedButtons.push(e));const r=new em(this.locale,t,e);t||r.delegate("mouseenter").to(this,"menu:mouseenter"),i.push(r)}(t?t.listView:this).items.addMany(i)}}i.DropdownMenuRootListView=cm;class um extends Df{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}i.ToolbarSeparatorView=um;class hm extends Df{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function dm(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}i.ToolbarLineBreakView=hm;const fm={alignLeft:Yd.alignLeft,bold:Yd.bold,importExport:Yd.importExport,paragraph:Yd.paragraph,plus:Yd.plus,text:Yd.text,threeVerticalDots:Yd.threeVerticalDots,pilcrow:Yd.pilcrow,dragIndicator:Yd.dragIndicator};class pm extends Df{options;items;focusTracker;keystrokes;itemsView;children;focusables;_focusCycler;_behavior;constructor(e,t){super(e);const i=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Yo,this.keystrokes=new Jo,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new mm(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const r="rtl"===e.uiLanguageDirection;this._focusCycler=new Hf({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[r?"arrowright":"arrowleft","arrowup"],focusNext:[r?"arrowleft":"arrowright","arrowdown"]}});const o=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&o.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:o,role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to(e=>{e.target===s.element&&e.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new vm(this):new gm(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e);this.items.on("add",(e,t)=>{this.focusTracker.add(t)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,i){this.items.addMany(this._buildItemsFromConfig(e,t,i))}_buildItemsFromConfig(e,t,i){const n=dm(e),r=i||n.removeItems;return this._cleanItemsConfiguration(n.items,t,r).map(e=>te(e)?this._createNestedToolbarDropdown(e,t,r):"|"===e?new um:"-"===e?new hm:t.create(e)).filter(e=>!!e)}_cleanItemsConfiguration(e,t,i){const n=e.filter((e,n,r)=>"|"===e||-1===i.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(b("toolbarview-line-break-ignored-when-grouping-items",r),!1):!(!te(e)&&!t.has(e)&&(b("toolbarview-item-unavailable",{item:e}),1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,i=e.length,n=e.findIndex(t);if(-1===n)return[];const r=i-e.slice().reverse().findIndex(t);return e.slice(n,r).filter((e,i,n)=>!!t(e)||!(i>0&&n[i-1]===e))}_createNestedToolbarDropdown(e,t,i){let{label:n,icon:r,items:o,tooltip:s=!0,withText:a=!1}=e;if(o=this._cleanItemsConfiguration(o,t,i),!o.length)return null;const l=ym(this.locale);return n||b("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:s,withText:!!a}),!1!==r?l.buttonView.icon=fm[r]||r||Yd.threeVerticalDots:l.buttonView.withText=!0,_m(l,()=>l.toolbarView._buildItemsFromConfig(o,t,i)),l}}i.ToolbarView=pm;class mm extends Df{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class gm{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using(e=>e),e.focusables.bindTo(e.items).using(e=>Wf(e)?e:null),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class vm{view;viewChildren;viewFocusables;viewItemsView;viewFocusTracker;viewLocale;ungroupedItems;groupedItems;groupedItemsDropdown;resizeObserver=null;cachedPadding=null;shouldUpdateGroupingOnNextResize=!1;viewElement;constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",(e,t)=>{const i=t.index,n=Array.from(t.added);for(const e of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=i;e<i+n.length;e++){const t=n[e-i];e>this.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!mo(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,i=new io(e.last
6Child),n=new io(e);if(!this.cachedPadding){const i=r.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}return"ltr"===t?i.right>n.right-this.cachedPadding:i.left<n.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new ao(this.viewElement,t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new um),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,i=ym(e);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",_m(i,this.groupedItems),i.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:Yd.threeVerticalDots}),i}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{Wf(e)&&this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class bm extends Df{children;actionView;arrowView;keystrokes;focusTracker;constructor(e,t){super(e);const i=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new Jo,this.focusTracker=new Yo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",i.to("class"),i.if("isVisible","ck-hidden",e=>!e),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new Ff;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new Ff,t=e.bindTemplate;return e.icon=dp,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function ym(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$p;const i="function"==typeof t?new t(e):t,n=new Up(e),o=new Wp(e,i,n);return i.bind("isEnabled").to(o),i instanceof bm?i.arrowView.bind("isOn").to(o,"isOpen"):i.bind("isOn").to(o,"isOpen"),function(e){(function(e){Of({emitter:e,activator:()=>e.isRendered&&e.isOpen,callback:()=>{e.isOpen=!1},contextElements:()=>
6[e.element,...Em(e.focusTracker).filter(t=>!e.element.contains(t))]})})(e),function(e){e.on("execute",t=>{t.source instanceof ap||(e.isOpen=!1)})}(e),function(e){e.focusTracker.on("change:isFocused",(t,i,n)=>{!n&&e.isOpen&&(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,i)=>{e.isOpen&&(e.panelView.focus(),i())}),e.keystrokes.set("arrowup",(t,i)=>{e.isOpen&&(e.panelView.focusLast(),i())})}(e),function(e){e.on("change:isOpen",(t,i,n)=>{n||e.focusTracker.elements.some(e=>e.contains(r.document.activeElement))&&e.buttonView.focus()})}(e),function(e){e.on("change:isOpen",(t,i,n)=>{n&&e.panelView.focus()},{priority:"low"})}(e)}(o),o}function wm(e,t){const i=e.menuView,n=e.locale.t;i.delegate("menu:execute").to(e,"execute"),i.listenTo(e,"change:isOpen",(e,t,n)=>{n||i.closeMenus()},{priority:"low"}),e.panelView.children.add(i);for(const t of i.menus)e.focusTracker.add(t);i.ariaLabel=t.ariaLabel||n("Dropdown menu")}function _m(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?km(e,t,i):e.once("change:isOpen",()=>km(e,t,i),{priority:"highest"}),i.enableActiveItemFocusOnDropdownOpen&&Sm(e,()=>e.toolbarView.items.find(e=>e.isOn))}function km(e,t,i){const n=e.locale,r=n.t,o=e.toolbarView=new pm(n),s="function"==typeof t?t():t;o.ariaLabel=i.ariaLabel||r("Dropdown toolbar"),i.maxWidth&&(o.maxWidth=i.maxWidth),i.class&&(o.class=i.class),i.isCompact&&(o.isCompact=i.isCompact),i.isVertical&&(o.isVertical=!0),s instanceof uf?o.items.bindTo(s).using(e=>e):o.items.addMany(s),e.panelView.children.add(o),e.focusTracker.add(o),o.items.delegate("execute").to(e)}function xm(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.isOpen?Cm(e,t,i):e.once("change:isOpen",()=>Cm(e,t,i),{priority:"highest"}),Sm(e,()=>e.listView.items.find(e=>e instanceof Yp&&e.children.first.isOn))}function Cm(e,t,i){const n=e.locale,r=e.listView=new Kp(n),o="function"==typeof t?t():t;r.ariaLabel=i.ariaLabel,r.role=i.role,Tm(e,r.items,o,n),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function Sm(e,t){e.on("change:isOpen",()=>{if(!e.isOpen)return;const i=t();i&&("function"==typeof i.focus?i.focus():b("ui-dropdown-focus-child-on-open-child-missing-focus",{view:i}))},{priority:m.low-10})}function Em(e){return[...e.elements,...e.externalViews.flatMap(e=>
6Em(e.focusTracker))]}function Tm(e,t,i,n){t.on("change",()=>{const e=[...t].reduce((e,t)=>(t instanceof Yp&&t.children.first instanceof Jf&&e.push(t.children.first),e),[]),i=e.some(e=>e.isToggleable);e.forEach(e=>{e.hasCheckSpace=i})}),t.bindTo(i).using(t=>{if("separator"===t.type)return new Zp(n);if("group"===t.type){const i=new Xp(n);return i.set({label:t.label}),Tm(e,i.items,t.items,n),i.items.delegate("execute").to(e),i}if("button"===t.type||"switchbutton"===t.type){const e="menuitemcheckbox"===t.model.role||"menuitemradio"===t.model.role,i=new Yp(n);let r;return"button"===t.type?(r=new Jf(n),r.set({isToggleable:e})):r=new ap(n),r.bind(...Object.keys(t.model)).to(t.model),r.delegate("execute").to(i),i.children.add(r),i}return null})}i.SplitButtonView=bm;const Am=(e,t,i)=>{const n=new Fp(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isReadOnly").to(e,"isEnabled",e=>!e),n.bind("hasError").to(e,"errorText",e=>!!e),n.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(n),n},Im=(e,t,i)=>{const n=new zp(e.locale);return n.set({id:t,ariaDescribedById:i,inputMode:"numeric"}),n.bind("isReadOnly").to(e,"isEnabled",e=>!e),n.bind("hasError").to(e,"errorText",e=>!!e),n.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(n),n},Mm=(e,t,i)=>{const n=ym(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isEnabled").to(e),n},Pm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e>i?i:e<t?t:e},Dm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,t);return Math.round(i*e)/i},Om=e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Dm(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?Dm(parseInt(e.substring(6,8),16)/255,2):1}),Lm=e=>{const{h:t,s:i,l:n}=(e=>{let{h:t,s:i,v:n,a:r}=e;const o=(200-i)*n/100;return{h:Dm(t),s:Dm(o>0&&o<200?i*n/100/(o<=100?o:200-o)*100:0),l:Dm(o/2),a:Dm(r,2)}})(e);return`hsl(${t}, ${i}%, ${n}%)`},Rm=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Bm=(e,t)=>{if(e===t)return!0;for(const i in e)if(e[i]!==t[i])return!1;return!0},Nm={},jm=e=>{let t=Nm[e];return t||(t=document.createElement("template"),t.innerHTML=e,Nm[e]=t),t},Fm=(e,t,i)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))};i.createLabeledDropdown=Mm,i.createLabeledTextarea=(e,t,i)=>{const n=new Vp(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isReadOnly").to(e,"isEnabled",e=>!e),n.bind("hasError").to(e,"errorText",e=>!!e),n.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(n),n},i.createLabeledInputNumber=Im,i.createLabeledInputText=Am;let zm=!1;const Vm=e=>"touches"in e,Hm=(e,t)=>{const i=Vm(t)?t.touches[0]:t,n=e.el.getBoundingClientRect();Fm(e.el,"move",e.getMove({x:Pm((i.pageX-(n.left+window.pageXOffset))/n.width),y:Pm((i.pageY-(n.top+window.pageYOffset))/n.height)}))};class Um{constructor(e,t,i,n){const r=jm(`<div role="slider" tabindex="0" part="${t}" ${i}><div part="${t}-pointer"></div></div>`);e.appendChild(r.content.cloneNode(!0));const o=e.querySelector(`[part=${t}]`);o.addEventListener("mousedown",this),o.addEventListener("touchstart",this),o.addEventListener("keydown",this),this.el=o,this.xy=n,this.nodes=[o.firstChild,o]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(zm?"touchmove":"mousemove",this),t(zm?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(zm&&!Vm(e)||(zm||(zm=Vm(e)),0)))(e)||!zm&&0!=e.button)return;this.el.focus(),Hm(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Hm(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const i=t.keyCode;i>40||e.xy&&i<37||i<33||(t.preventDefault(),Fm(e.el,"move",e.getMove({x:39===i?.01:37===i?-.01:34===i?.05:33===i?-.05:35===i?1:36===i?-1:0,y:40===i?.01:38===i?-.01:0},!0)))})(this,e)}}style(e){e.forEach((e,t)=>{for(const i in e)this.nodes[t].style.setProperty(i,e[i])})}}class Wm extends Um{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update(e){let{h:t}=e;this.h=t,this.style([{left:t/360*100+"%",color:Lm({h:t,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${Dm(t)}`)}getMove(e,t){return{h:t?Pm(this.h+360*e.x,0,360):360*e.x}}}class $m extends Um{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:Lm(e)},{"background-color":Lm({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${Dm(e.s)}%, Brightness ${Dm(e.v)}%`)}getMove(e,t){return{s:t?Pm(this.hsva.s+100*e.x,0,100):100*e.x,v:t?Pm(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const Gm=Symbol("same"),qm=Symbol("color"),Ym=Symbol("hsva"),Zm=Symbol("update"),Xm=Symbol("parts"),Km=Symbol("css"),Jm=Symbol("sliders");class Qm extends HTMLElement{static get observedAttributes(){return["color"]}get[Km](){return[':host{display:flex;flex-direction:column;position:relative;
6width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[Jm](){return[$m,Wm]}get color(){return this[qm]}set color(e){if(!this[Gm](e)){const t=this.colorModel.toHsva(e);this[Zm](t),this[qm]=e}}constructor(){super();const e=jm(`<style>${this[Km].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[Xm]=this[Jm].map(e=>new e(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,i){const n=this.colorModel.fromAttr(i);this[Gm](n)||(this.color=n)}handleEvent(e){const t=this[Ym],i={...t,...e.detail};let n;this[Zm](i),Bm(i,t)||this[Gm](n=this.colorModel.fromHsva(i))||(this[qm]=n,Fm(this,"color-changed",{value:n}))}[Gm](e){return this.color&&this.colorModel.equal(e,this.color)}[Zm](e){this[Ym]=e,this[Xm].forEach(t=>t.update(e))}}const eg={defaultColor:"#000",toHsva:e=>(e=>{let{r:t,g:i,b:n,a:r}=e;const o=Math.max(t,i,n),s=o-Math.min(t,i,n),a=s?o===t?(i-n)/s:o===i?2+(n-t)/s:4+(t-i)/s:0;return{h:Dm(60*(a<0?a+6:a)),s:Dm(o?s/o*100:0),v:Dm(o/255*100),a:r}})(Om(e)),fromHsva:e=>{let{h:t,s:i,v:n}=e;return(e=>{let{r:t,g:i,b:n,a:r}=e;const o=r<1?Rm(Dm(255*r)):"";return"#"+Rm(t)+Rm(i)+Rm(n)+o})((e=>{let{h:t,s:i,v:n,a:r}=e;t=t/360*6,i/=100,n/=100;const o=Math.floor(t),s=n*(1-i),a=n*(1-(t-o)*i),l=n*(1-(1-t+o)*i),c=o%6;return{r:Dm(255*[n,a,s,s,l,n][c]),g:Dm(255*[l,n,n,a,s,s][c]),b:Dm(255*[s,s,l,n,n,a][c]),a:Dm(r,2)}})({h:t,s:i,v:n,a:1}))},equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||Bm(Om(e),Om(t)),fromAttr:e=>e};class tg extends Qm{get colorModel(){return eg}}class ig extends Df{hexInputRow;_debounceColorPickerEvent;_config;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const i=this.createCollection();t.hideInput||i.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:i}),this._config=t,this._debounceColorPickerEvent=Qn(e=>{this.set("color",e),this.fire("colorSelected",{color:this.color})},150,{leading:!0}),this.on("set:color",(e,t,i)=>{e.return=Lp(i,this._config.format||"hsl")}),this.on("change:color",()=>{this._hexColor=ng(this.color)}),this.on("change:_hexColor",()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),ng(this.color)!=ng(this._hexColor)&&(this.color=this._hexColor)})}render(){var e,t;if(super.render(),e="hex-color-picker",t=tg,void 0===customElements.get(e)&&customElements.define(e,t),this.picker=r.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)})}focus(){!this._config.hideInput&&(s.isGecko||s.isiOS||s.isSafari)&&this.hexInputRow.children.get(1).focus(),this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter(e=>"slider"===e.getAttribute("role")).map(e=>new rg(e));
6this.slidersView=this.createCollection(),e.forEach(e=>{this.slidersView.add(e)})}_createInputRow(){const e=this._createColorInput();return new sg(this.locale,e)}_createColorInput(){const e=new Bp(this.locale,Am),{t:t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t),e.fieldView.on("input",()=>{const t=e.fieldView.element.value;if(t){const e=ag(t);e&&this._debounceColorPickerEvent(e)}}),e}isValid(){const{t:e}=this.locale;return!!this._config.hideInput||(this.resetValidationStatus(),!!this.hexInputRow.getParsedColor()||(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1))}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function ng(e){let t=function(e){if(!e)return"";const t=Rp(e);return t?"hex"===t.space?t.hexValue:Lp(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}i.ColorPickerView=ig;class rg extends Df{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class og extends Df{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class sg extends Df{children;inputView;constructor(e,t){super(e),this.inputView=t,this.children=this.createCollection([new og,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return ag(this.inputView.fieldView.element.value)}}function ag(e){if(!e)return null;const t=e.trim().replace(/^#/,"");return[3,4,6,8].includes(t.length)&&/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(t)?`#${t}`:null}class lg extends(Er(Go)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",0===this.length)})}add(e,t){return this.find(t=>t.color===e.color)?this:super.add(e,t)}hasColor(e){return!!this.find(t=>t.color===e)}}class cg extends Df{items;colorDefinitions;focusTracker;columns;documentColors;documentColorsCount;staticColorsGrid;documentColorsGrid;colorPickerButtonView;removeColorButtonView;_focusables;_documentColorsLabel;_removeButtonLabel;_colorPickerLabel;constructor(e,t){let{colors:i,columns:n,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerLabel:a,focusTracker:l,focusables:c}=t;super(e);const u=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=l,this.items=this.createCollection(),this.colorDefinitions=i,this.columns=n,this.documentColors=new lg,this.documentColorsCount=s,this._focusables=c,this._removeButtonLabel=r,this._colorPickerLabel=a,this._documentColorsLabel=o,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",u.if("isVisible","ck-hidden",e=>!e)]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const r of i.getRoots()){const i=e.createRangeIn(r);for(const e of i.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=hf.bind(this.documentColors,this.documentColors),t=new Df(this.locale);t.setTemplate({tag:"span",attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]},children:[{text:this._documentColorsLabel}]}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new Ff,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:Yd.colorPalette,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",()=>{this.fire("colorPicker:show")})}_createRemoveColorButton(){const e=new Ff;return e.set({withText:!0,icon:Yd.eraser,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",()=>{this.fire("execute",{value:null,source:"removeColorButton"})}),e.render(),e}_createStaticColorsGrid(){const e=new bp(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",(e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})}),e}_createDocumentColorsGrid(){const e=hf.bind(this.documentColors,this.documentColors),t=new bp(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(e=>{const t=new vp;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})}),t}),this.documentColors.on("change:isEmpty",(e,i,n)=>{n&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(t=>t.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class ug extends Df{items;colorPickerView;saveButtonView;cancelButtonView;actionBarView;focusTracker;keystrokes;_focusables;_colorPickerViewConfig;constructor(e,t){let{focusTracker:i,focusables:n,keystrokes:r,colorPickerViewConfig:o}=t;super(e),this.items=this.createCollection(),this.focusTracker=i,this.keystrokes=r,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=n,this._colorPickerViewConfig=o;const s=this.bindTemplate,{saveButtonView:a,cancelButtonView:l}=this._createActionButtons();this.saveButtonView=a,this.cancelButtonView=l,this.actionBarView=this._createActionBarView({saveButtonView:a,cancelButtonView:l}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",s.if("isVisible","ck-hidden",e=>!e)]},children:this.items})}render(){super.render();const e=new ig(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",(t,i,n)=>{e.color=n}),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())})}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView(e){let{saveButtonView:t,cancelButtonView:i}=e;const n=new Df,r=this.createCollection();return r.add(t),r.add(i),n.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:r}),n}_createActionButtons(){const e=this.locale,t=e.t,i=new Ff(e),n=new Ff(e);return i.set({icon:Yd.check,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),n.set({icon:Yd.cancel,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),i.on("execute",()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})}),n.on("execute",()=>{this.fire("colorPicker:cancel")}),{saveButtonView:i,cancelButtonView:n}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",(e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)})}}class hg extends Df{focusTracker;keystrokes;items;colorGridsFragmentView;colorPickerFragmentView;_focusCycler;_focusables;_colorPickerViewConfig;
vendor: 4,359 bytes, line 6
6constructor(e,t){let{colors:i,columns:n,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerLabel:a,colorPickerViewConfig:l}=t;super(e),this.items=this.createCollection(),this.focusTracker=new Yo,this.keystrokes=new Jo,this._focusables=new uf,this._colorPickerViewConfig=l,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new cg(e,{colors:i,columns:n,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerLabel:a,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new ug(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:l}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",(e,t,i)=>{this.colorGridsFragmentView.set("selectedColor",i),this.colorPickerFragmentView.set("selectedColor",i)}),this.colorGridsFragmentView.on("change:selectedColor",(e,t,i)=>{this.set("selectedColor",i)}),this.colorPickerFragmentView.on("change:selectedColor",(e,t,i)=>{this.set("selectedColor",i)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){this.colorPickerFragmentView.colorPickerView&&!this._isColorPickerFragmentVisible&&(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){2!==this.items.length&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{this.showColorPickerFragment()}),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}i.ColorSelectorView=hg;class dg{editor;_components=new Map;constructor(e){this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(fg(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new v("componentfactory-item-missing",this,{name:e});return this._components.get(fg(e)).callback(this.editor.locale)}has(e){return this._components.has(fg(e))}}function fg(e){return String(e).toLowerCase()}i.ComponentFactory=dg;const pg="ck-tooltip";class mg extends(Wr()){tooltipTextView;balloonPanelView;static defaultBalloonPositions=om.generatePositions({heightOffset:5,sideOffset:13});_currentElementWithTooltip=null;_currentTooltipPosition=null;_mutationObserver=null;_pinTooltipDebounced;_unpinTooltipDebounced;_watchdogExcluded;static _editors=new Set;static _instance=null;constructor(e){if(super(),mg._editors.add(e),mg._instance)return mg._instance;mg._instance=this,this.tooltipTextView=new Df(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new om(e.locale),this.balloonPanelView.class=
6pg,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(e){const t=new MutationObserver(()=>{e()});return{attach(e){t.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){t.disconnect()}}}(()=>{this._updateTooltipPosition()}),this._pinTooltipDebounced=Qn(this._pinTooltip,600),this._unpinTooltipDebounced=Qn(this._unpinTooltip,400),this.listenTo(r.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(r.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(r.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(r.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(r.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(r.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;mg._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),mg._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),mg._instance=null)}static getPositioningFunctions(e){const t=mg.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onKeyDown(e,t){"Escape"===t.key&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,t){let{target:i}=t;const n=gg(i);n?n!==this._currentElementWithTooltip&&(this._unpinTooltip(),"focus"!==e.name||n.matches(":hover")?this._pinTooltipDebounced(n,vg(n)):this._pinTooltip(n,vg(n))):"focus"===e.name&&this._unpinTooltip()}_onLeaveOrBlur(e,t){let{target:i,relatedTarget:n}=t;if("mouseleave"===e.name){if(!fr(i))return;const e=this.balloonPanelView.element,t=e&&(e===n||e.contains(n)),r=!t&&i===e;if(t)return void this._unpinTooltipDebounced.cancel();if(!r&&this._currentElementWithTooltip&&i!==this._currentElementWithTooltip)return;const o=gg(i),s=gg(n);(r||o&&o!==s)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&i!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(e,t){let{target:i}=t;this._currentElementWithTooltip&&(i.contains(this.balloonPanelView.element)&&i.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,t){let{text:i,position:n,cssClass:r}=t;this._unpinTooltip();const o=qo(mg._editors.values()).ui.view.body;o.has(this.balloonPanelView)||o.add(this.balloonPanelView),this.tooltipTextView.text=i,this.balloonPanelView.class=[pg,r].filter(e=>e).join(" "),this.balloonPanelView.pin({target:e,positions:mg.getPositioningFunctions(n)}),this._mutationObserver.attach(e);for(const e of mg._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=n}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of mg._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=vg(this._currentElementWithTooltip);mo(this._currentElementWithTooltip)&&e.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:mg.getPositioningFunctions(e.position)}):this._unpinTooltip()}}function gg(e){return fr(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function vg(e){return{text:e.dataset.ckeTooltipText,position:e.dataset.ckeTooltipPosition||"s",cssClass:e.dataset.ckeTooltipClass||""}}i.TooltipManager=mg;class bg extends(Wr()){editor;_balloonView=null;_showBalloonThrottled=yr(()=>this._showBalloon(),50,{leading:!0});_lastFocusedEditableElement=null;_balloonClass;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.editor=e,this._balloonClass=t.balloonClass,e.on("ready",()=>this._handleEditorReady())}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;this._isEnabled()&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",(e,t,i)=>{this._updateLastFocusedEditableElement(),i?this._showBalloon():this._hideBalloon()}),e.ui.focusTracker.on("change:focusedElement",(e,t,i)=>{this._updateLastFocusedEditableElement(),i&&this._showBalloon()}),e.ui.on("update",()=>{this._showBalloonThrottled()}))}_getNormalizedConfig(){return{side:"ltr"===this.editor.locale.contentLanguageDirection?"right":"left",position:"border",verticalOffset:0,horizontalOffset:5}}_showBalloon(){const e=this._getBalloonAttachOptions();e&&(this._balloonView||(this._balloonView=this._createBalloonView()),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_createBalloonView(){const e=this.editor,t=new om,i=this._createBadgeContent();return t.content.add(i),this._balloonClass&&(t.class=this._balloonClass),e.ui.view.body.add(t),t}_getBalloonAttachOptions(){if(!this._lastFocusedEditableElement)return null;const e=this._getNormalizedConfig(),t="right"===e.side?yg(this._lastFocusedEditableElement,i=e,(e,t)=>e.left+e.width-t.width-i.horizontalOffset):function(e,t){return yg(e,t,e=>e.left+t.horizontalOffset)}(this._lastFocusedEditableElement,e);var i;return{target:this._lastFocusedEditableElement,positions:[t]}}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,i=e.ui.focusTracker.focusedElement;if(!t||!i)return void(this._lastFocusedEditableElement=null);const n=Array.from(e.ui.getEditableElementsNames()).map(t=>e.ui.getEditableElement(t));n.includes(i)?this._lastFocusedEditableElement=i:this._lastFocusedEditableElement=n[0]}}function yg(e,t,i){return(n,r)=>{const o=new io(e);if(o.width<350||o.height<50)return null;let s;s="inside"===t.position?o.bottom-r.height:o.bottom-r.height/2,s-=t.verticalOffset;const a=i(o,r),l=n.clone().moveTo(a,s).getIntersection(r.clone().moveTo(a,s)).getVisible();return!l||l.getArea()<r.getArea()?null:{top:s,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}
vendor: 5,432 bytes, line 6
6}}}class wg extends bg{constructor(e){super(e,{balloonClass:"ck-powered-by-balloon"})}_isEnabled(){const e=this.editor;if(e.config.get("ui.poweredBy.forceVisible"))return!0;const t=e.config.get("licenseKey");if("GPL"==t)return!0;const i=os(t.split(".")[1]);return!i||!i.whiteLabel}_createBadgeContent(){return new _g(this.editor.locale,this._getNormalizedConfig().label)}_getNormalizedConfig(){const e=super._getNormalizedConfig(),t=this.editor.config.get("ui.poweredBy")||{},i=t.position||e.position,n="inside"===i?5:e.verticalOffset;return{position:i,side:t.side||e.side,label:void 0===t.label?"Powered by":t.label,verticalOffset:void 0!==t.verticalOffset?t.verticalOffset:n,horizontalOffset:void 0!==t.horizontalOffset?t.horizontalOffset:e.horizontalOffset,forceVisible:!!t.forceVisible}}}class _g extends Df{constructor(e,t){super(e);const i=new Nf,n=this.bindTemplate;i.set({content:'<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/>
6<path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>\n',isColorInherited:!1}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],i],on:{dragstart:n.to(e=>e.preventDefault())}}]})}}class kg extends bg{licenseTypeMessage={evaluation:"For evaluation purposes only",trial:"For evaluation purposes only",development:"For development purposes only"};constructor(e){super(e,{balloonClass:"ck-evaluation-badge-balloon"})}_isEnabled(){const e=Cg(this.editor.config.get("licenseKey"));return Boolean(e&&this.licenseTypeMessage[e])}_createBadgeContent(){const e=Cg(this.editor.config.get("licenseKey"));return new xg(this.editor.locale,this.licenseTypeMessage[e])}_getNormalizedConfig(){const e=super._getNormalizedConfig(),t=this.editor.config.get("ui.poweredBy")||{};return{position:t.position||e.position,side:"left"===(t.side||e.side)?"right":"left",verticalOffset:e.verticalOffset,horizontalOffset:e.horizontalOffset}}}class xg extends Df{constructor(e,t){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-evaluation-badge"],"aria-hidden":!0},children:[{tag:"span",attributes:{class:["ck","ck-evaluation-badge__label"]},children:[t]}]})}}function Cg(e){if("GPL"==e)return"GPL";const t=os(e.split(".")[1]);return t?t.licenseType||"production":null}const Sg={POLITE:"polite",ASSERTIVE:"assertive"};class Eg{editor;view;constructor(e){this.editor=e,e.once("ready",()=>{for(const e of Object.values(Sg))this.announce("",e)})}announce(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sg.POLITE;const i=this.editor;if(!i.ui.view)return;this.view||(this.view=new Tg(i.locale),i.ui.view.body.add(this.view));const{politeness:n,isUnsafeHTML:r}="string"==typeof t?{politeness:t}:t;let o=this.view.regionViews.find(e=>e.politeness===n);o||(o=new Ag(i,n),this.view.regionViews.add(o)),o.announce({announcement:e,isUnsafeHTML:r})}}class Tg extends Df{regionViews;constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class Ag extends Df{politeness;_domConverter;_pruneAnnouncementsInterval;constructor(e,t){super(e.locale),this.setTemplate({tag:"div",attributes:{"aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",()=>{null!==this._pruneAnnouncementsInterval&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce(e){let{announcement:t,isUnsafeHTML:i}=e;if(!t.trim().length)return;const n=document.createElement("li");i?this._domConverter.setContentOf(n,t):n.innerText=t,this._listElement.appendChild(n)}get _listElement(){return this.element.querySelector("ul")}}class Ig extends Yp{constructor(e,t){super(e);const i=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:i.to("mouseenter")}}),this.delegate("mouseenter").to(t)}}i.MenuBarMenuListItemView=Ig;const Mg={toggleMenusAndFocusItemsOnHover(e){e.on("menu:mouseenter",t=>{if(e.isFocusBorderEnabled||e.isOpen){if(e.isOpen)for(const i of e.menus){const e=t.path[0],n=e instanceof Ig&&e.children.first===i;i.isOpen=(t.path.includes(i)||n)&&i.isEnabled}
6t.source.focus()}})},focusCycleMenusOnArrows(e){const t="rtl"===e.locale.uiLanguageDirection;function i(t,i){const n=e.children.getIndex(t),r=t.isOpen,o=e.children.length,s=e.children.get((n+o+i)%o);t.isOpen=!1,r&&(s.isOpen=!0),s.buttonView.focus()}e.on("menu:arrowright",e=>{i(e.source,t?-1:1)}),e.on("menu:arrowleft",e=>{i(e.source,t?1:-1)})},closeMenusWhenTheBarCloses(e){e.on("change:isOpen",()=>{e.isOpen||e.menus.forEach(e=>{e.isOpen=!1})})},closeMenuWhenAnotherOnTheSameLevelOpens(e){e.on("menu:change:isOpen",(t,i,n)=>{n&&e.menus.filter(e=>t.source.parentMenuView===e.parentMenuView&&t.source!==e&&e.isOpen).forEach(e=>{e.isOpen=!1})})},closeOnClickOutside(e){Of({emitter:e,activator:()=>e.isOpen,callback:()=>e.close(),contextElements:()=>e.children.map(e=>e.element)})},enableFocusHighlightOnInteraction(e){let t=!1;e.on("change:isOpen",(i,n,r)=>{r||(t||(e.isFocusBorderEnabled=!1),t=!1)}),e.listenTo(e.element,"keydown",()=>{t=!0},{useCapture:!0}),e.listenTo(e.element,"keyup",()=>{t=!1},{useCapture:!0}),e.listenTo(e.element,"focus",()=>{t&&(e.isFocusBorderEnabled=!0)},{useCapture:!0})}},Pg={openAndFocusPanelOnArrowDownKey(e){e.keystrokes.set("arrowdown",(t,i)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),i())})},openOnArrowRightKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowleft":"arrowright";e.keystrokes.set(t,(t,i)=>{e.focusTracker.focusedElement===e.buttonView.element&&e.isEnabled&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),i())})},openOnButtonClick(e){e.buttonView.on("execute",()=>{e.isOpen=!0})},toggleOnButtonClick(e){e.buttonView.on("execute",()=>{e.isOpen=!e.isOpen})},openAndFocusOnEnterKeyPress(e){e.keystrokes.set("enter",(t,i)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen=!0,e.panelView.focus(),i())})},closeOnArrowLeftKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowright":"arrowleft";e.keystrokes.set(t,(t,i)=>{e.isOpen&&(e.isOpen=!1,e.focus(),i())})},closeOnEscKey(e){e.keystrokes.set("esc",(t,i)=>{e.isOpen&&(e.isOpen=!1,e.focus(),i())})},closeOnParentClose(e){e.parentMenuView.on("change:isOpen",(t,i,n)=>{n||t.source!==e.parentMenuView||(e.isOpen=!1)})}},Dg={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),eastSouth:e=>({top:e.top,left:e.right-5,name:"es"}),eastNorth:(e,t)=>({top:e.top-t.height,left:e.right-5,name:"en"}),westSouth:(e,t)=>({top:e.top,left:e.left-t.width+5,name:"ws"}),westNorth:(e,t)=>({top:e.top-t.height,left:e.left-t.width+5,name:"wn"})},Og=i.DefaultMenuBarItems=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"previewMergeFields",items:["menuBar:previewMergeFields"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable"]},{groupId:"insertInline",items:["menuBar:link","menuBar:bookmark","menuBar:comment","menuBar:insertMergeField"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:specialCharacters","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]}
6,{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function Lg(e){let t;return t="items"in e&&e.items?{items:e.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...e}:{items:En(Og),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...e},t}function Rg(e){let{normalizedConfig:t,locale:i,componentFactory:n,extraItems:r}=e;const o=En(t);return Bg(t,o,r),function(e,t){const i=t.removeItems,n=[];t.items=t.items.filter(e=>{let{menuId:t}=e;return!i.includes(t)||(n.push(t),!1)}),zg(t.items,e=>{e.groups=e.groups.filter(e=>{let{groupId:t}=e;return!i.includes(t)||(n.push(t),!1)});for(const t of e.groups)t.items=t.items.filter(e=>{const t=Wg(e);return!i.includes(t)||(n.push(t),!1)})});for(const t of i)n.includes(t)||b("menu-bar-item-could-not-be-removed",{menuBarConfig:e,itemName:t})}(t,o),Bg(t,o,o.addItems),function(e,t,i){zg(t.items,n=>{for(const r of n.groups)r.items=r.items.filter(r=>{const o="string"==typeof r&&!i.has(r);return o&&!t.isUsingDefaultConfig&&b("menu-bar-item-unavailable",{menuBarConfig:e,parentMenuConfig:En(n),componentName:r}),!o})})}(t,o,n),jg(t,o),function(e,t){const i=t.t,n={File:i({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:i({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:i({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:i({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:i({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:i({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:i({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:i({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:i({string:"Font",id:"MENU_BAR_MENU_FONT"})};zg(e.items,e=>{e.label in n&&(e.label=n[e.label])})}(o,i),o}function Bg(e,t,i){const n=[];if(0!=i.length){for(const e of i){const i=Hg(e.position),o=Ug(e.position);if("object"==typeof(r=e)&&"menu"in r)if(o){const r=t.items.findIndex(e=>e.menuId===o);-1!=r?"before"===i?(t.items.splice(r,0,e.menu),n.push(e)):"after"===i&&(t.items.splice(r+1,0,e.menu),n.push(e)):Ng(t,e.menu,o,i)&&n.push(e)}else"start"===i?(t.items.unshift(e.menu),n.push(e)):"end"===i&&(t.items.push(e.menu),n.push(e));else Vg(e)?zg(t.items,t=>{if(t.menuId===o)"start"===i?(t.groups.unshift(e.group),n.push(e)):"end"===i&&(t.groups.push(e.group),n.push(e));else{const r=t.groups.findIndex(e=>e.groupId===o);-1!==r&&("before"===i?(t.groups.splice(r,0,e.group),n.push(e)):"after"===i&&(t.groups.splice(r+1,0,e.group),n.push(e)))}}):Ng(t,e.item,o,i)&&n.push(e)}var r;for(const t of i)n.includes(t)||b("menu-bar-item-could-not-be-added",{menuBarConfig:e,addedItemConfig:t})}}function Ng(e,t,i,n){let r=!1;return zg(e.items,e=>{for(const{groupId:o,items:s}of e.groups){if(r)return;if(o===i)"start"===n?(s.unshift(t),r=!0):"end"===n&&(s.push(t),r=!0);else{const e=s.findIndex(e=>Wg(e)===i);-1!==e&&("before"===n?(s.splice(e,0,t),r=!0):"after"===n&&(s.splice(e+1,0,t),r=!0))}}}),r}function jg(e,t){const i=t.isUsingDefaultConfig;let n=!1;t.items=t.items.filter(t=>!!t.groups.length||(Fg(e,t,i),!1)),t.items.length?(zg(t.items,t=>{t.groups=t.groups.filter(e=>!!e.items.length||(n=!0,!1));for(const r of t.groups)r.items=r.items.filter(t=>!($g(t)&&!t.groups.length&&(Fg(e,t,i),n=!0,1)))}),n&&jg(e,t)):Fg(e,e,i)}function Fg(e,t,i){i||b("menu-bar-menu-empty",{menuBarConfig:e,emptyMenuConfig:t})}function zg(e,t){if(Array.isArray(e))for(const t of e)i(t);function i(e){t(e);for(const t of e.groups)for(const e of t.items)$g(e)&&i(e)}}function Vg(e){return"object"==typeof e&&"group"in e}function Hg(e){return e.startsWith("start")?"start":e.startsWith("end")?"end":e.startsWith("after")?"after":"before"}function Ug(e){const t=e.match(/^[^:]+:(.+)/);return t?t[1]:null}function Wg(e){return"string"==typeof e?e:e.menuId}function $g(e){return"object"==typeof e&&"menuId"in e}class Gg extends(Er()){editor;componentFactory;focusTracker;tooltipManager;poweredBy;evaluationBadge;ariaLiveAnnouncer;isReady=!1;_editableElementsMap=new Map;_focusableToolbarDefinitions=[];_extraMenuBarElements=[];_lastFocusedForeignElement=null;constructor(e){super();const t=e.editing.view;this.editor=e,this.componentFactory=new dg(e),this.focusTracker=new Yo,this.tooltipManager=new mg(e),this.poweredBy=new wg(e),this.evaluationBadge=new kg(e),this.ariaLiveAnnouncer=new Eg(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",()=>{this._bindBodyCollectionWithFocusTracker(),this.isReady=!0}),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}
6get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy(),this.evaluationBadge.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const i=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?i():this.once("ready",i)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.isRendered?(this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)):e.once("render",()=>{this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)}),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}extendMenuBar(e){this._extraMenuBarElements.push(e)}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_initMenuBar(e){const t=e.element;this.focusTracker.add(t),this.editor.keystrokes.listenTo(t);const i=Lg(this.editor.config.get("menuBar")||{});e.fillFromConfig(i,this.componentFactory,this._extraMenuBarElements),this.editor.keystrokes.set("Esc",(e,i)=>{t.contains(this.editor.ui.focusTracker.focusedElement)&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):this.editor.editing.view.focus(),i())}),this.editor.keystrokes.set("Alt+F9",(i,n)=>{t.contains(this.editor.ui.focusTracker.focusedElement)||(this._saveLastFocusedForeignElement(),e.isFocusBorderEnabled=!0,e.focus(),n())})}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const i=e.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const e=this.editor;let t;e.keystrokes.set("Alt+F10",(e,i)=>{this._saveLastFocusedForeignElement();const n=this._getCurrentFocusedToolbarDefinition();n&&t||(t=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e<t.length;e++){const e=t.shift();if(t.push(e),e!==n&&this._focusFocusableCandidateToolbar(e)){n&&n.options.afterBlur&&n.options.afterBlur();break}}i()}),e.keystrokes.set("Esc",(t,i)=>{const n=this._getCurrentFocusedToolbarDefinition();n&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):e.editing.view.focus(),n.options.afterBlur&&n.options.afterBlur(),i())})}_saveLastFocusedForeignElement(){const e=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(e)&&!Array.from(this.editor.editing.view.domRoots.values()).includes(e)&&(this._lastFocusedForeignElement=e)}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:i,options:n}=t;(mo(i.element)||n.beforeFocus)&&e.push(t)}return e.sort((e,t)=>qg(e)-qg(t)),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:i}}=e;return i&&i(),!!mo(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const i={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=i.top,t.viewportOffset.bottom+=i.bottom,t.viewportOffset.left+=i.left,t.viewportOffset.right+=i.right}_bindBodyCollectionWithFocusTracker(){const e=this.view.body;for(const t of e)this.focusTracker.add(t.element);e.on("add",(e,t)=>{this.focusTracker.add(t.element)}),e.on("remove",(e,t)=>{this.focusTracker.remove(t.element)})}}function qg(e){const{toolbarView:t,options:i}=e;let n=10;return mo(t.element)&&n--,i.isContextual&&n--,n}i.EditorUI=Gg;class Yg extends Df{body;menuBarView;constructor(e){super(e),this.body=new sp(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}i.EditorUIView=Yg;class Zg extends Yg{top;main;_voiceLabelView;constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createV
6oiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new tp;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}i.BoxedEditorUIView=Zg;class Xg extends Df{name=null;_editingView;_editableElement;_hasExternalElement;constructor(e,t,i){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change(i=>{const n=e.document.getRoot(t.name);i.addClass(t.isFocused?"ck-focused":"ck-blurred",n),i.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)})}e.isRenderingInProgress?function i(n){e.once("change:isRenderingInProgress",(e,r,o)=>{o?i(n):t(n)})}(this):t(this)}}class Kg extends Xg{_options;constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(e,t,i),this._options=n,this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView;e.change(t=>{const i=e.document.getRoot(this.name);t.setAttribute("aria-label",this.getEditableAriaLabel(),i)})}getEditableAriaLabel(){const e=this.locale.t,t=this._options.label,i=this._editableElement,n=this.name;if("string"==typeof t)return t;if("object"==typeof t)return t[n];if("function"==typeof t)return t(this);if(i){const e=i.getAttribute("aria-label");if(e)return e}return e("Rich Text Editor. Editing area: %0",n)}}i.InlineEditableUIView=Kg;class Jg extends Df{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise(e=>(this.on("loaded",e),super.render()))}}i.IframeView=Jg;class Qg extends _s{static get pluginName(){return"Notification"}static get isOfficialPlugin(){return!0}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}i.Notification=Qg;class ev extends(Er()){constructor(e,t){super(),t&&ht(this,t),e&&this.set(e)}}i.ViewModel=ev;const tv=co("px");class iv extends ps{positionLimiter;visibleStack;_viewToStack=new Map;_idToStack=new Map;_view=null;_rotatorView=null;_fakePanelsView=null;static get pluginName(){return"ContextualBalloon"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.decorate("getPositionOptions"),this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new v("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new v("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition()}getPositionOptions(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new v("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new om(this.editor.locale),this.editor.ui.view.body.add(this._view),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new nv(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,i)=>{if(i<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,i])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new rv(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView(e){let{view:t,balloonClassName:i="",withArrow:n=!0,singleViewMode:r=!1}=e;this.view.class=i,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition(),r&&(this._singleViewMode=!0)}}i.ContextualBalloon=iv;class nv extends Df{focusTracker;buttonPrevView;buttonNextView;content;constructor(e){super(e);const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Yo,this.buttonPrevView=this._createButtonView(t("Previous"),Yd.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),Yd.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new Ff(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class rv extends Df{content;_balloonPanelView;constructor(e,t){super(e);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",e=>
6e?"":"ck-hidden")],style:{top:i.to("top",tv),left:i.to("left",tv),width:i.to("width",tv),height:i.to("height",tv)}},children:this.content}),this.on("change:numberOfPanels",(e,t,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new Df;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new io(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}const ov=co("px");class sv extends Df{content;contentPanelElement;_contentPanelPlaceholder;constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new hf({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?ov(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new hf({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",e=>e?ov(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_stickyTopOffset",e=>e?ov(e):e),bottom:t.to("_stickyBottomOffset",e=>e?ov(e):e),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(r.document,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()})}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const e=new io(this.limiterElement);let t=e.getVisible();if(t){const e=new io(r.window);e.top+=this.viewportTopOffset,e.height-=this.viewportTopOffset,t=t.getIntersection(e)}if(t&&e.top<t.top){const i=t.top;if(i+this._contentPanelRect.height+this.limiterBottomOffset>t.bottom){const i=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-i>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(i):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(i):this._unstick()}else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=ov(-r.window.scrollX)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=ov(-r.window.scrollX)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new io(this.contentPanelElement)}}i.StickyPanelView=sv;class av extends Bp{iconView;resetButtonView;_viewConfig;constructor(e,t){const i=e.t,n=Object.assign({},{showResetButton:!0,showIcon:!0,creator:Am},t);super(e,n.creator),this.label=t.label,this._viewConfig=n,this._viewConfig.showIcon&&(this.iconView=new Nf,this.iconView.content=Yd.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new Ff(e),this.resetButtonView.set({label:i("Clear"),icon:Yd.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",()=>{this.reset(),this.focus(),this.fire("reset")}),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",e=>!e),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class lv extends Df{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",e=>!e)],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}i.SearchInfoView=lv;class cv extends Df{focusTracker;children;_focusCycler;constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new Yo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new Hf({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class uv extends Df{focusTracker;keystrokes;resultsView;filteredView;infoView;queryView;focusCycler;_config;constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new Yo,this.keystrokes=new Jo,this.resultsView=new cv(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new lv,this._enableDefaultInfoViewBehavior(),this.on("render",()=>{this.search("")})),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new Hf({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",(e,t)=>{let{resultsCount:i,totalItemsCount:n}=t;this.resultsCount=i,this.totalItemsCount=n}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search(""),this.filteredView.element.scrollTo(0,0)}search(e){const t=e?new RegExp(ur(e),"ig"):null,i=this.filteredView.filter(t);this.fire("search",{query:e,...i})}_createSearchTextQueryView(){const e=new av(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",()=>{this.search(e.fieldView.element.value)}),e.on("reset",()=>this.reset()),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function i(e,t){let{query:i,resultsCount:n,totalItemsCount:r}=t;return"function"==typeof e?e(i,n,r):e}this.on("search",(n,r)=>{if(r.resultsCount)t.set({isVisible:!1});else{const n=this._config.infoView&&this._config.infoView.text;let o,s;r.totalItemsCount?n&&n.notFound?(o=n.notFound.primary,s=n.notFound.secondary):(o=e("No results found"),s=""):n&&n.noSearchableItems?(o=n.noSearchableItems.primary,s=n.noSearchableItems.secondary):(o=e("No searchable items"),s=""),t.set({primaryText:i(o,r),secondaryText:i(s,r),isVisible:!0})}})}}i.SearchTextView=uv;class hv extends uv{_config;constructor(e,t){super(e,t),this._config=t;const i=co("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const n=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[n.if("isVisible","ck-hidden",e=>!e),n.to("_position",e=>`ck-search__results_${e}`)],style:{width:n.to("_width",i)}}}),this.focusTracker.on("change:isFocused",(e,i,n)=>{this._updateResultsVisibility(),n?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()}),this.on("search",()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()}),this.keystrokes.set("esc",(e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())}),this.listenTo(r.document,"scroll",()=>{this._updateResultsViewWidthAndPosition()}),this.on("change:isEnabled",()=>{this._updateResultsVisibility()}),this.filteredView.on("execute",(e,t)=>{let{value:i}=t;this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=i,this.resultsView.isVisible=!1}),this.resultsView.on("change:isVisible",()=>{this._updateResultsViewWidthAndPosition()})}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new io(this.queryView.fieldView.element).width;const e=hv._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:hv.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}static defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})];static _getOptimalPosition=go}i.AutocompleteView=hv;class dv extends Df{constructor(){super(),this.set("text",void 0),this.setTemplate({tag:"span",attributes:{class:["ck","ck-highlighted-text"]}}),this.on("render",()=>{this.on("change:text",()=>{this._updateInnerHTML(this.text)}),this._updateInnerHTML(this.text)})}highlightText(e){this._updateInnerHTML(function(e,t){if(!t)return ar(e);const i=[];let n=0,r=t.exec(e);for(;null!==r;){const o=r.index;o!==n&&i.push({text:e.substring(n,o),isMatch:!1}),i.push({text:r[0],isMatch:!0}),n=t.lastIndex,r=t.exec(e)}return n!==e.length&&i.push({text:e.substring(n),isMatch:!1}),i.map(e=>(e.text=ar(e.text),e)).map(e=>e.isMatch?`<mark>${e.text}</mark>`:e.text).join("")}(this.text||"",e))}_updateInnerHTML(e){this.element.innerHTML=e||""}}i.HighlightedTextView=dv;i.ButtonLabelWithHighlightView=class extends dv{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-button__label"],style:e.to("style"),id:e.to("id")}})}};i.LabelWithHighlightView=class extends dv{id;constructor(){super(),this.set("for",void 0);const e=this.bindTemplate;this.id=`ck-editor__label_${p()}`,this.extendTemplate({attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")}})}};i.SpinnerView=class extends Df{constructor(){super(),this.set("isVisible",!1);const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-spinner-container",e.if("isVisible","ck-hidden",e=>!e)]},children:[{tag:"span",attributes:{class:["ck","ck-spinner"]}}]})}};const fv=co("px");class pv extends ps{toolbarView;focusTracker;_balloonConfig;_resizeObserver=null;_balloon;_fireSelectionChangeDebounced;static get pluginName(){return"BalloonToolbar"}static get isOfficialPlugin(){return!0}static get requires(){return[iv]}constructor(e){super(e),this._balloonConfig=dm(e.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new Yo,this._trackFocusableEditableElements(),this.focusTracker.add(this.toolbarView),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._balloon=e.plugins.get(iv),this._fireSelectionChangeDebounced=Qn(()=>this.fire("_selectionChangeDebounced"),200),this.decorate("show")}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",(e,t,i)=>{const n=this._balloon.visibleView===this.toolbarView;!i&&n?this.hide():i&&this.show()}),this.listenTo(t,"change:range",(e,i)=>{(i.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()}),this.listenTo(this,"_selectionChangeDebounced",()=>{this.editor.editing.view.document.isFocused&&this.show()}),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",()=>{const t=e.ui.view.editable.element;this._resizeObserver=new ao(t,e=>{this.toolbarView.maxWidth=fv(.9*e.contentRect.width)})}),this.listenTo(this.toolbarView,"groupedItemsUpdate",()=>{this._updatePosition()}),e.ui.once("ready",()=>{this.toolbarView.fillFromConfig(this._balloonConfig,this.editor.ui.componentFactory)})}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,i=new pm(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return i.ariaLabel=e("Editor contextual toolbar"),i.render(),i}show(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.editor,i=t.model.document.selection,n=t.model.schema;this._balloon.hasView(this.toolbarView)||i.isCollapsed&&!e||function(e,t){return 1!==e.rangeCount&&[...e.getRanges()].every(e=>{const i=e.getContainedElement();return i&&t.isSelectable(i)})}(i,n)||Array.from(this.toolbarView.items).every(e=>void 0!==e.isEnabled&&!e.isEnabled)||(this.listenTo(this.editor.ui,"update",()=>{this._updatePosition()}),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_trackFocusableEditableElements(){const{editor:e,focusTracker:t}=this,{editing:i}=e;i.view.addObserver(class extends Ja{observe(e){t.add(e)}stopObserving(e){t.remove(e)}})}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,i=t.selection,n=t.selection.isBackward;return{target:()=>{const t=n?i.getFirstRange():i.getLastRange(),r=io.getDomRangeRects(e.domConverter.viewRangeToDom(t));return n?r[0]:(r.length>1&&0===r[r.length-1].width&&r.pop(),r[r.length-1])},positions:this._getBalloonPositions(n)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=s.isSafari&&s.isiOS?om.generatePositions({heightOffset:Math.max(om.arrowHeightOffset,Math.round(20/r.window.visualVie
6wport.scale))}):om.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}i.BalloonToolbar=pv;const mv=co("px");class gv extends Ff{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",e=>mv(e)),left:t.to("left",e=>mv(e))}}})}}const vv=co("px");i.BlockToolbar=class extends ps{toolbarView;panelView;buttonView;_resizeObserver=null;_blockToolbarConfig;static get pluginName(){return"BlockToolbar"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this._blockToolbarConfig=dm(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),Of({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}init(){const e=this.editor,t=e.t,i=t("Click to edit block"),n=t("Drag to move"),r=t("Edit block"),o=e.plugins.has("DragDropBlockToolbar"),s=o?`${i}\n${n}`:r;this.buttonView.label=s,o&&(this.buttonView.element.dataset.ckeTooltipClass="ck-tooltip_multi-line"),this.listenTo(e.model.document.selection,"change:range",(e,t)=>{t.directChange&&this._hidePanel()}),this.listenTo(e.ui,"update",()=>this._updateButton()),this.listenTo(e,"change:isReadOnly",()=>this._updateButton(),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>this._updateButton()),this.listenTo(this.buttonView,"change:isVisible",(e,t,i)=>{i?this.buttonView.listenTo(window,"resize",()=>this._updateButton()):(this.buttonView.stopListening(window,"resize"),this._hidePanel())}),this._repositionButtonOnScroll(),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()}),e.ui.once("ready",()=>{this.toolbarView.fillFromConfig(this._blockToolbarConfig,this.editor.ui.componentFactory);for(const e of this.toolbarView.items)e.on("execute",()=>this._hidePanel(!0),{priority:"high"})})}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,i=new pm(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return i.ariaLabel=e("Editor block content toolbar"),i}_createPanelView(){const e=this.editor,t=new om(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),this.toolbarView.keystrokes.set("Esc",(e,t)=>{this._hidePanel(!0),t()}),t}_createButtonView(){const e=this.editor,t=e.t,i=new gv(e.locale),n=this._blockToolbarConfig.icon,r=fm[n]||n||fm.dragIndicator;return i.set({label:t("Edit block"),icon:r,withText:!1}),i.bind("isOn").to(this.panelView,"isVisible"),i.bind("tooltip").to(this.panelView,"isVisible",e=>!e),this.listenTo(i,"execute",()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()}),this.listenTo(i,"change:isEnabled",(e,t,i)=>{!i&&this.panelView.isVisible&&this._hidePanel(!1)}),e.ui.view.body.add(i),i}_updateButton(){const e=this.editor,t=e.model,i=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(!e.model.canEditAt(e.model.document.selection))return void this._hideButton();const n=Array.from(t.document.selection.getSelectedBlocks())[0];if(!n||Array.from(this.toolbarView.items).every(e=>!e.isEnabled))return void this._hideButton();const r=i.domConverter.mapViewToDom(e.editing.mapper.toViewElement(n));this.buttonView.isVisible=!0,this._setupToolbarResize(),this._attachButtonToElement(r),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show();const t=this._getSelectedEditableElement();this.toolbarView.maxWidth=this._getToolbarMaxWidth(t),this.panelView.pin({target:this.buttonView.element,limiter:t}),e||this.toolbarView.items.get(0).focus()}_getSelectedEditableElement(){const e=this.editor.model.document.selection.getFirstRange().root.rootName;return this.editor.ui.getEditableElement(e)}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_repositionButtonOnScroll(){const{buttonView:e}=this;let t=!1;const i=(e,i)=>{if(t)return;const n=this._getSelectedEditableElement();(i.target===r.document||Yr(n).includes(i.target))&&(t=!0,r.window.requestAnimationFrame(()=>{this._updateButton(),t=!1}))};e.on("change:isVisible",(t,n,o)=>{o?e.listenTo(r.document,"scroll",i,{useCapture:!0,usePassive:!0}):e.stopListening(r.document,"scroll",i)})}_attachButtonToElement(e){const t=this.buttonView.element,i=this._getSelectedEditableElement(),n=window.getComputedStyle(e),r=new io(i),o=parseInt(n.paddingTop,10),s=parseInt(n.lineHeight,10)||1.2*
6parseInt(n.fontSize,10),a=new io(t),l=new io(e);let c;c="ltr"===this.editor.locale.uiLanguageDirection?r.left-a.width:r.right;const u=l.top+o+(s-a.height)/2;a.moveTo(c,u);const h=a.toAbsoluteRect();this.buttonView.top=h.top,this.buttonView.left=h.left,this._clipButtonToViewport(this.buttonView,i)}_clipButtonToViewport(e,t){const i=new io(e.element),n=new io(t).getVisible(),r=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];e.element.style.clipPath=i.length?`polygon(${i.join(",")})`:""},o=t=>{e.isEnabled=!t,e.element.style.pointerEvents=t?"none":""};if(n&&n.bottom<i.bottom){const e=Math.min(i.height,i.bottom-n.bottom);o(e>=i.height),r("0 0","100% 0",`100% calc(100% - ${vv(e)})`,`0 calc(100% - ${vv(e)}`)}else if(n&&n.top>i.top){const e=Math.min(i.height,n.top-i.top);o(e>=i.height),r(`0 ${vv(e)}`,`100% ${vv(e)}`,"100% 100%","0 100%")}else o(!1),r()}_setupToolbarResize(){const e=this._getSelectedEditableElement();this._blockToolbarConfig.shouldNotGroupWhenFull||(this._resizeObserver&&this._resizeObserver.element!==e&&(this._resizeObserver.destroy(),this._resizeObserver=null),this._resizeObserver||(this._resizeObserver=new ao(e,()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth(e)})))}_getToolbarMaxWidth(e){const t=new io(e),i=new io(this.buttonView.element),n="rtl"===this.editor.locale.uiLanguageDirection?i.left-t.right+i.width:t.left-i.left;return vv(t.width+n)}};class bv extends Jf{arrowView;constructor(e){super(e);const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",e=>String(e)),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Nf;return e.content=dp,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}class yv extends Df{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",e=>`ck-menu-bar__menu__panel_position_${e}`),t.if("isVisible","ck-hidden",e=>!e)],tabindex:"-1"},children:this.children,on:{selectstart:t.to(e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()})}})}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.children.length&&(1===e?this.children.first.focus():this.children.last.focus())}}class wv extends Df{buttonView;panelView;focusTracker;keystrokes;constructor(e){super(e);const t=this.bindTemplate;this.buttonView=new bv(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new yv(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Jo,this.focusTracker=new Yo,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("parentMenuView","ck-menu-bar__menu_top-level",e=>!e)]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),Pg.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(Pg.openOnButtonClick(this),Pg.openOnArrowRightKey(this),Pg.closeOnArrowLeftKey(this),Pg.openAndFocusOnEnterKeyPress(this),Pg.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),Pg.openAndFocusPanelOnArrowDownKey(this),Pg.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",(e,t)=>{this.fire("arrowright"),t()}),this.keystrokes.set("arrowleft",(e,t)=>{this.fire("arrowleft"),t()})}_repositionPanelOnOpen(){this.on("change:isOpen",(e,t,i)=>{if(!i)return;const n=wv._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=n?n.name:this._defaultMenuPositionName})}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:i,northWest:n,westSouth:r,eastSouth:o,westNorth:s,eastNorth:a}=Dg;return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?[o,a,r,s]:[e,t,i,n]:this.parentMenuView?[r,s,o,a]:[t,e,n,i]}get _defaultMenuPositionName(){return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?"es":"se":this.parentMenuView?"ws":"sw"}static _getOptimalPosition=go}i.MenuBarMenuView=wv;class _v extends Kp{constructor(e){super(e),this.role="menu",this.items.on("change",this._setItemsCheckSpace.bind(this))}_setItemsCheckSpace(){const e=Array.from(this.items).some(e=>{const t=kv(e);return t&&t.isToggleable});
6this.items.forEach(t=>{const i=kv(t);i&&(i.hasCheckSpace=e)})}}function kv(e){return e instanceof Yp?e.children.map(e=>function(e){return"object"==typeof e&&"buttonView"in e&&e.buttonView instanceof Ff}(e)?e.buttonView:e).find(e=>e instanceof Jf):null}i.MenuBarMenuListView=_v;class xv extends cp{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}i.MenuBarMenuListItemFileDialogButtonView=xv;const Cv=["mouseenter","arrowleft","arrowright","change:isOpen"];class Sv extends Df{children;menus=[];constructor(e){super(e);const t=e.t,i=this.bindTemplate;this.set({isOpen:!1,isFocusBorderEnabled:!1}),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar",i.if("isFocusBorderEnabled","ck-menu-bar_focus-border-enabled")],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=Rg({normalizedConfig:e,locale:this.locale,componentFactory:t,extraItems:i}).items.map(e=>this._createMenu({componentFactory:t,menuDefinition:e}));this.children.addMany(n)}render(){super.render(),Mg.toggleMenusAndFocusItemsOnHover(this),Mg.closeMenusWhenTheBarCloses(this),Mg.closeMenuWhenAnotherOnTheSameLevelOpens(this),Mg.focusCycleMenusOnArrows(this),Mg.closeOnClickOutside(this),Mg.enableFocusHighlightOnInteraction(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}registerMenu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t?(e.delegate(...Cv).to(t),e.parentMenuView=t):e.delegate(...Cv).to(this,e=>"menu:"+e),e._attachBehaviors(),this.menus.push(e)}_createMenu(e){let{componentFactory:t,menuDefinition:i,parentMenuView:n}=e;const r=this.locale,o=new wv(r);return this.registerMenu(o,n),o.buttonView.set({label:i.label}),o.once("change:isOpen",()=>{const e=new _v(r);e.ariaLabel=i.label,o.panelView.children.add(e),e.items.addMany(this._createMenuItems({menuDefinition:i,parentMenuView:o,componentFactory:t}))}),o}_createMenuItems(e){let{menuDefinition:t,parentMenuView:i,componentFactory:n}=e;const r=this.locale,o=[];for(const e of t.groups){for(const t of e.items){const e=new Ig(r,i);if(te(t))e.children.add(this._createMenu({componentFactory:n,menuDefinition:t,parentMenuView:i}));else{const r=this._createMenuItemContentFromFactory({componentName:t,componentFactory:n,parentMenuView:i});if(!r)continue;e.children.add(r)}o.push(e)}e!==t.groups[t.groups.length-1]&&o.push(new Zp(r))}return o}_createMenuItemContentFromFactory(e){let{componentName:t,parentMenuView:i,componentFactory:n}=e;const r=n.create(t);return r instanceof wv||r instanceof ep||r instanceof xv?(this._registerMenuTree(r,i),r.on("execute",()=>{this.close()}),r):(b("menu-bar-component-unsupported",{componentName:t,componentView:r}),null)}_registerMenuTree(e,t){if(!(e instanceof wv))return void e.delegate("mouseenter").to(t);this.registerMenu(e,t);const i=e.panelView.children.filter(e=>e instanceof _v)[0];if(!i)return void e.delegate("mouseenter").to(t);const n=i.items.filter(e=>e instanceof Yp);for(const t of n)this._registerMenuTree(t.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",(t,i,n)=>{clearTimeout(e),n?this.isOpen=!0:e=setTimeout(()=>{this.isOpen=Array.from(this.children).some(e=>e.isOpen)},0)})}}i.MenuBarView=Sv;const Ev=new Map([["left",Yd.alignLeft],["right",Yd.alignRight],["center",Yd.alignCenter],["justify",Yd.alignJustify]]);class Tv extends ps{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}static get isOfficialPlugin(){return!0}init(){const e=sf(this.editor.config.get("alignment.options"));e.map(e=>e.name).filter(rf).forEach(e=>this._addButton(e)),this._addToolbarDropdown(e),this._addMenuBarMenu(e)}_addButton(e){this.editor.ui.componentFactory.add(`alignment:${e}`,t=>this._createButton(t,e))}_createButton(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.editor,r=n.commands.get("alignment"),o=new Ff(e);return o.set({label:this.localizedOptionTitles[t],icon:Ev.get(t),tooltip:!0,isToggleable:!0,...i}),o.bind("isEnabled").to(r),o.bind("isOn").to(r,"value",e=>e===t),this.listenTo(o,"execute",()=>{n.execute("alignment",{value:t}),n.editing.view.focus()}),o}_addToolbarDropdown(e){const t=this.editor;t.ui.componentFactory.add("alignment",i=>{const n=ym(i),r="rtl"===i.uiLanguageDirection?"w":"e",o=i.t;_m(n,()=>e.map(e=>this._createButton(i,e.name,{tooltipPosition:r})),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:o("Text alignment toolbar")}),n.buttonView.set({label:o("Text alignment"),tooltip:!0}),n.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===i.contentLanguageDirection?Ev.get("right"):Ev.get("left"),a=t.commands.get("alignment");return n.buttonView.bind("icon").to(a,"value",e=>Ev.get(e)||s),n.bind("isEnabled").to(a,"isEnabled"),this.listenTo(n,"execute",()=>{t.editing.view.focus()}),n})}_addMenuBarMenu(e){const t=this.editor;t.ui.componentFactory.add("menuBar:alignment",i=>{const n=t.commands.get("alignment"),r=i.t,o=new wv(i),s=new _v(i);o.bind("isEnabled").to(n),s.set({ariaLabel:r("Text alignment"),role:"menu"}),o.buttonView.set({label:r("Text alignment")});for(const r of e){const e=new Ig(i,o),a=new ep(i);a.delegate("execute").to(o),a.set({label:this.localizedOptionTitles[r.name],icon:Ev.get(r.name),role:"menuitemcheckbox",isToggleable:!0}),a.on("execute",()=>{t.execute("alignment",{value:r.name}),t.editing.view.focus()}),a.bind("isOn").to(n,"value",e=>e===r.name),a.bind("isEnabled").to(n,"isEnabled"),e.children.add(a),s.items.add(e)}return o.panelView.children.add(s),o})}}i.AlignmentUI=Tv;i.Alignment=class extends ps{static get requires(){return[cf,Tv]}static get pluginName(){return"Alignment"}static get isOfficialPlugin(){return!0}};class Av{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("
6change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isLocked&&!e||(this._batch=null,this._size=0)}}class Iv extends gs{_buffer;constructor(e,t){super(e),this._buffer=new Av(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document,n=e.text||"",r=n.length;let o=i.selection;if(e.selection?o=e.selection:e.range&&(o=t.createSelection(e.range)),!t.canEditAt(o))return;const s=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock();const a=Array.from(i.selection.getAttributes());t.deleteContent(o),n&&t.insertContent(e.createText(n,a),o),s?e.setSelection(s):o.is("documentSelection")||e.setSelection(o),this._buffer.unlock(),this._buffer.input(r)})}}i.InsertTextCommand=Iv;const Mv=["insertText","insertReplacementText"],Pv=[...Mv,"insertCompositionText"];class Dv extends Ja{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(ol);const t=s.isAndroid?Pv:Mv,i=e.document;i.on("beforeinput",(n,r)=>{if(!this.isEnabled)return;const{data:o,targetRanges:s,inputType:a,domEvent:l}=r;if(!t.includes(a))return;this.focusObserver.flush();const c=new d(i,"insertText");i.fire(c,new Qa(e,l,{text:o,selection:e.createSelection(s)})),c.stop.called&&n.stop()}),s.isAndroid||i.on("compositionend",(t,n)=>{let{data:r,domEvent:o}=n;this.isEnabled&&r&&i.fire("insertText",new Qa(e,o,{text:r}))},{priority:"lowest"})}observe(){}stopObserving(){}}class Ov extends ps{_compositionQueue;static get pluginName(){return"Input"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,i=e.editing.view,n=e.editing.mapper,r=t.document.selection;this._compositionQueue=new Lv(e),i.addObserver(Dv);const o=new Iv(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",o),e.commands.add("input",o),this.listenTo(i.document,"insertText",(o,a)=>{i.document.isComposing||a.preventDefault(),s.isAndroid&&i.document.isComposing&&this._compositionQueue.flush("next beforeinput");const{text:l,selection:c}=a;let u;u=c?Array.from(c.getRanges()).map(e=>n.toModelRange(e)):Array.from(r.getRanges());let h=l;if(s.isAndroid){const e=Array.from(u[0].getItems()).reduce((e,t)=>e+(t.is("$textProxy")?t.data:""),"");if(e&&(e.length<=h.length?h.startsWith(e)&&(h=h.substring(e.length),u[0].start=u[0].start.getShiftedBy(e.length)):e.startsWith(h)&&(u[0].start=u[0].start.getShiftedBy(h.length),h="")),0==h.length&&u[0].isCollapsed)return}const d={text:h,selection:t.createSelection(u)};s.isAndroid&&i.document.isComposing?this._compositionQueue.push(d):(e.execute("insertText",d),i.scrollToTheSelection())}),s.isAndroid?this.listenTo(i.document,"keydown",(e,n)=>{!r.isCollapsed&&229==n.keyCode&&i.document.isComposing&&Rv(t,o)}):this.listenTo(i.document,"compositionstart",()=>{r.isCollapsed||Rv(t,o)}),s.isAndroid?(this.listenTo(i.document,"mutations",(e,t)=>{let{mutations:r}=t;if(i.document.isComposing)for(const{node:e}of r){const t=Bv(e,n),i=n.toModelElement(t);if(this._compositionQueue.isComposedElement(i))return void this._compositionQueue.flush("mutations")}}),this.listenTo(i.document,"compositionend",()=>{this._compositionQueue.flush("composition end")}),this.listenTo(i.document,"compositionend",()=>{const e=[];for(const t of this._compositionQueue.flushComposedElements()){const i=n.toViewElement(t);i&&e.push({type:"children",node:i})}e.length&&i.document.fire("mutations",{mutations:e})},{priority:"lowest"})):this.listenTo(i.document,"compositionend",()=>{i.document.fire("mutations",{mutations:[]})},{priority:"lowest"})}destroy(){super.destroy(),this._compositionQueue.destroy()}}i.Input=Ov;class Lv{editor;flushDebounced=Qn(()=>this.flush("timeout"),50);_queue=[];_compositionElements=new Set;constructor(e){this.editor=e}destroy(){for(this.flushDebounced.cancel(),this._compositionElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(e){const t={text:e.text};
6if(e.selection){t.selectionRanges=[];for(const i of e.selection.getRanges())t.selectionRanges.push(Fl.fromRange(i)),this._compositionElements.add(i.start.parent)}this._queue.push(t),this.flushDebounced()}shift(){const e=this._queue.shift(),t={text:e.text};if(e.selectionRanges){const i=e.selectionRanges.map(e=>function(e){const t=e.toRange();return e.detach(),"$graveyard"==t.root.rootName?null:t}(e)).filter(e=>!!e);i.length&&(t.selection=this.editor.model.createSelection(i))}return t}flush(e){const t=this.editor,i=t.model,n=t.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const r=t.commands.get("insertText").buffer;i.enqueueChange(r.batch,()=>{for(r.lock();this._queue.length;){const e=this.shift();t.execute("insertText",e)}r.unlock()}),n.scrollToTheSelection()}isComposedElement(e){return this._compositionElements.has(e)}flushComposedElements(){const e=Array.from(this._compositionElements);return this._compositionElements.clear(),e}}function Rv(e,t){if(!t.isEnabled)return;const i=t.buffer;i.lock(),e.enqueueChange(i.batch,()=>{e.deleteContent(e.document.selection)}),i.unlock()}function Bv(e,t){let i=e.is("$text")?e.parent:e;for(;!t.toModelElement(i);)i=i.parent;return i}class Nv extends gs{direction;_buffer;constructor(e,t){super(e),this.direction=t,this._buffer=new Av(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document;t.enqueueChange(this._buffer.batch,n=>{this._buffer.lock();const r=n.createSelection(e.selection||i.selection);if(!t.canEditAt(r))return;const o=e.sequence||1,s=r.isCollapsed;if(r.isCollapsed&&t.modifySelection(r,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(o))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(r,o))return void this.editor.execute("paragraph",{selection:r});if(r.isCollapsed)return;let a=0;
6r.getFirstRange().getMinimalFlatRanges().forEach(e=>{a+=Lr(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(r,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),n.setSelection(r),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i);if(!i.isCollapsed||!i.containsEntireContent(n))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const r=n.getChild(0);return!r||!r.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i),r=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(r,n),e.setSelection(r,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const i=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const n=e.getFirstPosition(),r=i.schema.getLimitElement(n),o=r.getChild(0);return n.parent==o&&!!e.containsEntireContent(o)&&!!i.schema.checkChild(r,"paragraph")&&"paragraph"!=o.name}}const jv="word",Fv="selection",zv="backward",Vv="forward",Hv={deleteContent:{unit:Fv,direction:zv},deleteContentBackward:{unit:"codePoint",direction:zv},deleteWordBackward:{unit:jv,direction:zv},deleteHardLineBackward:{unit:Fv,direction:zv},deleteSoftLineBackward:{unit:Fv,direction:zv},deleteContentForward:{unit:"character",direction:Vv},deleteWordForward:{unit:jv,direction:Vv},deleteHardLineForward:{unit:Fv,direction:Vv},deleteSoftLineForward:{unit:Fv,direction:Vv}};class Uv extends Ja{constructor(e){super(e);const t=e.document;let i=0;t.on("keydown",()=>{i++}),t.on("keyup",()=>{i=0}),t.on("beforeinput",(n,r)=>{if(!this.isEnabled)return;const{targetRanges:o,domEvent:a,inputType:l}=r,c=Hv[l];if(!c)return;const u={direction:c.direction,unit:c.unit,sequence:i};u.unit==Fv&&(u.selectionToRemove=e.createSelection(o[0])),"deleteContentBackward"===l&&(s.isAndroid&&(u.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let i=0;for(const{nextPosition:e,item:n}of t){if(e.parent.is("$text")){const t=e.parent.data,n=e.offset;if(us(t,n)||hs(t,n)||fs(t,n))continue;i++}else(n.is("containerElement")||n.is("emptyElement"))&&i++;if(i>1)return!0}return!1}(o)&&(u.unit=Fv,u.selectionToRemove=e.createSelection(o)));const h=new ta(t,"delete",o[0]);t.fire(h,new Qa(e,a,u)),h.stop.called&&n.stop()}),s.isBlink&&function(e){const t=e.view,i=t.document;let n=null,r=!1;function o(e){return e==Oo.backspace||e==Oo.delete}function s(e){return e==Oo.backspace?zv:Vv}i.on("keydown",(e,t)=>{let{keyCode:i}=t;n=i,r=!1}),i.on("keyup",(a,l)=>{let{keyCode:c,domEvent:u}=l;const h=i.selection,d=e.isEnabled&&c==n&&o(c)&&!h.isCollapsed&&!r;if(n=null,d){const e=h.getFirstRange(),n=new ta(i,"delete",e),r={unit:Fv,direction:s(c),selectionToRemove:h};i.fire(n,new Qa(t,u,r))}}),i.on("beforeinput",(e,t)=>{let{inputType:i}=t;const a=Hv[i];o(n)&&a&&a.direction==s(n)&&(r=!0)},{priority:"high"}),i.on("beforeinput",(e,t)=>{let{inputType:i,data:r}=t;n==Oo.delete&&"insertText"==i&&"�"==r&&e.stop()},{priority:"high"})}(this)}observe(){}stopObserving(){}}class Wv extends ps{_undoOnBackspace;static get pluginName(){return"Delete"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,i=t.document,n=e.model.document;t.addObserver(Uv),this._undoOnBackspace=!1;const r=new Nv(e,"forward");e.commands.add("deleteForward",r),e.commands.add("forwardDelete",r),e.commands.add("delete",new Nv(e,"backward")),this.listenTo(i,"delete",(n,r)=>{i.isComposing||r.preventDefault();const{direction:o,sequence:s,selectionToRemove:a,unit:l}=r,c="forward"===o?"deleteForward":"delete",u={sequence:s};if("selection"==l){const t=Array.from(a.getRanges()).map(t=>e.editing.mapper.toModelRange(t));u.selection=e.model.createSelection(t)}else u.unit=l;e.execute(c,u),t.scrollToTheSelection()},{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(i,"delete",(t,i)=>{this._undoOnBackspace&&"backward"==i.direction&&1==i.sequence&&"codePoint"==i.unit&&(this._und
6oOnBackspace=!1,e.execute("undo"),i.preventDefault(),t.stop())},{context:"$capture"}),this.listenTo(n,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}i.Delete=Wv;class $v extends ps{static get requires(){return[Ov,Wv]}static get pluginName(){return"Typing"}static get isOfficialPlugin(){return!0}}function Gv(e,t){let i=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce((e,n)=>{let{item:r}=n;return r.is("$text")||r.is("$textProxy")?e+r.data:(i=t.createPositionAfter(r),"")},""),range:t.createRange(i,e.end)}}i.Typing=$v;class qv extends(Er()){model;testCallback;_hasMatch;constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",(t,i)=>{let{directChange:n}=i;n&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.model,n=i.document.selection,r=i.createRange(i.createPositionAt(n.focus.parent,0),n.focus),{text:o,range:s}=Gv(r,i),a=this.testCallback(o);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const i=Object.assign(t,{text:o,range:s});"object"==typeof a&&Object.assign(i,a),this.fire(`matched:${e}`,i)}}}i.TextWatcher=qv;class Yv extends ps{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,i=e.editing.view,n=e.locale,r=t.document.selection;this.listenTo(i.document,"arrowKey",(e,t)=>{if(!r.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const i=t.keyCode==Oo.arrowright,o=t.keyCode==Oo.arrowleft;if(!i&&!o)return;const s=n.contentLanguageDirection;let a=!1;a="ltr"===s&&i||"rtl"===s&&o?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()},{context:"$text",priority:"highest"}),this.listenTo(r,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&eb(r.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,r=n.getFirstPosition();return!(this._isGravityOverridden||r.isAtStart&&Zv(n,t)||!eb(r,t)||(Jv(e),Zv(n,t)&&eb(r,t,!0)?Kv(i,t):this._overrideGravity(),0))}_handleBackwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,r=n.getFirstPosition();return this._isGravityOverridden?(Jv(e),this._restoreGravity(),eb(r,t,!0)?Kv(i,t):Xv(i,t,r),!0):r.isAtStart?!!Zv(n,t)&&(Jv(e),Xv(i,t,r),!0):!Zv(n,t)&&eb(r,t,!0)?(Jv(e),Xv(i,t,r),!0):!!Qv(r,t)&&(r.isAtEnd&&!Zv(n,t)&&eb(r,t)?(Jv(e),Xv(i,t,r),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view.document;e.editing.view.addObserver(mh);let r=!1;this.listenTo(n,"mousedown",()=>{r=!0}),this.listenTo(n,"selectionChange",()=>{const e=this.attributes;if(!r)return;if(r=!1,!i.isCollapsed)return;if(!Zv(i,e))return;const n=i.getFirstPosition();eb(n,e)&&(n.isAtStart||eb(n,e,!0)?Kv(t,e):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,i=this.attributes;this.listenTo(e,"insertContent",()=>{const n=t.getFirstPosition();Zv(t,i)&&eb(n,i)&&Kv(e,i)},{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view;let r=!1,o=!1;this.listenTo(n.document,"delete",(e,t)=>{r="backward"===t.direction},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{if(!r)return;const e=i.getFirstPosition();o=Zv(i,this.attributes)&&!Qv(e,this.attributes)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{r&&(r=!1,o||e.model.enqueueChange(()=>{const e=i.getFirstPosition();Zv(i,this.attributes)&&eb(e,this.attributes)&&(e.isAtStart||eb(e,this.attributes,!0)?Kv(t,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function Zv(e,t){for(const i of t)if(e.hasAttribute(i))return!0;return!1}function Xv(e,t,i){const n=i.nodeBefore;e.change(i=>{if(n){const t=[],r=e.schema.isObject(n)&&e.schema.isInline(n);for(const[i,o]of n.getAttributes())!e.schema.checkAttribute("$text",i)||r&&!1===e.schema.getAttributeProperties(i).copyFromObject||t.push([i,o]);i.setSelectionAttribute(t)}else i.removeSelectionAttribute(t)})}function Kv(e,t){e.change(e=>{e.removeSelectionAttribute(t)})}function Jv(e){e.preventDefault()}function Qv(e,t){return eb(e.getShiftedBy(-1),t)}function eb(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{nodeBefore:n,nodeAfter:r}=e;for(const e of t){const t=n?n.getAttribute(e):void 0,o=r?r.getAttribute(e):void 0;if((!i||void 0!==t&&void 0!==o)&&o!==t)return!0}return!1}i.TwoStepCaretMovement=Yv;const tb={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"â¢"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"â
",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"â
",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"â¤"},greaterThanOrEqual:{from:">=",to:"â¥"},notEqual:{from:"!=",to:"â "},arrowLeft:{from:"<-",to:"â"},arrowRight:{from:"->",to:"â"},horizontalEllipsis:{from:"...",to:"â¦"},enDash:{from:/(^| )(--)( )$/,to:[null,"â",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"â",null]},quotesPrimary:{from:ab('"'),to:[null,"â",null,"â"]},quotesSecondary:{from:ab("'"),to:[null,"â",null,"â"]},quotesPrimaryEnGb:{from:ab("'"),to:[null,"â",null,"â"]},quotesSecondaryEnGb:{from:ab('"'),to:[null,"â",null,"â"]},quotesPrimaryPl:{from:ab('"'),to:[null,"â",null,"â"]},quotesSecondaryPl:{from:ab("'"),to:[null,"â",null,"â"]}},ib={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},nb=["symbols","mathematical","typography","quotes"];function rb(e){return"string"==typeof e?new RegExp(`(${ur(e)})$`):e}function ob(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}
6function sb(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function ab(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function lb(e,t,i,n){return n.createRange(cb(e,t,i,!0,n),cb(e,t,i,!1,n))}function cb(e,t,i,n,r){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),s=null;for(;o&&o.getAttribute(t)==i;)s=o,o=n?o.previousSibling:o.nextSibling;return s?r.createPositionAt(s,n?"before":"after"):e}function ub(e,t,i,n){const r=e.editing.view,o=new Set;r.document.registerPostFixer(r=>{const s=e.model.document.selection;let a=!1;if(s.hasAttribute(t)){const l=lb(s.getFirstPosition(),t,s.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",i)&&!e.hasClass(n)&&(r.addClass(n,e),o.add(e),a=!0)}return a}),e.conversion.for("editingDowncast").add(e=>{function t(){r.change(e=>{for(const t of o.values())e.removeClass(n,t),o.delete(t)})}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})})}function hb(e,t,i,n){let r,o=null;"function"==typeof n?r=n:(o=e.commands.get(n),r=()=>{e.execute(n)}),e.model.document.on("change:data",(s,a)=>{if(o&&!o.isEnabled||!t.isEnabled)return;const l=qo(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(e.model.document.differ.getChanges()),u=c[0];if(1!=c.length||"insert"!==u.type||"$text"!=u.name||1!=u.length)return;const h=u.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(o&&!0===o.value)return;const d=h.getChild(0),f=e.model.createRangeOn(d);if(!f.containsRange(l)&&!l.end.isEqual(f.end))return;const p=i.exec(d.data.substr(0,l.end.offset));p&&e.model.enqueueChange(t=>{const i=t.createPositionAt(h,0),n=t.createPositionAt(h,p[0].length),o=new Fl(i,n);if(!1!==r({match:p})){t.remove(o);const i=e.model.document.selection.getFirstRange(),n=t.createRangeIn(h);!h.isEmpty||n.isEqual(i)||n.containsRange(i,!0)||t.remove(h)}o.detach(),e.model.enqueueChange(()=>{e.plugins.get("Delete").requestUndoOnBackspace()})})})}function db(e,t,i,n){let r,o;i instanceof RegExp?r=i:o=i,o=o||(e=>{let t;const i=[],n=[];for(;null!==(t=r.exec(e))&&!(t&&t.length<4);){let{index:e,1:r,2:o,3:s}=t;const a=r+o+s;e+=t[0].length-a.length;const l=[e,e+r.length],c=[e+r.length+o.length,e+r.length+o.length+s.length];i.push(l),i.push(c),n.push([e+r.length,e+r.length+o.length])}return{remove:i,format:n}}),e.model.document.on("change:data",(i,r)=>{if(r.isUndo||!r.isLocal||!t.isEnabled)return;const s=e.model,a=s.document.selection;if(!a.isCollapsed)return;const l=Array.from(s.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const u=a.focus,h=u.parent,{text:d,range:f}=function(e,t){let i=e.start;return{text:Array.from(e.getItems()).reduce((e,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(i=t.createPositionAfter(n),""):e+n.data,""),range:t.createRange(i,e.end)}}(s.createRange(s.createPositionAt(h,0),u),s),p=o(d),m=fb(f.start,p.format,s),g=fb(f.start,p.remove,s);m.length&&g.length&&s.enqueueChange(t=>{if(!1!==n(t,m)){for(const e of g.reverse())t.remove(e);s.enqueueChange(()=>{e.plugins.get("Delete").requestUndoOnBackspace()})}})})}function fb(e,t,i){return t.filter(e=>void 0!==e[0]&&void 0!==e[1]).map(t=>i.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1])))}i.TextTransformation=class extends ps{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("typing",{transformations:{include:nb}})}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,i=e.plugins.get("Delete"),n=function(e){const t=e.extra||[],i=e.remove||[],n=e=>!i.includes(e);return function(e){const t=new Set;for(const i of e)if("string"==typeof i&&ib[i])for(const e of ib[i])t.add(e);else t.add(i);return Array.from(t)}(e.include.concat(t).filter(n)).filter(n).map(e=>"string"==typeof e&&tb[e]?tb[e]:e).filter(e=>"object"==typeof e).map(e=>({from:rb(e.from),to:ob(e.to)}))}(e.config.get("typing.transformations")),r=new qv(e.model,e=>{for(const t of n)if(t.from.test(e))return{normalizedTransformation:t}});r.on("matched:data",(e,n)=>{if(!n.batch.isTyping)return;const{from:r,to:o}=n.normalizedTransformation,s=r.exec(n.text),a=o(s.slice(1)),l=n.range;let c=s.index;t.enqueueChange(e=>{for(let i=1;i<s.length;i++){const n=s[i],r=a[i-1];if(null==r){c+=n.length;continue}const o=l.start.getShiftedBy(c),u=t.createRange(o,o.getShiftedBy(n.length)),h=sb(o);t.insertContent(e.createText(r,h),u),c+=r.length}t.enqueueChange(()=>{i.requestUndoOnBackspace()})})}),r.bind("isEnabled").to(this)}};function pb(e,t){return(i,n)=>{if(!e.commands.get(t).isEnabled)return!1;const r=e.model.schema.getValidRanges(n,t);for(const e of r)i.setAttribute(t,!0,e);i.removeSelectionAttribute(t)}}i.Autoformat=class extends ps{static get requires(){return[Wv]}static get pluginName(){return"Autoformat"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&hb(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&hb(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&hb(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&hb(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const e=pb(this.editor,"bold");db(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),db(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(e.get("italic")){const e=pb(this.editor,"italic");db(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),db(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(e.get("code")){const e=pb(this.editor,"code");db(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(e.get("strikethrough")){const e=pb(this.editor,"strikethrough");db(this.editor,this,/(~~)([^~]+)(~~)$/g,e)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter(e=>
6e.match(/^heading[1-6]$/)).forEach(t=>{const i=t[7],n=new RegExp(`^(#{${i}})\\s$`);hb(this.editor,this,n,()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&hb(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&hb(e,this,/^```$/,()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&hb(this.editor,this,/^---$/,"horizontalLine")}};i.Autosave=class extends ps{adapter;_debouncedSave;_lastDocumentVersion;_savePromise;_domEmitter;_config;_pendingActions;_makeImmediateSave;_action=null;static get pluginName(){return"Autosave"}static get isOfficialPlugin(){return!0}static get requires(){return[qd]}constructor(e){super(e);const t=e.config.get("autosave")||{},i=t.waitingTime||1e3;this.set("state","synchronized"),this._debouncedSave=Qn(this._save.bind(this),i),this._lastDocumentVersion=e.model.document.version,this._savePromise=null,this._domEmitter=new(Wr()),this._config=t,this._pendingActions=e.plugins.get(qd),this._makeImmediateSave=!1}init(){const e=this.editor,t=e.model.document;this.listenTo(e,"ready",()=>{this.listenTo(t,"change:data",(e,t)=>{this._saveCallbacks.length&&t.isLocal&&("synchronized"===this.state&&(this.state="waiting",this._setPendingAction()),"waiting"===this.state&&this._debouncedSave())})}),this.listenTo(e,"destroy",()=>this._flush(),{priority:"highest"}),this._domEmitter.listenTo(window,"beforeunload",(e,t)=>{this._pendingActions.hasAny&&(t.returnValue=this._pendingActions.first.message)})}destroy(){this._domEmitter.stopListening(),super.destroy()}save(){return this._debouncedSave.cancel(),this._save()}_flush(){this._debouncedSave.flush()}_save(){return this._savePromise?(this._makeImmediateSave=this.editor.model.document.version>this._lastDocumentVersion,this._savePromise):(this._setPendingAction(),this.state="saving",this._lastDocumentVersion=this.editor.model.document.version,this._savePromise=Promise.resolve().then(()=>Promise.all(this._saveCallbacks.map(e=>e(this.editor)))).finally(()=>{this._savePromise=null}).then(()=>{if(this._makeImmediateSave)return this._makeImmediateSave=!1,this._save();this.editor.model.document.version>this._lastDocumentVersion?(this.state="waiting",this._debouncedSave()):(this.state="synchronized",this._pendingActions.remove(this._action),this._action=null)}).catch(e=>{throw this.state="error",this.state="saving",this._debouncedSave(),e}),this._savePromise)}_setPendingAction(){const e=this.editor.t;this._action||(this._action=this._pendingActions.add(e("Saving changes")))}get _saveCallbacks(){const e=[];return this.adapter&&this.adapter.save&&e.push(this.adapter.save),this._config.save&&e.push(this._config.save),e}};class mb extends gs{attributeKey;constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const r=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of r)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}i.AttributeCommand=mb;const gb="bold";class vb extends ps{static get pluginName(){return"BoldEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:gb}),e.model.schema.setAttributeProperties(gb,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:gb,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(gb,new mb(e,gb)),e.keystrokes.set("CTRL+B",gb),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Bold text"),keystroke:"CTRL+B"}]})}}function bb(e){let{editor:t,commandName:i,plugin:n,icon:r,label:o,keystroke:s}=e;return e=>{const a=t.commands.get(i),l=new e(t.locale);return l.set({label:o,icon:r,keystroke:s,isToggleable:!0}),l.bind("isEnabled").to(a,"isEnabled"),l.bind("isOn").to(a,"value"),l instanceof ep?l.set({role:"menuitemcheckbox"}):l.set({tooltip:!0}),n.listenTo(l,"execute",()=>{t.execute(i),t.editing.view.focus()}),l}}i.BoldEditing=vb;const yb="bold";class wb extends ps{static get pluginName(){return"BoldUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:yb,plugin:this,icon:Yd.bold,label:t("Bold"),keystroke:"CTRL+B"});e.ui.componentFactory.add(yb,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+yb,()=>i(ep))}}i.BoldUI=wb;i.Bold=class extends ps{static get requires(){return[vb,wb]}static get pluginName(){return"Bold"}static get isOfficialPlugin(){return!0}};const _b="code";class kb extends ps{static get pluginName(){return"CodeEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Yv]}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:_b}),e.model.schema.setAttributeProperties(_b,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:_b,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(_b,new mb(e,_b)),e.plugins.get(Yv).registerAttribute(_b),ub(e,_b,"code","ck-code_selected"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}i.CodeEditing=kb;const xb="code";class Cb extends ps{static get pluginName(){return"CodeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:xb,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>',label:t("Code")});e.ui.componentFactory.add(xb,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+xb,()=>i(ep))}}i.CodeUI=Cb;i.Code=class extends ps{static get requires(){return[kb,Cb]}static get pluginName(){return"Code"}static get isOfficialPlugin(){return!0}};const Sb="italic";class Eb extends ps{static get pluginName(){return"ItalicEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Sb}),e.model.schema.setAttributeProperties(Sb,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Sb,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Sb,new mb(e,Sb)),e.keystrokes.set("CTRL+I",Sb),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Italic text"),keystroke:"CTRL+I"}]})}}i.ItalicEditing=Eb;const Tb="italic";class Ab extends ps{static get pluginName(){return"ItalicUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:Tb,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
6<path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",label:t("Italic")});e.ui.componentFactory.add(Tb,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+Tb,()=>i(ep))}}i.ItalicUI=Ab;i.Italic=class extends ps{static get requires(){return[Eb,Ab]}static get pluginName(){return"Italic"}static get isOfficialPlugin(){return!0}};const Ib="strikethrough";class Mb extends ps{static get pluginName(){return"StrikethroughEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Ib}),e.model.schema.setAttributeProperties(Ib,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Ib,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(Ib,new mb(e,Ib)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}i.StrikethroughEditing=Mb;const Pb="strikethrough";class Db extends ps{static get pluginName(){return"StrikethroughUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:Pb,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",label:t("Strikethrough")});e.ui.componentFactory.add(Pb,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+Pb,()=>i(ep))}}i.StrikethroughUI=Db;i.Strikethrough=class extends ps{static get requires(){return[Mb,Db]}static get pluginName(){return"Strikethrough"}static get isOfficialPlugin(){return!0}};const Ob="subscript";class Lb extends ps{static get pluginName(){return"SubscriptEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Ob}),e.model.schema.setAttributeProperties(Ob,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Ob,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),e.commands.add(Ob,new mb(e,Ob))}}i.SubscriptEditing=Lb;const Rb="subscript";class Bb extends ps{static get pluginName(){return"SubscriptUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:Rb,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z"/></svg>',label:t("Subscript")});e.ui.componentFactory.add(Rb,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+Rb,()=>i(ep))}}i.SubscriptUI=Bb;i.Subscript=class extends ps{static get requires(){return[Lb,Bb]}static get pluginName(){return"Subscript"}static get isOfficialPlugin(){return!0}};const Nb="superscript";class jb extends ps{static get pluginName(){return"SuperscriptEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Nb}),e.model.schema.setAttributeProperties(Nb,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Nb,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),e.commands.add(Nb,new mb(e,Nb))}}i.SuperscriptEditing=jb;const Fb="superscript";class zb extends ps{static get pluginName(){return"SuperscriptUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:Fb,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z"/></svg>',label:t("Superscript")});e.ui.componentFactory.add(Fb,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+Fb,()=>i(ep))}}i.SuperscriptUI=zb;i.Superscript=class extends ps{static get requires(){return[jb,zb]}static get pluginName(){return"Superscript"}static get isOfficialPlugin(){return!0}};const Vb="underline";class Hb extends ps{static get pluginName(){return"UnderlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Vb}),e.model.schema.setAttributeProperties(Vb,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Vb,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(Vb,new mb(e,Vb)),e.keystrokes.set("CTRL+U","underline"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Underline text"),keystroke:"CTRL+U"}]})}}i.UnderlineEditing=Hb;const Ub="underline";class Wb extends ps{static get pluginName(){return"UnderlineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=bb({editor:e,commandName:Ub,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',label:t("Underline"),keystroke:"CTRL+U"});e.ui.componentFactory.add(Ub,()=>i(Ff)),e.ui.componentFactory.add("menuBar:"+Ub,()=>i(ep))}}i.UnderlineUI=Wb;function*$b(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}i.Underline=class extends ps{static get requires(){return[Hb,Wb]}static get pluginName(){return"Underline"}static get isOfficialPlugin(){return!0}};class Gb extends gs{execute(){this.editor.model.change(e=>
6{this.enterBlock(e),this.fire("afterExecute",{writer:e})})}enterBlock(e){const t=this.editor.model,i=t.document.selection,n=t.schema,r=i.isCollapsed,o=i.getFirstRange(),s=o.start.parent,a=o.end.parent;if(n.isLimit(s)||n.isLimit(a))return r||s!=a||t.deleteContent(i),!1;if(r){const t=$b(e.model.schema,i.getAttributes());return qb(e,o.start),e.setSelectionAttribute(t),!0}{const n=!(o.start.isAtStart&&o.end.isAtEnd),r=s==a;if(t.deleteContent(i,{leaveUnmerged:n}),n){if(r)return qb(e,i.focus),!0;e.setSelection(a,0)}}return!1}}function qb(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const Yb={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class Zb extends Ja{constructor(e){super(e);const t=this.document;let i=!1;t.on("keydown",(e,t)=>{i=t.shiftKey}),t.on("beforeinput",(n,r)=>{if(!this.isEnabled)return;let o=r.inputType;s.isSafari&&i&&"insertParagraph"==o&&(o="insertLineBreak");const a=r.domEvent,l=Yb[o];if(!l)return;const c=new ta(t,"enter",r.targetRanges[0]);t.fire(c,new Qa(e,a,{isSoft:l.isSoft})),c.stop.called&&n.stop()})}observe(){}stopObserving(){}}class Xb extends ps{static get pluginName(){return"Enter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,i=t.document,n=this.editor.t;t.addObserver(Zb),e.commands.add("enter",new Gb(e)),this.listenTo(i,"enter",(n,r)=>{i.isComposing||r.preventDefault(),r.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}i.Enter=Xb;class Kb extends gs{execute(){const e=this.editor.model,t=e.document;e.change(i=>{!function(e,t,i){const n=i.isCollapsed,r=i.getFirstRange(),o=r.start.parent,s=r.end.parent,a=o==s;if(n){const n=$b(e.schema,i.getAttributes());Jb(e,t,r.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:n}),a?Jb(e,t,i.focus):n&&t.setSelection(s,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const n=t.getFirstRange(),r=n.start.parent,o=n.end.parent;return!Qb(r,e)&&!Qb(o,e)||r===o}(e.schema,t.selection)}}function Jb(e,t,i){const n=t.createElement("softBreak");e.insertContent(n,i),t.setSelection(n,"after")}function Qb(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Qb(e.parent,t))}class ey extends ps{static get pluginName(){return"ShiftEnter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,i=e.conversion,n=e.editing.view,r=n.document,o=this.editor.t;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,t)=>{let{writer:i}=t;return i.createEmptyElement("br")}}),n.addObserver(Zb),e.commands.add("shiftEnter",new Kb(e)),this.listenTo(r,"enter",(t,i)=>{r.isComposing||i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())},{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert a soft break (a <code><br></code> element)"),keystroke:"Shift+Enter"}]})}}i.ShiftEnter=ey;class ty extends gs{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.schema,n=t.document.selection,r=Array.from(n.getSelectedBlocks()),o=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(o){const t=r.filter(e=>iy(e)||ry(i,e));this._applyQuote(e,t)}else this._removeQuote(e,r.filter(iy))})}_getValue(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!iy(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=qo(e.getSelectedBlocks());return!!i&&ry(t,i)}_removeQuote(e,t){ny(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const i=e.createPositionBefore(t.start.parent);return void e.move(t,i)}t.end.isAtEnd||e.split(t.end);const i=e.createPositionAfter(t.end.parent);e.move(t,i)})}_applyQuote(e,t){const i=[];
6ny(e,t).reverse().forEach(t=>{let n=iy(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),i.push(n)}),i.reverse().reduce((t,i)=>t.nextSibling==i?(e.merge(e.createPositionAfter(t)),t):i)}}function iy(e){return"blockQuote"==e.parent.name?e.parent:null}function ny(e,t){let i,n=0;const r=[];for(;n<t.length;){const o=t[n],s=t[n+1];i||(i=e.createPositionBefore(o)),s&&o.nextSibling==s||(r.push(e.createRange(i,e.createPositionAfter(o))),i=null),n++}return r}function ry(e,t){const i=e.checkChild(t.parent,"blockQuote"),n=e.checkChild(["$root","blockQuote"],t);return i&&n}class oy extends ps{static get pluginName(){return"BlockQuoteEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Xb,Wv]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new ty(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(i=>{const n=e.model.document.differ.getChanges();for(const e of n)if("insert"==e.type){const n=e.position.nodeAfter;if(!n)continue;if(n.is("element","blockQuote")&&n.isEmpty)return i.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return i.unwrap(n),!0;if(n.is("element")){const e=i.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(i.createPositionBefore(n),n))return i.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return i.remove(t),!0}return!1});const i=this.editor.editing.view.document,n=e.model.document.selection,r=e.commands.get("blockQuote");this.listenTo(i,"enter",(t,i)=>{n.isCollapsed&&r.value&&n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())},{context:"blockquote"}),this.listenTo(i,"delete",(t,i)=>{if("backward"!=i.direction||!n.isCollapsed||!r.value)return;const o=n.getLastPosition().parent;o.isEmpty&&!o.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())},{context:"blockquote"})}}i.BlockQuoteEditing=oy;class sy extends ps{static get pluginName(){return"BlockQuoteUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("blockQuote",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:blockQuote",()=>{const e=this._createButton(ep);return e.set({role:"menuitemcheckbox"}),e})}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("blockQuote"),r=new e(t.locale),o=i.t;return r.set({label:o("Block quote"),icon:Yd.quote,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value"),this.listenTo(r,"execute",()=>{t.execute("blockQuote"),t.editing.view.focus()}),r}}i.BlockQuoteUI=sy;i.BlockQuote=class extends ps{static get requires(){return[oy,sy]}static get pluginName(){return"BlockQuote"}static get isOfficialPlugin(){return!0}};class ay extends(A()){_stack=[];add(e,t){const i=this._stack,n=i[0];this._insertDescriptor(e);const r=i[0];n===r||ly(n,r)||this.fire("change:top",{oldDescriptor:n,newDescriptor:r,writer:t})}remove(e,t){const i=this._stack,n=i[0];this._removeDescriptor(e);const r=i[0];n===r||ly(n,r)||this.fire("change:top",{oldDescriptor:n,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(t=>t.id===e.id);if(ly(e,t[i]))return;i>-1&&t.splice(i,1);let n=0;for(;t[n]&&cy(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(t=>t.id===e);i>-1&&t.splice(i,1)}}function ly(e,t){return e&&t&&e.priority==t.priority&&uy(e.classes)==uy(t.classes)}function cy(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&uy(e.classes)>uy(t.classes)}function uy(e){return Array.isArray(e)?e.sort().join(","):e}var hy='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>';const dy=i.WIDGET_CLASS_NAME="ck-widget",fy=i.WIDGET_SELECTED_CLASS_NAME="ck-widget_selected";function py(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function my(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};
6if(!e.is("containerElement"))throw new v("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(dy,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=xy,t.setCustomProperty("widgetLabel",[],e),i.label&&yy(e,i.label),i.hasSelectionHandle&&function(e,t){const i=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(e){const t=this.toDomElement(e),i=new Nf;return i.set("content",hy),i.render(),t.appendChild(i.element),t});t.insert(t.createPositionAt(e,0),i),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),by(e,t),e}function gy(e,t,i){if(t.classes&&i.addClass(Uo(t.classes),e),t.attributes)for(const n in t.attributes)i.setAttribute(n,t.attributes[n],e)}function vy(e,t,i){if(t.classes&&i.removeClass(Uo(t.classes),e),t.attributes)for(const n in t.attributes)i.removeAttribute(n,e)}function by(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gy,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vy;const r=new ay;r.on("change:top",(t,r)=>{r.oldDescriptor&&n(e,r.oldDescriptor,r.writer),r.newDescriptor&&i(e,r.newDescriptor,r.writer)}),t.setCustomProperty("addHighlight",(e,t,i)=>r.add(t,i),e),t.setCustomProperty("removeHighlight",(e,t,i)=>r.remove(t,i),e)}function yy(e,t){e.getCustomProperty("widgetLabel").push(t)}function wy(e){return e.getCustomProperty("widgetLabel").reduce((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t,"")}function _y(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),t.setAttribute("tabindex","-1",e),i.label&&t.setAttribute("aria-label",i.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(i,n,r)=>{t.setAttribute("contenteditable",r?"false":"true",e)}),e.on("change:isFocused",(i,n,r)=>{r?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),by(e,t),e}function ky(e,t){const i=e.getSelectedElement();if(i){const n=Ay(e);if(n)return t.createRange(t.createPositionAt(i,n))}return t.schema.findOptimalInsertionRange(e)}function xy(){return null}function Cy(e){const t=e=>{const{width:t,paddingLeft:i,paddingRight:n}=e.ownerDocument.defaultView.getComputedStyle(e);return parseFloat(t)-(parseFloat(i)||0)-(parseFloat(n)||0)},i=e.parentElement;if(!i)return 0;let n=t(i),r=0,o=i;for(;isNaN(n);){if(o=o.parentElement,++r>5)return 0;n=t(o)}return n}function Sy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new io(e);const i=Cy(e);return i?t.width/i*100:0}const Ey="widget-type-around";function Ty(e,t,i){return!!e&&py(e)&&!i.isInline(t)}function Ay(e){return e.getAttribute(Ey)}const Iy=["before","after"],My=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,Py="ck-widget__type-around_disabled";class Dy extends ps{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[Xb,Wv]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,n,r)=>{t.change(e=>{for(const i of t.document.roots)r?e.removeClass(Py,i):e.addClass(Py,i)}),r||e.model.change(e=>{e.removeSelectionAttribute(Ey)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,n=i.editing.view,r=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:r}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,i,n){var r=this;this.listenTo(e,t,function(){r.isEnabled&&i(...arguments)},n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=Ay(e);if(!t)return!1;const i=e.getSelectedElement();return this._insertParagraph(i,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,n={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(e,r,o)=>{const s=o.mapper.toViewElement(r.item);s&&Ty(s,r.item,t)&&(!function(e,t,i){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(e){const i=this.toDomElement(e);return function(e,t){for(const i of Iy){const n=new hf({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${i}`],title:t[i],"aria-hidden":"true"},children:[e.ownerDocument.importNode(My,!0)]});e.appendChild(n.render())}}(i,t),function(e){const t=new hf({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(i),i});e.insert(e.createPositionAt(i,"end"),n)}(o.writer,n,s),s.getCustomProperty("widgetLabel").push(()=>
6this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,n=t.schema,r=e.editing.view;function o(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(r.document,"arrowKey",(e,t)=>{this._handleArrowKeyPress(e,t)},{context:[py,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",(t,i)=>{i.directChange&&e.model.change(e=>{e.removeSelectionAttribute(Ey)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const t=i.getSelectedElement();t&&Ty(e.editing.mapper.toViewElement(t),t,n)||e.model.change(e=>{e.removeSelectionAttribute(Ey)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,i)=>{const r=i.writer;if(this._currentFakeCaretModelElement){const e=i.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(r.removeClass(Iy.map(o),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=i.mapper.toViewElement(s);if(!Ty(a,s,n))return;const l=Ay(t.selection);l&&(r.addClass(o(l),a),this._currentFakeCaretModelElement=s)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,i,n)=>{n||e.model.change(e=>{e.removeSelectionAttribute(Ey)})})}_handleArrowKeyPress(e,t){const i=this.editor,n=i.model,r=n.document.selection,o=n.schema,s=i.editing.view,a=zo(t.keyCode,i.locale.contentLanguageDirection),l=s.document.selection.getSelectedElement();let c;Ty(l,i.editing.mapper.toModelElement(l),o)?c=this._handleArrowKeyPressOnSelectedWidget(a):r.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,i=Ay(t.document.selection);return t.change(t=>i?i!==(e?"after":"before")&&(t.removeSelectionAttribute(Ey),!0):(t.setSelectionAttribute(Ey,e?"after":"before"),!0))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,n=i.schema,r=t.plugins.get("Widget"),o=r._getObjectElementNextToSelection(e);return!!Ty(t.editing.mapper.toViewElement(o),o,n)&&(i.change(t=>{r._setSelectionOverElement(o),t.setSelectionAttribute(Ey,e?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,n=i.schema,r=t.editing.mapper,o=i.document.selection,s=e?o.getLastPosition().nodeBefore:o.getFirstPosition().nodeAfter;return!!Ty(r.toViewElement(s),s,n)&&(i.change(t=>{t.setSelection(s,"on"),t.setSelectionAttribute(Ey,e?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,n)=>{const r=n.domTarget.closest(".ck-widget__type-around__button");if(!r)return;const o=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(r),s=function(e,t){const i=e.closest(".ck-widget");return t.mapDomToView(i)}(r,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,o),n.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",(i,n)=>{if("atTarget"!=i.eventPhase)return;const r=t.getSelectedElement(),o=e.editing.mapper.toViewElement(r),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Ty(o,r,s)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),i.stop())},{context:py})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",(t,i)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(i.selection=e.selection)},{priority:"high"}),s.isAndroid?this._listenToIfEnabled(e,"keydown",(e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(e,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,n=i.schema;this._listenToIfEnabled(t.document,"delete",(t,r)=>{if("atTarget"!=t.eventPhase)return;const o=Ay(i.document.selection);if(!o)return;const s=r.direction,a=i.document.selection.getSelectedElement(),l="forward"==s;
6if("before"===o===l)e.execute("delete",{selection:i.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(i.createPositionAt(a,o),s);if(t)if(t.isCollapsed){const r=i.createSelection(t.start);if(i.modifySelection(r,{direction:s}),r.focus.isEqual(t.start)){const e=function(e,t){let i=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;i=n}return i}(n,t.start.parent);i.deleteContent(i.createSelection(e,"on"),{doNotAutoparagraph:!0})}else i.change(i=>{i.setSelection(t),e.execute(l?"deleteForward":"delete")})}else i.change(i=>{i.setSelection(t),e.execute(l?"deleteForward":"delete")})}r.preventDefault(),t.stop()},{context:py})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,n)=>{let[r,o]=n;if(o&&!o.is("documentSelection"))return;const s=Ay(i);return s?(e.stop(),t.change(e=>{const n=i.getSelectedElement(),o=t.createPositionAt(n,s),a=e.createSelection(o),l=t.insertContent(r,a);return e.setSelection(a),l})):void 0},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(e,i)=>{const[,n,r={}]=i;if(n&&!n.is("documentSelection"))return;const o=Ay(t);o&&(r.findOptimalPosition=o,i[3]=r)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(e,i)=>{let[n]=i;n&&!n.is("documentSelection")||Ay(t)&&e.stop()},{priority:"high"})}}function Oy(e,t,i){const n=e.schema,r=e.createRangeIn(t.root),o="forward"==i?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of r.getWalker({startPosition:t,direction:i})){if(n.isLimit(s)&&!n.isInline(s))return e;if(a==o&&n.isBlock(s))return null}return null}function Ly(e,t,i){const n="backward"==i?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:i}))if(e.checkChild(n,"$text"))return n;return null}i.WidgetTypeAround=Dy;class Ry extends ps{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[Dy,Wv]}init(){var e=this;const t=this.editor,i=t.editing.view,n=i.document,r=t.t;this.editor.editing.downcastDispatcher.on("selection",(e,i,n)=>{const r=n.writer,o=i.selection;if(o.isCollapsed)return;const s=o.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);py(a)&&n.consumable.consume(o,"selection")&&r.setSelection(r.createRangeOn(a),{fake:!0,label:wy(a)})}),this.editor.editing.downcastDispatcher.on("selection",(e,t,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,r=n.document.selection;let o=null;for(const e of r.getRanges())for(const t of e){const e=t.item;py(e)&&!By(e,o)&&(n.addClass(fy,e),this._previouslySelected.add(e),o=e)}},{priority:"low"}),i.addObserver(mh),this.listenTo(n,"mousedown",function(){return e._onMousedown(...arguments)}),this.listenTo(n,"arrowKey",function(){e._handleSelectionChangeOnArrowKeyPress(...arguments)},{context:[py,"$text"]}),this.listenTo(n,"arrowKey",function(){e._preventDefaultOnArrowKeyPress(...arguments)},{context:"$root"}),this.listenTo(n,"arrowKey",function(e){const t=e.model;return(i,n)=>{const r=n.keyCode==Oo.arrowup,o=n.keyCode==Oo.arrowdown,s=n.shiftKey,a=t.document.selection;if(!r&&!o)return;const l=o;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,i){const n=e.model;if(i){const e=t.isCollapsed?t.focus:t.getLastPosition(),i=Oy(n,e,"forward");if(!i)return null;const r=n.createRange(e,i),o=Ly(n.schema,r,"backward");return o?n.createRange(e,o):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),i=Oy(n,e,"backward");if(!i)return null;const r=n.createRange(i,e),o=Ly(n.schema,r,"forward");return o?n.createRange(o,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(s)return}(c.isCollapsed||function(e,t,i){const n=e.model,r=e.view.domConverter;if(i){const e=n.createSelection(t.start);
vendor: 5,711 bytes, line 6
6n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const o=e.mapper.toViewRange(t),s=r.viewRangeToDom(o),a=io.getDomRangeRects(s);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change(e=>{const i=l?c.end:c.start;if(s){const n=t.createSelection(a.anchor);n.setFocus(i),e.setSelection(n)}else e.setSelection(i)}),i.stop(),n.preventDefault(),n.stopPropagation())}}}(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{context:"$root"}),this.listenTo(n,"tab",(e,t)=>{"atTarget"==e.eventPhase&&(t.shiftKey||this._selectFirstNestedEditable()&&(t.preventDefault(),e.stop()))},{context:py,priority:"low"}),this.listenTo(n,"tab",(e,t)=>{t.shiftKey&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())},{priority:"low"}),this.listenTo(n,"keydown",(e,t)=>{t.keystroke==Oo.esc&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())},{priority:"low"}),t.accessibility.addKeystrokeInfoGroup({id:"widget",label:r("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:r("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:r("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:r("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:r("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:r("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const i=this.editor,n=i.editing.view,r=n.document;let o=t.target;if(!o)return;if(t.domEvent.detail>=3)return void(this._selectBlockContent(o)&&t.preventDefault());if(!py(o)){const e=function(e){let t=e;for(;t;){if(t.is("editableElement")||py(t))return t;t=t.parent}return null}(o);if(!e)return;if(py(e))o=e;else{const e=function(e,t){const i=Kr(t.domEvent);let n=null;if(n=i?e.domConverter.domRangeToView(i):e.createRange(e.createPositionAt(t.target,0)),!n)return null;const r=n.start;if(!r.parent)return null;let o=r.parent;return r.parent.is("editableElement")&&(r.isAtEnd&&r.nodeBefore?o=r.nodeBefore:r.isAtStart&&r.nodeAfter&&(o=r.nodeAfter)),o.is("$text")?o.parent:o}(n,t);if(!e||!py(e))return;o=e}}s.isAndroid&&t.preventDefault(),r.isFocused||n.focus();const a=i.editing.mapper.toModelElement(o);this._setSelectionOverElement(a)}_selectBlockContent(e){const t=this.editor,i=t.model,n=t.editing.mapper,r=i.schema,o=n.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),s=function(e,t){for(const i of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(i,"$text"))return i;if(t.isLimit(i)&&!t.isObject(i))break}return null}(n.toModelElement(o),i.schema);return!!s&&(i.change(e=>{const t=r.isLimit(s)?null:function(e,t){const i=new gl({startPosition:e});for(const{item:e}of i){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(s),r),i=e.createPositionAt(s,0),n=t?e.createPositionAt(t,0):e.createPositionAt(s,"end");e.setSelection(e.createRange(i,n))}),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,n=this.editor.model,r=n.schema,o=n.document.selection,s=o.getSelectedElement(),a=Fo(i,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(s&&r.isObject(s)){const i=l?o.getLastPosition():o.getFirstPosition(),s=r.getNearestSelectionRange(i,l?"forward":"backward");return void(s&&(n.change(e=>{e.setSelection(s)}),t.preventDefault(),e.stop()))}if(!o.isCollapsed&&!t.shiftKey){const i=o.getFirstPosition(),s=o.getLastPosition(),a=i.nodeAfter,c=s.nodeBefore;return void((a&&r.isObject(a)||c&&r.isObject(c))&&(n.change(e=>{e.setSelection(l?s:i)}),t.preventDefault(),e.stop()))}if(!o.isCollapsed)return;const u=this._getObjectElementNextToSelection(l);if(u&&r.isObject(u)){if(r.isInline(u)&&c)return;this._setSelectionOverElement(u),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,n=i.schema,r=i.document.selection.getSelectedElement();r&&n.isObject(r)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);return i?(this.editor.model.change(e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(i)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,n=t.document.selection,r=t.createSelection(n);if(t.modifySelection(r,{direction:e?"forward":"backward"}),r.isEqual(n))return null;const o=e?r.focus.nodeBefore:r.focus.nodeAfter;return o&&i.isObject(o)?o:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(fy,t);this._previouslySelected.clear()}_selectFirstNestedEditable(){const e=this.editor,t=this.editor.editing.view.document;for(const i of t.selection.getFirstRange().getItems())if(i.is("editableElement")){const t=e.editing.mapper.toModelElement(i);if(!t)continue;const n=e.model.createPositionAt(t,0),r=e.model.schema.getNearestSelectionRange(n,"forward");return e.model.change(e=>{e.setSelection(r)}),!0}return!1}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,i=e.editing.view.document.selection.getFirstPosition().parent,n=(i.is("$text")?i.parent:i).findAnce
6stor(py);if(!n)return!1;const r=t.toModelElement(n);return!!r&&(e.model.change(e=>{e.setSelection(r,"on")}),!0)}}function By(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}i.Widget=Ry;class Ny extends ps{_toolbarDefinitions=new Map;_balloon;static get requires(){return[iv]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",t=>{(function(e){const t=e.getSelectedElement();return!(!t||!py(t))})(e.editing.view.document.selection)&&t.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,t){let{ariaLabel:i,items:n,getRelatedElement:r,balloonClassName:o="ck-toolbar-container"}=t;if(!n.length)return void b("widget-toolbar-no-items",{toolbarId:e});const s=this.editor,a=s.t,l=new pm(s.locale);if(l.ariaLabel=i||a("Widget toolbar"),this._toolbarDefinitions.has(e))throw new v("widget-toolbar-duplicated",this,{toolbarId:e});const c={view:l,getRelatedElement:r,balloonClassName:o,itemsConfig:n,initialized:!1};s.ui.addToolbar(l,{isContextual:!0,beforeFocus:()=>{const e=r(s.editing.view.document.selection);e&&this._showToolbar(c,e)},afterBlur:()=>{this._hideToolbar(c)}}),this._toolbarDefinitions.set(e,c)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const n of this._toolbarDefinitions.values()){const r=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&r)if(this.editor.ui.focusTracker.isFocused){const o=r.getAncestors().length;o>e&&(e=o,t=r,i=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?jy(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:Fy(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);jy(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function jy(e,t){const i=e.plugins.get("ContextualBalloon"),n=Fy(e,t);i.updatePosition(n)}function Fy(e,t){const i=e.editing.view,n=om.defaultPositions;return{target:i.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}i.WidgetToolbarRepository=Ny;class zy extends(Er()){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const n=new io(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)if(e.classList.contains(Vy(i)))return i}(e),this._referenceCoordinates=function(e,t){const i=new io(e),n=t.split("-"),r={x:"right"==n[1]?i.right:i.left,y:"bottom"==n[0]?i.bottom:i.top};return r.x+=e.ownerDocument.defaultView.scrollX,r.y+=e.ownerDocument.defaultView.scrollY,r}(t,function(e){const t=e.split("-"),i={top:"bottom",bottom:"top",left:"r
6ight",right:"left"};return`${i[t[0]]}-${i[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const r=i.style.width;r&&r.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(r):this._originalWidthPercents=Sy(i,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Vy(e){return`ck-widget__resizer__handle-${e}`}class Hy extends Df{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",e=>e?`ck-orientation-${e}`:"")],style:{display:e.if("_isVisible","none",e=>!e)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(e,t)=>null!==e&&null!==t),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(t,i,n)=>"px"===e.unit?`${t}Ã${i}`:`${n}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(e,t,i)=>t<50||i<50?"above-center":e)}_dismiss(){this.unbind(),this._isVisible=!1}}class Uy extends(Er()){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(e,t)=>e&&t),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(e=>{e.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(i=>{const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(t){const i=this.toDomElement(t);return e._appendHandles(i),e._appendSizeUI(i),i});i.insert(i.createPositionAt(t,"end"),n),i.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new zy(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(e=>{const i=this._options.unit||"%",n=("%"===i?t.widthPercents:t.width)+i;e.setStyle("width",n,this._options.viewElement)});const i=this._getHandleHost(),n=new io(i),r=Math.round(n.width),o=Math.round(n.height),s=new io(i);t.width=Math.round(s.width),t.height=Math.round(s.height),this.redraw(n),this.state.update({...t,handleHostWidth:r,handleHostHeight:o})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((i=t)&&i.ownerDocument&&i.ownerDocument.contains(i)))return;var i;const n=t.parentElement,r=this._getHandleHost(),o=this._viewResizerWrapper,s=[o.getStyle("width"),o.getStyle("height"),o.getStyle("left"),o.getStyle("top")];let a;if(n.isSameNode(r)){const t=e||new io(r);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[r.offsetWidth+"px",r.offsetHeight+"px",r.offsetLeft+"px",r.offsetTop+"px"];"same"!==Rr(s,a)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},o)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}
6_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i=(r=e).pageX,n=r.pageY;var r;const o=!this._options.isCentered||this._options.isCentered(this),s={x:t._referenceCoordinates.x-(i+t.originalWidth),y:n-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(s.x=i-(t._referenceCoordinates.x+t.originalWidth)),o&&(s.x*=2);let a=Math.abs(t.originalWidth+s.x),l=Math.abs(t.originalHeight+s.y);return"width"==(a/t.aspectRatio>l?"width":"height")?l=a/t.aspectRatio:a=l*t.aspectRatio,{width:Math.round(a),height:Math.round(l),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*a*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new hf({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(i=n,`ck-widget__resizer__handle-${i}`)}}).render());var i}_appendSizeUI(e){this._sizeView=new Hy,this._sizeView.render(),e.appendChild(this._sizeView.element)}}class Wy extends ps{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,t=r.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(mh),this._observer=new(Wr()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=yr(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())},{priority:"lowest"}),this._observer.listenTo(r.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const e=i.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new Uy(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const e=i.get("WidgetToolbarRepository");t.on("begin",()=>{e.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{e.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{e.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;Uy.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}i.WidgetResize=Wy;class $y extends Df{focusTracker=new Yo;keystrokes=new Jo;
6idInputView;buttonView;children;_validators;_focusables=new uf;_focusCycler;constructor(e,t){super(e);const i=e.t;this._validators=t,this.idInputView=this._createIdInput(),this.buttonView=this._createButton(i("Insert"),"ck-button-action ck-button-bold"),this.buttonView.type="submit",this.children=this._createViewChildren(),this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-bookmark-view"],tabindex:"-1"},children:this.children})}render(){super.render(),Rf({view:this}),[this.idInputView,this.buttonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.idInputView.errorText=t,!1}return!0}resetFormStatus(){this.idInputView.errorText=null}_createViewChildren(){const e=this.createCollection(),t=this.t;return e.add(new Vf(this.locale,{label:t("Bookmark")})),e.add(this._createFormContentView()),e}_createFormContentView(){const e=new Df(this.locale),t=this.createCollection();return t.add(this.idInputView),t.add(this.buttonView),e.setTemplate({tag:"div",attributes:{class:["ck","ck-bookmark-form","ck-responsive-form"]},children:t}),e}_createIdInput(){const e=this.locale.t,t=new Bp(this.locale,Am);return t.label=e("Bookmark name"),t.infoText=e("Enter the bookmark name without spaces."),t}_createButton(e,t){const i=new Ff(this.locale);return i.set({label:e,withText:!0}),i.extendTemplate({attributes:{class:t}}),i}get id(){const{element:e}=this.idInputView.fieldView;return e?e.value.trim():null}}class Gy extends Df{focusTracker=new Yo;keystrokes=new Jo;bookmarkPreviewView;removeButtonView;editButtonView;_focusables=new uf;_focusCycler;constructor(e){super(e);const t=e.t;this.bookmarkPreviewView=this._createBookmarkPreviewView(),this.removeButtonView=this._createButton(t("Remove bookmark"),Yd.remove,"remove",this.bookmarkPreviewView),this.editButtonView=this._createButton(t("Edit bookmark"),Yd.pencil,"edit",this.bookmarkPreviewView),this.set("id",void 0),this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-bookmark-actions","ck-responsive-form"],tabindex:"-1"},children:[this.bookmarkPreviewView,this.editButtonView,this.removeButtonView]})}render(){super.render(),[this.editButtonView,this.removeButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i,n){const r=new Ff(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.delegate("execute").to(this,i),r.labelView.unbind("id"),r.labelView.bind("id").to(r,"ariaLabelledBy",e=>e.split(" ")[0]),r.ariaLabelledBy=`${r.ariaLabelledBy} ${n.id}`,r}_createBookmarkPreviewView(){const e=new tp(this.locale);return e.extendTemplate({attributes:{class:["ck","ck-bookmark-actions__preview"]}}),e.bind("text").to(this,"id"),e}}function qy(e){return!(!e||"string"!=typeof e||/\s/.test(e))}class Yy extends gs{refresh(){const e=this.editor.model.document.selection,t=this._getPositionToInsertBookmark(e);this.isEnabled=!!t}execute(e){if(!e)return;const{bookmarkId:t}=e;if(!qy(t))return void b("insert-bookmark-command-executed-with-invalid-name");const i=this.editor,n=i.model,r=n.document.selection;n.change(e=>{let o=this._getPositionToInsertBookmark(r);if(!n.schema.checkChild(o,"bookmark")){const e=i.execute("insertParagraph",{position:o});if(!e)return;o=e}const s=e.createElement("bookmark",{...Object.fromEntries(r.getAttributes()),bookmarkId:t});n.insertObject(s,o,null,{setSelection:"on"})})}_getPositionToInsertBookmark(e){const t=this.editor.model,i=t.schema,n=e.getFirstRange(),r=n.start;if(Zy(r,i))return r;for(const{previousPosition:e,item:r}of n){if(r.is("element")&&i.checkChild(r,"$text")&&Zy(r,i))return t.createPositionAt(r,0);if(Zy(e,i))return e}return null}}function Zy(e,t){return!!t.checkChild(e,"bookmark")||!!t.checkChild(e,"paragraph")&&t.checkChild("paragraph","bookmark")}i.InsertBookmarkCommand=Yy;class Xy extends gs{refresh(){const e=Ky(this.editor.model.document.selection);this.isEnabled=!!e,this.value=e?e.getAttribute("bookmarkId"):void 0}execute(e){if(!e)return;const{bookmarkId:t}=e;if(!qy(t))return void b("update-bookmark-command-executed-with-invalid-name");const i=this.editor.model,n=Ky(i.document.selection);n&&i.change(e=>{e.setAttribute("bookmarkId",t,n)})}}function Ky(e){const t=e.getSelectedElement();return t&&t.is("element","bookmark")?t:null}i.UpdateBookmarkCommand=Xy;class Jy extends ps{_bookmarkElements=new Map;static get pluginName(){return"BookmarkEditing"}static get isOfficialPlugin(){return!0}init(){const{editor:e}=this;this._defineSchema(),this._defineConverters(),e.commands.add("insertBookmark",new Yy(e)),e.commands.add("updateBookmark",new Xy(e)),this.listenTo(e.model.document,"change:data",()=>{this._trackBookmarkElements()})}getElementForBookmarkId(e){for(const[t,i]of this._bookmarkElements)if(i==e)return t;return null}_defineSchema(){this.editor.model.schema.register("bookmark",{inheritAllFrom
6:"$inlineObject",allowAttributes:"bookmarkId",disallowAttributes:["linkHref","htmlA"]})}_defineConverters(){const{editor:e}=this,{conversion:t,t:i}=e;e.data.htmlProcessor.domConverter.registerInlineObjectMatcher(e=>Qy(e)),e.editing.view.domConverter.registerInlineObjectMatcher(e=>Qy(e,!1)),t.for("dataDowncast").elementToElement({model:{name:"bookmark",attributes:["bookmarkId"]},view:(e,t)=>{let{writer:i}=t;return i.createEmptyElement("a",{id:e.getAttribute("bookmarkId")})}}),t.for("editingDowncast").elementToElement({model:{name:"bookmark",attributes:["bookmarkId"]},view:(e,t)=>{let{writer:n}=t;const r=e.getAttribute("bookmarkId"),o=n.createContainerElement("a",{id:r,class:"ck-bookmark"},[this._createBookmarkUIElement(n)]);return this._bookmarkElements.set(e,r),my(o,n,{label:()=>`${r} ${i("bookmark widget")}`})}}),t.for("upcast").add(t=>t.on("element:a",function(e){return(t,i,n)=>{const r=i.viewItem,o=Qy(r,!1);if(!o||!n.consumable.test(r,o))return;const s=function(e){const t=e.config.get("bookmark.enableNonEmptyAnchorConversion");return void 0===t||t}(e);if(!s&&!r.isEmpty)return;const a=n.writer,l=r.getAttribute("id"),c=r.getAttribute("name"),u=l||c,h=a.createElement("bookmark",{bookmarkId:u});if(!n.safeInsert(h,i.modelCursor))return;n.consumable.consume(r,o),l===c&&n.consumable.consume(r,{attributes:["name"]}),n.updateConversionResult(h,i);const{modelCursor:d,modelRange:f}=n.convertChildren(r,i.modelCursor);i.modelCursor=d,i.modelRange=a.createRange(i.modelRange.start,f.end)}}(e)))}_createBookmarkUIElement(e){return e.createUIElement("span",{class:"ck-bookmark__icon"},function(e){const t=this.toDomElement(e),i=new Nf;return i.set({content:Yd.bookmarkInline,isColorInherited:!1}),i.render(),t.appendChild(i.element),t})}_trackBookmarkElements(){this._bookmarkElements.forEach((e,t)=>{"$graveyard"===t.root.rootName&&this._bookmarkElements.delete(t)})}}function Qy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("a"!==e.name)return null;if(t&&!e.isEmpty)return null;const i=e.hasAttribute("id"),n=e.hasAttribute("name"),r=e.hasAttribute("href");return i&&!r?{name:!0,attributes:["id"]}:n&&!r?{name:!0,attributes:["name"]}:null}i.BookmarkEditing=Jy;const ew="bookmark-ui";class tw extends ps{actionsView=null;formView=null;_balloon;static get requires(){return[Jy,iv]}static get pluginName(){return"BookmarkUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.editing.view.addObserver(ph),this._balloon=e.plugins.get(iv),this._createToolbarBookmarkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:ew,view:{classes:["ck-fake-bookmark-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:ew,view:(e,t)=>{let{writer:i}=t;if(!e.markerRange.isCollapsed)return null;const n=i.createUIElement("span");return i.addClass(["ck-fake-bookmark-selection","ck-fake-bookmark-selection_collapsed"],n),n}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new Gy(e.locale),i=e.commands.get("updateBookmark"),n=e.commands.get("delete");return t.bind("id").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.removeButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"remove",()=>{this._hideUI(),e.execute("delete")}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t}_createFormView(){const e=this.editor,t=e.locale,i=e.commands.get("insertBookmark"),n=e.commands.get("updateBookmark"),r=[i,n],o=new(Lf($y))(t,function(e){const{t:t}=e,i=e.plugins.get(Jy);return[e=>{if(!e.id)return t("Bookmark must not be empty.")},e=>{if(e.id&&/\s/.test(e.id))return t("Bookmark name cannot contain space characters.")},n=>{const r=e.model.document.selection.getSelectedElement(),o=i.getElementForBookmarkId(n.id);if(r!==o)return o?t("Bookmark name already exists."):void 0}]}(e));
6return o.idInputView.fieldView.bind("value").to(n,"value"),o.idInputView.bind("isEnabled").toMany(r,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),o.buttonView.bind("isEnabled").toMany(r,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),this.listenTo(o,"submit",()=>{if(o.isValid()){const t=o.id;this._getSelectedBookmarkElement()?e.execute("updateBookmark",{bookmarkId:t}):e.execute("insertBookmark",{bookmarkId:t}),this._closeFormView()}}),this.listenTo(o.idInputView,"change:errorText",()=>{e.ui.update()}),o.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),o}_createToolbarBookmarkButton(){const e=this.editor;e.ui.componentFactory.add("bookmark",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:bookmark",()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=new e(i),r=t.commands.get("insertBookmark"),o=t.commands.get("updateBookmark"),s=i.t;return n.set({label:s("Bookmark"),icon:Yd.bookmark}),this.listenTo(n,"execute",()=>this._showUI(!0)),n.bind("isEnabled").toMany([r,o],"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),n.bind("isOn").to(o,"value",e=>!!e),n}_enableBalloonActivators(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedBookmarkElement()&&this._showUI()})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),Of({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_updateFormButtonLabel(e){const t=this.editor.locale.t;this.formView.buttonView.label=t(e?"Update":"Insert")}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("updateBookmark");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.idInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.idInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){void 0!==this.editor.commands.get("updateBookmark").value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.buttonView.focus(),this.formView.idInputView.fieldView.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.formView||this._createViews(),this._getSelectedBookmarkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedBookmarkElement(),n=o();this._updateFormButtonLabel(!!i);const r=()=>{const e=this._getSelectedBookmarkElement(),t=o();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),this._updateFormButtonLabel(!!i),i=e,n=t};function o(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model;let i;const n=this._getSelectedBookmarkElement();if(t.markers.has(ew)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(ew)),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));i=e.domConverter.viewRangeToDom(n)}else n&&(i=()=>{const t=this.editor.editing.mapper,i=e.domConverter,r=t.toViewElement(n);return i.mapViewToDom(r)});return i&&{target:i}}_getSelectedBookmarkElement(){const e=this.editor.model.document.selection.getSelectedElement();return e&&e.is("element","bookmark")?e:null}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(ew))t.updateMarker(ew,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition(t=>{let{item:i}=t;return!e.schema.isContent(i)},{boundaries:i});t.addMarker(ew,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(ew,{usingOperation:!1,affectsData:!1,range:i})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(ew)&&e.change(e=>{e.removeMarker(ew)})}}i.BookmarkUI=tw;i.Bookmark=class extends ps{static get pluginName(){return"Bookmark"}static get requires(){return[Jy,tw,Ry]}static get isOfficialPlugin(){return!0}};class iw extends ps{static get pluginName(){return"CKBoxUI"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor;e.commands.get("ckbox")&&(e.ui.componentFactory.add("ckbox",()=>this._createFileToolbarButton()),e.ui.componentFactory.add("menuBar:ckbox",()=>this._createFileMenuBarButton()),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"assetManager",observable:()=>e.commands.get("ckbox"),buttonViewCreator:()=>this._createImageToolbarButton(),formViewCreator:()=>this._createImageDropdownButton(),menuBarButtonViewCreator:e=>this._createImageMenuBarButton(e?"insertOnly":"insertNested")}))}_createButton(e){const t=this.editor,i=new e(t.locale),n=t.commands.get("ckbox");return i.bind("isOn","isEnabled").to(n,"value","isEnabled"),i.on("execute",()=>{t.execute("ckbox")}),i}_createFileToolbarButton(){const e=this.editor.locale.t,t=this._createButton(Ff);return t.icon=Yd.browseFiles,t.label=e("Open file manager"),t.tooltip=!0,t}_createImageToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(Ff);return i.icon=Yd.imageAssetManager,i.bind("label").to(t,"isImageSelected",t=>e(t?"Replace image with file manager":"Insert image with file manager")),i.tooltip=!0,i}_createImageDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(Ff);return i.icon=Yd.imageAssetManager,i.withText=!0,i.bind("label").to(t,"isImageSelected",t=>e(t?"Replace with file manager":"Insert with file manager")),i.on("execute",()=>{t.dropdownView.isOpen=!1}),i}_createFileMenuBarButton(){const e=this.editor.locale.t,t=this._createButton(ep);return t.icon=Yd.browseFiles,t.withText=!0,t.label=e("File"),t}_createImageMenuBarButton(e){const t=this.editor.locale.t,i=this.editor.locale.t,n=this._createButton(ep);switch(n.icon=Yd.imageAssetManager,n.withText=!0,e){case"insertOnly":n.label=t("Image");break;case"insertNested":n.label=i("With file manager")}return n}}i.CKBoxUI=iw;var nw=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],rw=e=>{let t=0;for(let i=0;i<e.length;i++){let n=e[i];t=83*t+nw.indexOf(n)}return t},ow=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},sw=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},aw=(e,t)=>
6(e=>e<0?-1:1)(e)*Math.pow(Math.abs(e),t),lw=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},cw=e=>{let t=e>>8&255,i=255&e;return[ow(e>>16),ow(t),ow(i)]},uw=(e,t)=>{let i=Math.floor(e/361),n=Math.floor(e/19)%19,r=e%19;return[aw((i-9)/9,2)*t,aw((n-9)/9,2)*t,aw((r-9)/9,2)*t]};function hw(e){const t=[];let i=0;for(const n in e){const r=parseInt(n,10);isNaN(r)||(r>i&&(i=r),t.push(`${e[n]} ${n}w`))}const n=[{srcset:t.join(","),sizes:`(max-width: ${i}px) 100vw, ${i}px`,type:"image/webp"}];return{imageFallbackUrl:e.default,imageSources:n}}function dw(e){let{url:t,method:i="GET",data:n,onUploadProgress:r,signal:o,authorization:s}=e;const a=new XMLHttpRequest;a.open(i,t.toString()),a.setRequestHeader("Authorization",s),a.setRequestHeader("CKBox-Version","CKEditor 5"),a.responseType="json";const l=()=>{a.abort()};return new Promise((e,t)=>{o.throwIfAborted(),o.addEventListener("abort",l),a.addEventListener("loadstart",()=>{o.addEventListener("abort",l)}),a.addEventListener("loadend",()=>{o.removeEventListener("abort",l)}),a.addEventListener("error",()=>{t()}),a.addEventListener("abort",()=>{t()}),a.addEventListener("load",()=>{const i=a.response;if(!i||i.statusCode>=400)return t(i&&i.message);e(i)}),r&&a.upload.addEventListener("progress",e=>{r(e)}),a.send(n)})}const fw={"image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};class pw extends gs{_chosenAssets=new Set;_wrapper=null;constructor(e){super(e),this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");return!(!e.isEnabled&&!t.isEnabled)}_prepareOptions(){const e=this.editor.config.get("ckbox"),t=e.dialog,i=e.categories,n=e.view,r=e.upload;return{theme:e.theme,language:e.language,tokenUrl:e.tokenUrl,serviceOrigin:e.serviceOrigin,forceDemoLabel:e.forceDemoLabel,choosableFileExtensions:e.choosableFileExtensions,assets:{onChoose:e=>this.fire("ckbox:choose",e)},dialog:{onClose:()=>this.fire("ckbox:close"),width:t&&t.width,height:t&&t.height},categories:i&&{icons:i.icons},view:n&&{openLastView:n.openLastView,startupFolderId:n.startupFolderId,startupCategoryId:n.startupCategoryId,hideMaximizeButton:n.hideMaximizeButton},upload:r&&{componentsHideTimeout:r.componentsHideTimeout,dialogMinimizeTimeout:r.dialogMinimizeTimeout}}}_initListeners(){const e=this.editor,t=e.model,i=!e.config.get("ckbox.ignoreDataId");this.on("ckbox",()=>{this.refresh()},{priority:"low"}),this.on("ckbox:open",()=>{this.isEnabled&&!this.value&&(this._wrapper=Nr(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))}),this.on("ckbox:close",()=>{this.value&&(this._wrapper.remove(),this._wrapper=null,e.editing.view.focus())}),this.on("ckbox:choose",(n,r)=>{if(!this.isEnabled)return;const o=e.commands.get("insertImage"),s=e.commands.get("link"),a=function(e){let{assets:t,isImageAllowed:i,isLinkAllowed:n}=e;return t.map(e=>function(e){const t=e.data.metadata;return!!t&&(t.width&&t.height)}(e)?{id:e.data.id,type:"image",attributes:mw(e)}:{id:e.data.id,type:"link",attributes:gw(e)}).filter(e=>"image"===e.type?i:n)}({assets:r,isImageAllowed:o.isEnabled,isLinkAllowed:s.isEnabled}),l=a.length;0!==l&&(t.change(e=>{for(const t of a){const n=t===a[l-1],r=1===l;this._insertAsset(t,n,e,r),i&&(setTimeout(()=>this._chosenAssets.delete(t),1e3),this._chosenAssets.add(t))}}),e.editing.view.focus())}),this.listenTo(e,"destroy",()=>{this.fire("ckbox:close"),this._chosenAssets.clear()})}_insertAsset(e,t,i,n){const r=this.editor.model.document.selection;i.removeSelectionAttribute("linkHref"),"image"===e.type?this._insertImage(e):this._insertLink(e,i,n),t||i.setSelection(r.getLastPosition())}_insertImage(e){const t=this.editor,{imageFallbackUrl:i,imageSources:n,imageTextAlternative:r,imageWidth:o,imageHeight:s,imagePlaceholder:a}=e.attributes;t.execute("insertImage",{source:{src:i,sources:n,alt:r,width:o,height:s,...a?{placeholder:a}:null}})}_insertLink(e,t,i){const n=this.editor,r=n.model,o=r.document.selection,{linkName:s,linkHref:a}=e.attributes;if(o.isCollapsed){const e=Qo(o.getAttributes()),l=t.createText(s,e);if(!i){const e=o.getLastPosition(),i=e.parent;"paragraph"===i.name&&i.isEmpty||n.execute("insertParagraph",{position:e});const s=r.insertContent(l);return t.setSelection(s),void n.execute("link",a)}const c=r.insertContent(l);t.setSelection(c)}n.execute("link",a)}}
vendor: 4,945 bytes, line 6
6function mw(e){const{imageFallbackUrl:t,imageSources:i}=hw(e.data.imageUrls),{description:n,width:r,height:o,blurHash:s}=e.data.metadata,a=function(e){if(e)try{const t="32px",i=document.createElement("canvas");i.setAttribute("width",t),i.setAttribute("height",t);const n=i.getContext("2d");if(!n)return;const r=n.createImageData(32,32),o=((e,t,i,n)=>{(e=>{if(!e||e.length<6)throw new lw("The blurhash string must be at least 6 characters");let t=rw(e[0]),i=Math.floor(t/9)+1,n=t%9+1;if(e.length!==4+2*n*i)throw new lw(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*n*i}`)})(e),n|=1;let r=rw(e[0]),o=Math.floor(r/9)+1,s=r%9+1,a=(rw(e[1])+1)/166,l=new Array(s*o);for(let t=0;t<l.length;t++)if(0===t){let i=rw(e.substring(2,6));l[t]=cw(i)}else{let i=rw(e.substring(4+2*t,6+2*t));l[t]=uw(i,a*n)}let c=4*t,u=new Uint8ClampedArray(c*i);for(let e=0;e<i;e++)for(let n=0;n<t;n++){let r=0,a=0,h=0;for(let c=0;c<o;c++)for(let o=0;o<s;o++){let u=Math.cos(Math.PI*n*o/t)*Math.cos(Math.PI*e*c/i),d=l[o+c*s];r+=d[0]*u,a+=d[1]*u,h+=d[2]*u}let d=sw(r),f=sw(a),p=sw(h);u[4*n+0+e*c]=d,u[4*n+1+e*c]=f,u[4*n+2+e*c]=p,u[4*n+3+e*c]=255}return u})(e,32,32);return r.data.set(o),n.putImageData(r,0,0),i.toDataURL()}catch(e){return}}(s);return{imageFallbackUrl:t,imageSources:i,imageTextAlternative:n||"",imageWidth:r,imageHeight:o,...a?{imagePlaceholder:a}:null}}function gw(e){return{linkName:e.data.name,linkHref:vw(e)}}function vw(e){const t=new URL(e.data.url);return t.searchParams.set("download","true"),t.toString()}class bw extends ps{_token;static get pluginName(){return"CKBoxUtils"}static get isOfficialPlugin(){return!0}static get requires(){return["CloudServices"]}init(){const e=this.editor,t=!!e.config.get("ckbox"),i=!!window.CKBox;if(!t&&!i)return;e.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",defaultUploadCategories:null,ignoreDataId:!1,language:e.locale.uiLanguage,theme:"lark",tokenUrl:e.config.get("cloudServices.tokenUrl")});const n=e.plugins.get("CloudServices"),r=e.config.get("cloudServices.tokenUrl"),o=e.config.get("ckbox.tokenUrl");if(!o)throw new v("ckbox-plugin-missing-token-url",this);this._token=o==r?Promise.resolve(n.token):n.registerTokenUrl(o)}getToken(){return this._token}async getWorkspaceId(){const e=(0,this.editor.t)("Cannot access default workspace."),t=this.editor.config.get("ckbox.defaultUploadWorkspaceId"),i=function(e,t){const[,i]=e.value.split("."),n=JSON.parse(atob(i)),r=n.auth&&n.auth.ckbox&&n.auth.ckbox.workspaces||[n.aud];return t?"superadmin"==(n.auth&&n.auth.ckbox&&n.auth.ckbox.role)||r.includes(t)?t:null:r[0]}(await this._token,t);if(null==i)throw y("ckbox-access-default-workspace-error"),e;return i}async getCategoryIdForFile(e,t){const i=(0,this.editor.t)("Cannot determine a category for the uploaded file."),n=this.editor.config.get("ckbox.defaultUploadCategories"),r=this._getAvailableCategories(t),o="string"==typeof e?(s=await async function(e,t){try{const i=await fetch(e,{method:"HEAD",cache:"force-cache",...t});return i.ok&&i.headers.get("content-type")||""}catch{return""}}(e,t),fw[s]):e.name.match(/\.(?<ext>[^.]+)$/).groups.ext.toLowerCase();var s;const a=await r;if(!a)throw i;if(n){const e=Object.keys(n).find(e=>n[e].find(e=>e.toLowerCase()==o));if(e){const t=a.find(t=>t.id===e||t.name===e);if(!t)throw i;return t.id}}const l=a.find(e=>e.extensions.find(e=>e.toLowerCase()==o));if(!l)throw i;return l.id}async _getAvailableCategories(e){const t=this.editor,i=this._token,{signal:n}=e,r=t.config.get("ckbox.serviceOrigin"),o=await this.getWorkspaceId();try{const e=[];let t,i=0;do{const n=await s(i);e.push(...n.items),t=n.totalCount-(i+50),i+=50}while(t>0);return e}catch{return n.throwIfAborted(),void y("ckbox-fetch-category-http-error")}async function s(e){const t=new URL("categories",r);return t.searchParams.set("limit",String(50)),t.searchParams.set("offset",String(e)),t.searchParams.set("workspaceId",o),dw({url:t,signal:n,authorization:(await i).value})}}}class yw extends ps{static get requires(){return["ImageUploadEditing","ImageUploadProgress",Xd,kw]}static get pluginName(){return"CKBoxUploadAdapter"}static get isOfficialPlugin(){return!0}async afterInit(){const e=this.editor,t=!!e.config.get("ckbox"),i=!!window.CKBox;if(!t&&!i)return;const n=e.plugins.get(Xd),r=e.plugins.get(bw);n.createUploadAdapter=t=>new ww(t,e,r);const o=!e.config.get("ckbox.ignoreDataId"),s=e.plugins.get("ImageUploadEditing");o&&s.on("uploadComplete",(t,i)=>{let{imageElement:n,data:r}=i;e.model.change(e=>{e.setAttribute("ckboxImageId",r.ckboxImageId,n)})})}}let ww=class{loader;token;editor;controller;serviceOrigin;ckboxUtils;constructor(e,t,i){this.loader=e,this.token=i.getToken(),this.ckboxUtils=i,this.editor=t,this.controller=new AbortController,this.serviceOrigin=t.config.get("ckbox.serviceOrigin")}async upload(){const e=this.ckboxUtils,t=this.editor.t,i=await this.loader.file,n=await e.getCategoryIdForFile(i,{signal:this.controller.signal}
6),r=new URL("assets",this.serviceOrigin),o=new FormData;return r.searchParams.set("workspaceId",await e.getWorkspaceId()),o.append("categoryId",n),o.append("file",i),dw({method:"POST",url:r,data:o,onUploadProgress:e=>{e.lengthComputable&&(this.loader.uploadTotal=e.total,this.loader.uploaded=e.loaded)},signal:this.controller.signal,authorization:(await this.token).value}).then(async e=>{const t=hw(e.imageUrls);return{ckboxImageId:e.id,default:t.imageFallbackUrl,sources:t.imageSources}}).catch(()=>{const e=t("Cannot upload file:")+` ${i.name}.`;return Promise.reject(e)})}abort(){this.controller.abort()}};const _w="NoPermission";class kw extends ps{static get pluginName(){return"CKBoxEditing"}static get isOfficialPlugin(){return!0}static get requires(){return["LinkEditing","PictureEditing",yw,bw]}init(){const e=this.editor;this._shouldBeInitialised()&&(this._checkImagePlugins(),Ew()&&e.commands.add("ckbox",new pw(e)),async function(e){const t=e.plugins.get(bw),i=e.config.get("ckbox.serviceOrigin"),n=new URL("permissions",i),{value:r}=await t.getToken(),o=await dw({url:n,authorization:r,signal:(new AbortController).signal});return Object.values(o).some(e=>e["asset:create"])}(e).then(e=>{e||this._blockImageCommands()}))}afterInit(){const e=this.editor;this._shouldBeInitialised()&&(e.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()))}_shouldBeInitialised(){return!!this.editor.config.get("ckbox")||Ew()}_blockImageCommands(){const e=this.editor,t=e.commands.get("uploadImage"),i=e.commands.get("ckboxImageEdit");t&&(t.isAccessAllowed=!1,t.forceDisabled(_w)),i&&i.forceDisabled(_w)}_checkImagePlugins(){const e=this.editor;e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||y("ckbox-plugin-image-feature-missing",e)}_initSchema(){const e=this.editor.model.schema;e.extend("$text",{allowAttributes:"ckboxLinkId"}),e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.addAttributeCheck(e=>{if(!e.last.getAttribute("linkHref"))return!1},"ckboxLinkId")}_initConversion(){const e=this.editor;e.conversion.for("downcast").add(e=>{e.on("attribute:ckboxLinkId:imageBlock",(e,t,i)=>{const{writer:n,mapper:r,consumable:o}=i;if(!o.consume(t.item,e.name))return;const s=[...r.toViewElement(t.item).getChildren()].find(e=>"a"===e.name);s&&(t.item.hasAttribute("ckboxLinkId")?n.setAttribute("data-ckbox-resource-id",t.item.getAttribute("ckboxLinkId"),s):n.removeAttribute("data-ckbox-resource-id",s))},{priority:"low"}),e.on("attribute:ckboxLinkId",(e,t,i)=>{const{writer:n,mapper:r,consumable:o}=i;if(o.consume(t.item,e.name)){if(t.attributeOldValue){const e=Cw(n,t.attributeOldValue);n.unwrap(r.toViewRange(t.range),e)}if(t.attributeNewValue){const e=Cw(n,t.attributeNewValue);if(t.item.is("selection")){const t=n.document.selection;n.wrap(t.getFirstRange(),e)}else n.wrap(r.toViewRange(t.range),e)}}},{priority:"low"})}),e.conversion.for("upcast").add(e=>{e.on("element:a",(e,t,i)=>{const{writer:n,consumable:r}=i;if(!t.viewItem.getAttribute("href"))return;if(!r.consume(t.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const o=t.viewItem.getAttribute("data-ckbox-resource-id");if(o)if(t.modelRange)for(let e of t.modelRange.getItems())e.is("$textProxy")&&(e=e.textNode),Sw(e)&&n.setAttribute("ckboxLinkId",o,e);else{const e=t.modelCursor.nodeBefore||t.modelCursor.parent;n.setAttribute("ckboxLinkId",o,e)}},{priority:"low"})}),e.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),e.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:e=>e.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}});const t=e.commands.get("replaceImageSource");t&&this.listenTo(t,"cleanupImage",(e,t)=>{let[i,n]=t;i.removeAttribute("ckboxImageId",n)})}_initFixers(){const e=this.editor,t=e.model,i=t.document.selection;t.document.registerPostFixer(function(e){return t=>{let i=!1;const n=e.model,r=e.commands.get("ckbox");if(!r)return i;for(const e of n.document.differ.getChanges()){if("insert"!==e.type&&"attribute"!==e.type)continue;const n="insert"===e.type?new Cl(e.position,e.position.getShiftedBy(e.length)):e.range,o="attribute"===e.type&&"linkHref"===e.attributeKey&&null===e.attributeNewValue;for(const e of n.getItems()){if(o&&e.hasAttribute("ckboxLinkId")){t.removeAttribute("ckboxLinkId",e),i=!0;continue}const n=xw(e,r._chosenAssets);for(const r of n){const n="image"===r.type?"ckboxImageId":"ckboxLinkId";r.id!==e.getAttribute(n)&&(t.setAttribute(n,r.id,e),i=!0)}}}return i}}(e)),t.document.registerPostFixer(function(e){return t=>!(e.hasAttribute("linkHref")||!e.hasAttribute("ckboxLinkId")||(t.removeSelectionAttribute("ckboxLinkId"),0))}(i))}}function xw(e,t){const i=e.is("element","imageInline")||e.is("element","imageBlock"),n=e.hasAttribute("linkHref");return[...t].filter(t=>"image"===t.type&&i?t.attributes.imageFallbackUrl===e.getAttribute("src"):"link"===t.type&&n?t.attributes.linkHref===e.getAttribute("linkHref"):void 0)}function Cw(e,t){const i=e.createAttributeElement("a",{"data-ckbox-resource-id":t},{priority:5});return e.setCustomProperty("link",!0,i),i}function Sw(e){return!!e.is("$text")||!(!e.is("element","imageInline")&&!e.is("element","imageBlock"))}function Ew(){return!!window.CKBox}i.CKBoxEditing=kw;function Tw(e){if(Array.isArray(e)){const t=e.map(Tw);return e=>t.some(t=>t(e))}if("origin"==e){const e=r.window.location.origin;return t=>new URL(t,r.document.baseURI).origin==e}return"function"==typeof e?e:e instanceof RegExp?t=>!(!t.match(e)&&!t.replace(/^https?:\/\//,"").match(e)):()=>!1}i.CKBox=class extends ps{static get pluginName(){return"CKBox"}static get isOfficialPlugin(){return!0}static get requires(){return[kw,iw]}};class Aw extends gs{_wrapper=null;_processInProgress=new Set;_canEdit;_prepareOptions;_updateUiDelayed=rs(()=>this.editor.ui.update(),0);constructor(e){super(e),this.value=!1,this._canEdit=function(e){const t=Tw(e);return e=>!(!e.is("element","imageInline")&&!e.is("element","imageBlock"))&&(!!e.hasAttribute("ckboxImageId")||!!e.hasAttribute("src")&&t(e.getAttribute("src")))}(e.config.get("ckbox.allowExternalImagesEditing")),this._prepareOptions=Or((e,t)=>
6this._prepareOptionsAbortable(e,t)),this._prepareListeners()}refresh(){const e=this.editor;this.value=this._getValue();const t=e.model.document.selection.getSelectedElement();this.isEnabled=!!t&&this._canEdit(t)&&!this._checkIfElementIsBeingProcessed(t)}execute(){if(this._getValue())return;const e=Nr(document,"div",{class:"ck ckbox-wrapper"});this._wrapper=e,this.value=!0,document.body.appendChild(this._wrapper);const t={element:this.editor.model.document.selection.getSelectedElement(),controller:new AbortController};this._prepareOptions(t).then(t=>window.CKBox.mountImageEditor(e,t),e=>{const t=this.editor,i=t.t;t.plugins.get(Qg).showWarning(i("Failed to determine category of edited image."),{namespace:"ckbox"}),console.error(e),this._handleImageEditorClose()})}destroy(){this._handleImageEditorClose(),this._prepareOptions.abort(),this._updateUiDelayed.cancel();for(const e of this._processInProgress.values())e.controller.abort();super.destroy()}_getValue(){return null!==this._wrapper}async _prepareOptionsAbortable(e,t){const i=this.editor,n=i.config.get("ckbox"),r=i.plugins.get(bw),{element:o}=t;let s;const a=o.getAttribute("ckboxImageId");if(a)s={assetId:a};else{const t=new URL(o.getAttribute("src"),document.baseURI).href;s={imageUrl:t,uploadCategoryId:await r.getCategoryIdForFile(t,{signal:e})}}return{...s,imageEditing:{allowOverwrite:!1},tokenUrl:n.tokenUrl,...n.serviceOrigin&&{serviceOrigin:n.serviceOrigin},onClose:()=>this._handleImageEditorClose(),onSave:e=>this._handleImageEditorSave(t,e)}}_prepareListeners(){this.listenTo(this.editor.model.document,"change:data",()=>
6{this._getProcessingStatesOfDeletedImages().forEach(e=>{e.controller.abort()})})}_getProcessingStatesOfDeletedImages(){const e=[];for(const t of this._processInProgress.values())"$graveyard"==t.element.root.rootName&&e.push(t);return e}_checkIfElementIsBeingProcessed(e){for(const{element:t}of this._processInProgress)if(pr(t,e))return!0;return!1}_handleImageEditorClose(){this._wrapper&&(this._wrapper.remove(),this._wrapper=null,this.editor.editing.view.focus(),this._updateUiDelayed(),this.refresh())}_handleImageEditorSave(e,t){const i=this.editor.locale.t,n=this.editor.plugins.get(Qg),r=this.editor.plugins.get(qd),o=r.add(i("Processing the edited image."));this._processInProgress.add(e),this._showImageProcessingIndicator(e.element,t),this.refresh(),this._waitForAssetProcessed(t.data.id,e.controller.signal).then(t=>{this._replaceImage(e.element,t)},t=>{this.editor.editing.reconvertItem(e.element),e.controller.signal.aborted||(!t||t instanceof v?n.showWarning(i("Server failed to process the image."),{namespace:"ckbox"}):console.error(t))}).finally(()=>{this._processInProgress.delete(e),r.remove(o),this.refresh()})}async _getAssetStatusFromServer(e,t){const i=this.editor.plugins.get(bw),n=new URL("assets/"+e,this.editor.config.get("ckbox.serviceOrigin")),r=await dw({url:n,signal:t,authorization:(await i.getToken()).value}),o=r.metadata.metadataProcessingStatus;if(!o||"queued"==o)throw new v("ckbox-image-not-processed");return{data:{...r}}}async _waitForAssetProcessed(e,t){const i=await ts(()=>this._getAssetStatusFromServer(e,t),{signal:t,maxAttempts:5});if("success"!=i.data.metadata.metadataProcessingStatus)throw new v("ckbox-image-processing-failed");return i}_showImageProcessingIndicator(e,t){const i=this.editor;i.editing.view.change(n=>{const r=i.editing.mapper.toViewElement(e),o=this.editor.plugins.get("ImageUtils").findViewImgElement(r);n.removeStyle("aspect-ratio",o),n.setAttribute("width",t.data.metadata.width,o),n.setAttribute("height",t.data.metadata.height,o),n.setStyle("width",`${t.data.metadata.width}px`,o),n.setStyle("height",`${t.data.metadata.height}px`,o),n.addClass("image-processing",r)})}_replaceImage(e,t){const i=this.editor,{imageFallbackUrl:n,imageSources:r,imageWidth:o,imageHeight:s,imagePlaceholder:a}=mw(t),l=Array.from(i.model.document.selection.getRanges());i.model.change(c=>{c.setSelection(e,"on"),i.execute("insertImage",{imageType:e.is("element","imageInline")?"imageInline":null,source:{src:n,sources:r,width:o,height:s,...a?{placeholder:a}:null,...e.hasAttribute("alt")?{alt:e.getAttribute("alt")}:null}});const u=e.getChildren();e=i.model.document.selection.getSelectedElement();for(const t of u)c.append(c.cloneElement(t),e);c.setAttribute("ckboxImageId",t.data.id,e),c.setSelection(l)})}}class Iw extends ps{static get pluginName(){return"CKBoxImageEditEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[kw,bw,qd,Qg,"ImageUtils","ImageEditing"]}init(){const{editor:e}=this;e.commands.add("ckboxImageEdit",new Aw(e))}}i.CKBoxImageEditEditing=Iw;class Mw extends ps{static get pluginName(){return"CKBoxImageEditUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("ckboxImageEdit",t=>{const i=e.commands.get("ckboxImageEdit"),n=e.commands.get("uploadImage"),r=new Ff(t),o=t.t;return r.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037H5.06l5.058-5.078L6.617 9.15a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v4.354a3.478 3.478 0 0 1 1.5.049V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.147 2.147 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.642-3.11 2.129 2.129 0 0 0-1.873-.978ZM8.089 17.635v2.388h2.389l7.046-7.046-2.39-2.39-7.045 7.048Zm11.282-6.507a.637.637 0 0 0 .139-.692.603.603 0 0 0-.139-.205l-1.49-1.488a.63.63 0 0 0-.899 0l-1.166 1.163 2.39 2.39 1.165-1.168Z"/></svg>',tooltip:!0}),r.bind("label").to(n,"isAccessAllowed",e=>o(e?"Edit image":"You have no image editing permissions.")),r.bind("isOn").to(i,"value",i,"isEnabled",(e,t)=>e&&t),r.bind("isEnabled").to(i),this.listenTo(r,"execute",()=>{e.execute("ckboxImageEdit"),e.editing.view.focus()}),r})}}i.CKBoxImageEditUI=Mw;i.CKBoxImageEdit=class extends ps{static get pluginName(){return"CKBoxImageEdit"}static get isOfficialPlugin(){return!0}static get requires(){return[Iw,Mw]}};class Pw extends ps{static get pluginName(){return"CKFinderUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("ckfinder",()=>this._createFileToolbarButton()),e.ui.componentFactory.add("menuBar:ckfinder",()=>this._createFileMenuBarButton()),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"assetManager",observable:()=>e.commands.get("ckfinder"),buttonViewCreator:()=>this._createImageToolbarButton(),formViewCreator:()=>this._createImageDropdownButton(),menuBarButtonViewCreator:e=>this._createImageMenuBarButton(e?"insertOnly":"insertNested")})}_createButton(e){const t=this.editor,i=new e(t.locale),n=t.commands.get("ckfinder");return i.bind("isEnabled").to(n),i.on("execute",()=>{t.execute("ckfinder"),t.editing.view.focus()}),i}_createFileToolbarButton(){const e=this.editor.locale.t,t=this._createButton(Ff);return t.icon=Yd.browseFiles,t.label=e("Insert image or file"),t.tooltip=!0,t}_createImageToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(Ff);return i.icon=Yd.imageAssetManager,i.bind("label").to(t,"isImageSelected",t=>e(t?"Replace image with file manager":"Insert image with file manager")),i.tooltip=!0,i}_createImageDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(Ff);return i.icon=Yd.imageAssetManager,i.withText=!0,i.bind("label").to(t,"isImageSelected",t=>e(t?"Replace with file manager":"Insert with file manager")),i.on("execute",()=>{t.dropdownView.isOpen=!1}),i}_createFileMenuBarButton(){const e=this.editor.locale.t,t=this._createButton(ep);return t.icon=Yd.browseFiles,t.withText=!0,t.label=e("File"),t}_createImageMenuBarButton(e){const t=this.editor.locale.t,i=this.editor.locale.t,n=this._createButton(ep);switch(n.icon=Yd.imageAssetManager,n.withText=!0,e){case"insertOnly":n.label=t("Image");break;case"insertNested":n.label=i("With file manager")}return n}}i.CKFinderUI=Pw;class Dw extends gs{constructor(e){super(e),this.affectsData=!1,this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new v("ckfinder-unknown-openermethod",e);const i=this.editor.config.get("ckfinder.options")||{};i.chooseFiles=!0;const n=i.onInit;i.language||(i.language=e.locale.uiLanguage),i.onInit=t=>{n&&n(t),t.on("files:choose",i=>{const n=i.data.files.toArray(),r=n.filter(e=>!e.isImage()),o=n.filter(e=>e.isImage());for(const t of r)e.execute("link",t.getUrl());const s=[];for(const e of o){const i=e.getUrl();s.push(i||t.request("file:getProxyUrl",{file:e}))}s.length&&Ow(e,s)}),t.on("file:choose:resizedImage",t=>{const i=t.data.resizedUrl;if(i)Ow(e,[i]);else{const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("Could not obtain resized image URL."),{title:i("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](i)}}function Ow(e,t){if(e.commands.get("insertImage").isEnabled)e.execute("insertImage",{source:t});else{const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("Could not insert image at the current position."),{title:i("Inserting image failed"),namespace:"ckfinder"})}}class Lw extends ps{static get pluginName(){return"CKFinderEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Qg,"LinkEditing"]}init(){const e=this.editor;if(!e.plugins.has("ImageBlockEditing")&&!e.plugins.has("ImageInlineEditing"))throw new v("ckfinder-missing-image-plugin",e);e.commands.add("ckfinder",new Dw(e))}}i.CKFinderEditing=Lw;i.CKFinder=class extends ps{static get pluginName(){return"CKFinder"}static get isOfficialPlugin(){return!0}static get requires(){return["Link","CKFinderUploadAdapter",Lw,Pw]}};class Rw extends el{domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];constructor(e){super(e);const t=this.document;function i(e){return(i,n)=>{n.preventDefault();const r=n.dropRange?[n.dropRange]:null,o=new d(t,e);t.fire(o,{dataTransfer:n.dataTransfer,method:i.name,targetRanges:r,target:n.target,domEvent:n.domEvent}),o.stop.called&&n.stopPropagation()}}this.listenTo(t,"paste",i("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",i("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",i("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,i="drop"==e.type||"paste"==e.type,n={dataTransfer:new ll(t,{cacheFiles:i})};if("drop"==e.type||"dragover"==e.type){const t=Kr(e);n.dropRange=t&&this.view.domConverter.domRangeToView(t)}this.fire(e.type,e,n)}}function Bw(e){return((e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("</p><p>")||e.includes("<br>"))&&(e=`<p>${e}</p>`),e}const Nw=["figcaption","li"],jw=["ol","ul"];function Fw(e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return"\n";let t="",i=null;for(const n of e.getChildren())t+=zw(n,i)+Fw(n),i=n;return t}function zw(e,t){return t?e.is("element","li")&&!e.isEmpty&&e.getChild(0).is("containerElement")||jw.includes(e.name)&&jw.includes(t.name)?"\n\n":e.is("containerElement")||t.is("containerElement")?Nw.includes(e.name)||Nw.includes(t.name)?"\n":e.is("element")&&e.getCustomProperty("dataPipeline:transparentRendering")||t.is("element")&&t.getCustomProperty("dataPipeline:transparentRendering")?"":"\n\n":"":""}class Vw extends ps{_markersToCopy=new Map;static get pluginName(){return"ClipboardMarkersUtils"}static get isOfficialPlugin(){return!0}_registerMarkerToCopy(e,t){this._markersToCopy.set(e,t)}_copySelectedFragmentWithMarkers(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e.model.getSelectedContent(e.model.document.selection);return this.editor.model.change(n=>{const r=n.model.document.selection;n.setSelection(t);const o=this._insertFakeMarkersIntoSelection(n,n.model.document.selection,e),s=i(n),a=this._removeFakeMarkersInsideElement(n,s);for(const[e,t]of Object.entries(o)){a[e]||=n.createRangeIn(s);for(const e of t)n.remove(e)}s.markers.clear();for(const[e,t]of Object.entries(a))s.markers.set(e,t);return n.setSelection(r),s})}_pasteMarkersIntoTransformedElement(e,t){const i=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change(e=>{const n=this._insertFakeMarkersElements(e,i),r=t(e),o=this._removeFakeMarkersInsideElement(e,r);for(const t of Object.values(n).flat())e.remove(t);for(const[t,i]of Object.entries(o))e.model.markers.has(t)||e.addMarker(t,{usingOperation:!0,affectsData:!0,range:i});return r})}_pasteFragmentWithMarkers(e){const t=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const i of t)e.markers.set(i.name,i.range);return this.editor.model.insertContent(e)}
6_forceMarkersCopy(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0};const n=this._markersToCopy.get(e);this._markersToCopy.set(e,i),t(),n?this._markersToCopy.set(e,n):this._markersToCopy.delete(e)}_isMarkerCopyable(e,t){const i=this._getMarkerClipboardConfig(e);if(!i)return!1;if(!t)return!0;const{allowedActions:n}=i;return"all"===n||n.includes(t)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[t]=e.split(":");return this._markersToCopy.get(t)||null}_insertFakeMarkersIntoSelection(e,t,i){const n=this._getCopyableMarkersFromSelection(e,t,i);return this._insertFakeMarkersElements(e,n)}_getCopyableMarkersFromSelection(e,t,i){const n=Array.from(t.getRanges()),r=new Set(n.flatMap(t=>Array.from(e.model.markers.getMarkersIntersectingRange(t))));return Array.from(r).filter(e=>{if(!this._isMarkerCopyable(e.name,i))return!1;const{copyPartiallySelected:t}=this._getMarkerClipboardConfig(e.name);if(!t){const t=e.getRange();return n.some(e=>e.containsRange(t,!0))}return!0}).map(e=>({name:"dragstart"===i?this._getUniqueMarkerName(e.name):e.name,range:e.getRange()}))}_getPasteMarkersFromRangeMap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{model:i}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap(e=>{let[n,r]=e;if(!this._hasMarkerConfiguration(n))return[{name:n,range:r}];if(this._isMarkerCopyable(n,t)){const e=this._getMarkerClipboardConfig(n),t=i.markers.has(n)&&"$graveyard"===i.markers.get(n).getRange().root.rootName;return(e.duplicateOnPaste||t)&&(n=this._getUniqueMarkerName(n)),[{name:n,range:r}]}return[]})}_insertFakeMarkersElements(e,t){const i={},n=t.flatMap(e=>{const{start:t,end:i}=e.range;return[{position:t,marker:e,type:"start"},{position:i,marker:e,type:"end"}]}).sort((e,t)=>{let{position:i}=e,{position:n}=t;return i.isBefore(n)?1:-1});for(const{position:t,marker:r,type:o}of n){const n=e.createElement("$marker",{"data-name":r.name,"data-type":o});i[r.name]||(i[r.name]=[]),i[r.name].push(n),e.insert(n,t)}return i}_removeFakeMarkersInsideElement(e,t){const i=this._getAllFakeMarkersFromElement(e,t).reduce((t,i)=>{const n=i.markerElement&&e.createPositionBefore(i.markerElement);let r=t[i.name],o=!1;return r&&r.start&&r.end&&(this._getMarkerClipboardConfig(i.name).duplicateOnPaste?t[this._getUniqueMarkerName(i.name)]=t[i.name]:o=!0,r=null),o||(t[i.name]={...r,[i.type]:n}),i.markerElement&&e.remove(i.markerElement),t},{});return n=i,o={},r=$n(r=i=>new Cl(i.start||e.createPositionFromPath(t,[0]),i.end||e.createPositionAt(t,"end"))),qn(n,function(e,t,i){Ie(o,t,r(e,t,i))}),o;var n,r,o}_getAllFakeMarkersFromElement(e,t){const i=Array.from(e.createRangeIn(t)).flatMap(e=>{let{item:t}=e;if(!t.is("element","$marker"))return[];const i=t.getAttribute("data-name"),n=t.getAttribute("data-type");return[{markerElement:t,name:i,type:n}]}),n=[],r=[];for(const e of i)"end"===e.type&&(i.some(t=>t.name===e.name&&"start"===t.type)||n.push({markerElement:null,name:e.name,type:"start"})),"start"===e.type&&(i.some(t=>t.name===e.name&&"end"===t.type)||r.unshift({markerElement:null,name:e.name,type:"end"}));return[...n,...i,...r]}_getUniqueMarkerName(e){const t=e.split(":"),i=p().substring(1,6);return 3===t.length?`${t.slice(0,2).join(":")}:${i}`:`${t.join(":")}:${i}`}}i.ClipboardMarkersUtils=Vw;class Hw extends ps{static get pluginName(){return"ClipboardPipeline"}static get isOfficialPlugin(){return!0}static get requires(){return[Vw]}init(){this.editor.editing.view.addObserver(Rw),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,i){const n=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:"cut"===i},()=>{const r=n._copySelectedFragmentWithMarkers(i,t);this.fire("outputTransformation",{dataTransfer:e,content:r,method:i})})}_setupPasteDrop(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document,r=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(n,"clipboardInput",(t,i)=>{"paste"!=i.method||e.model.canEditAt(e.model.document.selection)||t.stop()},{priority:"highest"}),this.listenTo(n,"clipboardInput",(e,t)=>{const n=t.dataTransfer;let r;if(t.content)r=t.content;else{let e="";n.getData("text/html")?e=function(e){return e.replace(/<span(?: class="Apple-converted-s
6pace"|)>(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t).replace(/<!--[\s\S]*?-->/g,"")}(n.getData("text/html")):n.getData("text/plain")&&(e=Bw(n.getData("text/plain"))),r=this.editor.data.htmlProcessor.toView(e)}const o=new d(this,"inputTransformation");this.fire(o,{content:r,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),o.stop.called&&e.stop(),i.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,i)=>{if(i.content.isEmpty)return;const n=this.editor.data.toModel(i.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change(()=>{this.fire("contentInsertion",{content:n,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(e,t)=>{t.resultRange=r._pasteFragmentWithMarkers(t.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,i=e.editing.view.document,n=(e,i)=>{const n=i.dataTransfer;i.preventDefault(),this._fireOutputTransformationEvent(n,t.selection,e.name)};this.listenTo(i,"copy",n,{priority:"low"}),this.listenTo(i,"cut",(t,i)=>{e.model.canEditAt(e.model.document.selection)?n(t,i):i.preventDefault()},{priority:"low"}),this.listenTo(this,"outputTransformation",(t,n)=>{const r=e.data.toView(n.content);i.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:r,method:n.method})},{priority:"low"}),this.listenTo(i,"clipboardOutput",(i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",Fw(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}i.ClipboardPipeline=Hw;const Uw=co("px");class Ww extends Df{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",e=>!e)],style:{left:e.to("left",e=>Uw(e)),top:e.to("top",e=>Uw(e)),width:e.to("width",e=>Uw(e))}}})}}class $w extends ps{removeDropMarkerDelayed=rs(()=>this.removeDropMarker(),40);_updateDropMarkerThrottled=yr(e=>this._updateDropMarker(e),40);_reconvertMarkerThrottled=yr(()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")},0);_dropTargetLineView=new Ww;_domEmitter=new(Wr());_scrollables=new Map;static get pluginName(){return"DragDropTarget"}static get isOfficialPlugin(){return!0}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,i,n,r,o){this.removeDropMarkerDelayed.cancel();const s=Gw(this.editor,e,t,i,n,r,o);if(s)return o&&o.containsRange(s)?this.removeDropMarker():void this._updateDropMarkerThrottled(s)}getFinalDropRange(e,t,i,n,r,o){const s=Gw(this.editor,e,t,i,n,r,o);return this.removeDropMarker(),s}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change(e=>{e.removeMarker("drop-target")})}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,i)=>{let{writer:n}=i;if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(n);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,i=t.model.markers;t.model.change(t=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(e){const t=this.toDomElement(e);return t.append("â ",e.createElement("span"),"â "),t})}_updateDropTargetLine(e){const t=this.editor.editing,i=e.start.nodeBefore,n=e.start.nodeAfter,o=e.start.parent,s=i?t.mapper.toViewElement(i):null,a=s?t.view.domConverter.mapViewToDom(s):null,l=n?t.mapper.toViewElement(n):null,c=l?t.view.domConverter.mapViewToDom(l):null,u=t.mapper.toViewElement(o);if(!u)return;const h=t.view.domConverter.mapViewToDom(u),d=this._getScrollableRect(u),{scrollX:f,scrollY:p}
6=r.window,m=a?new io(a):null,g=c?new io(c):null,v=new io(h).excludeScrollbarsAndBorders(),b=m?m.bottom:v.top,y=g?g.top:v.bottom,w=r.window.getComputedStyle(h),_=b<=y?(b+y)/2:y;if(d.top<_&&_<d.bottom){const e=v.left+parseFloat(w.paddingLeft),t=v.right-parseFloat(w.paddingRight),i=Math.max(e+f,d.left),n=Math.min(t+f,d.right);this._dropTargetLineView.set({isVisible:!0,left:i,top:_+p,width:n-i})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let i;if(this._scrollables.has(t))i=this._scrollables.get(t).domElement;else{i=function(e){let t=e;do{t=t.parentElement;const e=r.window.getComputedStyle(t).overflowY;if("auto"==e||"scroll"==e)break}while("BODY"!=t.tagName);return t}(this.editor.editing.view.domConverter.mapViewToDom(e)),this._domEmitter.listenTo(i,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const n=new ao(i,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:i,resizeObserver:n})}return new io(i).excludeScrollbarsAndBorders()}}function Gw(e,t,i,n,r,o,s){const a=e.model,l=e.editing.mapper;let c=Xw(e,t);for(;c;){if(!o)if(a.schema.checkChild(c,"$text")){if(i){const t=i[0].start,o=l.toModelPosition(t);if(!s||Array.from(s.getItems({shallow:!0})).every(e=>a.schema.checkChild(o,e))){if(a.schema.checkChild(o,"$text"))return a.createRange(o);if(t)return Yw(e,Xw(e,t.parent),n,r)}}}else if(a.schema.isInline(c))return Yw(e,c,n,r);if(a.schema.isBlock(c))return Yw(e,c,n,r);if(a.schema.checkChild(c,"$block")){const t=Array.from(c.getChildren()).filter(t=>t.is("element")&&!qw(e,t));let i=0,o=t.length;if(0==o)return a.createRange(a.createPositionAt(c,"end"));for(;i<o-1;){const s=Math.floor((i+o)/2);"before"==Zw(e,t[s],n,r)?o=s:i=s}return Yw(e,t[i],n,r)}c=c.parent}return null}function qw(e,t){const i=e.editing.mapper,n=e.editing.view.domConverter,o=i.toViewElement(t);if(!o)return!0;const s=n.mapViewToDom(o);return"none"!=r.window.getComputedStyle(s).float}function Yw(e,t,i,n){const r=e.model;return r.createRange(r.createPositionAt(t,Zw(e,t,i,n)))}function Zw(e,t,i,n){const r=e.editing.mapper,o=e.editing.view.domConverter,s=r.toViewElement(t),a=o.mapViewToDom(s),l=new io(a);return e.model.schema.isInline(t)?i<(l.left+l.right)/2?"before":"after":n<(l.top+l.bottom)/2?"before":"after"}function Xw(e,t){const i=e.editing.mapper,n=e.editing.view,r=i.toModelElement(t);if(r)return r;const o=n.createPositionBefore(t),s=i.findMappedViewAncestor(o);return i.toModelElement(s)}i.DragDropTarget=$w;class Kw extends ps{_isBlockDragging=!1;_domEmitter=new(Wr());static get pluginName(){return"DragDropBlockToolbar"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",(e,t,i)=>{i?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")}),s.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(t,"dragstart",(e,t)=>this._handleBlockDragStart(t)),this._domEmitter.listenTo(r.document,"dragover",(e,t)=>this._handleBlockDragging(t)),this._domEmitter.listenTo(r.document,"drop",(e,t)=>this._handleBlockDragging(t)),this._domEmitter.listenTo(r.document,"dragend",()=>this._handleBlockDragEnd(),{useCapture:!0}),this.isEnabled&&t.setAttribute("draggable","true"),this.on("change:isEnabled",(e,i,n)=>{t.setAttribute("draggable",n?"true":"false")})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,i=t.document.selection,n=this.editor.editing.view,r=Array.from(i.getSelectedBlocks()),o=t.createRange(t.createPositionBefore(r[0]),t.createPositionAfter(r[r.length-1]));t.change(e=>e.setSelection(o)),this._isBlockDragging=!0,n.focus(),n.getObserver(Rw).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),i=e.clientY,n=document.elementFromPoint(t,i),r=this.editor.editing.view;n&&n.closest(".ck-editor__editable")&&r.getObserver(Rw).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:n,clientX:t,clientY:i,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}i.DragDropBlockToolbar=Kw;class Jw extends ps{_draggedRange;_draggingUid;_draggableElement;_clearDraggableAttributesDelayed=rs(()=>this._clearDraggableAttributes(),40);_blockMode=!1;_domEmitter=new(Wr());_previewContainer;static get pluginName(){return"DragDrop"}static get isOfficialPlugin(){return!0}static get requires(){return[Hw,Ry,$w,Kw]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(Rw),t.addObserver(mh),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(e,t,i)=>{i||this._finalizeDragging(!1)}),s.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document,o=e.plugins.get($w);this.listenTo(n,"dragstart",(e,i)=>{if(i.target&&i.target.is("editableElement"))return void i.preventDefault();if(this._prepareDraggedRange(i.target),!this._draggedRange)return void i.preventDefault();this._draggingUid=p(),i.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",i.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const n=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(i.dataTransfer,n,"dragstart");
6const{dataTransfer:r,domTarget:o,domEvent:s}=i,{clientX:a}=s;this._updatePreview({dataTransfer:r,domTarget:o,clientX:a}),i.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(n,"dragend",(e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)},{priority:"low"}),this._domEmitter.listenTo(r.document,"dragend",()=>{this._blockMode=!1},{useCapture:!0}),this.listenTo(n,"dragenter",()=>{this.isEnabled&&i.focus()}),this.listenTo(n,"dragleave",()=>{o.removeDropMarkerDelayed()}),this.listenTo(n,"dragging",(e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:i,clientY:n}=t.domEvent;o.updateDropMarker(t.target,t.targetRanges,i,n,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),s.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get($w);this.listenTo(t,"clipboardInput",(t,n)=>{if("drop"!=n.method)return;const{clientX:r,clientY:o}=n.domEvent,s=i.getFinalDropRange(n.target,n.targetRanges,r,o,this._blockMode,this._draggedRange);return s?(this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==Qw(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(s,!0)?(this._finalizeDragging(!1),void t.stop()):void(n.targetRanges=[e.editing.mapper.toViewRange(s)])):(this._finalizeDragging(!1),void t.stop())},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Hw);e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i=t.targetRanges.map(e=>this.editor.editing.mapper.toModelRange(e));this.editor.model.change(e=>e.setSelection(i))},{priority:"high"}),e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i="move"==Qw(t.dataTransfer),n=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(n&&i)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,i=t.document;this.listenTo(i,"mousedown",(n,r)=>{if(s.isAndroid||!r)return;this._clearDraggableAttributesDelayed.cancel();let o=e_(r.target);if(s.isBlink&&!e.isReadOnly&&!o&&!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&py(e)||(o=i.selection.editableElement)}o&&(t.change(e=>{e.setAttribute("draggable","true",o)}),this._draggableElement=e.editing.mapper.toModelElement(o))}),this.listenTo(i,"mouseup",()=>{s.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change(t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_finalizeDragging(e){const t=this.editor,i=t.model;t.plugins.get($w).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&i.change(e=>{const t=i.createSelection(this._draggedRange);i.deleteContent(t,{doNotAutoparagraph:!0});const n=t.getFirstPosition().parent;n.isEmpty&&!i.schema.checkChild(n,"$text")&&i.schema.checkChild(n,"paragraph")&&e.insertElement("paragraph",n,0)}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,i=t.model,n=i.document.selection,r=e?e_(e):null;if(r){const e=t.editing.mapper.toModelElement(r);return this._draggedRange=Fl.fromRange(i.createRangeOn(e)),this._blockMode=i.schema.isBlock(e),void(t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop"))}if(n.isCollapsed&&!n.getFirstPosition().parent.isEmpty)return;const o=Array.from(n.getSelectedBlocks()),s=n.getFirstRange();if(0==o.length)return void(this._draggedRange=Fl.fromRange(s));const a=t_(i,o);if(o.length>1)this._draggedRange=Fl.fromRange(a),this._blockMode=!0;else if(1==o.length){const e=s.start.isTouching(a.start)&&s.end.isTouching(a.end);this._draggedRange=Fl.fromRange(e?a:s),this._blockMode=e}i.change(e=>e.setSelection(this._draggedRange.toRange()))}_updatePreview(e){let{dataTransfer:t,domTarget:i,clientX:n}=e;const o=this.editor.editing.view,a=o.document.selection.editableElement,l=o.domConverter.mapViewToDom(a),c=r.window.getComputedStyle(l);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=Nr(r.document,"div",{style:"position: fixed; left: -999999px;"}),r.document.body.appendChild(this._previewContainer));const u=new io(l);if(l.contains(i))return;const h=parseFloat(c.paddingLeft),d=Nr(r.document,"div");
6d.className="ck ck-content",d.style.width=c.width,d.style.paddingLeft=`${u.left-n+h}px`,s.isiOS&&(d.style.backgroundColor="white"),o.domConverter.setContentOf(d,t.getData("text/html")),t.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function Qw(e){return s.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function e_(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(py);if(py(e))return e;const t=e.findAncestor(e=>py(e)||e.is("editableElement"));return py(t)?t:null}function t_(e,t){const i=t[0],n=t[t.length-1],r=i.getCommonAncestor(n),o=e.createPositionBefore(i),s=e.createPositionAfter(n);if(r&&r.is("element")&&!e.schema.isLimit(r)){const t=e.createRangeOn(r),i=o.isTouching(t.start),n=s.isTouching(t.end);if(i&&n)return t_(e,[r])}return e.createRange(o,s)}i.DragDrop=Jw;class i_ extends ps{static get pluginName(){return"PastePlainText"}static get isOfficialPlugin(){return!0}static get requires(){return[Hw]}init(){const e=this.editor,t=e.model,i=e.editing.view,n=t.document.selection;i.addObserver(Rw),e.plugins.get(Hw).on("contentInsertion",(e,i)=>{(function(e,t){let i=t.createRangeIn(e);if(1==e.childCount){const n=e.getChild(0);n.is("element")&&t.schema.isBlock(n)&&!t.schema.isObject(n)&&!t.schema.isLimit(n)&&(i=t.createRangeIn(n))}for(const e of i.getItems()){if(!t.schema.isInline(e))return!1;if(Array.from(e.getAttributeKeys()).find(e=>t.schema.getAttributeProperties(e).isFormatting))return!1}return!0})(i.content,t)&&t.change(e=>{const r=Array.from(n.getAttributes()).filter(e=>{let[i]=e;return t.schema.getAttributeProperties(i).isFormatting});n.isCollapsed||t.deleteContent(n,{doNotAutoparagraph:!0}),r.push(...n.getAttributes());const o=e.createRangeIn(i.content);for(const i of o.getItems())for(const n of r)t.schema.checkAttribute(i,n[0])&&e.setAttribute(n[0],n[1],i)})})}}i.PastePlainText=i_;class n_ extends ps{static get pluginName(){return"Clipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[Vw,Hw,Jw,i_]}init(){const e=this.editor,t=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Copy selected content"),keystroke:"CTRL+C"},{label:t("Paste content"),keystroke:"CTRL+V"},{label:t("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}i.Clipboard=n_;const r_={autoRefresh:!0},o_=36e5;class s_ extends(Er()){_refresh;_options;_tokenRefreshTimeout;_isDestroyed=!1;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(super(),!e)throw new v("token-missing-token-url",this);t.initValue&&this._validateTokenValue(t.initValue),this.set("value",t.initValue),this._refresh="function"==typeof e?e:()=>{return t=e,new Promise((e,i)=>{const n=new XMLHttpRequest;n.open("GET",t),n.addEventListener("load",()=>{const t=n.status,r=n.response;return t<200||t>299?i(new v("token-cannot-download-new-token",null)):e(r)}),n.addEventListener("error",()=>i(new Error("Network Error"))),n.addEventListener("abort",()=>i(new Error("Abort"))),n.send()});var t},this._options={...r_,...t}}init(){return new Promise((e,t)=>{this.value?(this._options.autoRefresh&&this._registerRefreshTokenTimeout(),e(this)):this.refreshToken().then(e).catch(t)})}refreshToken(){const e=this._options.autoRefresh;return this._refresh().then(t=>(this._validateTokenValue(t),this.set("value",t),e&&this._registerRefreshTokenTimeout(),this)).catch(t=>{throw b("token-refresh-failed",{autoRefresh:e}),e&&this._registerRefreshTokenTimeout(5e3),t})}destroy(){this._isDestroyed=!0,clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(e){const t="string"==typeof e,i=!/^".*"$/.test(e),n=t&&3===e.split(".").length;if(!i||!n)throw new v("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(e){if(clearTimeout(this._tokenRefreshTimeout),this._isDestroyed)return;const t=e||this._getTokenRefreshTimeoutTime();this._tokenRefreshTimeout=setTimeout(()=>{this.refreshToken()},t)}_getTokenRefreshTimeoutTime(){try{const[,e]=this.value.split("."),{exp:t}=JSON.parse(atob(e));return t?Math.floor((1e3*t-Date.now())/2):o_}catch(e){return o_}}static create(e){return new s_(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).init()}}i.Token=s_;const a_=/^data:(\S*?);base64,/;class l_ extends(A()){file;xhr;_token;_apiAddress;constructor(e,t,i){if(super(),!e)throw new v("fileuploader-missing-file",null);if(!t)throw new v("fileuploader-missing-token",null);if(!i)throw new v("fileuploader-missing-api-address",null);this.file=function(e){if("string"!=typeof e)return!1;const t=e.match(a_);return!(!t||!t.length)}(e)?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512;try{const i=e.match(a_)[1],n=atob(e.replace(a_,"")),r=[];for(let e=0;e<n.length;e+=t){const i=n.slice(e,e+t),o=new Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);r.push(new Uint8Array(o))}return new Blob(r,{type:i})}catch(e){throw new v("fileuploader-decoding-image-data-error",null)}}(e):e,this._token=t,this._apiAddress=i}onProgress(e){return this.on("progress",(t,i)=>e(i)),this}onError(e){return this.once("error",(t,i)=>e(i)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){const e=this.xhr,t=e=>()=>this.fire("error",e);e.addEventListener("error",t("Network Error")),e.addEventListener("abort",t("Abort")),e.upload&&e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.fire("progress",{total:e.total,uploaded:e.loaded})}),e.addEventListener("load",()=>{const t=e.status,i=e.response;if(t<200||t>299)return this.fire("error",i.message||i.error)})}_sendRequest(){const e=new FormData,t=this.xhr;return e.append("file",this.file),new Promise((i,n)=>{t.addEventListener("load",()=>{const e=t.status,r=t.response;return e<200||e>299?r.message?n(new v("fileuploader-uploading-data-failed",this,{message:r.message})):n(r.error):i(r)}),t.addEventListener("error",()=>n(new Error("Network Error"))),t.addEventListener("abort",()=>n(new Error("Abort"))),t.send(e)})}}class c_{_token;_apiAddress;constructor(e,t){if(!e)throw new v("uploadgateway-missing-token",null);if(!t)throw new v("uploadgateway-missing-api-address",null);this._token=e,this._apiAddress=t}upload(e){return new l_(e,this._token,this._apiAddress)}}class u_ extends _s{static get pluginName(){return"CloudServicesCore"}static get isOfficialPlugin(){return!0}createToken(e,t){return new s_(e,t)}createUploadGateway(e,t){return new c_(e,t)}}i.CloudServicesCore=u_;function h_(e){const t=e.t,i=e.config.get("codeBlock.languages");for(const e of i)"Plain text"===e.label&&(e.label=t("Plain text")),void 0===e.class&&(e.class=`language-${e.language}`);return i}function d_(e,t,i){const n={};for(const r of e)"class"===t?n[r[t].split(" ").shift()]=r[i]:n[r[t]]=r[i];return n}function f_(e){return e.data.match(/^(\s*)/)[0]}function p_(e){const t=e.document.selection,i=[];if(t.isCollapsed)return[t.anchor];const n=t.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(const{item:t}of n){let n=t.is("$textProxy")?t.textNode:t;const r=n.parent;if(!r.is("element","codeBlock")||n.is("element","softBreak"))continue;for(;n.previousSibling&&!n.previousSibling.is("element","softBreak");)n=n.previousSibling;const o=n.is("$text")?n.startOffset+f_(n).length:n.startOffset,s=e.createPositionAt(r,o);i.every(e=>!e.isEqual(s))&&i.push(s)}return i}function m_(e){const t=qo(e.getSelectedBlocks());return!!t&&t.is("element","codeBlock")}function g_(e,t){return!t.is("rootElement")&&!e.isLimit(t)&&e.checkChild(t.parent,"codeBlock")}function v_(e,t,i,n){const r=d_(t,"language","label"),o=i.getAttribute("language");if(o in r){return e("enter"===n?"Entering %0 code snippet":"Leaving %0 code snippet",r[o])}return e("enter"===n?"Entering code snippet":"Leaving code snippet")}function b_(e,t){for(e.textNode&&(e=t.createPositionBefore(e.textNode));e.nodeBefore&&!e.nodeBefore.is("element","softBreak");)e=t.createPositionBefore(e.nodeBefore);const i=e.nodeAfter;return i&&i.is("$text")?i:null}i.CloudServices=class extends _s{tokenUrl;uploadUrl;webSocketUrl;bundleVersion;token=null;_tokens=new Map;static get pluginName(){return"CloudServices"}static get isOfficialPlugin(){return!0}static get requires(){return[u_]}
6async init(){const e=this.context.config.get("cloudServices")||{};for(const[t,i]of Object.entries(e))this[t]=i;if(!this.tokenUrl)return void(this.token=null);const t=this.context.plugins.get("CloudServicesCore");this.token=await t.createToken(this.tokenUrl).init(),this._tokens.set(this.tokenUrl,this.token)}async registerTokenUrl(e){if(this._tokens.has(e))return this.getTokenFor(e);const t=this.context.plugins.get("CloudServicesCore"),i=await t.createToken(e).init();return this._tokens.set(e,i),i}getTokenFor(e){const t=this._tokens.get(e);if(!t)throw new v("cloudservices-token-not-registered",this);return t}destroy(){super.destroy();for(const e of this._tokens.values())e.destroy()}};class y_ extends gs{_lastLanguage;constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor,i=t.model,n=i.document.selection,r=h_(t)[0],o=Array.from(n.getSelectedBlocks()),s=null==e.forceValue?!this.value:e.forceValue,a=function(e,t,i){return e.language?e.language:e.usePreviousLanguageChoice&&t?t:i}(e,this._lastLanguage,r.language);i.change(e=>{s?this._applyCodeBlock(e,o,a):this._removeCodeBlock(e,o)})}_getValue(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!e.is("element","codeBlock"))&&e.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=qo(e.getSelectedBlocks());return!!i&&g_(t,i)}_applyCodeBlock(e,t,i){this._lastLanguage=i;const n=this.editor.model.schema,r=t.filter(e=>g_(n,e));for(const t of r)e.rename(t,"codeBlock"),e.setAttribute("language",i,t),n.removeDisallowedAttributes([t],e),Array.from(t.getChildren()).filter(e=>!n.checkChild(t,e)).forEach(t=>e.remove(t));r.reverse().forEach((t,i)=>{const n=r[i+1];t.previousSibling===n&&(e.appendElement("softBreak",n),e.merge(e.createPositionBefore(t)))})}_removeCodeBlock(e,t){const i=t.filter(e=>e.is("element","codeBlock"));for(const t of i){const i=e.createRangeOn(t);for(const t of Array.from(i.getItems()).reverse())if(t.is("element","softBreak")&&t.parent.is("element","codeBlock")){const{position:i}=e.split(e.createPositionBefore(t)),n=i.nodeAfter;e.rename(n,"paragraph"),e.removeAttribute("language",n),e.remove(t)}e.rename(t,"paragraph"),e.removeAttribute("language",t)}}}class w_ extends gs{_indentSequence;constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change(t=>{const i=p_(e);for(const n of i){const i=t.createText(this._indentSequence);e.insertContent(i,n)}})}_checkEnabled(){return!!this._indentSequence&&m_(this.editor.model.document.selection)}}class __ extends gs{_indentSequence;constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change(()=>{const t=p_(e);for(const i of t){const t=k_(e,i,this._indentSequence);t&&e.deleteContent(e.createSelection(t))}})}_checkEnabled(){if(!this._indentSequence)return!1;const e=this.editor.model;return!!m_(e.document.selection)&&p_(e).some(t=>k_(e,t,this._indentSequence))}}function k_(e,t,i){const n=b_(t,e);if(!n)return null;const r=f_(n),o=r.lastIndexOf(i);if(o+i.length!==r.length)return null;if(-1===o)return null;const{parent:s,startOffset:a}=n;return e.createRange(e.createPositionAt(s,a+o),e.createPositionAt(s,a+o+i.length))}function x_(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=d_(t,"language","class"),r=d_(t,"language","label");return(t,o,s)=>{const{writer:a,mapper:l,consumable:c}=s;if(!c.consume(o.item,"insert"))return;const u=o.item.getAttribute("language"),h=l.toViewPosition(e.createPositionBefore(o.item)),d={};i&&(d["data-language"]=r[u],d.spellcheck="false");const f=n[u]?{class:n[u]}:void 0,p=a.createContainerElement("code",f),m=a.createContainerElement("pre",d,p);a.insert(h,m),l.bindElements(o.item,p)}}const C_="paragraph";class S_ extends ps{static get pluginName(){return"CodeBlockEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[ey]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const e=this.editor,t=e.model.schema,i=e.model,n=e.editing.view,r=h_(e);e.commands.add("codeBlock",new y_(e)),e.commands.add("indentCodeBlock",new w_(e)),e.commands.add("outde
6ntCodeBlock",new __(e)),this.listenTo(n.document,"tab",(t,i)=>{const n=i.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(n).isEnabled&&(e.execute(n),i.stopPropagation(),i.preventDefault(),t.stop())},{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",disallowChildren:"$inlineObject",allowAttributes:["language"],allowAttributesOf:"$listItem",isBlock:!0}),t.addAttributeCheck((e,i)=>{const n=e.getItem(e.length-2);if(t.getAttributeProperties(i).isFormatting&&n&&"codeBlock"==n.name)return!1}),e.editing.downcastDispatcher.on("insert:codeBlock",x_(i,r,!0)),e.data.downcastDispatcher.on("insert:codeBlock",x_(i,r)),e.data.downcastDispatcher.on("insert:softBreak",function(e){return(t,i,n)=>{if("codeBlock"!==i.item.parent.name)return;const{writer:r,mapper:o,consumable:s}=n;if(!s.consume(i.item,"insert"))return;const a=o.toViewPosition(e.createPositionBefore(i.item));r.insert(a,r.createText("\n"))}}(i),{priority:"high"}),e.data.upcastDispatcher.on("element:code",function(e,t){const i=d_(t,"class","language"),n=t[0].language;return(e,t,r)=>{const o=t.viewItem,s=o.parent;if(!s||!s.is("element","pre"))return;if(t.modelCursor.findAncestor("codeBlock"))return;const{consumable:a,writer:l}=r;if(!a.test(o,{name:!0}))return;const c=l.createElement("codeBlock"),u=[...o.getClassNames()];u.length||u.push("");for(const e of u){const t=i[e];if(t){l.setAttribute("language",t,c);break}}c.hasAttribute("language")||l.setAttribute("language",n,c),r.convertChildren(o,c),r.safeInsert(c,t.modelCursor)&&(a.consume(o,{name:!0}),r.updateConversionResult(c,t))}}(0,r)),e.data.upcastDispatcher.on("text",(e,t,i)=>{let{consumable:n,writer:r}=i,o=t.modelCursor;if(!n.test(t.viewItem))return;
6if(!o.findAncestor("codeBlock"))return;n.consume(t.viewItem);const s=t.viewItem.data.split("\n").map(e=>r.createText(e)),a=s[s.length-1];for(const e of s)if(r.insert(e,o),o=o.getShiftedBy(e.offsetSize),e!==a){const e=r.createElement("softBreak");r.insert(e,o),o=r.createPositionAfter(e)}t.modelRange=r.createRange(t.modelCursor,o),t.modelCursor=o}),e.data.upcastDispatcher.on("element:pre",(e,t,i)=>{let{consumable:n}=i;const r=t.viewItem;if(r.findAncestor("pre"))return;const o=Array.from(r.getChildren()),s=o.find(e=>e.is("element","code"));if(s)for(const e of o)e!==s&&e.is("$text")&&n.consume(e,{name:!0})},{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,n)=>{let r=i.createRange(i.document.selection.anchor);if(n.targetRanges&&(r=e.editing.mapper.toModelRange(n.targetRanges[0])),!r.start.parent.is("element","codeBlock"))return;const o=n.dataTransfer.getData("text/plain"),s=new gh(e.editing.view.document);n.content=function(e,t){const i=e.createDocumentFragment(),n=t.split("\n"),r=n.reduce((t,i,r)=>(t.push(i),r<n.length-1&&t.push(e.createElement("br")),t),[]);return e.appendChild(r,i),i}(s,o)}),e.plugins.has("ClipboardPipeline")&&e.plugins.get(Hw).on("contentInsertion",(i,n)=>{const r=e.model,o=r.document.selection;o.anchor.parent.is("element","codeBlock")&&r.change(e=>{const i=e.createRangeIn(n.content);for(const n of[...i.getItems()])n.is("node")&&!t.checkChild(o.anchor,n)&&e.remove(n)})}),this.listenTo(i,"getSelectedContent",(e,n)=>{let[r]=n;const o=r.anchor;!r.isCollapsed&&o.parent.is("element","codeBlock")&&o.hasSameParentAs(r.focus)&&i.change(i=>{const n=e.return;if(o.parent.is("element")&&(n.childCount>1||r.containsEntireContent(o.parent))){const t=i.createElement("codeBlock",o.parent.getAttributes());i.append(n,t);const r=i.createDocumentFragment();return i.append(t,r),void(e.return=r)}const s=n.getChild(0);t.checkAttribute(s,"code")&&i.setAttribute("code",!0,s)})})}afterInit(){const e=this.editor,t=e.commands,i=t.get("indent"),n=t.get("outdent");i&&i.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),n&&n.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",(t,i)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(e,t){const i=e.model.document,n=e.editing.view,r=i.selection.getLastPosition(),o=r.nodeAfter;return!(t||!i.selection.isCollapsed||!r.isAtStart)&&(!!T_(o)&&(e.model.change(t=>{e.execute("enter");const n=i.selection.anchor.parent.previousSibling;t.rename(n,C_),t.setSelection(n,"in"),e.model.schema.removeDisallowedAttributes([n],t),t.remove(o)}),n.scrollToTheSelection(),!0))}(e,i.isSoft)||function(e,t){const i=e.model,n=i.document,r=e.editing.view,o=n.selection.getLastPosition(),s=o.nodeBefore;let a;if(t||!n.selection.isCollapsed||!o.isAtEnd||!s||!s.previousSibling)return!1;if(T_(s)&&T_(s.previousSibling))a=i.createRange(i.createPositionBefore(s.previousSibling),i.createPositionAfter(s));else if(E_(s)&&T_(s.previousSibling)&&T_(s.previousSibling.previousSibling))a=i.createRange(i.createPositionBefore(s.previousSibling.previousSibling),i.createPositionAfter(s));else{if(!(E_(s)&&T_(s.previousSibling)&&E_(s.previousSibling.previousSibling)&&s.previousSibling.previousSibling&&T_(s.previousSibling.previousSibling.previousSibling)))return!1;a=i.createRange(i.createPositionBefore(s.previousSibling.previousSibling.previousSibling),i.createPositionAfter(s))}return e.model.change(t=>{t.remove(a),e.execute("enter");const i=n.selection.anchor.parent;t.rename(i,C_),e.model.schema.removeDisallowedAttributes([i],t)}),r.scrollToTheSelection(),!0}(e,i.isSoft)||function(e){const t=e.model,i=t.document;let n;const r=b_(i.selection.getLastPosition(),t);r&&r.is("$text")&&(n=f_(r)),e.model.change(t=>{e.execute("shiftEnter"),n&&t.insertText(n,i.selection.anchor)})}(e),i.preventDefault(),t.stop())},{context:"pre"}),this._initAriaAnnouncements()}_initAriaAnnouncements(){const{model:e,ui:t,t:i}=this.editor,n=h_(this.editor);let r=null;e.document.selection.on("change:range",()=>{const o=e.document.selection.focus.parent;t&&r!==o&&o.is("element")&&(r&&r.is("element","codeBlock")&&t.ariaLiveAnnouncer.announce(v_(i,n,r,"leave")),o.is("element","codeBlock")&&t.ariaLiveAnnouncer.announce(v_(i,n,o,"enter")),r=o)})}}function E_(e){return e&&e.is("$text")&&!e.data.match(/\S/)}function T_(e){return e&&e.is("element","softBreak")}i.CodeBlockEditing=S_;class A_ extends ps{static get pluginName(){return"CodeBlockUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,i=e.ui.componentFactory,n=h_(e),r=this._getLanguageListItemDefinitions(n),o=e.commands.get("codeBlock");i.add("codeBlock",i=>{const n=ym(i,bm),s=n.buttonView,a=t("Insert code block");return s.set({label:a,tooltip:!0,icon:Yd.codeBlock,isToggleable:!0}),s.bind("isOn").to(o,"value",e=>!!e),s.on("execute",()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!0}),e.editing.view.focus()}),n.on("execute",t=>{e.execute("codeBlock",{language:t.source._codeBlockLanguage,forceValue:!0}),e.editing.view.focus()}),n.class="ck-code-block-dropdown",n.bind("isEnabled").to(o),xm(n,r,{role:"menu",ariaLabel:a}),n}),i.add("menuBar:codeBlock",i=>{const n=new wv(i);n.buttonView.set({role:"menuitem",label:t("Code block"),icon:Yd.codeBlock}),n.bind("isEnabled").to(o);const s=new _v(i);s.set({ariaLabel:t("Insert code block")});for(const t of r){const r=new Ig(i,n),a=new ep(i);a.bind(...Object.keys(t.model)).to(t.model),a.set({isToggleable:!0,role:"menuitemcheckbox"}),a.delegate("execute").to(n),a.on("execute",()=>{e.execute("codeBlock",{language:t.model._codeBlockLanguage,forceValue:o.value!=t.model._codeBlockLanguage}),e.editing.view.focus()}),r.children.add(a),s.items.add(r)}return n.panelView.children.add(s),n})}_getLanguageListItemDefinitions(e){const t=this.editor.commands.get("codeBlock"),i=new Go;for(const n of e){const e={type:"button",model:new ev({_codeBlockLanguage:n.language,label:n.label,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",t=>t===e.model._codeBlockLanguage),i.add(e)}return i}}i.CodeBlockUI=A_;i.CodeBlock=class extends ps{static get requires(){return[S_,A_]}static get pluginName(){return"CodeBlock"}static get isOfficialPlugin(){return!0}};class I_ extends ps{_uploadGateway;static get pluginName(){return"CloudServicesUploadAdapter"}static get isOfficialPlugin(){return!0}static get requires(){return["CloudServices",Xd]}init(){const e=this.editor,t=e.plugins.get("CloudServices"),i=t.token,n=t.uploadUrl;if(!i)return;const r=e.plugins.get("CloudServicesCore");this._uploadGateway=r.createUploadGateway(i,n),e.plugins.get(Xd).createUploadAdapter=e=>new M_(this._uploadGateway,e)}}i.CloudServicesUploadAdapter=I_;class M_{uploadGateway;loader;fileUploader;constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.loader.file.then(e=>(this.fileUploader=this.uploadGateway.upload(e),this.fileUploader.on("progress",(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()))}abort(){this.fileUploader.abort()}}i.EasyImage=class extends ps{static get pluginName(){return"EasyImage"}static get isOfficialPlugin(){return!0}static get requires(){return[I_,"ImageUpload"]}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||b("easy-image-image-feature-missing",e)}};class P_ extends Gg{view;constructor(e,t){super(e),this.view=t}
6get element(){return this.view.editable.element}init(){const e=this.editor,t=this.view,i=e.editing.view,n=t.editable,r=i.document.getRoot();n.name=r.rootName,t.render();const o=n.element;this.setEditableElement(n.name,o),n.bind("isFocused").to(this.focusTracker),i.attachDomRoot(o),this._initPlaceholder(),this._initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.config.get("placeholder");if(n){const e="string"==typeof n?n:n[i.rootName];e&&(i.placeholder=e)}Cs({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}class D_ extends Yg{editable;menuBarView;constructor(e,t,i,n){super(e),this.editable=new Kg(e,t,i,{label:n}),this.menuBarView=new Sv(e),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild(this.editable),this.registerChild(this.menuBarView)}}class O_ extends($d(Hd)){static get editorName(){return"BalloonEditor"}ui;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!L_(e)&&void 0!==t.initialData)throw new v("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return L_(e)?Zr(e):e}(e)),L_(e)&&(this.sourceElement=e,Gd(this,e));const i=this.config.get("plugins");i.push(pv),this.config.set("plugins",i),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const n=new D_(this.locale,this.editing.view,this.sourceElement,this.config.get("label"));this.ui=new P_(this,n),Wd(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&this.updateSourceElement(e)})}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(i=>{if(L_(e)&&"TEXTAREA"===e.tagName)throw new v("editor-wrong-element",null);const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init()).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function L_(e){return fr(e)}i.BalloonEditor=O_;class R_ extends Gg{view;_toolbarConfig;_elementReplacer;constructor(e,t){super(e),this.view=t,this._toolbarConfig=dm(e.config.get("toolbar")),this._elementReplacer=new Dr,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,n=t.editing.view,r=i.editable,o=n.document.getRoot();r.name=o.rootName,i.render();const s=r.element;this.setEditableElement(r.name,s),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this._initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",e=>{let{top:t}=e;return t||0}),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.sourceElement;let r;const o=e.config.get("placeholder");o&&(r="string"==typeof o?o:o[this.view.editable.name]),!r&&n&&"textarea"===n.tagName.toLowerCase()&&(r=n.getAttribute("placeholder")),r&&(i.placeholder=r),Cs({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:e}=this.view,t=this.editor.plugins.get("ContextualBalloon");t.on("getPositionOptions",t=>{const i=t.return;if(!i||!e.isSticky||!e.element)return;const n=new io(e.element).height,r="function"==typeof i.target?i.target():i.target,o="function"==typeof i.limiter?i.limiter():i.limiter;if(r&&o&&new io(r).height>=new io(o).height-n)return;const s={...i.viewportOffsetConfig},a=(s.top||0)+n;t.return={...i,viewportOffsetConfig:{...s,top:a}}},{priority:"low"});const i=()=>{t.visibleView&&t.updatePosition()};this.listenTo(e,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(e,t,i){const n=this.view.stickyPanel;if(n.isSticky){const e=new io(n.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(n,"change:isSticky",e),setTimeout(()=>{this.stopListening(n,"change:isSticky",e)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,t=this.editor.plugins.get("Dialog");t.on("show",()=>{const i=t.view;i.on("moveTo",(t,n)=>{if(!e.isSticky||i.wasMoved||i.isModal)return;const r=new io(e.contentPanelElement);n[1]<r.bottom+Xf.defaultOffset&&(n[1]=r.bottom+Xf.defaultOffset)},{priority:"high"})},{priority:"low"})}}class B_ extends Zg{stickyPanel;toolbar;editable;constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};
6super(e),this.stickyPanel=new sv(e),this.toolbar=new pm(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),i.useMenuBar&&(this.menuBarView=new Sv(e)),this.editable=new Kg(e,t,void 0,{label:i.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class N_ extends($d(Hd)){static get editorName(){return"ClassicEditor"}ui;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!j_(e)&&void 0!==t.initialData)throw new v("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return j_(e)?Zr(e):e}(e)),j_(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=this.config.get("menuBar"),r=new B_(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:n.isVisible,label:this.config.get("label")});this.ui=new R_(this,r),Wd(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(i=>{const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init(j_(e)?e:null)).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function j_(e){return fr(e)}i.ClassicEditor=N_;class F_ extends Gg{view;constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,i=e.editing.view,n=t.editable,r=i.document.getRoot();n.name=r.rootName,t.render();const o=n.element;this.setEditableElement(n.name,o),t.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(o),this._initPlaceholder(),this._initToolbar(),this._initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.config.get("placeholder");if(n){const e="string"==typeof n?n:n[i.rootName];e&&(i.placeholder=e)}Cs({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}class z_ extends Yg{toolbar;editable;menuBarView;constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(e),this.toolbar=new pm(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.menuBarView=new Sv(e),this.editable=new Kg(e,t,i.editableElement,{label:i.label}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.menuBarView,this.toolbar,this.editable])}}class V_ extends($d(Hd)){static get editorName(){return"DecoupledEditor"}ui;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!H_(e)&&void 0!==t.initialData)throw new v("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return H_(e)?Zr(e):e}(e)),H_(e)&&(this.sourceElement=e,Gd(this,e)),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new z_(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:i,label:this.config.get("label")});this.ui=new F_(this,n)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&this.updateSourceElement(e)})}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(i=>{if(H_(e)&&"TEXTAREA"===e.tagName)throw new v("editor-wrong-element",null);const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init()).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function H_(e){return fr(e)}i.DecoupledEditor=V_;class U_ extends Gg{view;_toolbarConfig;constructor(e,t){super(e),this.view=t,this._toolbarConfig=dm(e.config.get("toolbar"))}
6get element(){return this.view.editable.element}init(){const e=this.editor,t=this.view,i=e.editing.view,n=t.editable,r=i.document.getRoot();n.name=r.rootName,t.render();const o=n.element;this.setEditableElement(n.name,o),n.bind("isFocused").to(this.focusTracker),i.attachDomRoot(o),this._initPlaceholder(),this._initToolbar(),t.menuBarView&&this._initMenuBar(t.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view;this.editor.editing.view.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view,i=t.editable.element,n=t.toolbar;t.panel.bind("isVisible").to(this.focusTracker,"isFocused"),t.bind("viewportTopOffset").to(this,"viewportOffset",e=>{let{top:t}=e;return t||0}),t.listenTo(e.ui,"update",()=>{t.panel.isVisible&&t.panel.pin({target:i,positions:t.panelPositions})}),n.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(n)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.config.get("placeholder");if(n){const e="string"==typeof n?n:n[i.rootName];e&&(i.placeholder=e)}Cs({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}const W_=co("px");class $_ extends Yg{toolbar;panel;panelPositions;editable;_resizeObserver;constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(e),this.toolbar=new pm(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull,isFloating:!0}),n.useMenuBar&&(this.menuBarView=new Sv(e)),this.set("viewportTopOffset",0),this.panel=new om(e),this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new Kg(e,t,i,{label:n.label}),this._resizeObserver=null}render(){if(super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.menuBarView?this.panel.content.addMany([this.menuBarView,this.toolbar]):this.panel.content.add(this.toolbar),this.toolbar.options.shouldGroupWhenFull){const e=this.editable.element;this._resizeObserver=new ao(e,()=>{this.toolbar.maxWidth=W_(new io(e).width)})}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(e,t){let i;return i=e.top>t.height+this.viewportTopOffset?e.top-t.height:e.bottom>t.height+this.viewportTopOffset+50?this.viewportTopOffset:e.bottom,i}_getPanelPositions(){const e=[(e,t)=>({top:this._getPanelPositionTop(e,t),left:e.left,name:"toolbar_west",config:{withArrow:!1}}),(e,t)=>({top:this._getPanelPositionTop(e,t),left:e.left+e.width-t.width,name:"toolbar_east",config:{withArrow:!1}})];return"ltr"===this.locale.uiLanguageDirection?e:e.reverse()}}class G_ extends($d(Hd)){static get editorName(){return"InlineEditor"}ui;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!q_(e)&&void 0!==t.initialData)throw new v("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return q_(e)?Zr(e):e}(e)),this.model.document.createRoot(),q_(e)&&(this.sourceElement=e,Gd(this,e));const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=this.config.get("menuBar"),r=new $_(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:i,useMenuBar:n.isVisible,label:this.config.get("label")});this.ui=new U_(this,r),Wd(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&this.updateSourceElement(e)})}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(i=>{if(q_(e)&&"TEXTAREA"===e.tagName)throw new v("editor-wrong-element",null);const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init()).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function q_(e){return fr(e)}i.InlineEditor=G_;class Y_ extends Gg{view;_lastFocusedEditableElement;constructor(e,t){super(e),this.view=t,this._lastFocusedEditableElement=null}init(){this.view.render(),this.focusTracker.on("change:focusedElement",(e,t,i)=>{for(const e of Object.values(this.view.editables))i===e.element&&(this._lastFocusedEditableElement=e.element)}),this.focusTracker.on("change:isFocused",(e,t,i)=>{i||(this._lastFocusedEditableElement=null)});for(const e of Object.values(this.view.editables))this.addEditable(e);this._initToolbar(),this._initMenuBar(this.view.menuBarView),this.fire("ready")}addEditable(e,t){const i=e.element;this.editor.editing.view.attachDomRoot(i,e.name),this.setEditableElement(e.name,i),e.bind("isFocused").to(this.focusTracker,"isFocused",this.focusTracker,"focusedElement",(e,t)=>!!e&&(t===i||this._lastFocusedEditableElement===i)),this._initPlaceholder(e,t)}removeEditable(e){this.editor.editing.view.detachDomRoot(e.name),e.unbind("isFocused"),this.removeEditableElement(e.name)}
6destroy(){super.destroy();for(const e of Object.values(this.view.editables))this.removeEditable(e);this.view.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(e,t){if(!t){const i=this.editor.config.get("placeholder");i&&(t="string"==typeof i?i:i[e.name])}const i=this.editor.editing.view,n=i.document.getRoot(e.name);t&&(n.placeholder=t),Cs({view:i,element:n,isDirectHost:!1,keepOnFocus:!0})}}class Z_ extends Yg{toolbar;editables;editable;menuBarView;_editingView;constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(e),this._editingView=t,this.toolbar=new pm(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),this.menuBarView=new Sv(e),this.editables={};for(const e of i){const t=n.editableElements?n.editableElements[e]:void 0;let{label:i}=n;"object"==typeof i&&(i=i[e]),this.createEditable(e,t,i)}this.editable=Object.values(this.editables)[0],this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}createEditable(e,t,i){const n=new Kg(this.locale,this._editingView,t,{label:i});return this.editables[e]=n,n.name=e,this.isRendered&&this.registerChild(n),n}removeEditable(e){const t=this.editables[e];this.isRendered&&this.deregisterChild(t),delete this.editables[e],t.destroy()}render(){super.render(),this.registerChild(Object.values(this.editables)),this.registerChild(this.toolbar),this.registerChild(this.menuBarView)}}function X_(e){return fr(e)}i.MultiRootEditor=class extends Hd{static get editorName(){return"MultiRootEditor"}ui;sourceElements;_registeredRootsAttributesKeys=new Set;_readOnlyRootLocks=new Map;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Object.keys(e),n=0===i.length||"string"==typeof e[i[0]];if(n&&void 0!==t.initialData&&Object.keys(t.initialData).length>0)throw new v("editor-create-initial-data",null);if(super(t),this.sourceElements=n?{}:e,void 0===this.config.get("initialData")){const t={};for(const n of i)t[n]=X_(r=e[n])?Zr(r):r;this.config.set("initialData",t)}var r;if(!n)for(const t of i)Gd(this,e[t]);this.editing.view.document.roots.on("add",(e,t)=>{t.unbind("isReadOnly"),t.bind("isReadOnly").to(this.editing.view.document,"isReadOnly",e=>e||this._readOnlyRootLocks.has(t.rootName)),t.on("change:isReadOnly",(e,i,n)=>{const r=this.editing.view.createRangeIn(t);for(const e of r.getItems())e.is("editableElement")&&(e.unbind("isReadOnly"),e.isReadOnly=n)})});for(const e of i)this.model.document.createRoot("$root",e);if(this.config.get("lazyRoots"))for(const e of this.config.get("lazyRoots"))this.model.document.createRoot("$root",e)._isLoaded=!1;if(this.config.get("rootsAttributes")){const e=this.config.get("rootsAttributes");for(const[t,i]of Object.entries(e)){if(!this.model.document.getRoot(t))throw new v("multi-root-editor-root-attributes-no-root",null);for(const e of Object.keys(i))this.registerRootAttribute(e)}this.data.on("init",()=>{this.model.enqueueChange({isUndoable:!1},t=>{for(const[i,n]of Object.entries(e)){const e=this.model.document.getRoot(i);for(const[i,r]of Object.entries(n))null!==r&&t.setAttribute(i,r,e)}})})}const o={shouldToolbarGroupWhenFull:!this.config.get("toolbar.shouldNotGroupWhenFull"),editableElements:n?void 0:e,label:this.config.get("label")},s=new Z_(this.locale,this.editing.view,i,o);this.ui=new Y_(this,s),this.model.document.on("change:data",()=>{const e=this.model.document.differ.getChangedRoots();for(const t of e){const e=this.model.document.getRoot(t.name);"detached"==t.state&&this.fire("detachRoot",e)}for(const t of e){const e=this.model.document.getRoot(t.name);"attached"==t.state&&this.fire("addRoot",e)}}),this.listenTo(this.model,"canEditAt",(e,t)=>{let[i]=t;if(!i)return;let n=!1;for(const e of i.getRanges()){const t=e.root;if(this._readOnlyRootLocks.has(t.rootName)){n=!0;break}}n&&(e.return=!1,e.stop())},{priority:"high"}),this.decorate("loadRoot"),this.on("loadRoot",(e,t)=>{let[i]=t;const n=this.model.document.getRoot(i);if(!n)throw new v("multi-root-editor-load-root-no-root",this,{rootName:i});n._isLoaded&&(b("multi-root-editor-load-root-already-loaded"),e.stop())},{priority:"highest"})}destroy(){const e=this.config.get("updateSourceElementOnDestroy"),t={};for(const i of Object.keys(this.sourceElements))t[i]=e?this.getData({rootName:i}):"";return this.ui.destroy(),super.destroy().then(()=>{for(const e of Object.keys(this.sourceElements))lo(this.sourceElements[e],t[e])})}addRoot(e){let{data:t="",attributes:i={},elementName:n="$root",isUndoable:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=r=>{const o=r.addRoot(e,n);t&&r.insert(this.data.parse(t,o),o,0);for(const e of Object.keys(i))this.registerRootAttribute(e),r.setAttribute(e,i[e],o)};r?this.model.change(o):this.model.enqueueChange({isUndoable:!1},o)}detachRoot(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.model.change(t=>t.detachRoot(e)):this.model.enqueueChange({isUndoable:!1},t=>t.detachRoot(e))}createEditable(e,t,i){const n=this.ui.view.createEditable(e.rootName,void 0,i);return this.ui.addEditable(n,t),this.editing.view.forceRender(),n.element}detachEditable(e){const t=e.rootName,i=this.ui.view.editables[t];return this.ui.removeEditable(i),this.ui.view.removeEditable(t),i.element}loadRoot(e){let{data:t="",attributes:i={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.model.document.getRoot(e);this.model.enqueueChange({isUndoable:!1},e=>{t&&e.insert(this.data.parse(t,n),n,0);for(const t of Object.keys(i))this.registerRootAttribute(t),e.setAttribute(t,i[t],n);n._isLoaded=!0,this.model.document.differ._bufferRootLoad(n)})}getFullData(e){const t={};for(const i of this.model.document.getRootNames())t[i]=this.data.get({...e,rootName:i});return t}getRootsAttributes(){const e={};for(const t of this.model.document.getRootNames())e[t]=this.getRootAttributes(t);return e}getRootAttributes(e){const t={},i=this.model.document.getRoot(e);for(const e of this._registeredRootsAttributesKeys)t[e]=i.hasAttribute(e)?i.getAttribute(e):null;return t}registerRootAttribute(e){this._registeredRootsAttributesKeys.has(e)||(this._registeredRootsAttributesKeys.add(e),this.editing.model.schema.extend("$root",{allowAttributes:e}))}disableRoot(e,t){if("$graveyard"==e)throw new v("multi-root-editor-cannot-disable-graveyard-root",this);const i=this._readOnlyRootLocks.get(e);i?i.add(t):(this._readOnlyRootLocks.set(e,new Set([t])),this.editing.view.document.getRoot(e).isReadOnly=!0,Array.from(this.commands.commands()).forEac
6h(e=>e.affectsData&&e.refresh()))}enableRoot(e,t){const i=this._readOnlyRootLocks.get(e);i&&i.has(t)&&(1===i.size?(this._readOnlyRootLocks.delete(e),this.editing.view.document.getRoot(e).isReadOnly=this.isReadOnly,Array.from(this.commands.commands()).forEach(e=>e.affectsData&&e.refresh())):i.delete(t))}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(i=>{for(const t of Object.values(e))if(X_(t)&&"TEXTAREA"===t.tagName)throw new v("editor-wrong-element",null);const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init()).then(()=>(n._verifyRootsWithInitialData(),n.data.init(n.config.get("initialData")))).then(()=>n.fire("ready")).then(()=>n))})}_verifyRootsWithInitialData(){const e=this.config.get("initialData");for(const t of this.model.document.getRootNames())if(!(t in e))throw new v("multi-root-editor-root-initial-data-mismatch",null);for(const t of Object.keys(e)){const e=this.model.document.getRoot(t);if(!e||!e.isAttached())throw new v("multi-root-editor-root-initial-data-mismatch",null)}}};class K_ extends gs{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!J_(e.schema,i))do{if(i=i.parent,!i)return}while(!J_(e.schema,i));e.change(e=>{e.setSelection(i,"in")})}}function J_(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const Q_=Bo("Ctrl+A");class ek extends ps{static get pluginName(){return"SelectAllEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,i=e.editing.view.document;e.commands.add("selectAll",new K_(e)),this.listenTo(i,"keydown",(t,i)=>{Ro(i)===Q_&&(e.execute("selectAll"),i.preventDefault())}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}i.SelectAllEditing=ek;class tk extends ps{static get pluginName(){return"SelectAllUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:selectAll",()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("selectAll"),r=new e(t.locale),o=i.t;return r.set({label:o("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A"}),r.bind("isEnabled").to(n,"isEnabled"),this.listenTo(r,"execute",()=>{t.execute("selectAll"),t.editing.view.focus()}),r}}i.SelectAllUI=tk;class ik extends ps{static get requires(){return[ek,tk]}static get pluginName(){return"SelectAll"}static get isOfficialPlugin(){return!0}}i.SelectAll=ik;class nk extends gs{_stack=[];_createdBatches=new WeakSet;constructor(e){super(e),this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",(e,t)=>{t[1]={...t[1]};const i=t[1];i.batchType||(i.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(e,t)=>{t[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,i={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,i){const n=this.editor.model,r=n.document,o=[],s=e.map(e=>e.getTransformedByOperations(i)),a=s.flat();for(const e of s){const t=e.filter(e=>e.root!=r.graveyard).filter(e=>!ok(e,a));t.length&&(rk(t),o.push(t[0]))}o.length&&n.change(e=>{e.setSelection(o,{backward:t})})}_undo(e,t){const i=this.editor.model,n=i.document;this._createdBatches.add(t);const r=e.operations.slice().filter(e=>e.isDocumentOperation);r.reverse();for(const e of r){const r=e.baseVersion+1,o=Array.from(n.history.getOperations(r)),s=ku([e.getReversed()],o,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let r of s){const o=r.affectedSelectable;o&&!i.canEditAt(o)&&(r=new du(r.baseVersion)),t.addOperation(r),i.applyOperation(r),n.history.setOperationAsUndone(e,r)}}}}function rk(e){e.sort((e,t)=>
6e.start.isBefore(t.start)?-1:1);for(let t=1;t<e.length;t++){const i=e[t-1].getJoined(e[t],!0);i&&(t--,e.splice(t,2,i))}}function ok(e,t){return t.some(t=>t!==e&&t.containsRange(e,!0))}class sk extends nk{execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,i=this._stack.splice(t,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,()=>{this._undo(i.batch,n);const e=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,e)}),this.fire("revert",i.batch,n),this.refresh()}}class ak extends nk{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{const i=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)}),this.refresh()}}class lk extends ps{_undoCommand;_redoCommand;_batchRegistry=new WeakSet;static get pluginName(){return"UndoEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;this._undoCommand=new sk(e),this._redoCommand=new ak(e),e.commands.add("undo",this._und
6oCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const i=t[0];if(!i.isDocumentOperation)return;const n=i.batch,r=this._redoCommand.createdBatches.has(n),o=this._undoCommand.createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(r?this._undoCommand.addBatch(n):o||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,i)=>{this._redoCommand.addBatch(i)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Undo"),keystroke:"CTRL+Z"},{label:t("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}i.UndoEditing=lk;class ck extends ps{static get pluginName(){return"UndoUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?Yd.undo:Yd.redo,r="ltr"==t.uiLanguageDirection?Yd.redo:Yd.undo;this._addButtonsToFactory("undo",i("Undo"),"CTRL+Z",n),this._addButtonsToFactory("redo",i("Redo"),"CTRL+Y",r)}_addButtonsToFactory(e,t,i,n){const r=this.editor;r.ui.componentFactory.add(e,()=>{const r=this._createButton(Ff,e,t,i,n);return r.set({tooltip:!0}),r}),r.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(ep,e,t,i,n))}_createButton(e,t,i,n,r){const o=this.editor,s=o.locale,a=o.commands.get(t),l=new e(s);return l.set({label:i,icon:r,keystroke:n}),l.bind("isEnabled").to(a,"isEnabled"),this.listenTo(l,"execute",()=>{o.execute(t),o.editing.view.focus()}),l}}i.UndoUI=ck;class uk extends ps{static get requires(){return[lk,ck]}static get pluginName(){return"Undo"}static get isOfficialPlugin(){return!0}}i.Undo=uk;i.Essentials=class extends ps{static get requires(){return[op,n_,Xb,ik,ey,$v,uk]}static get pluginName(){return"Essentials"}static get isOfficialPlugin(){return!0}};class hk extends Df{children;_findInputView;_replaceInputView;_findButtonView;_findPrevButtonView;_findNextButtonView;_advancedOptionsCollapsibleView;_matchCaseSwitchView;_wholeWordsOnlySwitchView;_replaceButtonView;_replaceAllButtonView;_inputsDivView;_actionButtonsDivView;_focusTracker;_keystrokes;_focusables;focusCycler;constructor(e){super(e);const t=e.t;this.children=this.createCollection(),this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",(e,t)=>e>0&&!t),this._findInputView=this._createInputField(t("Find in textâ¦")),this._findPrevButtonView=this._createButton({label:t("Previous result"),class:"ck-button-prev",icon:Yd.previousArrow,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:t("Next result"),class:"ck-button-next",icon:Yd.previousArrow,keystroke:"F3",tooltip:!0}),this._replaceInputView=this._createInputField(t("Replace withâ¦"),"ck-labeled-field-replace"),this._inputsDivView=this._createInputsDiv(),this._matchCaseSwitchView=this._createMatchCaseSwitch(),this._wholeWordsOnlySwitchView=this._createWholeWordsOnlySwitch(),this._advancedOptionsCollapsibleView=this._createAdvancedOptionsCollapsible(),this._replaceAllButtonView=this._createButton({label:t("Replace all"),class:"ck-button-replaceall",withText:!0}),this._replaceButtonView=this._createButton({label:t("Replace"),class:"ck-button-replace",withText:!0}),this._findButtonView=this._createButton({label:t("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._actionButtonsDivView=this._createActionButtonsDiv(),this._focusTracker=new Yo,this._keystrokes=new Jo,this._focusables=new uf,this.focusCycler=new Hf({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.addMany([this._inputsDivView,this._advancedOptionsCollapsibleView,this._actionButtonsDivView]),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Rf({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}
6reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createInputsDiv(){const e=this.locale,t=e.t,i=new Df(e);return this._findInputView.fieldView.on("input",()=>{this.isDirty=!0}),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",e=>{let{findPrevious:t}=e;return t}),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",e=>{let{findNext:t}=e;return t}),this._injectFindResultsCounter(),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(e,t)=>{let{replace:i}=e;return i&&t}),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",(e,i)=>e||!i?"":t("Tip: Find some text first in order to replace it.")),i.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__inputs"]},children:[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView]}),i}_onFindButtonExecute(){if(this._textToFind)this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly});else{const e=this.t;this._findInputView.errorText=e("Text to find must not be empty.")}}_injectFindResultsCounter(){const e=this.locale,t=e.t,i=this.bindTemplate,n=new Df(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",(e,i)=>t("%0 of %1",[e,i])),n.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",i.if("isDirty","ck-hidden")]},children:[{text:i.to("_resultsCounterText")}]});const r=()=>{const t=this._findInputView.fieldView.element;if(!t||!mo(t))return;const i=new io(n.element).width,r="ltr"===e.uiLanguageDirection?"paddingRight":"paddingLeft";t.style[r]=i?`calc( 2 * var(--ck-spacing-standard) + ${i}px )`:""};this.on("change:_resultsCounterText",r,{priority:"low"}),this.on("change:isDirty",r,{priority:"low"}),this._findInputView.template.children[0].children.push(n)}_createAdvancedOptionsCollapsible(){const e=this.locale.t,t=new fp(this.locale,[this._matchCaseSwitchView,this._wholeWordsOnlySwitchView]);return t.set({label:e("Advanced options"),isCollapsed:!0}),t}_createActionButtonsDiv(){const e=new Df(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(e,t)=>{let{replace:i}=e;return i&&t}),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(e,t)=>{let{replaceAll:i}=e;return i&&t}),this._replaceButtonView.on("execute",()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})}),this._replaceAllButtonView.on("execute",()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()}),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),e.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__actions"]},children:[this._replaceAllButtonView,this._replaceButtonView,this._findButtonView]}),e}_createMatchCaseSwitch(){const e=this.locale.t,t=new ap(this.locale);return t.set({label:e("Match case"),withText:!0}),t.bind("isOn").to(this,"_matchCase"),t.on("execute",()=>{this._matchCase=!this._matchCase,this.isDirty=!0}),t}_createWholeWordsOnlySwitch(){const e=this.locale.t,t=new ap(this.locale);return t.set({label:e("Whole words only"),withText:!0}),t.bind("isOn").to(this,"_wholeWordsOnly"),t.on("execute",()=>{this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0}),t}_initFocusCycling(){[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._advancedOptionsCollapsibleView.buttonView,this._matchCaseSwitchView,this._wholeWordsOnlySwitchView,this._replaceAllButtonView,this._replaceButtonView,this._findButtonView].forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}_initKeystrokeHandling(){const e=e=>e.stopPropagation(),t=e=>{e.stopPropagation(),e.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",e=>{t(e),this._findNextButtonView.fire("execute")}),this._keystrokes.set("shift+f3",e=>{t(e),this._findPrevButtonView.fire("execute")}),this._keystrokes.set("enter",e=>{const i=e.target;
6i===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e)):i!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),t(e))}),this._keystrokes.set("shift+enter",e=>{e.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e))}),this._keystrokes.set("arrowright",e),this._keystrokes.set("arrowleft",e),this._keystrokes.set("arrowup",e),this._keystrokes.set("arrowdown",e)}_createButton(e){const t=new Ff(this.locale);return t.set(e),t}_createInputField(e,t){const i=new Bp(this.locale,Am);return i.label=e,i.class=t,i}}var dk='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286l-3.857-4.596z"/><path d="M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306zm-3.4-5.715c.562.305.742 1.106.354 1.494-.388.388-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.469 6.469 0 0 1 3.1.784z"/><path d="M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0zm11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0z"/></svg>';class fk extends ps{static get requires(){return[Kf]}static get pluginName(){return"FindAndReplaceUI"}static get isOfficialPlugin(){return!0}formView;constructor(e){super(e),e.config.define("findAndReplace.uiType","dialog"),this.formView=null}init(){const e=this.editor,t="dropdown"===e.config.get("findAndReplace.uiType"),i=e.commands.get("find"),n=this.editor.t;e.ui.componentFactory.add("findAndReplace",()=>{let n;return t?(n=this._createDropdown(),n.bind("isEnabled").to(i)):n=this._createDialogButtonForToolbar(),e.keystrokes.set("Ctrl+F",(t,r)=>{if(i.isEnabled){if(n instanceof Wp){const e=n.buttonView;e.isOn||e.fire("execute")}else n.isOn?e.plugins.get("Dialog").view.focus():n.fire("execute");r()}}),n}),t||e.ui.componentFactory.add("menuBar:findAndReplace",()=>this._createDialogButtonForMenuBar()),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Find in the document"),keystroke:"CTRL+F"}]})}_createDropdown(){const e=this.editor,t=e.locale.t,i=ym(e.locale);return i.once("change:isOpen",()=>{this.formView=this._createFormView(),this.formView.children.add(new Vf(e.locale,{label:t("Find and replace")}),0),i.panelView.children.add(this.formView)}),i.on("change:isOpen",(e,t,i)=>{i?this._setupFormView():this.fire("searchReseted")},{priority:"low"}),i.buttonView.set({icon:dk,label:t("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),i}_createDialogButtonForToolbar(){const e=this.editor,t=this._createButton(Ff),i=e.plugins.get("Dialog");return t.set({tooltip:!0}),t.bind("isOn").to(i,"id",e=>"findAndReplace"===e),t.on("execute",()=>{t.isOn?i.hide():this._showDialog()}),t}_createDialogButtonForMenuBar(){const e=this._createButton(ep),t=this.editor.plugins.get("Dialog"),i=this.editor.plugins.get("Dialog");return e.set({role:"menuitemcheckbox",isToggleable:!0}),e.bind("isOn").to(i,"id",e=>"findAndReplace"===e),e.on("execute",()=>{"findAndReplace"!==t.id?this._showDialog():t.hide()}),e}_createButton(e){const t=this.editor,i=t.commands.get("find"),n=new e(t.locale),r=t.locale.t;return n.bind("isEnabled").to(i),n.set({icon:dk,label:r("Find and replace"),keystroke:"CTRL+F"}),n}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),i=e.locale.t;this.formView||(this.formView=this._createFormView()),t.show({id:"findAndReplace",title:i("Find and replace"),content:this.formView,position:Yf.EDITOR_TOP_SIDE,onShow:()=>{this._setupFormView()},onHide:()=>{this.fire("searchReseted")}})}_createFormView(){const e=this.editor,t=new(Lf(hk))(e.locale),i=e.commands,n=this.editor.plugins.get("FindAndReplaceEditing").state;t.bind("highlightOffset").to(n,"highlightedOffset"),t.listenTo(n.results,"change",()=>{t.matchCount=n.results.length});const r=i.get("findNext"),o=i.get("findPrevious"),s=i.get("replace"),a=i.get("replaceAll");return t.bind("_areCommandsEnabled").to(r,"isEnabled",o,"isEnabled",s,"isEnabled",a,"isEnabled",(e,t,i,n)=>({findNext:e,findPrevious:t,replace:i,replaceAll:n})),t.delegate("findNext","findPrevious","replace","replaceAll").to(this),t.on("change:isDirty",(e,t,i)=>{i&&this.fire("searchReseted")}),t}_setupFormView(){this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputVie
6w.fieldView.select(),this.formView.enableCssTransitions()}}i.FindAndReplaceUI=fk;class pk extends gs{_state;constructor(e,t){super(e),this.isEnabled=!0,this.affectsData=!1,this._state=t}execute(e){let{matchCase:t,wholeWords:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{editor:n}=this,{model:r}=n,o=n.plugins.get("FindAndReplaceUtils");let s,a="";s="string"==typeof e?function(){return{results:o.findByTextCallback(e,{matchCase:t,wholeWords:i})(...arguments),searchText:e}}:e;const l=s;s=function(){const e=l(...arguments);return e&&"searchText"in e&&(a=e.searchText),e};const c=r.document.getRootNames().reduce((e,t)=>o.updateFindResultFromRange(r.createRangeIn(r.document.getRoot(t)),r,s,e),null);return this._state.clear(r),this._state.results.addMany(c),this._state.highlightedResult=c.get(0),this._state.searchText=a,s&&(this._state.lastSearchCallback=s),this._state.matchCase=!!t,this._state.matchWholeWords=!!i,{results:c,findCallback:s}}}i.FindCommand=pk;class mk extends(Er()){constructor(e){super(),this.set("results",new Go),this.set("highlightedResult",null),this.set("highlightedOffset",0),this.set("searchText",""),this.set("replaceText",""),this.set("lastSearchCallback",null),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",(t,i)=>{let{removed:n,index:r}=i;if(Array.from(n).length){let t=!1;if(e.change(i=>{for(const r of n)this.highlightedResult===r&&(t=!0),e.markers.has(r.marker.name)&&i.removeMarker(r.marker)}),t){const e=r>=this.results.length?0:r;this.highlightedResult=this.results.get(e)}}}),this.on("change:highlightedResult",()=>{this.refreshHighlightOffset(e)})}clear(e){this.searchText="",e.change(t=>{if(this.highlightedResult){const i=this.highlightedResult.marker.name.split(":")[1],n=e.markers.get(`findResultHighlighted:${i}`);n&&t.removeMarker(n)}[...this.results].forEach(e=>{let{marker:i}=e;t.removeMarker(i)})}),this.results.clear()}refreshHighlightOffset(e){const{highlightedResult:t,results:i}=this;this.highlightedOffset=t?gk(e,[...i]).indexOf(t)+1:0}}function gk(e,t){const i={before:-1,same:0,after:1,different:1};return e.document.getRootNames().flatMap(e=>t.filter(t=>t.marker.getStart().root.rootName===e).sort((e,t)=>i[e.marker.getStart().compareWith(t.marker.getStart())]))}class vk extends gs{_state;constructor(e,t){super(e),this.isEnabled=!0,this._state=t,this._isEnabledBasedOnSelection=!1}_replace(e,t){const{model:i}=this.editor,n=t.marker.getRange();i.canEditAt(n)&&i.change(r=>{if("$graveyard"===n.root.rootName)return void this._state.results.remove(t);let o={};for(const e of n.getItems())if(e.is("$text")||e.is("$textProxy")){o=e.getAttributes();break}i.insertContent(r.createText(e,o),n),this._state.results.has(t)&&this._state.results.remove(t)})}}class bk extends vk{execute(e,t){const i=Math.max(this._state.highlightedOffset-1,0);if(this._replace(e,t),this._state.results.length){const e=gk(this.editor.model,[...this._state.results]);this._state.highlightedResult=e[i%e.length]}}}i.ReplaceCommand=bk;class yk extends vk{execute(e,t){const{editor:i}=this,{model:n}=i,r=i.plugins.get("FindAndReplaceUtils"),o=t instanceof Go?t:n.document.getRootNames().reduce((e,i)=>r.updateFindResultFromRange(n.createRangeIn(n.document.getRoot(i)),n,r.findByTextCallback(t,this._state),e),null);o.length&&n.change(()=>{[...o].forEach(t=>{this._replace(e,t)})})}}i.ReplaceAllCommand=yk;class wk extends gs{_state;constructor(e,t){super(e),this.affectsData=!1,this._state=t,this.isEnabled=!1,this.listenTo(this._state.results,"change",()=>{this.isEnabled=this._state.results.length>1})}refresh(){this.isEnabled=this._state.results.length>1}execute(){const e=this._state.results,t=e.getIndex(this._state.highlightedResult),i=t+1>=e.length?0:t+1;this._state.highlightedResult=this._state.results.get(i)}}i.FindNextCommand=wk;class _k extends wk{execute(){const e=this._state.results.getIndex(this._state.highlightedResult),t=e-1<0?this._state.results.length-1:e-1;this._state.highlightedResult=this._state.results.get(t)}}i.FindPreviousCommand=_k;class kk extends ps{static get pluginName(){return"FindAndReplaceUtils"}static get isOfficialPlugin(){return!0}updateFindResultFromRange(e,t,i,n){const r=n||new Go;return t.change(n=>
6{[...e].forEach(e=>{let{type:o,item:s}=e;if("elementStart"===o&&t.schema.checkChild(s,"$text")){let e=i({item:s,text:this.rangeToText(t.createRangeIn(s))});if(!e)return;"results"in e&&(e=e.results),e.forEach(e=>{const t=`findResult:${p()}`,i=n.addMarker(t,{usingOperation:!1,affectsData:!1,range:n.createRange(n.createPositionAt(s,e.start),n.createPositionAt(s,e.end))}),o=function(e,t){const i=e.find(e=>{let{marker:i}=e;return t.getStart().isBefore(i.getStart())});return i?e.getIndex(i):e.length}(r,i);(e=>r.find(t=>{const{marker:i}=t,n=i.getRange(),r=e.getRange();return n.isEqual(r)}))(i)||r.add({id:t,label:e.label,marker:i},o)})}})}),r}rangeToText(e){return Array.from(e.getItems({shallow:!0})).reduce((e,t)=>t.is("$text")||t.is("$textProxy")?e+t.data:`${e}\n`,"")}findByTextCallback(e,t){let i="gu";t.matchCase||(i+="i");let n=`(${ur(e)})`;if(t.wholeWords){const t="[^a-zA-ZÃ-Éá¸-ỿ]";new RegExp("^"+t).test(e)||(n=`(^|${t}|_)${n}`),new RegExp(t+"$").test(e)||(n=`${n}(?=_|${t}|$)`)}const r=new RegExp(n,i);return function(e){let{text:t}=e;return[...t.matchAll(r)].map(xk)}}}function xk(e){const t=e.length-1;let i=e.index;return 3===e.length&&(i+=e[1].length),{label:e[t],start:i,end:i+e[t].length}}i.FindAndReplaceUtils=kk;class Ck extends ps{static get requires(){return[kk]}static get pluginName(){return"FindAndReplaceEditing"}static get isOfficialPlugin(){return!0}state;init(){this.state=new mk(this.editor.model),this.set("_isSearchActive",!1),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",(e,t,i,n)=>{const{model:r}=this.editor;r.change(e=>{if(n){const t=n.marker.name.split(":")[1],i=r.markers.get(`findResultHighlighted:${t}`);i&&e.removeMarker(i)}if(i){const t=i.marker.name.split(":")[1];e.addMarker(`findResultHighlighted:${t}`,{usingOperation:!1,affectsData:!1,range:i.marker.getRange()})}})});const e=Qn(((e,t,i)=>{if(i){const e=this.editor.editing.view.domConverter,t=this.editor.editing.mapper.toViewRange(i.marker.getRange());wo({target:e.viewRangeToDom(t),viewportOffset:40})}}).bind(this),32);this.listenTo(this.state,"change:highlightedResult",e,{priority:"low"}),this.listenTo(this.editor,"destroy",e.cancel),this.on("change:_isSearchActive",(e,t,i)=>{i?this.listenTo(this.editor.model.document,"change:data",this._onDocumentChange):this.stopListening(this.editor.model.document,"change:data",this._onDocumentChange)})}find(e,t){return this._isSearchActive=!0,this.editor.execute("find",e,t),this.state.results}stop(){this.state.clear(this.editor.model),this._isSearchActive=!1}_defineCommands(){this.editor.commands.add("find",new pk(this.editor,this.state)),this.editor.commands.add("findNext",new wk(this.editor,this.state)),this.editor.commands.add("findPrevious",new _k(this.editor,this.state)),this.editor.commands.add("replace",new bk(this.editor,this.state)),this.editor.commands.add("replaceAll",new yk(this.editor,this.state))}_defineConverters(){const{editor:e}=this;e.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:e=>{let{markerName:t}=e;const[,i]=t.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":i}}}}),e.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:e=>{let{markerName:t}=e;const[,i]=t.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":i}}}})}_onDocumentChange=()=>{const e=new Set,t=new Set,i=this.editor.model,{results:n}=this.state,r=i.document.differ.getChanges(),o=i.document.differ.getChangedMarkers();r.forEach(n=>{n.position&&("$text"===n.name||n.position.nodeAfter&&i.schema.isInline(n.position.nodeAfter)?(e.add(n.position.parent),[...i.markers.getMarkersAtPosition(n.position)].forEach(e=>{t.add(e.name)})):"insert"===n.type&&n.position.nodeAfter&&e.add(n.position.nodeAfter))}),o.forEach(e=>{let{name:i,data:{newRange:n}}=e;n&&"$graveyard"===n.start.root.rootName&&t.add(i)}),e.forEach(e=>{[...i.markers.getMarkersIntersectingRange(i.createRangeIn(e))].forEach(e=>t.add(e.name))}),t.forEach(e=>{n.has(e)&&(n.get(e)===this.state.highlightedResult&&(this.state.highlightedResult=null),n.remove(e))});const s=[],a=this.editor.plugins.get("FindAndReplaceUtils");
6e.forEach(e=>{const t=a.updateFindResultFromRange(i.createRangeOn(e),i,this.state.lastSearchCallback,n);s.push(...t)}),o.forEach(e=>{if(e.data.newRange){const t=a.updateFindResultFromRange(e.data.newRange,i,this.state.lastSearchCallback,n);s.push(...t)}}),!this.state.highlightedResult&&s.length?this.state.highlightedResult=s[0]:this.state.refreshHighlightOffset(i)}}i.FindAndReplaceEditing=Ck;i.FindAndReplace=class extends ps{static get requires(){return[Ck,fk]}static get pluginName(){return"FindAndReplace"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get("FindAndReplaceUI"),t=this.editor.plugins.get("FindAndReplaceEditing"),i=t.state;e.on("findNext",(e,n)=>{n?(i.searchText=n.searchText,t.find(n.searchText,n)):this.editor.execute("findNext")}),e.on("findPrevious",(e,n)=>{n&&i.searchText!==n.searchText?t.find(n.searchText):this.editor.execute("findPrevious")}),e.on("replace",(e,n)=>{i.searchText!==n.searchText&&t.find(n.searchText);const r=i.highlightedResult;r&&this.editor.execute("replace",n.replaceText,r)}),e.on("replaceAll",(e,n)=>{i.searchText!==n.searchText&&t.find(n.searchText),this.editor.execute("replaceAll",n.replaceText,i.results)}),e.on("searchReseted",()=>{i.clear(this.editor.model),t.stop()})}};class Sk extends gs{attributeKey;constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document.selection,n=e.value,r=e.batch,o=e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,n):e.removeSelectionAttribute(this.attributeKey);else{const r=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of r)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}};r?t.enqueueChange(r,e=>{o(e)}):t.change(e=>{o(e)})}}const Ek="fontSize",Tk="fontFamily",Ak="fontColor",Ik="fontBackgroun
6dColor";function Mk(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}function Pk(e){return t=>t.getStyle(e).replace(/\s/g,"")}function Dk(e){return(t,i)=>{let{writer:n}=i;return n.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}}class Ok extends Sk{constructor(e){super(e,Tk)}}function Lk(e){return e.map(Rk).filter(e=>void 0!==e)}function Rk(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),i=t[0],n=t.map(Bk).join(", ");return{title:i,model:n,view:{name:"span",styles:{"font-family":n},priority:7}}}(e):void 0}function Bk(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class Nk extends ps{static get pluginName(){return"FontFamilyEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Tk,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Tk}),e.model.schema.setAttributeProperties(Tk,{isFormatting:!0,copyOnEnter:!0});const t=Lk(e.config.get("fontFamily.options")).filter(e=>e.model),i=Mk(Tk,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(i),e.commands.add(Tk,new Ok(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:Tk,view:(e,t)=>{let{writer:i}=t;return i.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}}),e.conversion.for("upcast").elementToAttribute({model:{key:Tk,value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:Tk,value:e=>e.getAttribute("face")}})}}i.FontFamilyEditing=Nk;var jk='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>';class Fk extends ps{static get pluginName(){return"FontFamilyUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(Tk),r=t("Font Family"),o=function(e,t){const i=new Go;for(const n of e){const e={type:"button",model:new ev({commandName:Tk,commandParam:n.model,label:n.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",e=>e===n.model||!(!e||!n.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===n.model.toLowerCase()),n.view&&"string"!=typeof n.view&&n.view.styles&&e.model.set("labelStyle",`font-family: ${n.view.styles["font-family"]}`),i.add(e)}return i}(i,n);e.ui.componentFactory.add(Tk,t=>{const i=ym(t);return xm(i,o,{role:"menu",ariaLabel:r}),i.buttonView.set({label:r,icon:jk,tooltip:!0}),i.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),i.bind("isEnabled").to(n),this.listenTo(i,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),i}),e.ui.componentFactory.add(`menuBar:${Tk}`,t=>{const i=new wv(t);i.buttonView.set({label:r,icon:jk}),i.bind("isEnabled").to(n);const s=new _v(t);for(const n of o){const r=new Ig(t,i),o=new ep(t);o.set({role:"menuitemradio",isToggleable:!0}),o.bind(...Object.keys(n.model)).to(n.model),o.delegate("execute").to(i),o.on("execute",()=>{e.execute(n.model.commandName,{value:n.model.commandParam}),e.editing.view.focus()}),r.children.add(o),s.items.add(r)}return i.panelView.children.add(s),i})}_getLocalizedOptions(){const e=this.editor,t=e.t;return Lk(e.config.get(Tk).options).map(e=>("Default"===e.title&&(e.title=t("Default")),e))}}i.FontFamilyUI=Fk;class zk extends ps{static get requires(){return[Nk,Fk]}static get pluginName(){return"FontFamily"}static get isOfficialPlugin(){return!0}}i.FontFamily=zk;class Vk extends Sk{constructor(e){super(e,Ek)}}function Hk(e){return e.map(e=>function(e){if("number"==typeof e&&(e=String(e)),"object"==typeof e&&((t=e).title&&t.model&&t.view))return Wk(e);var t;const i=function(e){return"string"==typeof e?Uk[e]:Uk[e.model]}(e);return i?Wk(i):"default"===e?{model:void 0,title:"Default"}:function(e){let t;if("object"==typeof e){if(!e.model)throw new v("font-size-invalid-definition",null,e);t=parseFloat(e.model)}
6else t=parseFloat(e);return isNaN(t)}(e)?void 0:function(e){return"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`}),e.view={name:"span",styles:{"font-size":e.model}},Wk(e)}(e)}(e)).filter(e=>void 0!==e)}const Uk={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function Wk(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const $k=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class Gk extends ps{static get pluginName(){return"FontSizeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Ek,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Ek}),e.model.schema.setAttributeProperties(Ek,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=Hk(this.editor.config.get("fontSize.options")).filter(e=>e.model),n=Mk(Ek,i);t?(this._prepareAnyValueConverters(n),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add(Ek,new Vk(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter(e=>!Ah(String(e))&&!Mh(String(e)));if(i.length)throw new v("font-size-invalid-use-of-named-presets",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:Ek,view:(e,t)=>{let{writer:i}=t;if(e)return i.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:Ek,value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:Ek,value:e=>{const t=e.getAttribute("size"),i="-"===t[0]||"+"===t[0];let n=parseInt(t,10);i&&(n=3+n);const r=$k.length-1,o=Math.min(Math.max(n,0),r);return $k[o]}}})}}i.FontSizeEditing=Gk;var qk='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>';class Yk extends ps{static get pluginName(){return"FontSizeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(Ek),r=t("Font Size"),o=function(e,t){const i=new Go;for(const n of e){const e={type:"button",model:new ev({commandName:Ek,commandParam:n.model,label:n.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};n.view&&"string"!=typeof n.view&&(n.view.styles&&e.model.set("labelStyle",`font-size:${n.view.styles["font-size"]}`),n.view.classes&&e.model.set("class",`${e.model.class} ${n.view.classes}`)),e.model.bind("isOn").to(t,"value",e=>e===n.model),i.add(e)}return i}(i,n);e.ui.componentFactory.add(Ek,t=>{const i=ym(t);return xm(i,o,{role:"menu",ariaLabel:r}),i.buttonView.set({label:r,icon:qk,tooltip:!0}),i.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),i.bind("isEnabled").to(n),this.listenTo(i,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),i}),e.ui.componentFactory.add(`menuBar:${Ek}`,t=>{const i=new wv(t);i.buttonView.set({label:r,icon:qk}),i.bind("isEnabled").to(n);const s=new _v(t);for(const n of o){const r=new Ig(t,i),o=new ep(t);o.set({role:"menuitemradio",isToggleable:!0}),o.bind(...Object.keys(n.model)).to(n.model),o.delegate("execute").to(i),o.on("execute",()=>{e.execute(n.model.commandName,{value:n.model.commandParam}),e.editing.view.focus()}),r.children.add(o),s.items.add(r)}return i.panelView.children.add(s),i})}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t
6("Big"),Huge:t("Huge")};return Hk(e.config.get(Ek).options).map(e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e})}}i.FontSizeUI=Yk;class Zk extends ps{static get requires(){return[Gk,Yk]}static get pluginName(){return"FontSize"}static get isOfficialPlugin(){return!0}normalizeSizeOptions(e){return Hk(e)}}i.FontSize=Zk;class Xk extends Sk{constructor(e){super(e,Ak)}}class Kk extends ps{static get pluginName(){return"FontColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Ak,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Ak,value:Pk("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Ak,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:Ak,view:Dk("color")}),e.commands.add(Ak,new Xk(e)),e.model.schema.extend("$text",{allowAttributes:Ak}),e.model.schema.setAttributeProperties(Ak,{isFormatting:!0,copyOnEnter:!0})}}i.FontColorEditing=Kk;class Jk extends ps{commandName;componentName;icon;dropdownLabel;columns;constructor(e,t){let{commandName:i,componentName:n,icon:r,dropdownLabel:o}=t;super(e),this.commandName=i,this.componentName=n,this.icon=r,this.dropdownLabel=o,this.columns=e.config.get(`${this.componentName}.columns`)}init(){const e=this.editor,t=e.locale,i=t.t,n=e.commands.get(this.commandName),r=e.config.get(this.componentName),o=pp(t,mp(r.colors)),s=r.documentColors,a=!1!==r.colorPicker;e.ui.componentFactory.add(this.componentName,t=>{const l=ym(t);let c=!1;const u=function(e){let{dropdownView:t,colors:i,columns:n,removeButtonLabel:r,colorPickerLabel:o,documentColorsLabel:s,documentColorsCount:a,colorPickerViewConfig:l}=e;const c=t.locale,u=new hg(c,{colors:i,columns:n,removeButtonLabel:r,colorPickerLabel:o,documentColorsLabel:s,documentColorsCount:a,colorPickerViewConfig:l});return t.colorSelectorView=u,t.panelView.children.add(u),u}({dropdownView:l,colors:o.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:i("Remove color"),colorPickerLabel:i("Color picker"),documentColorsLabel:0!==s?i("Document colors"):"",documentColorsCount:void 0===s?this.columns:s,colorPickerViewConfig:!!a&&(r.colorPicker||{})});return u.bind("selectedColor").to(n,"value"),l.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),l.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),l.bind("isEnabled").to(n),u.on("execute",(t,i)=>{l.isOpen&&e.execute(this.commandName,{value:i.value,batch:this._undoStepBatch}),"colorPicker"!==i.source&&e.editing.view.focus(),"colorPickerSaveButton"===i.source&&(l.isOpen=!1)}),u.on("colorPicker:show",()=>{this._undoStepBatch=e.model.createBatch()}),u.on("colorPicker:cancel",()=>{this._undoStepBatch.operations.length&&(l.isOpen=!1,e.execute("undo",this._und
6oStepBatch)),e.editing.view.focus()}),l.on("change:isOpen",(t,i,n)=>{c||(c=!0,l.colorSelectorView.appendUI()),n&&(0!==s&&u.updateDocumentColors(e.model,this.componentName),u.updateSelectedColors(),u.showColorGridsFragment())}),Sm(l,()=>l.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find(e=>e.isOn)),l}),e.ui.componentFactory.add(`menuBar:${this.componentName}`,t=>{const r=new wv(t);r.buttonView.set({label:this.dropdownLabel,icon:this.icon}),r.bind("isEnabled").to(n);let a=!1;const l=new hg(t,{colors:o.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:i("Remove color"),colorPickerLabel:i("Color picker"),documentColorsLabel:0!==s?i("Document colors"):"",documentColorsCount:void 0===s?this.columns:s,colorPickerViewConfig:!1});return l.bind("selectedColor").to(n,"value"),l.delegate("execute").to(r),l.on("execute",(t,i)=>{e.execute(this.commandName,{value:i.value,batch:this._undoStepBatch}),e.editing.view.focus()}),r.on("change:isOpen",(t,i,n)=>{a||(a=!0,l.appendUI()),n&&(0!==s&&l.updateDocumentColors(e.model,this.componentName),l.updateSelectedColors(),l.showColorGridsFragment())}),r.panelView.children.add(l),r})}}class Qk extends Jk{constructor(e){const t=e.locale.t;super(e,{commandName:Ak,componentName:Ak,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}i.FontColorUI=Qk;class ex extends ps{static get requires(){return[Kk,Qk]}static get pluginName(){return"FontColor"}static get isOfficialPlugin(){return!0}}i.FontColor=ex;class tx extends Sk{constructor(e){super(e,Ik)}}class ix extends ps{static get pluginName(){return"FontBackgroundColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Ik,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(Wh),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:Ik,value:Pk("background-color")}}),e.conversion.for("downcast").attributeToElement({model:Ik,view:Dk("background-color")}),e.commands.add(Ik,new tx(e)),e.model.schema.extend("$text",{allowAttributes:Ik}),e.model.schema.setAttributeProperties(Ik,{isFormatting:!0,copyOnEnter:!0})}}i.FontBackgroundColorEditing=ix;class nx extends Jk{constructor(e){const t=e.locale.t;super(e,{commandName:Ik,componentName:Ik,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}i.FontBackgroundColorUI=nx;class rx extends ps{static get requires(){return[ix,nx]}static get pluginName(){return"FontBackgroundColor"}static get isOfficialPlugin(){return!0}}i.FontBackgroundColor=rx;i.Font=class extends ps{static get requires(){return[zk,Zk,ex,rx]}static get pluginName(){return"Font"}static get isOfficialPlugin(){return!0}};class ox extends gs{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=qo(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&sx(t,e.schema)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document,n=e.selection||i.selection;t.canEditAt(n)&&t.change(e=>{const i=n.getSelectedBlocks();for(const n of i)!n.is("element","paragraph")&&sx(n,t.schema)&&e.rename(n,"paragraph")})}}function sx(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class ax extends gs{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,i=e.attributes;let n=e.position;return t.canEditAt(n)?t.change(e=>{if(n=this._findPositionToInsertParagraph(n,e),!n)return null;const r=e.createElement("paragraph");return i&&t.schema.setAllowedAttributes(r,i,e),t.insertContent(r,
6n),e.setSelection(r,"in"),e.createPositionAt(r,0)}):null}_findPositionToInsertParagraph(e,t){const i=this.editor.model;if(i.schema.checkChild(e,"paragraph"))return e;const n=i.schema.findAllowedParent(e,"paragraph");if(!n)return null;const r=e.parent,o=i.schema.checkChild(r,"$text");return r.isEmpty||o&&e.isAtEnd?i.createPositionAfter(r):!r.isEmpty&&o&&e.isAtStart?i.createPositionBefore(r):t.split(e,n).position}}class lx extends ps{static get pluginName(){return"Paragraph"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new ox(e)),e.commands.add("insertParagraph",new ax(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,t)=>{let{writer:i}=t;return lx.paragraphLikeElements.has(e.name)?e.isEmpty?null:i.createElement("paragraph"):null},view:/.+/,converterPriority:"low"})}static paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])}i.Paragraph=lx;i.ParagraphButtonUI=class extends ps{static get requires(){return[lx]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",i=>{const n=new Ff(i),r=e.commands.get("paragraph");return n.label=t("Paragraph"),n.icon=Yd.paragraph,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(r),n.bind("isOn").to(r,"value"),n.on("execute",()=>{e.execute("paragraph")}),n})}};class cx extends gs{modelElements;constructor(e,t){super(e),this.modelElements=t}refresh(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>ux(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,i=t.document,n=e.value;t.change(e=>{const r=Array.from(i.selection.getSelectedBlocks()).filter(e=>ux(e,n,t.schema));for(const t of r)t.is("element",n)||e.rename(t,n)})}}function ux(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const hx="paragraph";class dx extends ps{static get pluginName(){return"HeadingEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[lx]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const n of t)"paragraph"!==n.model&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new cx(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,n)=>{const r=e.model.document.selection.getFirstPosition().parent;i.some(e=>r.is("element",e.model))&&!r.is("element",hx)&&0===r.childCount&&n.writer.rename(r,hx)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:m.low+1})}}function fx(e){const t=e.t,i={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=i[e.title];return t&&t!=e.title&&(e.title=t),e})}i.HeadingEditing=dx;class px extends ps{static get pluginName(){return"HeadingUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,i=fx(e),n=t("Choose heading"),r=t("Heading");e.ui.componentFactory.add("heading",t=>{const o={},s=new Go,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of i){const t={type:"button",model:new ev({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(a,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),o[e.model]=e.title}const u=ym(t);return xm(u,s,{ariaLabel:r,role:"menu"}),u.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),u.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),u.bind("isEnabled").toMany(c,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),u.buttonView.bind("label").to(a,"value",l,"value",(e,t)=>{const i=t?"paragraph":e;return"boolean"==typeof i?n:o[i]?o[i]:n}),u.buttonView.bind("ariaLabel").to(a,"value",l,"value",(e,t)=>{const i=t?"paragraph":e;return"boolean"==typeof i?r:o[i]?`${o[i]}, ${r}`:r}),this.listenTo(u,"execute",t=>{const{commandName:i,commandValue:n}=t.source;e.execute(i,n?{value:n}:void 0),e.editing.view.focus()}),u}),e.ui.componentFactory.add("menuBar:heading",n=>{const r=new wv(n),o=e.commands.get("heading"),s=e.commands.get("paragraph"),a=[o],l=new _v(n);r.set({class:"ck-heading-dropdown"}),l.set({ariaLabel:t("Heading"),role:"menu"}),r.buttonView.set({label:t("Heading")}),r.panelView.children.add(l);for(const t of i){const i=new Ig(n,r),c=new ep(n);i.children.add(c),l.items.add(i),c.set({isToggleable:!0,label:t.title,role:"menuitemradio",class:t.class}),c.delegate("execute").to(r),c.on("execute",()=>{const i="paragraph"===t.model?"paragraph":"heading";e.execute(i,{value:t.model}),e.editing.view.focus()}),"paragraph"===t.model?(c.bind("isOn").to(s,"value"),a.push(s)):c.bind("isOn").to(o,"value",e=>e===t.model)}return r.bind("isEnabled").toMany(a,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),r})}}i.HeadingUI=px;i.Heading=class extends ps{static get requires(){return[dx,px]}static get pluginName(){return"Heading"}static get isOfficialPlugin(){return!0}};const mx={heading1:Yd.heading1,heading2:Yd.heading2,heading3:Yd.heading3,heading4:Yd.heading4,heading5:Yd.heading5,heading6:Yd.heading6};i.HeadingButtonsUI=class extends ps{init(){fx(this.editor).filter(e=>"paragraph"!==e.model).map(e=>this._createButton(e))}_createButton(e){const t=this.editor;t.ui.componentFactory.add(e.model,i=>{const n=new Ff(i),r=t.commands.get("heading");return n.label=e.title,n.icon=e.icon||mx[e.model],n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(r),n.bind("isOn").to(r,"value",t=>t==e.model),n.on("execute",()=>{t.execute("heading",{value:e.model}),t.editing.view.focus()}),n})}};const gx=new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);function vx(e,t,i){const n=t.modelCursor,r=t.viewItem;if(!n.isAtStart||!n.parent.is("element","$root"))return;if(!i.consumable.consume(r,{name:!0}))return;const o=i.writer,s=o.createElement("title"),a=o.createElement("title-content");o.append(a,s),o.insert(s,n),i.convertChildren(r,a),i.updateConversionResult(s,t)}function bx(e){return(t,i)=>{const n=i.modelPosition.parent;if(!n.is("element","title"))return;const r=n.parent,o=i.mapper.toViewElement(r);i.viewPosition=e.createPositionAt(o,0),t.stop()}}function yx(e){return e.is("element","title")}function wx(e,t,i){const n=t.createElement("title");t.insert(n,e,"before"),t.insert(e,n,0),t.rename(e,"title-content"),i.schema.removeDisallowedAttributes([e],t)}function _x(e,t,i){let n=!1;for(const r of e)0!==r.index&&(kx(r,t,i),n=!0);return n}function kx(e,t,i){const n=e.getChild(0);n.isEmpty?t.remove(e):(t.move(t.createRangeOn(n),e,"before"),t.rename(n,"paragraph"),t.remove(e),i.schema.removeDisallowedAttributes([n],t))}function xx(e,t){return!(!e||!e.is("element","paragraph")||e.childCount||t.childCount<=2||t.getChild(t.childCount-1)!==e)}i.Title=class extends ps{_bodyPlaceholder=new Map;static get pluginName(){return"Title"}static get isOfficialPlugin(){return!0}static get requires(){return["Paragraph"]}init(){const e=this.editor,t=e.model;t.schema.register("title",{isBlock:!0,allowIn:"$root"}),t.schema.register("title-content",{isBlock:!0,allowIn:"title",allowAttributes:["alignment"]}),t.schema.extend("$text",{allowIn:"title-content"}),t.schema.addAttributeCheck(e=>{if(e.endsWith("title-content $text"))return!1}),e.editing.mapper.on("modelToViewPosition",bx(e.editing.view)),e.data.mapper.on("modelToViewPosition",bx(e.editing.view)),e.conversion.for("downcast").elementToElement({model:"title-content",view:"h1"}),e.conversion.for("downcast").add(e=>e.on("insert:title",(e,t,i)=>{i.consumable.consume(t.item,e.name)})),e.data.upcastDispatcher.on("element:h1",vx,{priority:"high"}),e.data.upcastDispatcher.on("element:h2",vx,{priority:"high"}),e.data.upcastDispatcher.on("element:h3",vx,{priority:"high"}),t.document.registerPostFixer(e=>this._fixTitleContent(e)),t.document.registerPostFixer(e=>this._fixTitleElement(e)),t.document.registerPostFixer(e=>this._fixBodyElement(e)),t.document.registerPostFixer(e=>this._fixExtraParagraph(e)),this._attachPlaceholders(),this._attachTabPressHandling()}getTitle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.rootName?e.rootName:void 0,i=this._getTitleElement(t).getChild(0);return this.editor.data.stringify(i,e)}getBody(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor,i=t.data,n=t.model,r=e.rootName?e.rootName:void 0,o=t.model.document.getRoot(r),s=t.editing.view,a=new ya(s.document),l=n.createRangeIn(o),c=a.createDocumentFragment(),u=n.createPositionAfter(o.getChild(0)),h=n.createRange(u,n.createPositionAt(o,"end")),d=new Map;for(const e of n.markers){const t=h.getIntersection(e.getRange());t&&d.set(e.name,t)}return i.mapper.clearBindings(),i.mapper.bindElements(o,c),i.downcastDispatcher.convert(l,d,a,e),a.remove(a.createRangeOn(c.getChild(0))),t.data.processor.toData(c)}_getTitleElement(e){const t=this.editor.model.document.getRoot(e);for(const e of t.getChildren())if(yx(e))return e}_fixTitleContent(e){let t=!1;for(const i of this.editor.model.document.getRootNames()){const n=this._getTitleElement(i);if(!n||1===n.maxOffset)continue;const r=Array.from(n.getChildren());r.shift();for(const t of r)e.move(e.createRangeOn(t),n,"after"),e.rename(t,"paragraph");t=!0}return t}_fixTitleElement(e){let t=!1;const i=this.editor.model;for(const n of this.editor.model.document.getRoots()){const r=Array.from(n.getChildren()).filter(yx),o=r[0],s=n.getChild(0);if(s.is("element","title"))r.length>1&&(_x(r,e,i),t=!0);else if(o||gx.has(s.name))gx.has(s.name)?wx(s,e,i):e.move(e.createRangeOn(o),n,0),_x(r,e,i),t=!0;else{const i=e.createElement("title");e.insert(i,n),e.insertElement("title-content",i),t=!0}}return t}_fixBodyElement(e){let t=!1;for(const i of this.editor.model.document.getRootNames()){const n=this.editor.model.document.getRoot(i);if(n.childCount<2){const r=e.createElement("paragraph");e.insert(r,n,1),this._bodyPlaceholder.set(i,r),t=!0}}return t}_fixExtraParagraph(e){let t=!1;for(const i of this.editor.model.document.getRootNames()){const n=this.editor.model.document.getRoot(i),r=this._bodyPlaceholder.get(i);xx(r,n)&&(this._bodyPlaceholder.delete(i),e.remove(r),t=!0)}return t}_attachPlaceholders(){const e=this.editor,t=e.t,i=e.editing.view,n=e.sourceElement,r=e.config.get("title.placeholder")||t("Type your title"),o=e.config.get("placeholder")||n&&"textarea"===n.tagName.toLowerCase()&&n.getAttribute("placeholder")||t("Type or paste your content here.");e.editing.downcastDispatcher.on("insert:title-content",(e,t,n)=>{const o=n.mapper.toViewElement(t.item);o.placeholder=r,Cs({view:i,element:o,keepOnFocus:!0})});const s=new Map;i.document.registerPostFixer(e=>{let t=!1;for(const n of i.document.roots){if(n.isEmpty)continue;const i=n.getChild(1),r=s.get(n.rootName);i!==r&&(r&&(Es(e,r),e.removeAttribute("data-placeholder",r)),e.setAttribute("data-placeholder",o,i),s.set(n.rootName,i),t=!0),t=Ts(i,
6!0)&&2===n.childCount&&"p"===i.name?!!Ss(e,i)||t:!!Es(e,i)||t}return t})}_attachTabPressHandling(){const e=this.editor,t=e.model;e.keystrokes.set("TAB",(e,i)=>{t.change(e=>{const n=t.document.selection,r=Array.from(n.getSelectedBlocks());if(1===r.length&&r[0].is("element","title-content")){const t=n.getFirstPosition().root.getChild(1);e.setSelection(t,0),i()}})}),e.keystrokes.set("SHIFT + TAB",(i,n)=>{t.change(i=>{const r=t.document.selection;if(!r.isCollapsed)return;const o=qo(r.getSelectedBlocks()),s=r.getFirstPosition(),a=e.model.document.getRoot(s.root.rootName),l=a.getChild(0);o===a.getChild(1)&&s.isAtStart&&(i.setSelection(l.getChild(0),0),n())})})}};class Cx extends gs{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("highlight"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"highlight")}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document.selection,n=e.value;t.change(e=>{if(i.isCollapsed){const t=i.getFirstPosition();if(i.hasAttribute("highlight")){const i=e=>e.item.hasAttribute("highlight")&&e.item.getAttribute("highlight")===this.value,r=t.getLastMatchingPosition(i,{direction:"backward"}),o=t.getLastMatchingPosition(i),s=e.createRange(r,o);n&&this.value!==n?(t.isEqual(o)||e.setAttribute("highlight",n,s),e.setSelectionAttribute("highlight",n)):(t.isEqual(o)||e.removeAttribute("highlight",s),e.removeSelectionAttribute("highlight"))}else n&&e.setSelectionAttribute("highlight",n)}else{const r=t.schema.getValidRanges(i.getRanges(),"highlight");for(const t of r)n?e.setAttribute("highlight",n,t):e.removeAttribute("highlight",t)}})}}class Sx extends ps{static get pluginName(){return"HighlightEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"highlight"});const t=e.config.get("highlight.options");e.conversion.attributeToElement(function(e){const t={model:{key:"highlight",values:[]},view:{}};for(const i of e)t.model.values.push(i.model),t.view[i.model]={name:"mark",classes:i.class};return t}(t)),e.commands.add("highlight",new Cx(e))}}i.HighlightEditing=Sx;class Ex extends ps{get localizedOptionTitles(){const e=this.editor.t;return{"Yellow marker":e("Yellow marker"),"Green marker":e("Green marker"),"Pink marker":e("Pink marker"),"Blue marker":e("Blue marker"),"Red pen":e("Red pen"),"Green pen":e("Green pen")}}static get pluginName(){return"HighlightUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.config.get("highlight.options");for(const t of e)this._addHighlighterButton(t);this._addRemoveHighlightButton(),this._addDropdown(e),this._addMenuBarButton(e)}_addRemoveHighlightButton(){const e=this.editor.t,t=this.editor.commands.get("highlight");this._addButton("removeHighlight",e("Remove highlight"),Yd.eraser,null,e=>{e.bind("isEnabled").to(t,"isEnabled")})}_addHighlighterButton(e){const t=this.editor.commands.get("highlight");this._addButton("highlight:"+e.model,e.title,Tx(e.type),e.model,function(i){i.bind("isEnabled").to(t,"isEnabled"),i.bind("isOn").to(t,"value",t=>t===e.model),i.iconView.fillColor=e.color,i.isToggleable=!0})}_addButton(e,t,i,n,r){const o=this.editor;o.ui.componentFactory.add(e,e=>{const s=new Ff(e),a=this.localizedOptionTitles[t]?this.localizedOptionTitles[t]:t;return s.set({label:a,icon:i,tooltip:!0}),s.on("execute",()=>{o.execute("highlight",{value:n}),o.editing.view.focus()}),r(s),s})}_addDropdown(e){const t=this.editor,i=t.t,n=t.ui.componentFactory,r=e[0],o=e.reduce((e,t)=>
6(e[t.model]=t,e),{});n.add("highlight",s=>{const a=t.commands.get("highlight"),l=ym(s,bm),c=l.buttonView;function u(e,t){const i=e&&e!==c.lastExecuted?e:c.lastExecuted;return o[i][t]}return c.set({label:i("Highlight"),tooltip:!0,lastExecuted:r.model,commandValue:r.model,isToggleable:!0}),c.bind("icon").to(a,"value",e=>Tx(u(e,"type"))),c.bind("color").to(a,"value",e=>u(e,"color")),c.bind("commandValue").to(a,"value",e=>u(e,"model")),c.bind("isOn").to(a,"value",e=>!!e),c.delegate("execute").to(l),l.bind("isEnabled").to(a,"isEnabled"),_m(l,()=>{const t=e.map(e=>{const t=n.create("highlight:"+e.model);return this.listenTo(t,"execute",()=>{l.buttonView.set({lastExecuted:e.model})}),t});return t.push(new um),t.push(n.create("removeHighlight")),t},{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:i("Text highlight toolbar")}),function(e){e.buttonView.actionView.iconView.bind("fillColor").to(e.buttonView,"color")}(l),c.on("execute",()=>{t.execute("highlight",{value:c.commandValue})}),this.listenTo(l,"execute",()=>{t.editing.view.focus()}),l})}_addMenuBarButton(e){const t=this.editor,i=t.t,n=t.commands.get("highlight");t.ui.componentFactory.add("menuBar:highlight",r=>{const o=new wv(r);o.buttonView.set({label:i("Highlight"),icon:Tx("marker")}),o.bind("isEnabled").to(n),o.buttonView.iconView.fillColor="transparent";const s=new _v(r);for(const i of e){const e=new Ig(r,o),a=new ep(r);a.set({label:i.title,icon:Tx(i.type),role:"menuitemradio",isToggleable:!0}),a.iconView.fillColor=i.color,a.delegate("execute").to(o),a.bind("isOn").to(n,"value",e=>e===i.model),a.on("execute",()=>{t.execute("highlight",{value:i.model}),t.editing.view.focus()}),e.children.add(a),s.items.add(e)}s.items.add(new Zp(r));const a=new Ig(r,o),l=new ep(r);return l.set({label:i("Remove highlight"),icon:Yd.eraser}),l.delegate("execute").to(o),l.on("execute",()=>{t.execute("highlight",{value:null}),t.editing.view.focus()}),a.children.add(l),s.items.add(a),o.panelView.children.add(s),o})}}function Tx(e){return"marker"===e?'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z"/><path d="m2.556 16.727.234-.348c-.297-.151-.462-.293-.498-.426-.036-.137.002-.416.115-.837.094-.25.15-.449.169-.595a4.495 4.495 0 0 0 0-.725c-.209-.621-.303-1.041-.284-1.26.02-.218.178-.506.475-.862l6.77-9.414c.539-.91 1.605-.85 3.199.18 1.594 1.032 2.188 1.928 1.784 2.686l-5.877 10.36c-.158.412-.333.673-.526.782-.193.108-.604.179-1.232.21-.362.131-.608.237-.738.318-.13.081-.305.238-.526.47-.293.265-.504.397-.632.397-.096 0-.27-.075-.524-.226l-.31.41-1.6-1.12zm-.279.415 1.575 1.103-.392.515H1.19l1.087-1.618zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574c.175-.25-.188-.647-1.092-1.192-.903-.546-1.412-.652-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5H8.245z"/></svg>':'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568-2.801-.645z"/><path d="m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97c.165-.233.356-.417.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005-3.055.797H4.5zm-.634.166-1.976.516-.026-1.918 2.002 1.402zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349zM8.245 18.5 9.59 17h9.406v1.5H8.245z"/></svg>'}i.HighlightUI=Ex;i.Highlight=class extends ps{static get requires(){return[Sx,Ex]}static get pluginName(){return"Highlight"}static get isOfficialPlugin(){return!0}};class Ax extends gs{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=function(e,t,i){const n=function(e,t){const i=ky(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(e,i);return t.checkChild(n,"horizontalLine")}(i,t,e)}execute(){const e=this.editor.model;e.change(t=>{const i=t.createElement("horizontalLine");e.insertObject(i,null,null,{setSelection:"after"})})}}class Ix extends ps{static get pluginName(){return"HorizontalLineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;
6t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),n.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,t)=>{let{writer:i}=t;return i.createEmptyElement("hr")}}),n.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,t)=>{let{writer:n}=t;const r=i("Horizontal line"),o=n.createContainerElement("div",null,n.createEmptyElement("hr"));return n.addClass("ck-horizontal-line",o),n.setCustomProperty("hr",!0,o),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),my(e,t,{label:i})}(o,n,r)}}),n.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new Ax(e))}}i.HorizontalLineEditing=Ix;class Mx extends ps{static get pluginName(){return"HorizontalLineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("horizontalLine",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:horizontalLine",()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("horizontalLine"),r=new e(t.locale),o=i.t;return r.set({label:o("Horizontal line"),icon:Yd.horizontalLine}),r.bind("isEnabled").to(n,"isEnabled"),this.listenTo(r,"execute",()=>{t.execute("horizontalLine"),t.editing.view.focus()}),r}}i.HorizontalLineUI=Mx;i.HorizontalLine=class extends ps{static get requires(){return[Ix,Mx,Ry]}static get pluginName(){return"HorizontalLine"}static get isOfficialPlugin(){return!0}};class Px extends gs{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection,n=Dx(i);this.isEnabled=function(e,t,i){const n=function(e,t){const i=ky(e,t).start.parent;return i.isEmpty&&!i.is("rootElement")?i.parent:i}(e,i);return t.checkChild(n,"rawHtml")}(i,t,e),this.value=n?n.getAttribute("value")||"":null}execute(e){const t=this.editor.model,i=t.document.selection;t.change(n=>{let r;null!==this.value?r=Dx(i):(r=n.createElement("rawHtml"),t.insertObject(r,null,null,{setSelection:"on"})),n.setAttribute("value",e,r)})}}function Dx(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}class Ox extends ps{_widgetButtonViewReferences=new Set;static get pluginName(){return"HtmlEmbedEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>(b("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})})}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new Px(e)),this._setupConversion()}_setupConversion(){const e=this.editor,t=e.t,i=e.editing.view,n=this._widgetButtonViewReferences,r=e.config.get("htmlEmbed");function o(e){let{editor:i,domElement:r,state:o,props:a}=e;r.textContent="";const l=r.ownerDocument;let c;if(o.isEditable){const e={isDisabled:!1,placeholder:a.textareaPlaceholder};c=s({domDocument:l,state:o,props:e}),r.append(c)}else if(o.showPreviews){const e={sanitizeHtml:a.sanitizeHtml};r.append(function(e){let{editor:i,domDocument:n,state:r,props:o}=e;const s=o.sanitizeHtml(r.getRawHtmlValue()),a=Nr(n,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},r.getRawHtmlValue().length>0?t("No preview available"):t("Empty snippet content")),l=Nr(n,"div",{class:"raw-html-embed__preview-content",dir:i.locale.contentLanguageDirection}),c=n.createRange().createContextualFragment(s.html);l.appendChild(c);return Nr(n,"div",{class:"raw-html-embed__preview"},[a,l])}({domDocument:l,state:o,props:e,editor:i}))}else{const e={isDisabled:!0,placeholder:a.textareaPlaceholder};r.append(s({domDocument:l,state:o,props:e}))}const u={onEditClick:a.onEditClick,onSaveClick:()=>{a.onSaveClick(c.value)},onCancelClick:a.onCancelClick};r.prepend(function(e){let{editor:t,domDocument:i,state:r,props:o}=e;const s=Nr(i,"div",{class:"raw-html-embed__buttons-wrapper"});if(r.isEditable){const e=Lx(t,"save",o.onSaveClick),i=Lx(t,"cancel",o.onCancelClick);s.append(e.element,i.element),n.add(e).add(i)}else{const e=Lx(t,"edit",o.onEditClick);s.append(e.element),n.add(e)}return s}({editor:i,domDocument:l,state:o,props:u}))}function s(e){let{domDocument:t,state:i,props:n}=e;const r=Nr(t,"textarea",{placeholder:n.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return r.disabled=n.isDisabled,r.value=i.getRawHtmlValue(),r}this.editor.editing.view.on("render",()=>{for(const e of n){if(e.element&&e.element.isConnected)return;e.destroy(),n.delete(e)}},{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,t)=>
6{let{writer:i}=t;return i.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,t)=>{let{writer:i}=t;return i.createRawElement("div",{class:"raw-html-embed"},function(t){t.innerHTML=e.getAttribute("value")||""})}}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(n,s)=>{let a,l,c,{writer:u}=s;const h=u.createRawElement("div",{class:"raw-html-embed__content-wrapper"},function(t){a=t,o({editor:e,domElement:t,state:l,props:c}),a.addEventListener("mousedown",()=>{if(l.isEditable){const t=e.model;t.document.selection.getSelectedElement()!==n&&t.change(e=>e.setSelection(n,"on"))}},!0)}),d={makeEditable(){l=Object.assign({},l,{isEditable:!0}),o({domElement:a,editor:e,state:l,props:c}),i.change(e=>{e.setAttribute("data-cke-ignore-events","true",h)}),a.querySelector("textarea").focus()},save(t){t!==l.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){l=Object.assign({},l,{isEditable:!1}),o({domElement:a,editor:e,state:l,props:c}),e.editing.view.focus(),i.change(e=>{e.removeAttribute("data-cke-ignore-events",h)})}};l={showPreviews:r.showPreviews,isEditable:!1,getRawHtmlValue:()=>n.getAttribute("value")||""},c={sanitizeHtml:r.sanitizeHtml,textareaPlaceholder:t("Paste raw HTML here..."),onEditClick(){d.makeEditable()},onSaveClick(e){d.save(e)},onCancelClick(){d.cancel()}};const f=u.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":t("HTML snippet"),dir:e.locale.uiLanguageDirection},h);return u.setCustomProperty("rawHtmlApi",d,f),u.setCustomProperty("rawHtml",!0,f),my(f,u,{label:t("HTML snippet"),hasSelectionHandle:!0})}})}}function Lx(e,t,i){const{t:n}=e.locale,r=new Ff(e.locale),o=e.commands.get("htmlEmbed");return r.set({class:`raw-html-embed__${t}-button`,icon:Yd.pencil,tooltip:!0,tooltipPosition:"rtl"===e.locale.uiLanguageDirection?"e":"w"}),r.render(),"edit"===t?(r.set({icon:Yd.pencil,label:n("Edit source")}),r.bind("isEnabled").to(o)):"save"===t?(r.set({icon:Yd.check,label:n("Save changes")}),r.bind("isEnabled").to(o)):r.set({icon:Yd.cancel,label:n("Cancel")}),r.on("execute",i),r}i.HtmlEmbedEditing=Ox;class Rx extends ps{static get pluginName(){return"HtmlEmbedUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("htmlEmbed",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0,label:t("Insert HTML")}),e}),e.ui.componentFactory.add("menuBar:htmlEmbed",()=>{const e=this._createButton(ep);return e.set({label:t("HTML snippet")}),e})}_createButton(e){const t=this.editor,i=t.commands.get("htmlEmbed"),n=new e(t.locale);return n.set({icon:Yd.html}),n.bind("isEnabled").to(i,"isEnabled"),this.listenTo(n,"execute",()=>{t.execute("htmlEmbed"),t.editing.view.focus(),t.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()}),n}}i.HtmlEmbedUI=Rx;function Bx(e,t,i,n){t&&function(e,t,i){if(t.attributes)for(const[n]of Object.entries(t.attributes))e.removeAttribute(n,i);if(t.styles)for(const n of Object.keys(t.styles))e.removeStyle(n,i);t.classes&&e.removeClass(t.classes,i)}(e,t,n),i&&Nx(e,i,n)}function Nx(e,t,i){if(t.attributes)for(const[n,r]of Object.entries(t.attributes))e.setAttribute(n,r,i);t.styles&&e.setStyle(t.styles,i),t.classes&&e.addClass(t.classes,i)}function jx(e,t,i,n,r){const o=t.getAttribute(i),s={};for(const e of["attributes","styles","classes"]){if(e!=n){o&&o[e]&&(s[e]=o[e]);continue}if("classes"==n){const t=new Set(o&&o.classes||[]);r(t),t.size&&(s[e]=Array.from(t));continue}const t=new Map(Object.entries(o&&o[e]||{}));r(t),t.size&&(s[e]=Object.fromEntries(t))}Object.keys(s).length?t.is("documentSelection")?e.setSelectionAttribute(i,s):e.setAttribute(i,s,t):o&&(t.is("documentSelection")?e.removeSelectionAttribute(i):e.removeAttribute(i,t))}function Fx(e){return`html${t=e,br(t).replace(/ /g,"")}Attributes`;var t}function zx(e){let{model:t}=e;return(e,i)=>i.writer.createElement(t,{htmlContent:e.getCustomProperty("$rawContent")})}function Vx(e,t){let{view:i,isInline:n}=t;const r=e.t;return(e,t)=>
6{let{writer:o}=t;const s=r("HTML object"),a=Hx(i,e,o),l=e.getAttribute(Fx(i));return o.addClass("html-object-embed__content",a),l&&Nx(o,l,a),my(o.createContainerElement(n?"span":"div",{class:"html-object-embed","data-html-object-embed-label":s},a),o,{label:s})}}function Hx(e,t,i){return i.createRawElement(e,null,(e,i)=>{i.setContentOf(e,t.getAttribute("htmlContent"))})}function Ux(e,t){let{model:i,view:n}=e;return(e,r)=>{let{writer:o,consumable:s}=r;if(!e.hasAttribute(i))return null;const a=o.createContainerElement(n),l=e.getAttribute(i);return s.consume(e,`attribute:${i}`),Nx(o,l,a),a.getFillerOffset=()=>null,t?my(a,o):a}}function Wx(e){let{priority:t,view:i}=e;return(e,n)=>{if(!e)return;const{writer:r}=n,o=r.createAttributeElement(i,null,{priority:t});return Nx(r,e,o),o}}function $x(e,t){let{view:i}=e;return e=>{e.on(`element:${i}`,(e,i,n)=>{if(!i.modelRange||i.modelRange.isCollapsed)return;const r=t.processViewAttributes(i.viewItem,n);r&&n.writer.setAttribute(Fx(i.viewItem.name),r,i.modelRange)},{priority:"low"})}}function Gx(e){let{view:t,model:i}=e;return e=>{e.on(`attribute:${Fx(t)}:${i}`,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:r}=t;Bx(i.writer,n,r,i.mapper.toViewElement(t.item))})}}i.HtmlEmbed=class extends ps{static get requires(){return[Ox,Rx,Ry]}static get pluginName(){return"HtmlEmbed"}static get isOfficialPlugin(){return!0}};var qx=[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"tableColumnGroup",view:"colgroup"},{model:"tableColumn",view:"col"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!1}},{model:"htmlColgroup",view:"colgroup",modelSchema:{allowIn:"htmlTable",allowChildren:"col",isBlock:!1}},{model:"htmlCol",view:"col",modelSchema:{allowIn:"htmlColgroup",isBlock:!1}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isLimit:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!1}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6","$text"],allowIn:"htmlDetails",isBlock:!1}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!1}}
6,{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowIn:["$root","$container"],allowChildren:["paragraph","htmlP","htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!1}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!1}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!1}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDivDl",view:"div",modelSchema:{allowChildren:["htmlDt","htmlDd"],allowIn:"htmlDl"}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDivDl"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}}],Yx=[{model:"htmlLiAttributes",view:"li",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlOlAttributes",view:"ol",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlUlAttributes",view:"ul",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"table"},{model:"htmlTheadAttributes",view:"thead",appliesToBlock:"table"},{model:"htmlTbodyAttributes",view:"tbody",appliesToBlock:"table"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"imageBlock"},{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref"},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom
6:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlCustomElement",view:"$customElement",modelSchema:{allowWhere:["$text","$block"],allowAttributesOf:"$inlineObject",isInline:!0}}];class Zx extends ps{_definitions=[];static get pluginName(){return"DataSchema"}static get isOfficialPlugin(){return!0}init(){for(const e of qx)this.registerBlockElement(e);for(const e of Yx)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=new Set;for(const n of this._getMatchingViewDefinitions(e)){if(t)for(const e of this._getReferences(n.model))i.add(e);i.add(n)}return i}getDefinitionsForModel(e){return this._definitions.filter(t=>t.model==e)}_getMatchingViewDefinitions(e){return this._definitions.filter(t=>t.view&&function(e,t){return"string"==typeof e?e===t:e instanceof RegExp&&e.test(t)}(e,t.view))}*_getReferences(e){const t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter(t=>t.model==e);for(const{modelSchema:n}of i)if(n)for(const i of t)for(const t of Uo(n[i]||[])){const i=this._definitions.filter(e=>e.model==t);for(const n of i)t!==e&&(yield*this._getReferences(n.model),yield n)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter(t=>{let[,i]=t;return i.model==e.model});if(0!=t.length)for(const[i,n]of t)this._definitions[i]=nr({},n,e,(e,t)=>Array.isArray(e)?e.concat(t):void 0);else this._definitions.push(e)}}i.DataSchema=Zx;class Xx extends ps{_dataSchema;_allowedAttributes;_disallowedAttributes;_allowedElements;_disallowedElements;_dataInitialized;_coupledAttributes;constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new Rs,this._disallowedAttributes=new Rs,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get isOfficialPlugin(){return!0}static get requires(){return[Zx,Ry]}loadAllowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,i=tC(t);this.allowElement(e),i.forEach(e=>this.allowAttributes(e))}}loadDisallowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,i=tC(t);0==i.length?this.disallowElement(e):i.forEach(e=>this.disallowAttributes(e))}}loadAllowedEmptyElementsConfig(e){for(const t of e)this.allowEmptyElement(t)}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){const{consumable:i}=t;return Kx(e,this._disallowedAttributes,i),function(e,t){let{attributes:i,classes:n,styles:r}=t;return i.length||n.length||r.length?{...i.length&&{attributes:Jx(e,i)},...r.length&&{styles:Qx(e,r)},...n.length&&{classes:n}}:null}(e,Kx(e,this._allowedAttributes,i))}
6_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&"string"==typeof e.appliesToBlock)for(const t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",()=>{this._fireRegisterEvent(e)},{priority:m.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:m.highest+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const i=this.editor.model.schema;if(t.isObject&&!i.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else{if(!t.isInline)throw new v("data-filter-invalid-definition",null,t);this._registerInlineElement(t)}e.stop()},{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer(t=>{const i=e.document.differ.getChanges();let n=!1;const r=this._getCoupledAttributesMap();for(const e of i){if("attribute"!=e.type||null!==e.attributeNewValue)continue;const i=r.get(e.attributeKey);if(i)for(const{item:r}of e.range.getWalker())for(const e of i)r.hasAttribute(e)&&(t.removeAttribute(e,r),n=!0)}return n}),this.listenTo(t,"change:attribute",(i,n)=>{let{attributeKeys:r}=n;const o=new Set,s=this._getCoupledAttributesMap();for(const e of r){if(t.hasAttribute(e))continue;const i=s.get(e);if(i)for(const e of i)t.hasAttribute(e)&&o.add(e)}0!=o.size&&e.change(e=>{for(const t of o)e.removeSelectionAttribute(t)})})}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer(t=>{const i=e.document.differ.getChanges();let n=!1;for(const r of i)if("insert"===r.type&&"$text"!==r.name)for(const i of r.attributes.keys())i.startsWith("html")&&i.endsWith("Attributes")&&(e.schema.checkAttribute(r.name,i)||(t.removeAttribute(i,r.position.nodeAfter),n=!0));return n})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,{view:r,model:o}=e;i.register(o,e.modelSchema),r&&(i.extend(e.model,{allowAttributes:[Fx(r),"htmlContent"]}),t.data.registerRawContentMatcher({name:r}),n.for("upcast").elementToElement({view:r,model:zx(e),converterPriority:m.low+2}),n.for("upcast").add($x(e,this)),n.for("editingDowncast").elementToStructure({model:{name:o,attributes:[Fx(r)]},view:Vx(t,e)}),n.for("dataDowncast").elementToElement({model:o,view:(e,t)=>{let{writer:i}=t;return Hx(r,e,i)}}),n.for("dataDowncast").add(Gx(e)))}_registerBlockElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,{view:r,model:o}=e;if(!i.isRegistered(e.model)){if(i.register(e.model,e.modelSchema),!r)return;n.for("upcast").elementToElement({model:o,view:r,converterPriority:m.low+2}),n.for("downcast").elementToElement({model:o,view:r})}r&&(i.extend(e.model,{allowAttributes:Fx(r)}),n.for("upcast").add($x(e,this)),n.for("downcast").add(Gx(e)))}_registerInlineElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,r=e.model;e.appliesToBlock||(i.extend("$text",{allowAttributes:r}),e.attributeProperties&&i.setAttributeProperties(r,e.attributeProperties),n.for("upcast").add(function(e,t){let{view:i,model:n,allowEmpty:r}=e;return e=>{e.on(`element:${i}`,(e,i,n)=>{let s=t.processViewAttributes(i.viewItem,n);if(s||n.consumable.test(i.viewItem,{name:!0})){if(s=s||{},n.consumable.consume(i.viewItem,{name:!0}),i.modelRange||(i=Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor))),r&&i.modelRange.isCollapsed&&Object.keys(s).length){const e=n.writer.createElement("htmlEmptyElement");
6if(!n.safeInsert(e,i.modelCursor))return;const t=n.getSplitParts(e);return i.modelRange=n.writer.createRange(i.modelRange.start,n.writer.createPositionAfter(t[t.length-1])),n.updateConversionResult(e,i),void o(e,s,n)}for(const e of i.modelRange.getItems())o(e,s,n)}},{priority:"low"})};function o(e,t,i){if(i.schema.checkAttribute(e,n)){const r=function(e,t){const i=En(e);let n="attributes";for(n in t)i[n]="classes"==n?Array.from(new Set([...e[n]||[],...t[n]])):{...e[n],...t[n]};return i}(t,e.getAttribute(n)||{});i.writer.setAttribute(n,r,e)}}}(e,this)),n.for("downcast").attributeToElement({model:r,view:Wx(e)}),e.allowEmpty&&(i.setAttributeProperties(r,{copyFromObject:!1}),i.isRegistered("htmlEmptyElement")||i.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"}),t.data.htmlProcessor.domConverter.registerInlineObjectMatcher(t=>t.name==e.view&&t.isEmpty&&Array.from(t.getAttributeKeys()).length?{name:!0}:null),n.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:Ux(e,!0)}),n.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:Ux(e)})))}}function Kx(e,t,i){const n=t.matchAll(e)||[],r=e.document.stylesProcessor;return n.reduce((t,n)=>{let{match:o}=n;for(const n of o.styles||[]){const o=r.getRelatedStyles(n).filter(e=>e.split("-").length>n.split("-").length).sort((e,t)=>t.split("-").length-e.split("-").length);for(const n of o)i.consume(e,{styles:[n]})&&t.styles.push(n);i.consume(e,{styles:[n]})&&t.styles.push(n)}for(const n of o.classes||[])i.consume(e,{classes:[n]})&&t.classes.push(n);for(const n of o.attributes||[])i.consume(e,{attributes:[n]})&&t.attributes.push(n);return t},{attributes:[],classes:[],styles:[]})}function Jx(e,t){const i={};for(const n of t){const t=e.getAttribute(n);void 0!==t&&po(n)&&(i[n]=t)}return i}function Qx(e,t){const i=new js(e.document.stylesProcessor);for(const n of t){const t=e.getStyle(n);void 0!==t&&i.set(n,t)}return Object.fromEntries(i.getStylesEntries())}function eC(e,t){const{name:i}=e,n=e[t];return Vt(n)?Object.entries(n).map(e=>{let[n,r]=e;return{name:i,[t]:{[n]:r}}}):Array.isArray(n)?n.map(e=>({name:i,[t]:[e]})):[e]}function tC(e){const{name:t,attributes:i,classes:n,styles:r}=e,o=[];return i&&o.push(...eC({name:t,attributes:i},"attributes")),n&&o.push(...eC({name:t,classes:n},"classes")),r&&o.push(...eC({name:t,styles:r},"styles")),o}i.DataFilter=Xx;class iC extends ps{static get requires(){return[Xx]}static get pluginName(){return"CodeBlockElementSupport"}static get isOfficialPlugin(){return!0}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(Xx);e.on("register:pre",(t,i)=>{if("codeBlock"!==i.model)return;const n=this.editor,r=n.model.schema,o=n.conversion;r.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),o.for("upcast").add(function(e){return t=>{t.on("element:code",(t,i,n)=>{const r=i.viewItem,o=r.parent;function s(t,r){const o=e.processViewAttributes(t,n);o&&n.writer.setAttribute(r,o,i.modelRange)}o&&o.is("element","pre")&&(s(o,"htmlPreAttributes"),s(r,"htmlContentAttributes"))},{priority:"low"})}}(e)),o.for("downcast").add(e=>{e.on("attribute:htmlPreAttributes:codeBlock",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item).parent;Bx(i.writer,n,r,o)}),e.on("attribute:htmlContentAttributes:codeBlock",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item);Bx(i.writer,n,r,o)})}),t.stop()})}}class nC extends ps{static get requires(){return[Xx]}static get pluginName(){return"DualContentModelElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(Xx).on("register",(e,t)=>{const i=t,n=this.editor,r=n.model.schema,o=n.conversion;if(!i.paragraphLikeModel)return;if(r.isRegistered(i.model)||r.isRegistered(i.paragraphLikeModel))return;const s={model:i.paragraphLikeModel,view:i.view};r.register(i.model,i.modelSchema),r.register(s.model,{inheritAllFrom:"$block"}),o.for("upcast").elementToElement({view:i.view,model:(e,t)=>
6{let{writer:n}=t;return this._hasBlockContent(e)?n.createElement(i.model):n.createElement(s.model)},converterPriority:m.low+.5}),o.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),o.for("downcast").elementToElement({view:s.view,model:s.model}),this._addAttributeConversion(s),e.stop()})}_hasBlockContent(e){const t=this.editor.editing.view,i=t.domConverter.blockElements;for(const n of t.createRangeIn(e).getItems())if(n.is("element")&&i.includes(n.name))return!0;return!1}_addAttributeConversion(e){const t=this.editor,i=t.conversion,n=t.plugins.get(Xx);t.model.schema.extend(e.model,{allowAttributes:Fx(e.view)}),i.for("upcast").add($x(e,n)),i.for("downcast").add(Gx(e))}}class rC extends ps{static get requires(){return[Zx,Xb]}static get pluginName(){return"HeadingElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("HeadingEditing"))return;const t=e.config.get("heading.options");this.registerHeadingElements(e,t)}registerHeadingElements(e,t){const i=e.plugins.get(Zx),n=[];for(const e of t)"model"in e&&"view"in e&&(i.registerBlockElement({view:e.view,model:e.model}),n.push(e.model));i.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:n}}),i.extendBlockElement({model:"htmlSummary",modelSchema:{allowChildren:n}})}}function oC(e,t,i){const n=e.createRangeOn(t);for(const{item:e}of n.getWalker())if(e.is("element",i))return e}class sC extends ps{static get requires(){return[Xx]}static get pluginName(){return"ImageElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("ImageInlineEditing")&&!e.plugins.has("ImageBlockEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(Xx);n.on("register:figure",()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",(t,i,n)=>{const r=i.viewItem;if(!i.modelRange||!r.hasClass("image"))return;const o=e.processViewAttributes(r,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)},{priority:"low"})}}(n))}),n.on("register:img",(r,o)=>{"imageBlock"!==o.model&&"imageInline"!==o.model||(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),i.for("upcast").add(function(e){return t=>{t.on("element:img",(t,i,n)=>{if(!i.modelRange)return;const r=i.viewItem,o=e.processViewAttributes(r,n);o&&n.writer.setAttribute("htmlImgAttributes",o,i.modelRange)},{priority:"low"})}}(n)),i.for("downcast").add(e=>{function t(t,i){e.on(`attribute:${i}:imageBlock`,(e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const{attributeOldValue:r,attributeNewValue:o}=i,s=n.mapper.toViewElement(i.item),a=oC(n.writer,s,t);a&&(Bx(n.writer,r,o,a),n.consumable.consume(i.item,e.name))},{priority:"low"}),"a"===t&&e.on("attribute:linkHref:imageBlock",(e,t,i)=>{if(!i.consumable.consume(t.item,"attribute:htmlLinkAttributes:imageBlock"))return;const n=i.mapper.toViewElement(t.item),r=oC(i.writer,n,"a");Nx(i.writer,t.item.getAttribute("htmlLinkAttributes"),r)},{priority:"low"})}(function(t){e.on(`attribute:${t}:imageInline`,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item);Bx(i.writer,n,r,o)},{priority:"low"})})("htmlImgAttributes"),t("img","htmlImgAttributes"),t("figure","htmlFigureAttributes"),t("a","htmlLinkAttributes")}),e.plugins.has("LinkImage")&&i.for("upcast").add(function(e,t){const i=t.plugins.get("ImageUtils");return t=>{t.on("element:a",(t,n,r)=>{const o=n.viewItem;if(!i.findViewImgElement(o))return;const s=n.modelCursor.parent;if(!s.is("element","imageBlock"))return;const a=e.processViewAttributes(o,r);a&&r.writer.setAttribute("htmlLinkAttributes",a,s)},{priority:"low"})}}(n,e)),r.stop())})}}class aC extends ps{static get requires(){return[Xx]}static get pluginName(){return"MediaEmbedElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;const t=e.model.schema,i=e.conversion,n=this.editor.plugins.get(Xx),r=this.editor.plugins.get(Zx),o=e.config.get("mediaEmbed.elementName");r.registerBlockElement({model:"media",view:o}),n.on("register:figure",()=>
6{i.for("upcast").add(function(e){return t=>{t.on("element:figure",(t,i,n)=>{const r=i.viewItem;if(!i.modelRange||!r.hasClass("media"))return;const o=e.processViewAttributes(r,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)},{priority:"low"})}}(n))}),n.on(`register:${o}`,(e,r)=>{"media"===r.model&&(t.extend("media",{allowAttributes:[Fx(o),"htmlFigureAttributes"]}),i.for("upcast").add(function(e,t){const i=(i,n,r)=>{!function(t,i){const o=e.processViewAttributes(t,r);o&&r.writer.setAttribute(i,o,n.modelRange)}(n.viewItem,Fx(t))};return e=>{e.on(`element:${t}`,i,{priority:"low"})}}(n,o)),i.for("dataDowncast").add(function(e){return t=>{function i(e,i){t.on(`attribute:${i}:media`,(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const{attributeOldValue:r,attributeNewValue:o}=i,s=n.mapper.toViewElement(i.item),a=oC(n.writer,s,e);Bx(n.writer,r,o,a)})}i(e,Fx(e)),i("figure","htmlFigureAttributes")}}(o)),e.stop())})}}class lC extends ps{static get requires(){return[Xx]}static get pluginName(){return"ScriptElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get(Xx);e.on("register:script",(t,i)=>{const n=this.editor,r=n.model.schema,o=n.conversion;r.register("htmlScript",i.modelSchema),r.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),n.data.registerRawContentMatcher({name:"script"}),o.for("upcast").elementToElement({view:"script",model:zx(i)}),o.for("upcast").add($x(i,e)),o.for("downcast").elementToElement({model:"htmlScript",view:(e,t)=>{let{writer:i}=t;return Hx("script",e,i)}}),o.for("downcast").add(Gx(i)),t.stop()})}}class cC extends ps{static get requires(){return[Xx]}static get pluginName(){return"TableElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(Xx),r=e.plugins.get("TableUtils");n.on("register:figure",()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",(t,i,n)=>{const r=i.viewItem;if(!i.modelRange||!r.hasClass("table"))return;const o=e.processViewAttributes(r,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)},{priority:"low"})}}(n))}),n.on("register:table",(o,s)=>{"table"===s.model&&(t.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),i.for("upcast").add(function(e){return t=>{t.on("element:table",(t,i,n)=>{if(!i.modelRange)return;const r=i.viewItem;o(r,"htmlTableAttributes");for(const e of r.getChildren())e.is("element","thead")&&o(e,"htmlTheadAttributes"),e.is("element","tbody")&&o(e,"htmlTbodyAttributes");function o(t,r){const o=e.processViewAttributes(t,n);o&&n.writer.setAttribute(r,o,i.modelRange)}},{priority:"low"})}}(n)),i.for("downcast").add(e=>{function t(t,i){e.on(`attribute:${i}:table`,(e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const r=n.mapper.toViewElement(i.item),o=oC(n.writer,r,t);o&&(n.consumable.consume(i.item,e.name),Bx(n.writer,i.attributeOldValue,i.attributeNewValue,o))})}t("table","htmlTableAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")}),e.model.document.registerPostFixer(function(e,t){return i=>{const n=e.document.differ.getChanges();let r=!1;for(const e of n){if("attribute"!=e.type||"headingRows"!=e.attributeKey)continue;const n=e.range.start.nodeAfter,o=n.getAttribute("htmlTheadAttributes"),s=n.getAttribute("htmlTbodyAttributes");o&&!e.attributeNewValue?(i.removeAttribute("htmlTheadAttributes",n),r=!0):s&&e.attributeNewValue==t.getRows(n)&&(i.removeAttribute("htmlTbodyAttributes",n),r=!0)}return r}}(e.model,r)),o.stop())})}}class uC extends ps{static get requires(){return[Xx]}static get pluginName(){return"StyleElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get(Xx);e.on("register:style",(t,i)=>{const n=this.editor,r=n.model.schema,o=n.conversion;r.register("htmlStyle",i.modelSchema),r.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),n.data.registerRawContentMatcher({name:"style"}),o.for("upcast").elementToElement({view:"style",model:zx(i)}),o.for("upcast").add($x(i,e)),o.for("downcast").elementToElement({model:"htmlStyle",view:(e,t)=>
6{let{writer:i}=t;return Hx("style",e,i)}}),o.for("downcast").add(Gx(i)),t.stop()})}}class hC extends ps{static get requires(){return[Xx]}static get pluginName(){return"ListElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("ListEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(Xx),r=e.plugins.get("ListEditing"),o=e.plugins.get("ListUtils"),s=["ul","ol","li"];r.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:Nx}),r.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:Nx}),r.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:Nx}),n.on("register",(e,r)=>{if(!s.includes(r.view))return;if(e.stop(),t.checkAttribute("$block","htmlLiAttributes"))return;const o=s.map(e=>Fx(e));t.extend("$listItem",{allowAttributes:o}),i.for("upcast").add(e=>{e.on("element:ul",dC("htmlUlAttributes",n),{priority:"low"}),e.on("element:ol",dC("htmlOlAttributes",n),{priority:"low"}),e.on("element:li",dC("htmlLiAttributes",n),{priority:"low"})})}),r.on("postFixer",(e,t)=>{let{listNodes:i,writer:n}=t;for(const{node:t,previousNodeInList:r}of i)if(r){if(r.getAttribute("listType")==t.getAttribute("listType")){const i=fC(r.getAttribute("listType")),o=r.getAttribute(i);!pr(t.getAttribute(i),o)&&n.model.schema.checkAttribute(t,i)&&(n.setAttribute(i,o,t),e.return=!0)}if(r.getAttribute("listItemId")==t.getAttribute("listItemId")){const i=r.getAttribute("htmlLiAttributes");!pr(t.getAttribute("htmlLiAttributes"),i)&&n.model.schema.checkAttribute(t,"htmlLiAttributes")&&(n.setAttribute("htmlLiAttributes",i,t),e.return=!0)}}}),r.on("postFixer",(e,t)=>{let{listNodes:i,writer:n}=t;for(const{node:t}of i){const i=t.getAttribute("listType");!o.isNumberedListType(i)&&t.getAttribute("htmlOlAttributes")&&(n.removeAttribute("htmlOlAttributes",t),e.return=!0),o.isNumberedListType(i)&&t.getAttribute("htmlUlAttributes")&&(n.removeAttribute("htmlUlAttributes",t),e.return=!0)}})}afterInit(){const e=this.editor;if(!e.commands.get("indentList"))return;const t=e.commands.get("indentList");this.listenTo(t,"afterExecute",(t,i)=>{e.model.change(t=>{for(const n of i){const i=fC(n.getAttribute("listType"));e.model.schema.checkAttribute(n,i)&&t.setAttribute(i,{},n)}})})}}function dC(e,t){return(i,n,r)=>{const o=n.viewItem;n.modelRange||Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor));const s=t.processViewAttributes(o,r);for(const t of n.modelRange.getItems({shallow:!0}))t.hasAttribute("listItemId")&&(t.hasAttribute("htmlUlAttributes")||t.hasAttribute("htmlOlAttributes")||r.writer.model.schema.checkAttribute(t,e)&&r.writer.setAttribute(e,s||{},t))}}function fC(e){return"numbered"===e||"customNumbered"==e?"htmlOlAttributes":"htmlUlAttributes"}class pC extends ps{static get requires(){return[Xx,Zx]}static get pluginName(){return"CustomElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get(Xx),t=this.editor.plugins.get(Zx);e.on("register:$customElement",(i,n)=>{i.stop();const r=this.editor,o=r.model.schema,s=r.conversion,a=r.editing.view.domConverter.unsafeElements,l=r.data.htmlProcessor.domConverter.preElements;o.register(n.model,n.modelSchema),o.extend(n.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),r.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),s.for("upcast").elementToElement({view:/.*/,model:(i,o)=>
6{if("$comment"==i.name)return null;if(!function(e){try{document.createElement(e)}catch(e){return!1}return!0}(i.name))return null;if(t.getDefinitionsForView(i.name).size)return null;a.includes(i.name)||a.push(i.name),l.includes(i.name)||l.push(i.name);const s=o.writer.createElement(n.model,{htmlElementName:i.name}),c=e.processViewAttributes(i,o);let u;if(c&&o.writer.setAttribute("htmlCustomElementAttributes",c,s),i.is("element","template")&&i.getCustomProperty("$rawContent"))u=i.getCustomProperty("$rawContent");else{const e=new gh(i.document).createDocumentFragment(i),t=r.data.htmlProcessor.domConverter.viewToDom(e),n=t.firstChild;for(;n.firstChild;)t.appendChild(n.firstChild);n.remove(),u=r.data.htmlProcessor.htmlWriter.getHtml(t)}o.writer.setAttribute("htmlContent",u,s);for(const{item:e}of r.editing.view.createRangeIn(i))o.consumable.consume(e,{name:!0});return s},converterPriority:"low"}),s.for("editingDowncast").elementToElement({model:{name:n.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,t)=>{let{writer:i}=t;const n=e.getAttribute("htmlElementName"),r=i.createRawElement(n);return e.hasAttribute("htmlCustomElementAttributes")&&Nx(i,e.getAttribute("htmlCustomElementAttributes"),r),r}}),s.for("dataDowncast").elementToElement({model:{name:n.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,t)=>{let{writer:i}=t;const n=e.getAttribute("htmlElementName"),r=e.getAttribute("htmlContent"),o=i.createRawElement(n,null,(e,t)=>{t.setContentOf(e,r)});return e.hasAttribute("htmlCustomElementAttributes")&&Nx(i,e.getAttribute("htmlCustomElementAttributes"),o),o}})})}}function*mC(e,t,i){if(t)if(!(Symbol.iterator in t)&&t.is("documentSelection")&&t.isCollapsed)e.schema.checkAttributeInSelection(t,i)&&(yield t);else for(const n of function(e,t,i){return!(Symbol.iterator in t)&&(t.is("node")||t.is("$text")||t.is("$textProxy"))?e.schema.checkAttribute(t,i)?[e.createRangeOn(t)]:[]:e.schema.getValidRanges(e.createSelection(t).getRanges(),i)}(e,t,i))yield*n.getItems({shallow:!0})}i.GeneralHtmlSupport=class extends ps{static get pluginName(){return"GeneralHtmlSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[Xx,iC,nC,rC,sC,aC,lC,cC,uC,hC,pC]}init(){const e=this.editor,t=e.plugins.get(Xx);t.loadAllowedEmptyElementsConfig(e.config.get("htmlSupport.allowEmpty")||[]),t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(e){const t=this.editor.plugins.get("DataSchema"),i=Array.from(t.getDefinitionsForView(e,!1)),n=i.find(e=>e.isInline&&!i[0].isObject);return n?n.model:Fx(e)}addModelHtmlClass(e,t,i){const n=this.editor.model,r=this.getGhsAttributeNameForElement(e);n.change(e=>{for(const o of mC(n,i,r))jx(e,o,r,"classes",e=>{for(const i of Uo(t))e.add(i)})})}removeModelHtmlClass(e,t,i){const n=this.editor.model,r=this.getGhsAttributeNameForElement(e);n.change(e=>{for(const o of mC(n,i,r))jx(e,o,r,"classes",e=>{for(const i of Uo(t))e.delete(i)})})}setModelHtmlAttributes(e,t,i){const n=this.editor.model,r=this.getGhsAttributeNameForElement(e);n.change(e=>{for(const o of mC(n,i,r))jx(e,o,r,"attributes",e=>{for(const[i,n]of Object.entries(t))e.set(i,n)})})}removeModelHtmlAttributes(e,t,i){const n=this.editor.model,r=this.getGhsAttributeNameForElement(e);n.change(e=>{for(const o of mC(n,i,r))jx(e,o,r,"attributes",e=>{for(const i of Uo(t))e.delete(i)})})}setModelHtmlStyles(e,t,i){const n=this.editor.model,r=this.getGhsAttributeNameForElement(e);n.change(e=>{for(const o of mC(n,i,r))jx(e,o,r,"styles",e=>{for(const[i,n]of Object.entries(t))e.set(i,n)})})}removeModelHtmlStyles(e,t,i){const n=this.editor.model,r=this.getGhsAttributeNameForElement(e);n.change(e=>{for(const o of mC(n,i,r))jx(e,o,r,"styles",e=>{for(const i of Uo(t))e.delete(i)})})}};i.HtmlComment=class extends ps{static get pluginName(){return"HtmlComment"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=new Map;e.data.processor.skipComments=!1,e.model.schema.addAttributeCheck((e,t)=>{if(e.endsWith("$root")&&t.startsWith("$comment"))return!0}),e.conversion.for("upcast").elementToMarker({view:"$comment",model:e=>{const i=`$comment:${p()}`,n=e.getCustomProperty("$rawContent");return t.set(i,n),i}}),e.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(e,t)=>{let i,{writer:n}=t;
6for(const t of this.editor.model.document.getRootNames())if(i=this.editor.model.document.getRoot(t),i.hasAttribute(e.markerName))break;const r=e.markerName,o=i.getAttribute(r),s=n.createUIElement("$comment");return n.setCustomProperty("$rawContent",o,s),s}}),e.model.document.registerPostFixer(i=>{let n=!1;const r=e.model.document.differ.getChangedMarkers().filter(e=>e.name.startsWith("$comment:"));for(const e of r){const{oldRange:r,newRange:o}=e.data;if(!r||!o||r.root!=o.root){if(r){const t=r.root;t.hasAttribute(e.name)&&(i.removeAttribute(e.name,t),n=!0)}if(o){const r=o.root;"$graveyard"==r.rootName?(i.removeMarker(e.name),n=!0):r.hasAttribute(e.name)||(i.setAttribute(e.name,t.get(e.name)||"",r),n=!0)}}}return n}),e.data.on("set",()=>{for(const t of e.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),e.model.on("deleteContent",(t,i)=>{let[n]=i;for(const t of n.getRanges()){const i=e.model.schema.getLimitElement(t),n=e.model.createPositionAt(i,0),r=e.model.createPositionAt(i,"end");let o;o=n.isTouching(t.start)&&r.isTouching(t.end)?this.getHtmlCommentsInRange(e.model.createRange(n,r)):this.getHtmlCommentsInRange(t,{skipBoundaries:!0});for(const e of o)this.removeHtmlComment(e)}},{priority:"high"})}createHtmlComment(e,t){const i=p(),n=this.editor.model,r=n.document.getRoot(e.root.rootName),o=`$comment:${i}`;return n.change(i=>{const n=i.createRange(e);return i.addMarker(o,{usingOperation:!0,affectsData:!0,range:n}),i.setAttribute(o,t,r),o})}removeHtmlComment(e){const t=this.editor,i=t.model.markers.get(e);return!!i&&(t.model.change(e=>{e.removeMarker(i)}),!0)}getHtmlCommentData(e){const t=this.editor.model.markers.get(e);if(!t)return null;let i="";for(const t of this.editor.model.document.getRoots())if(t.hasAttribute(e)){i=t.getAttribute(e);break}return{content:i,position:t.getStart()}}getHtmlCommentsInRange(e){let{skipBoundaries:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=!t;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(t=>function(e,t){const n=e.getRange().start;return(n.isAfter(t.start)||i&&n.isEqual(t.start))&&(n.isBefore(t.end)||i&&n.isEqual(t.end))}(t,e)).map(e=>e.name)}};class gC extends Gc{toView(e){if(!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(e.trim().slice(0,1e4)))return super.toView(e);let t="",i="";e=(e=e.trim().replace(/<\?xml\s[^?]*\?>/i,e=>(i=e,""))).trim().replace(/^<!DOCTYPE\s[^>]*?>/i,e=>(t=e,""));const n=this._toDom(e),r=this.domConverter.domToView(n,{skipComments:this.skipComments}),o=new gh(r.document);return o.setCustomProperty("$fullPageDocument",n.ownerDocument.documentElement.outerHTML,r),t&&o.setCustomProperty("$fullPageDocType",t,r),i&&o.setCustomProperty("$fullPageXmlDeclaration",i,r),r}toData(e){let t=super.toData(e);const i=e.getCustomProperty("$fullPageDocument"),n=e.getCustomProperty("$fullPageDocType"),r=e.getCustomProperty("$fullPageXmlDeclaration");return i&&(t=i.replace(/<\/body\s*>/,t+"$&"),n&&(t=n+"\n"+t),r&&(t=r+"\n"+t)),t}}i.HtmlPageDataProcessor=gC;function vC(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function bC(e,t){const i=e.plugins.get("ImageUtils"),n=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>i.isInlineImageView(e)?n&&("block"==e.getStyle("display")||e.findAncestor(i.isBlockImageView)?"imageBlock":"imageInline")!==t?null:r(e):null;function r(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function yC(e,t){const i=qo(t.getSelectedBlocks());return!i||e.isObject(i)||i.isEmpty&&"listItem"!=i.name?"imageBlock":"imageInline"}function wC(e){return e&&e.endsWith("px")?parseInt(e):null}function _C(e){const t=wC(e.getStyle("width")),i=wC(e.getStyle("height"));return!(!t||!i)}i.FullPage=class extends ps{static get pluginName(){return"FullPage"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=["$fullPageDocument","$fullPageDocType","$fullPageXmlDeclaration"];e.data.processor=new gC(e.data.viewDocument),e.model.schema.extend("$root",{allowAttributes:t}),e.data.on("toModel",(i,n)=>{let[r]=n;const o=e.model.document.getRoot();e.model.change(e=>{for(const i of t){const t=r.getCustomProperty(i);t&&e.setAttribute(i,t,o)}})},{priority:"low"}),e.data.on("toView",(e,i)=>{let[n]=i;if(!n.is("rootElement"))return;const r=n,o=e.return;if(!r.hasAttribute("$fullPageDocument"))return;const s=new gh(o.document);for(const e of t){const t=r.getAttribute(e);t&&s.setCustomProperty(e,t,o)}},{priority:"low"}),e.data.on("set",()=>{const i=e.model.document.getRoot();e.model.change(e=>{for(const n of t)i.hasAttribute(n)&&e.removeAttribute(n,i)})},{priority:"high"}),e.data.on("get",(e,t)=>{t[0]||(t[0]={}),t[0].trim=!1},{priority:"high"})}};const kC=/^(image|image-inline)$/;class xC extends ps{_domEmitter=new(Wr());static get pluginName(){return"ImageUtils"}static get isOfficialPlugin(){return!0}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=this.editor,o=r.model,s=o.document.selection,a=CC(r,t||s,i);e={...Object.fromEntries(s.getAttributes()),...e};for(const t in e)o.schema.checkAttribute(a,t)||delete e[t];return o.change(i=>{const{setImageSizes:r=!0}=n,s=i.createElement(a,e);return o.insertObject(s,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==a?void 0:"auto"}),s.parent?(r&&this.setImageNaturalSizeAttributes(s),s):null})}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change(i=>{const n=new r.window.Image;this._domEmitter.listenTo(n,"load",()=>{e.getAttribute("width")||e.getAttribute("height")||this.editor.model.enqueueChange(i.batch,t=>
6{t.setAttribute("width",n.naturalWidth,e),t.setAttribute("height",n.naturalHeight,e)}),this._domEmitter.stopListening(n,"load")}),n.src=t}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:kC})}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==CC(e,t,null)){const i=function(e,t){const i=ky(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(t,e.model);if(e.model.schema.checkChild(i,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}(e)}toImageWidget(e,t,i){return t.setCustomProperty("image",!0,e),my(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&py(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function CC(e,t,i){const n=e.model.schema,r=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?i||("inline"===r?"imageInline":"auto"!==r?"imageBlock":t.is("selection")?yC(n,t):n.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}i.ImageUtils=xC;const SC=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));i.AutoImage=class extends ps{static get requires(){return[n_,xC,uk,Wv]}static get pluginName(){return"AutoImage"}static get isOfficialPlugin(){return!0}_timeoutId;_positionToInsert;constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",()=>{const e=t.selection.getFirstRange(),i=Mu.fromPosition(e.start);i.stickiness="toPrevious";const n=Mu.fromPosition(e.end);n.stickiness="toNext",t.once("change:data",()=>{this._embedImageBetweenPositions(i,n),i.detach(),n.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(r.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,n=new Fl(e,t),r=n.getWalker({ignoreElementEnd:!0}),o=Object.fromEntries(i.model.document.selection.getAttributes()),s=this.editor.plugins.get("ImageUtils");let a="";for(const e of r)e.item.is("$textProxy")&&(a+=e.item.data);a=a.trim(),a.match(SC)?(this._positionToInsert=Mu.fromPosition(e),this._timeoutId=setTimeout(()=>{i.commands.get("insertImage").isEnabled?(i.model.change(e=>{let t;this._timeoutId=null,e.remove(n),n.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),s.insertImage({...o,src:a},t),this._positionToInsert.detach(),this._positionToInsert=null}),i.plugins.get("Delete").requestUndoOnBackspace()):n.detach()},100)):n.detach()}};class EC extends gs{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=t.model,r=i.getClosestSelectedImageElement(n.document.selection);n.change(t=>{t.setAttribute("alt",e.newValue,r)}
6)}}class TC extends ps{static get requires(){return[xC]}static get pluginName(){return"ImageTextAlternativeEditing"}static get isOfficialPlugin(){return!0}init(){this.editor.commands.add("imageTextAlternative",new EC(this.editor))}}i.ImageTextAlternativeEditing=TC;class AC extends Df{focusTracker;keystrokes;labeledInput;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Yo,this.keystrokes=new Jo,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),Yd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),Yd.cancel,"ck-button-cancel","cancel"),this._focusables=new uf,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Rf({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,i,n){const r=new Ff(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:i}}),n&&r.delegate("execute").to(this,n),r}_createLabeledInputView(){const e=this.locale.t,t=new Bp(this.locale,Am);return t.label=e("Text alternative"),t}}function IC(e){const t=e.editing.view,i=om.defaultPositions,n=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(t.document.selection)),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class MC extends ps{_balloon;_form;static get requires(){return[iv]}static get pluginName(){return"ImageTextAlternativeUI"}static get isOfficialPlugin(){return!0}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",i=>{const n=e.commands.get("imageTextAlternative"),r=new Ff(i);return r.set({label:t("Change image text alternative"),icon:Yd.textAlternative,tooltip:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",e=>!!e),this.listenTo(r,"execute",()=>{this._showForm()}),r})}_createForm(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Lf(AC))(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{i.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const i=IC(e);t.updatePosition(i)}}(e):this._hideForm(!0)}),Of({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:IC(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}
vendor: 4,135 bytes, line 6
6i.ImageTextAlternativeUI=MC;class PC extends ps{static get requires(){return[TC,MC]}static get pluginName(){return"ImageTextAlternative"}static get isOfficialPlugin(){return!0}}function DC(e,t){const i=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const r=n.writer,o=n.mapper.toViewElement(i.item),s=e.findViewImgElement(o);null===i.attributeNewValue?(r.removeAttribute("srcset",s),r.removeAttribute("sizes",s)):i.attributeNewValue&&(r.setAttribute("srcset",i.attributeNewValue,s),r.setAttribute("sizes","100vw",s))};return e=>{e.on(`attribute:srcset:${t}`,i)}}function OC(e,t,i){const n=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const r=n.writer,o=n.mapper.toViewElement(i.item),s=e.findViewImgElement(o);r.setAttribute(i.attributeKey,i.attributeNewValue||"",s)};return e=>{e.on(`attribute:${i}:${t}`,n)}}i.ImageTextAlternative=PC;class LC extends Ja{observe(e){this.listenTo(e,"load",(e,t)=>{const i=t.target;this.checkShouldIgnoreEventFromTarget(i)||"IMG"==i.tagName&&this._fireEvents(t)},{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class RC extends gs{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&b("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&b("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=Uo(e.source),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(i.getAttributes());t.forEach((t,o)=>{const s=i.getSelectedElement();if("string"==typeof t&&(t={src:t}),o&&s&&n.isImage(s)){const i=this.editor.model.createPositionAfter(s);n.insertImage({...t,...r},i,e.imageType)}else n.insertImage({...t,...r},null,e.imageType)})}}class BC extends gs{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),i=this.editor.plugins.get("ImageUtils");this.editor.model.change(n=>{n.setAttribute("src",e.source,t),this.cleanupImage(n,t),i.setImageNaturalSizeAttributes(t)})}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class NC extends ps{static get requires(){return[xC]}static get pluginName(){return"ImageEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(LC),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const i=new RC(e),n=new BC(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",i)}}i.ImageEditing=NC;class jC extends ps{static get requires(){return[xC]}static get pluginName(){return"ImageSizeAttributes"}static get isOfficialPlugin(){return!0}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n="imageBlock"===e?"figure":"img";function r(t,n,r,o){t.on(`attribute:${n}:${e}`,(t,n,s)=>{if(!s.consumable.consume(n.item,t.name))return;const a=s.writer,l=s.mapper.toViewElement(n.item),c=i.findViewImgElement(l);if(null!==n.attributeNewValue?a.setAttribute(r,n.attributeNewValue,c):a.removeAttribute(r,c),n.item.hasAttribute("sources"))return;const u=n.item.hasAttribute("resizedWidth");
6if("imageInline"===e&&!u&&!o)return;const h=n.item.getAttribute("width"),d=n.item.getAttribute("height");h&&d&&a.setStyle("aspect-ratio",`${h}/${d}`,c)})}t.conversion.for("upcast").attributeToAttribute({view:{name:n,styles:{width:/.+/}},model:{key:"width",value:e=>_C(e)?wC(e.getStyle("width")):null}}).attributeToAttribute({view:{name:n,key:"width"},model:"width"}).attributeToAttribute({view:{name:n,styles:{height:/.+/}},model:{key:"height",value:e=>_C(e)?wC(e.getStyle("height")):null}}).attributeToAttribute({view:{name:n,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add(e=>{r(e,"width","width",!0),r(e,"height","height",!0)}),t.conversion.for("dataDowncast").add(e=>{r(e,"width","width",!1),r(e,"height","height",!1)})}}i.ImageSizeAttributes=jC;class FC extends gs{_modelElementName;constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor,i=this.editor.model,n=t.plugins.get("ImageUtils"),r=n.getClosestSelectedImageElement(i.document.selection),o=Object.fromEntries(r.getAttributes());return o.src||o.uploadId?i.change(t=>{const{setImageSizes:s=!0}=e,a=Array.from(i.markers).filter(e=>e.getRange().containsItem(r)),l=n.insertImage(o,i.createSelection(r,"on"),this._modelElementName,{setImageSizes:s});if(!l)return null;const c=t.createRangeOn(l);for(const e of a){const i=e.getRange(),n="$graveyard"!=i.root.rootName?i.getJoined(c,!0):c;t.updateMarker(e,{range:n})}return{oldElement:r,newElement:l}}):null}}class zC extends ps{static get requires(){return[xC]}static get pluginName(){return"ImagePlaceholder"}static get isOfficialPlugin(){return!0}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("editingDowncast").add(e=>{e.on("attribute:placeholder",(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;if(!t.item.is("element","imageBlock")&&!t.item.is("element","imageInline"))return;n.consumable.consume(t.item,e.name);const r=n.writer,o=n.mapper.toViewElement(t.item),s=i.findViewImgElement(o);t.attributeNewValue?(r.addClass("image_placeholder",s),r.setStyle("background-image",`url(${t.attributeNewValue})`,s),r.setCustomProperty("editingPipeline:doNotReuseOnce",!0,s)):(r.removeClass("image_placeholder",s),r.removeStyle("background-image",s))})})}_setupLoadListener(){const e=this.editor,t=e.model,i=e.editing,n=i.view,r=e.plugins.get("ImageUtils");n.addObserver(LC),this.listenTo(n.document,"imageLoaded",(e,o)=>{const s=n.domConverter.mapDomToView(o.target);if(!s)return;const a=r.getImageWidgetFromImageView(s);if(!a)return;const l=i.mapper.toModelElement(a);l&&l.hasAttribute("placeholder")&&t.enqueueChange({isUndoable:!1},e=>{e.removeAttribute("placeholder",l)})})}}class VC extends ps{static get requires(){return[NC,jC,xC,zC,Hw]}static get pluginName(){return"ImageBlockEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new FC(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,t)=>{let{writer:i}=t;return vC(i)}}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,i)=>{let{writer:r}=i;return n.toImageWidget(vC(r),r,t("image widget"))}}),i.for("downcast").add(OC(n,"imageBlock","src")).add(OC(n,"imageBlock","alt")).add(DC(n,"imageBlock")),i.for("upcast").elementToElement({view:bC(e,"imageBlock"),model:(e,t)=>
6{let{writer:i}=t;return i.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}}).add(function(e){const t=(t,i,n)=>{if(!n.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const r=e.findViewImgElement(i.viewItem);if(!r||!n.consumable.test(r,{name:!0}))return;n.consumable.consume(i.viewItem,{name:!0,classes:"image"});const o=qo(n.convertItem(r,i.modelCursor).modelRange.getItems());o?(n.convertChildren(i.viewItem,o),n.updateConversionResult(o,i)):n.consumable.revert(i.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",(r,o)=>{const s=Array.from(o.content.getChildren());let a;if(!s.every(n.isInlineImageView))return;a=o.targetRanges?e.editing.mapper.toModelRange(o.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageBlock"===yC(t.schema,l)){const e=new gh(i.document),t=s.map(t=>e.createElement("figure",{class:"image"},t));o.content=e.createDocumentFragment(t)}}),this.listenTo(r,"contentInsertion",(e,i)=>{"paste"===i.method&&t.change(e=>{const t=e.createRangeIn(i.content);for(const e of t.getItems())e.is("element","imageBlock")&&n.setImageNaturalSizeAttributes(e)})})}}i.ImageBlockEditing=VC;class HC extends Df{focusTracker;keystrokes;_focusables;_focusCycler;children;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];super(e),this.focusTracker=new Yo,this.keystrokes=new Jo,this._focusables=new uf,this.children=this.createCollection(),this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const e of t)this.children.add(e),this._focusables.add(e),e instanceof fp&&this._focusables.addMany(e.children);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),Rf({view:this});for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class UC extends ps{static get pluginName(){return"ImageInsertUI"}static get isOfficialPlugin(){return!0}static get requires(){return[xC]}dropdownView;_integrations=new Map;constructor(e){super(e),e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",()=>{this.isImageSelected=i.isImage(t.getSelectedElement())});const n=e=>this._createToolbarComponent(e);e.ui.componentFactory.add("insertImage",n),e.ui.componentFactory.add("imageInsert",n),e.ui.componentFactory.add("menuBar:insertImage",e=>this._createMenuBarComponent(e))}registerIntegration(e){let{name:t,observable:i,buttonViewCreator:n,formViewCreator:r,menuBarButtonViewCreator:o,requiresForm:s=!1}=e;this._integrations.has(t)&&b("image-insert-integration-exists",{name:t}),this._integrations.set(t,{observable:i,buttonViewCreator:n,menuBarButtonViewCreator:o,formViewCreator:r,requiresForm:s})}_createToolbarComponent(e){const t=this.editor,i=e.t,n=this._prepareIntegrations();if(!n.length)return null;let r;const o=n[0];if(1==n.length){if(!o.requiresForm)return o.buttonViewCreator(!0);r=o.buttonViewCreator(!0)}else{const t=o.buttonViewCreator(!1);r=new bm(e,t),r.tooltip=!0,r.bind("label").to(this,"isImageSelected",e=>i(e?"Replace image":"Insert image"))}const s=this.dropdownView=ym(e,r),a=n.map(e=>{let{observable:t}=e;return"function"==typeof t?t():t});return s.bind("isEnabled").toMany(a,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),s.once("change:isOpen",()=>{const e=n.map(e=>{let{formViewCreator:t}=e;return t(1==n.length)}),i=new HC(t.locale,e);s.panelView.children.add(i)}),s}_createMenuBarComponent(e){const t=e.t,i=this._prepareIntegrations();if(!i.length)return null;let n;const r=i[0];if(1==i.length)n=r.menuBarButtonViewCreator(!0);else{n=new wv(e);const r=new _v(e);n.panelView.children.add(r),n.buttonView.set({icon:Yd.image,label:t("Image")});for(const t of i){const i=new Ig(e,n),o=t.menuBarButtonViewCreator(!1);i.children.add(o),r.items.add(i)}}return n}_prepareIntegrations(){const e=this.editor.config.get("image.insert.integrations"),t=[];if(!e.length)return b("image-insert-integrations-not-specified"),t;for(const i of e)this._integrations.has(i)?t.push(this._integrations.get(i)):["upload","assetManager","url"].includes(i)||b("image-insert-unknown-integration",{item:i});return t.length||b("image-insert-integrations-not-registered"),t}}i.ImageInsertUI=UC;class WC extends ps{static get requires(){return[VC,Ry,PC,UC]}static get pluginName(){return"ImageBlock"}static get isOfficialPlugin(){return!0}}i.ImageBlock=WC;class $C extends ps{static get requires(){return[NC,jC,xC,zC,Hw]}static get pluginName(){return"ImageInlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;
6e.model.schema.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"],disallowIn:["caption"]}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new FC(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(e,t)=>{let{writer:i}=t;return i.createEmptyElement("img")}}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,i)=>{let{writer:r}=i;return n.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(r),r,t("image widget"))}}),i.for("downcast").add(OC(n,"imageInline","src")).add(OC(n,"imageInline","alt")).add(DC(n,"imageInline")),i.for("upcast").elementToElement({view:bC(e,"imageInline"),model:(e,t)=>{let{writer:i}=t;return i.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",(r,o)=>{const s=Array.from(o.content.getChildren());let a;if(!s.every(n.isBlockImageView))return;a=o.targetRanges?e.editing.mapper.toModelRange(o.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===yC(t.schema,l)){const e=new gh(i.document),t=s.map(t=>1===t.childCount?(Array.from(t.getAttributes()).forEach(i=>e.setAttribute(...i,n.findViewImgElement(t))),t.getChild(0)):t);o.content=e.createDocumentFragment(t)}}),this.listenTo(r,"contentInsertion",(e,i)=>{"paste"===i.method&&t.change(e=>{const t=e.createRangeIn(i.content);for(const e of t.getItems())e.is("element","imageInline")&&n.setImageNaturalSizeAttributes(e)})})}}class GC extends ps{static get requires(){return[$C,Ry,PC,UC]}static get pluginName(){return"ImageInline"}static get isOfficialPlugin(){return!0}}i.ImageInline=GC;i.Image=class extends ps{static get requires(){return[WC,GC]}static get pluginName(){return"Image"}static get isOfficialPlugin(){return!0}};class qC extends ps{static get pluginName(){return"ImageCaptionUtils"}static get isOfficialPlugin(){return!0}static get requires(){return[xC]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}i.ImageCaptionUtils=qC;class YC extends gs{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(VC))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,r=n.getSelectedElement();if(!r){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=i.isImage(r),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(r):this.value=!1}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{focusCaptionOnShow:t}=e;this.editor.model.change(e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)})}_showImageCaption(e,t){const i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageCaptionEditing"),r=this.editor.plugins.get("ImageUtils");let o=i.getSelectedElement();const s=n._getSavedCaption(o);r.isInlineImage(o)&&(this.editor.execute("imageTypeBlock"),o=i.getSelectedElement());const a=s||e.createElement("caption");e.append(a,o),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),r=t.plugins.get("ImageCaptionUtils");let o,s=i.getSelectedElement();s?o=r.getCaptionFromImageModelElement(s):(o=r.getCaptionFromModelSelection(i),s=o.parent),n._saveCaption(s,o),e.setSelection(s,"on"),e.remove(o)}}class ZC extends ps{static get requires(){return[xC,qC]}static get pluginName(){return"ImageCaptionEditing"}static get isOfficialPlugin(){return!0}_savedCaptionsMap;constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new YC(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),r=e.t;e.conversion.for("upcast").elementToElement({view:e=>n.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,t)=>
6{let{writer:n}=t;return i.isBlockImage(e.parent)?n.createContainerElement("figcaption"):null}}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,n)=>{let{writer:o}=n;if(!i.isBlockImage(e.parent))return null;const s=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,s),s.placeholder=r("Enter image caption"),Cs({view:t,element:s,keepOnFocus:!0});const a=e.parent.getAttribute("alt");return _y(s,o,{label:a?r("Caption for image: %0",[a]):r("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),r=e.commands.get("imageTypeBlock"),o=e=>{if(!e.return)return;const{oldElement:n,newElement:r}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=i.getCaptionFromImageModelElement(n);if(e)return void this._saveCaption(r,e)}const o=this._getSavedCaption(n);o&&this._saveCaption(r,o)};n&&this.listenTo(n,"execute",o,{priority:"low"}),r&&this.listenTo(r,"execute",o,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Yl.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",()=>{const r=t.document.differ.getChanges();for(const t of r){if("alt"!==t.attributeKey)continue;const r=t.range.start.nodeAfter;if(i.isBlockImage(r)){const t=n.getCaptionFromImageModelElement(r);if(!t)return;e.editing.reconvertItem(t)}}})}}i.ImageCaptionEditing=ZC;class XC extends ps{static get requires(){return[qC]}static get pluginName(){return"ImageCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",r=>{const o=e.commands.get("toggleImageCaption"),s=new Ff(r);return s.set({icon:Yd.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(o,"value","isEnabled"),s.bind("label").to(o,"value",e=>n(e?"Toggle caption off":"Toggle caption on")),this.listenTo(s,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const n=i.getCaptionFromModelSelection(e.model.document.selection);if(n){const i=e.editing.mapper.toViewElement(n);t.scrollToTheSelection(),t.change(e=>{e.addClass("image__caption_highlighted",i)})}e.editing.view.focus()}),s})}}i.ImageCaptionUI=XC;function KC(e){const t=e.map(e=>e.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function JC(e){return new Promise((t,i)=>{const n=e.getAttribute("src");fetch(n).then(e=>e.blob()).then(e=>{const i=QC(e,n),r=i.replace("image/",""),o=new File([e],`image.${r}`,{type:i});t(o)}).catch(e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise((t,i)=>{const n=r.document.createElement("img");n.addEventListener("load",()=>{const e=r.document.createElement("canvas");e.width=n.width,e.height=n.height,e.getContext("2d").drawImage(n,0,0),e.toBlob(e=>e?t(e):i())}),n.addEventListener("error",()=>i()),n.src=e})}(e).then(t=>{const i=QC(t,e),n=i.replace("image/","");return new File([t],`image.${n}`,{type:i})})}(n).then(t).catch(i):i(e))})}function QC(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}i.ImageCaption=class extends ps{static get requires(){return[ZC,XC]}static get pluginName(){return"ImageCaption"}static get isOfficialPlugin(){return!0}};class eS extends ps{static get pluginName(){return"ImageUploadUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("uploadImage",()=>this._createToolbarButton()),e.ui.componentFactory.add("imageUpload",()=>this._createToolbarButton()),e.ui.componentFactory.add("menuBar:uploadImage",()=>this._createMenuBarButton("standalone")),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:e=>this._createMenuBarButton(e?"insertOnly":"insertNested")})}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("uploadImage"),r=t.config.get("image.upload.types"),o=KC(r),s=new e(t.locale),a=i.t;return s.set({acceptedType:r.map(e=>`image/${e}`).join(","),allowMultipleFiles:!0,label:a("Upload from computer"),icon:Yd.imageUpload}),s.bind("isEnabled").to(n),s.on("done",(e,i)=>{const n=Array.from(i).filter(e=>o.test(e.type));n.length&&(t.execute("uploadImage",{file:n}),t.editing.view.focus())}),s}_createToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this.editor.commands.get("uploadImage"),n=this._createButton(lp);return n.tooltip=!0,n.bind("label").to(t,"isImageSelected",i,"isAccessAllowed",(t,i)=>e(i?t?"Replace image from computer":"Upload image from computer":"You have no image upload permissions.")),n}_createDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(lp);return i.withText=!0,i.bind("label").to(t,"isImageSelected",t=>e(t?"Replace from computer":"Upload from computer")),i.on("execute",()=>{t.dropdownView.isOpen=!1}),i}_createMenuBarButton(e){const t=this.editor.locale.t,i=this._createButton(xv);switch(i.withText=!0,e){case"standalone":i.label=t("Image from computer");break;case"insertOnly":i.label=t("Image");break;case"insertNested":i.label=t("From computer")}return i}}i.ImageUploadUI=eS;class tS extends ps{static get pluginName(){return"ImageUploadProgress"}static get isOfficialPlugin(){return!0}placeholder;constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}uploadStatusChange=(e,t,i)=>{const n=this.editor,r=t.item,o=r.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const s=n.plugins.get("ImageUtils"),a=n.plugins.get(Xd),l=o?t.attributeNewValue:null,c=this.placeholder,u=n.editing.mapper.toViewElement(r),h=i.writer;if("reading"==l)return iS(u,h),void nS(s,c,u,h);if("uploading"==l){const e=a.loaders.get(o);return iS(u,h),void(e?(rS(u,h),function(e,t,i,n){const r=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),r),i.on("change:uploadedPercent",(e,t,i)=>{n.change(e=>{e.setStyle("width",i+"%",r)})})}(u,h,e,n.editing.view),function(e,t,i,n){if(n.data){const r=e.findViewImgElement(t);i.setAttribute("src",n.data,r)}}(s,u,h,e)):nS(s,c,u,h))}"complete"==l&&a.loaders.get(o)&&function(e,t,i){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout(()=>{i.change(e=>e.remove(e.createRangeOn(n)))},3e3)}(u,h,n.editing.view),function(e,t){sS(e,t,"progressBar")}(u,h),rS(u,h),function(e,t){t.removeClass("ck-appear",e)}(u,h)}}function iS(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function nS(e,t,i,n){i.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",i);const r=e.findViewImgElement(i);r.getAttribute("src")!==t&&n.setAttribute("src",t,r),oS(i,"placeholder")||n.insert(n.createPositionAfter(r),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function rS(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),sS(e,t,"placeholder")}function oS(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function sS(e,t,i){const n=oS(e,i);n&&t.remove(t.createRangeOn(n))}i.ImageUploadProgress=tS;class aS extends gs{constructor(e){super(e),this.set("isAccessAllowed",!0)}refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=Uo(e.file),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(i.getAttributes());t.forEach((e,t)=>{const o=i.getSelectedElement();
6if(t&&o&&n.isImage(o)){const t=this.editor.model.createPositionAfter(o);this._uploadImage(e,r,t)}else this._uploadImage(e,r)})}_uploadImage(e,t,i){const n=this.editor,r=n.plugins.get(Xd).createLoader(e),o=n.plugins.get("ImageUtils");r&&o.insertImage({...t,uploadId:r.id},i)}}class lS extends ps{static get requires(){return[Xd,Qg,Hw,xC]}static get pluginName(){return"ImageUploadEditing"}static get isOfficialPlugin(){return!0}_uploadImageElements;_uploadedImages=new Map;constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,n=e.plugins.get(Xd),r=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline"),s=KC(e.config.get("image.upload.types")),a=new aS(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}).add(e=>e.on("element:img",(e,t,i)=>{if(!i.consumable.test(t.viewItem,{attributes:["data-ck-upload-id"]}))return;const r=t.viewItem.getAttribute("data-ck-upload-id");if(!r)return;const[o]=Array.from(t.modelRange.getItems({shallow:!0})),s=n.loaders.get(r);o&&(i.writer.setAttribute("uploadId",r,o),i.consumable.consume(t.viewItem,{attributes:["data-ck-upload-id"]}),s&&s.data&&i.writer.setAttribute("uploadStatus",s.status,o))},{priority:"low"})),this.listenTo(e.editing.view.document,"clipboardInput",(t,i)=>{if(n=i.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const r=Array.from(i.dataTransfer.files).filter(e=>!!e&&s.test(e.type));if(r.length&&(t.stop(),e.model.change(t=>{i.targetRanges&&t.setSelection(i.targetRanges.map(t=>e.editing.mapper.toModelRange(t))),e.execute("uploadImage",{file:r})}),!e.commands.get("uploadImage").isAccessAllowed)){const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("You have no image upload permissions."),{namespace:"image"})}}),this.listenTo(o,"inputTransformation",(t,i)=>{const o=Array.from(e.editing.view.createRangeIn(i.content)).map(e=>e.item).filter(e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(r,e)&&!e.getAttribute("uploadProcessed")).map(e=>({promise:JC(e),imageElement:e}));if(!o.length)return;const s=new gh(e.editing.view.document);for(const e of o){s.setAttribute("uploadProcessed",!0,e.imageElement);const t=n.createLoader(e.promise);t&&(s.setAttribute("src","",e.imageElement),s.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),r=new Set;for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,o="$graveyard"==t.position.root.rootName;for(const t of cS(e,i)){const i=t.getAttribute("uploadId");if(!i)continue;const s=n.loaders.get(i);s?o?r.has(i)||Array.from(this._uploadImageElements.get(i)).every(e=>"$graveyard"==e.root.rootName)&&s.abort():(r.add(i),this._uploadImageElements.has(i)?this._uploadImageElements.get(i).add(t):this._uploadImageElements.set(i,new Set([t])),"idle"==s.status&&this._readAndUpload(s)):!o&&this._uploadedImages.has(i)&&e.model.enqueueChange({isUndoable:!1},e=>{e.setAttribute("uploadStatus","complete",t),this.fire("uploadComplete",{data:this._uploadedImages.get(i),imageElement:t})})}}}),this.on("uploadComplete",(e,t)=>{let{imageElement:i,data:n}=t;const o=n.urls?n.urls:n;this.editor.model.change(e=>{e.setAttribute("src",o.default,i),this._parseAndSetSrcsetAttributeOnImage(o,i,e),r.setImageNaturalSizeAttributes(i)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageBlock")),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageInline"))}_readAndUpload(e){const t=this.editor,i=t.model,n=t.locale.t,r=t.plugins.get(Xd),o=t.plugins.get(Qg),a=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},t=>{const i=l.get(e.id);for(const e of i)t.setAttribute("uploadStatus","reading",e)}),e.read().then(()=>{const r=e.upload();t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Uploading image"));for(const n of l.get(e.id)){if(s.isSafari){const e=t.editing.mapper.toViewElement(n),i=a.findViewImgElement(e);t.editing.view.once("render",()=>{if(!i.parent)return;const e=t.editing.view.domConverter.mapViewToDom(i.parent);if(!e)return;const n=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=n})}i.enqueueChange({isUndoable:!1},e=>
6{e.setAttribute("uploadStatus","uploading",n)})}return r}).then(r=>{i.enqueueChange({isUndoable:!1},i=>{for(const t of l.get(e.id))i.setAttribute("uploadStatus","complete",t),this.fire("uploadComplete",{data:r,imageElement:t});t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Image upload complete")),this._uploadedImages.set(e.id,r)}),c()}).catch(r=>{if(t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Error during image upload")),"error"!==e.status&&"aborted"!==e.status)throw r;"error"==e.status&&r&&o.showWarning(r,{title:n("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},t=>{for(const i of l.get(e.id))"$graveyard"!==i.root.rootName&&t.remove(i)}),c()});function c(){i.enqueueChange({isUndoable:!1},t=>{for(const i of l.get(e.id))t.removeAttribute("uploadId",i),t.removeAttribute("uploadStatus",i);l.delete(e.id)}),r.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const r=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");if(""!=r){const e={srcset:r};t.hasAttribute("width")||t.hasAttribute("height")||(e.width=n),i.setAttributes(e,t)}}_registerConverters(e){const{conversion:t,plugins:i}=this.editor,n=i.get(Xd),r=i.get(xC);t.for("dataDowncast").add(t=>{t.on(`attribute:uploadId:${e}`,(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const o=n.loaders.get(t.attributeNewValue);if(!o||!o.data)return null;const s=i.mapper.toViewElement(t.item),a=r.findViewImgElement(s);a&&(i.consumable.consume(t.item,e.name),i.writer.setAttribute("data-ck-upload-id",o.id,a))})})}}function cS(e,t){const i=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter(e=>i.isImage(e.item)).map(e=>e.item)}i.ImageUploadEditing=lS;class uS extends ps{static get pluginName(){return"ImageUpload"}static get isOfficialPlugin(){return!0}static get requires(){return[lS,eS,tS]}}i.ImageUpload=uS;class hS extends Df{urlInputView;keystrokes;constructor(e){super(e),this.set("imageURLInputValue",""),this.set("isImageSelected",!1),this.set("isEnabled",!0),this.keystrokes=new Jo,this.urlInputView=this._createUrlInputView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-image-insert-url"]},children:[this.urlInputView,{tag:"div",attributes:{class:["ck","ck-image-insert-url__action-row"]}}]})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}_createUrlInputView(){const e=this.locale,t=e.t,i=new Bp(e,Am);return i.bind("label").to(this,"isImageSelected",e=>t(e?"Update image URL":"Insert image via URL")),i.bind("isEnabled").to(this),i.fieldView.inputMode="url",i.fieldView.placeholder="https://example.com/image.png",i.fieldView.bind("value").to(this,"imageURLInputValue",e=>e||""),i.fieldView.on("input",()=>{this.imageURLInputValue=i.fieldView.element.value.trim()}),i}focus(){this.urlInputView.focus()}}class dS extends ps{_imageInsertUI;_formView;static get pluginName(){return"ImageInsertViaUrlUI"}static get isOfficialPlugin(){return!0}static get requires(){return[UC,Kf]}init(){this.editor.ui.componentFactory.add("insertImageViaUrl",()=>this._createToolbarButton()),this.editor.ui.componentFactory.add("menuBar:insertImageViaUrl",()=>this._createMenuBarButton("standalone"))}afterInit(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI"),this._imageInsertUI.registerIntegration({name:"url",observable:()=>this.editor.commands.get("insertImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:e=>this._createMenuBarButton(e?"insertOnly":"insertNested")})}_createInsertUrlButton(e){const t=new e(this.editor.locale);return t.icon=Yd.imageUrl,t.on("execute",()=>{this._showModal()}),t}_createToolbarButton(){const e=this.editor.locale.t,t=this._createInsertUrlButton(Ff);return t.tooltip=!0,t.bind("label").to(this._imageInsertUI,"isImageSelected",t=>e(t?"Update image URL":"Insert image via URL")),t}_createDropdownButton(){const e=this.editor.locale.t,t=this._createInsertUrlButton(Ff);return t.withText=!0,t.bind("label").to(this._imageInsertUI,"isImageSelected",t=>e(t?"Update image URL":"Insert via URL")),t}_createMenuBarButton(e){const t=this.editor.locale.t,i=this._createInsertUrlButton(ep);switch(i.withText=!0,e){case"standalone":i.label=t("Image via URL");break;case"insertOnly":i.label=t("Image");break;case"insertNested":i.label=t("Via URL")}return i}_createInsertUrlView(){const e=this.editor,t=e.locale,i=e.commands.get("replaceImageSource"),n=e.commands.get("insertImage"),r=new hS(t);return r.bind("isImageSelected").to(this._imageInsertUI),r.bind("isEnabled").toMany([n,i],"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),r}_showModal(){const e=this.editor,t=e.locale.t,i=e.plugins.get("Dialog");this._formView||(this._formView=this._createInsertUrlView(),this._formView.on("submit",()=>this._handleSave()));const n=e.commands.get("replaceImageSource");this._formView.imageURLInputValue=n.value||"",i.show({id:"insertImageViaUrl",title:this._imageInsertUI.isImageSelected?t("Update image URL"):t("Insert image via URL"),isModal:!0,content:this._formView,actionButtons:[{label:t("Cancel"),withText:!0,onExecute:()=>i.hide()},{label:t("Accept"),class:"ck-button-action",withText:!0,onExecute:()=>this._handleSave()}]})}_handleSave(){this.editor.commands.get("replaceImageSource").isEnabled?this.editor.execute("replaceImageSource",{source:this._formView.imageURLInputValue}):this.editor.execute("insertImage",{source:this._formView.imageURLInputValue}),this.editor.plugins.get("Dialog").hide()}}class fS extends ps{static get pluginName(){return"ImageInsertViaUrl"}static get isOfficialPlugin(){return!0}static get requires(){return[dS,UC]}}i.ImageInsertViaUrl=fS;i.ImageInsert=class extends ps{static get pluginName(){return"ImageInsert"}static get isOfficialPlugin(){return!0}
6static get requires(){return[uS,fS,UC]}};class pS extends gs{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("resizedWidth")?this.value={width:t.getAttribute("resizedWidth"),height:null}:this.value=null}execute(e){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils"),r=n.getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},r&&i.change(t=>{t.setAttribute("resizedWidth",e.width,r),t.removeAttribute("resizedHeight",r),n.setImageNaturalSizeAttributes(r)})}}class mS extends ps{static get requires(){return[xC]}static get pluginName(){return"ImageResizeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new pS(e);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}afterInit(){this._registerSchema()}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils");t.conversion.for("downcast").add(t=>t.on(`attribute:resizedWidth:${e}`,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,r),n.addClass("image_resized",r)):(n.removeStyle("width",r),n.removeClass("image_resized",r))})),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:e=>({key:"style",value:{height:e}})}),t.conversion.for("editingDowncast").add(t=>t.on(`attribute:resizedHeight:${e}`,(t,n,r)=>{if(!r.consumable.consume(n.item,t.name))return;const o=r.writer,s=r.mapper.toViewElement(n.item),a="imageInline"===e?i.findViewImgElement(s):s;null!==n.attributeNewValue?o.setStyle("height",n.attributeNewValue,a):o.removeStyle("height",a)})),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:e=>_C(e)?null:e.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:e=>_C(e)?null:e.getStyle("height")}})}}i.ImageResizeEditing=mS;const gS={small:Yd.objectSizeSmall,medium:Yd.objectSizeMedium,large:Yd.objectSizeLarge,custom:Yd.objectSizeCustom,original:Yd.objectSizeFull};class vS extends ps{static get requires(){return[mS]}static get pluginName(){return"ImageResizeButtons"}static get isOfficialPlugin(){return!0}_resizeUnit;constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:r}=e;t.ui.componentFactory.add(i,i=>{const o=new Ff(i),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!gS[r])throw new v("imageresizebuttons-missing-icon",t,e);if(o.set({label:a,icon:gS[r],tooltip:a,isToggleable:!0}),o.bind("isEnabled").to(this),t.plugins.has("ImageCustomResizeUI")&&bS(e)){const e=t.plugins.get("ImageCustomResizeUI");this.listenTo(o,"execute",()=>{e._showForm(this._resizeUnit)})}else{const e=n?n+this._resizeUnit:null;o.bind("isOn").to(s,"value",yS(e)),this.listenTo(o,"execute",()=>{t.execute("resizeImage",{width:e})})}return o}
6)}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find(e=>!e.value),r=r=>{const o=t.commands.get("resizeImage"),s=ym(r,$p),a=s.buttonView,l=i("Resize image");return a.set({tooltip:l,commandValue:n.value,icon:gS.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:l,ariaLabelledBy:void 0}),a.bind("label").to(o,"value",e=>e&&e.width?e.width:this._getOptionLabelValue(n)),s.bind("isEnabled").to(this),xm(s,()=>this._getResizeDropdownListItemDefinitions(e,o),{ariaLabel:i("Image resize list"),role:"menu"}),this.listenTo(s,"execute",e=>{"onClick"in e.source?e.source.onClick():(t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus())}),s};t.ui.componentFactory.add("resizeImage",r),t.ui.componentFactory.add("imageResize",r)}_getOptionLabelValue(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.editor.t;return e.label?e.label:t?bS(e)?i("Custom image size"):e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):bS(e)?i("Custom"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const{editor:i}=this,n=new Go,r=e.map(e=>bS(e)?{...e,valueWithUnits:"custom"}:e.value?{...e,valueWithUnits:`${e.value}${this._resizeUnit}`}:{...e,valueWithUnits:null});for(const e of r){let s=null;if(i.plugins.has("ImageCustomResizeUI")&&bS(e)){const n=i.plugins.get("ImageCustomResizeUI");s={type:"button",model:new ev({label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{n._showForm(this._resizeUnit)}})};const a=(Z(o=r)?Y:hr)(o,$n("valueWithUnits"));s.model.bind("isOn").to(t,"value",wS(a))}else s={type:"button",model:new ev({commandName:"resizeImage",commandValue:e.valueWithUnits,label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null})},s.model.bind("isOn").to(t,"value",yS(e.valueWithUnits));s.model.bind("isEnabled").to(t,"isEnabled"),n.add(s)}var o;return n}}function bS(e){return"custom"===e.value}function yS(e){return t=>null===e&&t===e||null!==t&&t.width===e}function wS(e){return t=>!e.some(e=>yS(e)(t))}i.ImageResizeButtons=vS;const _S="image_resized";class kS extends ps{static get requires(){return[Wy,xC]}static get pluginName(){return"ImageResizeHandles"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils");t.addObserver(LC),this.listenTo(t.document,"imageLoaded",(n,r)=>{if(!r.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const o=e.editing.view.domConverter,s=o.domToView(r.target),a=i.getImageWidgetFromImageView(s);let l=this.editor.plugins.get(Wy).getResizerByViewElement(a);if(l)return void l.redraw();const c=e.editing.mapper,u=c.toModelElement(a);l=e.plugins.get(Wy).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:u,viewElement:a,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>o.mapViewToDom(c.toViewElement(u)),isCentered:()=>"alignCenter"==u.getAttribute("imageStyle"),onCommit(i){t.change(e=>{e.removeClass(_S,a)}),e.execute("resizeImage",{width:i})}}),l.on("updateSize",()=>{a.hasClass(_S)||t.change(e=>{e.addClass(_S,a)});const e="imageInline"===u.name?s:a;e.getStyle("height")&&t.change(t=>{t.removeStyle("height",e)})}),l.bind("isEnabled").to(this)})}}function xS(e){if(!e)return null;const[,t,i]=e.trim().match(/([.,\d]+)(%|px)$/)||[],n=Number.parseFloat(t);return Number.isNaN(n)?null:{value:n,unit:i}}function CS(e,t,i){return"px"===i?{value:t.value,unit:"px"}:{value:t.value/e*100,unit:"%"}}function SS(e){const{editing:t}=e,i=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);if(!i)return null;const n=t.mapper.toViewElement(i);return{model:i,view:n,dom:t.view.domConverter.mapViewToDom(n)}}i.ImageResizeHandles=kS;class ES extends Df{focusTracker;keystrokes;unit;labeledInput;saveButtonView;cancelButtonView;_focusables;_focusCycler;_validators;constructor(e,t,i){super(e);const n=this.locale.t;this.focusTracker=new Yo,this.keystrokes=new Jo,this.unit=t,this.labeledInput=this._createLabeledInputVie
6w(),this.saveButtonView=this._createButton(n("Save"),Yd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Yd.cancel,"ck-button-cancel","cancel"),this._focusables=new uf,this._validators=i,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Rf({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,i,n){const r=new Ff(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:i}}),n&&r.delegate("execute").to(this,n),r}_createLabeledInputView(){const e=this.locale.t,t=new Bp(this.locale,Im);return t.label=e("Resize image (in %0)",this.unit),t.fieldView.set({step:.1}),t}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.labeledInput.errorText=t,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:e}=this.labeledInput.fieldView;return e?e.value:null}get parsedSize(){const{rawSize:e}=this;if(null===e)return null;const t=Number.parseFloat(e);return Number.isNaN(t)?null:t}get sizeWithUnits(){const{parsedSize:e,unit:t}=this;return null===e?null:`${e}${t}`}}class TS extends ps{_balloon;_form;static get requires(){return[iv]}static get pluginName(){return"ImageCustomResizeUI"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(e){const t=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Lf(ES))(t.locale,e,function(e){const t=e.t;return[e=>""===e.rawSize.trim()?t("The value must not be empty."):null===e.parsedSize?t("The value should be a plain number."):void 0]}(t)),this._form.render(),this.listenTo(this._form,"submit",()=>{this._form.isValid()&&(t.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))}),this.listenTo(this._form.labeledInput,"change:errorText",()=>{t.ui.update()}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),Of({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(e){if(this._isVisible)return;this._form||this._createForm(e);const t=this.editor,i=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:IC(t)});const n=function(e,t){const i=SS(e);if(!i)return null;const n=xS(i.model.getAttribute("resizedWidth")||null);return n?n.unit===t?n:CS(Cy(i.dom),{unit:"px",value:new io(i.dom).width},t):null}(t,e),r=n?n.value.toFixed(1):"",o=function(e,t){const i=SS(e);if(!i)return null;const n=Cy(i.dom),r=xS(window.getComputedStyle(i.dom).minWidth)||{value:1,unit:"px"};return{unit:t,lower:Math.max(.1,CS(n,r,t).value),upper:"px"===t?n:100}}(t,e);i.fieldView.value=i.fieldView.element.value=r,o&&Object.assign(i.fieldView,{min:o.lower.toFixed(1),max:Math.ceil(o.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}i.ImageCustomResizeUI=TS;i.ImageResize=class extends ps{static get requires(){return[mS,kS,TS,vS]}static get pluginName(){return"ImageResize"}static get isOfficialPlugin(){return!0}};class AS extends gs{_defaultStyles;_styles;constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]}))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils");i.change(t=>{const r=e.value,{setImageSizes:o=!0}=e;let s=n.getClosestSelectedImageElement(i.document.selection);r&&this.shouldConvertImageType(r,s)&&(this.editor.execute(n.isBlockImage(s)?"imageTypeInline":"imageTypeBlock",{setImageSizes:o}),s=n.getClosestSelectedImageElement(i.document.selection)),!r||this._styles.get(r).isDefault?t.removeAttribute("imageStyle",s):t.setAttribute("imageStyle",r,s),o&&n.setImageNaturalSizeAttributes(s)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const IS={get inline(){return{name:"inline",title:"In line",icon:Yd.objectInline,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:Yd.objectLeft,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Yd.objectBlockLeft,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Yd.objectCenter,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Yd.objectRight,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Yd.objectBlockRight,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Yd.objectCenter,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Yd.objectRight,modelElements:["imageBlock"],className:"image-style-side"}}},MS={full:Yd.objectFullWidth,left:Yd.objectBlockLeft,right:Yd.objectBlockRight,center:Yd.objectCenter,inlineLeft:Yd.objectLeft,inlineRight:Yd.objectRight,inline:Yd.objectInline},PS=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function DS(e){b("image-style-configuration-definition-invalid",e)}var OS={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map(e=>function(e){return e="string"==typeof e?IS[e]?{...IS[e]}:{name:e}:function(e,t){const i={...t};for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(i[n]=e[n]);return i}(IS[e.name],e),"string"==typeof e.icon&&(e.icon=MS[e.icon]||e.icon),e}(e)).filter(t=>function(e,t){let{isBlockPluginLoaded:i,isInlinePluginLoaded:n}=t;const{modelElements:r,name:o}=e;if(!(r&&r.length&&o))return DS({style:e}),!1;{const t=[i?"imageBlock":null,n?"imageInline":null];if(!r.some(e=>t.includes(e)))return b("image-style-missing-dependency",{style:e,missingPlugins:r.map(e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}(t,e))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...PS]:[]}
6,warnInvalidStyle:DS,DEFAULT_OPTIONS:IS,DEFAULT_ICONS:MS,DEFAULT_DROPDOWN_DEFINITIONS:PS};function LS(e,t){for(const i of t)if(i.name===e)return i}class RS extends ps{static get pluginName(){return"ImageStyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[xC]}normalizedStyles;init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=OS,i=this.editor,n=i.plugins.has("ImageBlockEditing"),r=i.plugins.has("ImageInlineEditing");i.config.define("image.styles",t(n,r)),this.normalizedStyles=e({configuredStyles:i.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:r}),this._setupConversion(n,r),this._setupPostFixer(),i.commands.add("imageStyle",new AS(i,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,n=i.model.schema,r=(o=this.normalizedStyles,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=LS(t.attributeNewValue,o),r=LS(t.attributeOldValue,o),s=i.mapper.toViewElement(t.item),a=i.writer;r&&a.removeClass(r.className,s),n&&a.addClass(n.className,s)});var o;const s=function(e){const t={imageInline:e.filter(e=>!e.isDefault&&e.modelElements.includes("imageInline")),imageBlock:e.filter(e=>!e.isDefault&&e.modelElements.includes("imageBlock"))};return(e,i,n)=>{if(!i.modelRange)return;const r=i.viewItem,o=qo(i.modelRange.getItems());if(o&&n.schema.checkAttribute(o,"imageStyle"))for(const e of t[o.name])n.consumable.consume(r,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,o)}}(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",r),i.data.downcastDispatcher.on("attribute:imageStyle",r),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(xC),n=new Map(this.normalizedStyles.map(e=>[e.name,e]));t.registerPostFixer(e=>{let r=!1;for(const o of t.differ.getChanges())if("insert"==o.type||"attribute"==o.type&&"imageStyle"==o.attributeKey){let t="insert"==o.type?o.position.nodeAfter:o.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!i.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const a=n.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),r=!0)}return r})}}i.ImageStyleEditing=RS;class BS extends ps{static get requires(){return[RS]}static get pluginName(){return"ImageStyleUI"}static get isOfficialPlugin(){return!0}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=NS(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of i)this._createButton(e);const n=NS([...t.filter(te),...OS.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of n)this._createDropdown(e,i)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,n=>{let r;const{defaultItem:o,items:s,title:a}=e,l=s.filter(e=>t.find(t=>{let{name:i}=t;return jS(i)===e})).map(e=>{const t=i.create(e);return e===o&&(r=t),t});s.length!==l.length&&OS.warnInvalidStyle({dropdown:e});const c=ym(n,bm),u=c.buttonView,h=u.arrowView;return _m(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),u.set({label:FS(a,r.label),class:null,tooltip:!0}),h.unbind("label"),h.set({label:a}),u.bind("icon").toMany(l,"isOn",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.findIndex(ae);return n<0?r.icon:l[n].icon}),u.bind("label").toMany(l,"isOn",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.findIndex(ae);return FS(a,n<0?r.label:l[n].label)}),u.bind("isOn").toMany(l,"isOn",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(ae)}),u.bind("class").toMany(l,"isOn",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(ae)?"ck-splitbutton_flatten":void 0}),u.on("execute",()=>{l.some(e=>{let{isOn:t}=e;return t})?c.isOpen=!c.isOpen:r.fire("execute")}),c.bind("isEnabled").toMany(l,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(ae)}),this.listenTo(c,"execute",()=>{this.editor.editing.view.focus()}),c})}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(jS(t),i=>{const n=this.editor.commands.get("imageStyle"),r=new Ff(i);return r.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",e=>e===t),r.on("execute",this._executeCommand.bind(this,t)),r})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function NS(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}function jS(e){return`imageStyle:${e}`}function FS(e,t){return(e?e+": ":"")+t}i.ImageStyleUI=BS;i.ImageStyle=class extends ps{static get requires(){return[RS,BS]}static get pluginName(){return"ImageStyle"}static get isOfficialPlugin(){return!0}};i.ImageToolbar=class extends ps{static get requires(){return[Ny,xC]}static get pluginName(){return"ImageToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(Ny),n=e.plugins.get("ImageUtils");var r;i.register("image",{ariaLabel:t("Image toolbar"),items:(r=e.config.get("image.toolbar")||[],r.map(e=>te(e)?e.name:e)),getRelatedElement:e=>n.getClosestSelectedImageWidget(e)})}};i.PictureEditing=class extends ps{static get requires(){return[NC,xC]}static get pluginName(){return"PictureEditing"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:["sources"]}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:["sources"]}),this._setupConversion(),this._setupImageUploadEditingIntegration()}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("upcast").add(function(e){const t=["srcset","media","type","sizes"],i=(i,n,r)=>
6{const o=n.viewItem;if(!r.consumable.test(o,{name:!0}))return;const s=new Map;for(const e of o.getChildren())if(e.is("element","source")){const i={};for(const n of t)e.hasAttribute(n)&&r.consumable.test(e,{attributes:n})&&(i[n]=e.getAttribute(n));Object.keys(i).length&&s.set(e,i)}const a=e.findViewImgElement(o);if(!a)return;let l=n.modelCursor.parent;if(!l.is("element","imageBlock")){const e=r.convertItem(a,n.modelCursor);n.modelRange=e.modelRange,n.modelCursor=e.modelCursor,l=qo(e.modelRange.getItems())}r.consumable.consume(o,{name:!0});for(const[e,t]of s)r.consumable.consume(e,{attributes:Object.keys(t)});s.size&&r.writer.setAttribute("sources",Array.from(s.values()),l),r.convertChildren(o,l)};return e=>{e.on("element:picture",i)}}(i)),t.for("downcast").add(function(e){const t=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const r=n.writer,o=n.mapper.toViewElement(i.item),s=e.findViewImgElement(o),a=i.attributeNewValue;if(a&&a.length){const e=[];let t=s.parent;for(;t&&t.is("attributeElement");){const i=t.parent;r.unwrap(r.createRangeOn(s),t),e.unshift(t),t=i}const i=s.parent.is("element","picture"),n=i?s.parent:r.createContainerElement("picture",null);i||r.insert(r.createPositionBefore(s),n),r.remove(r.createRangeIn(n)),r.insert(r.createPositionAt(n,"end"),a.map(e=>r.createEmptyElement("source",e))),r.move(r.createRangeOn(s),r.createPositionAt(n,"end"));for(const t of e)r.wrap(r.createRangeOn(n),t)}else if(s.parent.is("element","picture")){const e=s.parent;r.move(r.createRangeOn(s),r.createPositionBefore(e)),r.remove(e)}};return e=>{e.on("attribute:sources:imageBlock",t),e.on("attribute:sources:imageInline",t)}}(i))}_setupImageUploadEditingIntegration(){const e=this.editor;if(!e.plugins.has("ImageUploadEditing"))return;const t=e.plugins.get("ImageUploadEditing");this.listenTo(t,"uploadComplete",(t,i)=>{let{imageElement:n,data:r}=i;const o=r.sources;o&&e.model.change(e=>{e.setAttributes({sources:o},n)})})}};class zS extends ps{static get pluginName(){return"IndentEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.commands.add("indent",new bs(e)),e.commands.add("outdent",new bs(e))}}i.IndentEditing=zS;class VS extends ps{static get pluginName(){return"IndentUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?Yd.indent:Yd.outdent,r="ltr"==t.uiLanguageDirection?Yd.outdent:Yd.indent;this._defineButton("indent",i("Increase indent"),n),this._defineButton("outdent",i("Decrease indent"),r)}_defineButton(e,t,i){const n=this.editor;n.ui.componentFactory.add(e,()=>{const n=this._createButton(Ff,e,t,i);return n.set({tooltip:!0}),n}),n.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(ep,e,t,i))}_createButton(e,t,i,n){const r=this.editor,o=r.commands.get(t),s=new e(r.locale);return s.set({label:i,icon:n}),s.bind("isEnabled").to(o,"isEnabled"),this.listenTo(s,"execute",()=>{r.execute(t),r.editing.view.focus()}),s}}i.IndentUI=VS;i.Indent=class extends ps{static get pluginName(){return"Indent"}static get isOfficialPlugin(){return!0}static get requires(){return[zS,VS]}};class HS extends gs{_indentBehavior;constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());e&&this._isIndentationChangeAllowed(e)?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=this._getBlocksToChange();e.change(e=>{for(const i of t){const t=i.getAttribute("blockIndent"),n=this._indentBehavior.getNextIndent(t);n?e.setAttribute("blockIndent",n,i):e.removeAttribute("blockIndent",i)}})}_getBlocksToChange(){const e=this.editor.model.document.selection;return Array.from(e.getSelectedBlocks()).filter(e=>this._isIndentationChangeAllowed(e))}_isIndentationChangeAllowed(e){const t=this.editor;return!!t.model.schema.checkAttribute(e,"blockIndent")&&(!t.plugins.has("ListUtils")||(!this._indentBehavior.isForward||!t.plugins.get("ListUtils").isListItemBlock(e)))}}class US{isForward;offset;unit;constructor(e){this.isForward="forward"===e.direction,this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||"0");return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||"0");if(e&&!e.endsWith(this.unit))return this.isForward?this.offset+this.unit:void 0;const i=t+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class WS{isForward;classes;constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t<this.classes.length-1:t>=0}getNextIndent(e){const t=this.classes.indexOf(e),i=this.isForward?1:-1;return this.classes[t+i]}}const $S=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];function GS(e,t){return`${e}:${t=t||Ho(e)}`}i.IndentBlock=class extends ps{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.config.get("indentBlock");t.classes&&t.classes.length?(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new HS(e,new WS({direction:"forward",classes:t.classes}
6))),e.commands.add("outdentBlock",new HS(e,new WS({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(td),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new HS(e,new US({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new HS(e,new US({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,i=e.commands.get("indent"),n=e.commands.get("outdent"),r=e.config.get("heading.options");(r&&r.map(e=>e.model)||$S).forEach(e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})}),t.setAttributeProperties("blockIndent",{isFormatting:!0}),i.registerChildCommand(e.commands.get("indentBlock")),n.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,t="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[t]:/[\s\S]+/}},model:{key:"blockIndent",value:e=>{if(!e.is("element","li"))return e.getStyle(t)}}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:e=>({key:"style",value:{[t]:e}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const i of e)t.model.values.push(i),t.view[i]={key:"class",value:[i]};this.editor.conversion.attributeToAttribute(t)}};class qS extends gs{refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"language")}execute(){let{languageCode:e,textDirection:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=this.editor.model,n=i.document.selection,r=!!e&&GS(e,t);i.change(e=>{if(n.isCollapsed)r?e.setSelectionAttribute("language",r):e.removeSelectionAttribute("language");else{const t=i.schema.getValidRanges(n.getRanges(),"language");for(const i of t)r?e.setAttribute("language",r,i):e.removeAttribute("language",i)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.getAttribute("language")||!1;for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,"language"))return i.getAttribute("language")||!1;return!1}}class YS extends ps{static get pluginName(){return"TextPartLanguageEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("language",{textPartLanguage:[{title:"Arabic",languageCode:"ar"},{title:"French",languageCode:"fr"},{title:"Spanish",languageCode:"es"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"language"}),e.model.schema.setAttributeProperties("language",{copyOnEnter:!0}),this._defineConverters(),e.commands.add("textPartLanguage",new qS(e))}_defineConverters(){const e=this.editor.conversion;e.for("upcast").elementToAttribute({model:{key:"language",value:e=>GS(e.getAttribute("lang"),e.getAttribute("dir"))},view:{name:"span",attributes:{lang:/[\s\S]+/}}}),e.for("downcast").attributeToElement({model:"language",view:(e,t,i)=>{let{writer:n}=t;if(!e)return;if(!i.item.is("$textProxy")&&!i.item.is("documentSelection"))return;const{languageCode:r,textDirection:o}=function(e){const[t,i]=e.split(":");return{languageCode:t,textDirection:i}}(e);return n.createAttributeElement("span",{lang:r,dir:o})}})}}i.TextPartLanguageEditing=YS;class ZS extends ps{static get pluginName(){return"TextPartLanguageUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,i=t("Choose language"),n=t("Language");e.ui.componentFactory.add("textPartLanguage",t=>{const{definitions:r,titles:o}=this._getItemMetadata(),s=e.commands.get("textPartLanguage"),a=ym(t);return xm(a,r,{ariaLabel:n,role:"menu"}),a.buttonView.set({ariaLabel:n,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:n}),a.extendTemplate({attributes:{class:["ck-text-fragment-language-dropdown"]}}),a.bind("isEnabled").to(s,"isEnabled"),a.buttonView.bind("label").to(s,"value",e=>e&&o[e]||i),a.buttonView.bind("ariaLabel").to(s,"value",e=>{const t=e&&o[e];return t?`${t}, ${n}`:n}),this.listenTo(a,"execute",t=>{s.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()}),a}),e.ui.componentFactory.add("menuBar:textPartLanguage",i=>{const{definitions:r}=this._getItemMetadata(),o=e.commands.get("textPartLanguage"),s=new wv(i);s.buttonView.set({label:n});const a=new _v(i);a.set({ariaLabel:t("Language"),role:"menu"});for(const e of r){if("button"!=e.type){a.items.add(new Zp(i));continue}const t=new Ig(i,s),n=new ep(i);n.set({role:"menuitemradio",isToggleable:!0}),n.bind(...Object.keys(e.model)).to(e.model),n.delegate("execute").to(s),t.children.add(n),a.items.add(t)}return s.bind("isEnabled").to(o,"isEnabled"),s.panelView.children.add(a),s.on("execute",t=>{o.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()}),s})}_getItemMetadata(){const e=this.editor,t=new Go,i={},n=e.commands.get("textPartLanguage"),r=e.config.get("language.textPartLanguage"),o=(0,e.locale.t)("Remove language");t.add({type:"button",model:new ev({label:o,languageCode:!1,withText:!0})}),t.add({type:"separator"});for(const e of r){const r={type:"button",model:new ev({label:e.title,languageCode:e.languageCode,role:"menuitemradio",textDirection:e.textDirection,withText:!0})},o=GS(e.languageCode,e.textDirection);r.model.bind("isOn").to(n,"value",e=>e===o),t.add(r),i[o]=e.title}return{definitions:t,titles:i}}}i.TextPartLanguageUI=ZS;i.TextPartLanguage=class extends ps{static get requires(){return[YS,ZS]}static get pluginName(){return"TextPartLanguage"}static get isOfficialPlugin(){return!0}};class XS{_definitions=new Set;get length(){return this._definitions.size}
6add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const n=i.writer,r=n.document.selection;for(const e of this._definitions){const o=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,o);for(const t in e.styles)n.setStyle(t,e.styles[t],o);n.setCustomProperty("link",!0,o),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(r.getFirstRange(),o):n.wrap(i.mapper.toViewRange(t.range),o):n.unwrap(i.mapper.toViewRange(t.range),o)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(e,t,i)=>{let{writer:n,mapper:r}=i;const o=r.toViewElement(t.item),s=Array.from(o.getChildren()).find(e=>e.is("element","a"));if(s)for(const e of this._definitions){const i=Qo(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of i)"class"===e?n.addClass(t,s):n.setAttribute(e,t,s);e.classes&&n.addClass(e.classes,s);for(const t in e.styles)n.setStyle(t,e.styles[t],s)}else{for(const[e,t]of i)"class"===e?n.removeClass(t,s):n.removeAttribute(e,s);e.classes&&n.removeClass(e.classes,s);for(const t in e.styles)n.removeStyle(t,s)}}})}}}const KS=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,JS=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,QS=/^((\w+:(\/{2,})?)|(\W))/i,eE=["https?","ftps?","mailto"],tE="Ctrl+K";function iE(e,t){let{writer:i}=t;const n=i.createAttributeElement("a",{href:e},{priority:5});return i.setCustomProperty("link",!0,n),n}function nE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eE;const i=String(e),n=t.join("|");return function(e,t){return!!e.replace(KS,"").match(t)}(i,new RegExp(`${"^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))".replace("<protocols>",n)}`,"i"))?i:"#"}function rE(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function oE(e,t){const i=(n=e,JS.test(n)?"mailto:":t);var n;const r=!!i&&!sE(e);return e&&r?i+e:e}function sE(e){return QS.test(e)}function aE(e){window.open(e,"_blank","noopener")}function lE(e){const t=e.plugins.has("BookmarkEditing")?e.plugins.get("BookmarkEditing"):null;return{isScrollableToTarget:function(e){return!!e&&e.startsWith("#")&&!!t&&!!t.getElementForBookmarkId(e.slice(1))},scrollToTarget:function(i){const n=i.slice(1),r=t.getElementForBookmarkId(n);e.model.change(e=>{e.setSelection(r,"on")}),e.editing.view.scrollToTheSelection({alignToTop:!0,forceScroll:!0})}}}class cE extends gs{manualDecorators=new Go;automaticDecorators=new XS;restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement()||qo(t.getSelectedBlocks());rE(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.editor.model,n=i.document.selection,r=[],o=[];for(const e in t)t[e]?r.push(e):o.push(e);i.change(t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=uE(n);let l=lb(s,"linkHref",n.getAttribute("linkHref"),i);n.getAttribute("linkHref")===a&&(l=this._updateLinkContent(i,t,l,e)),t.setAttribute("linkHref",e,l),r.forEach(e=>{t.setAttribute(e,!0,l)}),o.forEach(e=>{t.removeAttribute(e,l)}),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const o=Qo(n.getAttributes());o.set("linkHref",e),r.forEach(e=>{o.set(e,!0)});const{end:a}=i.insertContent(t.createText(e,o),s);t.setSelection(a)}["linkHref",...r,...o].forEach(e=>{t.removeSelectionAttribute(e)})}else{const s=i.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&l.push(e);for(const s of l){let a=s;if(1===l.length){const r=uE(n);n.getAttribute("linkHref")===r&&(a=this._updateLinkContent(i,t,s,e),t.setSelection(t.createSelection(a)))}
6t.setAttribute("linkHref",e,a),r.forEach(e=>{t.setAttribute(e,!0,a)}),o.forEach(e=>{t.removeAttribute(e,a)})}}})}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,n=i.getSelectedElement();return rE(n,t.schema)?n.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}_updateLinkContent(e,t,i,n){const r=t.createText(n,{linkHref:n});return e.insertContent(r,i)}}function uE(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const i=t[0];return i.is("$text")||i.is("$textProxy")?i.data:null}}i.LinkCommand=cE;class hE extends gs{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();rE(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change(e=>{const r=i.isCollapsed?[lb(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of r)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)})}}i.UnlinkCommand=hE;class dE extends(Er()){id;defaultValue;label;attributes;classes;styles;constructor(e){let{id:t,label:i,attributes:n,classes:r,styles:o,defaultValue:s}=e;super(),this.id=t,this.set("value",void 0),this.defaultValue=s,this.label=i,this.attributes=n,this.classes=r,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}const fE="automatic",pE=/^(https?:)?\/\//;class mE extends ps{static get pluginName(){return"LinkEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Yv,Ov,Hw]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const e=this.editor,t=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:iE}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,i)=>iE(nE(e,t),i)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new cE(e)),e.commands.add("unlink",new hE(e));const i=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>("label"in e&&i[e.label]&&(e.label=i[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${ni(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(i.filter(e=>e.mode===fE)),this._enableManualDecorators(i.filter(e=>"manual"===e.mode)),e.plugins.get(Yv).registerAttribute("linkHref"),ub(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:fE,callback:e=>!!e&&pE.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const n=new dE(e);i.add(n),t.conversion.for("downcast").attributeToElement({model:n.id,view:(e,t,i)=>{let{writer:r,schema:o}=t,{item:s}=i;if((s.is("selection")||o.isInline(s))&&e){const e=r.createAttributeElement("a",n.attributes,{priority:5});n.classes&&r.addClass(n.classes,e);for(const t in n.styles)r.setStyle(t,n.styles[t],e);return r.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})})}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document,i=lE(e);function n(e){i.isScrollableToTarget(e)?i.scrollToTarget(e):aE(e)}this.listenTo(t,"click",(e,t)=>{if(!(s.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const r=i.getAttribute("href");r&&(e.stop(),t.preventDefault(),n(r))},{context:"$capture"}),this.listenTo(t,"keydown",(t,i)=>{const r=e.commands.get("link").value;
6r&&i.keyCode===Oo.enter&&i.altKey&&(t.stop(),n(r))})}_enableSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(t,"change:attribute",(i,n)=>{let{attributeKeys:r}=n;r.includes("linkHref")&&!t.hasAttribute("linkHref")&&e.change(t=>{var i;!function(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i)}(t,(i=e.schema,i.getDefinition("$text").allowAttributes.filter(e=>e.startsWith("link"))))})})}_enableClipboardIntegration(){const e=this.editor,t=e.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",(e,n)=>{t.change(e=>{const t=e.createRangeIn(n.content);for(const n of t.getItems())if(n.hasAttribute("linkHref")){const t=oE(n.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,n)}})})}}i.LinkEditing=mE;class gE extends Df{focusTracker=new Yo;keystrokes=new Jo;urlInputView;saveButtonView;cancelButtonView;_manualDecoratorSwitches;children;_validators;_focusables=new uf;_focusCycler;constructor(e,t,i){super(e);const n=e.t;this._validators=i,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Yd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Yd.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const r=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&r.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:r,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),Rf({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createUrlInput(){const e=this.locale.t,t=new Bp(this.locale,Am);return t.fieldView.inputMode="url",t.label=e("Link URL"),t}_createButton(e,t,i,n){const r=new Ff(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:i}}),n&&r.delegate("execute").to(this,n),r}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new ap(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",(e,t)=>void 0===t&&void 0===e?!!i.defaultValue:!!e),n.on("execute",()=>{i.set("value",!n.isOn)}),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Df;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}get url(){const{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}}i.LinkFormView=gE;class vE extends Df{focusTracker=new Yo;keystrokes=new Jo;previewButtonView;unlinkButtonView;editButtonView;_focusables=new uf;_focusCycler;_linkConfig;_options;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;super(e);const n=e.t;this._options=i,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
6<path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(n("Edit link"),Yd.pencil,"edit"),this.set("href",void 0),this._linkConfig=t,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const n=new Ff(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new Ff(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&nE(e,this._linkConfig.allowedProtocols)),target:"_blank",rel:"noopener noreferrer"},on:{click:t.to(e=>{this._options&&this._options.isScrollableToTarget(this.href)?(e.preventDefault(),this._options.scrollToTarget(this.href)):aE(this.href)})}}),e.bind("tooltip").to(this,"href",e=>this._options&&this._options.isScrollableToTarget(e)?i("Scroll to target"):i("Open link in new tab")),e.bind("label").to(this,"href",e=>e||i("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e}}i.LinkActionsView=vE;var bE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>';const yE="link-ui";class wE extends ps{actionsView=null;formView=null;_balloon;static get requires(){return[iv]}static get pluginName(){return"LinkUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.editing.view.addObserver(ph),this._balloon=e.plugins.get(iv),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:yE,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:yE,view:(e,t)=>{let{writer:i}=t;if(!e.markerRange.isCollapsed)return null;const n=i.createUIElement("span");return i.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],n),n}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:tE},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new vE(e.locale,e.config.get("link"),lE(e)),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(tE,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),n=new(Lf(gE))(e.locale,t,function(e){const t=e.t,i=e.config.get("link.allowCreatingEmptyLinks");return[e=>{if(!i&&!e.url.length)return t("Link URL must not be empty.")}]}(e));return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isEnabled").to(t,"isEnabled"),n.saveButtonView.bind("isEnabled").to(t,"isEnabled"),this.listenTo(n,"submit",()=>{if(n.isValid()){const{value:t}=n.urlInputView.fieldView.element,r=oE(t,i);e.execute("link",r,n.getDecoratorSwitchesState()),this._closeFormView()}}),this.listenTo(n.urlInputView,"change:errorText",()=>{e.ui.update()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),n}_createToolbarLinkButton(){const e=this.editor;e.ui.componentFactory.add("link",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:link",()=>{const e=this._createButton(ep);return e.set({role:"menuitemcheckbox"}),e})}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("link"),r=new e(t.locale),o=i.t;return r.set({label:o("Link"),icon:bE,keystroke:tE,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",e=>!!e),this.listenTo(r,"execute",()=>this._showUI(!0)),r}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),e.keystrokes.set(tE,(t,i)=>{i(),e.commands.get("link").isEnabled&&this._showUI(!0)})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),Of({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpd
6atingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=o();const r=()=>{const e=this._getSelectedLinkElement(),t=o();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function o(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let n;if(t.markers.has(yE)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(yE)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(i)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&py(i))return _E(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=_E(i.start),r=_E(i.end);return n&&n==r&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(yE))t.updateMarker(yE,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition(t=>{let{item:i}=t;return!e.schema.isContent(i)},{boundaries:i});t.addMarker(yE,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(yE,{usingOperation:!1,affectsData:!1,range:i})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(yE)&&e.change(e=>{e.removeMarker(yE)})}}function _E(e){return e.getAncestors().find(e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t})||null}i.LinkUI=wE;const kE=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class xE extends ps{static get requires(){return[Wv,mE]}static get pluginName(){return"AutoLink"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?lb(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const i=this.editor.model,n=i.document.selection,r=n.getFirstPosition(),o=n.getLastPosition();let s=t.getJoined(this._expandLinkRange(i,r)||t);s&&(s=s.getJoined(this._expandLinkRange(i,o)||t)),s&&(s.start.isBefore(r)||s.end.isAfter(o))&&e.setSelection(s)}_enablePasteLinking(){const e=this.editor,t=e.model,i=t.document.selection,n=e.plugins.get("ClipboardPipeline"),r=e.commands.get("link");n.on("inputTransformation",(e,n)=>{if(!this.isEnabled||!r.isEnabled||i.isCollapsed||"paste"!==n.method)return;if(i.rangeCount>1)return;const o=i.getFirstRange(),s=n.dataTransfer.getData("text/plain");if(!s)return;const a=s.match(kE);a&&a[2]===s&&(t.change(e=>{this._selectEntireLinks(e,o),r.execute(s)}),e.stop())},{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new qv(e.model,e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=CE(e.substr(0,e.length-1));return t?{url:t}:void 0});t.on("matched:data",(t,i)=>{const{batch:n,range:r,url:o}=i;if(!n.isTyping)return;
6const s=r.end.getShiftedBy(-1),a=s.getShiftedBy(-o.length),l=e.model.createRange(a,s);this._applyAutoLink(o,l)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(i)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:n}=Gv(e,t),r=CE(i);if(r){const e=t.createRange(n.end.getShiftedBy(-r.length),n.end);this._applyAutoLink(r,e)}}_applyAutoLink(e,t){const i=this.editor.model,n=oE(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&sE(n)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const i=this.editor.model,n=this.editor.plugins.get("Delete");i.enqueueChange(r=>{r.setAttribute("linkHref",e,t),i.enqueueChange(()=>{n.requestUndoOnBackspace()})})}}function CE(e){const t=kE.exec(e);return t?t[2]:null}i.AutoLink=xE;i.Link=class extends ps{static get requires(){return[mE,wE,xE]}static get pluginName(){return"Link"}static get isOfficialPlugin(){return!0}};class SE extends ps{static get requires(){return["ImageEditing","ImageUtils",mE]}static get pluginName(){return"LinkImageEditing"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,n,r)=>{const o=n.viewItem,s=i.findViewImgElement(o);if(!s)return;const a=s.findAncestor(e=>i.isBlockImageView(e));if(t&&!a)return;if(!r.consumable.consume(o,{attributes:["href"]}))return;const l=o.getAttribute("href");if(!l)return;let c=n.modelCursor.parent;if(!c.is("element","imageBlock")){const e=r.convertItem(s,n.modelCursor);n.modelRange=e.modelRange,n.modelCursor=e.modelCursor,c=n.modelCursor.nodeBefore}c&&c.is("element","imageBlock")&&r.writer.setAttribute("linkHref",l,c)},{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",(e,i,n)=>{if(!n.consumable.consume(i.item,e.name))return;const r=n.mapper.toViewElement(i.item),o=n.writer,s=Array.from(r.getChildren()).find(e=>e.is("element","a")),a=t.findViewImgElement(r),l=a.parent.is("element","picture")?a.parent:a;if(s)i.attributeNewValue?o.setAttribute("href",i.attributeNewValue,s):(o.move(o.createRangeOn(l),o.createPositionAt(r,0)),o.remove(s));else{const e=o.createContainerElement("a",{href:i.attributeNewValue});o.insert(o.createPositionAt(r,0),e),o.move(o.createRangeOn(l),o.createPositionAt(e,0))}},{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(EE(i)),e.conversion.for("upcast").add(TE(e,i))}}function EE(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,(t,i,n)=>{const r=n.mapper.toViewElement(i.item),o=Array.from(r.getChildren()).find(e=>e.is("element","a"));if(o){for(const[t,i]of Qo(e.attributes))n.writer.setAttribute(t,i,o);e.classes&&n.writer.addClass(e.classes,o);for(const t in e.styles)n.writer.setStyle(t,e.styles[t],o)}})}}function TE(e,t){const i=e.plugins.has("ImageInlineEditing"),n=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,r,o)=>{const s=r.viewItem,a=n.findViewImgElement(s);if(!a)return;
6const l=a.findAncestor(e=>n.isBlockImageView(e));if(i&&!l)return;const c=new Rs(t._createPattern()).match(s);if(!c)return;if(!o.consumable.consume(s,c.match))return;const u=r.modelCursor.nodeBefore||r.modelCursor.parent;o.writer.setAttribute(t.id,!0,u)},{priority:"high"})}}i.LinkImageEditing=SE;class AE extends ps{static get requires(){return[mE,wE,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(t,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),t.stop())},{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",i=>{const n=new Ff(i),r=e.plugins.get("LinkUI"),o=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:bE,keystroke:tE,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o,"isEnabled"),n.bind("isOn").to(o,"value",e=>!!e),this.listenTo(n,"execute",()=>{this._isSelectedLinkedImage(e.model.document.selection)?r._addActionsView():r._showUI(!0)}),n})}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}i.LinkImageUI=AE;i.LinkImage=class extends ps{static get requires(){return[SE,AE]}static get pluginName(){return"LinkImage"}static get isOfficialPlugin(){return!0}};class IE{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==t.direction,this._includeSelf=!!t.includeSelf,this._sameAttributes=Uo(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){return qo(new this(e,t)[Symbol.iterator]())}*[Symbol.iterator](){const e=[];for(const{node:t}of new ME(this._getStartNode(),this._isForward?"forward":"backward")){const i=t.getAttribute("listIndent");if(i<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=i}else if(i>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some(e=>t.getAttribute(e)!==this._startElement.getAttribute(e)))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class ME{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"forward";this._node=e,this._isForward="forward"===t}[Symbol.iterator](){return this}next(){if(!OE(this._node))return{done:!0,value:void 0};const e=this._node.getAttribute("listIndent");let t=null;if(this._previous){const i=this._previousNodeIndent;e>i?this._previousNodesByIndent[i]=this._previous:e<i?(t=this._previousNodesByIndent[e]||null,this._previousNodesByIndent.length=e):t=this._previous}const i={node:this._node,previous:this._previous,previousNodeInList:t};return this._previous=this._node,this._previousNodeIndent=e,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:i,done:!1}}}class PE{_listHead;constructor(e){this._listHead=e}[Symbol.iterator](){return new ME(this._listHead)}}class DE{static next(){return p()}}function OE(e){return!!e&&e.is("element")&&e.hasAttribute("listItemId")}function LE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[...RE(e,{...t,direction:"backward"}),...RE(e,{...t,direction:"forward"})]}function RE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i="forward"==t.direction,n=Array.from(new IE(e,{...t,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?n:n.reverse()}function BE(e,t){const i=new IE(e,{sameIndent:!0,sameAttributes:"listType",...t}),n=new IE(e,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...t});return[...Array.from(i).reverse(),...n]}function NE(e){return!IE.first(e,{sameIndent:!0,sameAttributes:"listItemId"})}function jE(e){return!IE.first(e,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function FE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Uo(e);const i=!1!==t.withNested,n=new Set;for(const t of e)for(const e of LE(t,{higherIndent:i}))n.add(e);return GE(n)}function zE(e){e=Uo(e);const t=new Set;for(const i of e)for(const e of BE(i))t.add(e);return GE(t)}function VE(e,t){const i=RE(e,{direction:"forward"}),n=DE.next();for(const e of i)t.setAttribute("listItemId",n,e);return i}function HE(e,t,i){const n={};for(const[e,i]of t.getAttributes())e.startsWith("list")&&(n[e]=i);const r=RE(e,{direction:"forward"});for(const e of r)i.setAttributes(n,e);return r}function UE(e,t){let{expand:i,indentBy:n=1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=Uo(e);const r=i?FE(e):e;for(const e of r){const i=e.getAttribute("listIndent")+n;i<0?WE(e,t):t.setAttribute("listIndent",i,e)}return r}function WE(e,t){e=Uo(e);for(const i of e)i.is("element","listItem")&&t.rename(i,"paragraph");for(const i of e)for(const e of i.getAttributeKeys())e.startsWith("list")&&t.removeAttribute(e,i);return e}function $E(e){if(!e.length)return!1;const t=e[0].getAttribute("listItemId");return!!t&&!e.some(e=>e.getAttribute("listItemId")!=t)}function GE(e){return Array.from(e).filter(e=>"$graveyard"!==e.root.rootName).sort((e,t)=>
vendor: 13,197 bytes, line 6
6e.index-t.index)}function qE(e){const t=e.document.selection.getSelectedElement();return t&&e.schema.isObject(t)&&e.schema.isBlock(t)?t:null}function YE(e,t){return t.checkChild(e.parent,"listItem")&&t.checkChild(e,"$text")&&!t.isObject(e)}function ZE(e){return"numbered"==e||"customNumbered"==e}function XE(e,t,i){return RE(t,{direction:"forward"}).pop().index>e.index?HE(e,t,i):[]}class KE extends gs{_direction;constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=JE(e.document.selection);e.change(e=>{const i=[];$E(t)&&!NE(t[0])?("forward"==this._direction&&i.push(...UE(t,e)),i.push(...VE(t[0],e))):"forward"==this._direction?i.push(...UE(t,e,{expand:!0})):i.push(...function(e,t){const i=FE(e=Uo(e)),n=new Set,r=Math.min(...i.map(e=>e.getAttribute("listIndent"))),o=new Map;for(const e of i)o.set(e,IE.first(e,{lowerIndent:!0}));for(const e of i){if(n.has(e))continue;n.add(e);const i=e.getAttribute("listIndent")-1;if(i<0)WE(e,t);else{if(e.getAttribute("listIndent")==r){const i=XE(e,o.get(e),t);for(const e of i)n.add(e);if(i.length)continue}t.setAttribute("listIndent",i,e)}}return GE(n)}(t,e));for(const t of i){if(!t.hasAttribute("listType"))continue;const i=IE.first(t,{sameIndent:!0});i&&e.setAttribute("listType",i.getAttribute("listType"),t)}this._fireAfterExecute(i)})}_fireAfterExecute(e){this.fire("afterExecute",GE(new Set(e)))}_checkEnabled(){let e=JE(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if($E(e)&&!NE(e[0]))return!0;e=FE(e),t=e[0];const i=IE.first(t,{sameIndent:!0});return!!i&&i.getAttribute("listType")==t.getAttribute("listType")}}function JE(e){const t=Array.from(e.getSelectedBlocks()),i=t.findIndex(e=>!OE(e));return-1!=i&&(t.length=i),t}i.ListIndentCommand=KE;class QE extends gs{type;_listWalkerOptions;constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(e),this.type=t,this._listWalkerOptions=i.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document,n=qE(t),r=Array.from(i.selection.getSelectedBlocks()).filter(e=>t.schema.checkAttribute(e,"listType")||YE(e,t.schema)),o=void 0!==e.forceValue?!e.forceValue:this.value;t.change(s=>{if(o){const e=r[r.length-1],t=RE(e,{direction:"forward"}),i=[];t.length>1&&i.push(...VE(t[1],s)),i.push(...WE(r,s)),i.push(...function(e,t){const i=[];let n=Number.POSITIVE_INFINITY;for(const{node:r}of new ME(e.nextSibling)){const e=r.getAttribute("listIndent");if(0==e)break;e<n&&(n=e);const o=e-n;t.setAttribute("listIndent",o,r),i.push(r)}return i}(e,s)),this._fireAfterExecute(i)}else if((n||i.selection.isCollapsed)&&OE(r[0])){const t=BE(n||r[0],this._listWalkerOptions);for(const i of t)s.setAttributes({...e.additionalAttributes,listType:this.type},i);this._fireAfterExecute(t)}else{const i=[];for(const n of r)if(n.hasAttribute("listType"))for(const t of FE(n,{withNested:!1}))t.getAttribute("listType")!=this.type&&(s.setAttributes({...e.additionalAttributes,listType:this.type},t),i.push(t));else!n.is("element","listItem")&&YE(n,t.schema)&&s.rename(n,"listItem"),s.setAttributes({...e.additionalAttributes,listIndent:0,listItemId:DE.next(),listType:this.type},n),i.push(n);this._fireAfterExecute(i)}})}_fireAfterExecute(e){this.fire("afterExecute",GE(new Set(e)))}_getValue(){const e=this.editor.model.document.selection,t=Array.from(e.getSelectedBlocks());if(!t.length)return!1;for(const e of t)if(e.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const e=this.editor.model,t=e.schema,i=e.document.selection,n=Array.from(i.getSelectedBlocks());if(!n.length)return!1;if(this.value)return!0;for(const e of n)if(t.checkAttribute(e,"listType")||YE(e,t))return!0;return!1}}i.ListCommand=QE;class eT extends gs{_direction;constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){let{shouldMergeOnBlocksContentLevel:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document.selection,n=[];t.change(r=>{const{firstElement:o,lastElement:s}=this._getMergeSubjectElements(i,e),a=o.getAttribute("listIndent")||0,l=s.getAttribute("listIndent"),c=s.getAttribute("listItemId");if(a!=l){const e=(u=s,Array.from(new IE(u,{direction:"forward",higherIndent:!0})));n.push(...UE([s,...e],r,{indentBy:a-l,expand:a<l}))}var u;if(e){let e=i;i.isCollapsed&&(e=r.createSelection(r.createRange(r.createPositionAt(o,"end"),r.createPositionAt(s,0)))),t.deleteContent(e,{doNotResetEntireContent:i.isCollapsed});const a=e.getLastPosition().parent,l=a.nextSibling;n.push(a),l&&l!==s&&l.getAttribute("listItemId")==c&&n.push(...HE(l,a,r))}else n.push(...HE(s,o,r));this._fireAfterExecute(n)})}_fireAfterExecute(e){this.fire("afterExecute",GE(new Set(e)))}_checkEnabled(){const e=this.editor.model,t=e.document.selection,i=qE(e);if(t.isCollapsed||i){const e=i||t.getFirstPosition().parent;if(!OE(e))return!1;const n="backward"==this._direction?e.previousSibling:e.nextSibling;if(!n)return!1;if($E([e,n]))return!1}else{const e=t.getLastPosition(),i=t.getFirstPosition();if(e.parent===i.parent)return!1;if(!OE(e.parent))return!1}return!0}_getMergeSubjectElements(e,t){const i=qE(this.editor.model);let n,r;if(e.isCollapsed||i){const o=i||e.getFirstPosition().parent,s=NE(o);"backward"==this._direction?(r=o,n=s&&!t?IE.first(o,{sameIndent:!0,lowerIndent:!0}):o.previousSibling):(n=o,r=o.nextSibling)}else n=e.getFirstPosition().parent,r=e.getLastPosition().parent;return{firstElement:n,lastElement:r}}}class tT extends gs{_direction;constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(e=>{const t=VE(this._getStartBlock(),e);this._fireAfterExecute(t)})}_fireAfterExecute(e){this.fire("afterExecute",GE(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&OE(t)&&!NE(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class iT extends ps{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(e){return zE(e)}isFirstBlockOfListItem(e){return NE(e)}isListItemBlock(e){return OE(e)}expandListBlocksToCompleteItems(e){return FE(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}isNumberedListType(e){return ZE(e)}}function nT(e){return e.is("element","ol")||e.is("element","ul")}function rT(e){return e.is("element","li")}function oT(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:lT(i,t);return e.createAttributeElement(aT(i),null,{priority:2*t/100-100,id:n})}function sT(e,t,i){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:i})}function aT(e){return"numbered"==e||"customNumbered"==e?"ol":"ul"}function lT(e,t){return`list-${e}-${t}`}function cT(e,t){const i=e.nodeBefore;if(OE(i)){let e=i;for(const{node:i}of new ME(e,"backward"))if(e=i,t.has(e))return;t.set(i,e)}else{const i=e.nodeAfter;OE(i)&&t.set(i,i)}}function uT(e,t,i){let{dataPipeline:n}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=function(e){return(t,i)=>{const n=[];for(const i of e)t.hasAttribute(i)&&n.push(`attribute:${i}`);return!!n.every(e=>!1!==i.test(t,e))&&(n.forEach(e=>i.consume(t,e)),!0)}}(e);return(o,s,a)=>{const{writer:l,mapper:c,consumable:u}=a,h=s.item;if(!e.includes(s.attributeKey))return;if(!r(h,u))return;const d=function(e,t,i){const n=i.createRangeOn(e);return t.toViewRange(n).getTrimmed().end.nodeBefore}(h,c,i);dT(d,l,c),function(e,t){let i=e.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const n=i.parent;t.unwrap(t.createRangeOn(e),i),i=n}}(d,l);const f=function(e,t,i,n,r){let{dataPipeline:o}=r,s=n.createRangeOn(t);if(!NE(e))return s;for(const r of i){if("itemMarker"!=r.scope)continue;const i=r.createElement(n,e,{dataPipeline:o});if(!i)continue;if(n.setCustomProperty("listItemMarker",!0,i),r.canInjectMarkerIntoElement&&r.canInjectMarkerIntoElement(e)?n.insert(n.createPositionAt(t,0),i):(n.insert(s.start,i),s=n.createRange(n.createPositionBefore(i),n.createPositionAfter(t))),!r.createWrapperElement||!r.canWrapElement)continue;const a=r.createWrapperElement(n,e,{dataPipeline:o});n.setCustomProperty("listItemWrapper",!0,a),r.canWrapElement(e)?s=n.wrap(s,a):(s=n.wrap(n.createRangeOn(i),a),s=n.createRange(s.start,n.createPositionAfter(t)))}return s}(h,d,t,l,{dataPipeline:n});!function(e,t,i,n){if(!e.hasAttribute("listIndent"))return;const r=e.getAttribute("listIndent");let o=e;for(let e=r;e>=0;e--){const r=sT(n,e,o.getAttribute("listItemId")),s=oT(n,e,o.getAttribute("listType"));for(const e of i)"list"!=e.scope&&"item"!=e.scope||!o.hasAttribute(e.attributeName)||e.setAttributeOnDowncast(n,o.getAttribute(e.attributeName),"list"==e.scope?s:r);if(t=n.wrap(t,r),t=n.wrap(t,s),0==e)break;if(o=IE.first(o,{lowerIndent:!0}),!o)break}}(h,f,t,l)}}function hT(e){let{dataPipeline:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i,n)=>{let{writer:r}=n;if(!fT(i,e))return null;if(!t)return r.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const o=r.createContainerElement("p");return r.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function dT(e,t,i){for(;e.parent.is("attributeElement")&&e.parent.getCustomProperty("listItemWrapper");)t.unwrap(t.createRangeOn(e),e.parent);const n=[];r(t.createPositionBefore(e).getWalker({direction:"backward"})),r(t.createRangeIn(e).getWalker());for(const e of n)t.remove(e);function r(e){for(const{item:t}of e){if(t.is("element")&&i.toModelElement(t))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&n.push(t)}}}function fT(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:LE(e);if(!OE(e))return!1;for(const i of e.getAttributeKeys())if(!i.startsWith("selection:")&&!t.includes(i))return!1;return i.length<2}i.ListUtils=iT;const pT=["listType","listIndent","listItemId"];class mT extends ps{_downcastStrategies=[];static get pluginName(){return"ListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Xb,Wv,iT,Hw]}constructor(e){super(e),e.config.define("list.multiBlock",!0)}init(){const e=this.editor,t=e.model,i=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new v("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});t.schema.register("$listItem",{allowAttributes:pT}),i?(t.schema.extend("$container",{allowAttributesOf:"$listItem"}),t.schema.extend("$block",{allowAttributesOf:"$listItem"}),t.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):t.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const e of pT)t.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new QE(e,"numbered")),e.commands.add("bulletedList",new QE(e,"bulleted")),e.commands.add("customNumberedList",new QE(e,"customNumbered",{multiLevel:!0})),e.commands.add("customBulletedList",new QE(e,"customBulleted",{multiLevel:!0})),e.commands.add("indentList",new KE(e,"forward")),e.commands.add("outdentList",new KE(e,"backward")),e.commands.add("splitListItemBefore",new tT(e,"before")),e.commands.add("splitListItemAfter",new tT(e,"after")),i&&(e.commands.add("mergeListItemBackward",new eT(e,"backward")),e.commands.add("mergeListItemForward",new eT(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...pT,...this._downcastStrategies.map(e=>e.attributeName)]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),i=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",(n,r)=>{const o=e.model.document.selection;qE(e.model)||e.model.change(()=>{const s=o.getFirstPosition();if(o.isCollapsed&&"backward"==r.direction){if(!s.isAtStart)return;const i=s.parent;if(!OE(i))return;if(IE.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!t||!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:gT(e.model,"backward")})}else jE(i)||e.execute("splitListItemAfter"),e.execute("outdentList");r.preventDefault(),n.stop()}else{if(o.isCollapsed&&!o.getLastPosition().isAtEnd)return;if(!i||!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:gT(e.model,"forward")}),r.preventDefault(),n.stop()}})},{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,i=e.commands,n=i.get("enter");this.listenTo(e.editing.view.document,"enter",(i,n)=>
6{const r=t.document,o=r.selection.getFirstPosition().parent;if(r.selection.isCollapsed&&OE(o)&&o.isEmpty&&!n.isSoft){const t=NE(o),r=jE(o);t&&r?(e.execute("outdentList"),n.preventDefault(),i.stop()):t&&!r?(e.execute("splitListItemAfter"),n.preventDefault(),i.stop()):r&&(e.execute("splitListItemBefore"),n.preventDefault(),i.stop())}},{context:"li"}),this.listenTo(n,"afterExecute",()=>{const t=i.get("splitListItemBefore");t.refresh(),t.isEnabled&&2===LE(e.model.document.selection.getLastPosition().parent).length&&t.execute()})}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",(t,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),i.stopPropagation(),i.preventDefault(),t.stop())},{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,i=this.getListAttributeNames(),n=e.config.get("list.multiBlock"),r=n?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(e,t)=>{let{writer:i}=t;return i.createElement(r,{listType:""})}}).elementToElement({view:"p",model:(e,t)=>{let{writer:i}=t;return e.parent&&e.parent.is("element","li")?i.createElement(r,{listType:""}):null},converterPriority:"high"}).add(e=>{e.on("element:li",(e,t,i)=>{const{writer:n,schema:r}=i;if(!t.modelRange)return;const o=Array.from(t.modelRange.getItems({shallow:!0})).filter(e=>r.checkAttribute(e,"listItemId"));if(!o.length)return;const s=DE.next(),a=function(e){let t=0,i=e.parent;for(;i;){if(rT(i))t++;else{const e=i.previousSibling;e&&rT(e)&&t++}i=i.parent}return t}(t.viewItem);let l=t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted";const c=o[0].getAttribute("listType");c&&(l=c);const u={listItemId:s,listIndent:a,listType:l};for(const e of o)e.hasAttribute("listItemId")||n.setAttributes(u,e);o.length>1&&o[1].getAttribute("listItemId")!=u.listItemId&&i.keepEmptyElement(o[
60])})}),n||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:r,view:hT(i),converterPriority:"high"}).add(e=>{var n;e.on("attribute",uT(i,this._downcastStrategies,t)),e.on("remove",(n=t.schema,(e,t,i)=>{const{writer:r,mapper:o}=i,s=e.name.split(":")[1];if(!n.checkAttribute(s,"listItemId"))return;const a=o.toViewPosition(t.position),l=t.position.getShiftedBy(t.length),c=o.toViewPosition(l,{isPhantom:!0}),u=r.createRange(a,c).getTrimmed().end.nodeBefore;u&&dT(u,r,o)}))}),e.conversion.for("dataDowncast").elementToElement({model:r,view:hT(i,{dataPipeline:!0}),converterPriority:"high"}).add(e=>{e.on("attribute",uT(i,this._downcastStrategies,t,{dataPipeline:!0}))});const o=(s=this._downcastStrategies,a=e.editing.view,(e,t)=>{if(t.modelPosition.offset>0)return;const i=t.modelPosition.parent;if(!OE(i))return;if(!s.some(e=>"itemMarker"==e.scope&&e.canInjectMarkerIntoElement&&e.canInjectMarkerIntoElement(i)))return;const n=t.mapper.toViewElement(i),r=a.createRangeIn(n),o=r.getWalker();let l=r.start;for(const{item:e}of o){if(e.is("element")&&t.mapper.toModelElement(e)||e.is("$textProxy"))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&(l=a.createPositionAfter(e),o.skip(e=>{let{previousPosition:t}=e;return!t.isEqual(l)}))}t.viewPosition=l});var s,a;e.editing.mapper.on("modelToViewPosition",o),e.data.mapper.on("modelToViewPosition",o),this.listenTo(t.document,"change:data",function(e,t,i,n){return()=>{const n=e.document.differ.getChanges(),s=[],a=new Map,l=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name)cT(e.position,a),e.attributes.has("listItemId")?l.add(e.position.nodeAfter):cT(e.position.getShiftedBy(e.length),a);else if("remove"==e.type&&e.attributes.has("listItemId"))cT(e.position,a);else if("attribute"==e.type){const t=e.range.start.nodeAfter;i.includes(e.attributeKey)?(cT(e.range.start,a),null===e.attributeNewValue?(cT(e.range.start.getShiftedBy(1),a),o(t)&&s.push(t)):l.add(t)):OE(t)&&o(t)&&s.push(t)}for(const e of a.values())s.push(...r(e,l));for(const e of new Set(s))t.reconvertItem(e)};function r(e,t){const n=[],r=new Set,a=[];for(const{node:l,previous:c}of new ME(e)){if(r.has(l))continue;const e=l.getAttribute("listIndent");c&&e<c.getAttribute("listIndent")&&(a.length=e+1),a[e]=Object.fromEntries(Array.from(l.getAttributes()).filter(e=>{let[t]=e;return i.includes(t)}));const u=RE(l,{direction:"forward"});for(const e of u)r.add(e),(o(e,u)||s(e,a,t))&&n.push(e)}return n}function o(e,r){const o=t.mapper.toViewElement(e);if(!o)return!1;if(n.fire("checkElement",{modelElement:e,viewElement:o}))return!0;if(!e.is("element","paragraph")&&!e.is("element","listItem"))return!1;const s=fT(e,i,r);return!(!s||!o.is("element","p"))||!(s||!o.is("element","span"))}function s(e,i,r){if(r.has(e))return!1;const o=t.mapper.toViewElement(e);let s=i.length-1;for(let e=o.parent;!e.is("editableElement");e=e.parent){const t=rT(e),r=nT(e);if(!r&&!t)continue;const o="checkAttributes:"+(t?"item":"list");if(n.fire(o,{viewElement:e,modelAttributes:i[s]}))break;if(r&&(s--,s<0))return!1}return!0}}(t,e.editing,i,this),{priority:"high"}),this.on("checkAttributes:item",(e,t)=>{let{viewElement:i,modelAttributes:n}=t;i.id!=n.listItemId&&(e.return=!0,e.stop())}),this.on("checkAttributes:list",(e,t)=>{let{viewElement:i,modelAttributes:n}=t;i.name==aT(n.listType)&&i.id==lT(n.listType,n.listIndent)||(e.return=!0,e.stop())})}_setupModelPostFixing(){const e=this.editor.model,t=this.getListAttributeNames();e.document.registerPostFixer(i=>function(e,t,i,n){const r=e.document.differ.getChanges(),o=new Map,s=n.editor.config.get("list.multiBlock");let a=!1;for(const n of r){if("insert"==n.type&&"$text"!=n.name){const r=n.position.nodeAfter;if(!e.schema.checkAttribute(r,"listItemId"))for(const e of Array.from(r.getAttributeKeys()))i.includes(e)&&(t.removeAttribute(e,r),a=!0);cT(n.position,o),n.attributes.has("listItemId")||cT(n.position.getShiftedBy(n.length),o);for(const{item:t,previousPosition:i}of e.createRangeIn(r))OE(t)&&cT(i,o)}else"remove"==n.type?cT(n.position,o):"attribute"==n.type&&i.includes(n.attributeKey)&&
6(cT(n.range.start,o),null===n.attributeNewValue&&cT(n.range.start.getShiftedBy(1),o));if(!s&&"attribute"==n.type&&pT.includes(n.attributeKey)){const e=n.range.start.nodeAfter;null===n.attributeNewValue&&e&&e.is("element","listItem")?(t.rename(e,"paragraph"),a=!0):null===n.attributeOldValue&&e&&e.is("element")&&"listItem"!=e.name&&(t.rename(e,"listItem"),a=!0)}}const l=new Set;for(const e of o.values())a=n.fire("postFixer",{listNodes:new PE(e),listHead:e,writer:t,seenIds:l})||a;return a}(e,i,t,this)),this.on("postFixer",(e,t)=>{let{listNodes:i,writer:n}=t;e.return=function(e,t){let i=0,n=-1,r=null,o=!1;for(const{node:s}of e){const e=s.getAttribute("listIndent");if(e>i){let a;null===r?(r=e-i,a=i):(r>e&&(r=e),a=e-r),a>n+1&&(a=n+1),t.setAttribute("listIndent",a,s),o=!0,n=a}else r=null,i=e+1,n=e}return o}(i,n)||e.return},{priority:"high"}),this.on("postFixer",(e,t)=>{let{listNodes:i,writer:n,seenIds:r}=t;e.return=function(e,t,i){const n=new Set;let r=!1;for(const{node:o}of e){if(n.has(o))continue;let e=o.getAttribute("listType"),s=o.getAttribute("listItemId");if(t.has(s)&&(s=DE.next()),t.add(s),o.is("element","listItem"))o.getAttribute("listItemId")!=s&&(i.setAttribute("listItemId",s,o),r=!0);else for(const t of RE(o,{direction:"forward"}))n.add(t),t.getAttribute("listType")!=e&&(s=DE.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=s&&(i.setAttribute("listItemId",s,t),r=!0)}return r}(i,r,n)||e.return},{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",function(e){return(t,i)=>{let[n,r]=i;const o=n.is("documentFragment")?Array.from(n.getChildren()):[n];if(!o.length)return;const s=(r?e.createSelection(r):e.document.selection).getFirstPosition();let a;if(OE(s.parent))a=s.parent;else{if(!OE(s.nodeBefore)||!OE(s.nodeAfter))return;a=s.nodeBefore}e.change(e=>{const t=a.getAttribute("listType"),i=a.getAttribute("listIndent"),n=o[0].getAttribute("listIndent")||0,r=Math.max(i-n,0);for(const i of o){const n=OE(i);a.is("element","listItem")&&i.is("element","paragraph")&&e.rename(i,"listItem"),e.setAttributes({listIndent:(n?i.getAttribute("listIndent"):0)+r,listItemId:n?i.getAttribute("listItemId"):DE.next(),listType:t},i)}})}}(e),{priority:"high"}),this.listenTo(t,"outputTransformation",(t,i)=>{e.change(e=>{const t=Array.from(i.content.getChildren()),n=t[t.length-1];if(t.length>1&&n.is("element")&&n.isEmpty&&t.slice(0,-1).every(OE)&&e.remove(n),"copy"==i.method||"cut"==i.method){const t=Array.from(i.content.getChildren());$E(t)&&WE(t,e)}})})}_setupAccessibilityIntegration(){const e=this.editor,t=e.t;e.accessibility.addKeystrokeInfoGroup({id:"list",label:t("Keystrokes that can be used in a list"),keystrokes:[{label:t("Increase list item indent"),keystroke:"Tab"},{label:t("Decrease list item indent"),keystroke:"Shift+Tab"}]})}}function gT(e,t){const i=e.document.selection;if(!i.isCollapsed)return!qE(e);if("forward"===t)return!0;const n=i.getFirstPosition().parent,r=n.previousSibling;return!e.schema.isObject(r)&&(!!r.isEmpty||$E([n,r]))}function vT(e,t,i,n){e.ui.componentFactory.add(t,()=>{const r=bT(Ff,e,t,i,n);return r.set({tooltip:!0,isToggleable:!0}),r}),e.ui.componentFactory.add(`menuBar:${t}`,()=>{const r=bT(ep,e,t,i,n);return r.set({role:"menuitemcheckbox",isToggleable:!0}),r})}function bT(e,t,i,n,r){const o=t.commands.get(i),s=new e(t.locale);return s.set({label:n,icon:r}),s.bind("isOn","isEnabled").to(o,"value","isEnabled"),s.on("execute",()=>{t.execute(i),t.editing.view.focus()}),s}i.ListEditing=mT;class yT extends ps{static get pluginName(){return"ListUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||vT(this.editor,"numberedList",e("Numbered List"),Yd.numberedList),this.editor.ui.componentFactory.has("bulletedList")||vT(this.editor,"bulletedList",e("Bulleted List"),Yd.bulletedList)}}i.ListUI=yT;class wT extends ps{static get requires(){return[mT,yT]}static get pluginName(){return"List"}static get isOfficialPlugin(){return!0}}i.List=wT;class _T extends gs{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}
6execute(){let{startIndex:e=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document;let n=Array.from(i.selection.getSelectedBlocks()).filter(e=>OE(e)&&ZE(e.getAttribute("listType")));n=zE(n),t.change(t=>{for(const i of n)t.setAttribute("listStart",e>=0?e:1,i)})}_getValue(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());return e&&OE(e)&&ZE(e.getAttribute("listType"))?e.getAttribute("listStart"):null}}const kT={},xT={},CT={},ST=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:i}of ST)kT[e]=i,xT[e]=t,t&&(CT[t]=e);function ET(){return ST.map(e=>e.listStyle)}function TT(e){return kT[e]||null}function AT(e){return CT[e]||null}function IT(e){return xT[e]||null}class MT extends gs{defaultType;_supportedTypes;constructor(e,t,i){super(e),this.defaultType=t,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document;t.change(t=>{this._tryToConvertItemsToList(e);let n=Array.from(i.selection.getSelectedBlocks()).filter(e=>e.hasAttribute("listType"));if(n.length){n=zE(n);for(const i of n)t.setAttribute("listStyle",e.type||this.defaultType,i)}})}isStyleTypeSupported(e){return!this._supportedTypes||this._supportedTypes.includes(e)}_getValue(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());return OE(e)?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=TT(e.type);if(!t)return;const i=this.editor,n=`${t}List`;i.commands.get(n).value||i.execute(n)}}class PT extends gs{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document;let n=Array.from(i.selection.getSelectedBlocks()).filter(e=>OE(e)&&"numbered"==e.getAttribute("listType"));n=zE(n),t.change(t=>{for(const i of n)t.setAttribute("listReversed",!!e.reversed,i)})}_getValue(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());return OE(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}function DT(e){return(t,i,n)=>{const{writer:r,schema:o,consumable:s}=n;if(!1===s.test(i.viewItem,e.viewConsumables))return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));let a=!1;for(const t of i.modelRange.getItems({shallow:!0}))o.checkAttribute(t,e.attributeName)&&e.appliesToListItem(t)&&(t.hasAttribute(e.attributeName)||(r.setAttribute(e.attributeName,e.getAttributeOnUpcast(i.viewItem),t),a=!0));a&&s.consume(i.viewItem,e.viewConsumables)}}class OT extends ps{static get pluginName(){return"ListPropertiesUtils"}static get isOfficialPlugin(){return!0}getAllSupportedStyleTypes(){return ET()}getListTypeFromListStyleType(e){return TT(e)}getListStyleTypeFromTypeAttribute(e){return AT(e)}getTypeAttributeFromListStyleType(e){return IT(e)}}function LT(e){const{startIndex:t,reversed:i,styles:n}=e;return{styles:RT(n),startIndex:t||!1,reversed:i||!1}}function RT(e){const t={listTypes:["bulleted","numbered"],useAttribute:!1};return!0===e||(e?Array.isArray(e)||"string"==typeof e?t.listTypes=Uo(e):(t.listTypes=e.listTypes?Uo(e.listTypes):t.listTypes,t.useAttribute=!!e.useAttribute):t.listTypes=[]),t}i.ListPropertiesUtils=OT;const BT="default";class NT extends ps{static get requires(){return[mT,OT]}static get pluginName(){return"ListPropertiesEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("list.properties",{styles:!0,startIndex:!1,reversed:!1})}init(){const e=this.editor,t=e.model,i=e.plugins.get(mT),n=function(e){const t=[],i=LT(e);if(e.styles){const e=i.styles.useAttribute;t.push({attributeName:"listStyle",defaultValue:BT,viewConsumables:{styles:"list-style-type"},addCommand(t){let i=ET();e&&(i=i.filter(e=>!!IT(e))),t.commands.add("listStyle",new MT(t,BT,i))},appliesToListItem:e=>"numbered"==e.getAttribute("listType")||"bulleted"==e.getAttribute("listType"),hasValidAttribute(e){if(!this.appliesToListItem(e))return!e.hasAttribute("listStyle");if(!e.hasAttribute("listStyle"))return!1;const t=e.getAttribute("listStyle");return t==BT||TT(t)==e.getAttribute("listType")},setAttributeOnDowncast(t,i,n){if(i&&i!==BT){if(!e)return void t.setStyle("list-style-type",i,n);{const e=IT(i);if(e)return void t.setAttribute("type",e,n)}}t.removeStyle("list-style-type",n),t.removeAttribute("type",n)},getAttributeOnUpcast(e){const t=e.getStyle("list-style-type");if(t)return t;const i=e.getAttribute("type");return i?AT(i):BT}})}return e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(e){e.commands.add("listReversed",new PT(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listReversed")},setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(e){e.commands.add("listStart",new _T(e))},appliesToListItem:e=>ZE(e.getAttribute("listType")),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listStart")},setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));for(const r of n)r.addCommand(e),t.schema.extend("$listItem",{allowAttributes:r.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:r.attributeName,setAttributeOnDowncast(e,t,i){r.setAttributeOnDowncast(e,t,i)}});e.conversion.for("upcast").add(e=>{for(const t of n)e.on("element:ol",DT(t)),e.on("element:ul",DT(t))}),i.on("checkAttributes:list",(e,t)=>{let{viewElement:i,modelAttributes:r}=t;for(const t of n)t.getAttributeOnUpcast(i)!=r[t.attributeName]&&(e.return=!0,e.stop())}),this.listenTo(e.commands.get("indentList"),"afterExecute",(e,i)=>{t.change(e=>{for(const t of i)for(const i of n)i.appliesToListItem(t)&&e.setAttribute(i.attributeName,i.defaultValue,t)})}),i.on("postFixer",(e,t)=>{let{listNodes:i,writer:r}=t;for(const{node:t}of i)for(const i of n)i.hasValidAttribute(t)||(i.appliesToListItem(t)?r.setAttribute(i.attributeName,i.defaultValue,t):r.removeAttribute(i.attributeName,t),e.return=!0)}),i.on("postFixer",(e,t)=>{let{listNodes:i,writer:r}=t;for(const{node:t,previousNodeInList:o}of i)if(o&&o.getAttribute("listType")==t.getAttribute("listType"))for(const i of n){const{attributeName:n}=i;if(!i.appliesToListItem(t))continue;const s=o.getAttribute(n);t.getAttribute(n)!=s&&(r.setAttribute(n,s,t),e.return=!0)}})}}i.ListPropertiesEditing=NT;class jT extends Df{children;stylesView=null;additionalPropertiesCollapsibleView=null;startIndexFieldView=null;reversedSwitchButtonView=null;focusTracker=new Yo;keystrokes=new Jo;focusables=new uf;focusCycler;constructor(e,t){let{enabledProperties:i,styleButtonViews:n,styleGridAri
vendor: 5,954 bytes, line 6
6aLabel:r}=t;super(e);const o=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new Hf({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),n&&n.length?(this.stylesView=this._createStylesView(n,r),this.children.add(this.stylesView)):o.push("ck-list-properties_without-styles"),(i.startIndex||i.reversed)&&(this._addNumberedListPropertyViews(i),o.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:o},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const e of this.stylesView.children)this.stylesView.focusTracker.add(e.element);Bf({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>r.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(e,t){const i=new Df(this.locale);return i.children=i.createCollection(),i.children.addMany(e),i.setTemplate({tag:"div",attributes:{"aria-label":t,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new Yo,i.keystrokes=new Jo,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(e){const t=this.locale.t,i=[];e.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),e.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),this.stylesView?(this.additionalPropertiesCollapsibleView=new fp(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:t("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",(e,t,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)}),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const e=this.locale.t,t=new Bp(this.locale,Im);return t.set({label:e("Start at"),class:"ck-numbered-list-properties__start-index"}),t.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),t.fieldView.on("input",()=>{const i=t.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)?t.errorText=e("Invalid start index value."):i.checkValidity()?this.fire("listStart",{startIndex:n}):t.errorText=e("Start index must be greater than 0.")}),t}_createReversedSwitchButton(){const e=this.locale.t,t=new ap(this.locale);return t.set({withText:!0,label:e("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),t.delegate("execute").to(this,"listReversed"),t}}class FT extends ps{static get pluginName(){return"ListPropertiesUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,i=e.config.get("list.properties"),n=LT(i),r=n.styles.listTypes;if(r.includes("bulleted")){const i=[{label:t("Toggle the disc list style"),tooltip:t("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:t("Toggle the circle list style"),tooltip:t("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:t("Toggle the square list style"),tooltip:t("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}],r=t("Bulleted List"),o=t("Bulleted list styles toolbar"),s="bulletedList";e.ui.componentFactory.add(s,zT({editor:e,normalizedConfig:n,parentCommandName:s,buttonLabel:r,buttonIcon:Yd.bulletedList,styleGridAri
6aLabel:o,styleDefinitions:i})),e.ui.componentFactory.add(`menuBar:${s}`,HT({editor:e,normalizedConfig:n,parentCommandName:s,buttonLabel:r,styleGridAriaLabel:o,styleDefinitions:i}))}if(r.includes("numbered")||i.startIndex||i.reversed){const i=[{label:t("Toggle the decimal list style"),tooltip:t("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.
616.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:t("Toggle the decimal with leading zero list style"),tooltip:t("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the lowerâroman list style"),tooltip:t("Lowerâroman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the upperâroman list style"),tooltip:t("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25
6h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the lowerâlatin list style"),tooltip:t("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the upperâlatin list style"),tooltip:t("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}],o=t("Numbered List"),s=t("Numbered list styles toolbar"),a="numberedList";e.ui.componentFactory.add(a,zT({editor:e,normalizedConfig:n,parentCommandName:a,buttonLabel:o,buttonIcon:Yd.numberedList,styleGridAri
6aLabel:s,styleDefinitions:i})),r.includes("numbered")&&e.ui.componentFactory.add(`menuBar:${a}`,HT({editor:e,normalizedConfig:n,parentCommandName:a,buttonLabel:o,styleGridAriaLabel:s,styleDefinitions:i}))}}}function zT(e){let{editor:t,normalizedConfig:i,parentCommandName:n,buttonLabel:r,buttonIcon:o,styleGridAriaLabel:s,styleDefinitions:a}=e;const l=t.commands.get(n);return e=>{const c=ym(e,bm),u=c.buttonView;return c.bind("isEnabled").to(l),c.class="ck-list-styles-dropdown",u.on("execute",()=>{t.execute(n),t.editing.view.focus()}),u.set({label:r,icon:o,tooltip:!0,isToggleable:!0}),u.bind("isOn").to(l,"value",e=>!!e),c.once("change:isOpen",()=>{const e=function(e){let{editor:t,normalizedConfig:i,dropdownView:n,parentCommandName:r,styleDefinitions:o,styleGridAriaLabel:s}=e;const a=t.locale,l={...i,..."numberedList"!=r?{startIndex:!1,reversed:!1}:null},c=r.replace("List","");let u=null;if(i.styles.listTypes.includes(c)){const e=t.commands.get("listStyle"),i=VT({editor:t,parentCommandName:r,listStyleCommand:e}),n=UT(e);u=o.filter(n).map(i)}const h=new jT(a,{styleGridAriaLabel:s,enabledProperties:l,styleButtonViews:u});if(i.styles.listTypes.includes(c)&&Sm(n,()=>h.stylesView.children.find(e=>e.isOn)),l.startIndex){const e=t.commands.get("listStart");h.startIndexFieldView.bind("isEnabled").to(e),h.startIndexFieldView.fieldView.bind("value").to(e),h.on("listStart",(e,i)=>t.execute("listStart",i))}if(l.reversed){const e=t.commands.get("listReversed");h.reversedSwitchButtonView.bind("isEnabled").to(e),h.reversedSwitchButtonView.bind("isOn").to(e,"value",e=>!!e),h.on("listReversed",()=>{const i=e.value;t.execute("listReversed",{reversed:!i})})}return h.delegate("execute").to(n),h}({editor:t,normalizedConfig:i,dropdownView:c,parentCommandName:n,styleGridAriaLabel:s,styleDefinitions:a});c.panelView.children.add(e)}),c.on("execute",()=>{t.editing.view.focus()}),c}}function VT(e){let{editor:t,listStyleCommand:i,parentCommandName:n}=e;const r=t.locale,o=t.commands.get(n);return e=>{let{label:s,type:a,icon:l,tooltip:c}=e;const u=new Ff(r);return u.set({label:s,icon:l,tooltip:c}),i.on("change:value",()=>{u.isOn=i.value===a}),u.on("execute",()=>{o.value?i.value===a?t.execute(n):i.value!==a&&t.execute("listStyle",{type:a}):t.model.change(()=>{t.execute("listStyle",{type:a})})}),u}}function HT(e){let{editor:t,normalizedConfig:i,parentCommandName:n,buttonLabel:r,styleGridAriaLabel:o,styleDefinitions:s}=e;return e=>{const a=new wv(e),l=t.commands.get(n),c=t.commands.get("listStyle"),u=UT(c),h=VT({editor:t,parentCommandName:n,listStyleCommand:c}),d=s.filter(u).map(h),f=new jT(e,{styleGridAriaLabel:o,enabledProperties:{...i,startIndex:!1,reversed:!1},styleButtonViews:d});return f.delegate("execute").to(a),a.buttonView.set({label:r,icon:Yd[n]}),a.panelView.children.add(f),a.bind("isEnabled").to(l,"isEnabled"),a.on("execute",()=>{t.editing.view.focus()}),a}}function UT(e){return"function"==typeof e.isStyleTypeSupported?t=>e.isStyleTypeSupported(t.type):()=>!0}i.ListPropertiesUI=FT;class WT extends ps{static get requires(){return[NT,FT]}static get pluginName(){return"ListProperties"}static get isOfficialPlugin(){return!0}}i.ListProperties=WT;class $T extends gs{constructor(e){super(e),this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){const e=this._getSelectedItems();this.value=this._getValue(e),this.isEnabled=!!e.length}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.editor.model.change(t=>{const i=this._getSelectedItems(),n=void 0===e.forceValue?!this._getValue(i):e.forceValue;for(const e of i)n?t.setAttribute("todoListChecked",!0,e):t.removeAttribute("todoListChecked",e)})}_getValue(e){return e.every(e=>e.getAttribute("todoListChecked"))}_getSelectedItems(){const e=this.editor.model,t=e.schema,i=e.document.selection.getFirstRange(),n=i.start.parent,r=[];t.checkAttribute(n,"todoListChecked")&&r.push(...LE(n));for(const e of i.getItems({shallow:!0}))t.checkAttribute(e,"todoListChecked")&&!r.includes(e)&&r.push(...LE(e));return r}}class GT extends el{domEventType=["change"];onDomEvent(e){if(e.target){const t=this.view.domConverter.mapDomToView(e.target);t&&t.is("element","input")&&"checkbox"==t.getAttribute("type")&&t.findAnce
6stor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",e)}}}const qT=Bo("Ctrl+Enter");class YT extends ps{static get pluginName(){return"TodoListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[mT]}init(){const e=this.editor,t=e.model,i=e.editing,n=e.plugins.get(mT),r=e.config.get("list.multiBlock")?"paragraph":"listItem";e.commands.add("todoList",new QE(e,"todo")),e.commands.add("checkTodoList",new $T(e)),i.view.addObserver(GT),t.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),t.schema.addAttributeCheck(e=>{const t=e.last;if(!t.getAttribute("listItemId")||"todo"!=t.getAttribute("listType"))return!1},"todoListChecked"),e.conversion.for("upcast").add(e=>{e.on("element:input",(e,t,i)=>{const n=t.modelCursor,r=n.parent,o=t.viewItem;if(!i.consumable.test(o,{name:!0}))return;if("checkbox"!=o.getAttribute("type")||!n.isAtStart||!r.hasAttribute("listType"))return;i.consumable.consume(o,{name:!0});const s=i.writer;s.setAttribute("listType","todo",r),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,r),t.modelRange=s.createRange(n)}),e.on("element:li",(e,t,i)=>{const{writer:n,schema:r}=i;if(!t.modelRange)return;const o=Array.from(t.modelRange.getItems({shallow:!0})).filter(e=>"todo"===e.getAttribute("listType")&&r.checkAttribute(e,"listItemId")).reduce((e,t)=>{const i=t.getAttribute("listItemId");return e.has(i)||e.set(i,LE(t)),e},new Map);for(const[,e]of o.entries())if(e.some(e=>e.getAttribute("todoListChecked")))for(const t of e)n.setAttribute("todoListChecked",!0,t)},{priority:"low"}),e.on("element:label",ZT({name:"label",classes:"todo-list__label"})),e.on("element:label",ZT({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),e.on("element:span",ZT({name:"span",classes:"todo-list__label__description"})),e.on("element:ul",function(){const e=new Rs({name:"ul",classes:"todo-list"});return(t,i,n)=>{const r=e.match(i.viewItem);if(!r)return;const o=r.match;o.name=!1,n.consumable.consume(i.viewItem,o)}}())}),e.conversion.for("downcast").elementToElement({model:r,view:(e,t)=>{let{writer:i}=t;if(XT(e,n.getListAttributeNames()))return i.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),n.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(e,t,i){"todo"==t?e.addClass("todo-list",i):e.removeClass("todo-list",i)}}),n.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(e,t,i){let{dataPipeline:n}=i;if("todo"!=t.getAttribute("listType"))return null;const r=e.createUIElement("input",{type:"checkbox",...t.getAttribute("todoListChecked")?{checked:"checked"}:null,...n?{disabled:"disabled"}:{tabindex:"-1"}});if(n)return r;const o=e.createContainerElement("span",{contenteditable:"false"},r);return o.getFillerOffset=()=>null,o},canWrapElement:e=>XT(e,n.getListAttributeNames()),createWrapperElement(e,t,i){let{dataPipeline:r}=i;const o=["todo-list__label"];return XT(t,n.getListAttributeNames())||o.push("todo-list__label_without-description"),e.createAttributeElement(r?"label":"span",{class:o.join(" ")})}}),n.on("checkElement",(e,t)=>{let{modelElement:i,viewElement:r}=t;const o=XT(i,n.getListAttributeNames());r.hasClass("todo-list__label__description")!=o&&(e.return=!0,e.stop())}),n.on("checkElement",(t,i)=>{let{modelElement:n,viewElement:r}=i;const o="todo"==n.getAttribute("listType")&&NE(n);let s=!1;const a=e.editing.view.createPositionBefore(r).getWalker({direction:"backward"});for(const{item:t}of a){if(t.is("element")&&e.editing.mapper.toModelElement(t))break;t.is("element","input")&&"checkbox"==t.getAttribute("type")&&(s=!0)}s!=o&&(t.return=!0,t.stop())}),n.on("postFixer",(e,t)=>{let{listNodes:i,writer:n}=t;for(const{node:t,previousNodeInList:r}of i){if(!r)continue;if(r.getAttribute("listItemId")!=t.getAttribute("listItemId"))continue;const i=r.hasAttribute("todoListChecked"),o=t.hasAttribute("todoListChecked");o&&!i?(n.removeAttribute("todoListChecked",t),e.return=!0):!o&&i&&(n.setAttribute("todoListChecked",!0,t),e.return=!0)}}),t.document.registerPostFixer(e=>{const i=t.document.differ.getChanges();let n=!1;for(const t of i)if("attribute"==t.type&&"listType"==t.attributeKey){const i=t.range.start.nodeAfter;"todo"==t.attributeOldValue&&i.hasAttribute("todoListChecked")&&(e.removeAttribute("todoListChecked",i),n=!0)}else if("insert"==t.type&&"$text"!=t.name)for(const{item:i}of e.createRangeOn(t.position.nodeAfter))i.is("element")&&"todo"!=i.getAttribute("listType")&&i.hasAttribute("todoListChecked")&&(e.removeAttribute("todoListChecked",i),n=!0);return n}),this.listenTo(i.view.document,"keydown",(t,i)=>{Ro(i)===qT&&(e.execute("checkTodoList"),t.stop())},{priority:"high"}),this.listenTo(i.view.document,"todoCheckboxChange",(e,t)=>{const n=t.target;if(!n||!n.is("element","input"))return;const r=i.view.createPositionAfter(n),o=i.mapper.toModelPosition(r).parent;o&&OE(o)&&"todo"==o.getAttribute("listType")&&this._handleCheckmarkChange(o)}),this.listenTo(i.view.document,"arrowKey",function(e,t){return(i,n)=>{const r=Fo(n.keyCode,t.contentLanguageDirection),o=e.schema,s=e.document.selection;if(!s.isCollapsed)return;const a=s.getFirstPosition(),l=a.parent;if("right"==r&&a.isAtEnd){const t=o.getNearestSelectionRange(e.createPositionAfter(l),"forward");if(!t)return;const r=t.start.parent;r&&OE(r)&&"todo"==r.getAttribute("listType")&&(e.change(e=>e.setSelection(t)),n.preventDefault(),n.stopPropagation(),i.stop())}else if("left"==r&&a.isAtStart&&OE(l)&&"todo"==l.getAttribute("listType")){const t=o.getNearestSelectionRange(e.createPositionBefore(l),"backward");if(!t)return;e.change(e=>e.setSelection(t)),n.preventDefault(),n.stopPropagation(),i.stop()}}}(t,e.locale),{context:"$text"}),this.listenTo(i.mapper,"viewToModelPosition",(e,i)=>{const n=i.viewPosition.parent,r=n.is("attributeElement","li")&&0==i.viewPosition.offset,o=KT(n)&&i.viewPosition.offset<=1,s=n.is("element","span")&&"false"==n.getAttribute("contenteditable")&&KT(n.parent);if(!r&&!o&&!s)return;const a=i.modelPosition.nodeAfter;a&&"todo"==a.getAttribute("listType")&&(i.modelPosition=t.createPositionAt(a,0))},{priority:"low"}),this._initAriaAnnouncements()}_handleCheckmarkChange(e){const t=this.editor,i=t.model,n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(e,"end"),t.execute("checkTodoList"),i.setSelection(n)})}_initAriaAnnouncements(){const{model:e,ui:t,t:i}=this.editor;let n=null;t&&e.document.selection.on("change:range",()=>{const r=e.document.selection.focus.parent,o=JT(n),s=JT(r);o&&!s?t.ariaLiveAnnouncer.announce(i("Leaving a to-do list")):!o&&s&&t.ariaLiveAnnouncer.announce(i("Entering a to-do list")),n=r})}}function ZT(e){const t=new Rs(e);return(e,i,n)=>{const r=t.match(i.viewItem);r&&n.consumable.consume(i.viewItem,r.match)&&Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor))}}function XT(e,t){return(e.is("element","paragraph")||e.is("element","listItem"))&&"todo"==e.getAttribute("listType")&&NE(e)&&function(e,t){for(const i of e.getAttributeKeys())if(!i.startsWith("selection:")&&!t.includes(i))return!1;return!0}(e,t)}function KT(e){return!!e&&e.is("attributeElement")&&e.hasClass("todo-list__label")}function JT(e){return!(!e||!e.is("element","paragraph")&&!e.is("element","listItem")||"todo"!=e.getAttribute("listType"))}i.TodoListEditing=YT;class QT extends ps{static get pluginName(){return"TodoListUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.t;vT(this.editor,"todoList",e("To-do List"),Yd.todoList)}}i.TodoListUI=QT;class eA extends ps{static get requires(){return[YT,QT]}static get pluginName(){return"TodoList"}static get isOfficialPlugin(){return!0}}i.TodoList=eA;class tA extends gs{type;constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document,n=Array.from(i.selection.getSelectedBlocks()).filter(e=>
vendor: 15,577 bytes, line 6
6nA(e,t.schema)),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change(e=>{if(r){let t=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,r=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e<i&&(i=e);const n=e-i;r.push({element:t,listIndent:n}),t=t.nextSibling}r=r.reverse();for(const t of r)e.setAttribute("listIndent",t.listIndent,t.element)}if(!r){let e=Number.POSITIVE_INFINITY;for(const t of n)t.is("element","listItem")&&t.getAttribute("listIndent")<e&&(e=t.getAttribute("listIndent"));e=0===e?1:e,iA(n,!0,e),iA(n,!1,e)}for(const t of n.reverse())r&&"listItem"==t.name?e.rename(t,"paragraph"):r||"listItem"==t.name?r||"listItem"!=t.name||t.getAttribute("listType")==this.type||e.setAttribute("listType",this.type,t):(e.setAttributes({listType:this.type,listIndent:0},t),e.rename(t,"listItem"));this.fire("_executeCleanup",n)})}_getValue(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());return!!e&&e.is("element","listItem")&&e.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=qo(e.getSelectedBlocks());return!!i&&nA(i,t)}}function iA(e,t,i){const n=t?e[0]:e[e.length-1];if(n.is("element","listItem")){let r=n[t?"previousSibling":"nextSibling"],o=n.getAttribute("listIndent");for(;r&&r.is("element","listItem")&&r.getAttribute("listIndent")>=i;)o>r.getAttribute("listIndent")&&(o=r.getAttribute("listIndent")),r.getAttribute("listIndent")==o&&e[t?"unshift":"push"](r),r=r[t?"previousSibling":"nextSibling"]}}function nA(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class rA extends gs{_indentBy;constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let i=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=i[i.length-1];let n=t.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>t.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const t of i){const i=t.getAttribute("listIndent")+this._indentBy;i<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",i,t)}this.fire("_executeCleanup",i)})}_checkEnabled(){const e=qo(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),i=e.getAttribute("listType");let n=e.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=t;){if(n.getAttribute("listIndent")==t)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function oA(e,t){const i=t.mapper,n=t.writer,r="numbered"==e.getAttribute("listType")?"ol":"ul",o=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=gA,t}(n),s=n.createContainerElement(r,null);return n.insert(n.createPositionAt(s,0),o),i.bindElements(e,o),o}function sA(e,t,i,n){const r=t.parent,o=i.mapper,s=i.writer;let a=o.toViewPosition(n.createPositionBefore(e));const l=cA(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=o.toViewElement(l);a=s.breakContainer(s.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=o.toViewPosition(n.createPositionAt(c,"end"));const e=o.findMappedViewAncestor(a),t=uA(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=o.toViewPosition(n.createPositionBefore(e));if(a=lA(a),s.insert(a,r),c&&"listItem"==c.name){const e=o.toViewElement(c),i=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of i)if(e.item.is("element","li")){const n=s.breakContainer(s.createPositionBefore(e.item)),r=e.item.parent,o=s.createPositionAt(t,"end");aA(s,o.nodeBefore,o.nodeAfter),s.move(s.createRangeOn(r),o),i._position=n}}else{const i=r.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const t of i.getChildren()){const i=o.toModelElement(t);if(!(i&&i.getAttribute("listIndent")>e.getAttribute("listIndent")))break;n=t}n&&(s.breakContainer(s.createPositionAfter(n)),s.move(s.createRangeOn(n.parent),s.createPositionAt(t,"end")))}}aA(s,r,r.nextSibling),aA(s,r.previousSibling,r)}function aA(e,t,i){return!t||!i||"ul"!=t.name&&"ol"!=t.name||t.name!=i.name||t.getAttribute("class")!==i.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function lA(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function cA(e,t){const i=!!t.sameIndent,n=!!t.smallerIndent,r=t.listIndent;let o=e;for(;o&&"listItem"==o.name;){const e=o.getAttribute("listIndent");if(i&&r==e||n&&r>e)return o;o="forward"===t.direction?o.nextSibling:o.previousSibling}return null}function uA(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}function hA(e,t){const i=[],n=e.parent,r={ignoreElementEnd:!1,startPosition:e,shallow:!0,direction:t},o=n.getAttribute("listIndent"),s=[...new gl(r)].filter(e=>e.item.is("element")).map(e=>e.item);for(const e of s){if(!e.is("element","listItem"))break;if(e.getAttribute("listIndent")<o)break;if(!(e.getAttribute("listIndent")>o)){if(e.getAttribute("listType")!==n.getAttribute("listType"))break;if(e.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(e.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(e.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===t?i.unshift(e):i.push(e)}}return i}function dA(e){let t=[...e.document.selection.getSelectedBlocks()].filter(e=>e.is("element","listItem")).map(t=>{const i=e.change(e=>e.createPositionAt(t,0));return[...hA(i,"backward"),...hA(i,"forward")]}).flat();return t=[...new Set(t)],t}i.LegacyIndentCommand=rA;const fA=["disc","circle","square"],pA=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function mA(e){return fA.includes(e)?"bulleted":pA.includes(e)?"numbered":null}function gA(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:$s.call(this)}class vA extends ps{static get pluginName(){return"LegacyListUtils"}static get isOfficialPlugin(){return!0}getListTypeFromListStyleType(e){return mA(e)}getSelectedListItems(e){return dA(e)}getSiblingNodes(e,t){return hA(e,t)}}function bA(e){return(t,i,n)=>{const r=n.consumable;if(!r.test(i.item,"insert")||!r.test(i.item,"attribute:listType")||!r.test(i.item,"attribute:listIndent"))return;r.consume(i.item,"insert"),r.consume(i.item,"attribute:listType"),r.consume(i.item,"attribute:listIndent");const o=i.item;sA(o,oA(o,n),n,e)}}i.LegacyListUtils=vA;const yA=(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const n=i.mapper.toViewElement(t.item),r=i.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const o=n.parent,s="numbered"==t.attributeNewValue?"ol":"ul";r.rename(s,o)},wA=(e,t,i)=>{i.consumable.consume(t.item,e.name);const n=i.mapper.toViewElement(t.item).parent,r=i.writer;aA(r,n,n.nextSibling),aA(r,n.previousSibling,n)},_A=(e,t,i)=>{if(i.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=i.mapper.toViewPosition(t.range.start);const n=i.writer,r=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=n.breakContainer(e),"li"==e.parent.name);){const t=e,i=n.createPositionAt(e.parent,"end");if(!t.isEqual(i)){const e=n.remove(n.createRange(t,i));r.push(e)}e=n.createPositionAfter(e.parent)}if(r.length>0){for(let t=0;t<r.length;t++){const i=e.nodeBefore;if(e=n.insert(e,r[t]).end,t>0){const t=aA(n,i,i.nextSibling);t&&t.parent==i&&e.offset--}}aA(n,e.nodeBefore,e.nodeAfter)}}},kA=(e,t,i)=>{const n=i.mapper.toViewPosition(t.position),r=n.nodeBefore,o=n.nodeAfter;aA(i.writer,r,o)},xA=(e,t,i)=>{if(i.consumable.consume(t.viewItem,{name:!0})){const e=i.writer,n=e.createElement("listItem"),r=function(e){let t=0,i=e.parent;for(;i;){if(i.is("element","li"))t++;else{const e=i.previousSibling;e&&e.is("element","li")&&t++}i=i.parent}return t}(t.viewItem);e.setAttribute("listIndent",r,n);const o=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",o,n),!i.safeInsert(n,t.modelCursor))return;const s=function(e,t,i){const{writer:n,schema:r}=i;let o=n.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)o=i.convertItem(s,o).modelCursor;else{const t=i.convertItem(s,n.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!r.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:AA(t.modelCursor),o=n.createPositionAfter(e))}return o}(n,t.viewItem.getChildren(),i);t.modelRange=e.createRange(t.modelCursor,s),i.updateConversionResult(n,t)}},CA=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)!t.is("element","li")&&!MA(t)&&t._remove()}},SA=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let i=!1;for(const t of e)i&&!MA(t)&&t._remove(),MA(t)&&(i=!0)}};function EA(e){return(t,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const t=i.mapper.toViewElement(n),r=t.getAncestors().find(MA),o=e.createPositionAt(t,0).getWalker();for(const e of o){if("elementStart"==e.type&&e.item.is("element","li")){i.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==r){i.viewPosition=e.nextPosition;break}}}}}const TA=function(e,t){let[i,n]=t;let r,o=i.is("documentFragment")?i.getChild(0):i;if(r=n?this.createSelection(n):this.document.selection,o&&o.is("element","listItem")){const e=r.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}};function AA(e){const t=new gl({startPosition:e});let i;do{i=t.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function IA(e,t,i,n,r,o){const s=cA(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e}),a=r.mapper,l=r.writer,c=s?s.getAttribute("listIndent"):null;let u;if(s)if(c==e){const e=a.toViewElement(s).parent;u=l.createPositionAfter(e)}else{const e=o.createPositionAt(s,"end");u=a.toViewPosition(e)}else u=i;u=lA(u);for(const e of[...n.getChildren()])MA(e)&&(u=l.move(l.createRangeOn(e),u).end,aA(l,e,e.nextSibling),aA(l,e.previousSibling,e))}function MA(e){return e.is("element","ol")||e.is("element","ul")}class PA extends ps{static get pluginName(){return"LegacyListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Xb,Wv,vA]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,i=e.editing;var n;e.model.document.registerPostFixer(t=>function(e,t){const i=e.document.differ.getChanges(),n=new Map;let r=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)o(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",i),r=!0),i.hasAttribute("listType")&&(t.removeAttribute("listType",i),r=!0),i.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",i),r=!0),i.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",i),r=!0),i.hasAttribute("listStart")&&(t.removeAttribute("listStart",i),r=!0);for(const t of Array.from(e.createRangeIn(i)).filter(e=>e.item.is("element","listItem")))o(t.previousPosition)}o(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?o(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&o(n.range.start);for(const e of n.values())s(e),a(e);return r;function o(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(n.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,n.has(e))return;n.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&n.set(t,t)}}function s(e){let i=0,n=null;for(;e&&e.is("element","listItem");){const o=e.getAttribute("listIndent");if(o>i){let s;null===n?(n=o-i,s=i):(n>o&&(n=o),s=o-n),t.setAttribute("listIndent",s,e),r=!0}else n=null,i=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let i=[],n=null;for(;e&&e.is("element","listItem");){const o=e.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>o&&(i=i.slice(0,o+1)),0!=o)if(i[o]){const n=i[o];e.getAttribute("listType")!=n&&(t.setAttribute("listType",n,e),r=!0)}else i[o]=e.getAttribute("listType");n=e,e=e.nextSibling}}}(e.model,t)),i.mapper.registerViewToModelLength("li",DA),t.mapper.registerViewToModelLength("li",DA),i.mapper.on("modelToViewPosition",EA(i.view)),i.mapper.on("viewToModelPosition",(n=e.model,(e,t)=>{const i=t.viewPosition,r=i.parent,o=t.mapper;if("ul"==r.name||"ol"==r.name){if(i.isAtEnd){const e=o.toModelElement(i.nodeBefore),r=o.getModelLength(i.nodeBefore);t.modelPosition=n.createPositionBefore(e).getShiftedBy(r)}else{const e=o.toModelElement(i.nodeAfter);t.modelPosition=n.createPositionBefore(e)}e.stop()}else if("li"==r.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=o.toModelElement(r);let a=1,l=i.nodeBefore;for(;l&&MA(l);)a+=o.getModelLength(l),l=l.previousSibling;t.modelPosition=n.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",EA(i.view)),e.conversion.for("editingDowncast").add(t=>{t.on("insert",_A,{priority:"high"}),t.on("insert:listItem",bA(e.model)),t.on("attribute:listType:listItem",yA,{priority:"high"}),t.on("attribute:listType:listItem",wA,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const r=n.mapper.toViewElement(i.item),o=n.writer;o.breakContainer(o.createPositionBefore(r)),o.breakContainer(o.createPositionAfter(r));const s=r.parent,a=s.previousSibling,l=o.createRangeOn(s);o.remove(l),a&&a.nextSibling&&aA(o,a,a.nextSibling),IA(i.attributeOldValue+1,i.range.start,l.start,r,n,e),sA(i.item,r,n,e);for(const e of i.item.getChildren())n.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,i,n)=>{const r=n.mapper.toViewPosition(i.position).getLastMatchingPosition(e=>!e.item.is("element","li")).nodeAfter,o=n.writer;o.breakContainer(o.createPositionBefore(r)),o.breakContainer(o.createPositionAfter(r));const s=r.parent,a=s.previousSibling,l=o.createRangeOn(s),c=o.remove(l);a&&a.nextSibling&&aA(o,a,a.nextSibling),IA(n.mapper.toModelElement(r).getAttribute("listIndent")+1,i.position,l.start,r,n,e);for(const e of o.createRangeIn(c).getItems())n.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",kA,{priority:"low"})}),e.conversion.for("dataDowncast").add(t=>{t.on("insert",_A,{priority:"high"}),t.on("insert:listItem",bA(e.model))}),e.conversion.for("upcast").add(e=>{e.on("element:ul",CA,{priority:"high"}),e.on("element:ol",CA,{priority:"high"}),e.on("element:li",SA,{priority:"high"}),e.on("element:li",xA)}),e.model.on("insertContent",TA,{priority:"high"}),e.commands.add("numberedList",new tA(e,"numbered")),e.commands.add("bulletedList",new tA(e,"bulleted")),e.commands.add("indentList",new rA(e,"forward")),e.commands.add("outde
6ntList",new rA(e,"backward"));const r=i.view.document;this.listenTo(r,"enter",(e,t)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{context:"li"}),this.listenTo(r,"delete",(e,t)=>{if("backward"!==t.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const r=n.parent;"listItem"===r.name&&(r.previousSibling&&"listItem"===r.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))},{context:"li"}),this.listenTo(e.editing.view.document,"tab",(t,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),i.stopPropagation(),i.preventDefault(),t.stop())},{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),i&&i.registerChildCommand(e.get("outdentList"))}}function DA(e){let t=1;for(const i of e.getChildren())if("ul"==i.name||"ol"==i.name)for(const e of i.getChildren())t+=DA(e);return t}i.LegacyListEditing=PA;i.LegacyList=class extends ps{static get requires(){return[PA,yT]}static get pluginName(){return"LegacyList"}static get isOfficialPlugin(){return!0}};class OA extends gs{defaultType;constructor(e,t){super(e),this.defaultType=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._tryToConvertItemsToList(e);const t=this.editor.model,i=dA(t);i.length&&t.change(t=>{for(const n of i)t.setAttribute("listStyle",e.type||this.defaultType,n)})}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=mA(e.type);if(!t)return;const i=this.editor,n=`${t}List`;i.commands.get(n).value||i.execute(n)}}class LA extends gs{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=dA(t).filter(e=>"numbered"==e.getAttribute("listType"));t.change(t=>{for(const n of i)t.setAttribute("listReversed",!!e.reversed,n)})}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}class RA extends gs{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(){let{startIndex:e=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=dA(t).filter(e=>"numbered"==e.getAttribute("listType"));t.change(t=>{for(const n of i)t.setAttribute("listStart",e>=0?e:1,n)})}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const BA="default";class NA extends ps{static get requires(){return[PA]}static get pluginName(){return"LegacyListPropertiesEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const e=this.editor,t=e.model,i=function(e){const t=[];return e.styles&&t.push({attributeName:"listStyle",defaultValue:BA,addCommand(e){e.commands.add("listStyle",new OA(e,BA))},appliesToListItem:()=>!0,setAttributeOnDowncast(e,t,i){t&&t!==BA?e.setStyle("list-style-type",t,i):e.removeStyle("list-style-type",i)},getAttributeOnUpcast:e=>e.getStyle("list-style-type")||BA}),e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,addCommand(e){e.commands.add("listReversed",new LA(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,addCommand(e){e.commands.add("listStart",new RA(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));t.schema.extend("listItem",{allowAttributes:i.map(e=>e.attributeName)});for(const t of i)t.addCommand(e);var n;this.listenTo(e.commands.get("indentList"),"_executeCleanup",function(e,t){return(i,n)=>{const r=n[0],o=r.getAttribute("listIndent"),s=n.filter(e=>e.getAttribute("listIndent")===o);let a=null;r.previousSibling.getAttribute("listIndent")+1!==o&&(a=cA(r.previousSibling,{sameIndent:!0,direction:"backward",listIndent:o})),e.model.change(e=>{for(const i of s)for(const n of t)if(n.appliesToListItem(i)){const t=null==a?n.defaultValue:a.getAttribute(n.attributeName);e.setAttribute(n.attributeName,t,i)}})}}(e,i)),this.listenTo(e.commands.get("outdentList"),"_executeCleanup",function(e,t){return(i,n)=>{if(!(n=n.reverse().filter(e=>e.is("element","listItem"))).length)return;const r=n[0].getAttribute("listIndent"),o=n[0].getAttribute("listType");let s=n[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==r;)s=s.previousSibling;else s=null;s||(s=n[n.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===o&&e.model.change(e=>{const i=n.filter(e=>e.getAttribute("listIndent")===r);for(const n of i)for(const i of t)if(i.appliesToListItem(n)){const t=i.attributeName,r=s.getAttribute(t);e.setAttribute(t,r,n)}})}}(e,i)),this.listenTo(e.commands.get("bulletedList"),"_executeCleanup",zA(e)),this.listenTo(e.commands.get("numberedList"),"_executeCleanup",zA(e)),t.document.registerPostFixer(function(e,t){return i=>{let n=!1;const r=VA(e.model.document.differ.getChanges()).filter(e=>"todo"!==e.getAttribute("listType"));if(!r.length)return n;let o=r[r.length-1].nextSibling;if((!o||!o.is("element","listItem"))&&(o=r[0].previousSibling,o)){const e=r[0].getAttribute("listIndent");for(;o.is("element","listItem")&&o.getAttribute("listIndent")!==e&&(o=o.previousSibling,o););}for(const e of t){const t=e.attributeName;for(const s of r)if(e.appliesToListItem(s))if(s.hasAttribute(t)){const r=s.previousSibling;FA(r,s,e.attributeName)&&(i.setAttribute(t,r.getAttribute(t),s),n=!0)}else jA(o,s,e)?i.setAttribute(t,o.getAttribute(t),s):i.setAttribute(t,e.defaultValue,s),n=!0;else i.removeAttribute(t,s)}return n}}(e,i)),e.conversion.for("upcast").add((n=i,e=>{e.on("element:li",(e,t,i)=>{if(!t.modelRange)return;const r=t.viewItem.parent,o=t.modelRange.start.nodeAfter||t.modelRange.end.nodeBefore;for(const e of n)if(e.appliesToListItem(o)){const t=e.getAttributeOnUpcast(r);i.writer.setAttribute(e.attributeName,t,o)}},{priority:"low"})})),e.conversion.for("downcast").add(function(e){return i=>{for(const n of e)i.on(`attribute:${n.attributeName}:listItem`,(e,i,r)=>{const o=r.writer,s=i.item,a=cA(s.previousSibling,{sameIndent:!0,listIndent:s.getAttribute("listIndent"),direction:"backward"}),l=r.mapper.toViewElement(s);t(s,a)||o.breakContainer(o.createPositionBefore(l)),n.setAttributeOnDowncast(o,i.attributeNewValue,l.parent)},{priority:"low"})};function t(e,t){return t&&e.getAttribute("listType")===t.getAttribute("listType")&&e.getAttribute("listIndent")===t.getAttribute("listIndent")&&e.getAttribute("listStyle")===t.getAttribute("listStyle")&&e.getAttribute("listReversed")===t.getAttribute("listReversed")&&e.getAttribute("listStart")===t.getAttribute("listStart")}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const e=this.editor;e.commands.get("todoList")&&e.model.document.registerPostFixer(function(e){return t=>{const i=VA(e.model.document.differ.getChanges()).filter(e=>"todo"===e.getAttribute("listType")&&(e.hasAttribute("listStyle")||e.hasAttribute("listReversed")||e.hasAttribute("listStart")));if(!i.length)return!1;for(const e of i)t.removeAttribute("listStyle",e),t.removeAttribute("listReversed",e),t.removeAttribute("listStart",e);return!0}}(e))}_mergeListAttributesWhileMergingLists(e){const t=this.editor.model;let i;this.listenTo(t,"deleteContent",(e,t)=>
6{let[n]=t;const r=n.getFirstPosition(),o=n.getLastPosition();if(r.parent===o.parent)return;if(!r.parent.is("element","listItem"))return;const s=o.parent.nextSibling;if(!s||!s.is("element","listItem"))return;const a=cA(r.parent,{sameIndent:!0,listIndent:s.getAttribute("listIndent")});a&&a.getAttribute("listType")===s.getAttribute("listType")&&(i=a)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{i&&(t.change(t=>{const n=cA(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!n)return void(i=null);const r=[n,...hA(t.createPositionAt(n,0),"forward")];for(const n of r)for(const r of e)if(r.appliesToListItem(n)){const e=r.attributeName,o=i.getAttribute(e);t.setAttribute(e,o,n)}}),i=null)},{priority:"low"})}}function jA(e,t,i){if(!e)return!1;const n=e.getAttribute(i.attributeName);return!!n&&n!=i.defaultValue&&e.getAttribute("listType")===t.getAttribute("listType")}function FA(e,t,i){if(!e||!e.is("element","listItem"))return!1;if(t.getAttribute("listType")!==e.getAttribute("listType"))return!1;const n=e.getAttribute("listIndent");if(n<1||n!==t.getAttribute("listIndent"))return!1;const r=e.getAttribute(i);return!(!r||r===t.getAttribute(i))}function zA(e){return(t,i)=>{i=i.filter(e=>e.is("element","listItem")),e.model.change(e=>{for(const t of i)e.removeAttribute("listStyle",t)})}}function VA(e){const t=[];for(const i of e){const e=HA(i);e&&e.is("element","listItem")&&t.push(e)}return t}function HA(e){return"attribute"===e.type?e.range.start.nodeAfter:"insert"===e.type?e.position.nodeAfter:null}i.LegacyListPropertiesEditing=NA;i.LegacyListProperties=class extends ps{static get requires(){return[NA,FT]}static get pluginName(){return"LegacyListProperties"}static get isOfficialPlugin(){return!0}};const UA="todoListChecked";class WA extends gs{_selectedElements;constructor(e){super(e),this._selectedElements=[],this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every(e=>!!e.getAttribute(UA)),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const e=this.editor.model,t=e.schema,i=e.document.selection.getFirstRange(),n=i.start.parent,r=[];t.checkAttribute(n,UA)&&r.push(n);for(const e of i.getItems())t.checkAttribute(e,UA)&&!r.includes(e)&&r.push(e);return r}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.editor.model.change(t=>{for(const i of this._selectedElements)(void 0===e.forceValue?!this.value:e.forceValue)?t.setAttribute(UA,!0,i):t.removeAttribute(UA,i)})}}const $A=(e,t,i)=>{const n=t.modelCursor,r=n.parent,o=t.viewItem;if("checkbox"!=o.getAttribute("type")||"listItem"!=r.name||!n.isAtStart)return;if(!i.consumable.consume(o,{name:!0}))return;const s=i.writer;s.setAttribute("listType","todo",r),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,r),t.modelRange=s.createRange(n)};function GA(e){return(t,i)=>{const n=i.modelPosition,r=n.parent;if(!r.is("element","listItem")||"todo"!=r.getAttribute("listType"))return;const o=YA(i.mapper.toViewElement(r),e);o&&(i.viewPosition=i.mapper.findPositionIn(o,n.offset))}}function qA(e,t,i,n){return t.createUIElement("label",{class:"todo-list__label",contenteditable:!1},function(t){const r=Nr(document,"input",{type:"checkbox",tabindex:"-1"});i&&r.setAttribute("checked","checked"),r.addEventListener("change",()=>n(e));const o=this.toDomElement(t);return o.appendChild(r),o})}function YA(e,t){const i=t.createRangeIn(e);for(const e of i)if(e.item.is("containerElement","span")&&e.item.hasClass("todo-list__label__description"))return e.item}const ZA=Bo("Ctrl+Enter");class XA extends ps{static get pluginName(){return"LegacyTodoListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[PA]}init(){const e=this.editor,{editing:t,data:i,model:n}=e;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck((e,t)=>{const i=e.last;if("todoListChecked"==t&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1}),e.commands.add("todoList",new tA(e,"todo"));const r=new WA(e);var o,s;e.commands.add("checkTodoList",r),e.commands.add("todoListCheck",r),i.downcastDispatcher.on("insert:listItem",function(e){return(t,i,n)=>{const r=n.consumable;if(!r.test(i.item,"insert")||!r.test(i.item,"attribute:listType")||!r.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const o=i.item;r.consume(o,"insert"),r.consume(o,"attribute:listType"),r.consume(o,"attribute:listIndent"),r.consume(o,"attribute:todoListChecked");const s=n.writer,a=oA(o,n);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),u=s.createContainerElement("span",{class:"todo-list__label__description"});o.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),u),sA(o,a,n,e)}}(n),{priority:"high"}),i.upcastDispatcher.on("element:input",$A,{priority:"high"}),t.downcastDispatcher.on("insert:listItem",function(e,t){return(i,n,r)=>
6{const o=r.consumable;if(!o.test(n.item,"insert")||!o.test(n.item,"attribute:listType")||!o.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const s=n.item;o.consume(s,"insert"),o.consume(s,"attribute:listType"),o.consume(s,"attribute:listIndent"),o.consume(s,"attribute:todoListChecked");const a=r.writer,l=oA(s,r),c=!!s.getAttribute("todoListChecked"),u=qA(s,a,c,t),h=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),u),a.insert(a.createPositionAfter(u),h),sA(s,l,r,e)}}(n,e=>this._handleCheckmarkChange(e)),{priority:"high"}),t.downcastDispatcher.on("attribute:listType:listItem",(o=e=>this._handleCheckmarkChange(e),s=t.view,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.mapper.toViewElement(t.item),r=i.writer,a=function(e,t){const i=t.createRangeIn(e);for(const e of i)if(e.item.is("uiElement","label"))return e.item}(n,s);if("todo"==t.attributeNewValue){const e=!!t.item.getAttribute("todoListChecked"),i=qA(t.item,r,e,o),s=r.createContainerElement("span",{class:"todo-list__label__description"}),a=r.createRangeIn(n),l=uA(n),c=lA(a.start),u=l?r.createPositionBefore(l):a.end,h=r.createRange(c,u);r.addClass("todo-list",n.parent),r.move(h,r.createPositionAt(s,0)),r.insert(r.createPositionAt(n,0),i),r.insert(r.createPositionAfter(i),s)}else if("todo"==t.attributeOldValue){const e=YA(n,s);r.removeClass("todo-list",n.parent),r.remove(a),r.move(r.createRangeIn(e),r.createPositionBefore(e)),r.remove(e)}})),t.downcastDispatcher.on("attribute:todoListChecked:listItem",function(e){return(t,i,n)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!n.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:r,writer:o}=n,s=!!i.item.getAttribute("todoListChecked"),a=r.toViewElement(i.item).getChild(0),l=qA(i.item,o,s,e);o.insert(o.createPositionAfter(a),l),o.remove(a)}}(e=>this._handleCheckmarkChange(e))),t.mapper.on("modelToViewPosition",GA(t.view)),i.mapper.on("modelToViewPosition",GA(t.view)),this.listenTo(t.view.document,"arrowKey",function(e,t){return(i,n)=>{if("left"!=Fo(n.keyCode,t.contentLanguageDirection))return;const r=e.schema,o=e.document.selection;if(!o.isCollapsed)return;const s=o.getFirstPosition(),a=s.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&s.isAtStart){const t=r.getNearestSelectionRange(e.createPositionBefore(a),"backward");t&&e.change(e=>e.setSelection(t)),n.preventDefault(),n.stopPropagation(),i.stop()}}}(n,e.locale),{context:"li"}),this.listenTo(t.view.document,"keydown",(t,i)=>{Ro(i)===ZA&&(e.execute("checkTodoList"),t.stop())},{priority:"high"});const a=new Set;this.listenTo(n,"applyOperation",(e,t)=>{const i=t[0];if("rename"==i.type&&"listItem"==i.oldName){const e=i.position.nodeAfter;e.hasAttribute("todoListChecked")&&a.add(e)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const e of i.range.getItems())e.hasAttribute("todoListChecked")&&"todo"!==e.getAttribute("listType")&&a.add(e)}),n.document.registerPostFixer(e=>{let t=!1;for(const i of a)e.removeAttribute("todoListChecked",i),t=!0;return a.clear(),t}),this._initAriaAnnouncements()}_handleCheckmarkChange(e){const t=this.editor,i=t.model,n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(e,"end"),t.execute("checkTodoList"),i.setSelection(n)})}_initAriaAnnouncements(){const{model:e,ui:t,t:i}=this.editor;let n=null;t&&e.document.selection.on("change:range",()=>{const r=e.document.selection.focus.parent,o=KA(n),s=KA(r);o&&!s?t.ariaLiveAnnouncer.announce(i("Leaving a to-do list")):!o&&s&&t.ariaLiveAnnouncer.announce(i("Entering a to-do list")),n=r})}}function KA(e){return!!e&&e.is("element","listItem")&&"todo"===e.getAttribute("listType")}i.LegacyTodoListEditing=XA;i.LegacyTodoList=class extends ps{static get requires(){return[XA,QT]}static get pluginName(){return"LegacyTodoList"}static get isOfficialPlugin(){return!0}};function JA(){return(e,t,i)=>{const n=t.viewItem,r=n.nextSibling;if(!r)return;if(n.name!==r.name)return;t.modelRange||Object.assign(t,i.convertChildren(t.viewItem,t.modelCursor));const o=i.writer,s=o.createElement("listSeparator");if(!i.safeInsert(s,t.modelCursor))return;const a=i.getSplitParts(s);t.modelRange=o.createRange(t.modelRange.start,o.createPositionAfter(a[a.length-1])),i.updateConversionResult(s,t)}}i.AdjacentListsSupport=class extends ps{static get pluginName(){return"AdjacentListsSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("listSeparator",{allowWhere:"$block",isBlock:!0}),e.conversion.for("upcast").add(e=>{e.on("element:ol",JA()),e.on("element:ul",JA())}).elementToElement({model:"listSeparator",view:"ck-list-separator"}),e.conversion.for("editingDowncast").elementToElement({model:"listSeparator",view:{name:"div",classes:["ck-list-separator","ck-hidden"]}}),e.conversion.for("dataDowncast").elementToElement({model:"listSeparator",view:(e,t)=>
vendor: 13,372 bytes, line 6
6{const i=t.writer.createContainerElement("ck-list-separator");return t.writer.setCustomProperty("dataPipeline:transparentRendering",!0,i),i.getFillerOffset=()=>null,i}})}};i.DocumentList=class extends ps{static get requires(){return[wT]}static get pluginName(){return"DocumentList"}static get isOfficialPlugin(){return!0}constructor(e){super(e),b("plugin-obsolete-documentlist",{pluginName:"DocumentList"})}};i.DocumentListProperties=class extends ps{static get requires(){return[WT]}static get pluginName(){return"DocumentListProperties"}static get isOfficialPlugin(){return!0}constructor(e){super(e),b("plugin-obsolete-documentlistproperties",{pluginName:"DocumentListProperties"})}};i.TodoDocumentList=class extends ps{static get requires(){return[eA]}static get pluginName(){return"TodoDocumentList"}static get isOfficialPlugin(){return!0}constructor(e){super(e),b("plugin-obsolete-tododocumentlist",{pluginName:"TodoDocumentList"})}};let QA={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const eI=/[&<>"']/,tI=/[&<>"']/g,iI=/[<>"']|&(?!#?\w+;)/,nI=/[<>"']|&(?!#?\w+;)/g,rI={"&":"&","<":"<",">":">",'"':""","'":"'"},oI=e=>rI[e];function sI(e,t){if(t){if(eI.test(e))return e.replace(tI,oI)}else if(iI.test(e))return e.replace(nI,oI);return e}const aI=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function lI(e){return e.replace(aI,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const cI=/(^|[^\[])\^/g;function uI(e,t){e=e.source||e,t=t||"";const i={replace:(t,n)=>(n=(n=n.source||n).replace(cI,"$1"),e=e.replace(t,n),i),getRegex:()=>new RegExp(e,t)};return i}const hI=/[^\w:]/g,dI=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function fI(e,t,i){if(e){let t;try{t=decodeURIComponent(lI(i)).replace(hI,"").toLowerCase()}catch(e){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}t&&!dI.test(i)&&(i=function(e,t){pI[" "+e]||(mI.test(e)?pI[" "+e]=e+"/":pI[" "+e]=_I(e,"/",!0));const i=-1===(e=pI[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(gI,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(vI,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}const pI={},mI=/^[^:]+:\/*[^/]*$/,gI=/^([^:]+:)[\s\S]*$/,vI=/^([^:]+:\/*[^/]*)[\s\S]*$/,bI={exec:function(){}};function yI(e){let t,i,n=1;for(;n<arguments.length;n++)for(i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function wI(e,t){const i=e.replace(/\|/g,(e,t,i)=>{let n=!1,r=t;for(;--r>=0&&"\\"===i[r];)n=!n;return n?"|":" |"}).split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function _I(e,t,i){const n=e.length;if(0===n)return"";let r=0;for(;r<n;){const o=e.charAt(n-r-1);if(o!==t||i){if(o===t||!i)break;r++}else r++}return e.substr(0,n-r)}function kI(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function xI(e,t){if(t<1)return"";let i="";for(;t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function CI(e,t,i,n){const r=t.href,o=t.title?sI(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:r,title:o,text:s,tokens:n.inlineTokens(s,[])};return n.state.inLink=!1,e}return{type:"image",raw:i,href:r,title:o,text:sI(s)}}class SI{constructor(e){this.options=e||QA}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:_I(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const n=i[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=_I(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const i={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,n,r,o,s,a,l,c,u,h,d,f,p=t[1].trim();const m=p.length>1,g={type:"list",raw:"",ordered:m,start:m?+p.slice(0,-1):"",loose:!1,items:[]};p=m?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=m?p:"[*+-]");const v=new RegExp(`^( {0,3}${p})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=t[1].length),a=!1,!c&&/^ *$/.test(u)&&(i+=u+"\n",e=e.substring(u.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(h=e.split("\n",1)[0],c=h,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(c));){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(a)break;d+="\n"+c}a||c.trim()||(a=!0),i+=h+"\n",e=e.substring(h.length+1)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(i)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(d),n&&(r="[ ] "!==n[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:i,task:!!n,checked:r,loose:!1,text:d}),g.raw+=i}g.items[g.items.length-1].raw=i.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const b=g.items.length;for(s=0;s<b;s++){this.lexer.state.top=!1,g.items[s].tokens=this.lexer.blockTokens(g.items[s].text,[]);const e=g.items[s].tokens.filter(e=>"space"===e.type),t=e.every(e=>{const t=e.raw.split("");let i=0;for(const e of t)if("\n"===e&&(i+=1),i>1)return!0;return!1});!g.loose&&e.length&&t&&(g.loose=!0,g.items[s].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):sI(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:wI(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,n,r,o,s=e.align.length;for(i=0;i<s;i++)/^ *-+: *$/.test(e.align[i])?e.align[i]="right":/^ *:-+: *$/.test(e.align[i])?e.align[i]="center":/^ *:-+ *$/.test(e.align[i])?e.align[i]="left":e.align[i]=null;for(s=e.rows.length,i=0;i<s;i++)e.rows[i]=wI(e.rows[i],e.header.length).map(e=>({text:e}));for(s=e.header.length,n=0;n<s;n++)e.header[n].tokens=[],this.lexer.inlineTokens(e.header[n].text,e.header[n].tokens);for(s=e.rows.length,n=0;n<s;n++)for(o=e.rows[n],r=0;r<o.length;r++)o[r].tokens=[],this.lexer.inlineTokens(o[r].text,o[r].tokens);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const e={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}text(e){const t=this.rules.block.text.exec(e);if(t){const e={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:sI(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):sI(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=_I(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const i=e.length;let n=0,r=0;for(;r<i;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),CI(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return CI(i,e,i[0],this.lexer)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrong.lDelim.exec(e);if(!n)return;if(n[3]&&i.match(/[\p{L}\p{N}]/u))return;const r=n[1]||n[2]||"";if(!r||r&&(""===i||this.rules.inline.punctuation.exec(i))){const i=n[0].length-1;let r,o,s=i,a=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(o=r.length,n[3]||n[4]){s+=o;continue}if((n[5]||n[6])&&i%3&&!((i+o)%3)){a+=o;continue}if(s-=o,s>0)continue;if(o=Math.min(o,o+s+a),Math.min(i,o)%2){const t=e.slice(1,i+n.index+o);return{type:"em",raw:e.slice(0,i+n.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,i+n.index+o-1);return{type:"strong",raw:e.slice(0,i+n.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=sI(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,n;return"@"===i[2]?(e=sI(this.options.mangle?t(i[1]):i[1]),n="mailto:"+e):(e=sI(i[1]),n=e),{type:"link",raw:i[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,n;if("@"===i[2])e=sI(this.options.mangle?t(i[0]):i[0]),n="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=sI(i[0]),n="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const i=this.rules.inline.text.exec(e);if(i){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):sI(i[0]):i[0]:sI(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:e}}}}const EI={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
6)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bI,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};EI.def=uI(EI.def).replace("label",EI._label).replace("title",EI._title).getRegex(),EI.bullet=/(?:[*+-]|\d{1,9}[.)])/,EI.listItemStart=uI(/^( *)(bull) */).replace("bull",EI.bullet).getRegex(),EI.list=uI(EI.list).replace(/bull/g,EI.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+EI.def.source+")").getRegex(),EI._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",EI._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,EI.html=uI(EI.html,"i").replace("comment",EI._comment).replace("tag",EI._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),EI.paragraph=uI(EI._paragraph).replace("hr",EI.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",EI._tag).getRegex(),EI.blockquote=uI(EI.blockquote).replace("paragraph",EI.paragraph).getRegex(),EI.normal=yI({},EI),EI.gfm=yI({},EI.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),EI.gfm.table=uI(EI.gfm.table).replace("hr",EI.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",EI._tag).getRegex(),EI.gfm.paragraph=uI(EI._paragraph).replace("hr",EI.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",EI.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",EI._tag).getRegex(),EI.pedantic=yI({},EI.normal,{html:uI("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",EI._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bI,paragraph:uI(EI.normal._paragraph).replace("hr",EI.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",EI.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const TI={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bI,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bI,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function AI(e){return e.replace(/---/g,"â").replace(/--/g,"â").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1â").replace(/'/g,"â").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1â").replace(/"/g,"â").replace(/\.{3}/g,"â¦")}function II(e){let t,i,n="";const r=e.length;for(t=0;t<r;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}TI._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",TI.punctuation=uI(TI.punctuation).replace(/punctuation/g,TI._punctuation).getRegex(),TI.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,TI.escapedEmSt=/\\\*|\\_/g,TI._comment=uI(EI._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),TI.emStrong.lDelim=uI(TI.emStrong.lDelim).replace(/punct/g,TI._punctuation).getRegex(),TI.emStrong.rDelimAst=uI(TI.emStrong.rDelimAst,"g").replace(/punct/g,TI._punctuation).getRegex(),TI.emStrong.rDelimUnd=uI(TI.emStrong.rDelimUnd,"g").replace(/punct/g,TI._punctuation).getRegex(),TI._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,TI._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,TI._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,TI.autolink=uI(TI.autolink).replace("scheme",TI._scheme).replace("email",TI._email).getRegex(),TI._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,TI.tag=uI(TI.tag).replace("comment",TI._comment).replace("attribute",TI._attribute).getRegex(),TI._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,TI._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,TI._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,TI.link=uI(TI.link).replace("label",TI._label).replace("href",TI._href).replace("title",TI._title).getRegex(),TI.reflink=uI(TI.reflink).replace("label",TI._label).replace("ref",EI._label).getRegex(),TI.nolink=uI(TI.nolink).replace("ref",EI._label).getRegex(),TI.reflinkSearch=uI(TI.reflinkSearch,"g").replace("reflink",TI.reflink).replace("nolink",TI.nolink).getRegex(),TI.normal=yI({},TI),TI.pedantic=yI({},TI.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:uI(/^!?\[(label)\]\((.*?)\)/).replace("label",TI._label).getRegex(),reflink:uI(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",TI._label).getRegex()}),TI.gfm=yI({},TI.normal,{escape:uI(TI.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),TI.gfm.url=uI(TI.gfm.url,"i").replace("email",TI.gfm._extended_email).getRegex(),TI.breaks=yI({},TI.gfm,{br:uI(TI.br).replace("{2,}","*").getRegex(),text:uI(TI.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class MI{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||QA,this.options.tokenizer=this.options.tokenizer||new SI,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:EI.normal,inline:TI.normal};this.options.pedantic?(t.block=EI.pedantic,t.inline=TI.pedantic):this.options.gfm&&(t.block=EI.gfm,this.options.breaks?t.inline=TI.breaks:t.inline=TI.gfm),this.tokenizer.rules=t}static get rules(){return{block:EI,inline:TI}}static lex(e,t){return new MI(t).lex(e)}static lexInline(e,t){return new MI(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);
vendor: 11,768 bytes, line 6
6t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e){let t,i,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(i=>!!(t=i.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=o[o.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?o.push(t):(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=o[o.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(i.raw+="\n"+t.raw,i.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startBlock.forEach(function(e){r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(n)))i=o[o.length-1],r&&"paragraph"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):o.push(t),r=n.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=o[o.length-1],i&&"text"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e){let t,i,n,r,o,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+xI("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+xI("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(i=>!!(t=i.call({lexer:this},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),i=a[a.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):a.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),i=a[a.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):a.push(t);else if(t=this.tokenizer.emStrong(e,l,s))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.autolink(e,II))e=e.substring(t.raw.length),a.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,II))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startInline.forEach(function(e){r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(n,AI))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(s=t.raw.slice(-1)),o=!0,i=a[a.length-1],i&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):a.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),a.push(t);return a}}class PI{constructor(e){this.options=e||QA}code(e,t,i){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,n);null!=t&&t!==e&&(i=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+sI(n,!0)+'">'+(i?e:sI(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:sI(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(i)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,i){const n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,i){if(null===(e=fI(this.options.sanitize,this.options.baseUrl,e)))return i;let n='<a href="'+sI(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+i+"</a>",n}image(e,t,i){if(null===(e=fI(this.options.sanitize,this.options.baseUrl,e)))return i;let n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">",n}text(e){return e}}class DI{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class OI{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{n++,i=e+"-"+n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i}slug(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}}class LI{constructor(e){this.options=e||QA,this.options.renderer=this.options.renderer||new PI,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new DI,this.slugger=new OI}static parse(e,t){return new LI(t).parse(e)}static parseInline(e,t){return new LI(t).parseInline(e)}parse(e){let t,i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b,y,w=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],_="";const k=e.length;for(t=0;t<k;t++)if(u=e[t],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(y=this.options.extensions.renderers[u.type].call({parser:this},u),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)))_+=y||"";else switch(u.type){case"space":continue;case"hr":_+=this.renderer.hr();continue;case"heading":_+=this.renderer.heading(this.parseInline(u.tokens),u.depth,lI(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":_+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(l="",a="",r=u.header.length,i=0;i<r;i++)a+=this.renderer.tablecell(this.parseInline(u.header[i].tokens),{header:!0,align:u.align[i]});for(l+=this.renderer.tablerow(a),c="",r=u.rows.length,i=0;i<r;i++){for(s=u.rows[i],a="",o=s.length,n=0;n<o;n++)a+=this.renderer.tablecell(this.parseInline(s[n].tokens),{header:!1,align:u.align[n]});c+=this.renderer.tablerow(a)}_+=this.renderer.table(l,c);continue;case"blockquote":c=this.parse(u.tokens),_+=this.renderer.blockquote(c);continue;case"list":for(h=u.ordered,d=u.start,f=u.loose,r=u.items.length,c="",i=0;i<r;i++)m=u.items[i],g=m.checked,v=m.task,p="",m.task&&(b=this.renderer.checkbox(g),f?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):p+=b),p+=this.parse(m.tokens,f),c+=this.renderer.listitem(p,v,g);_+=this.renderer.list(c,h,d);continue;case"html":_+=this.renderer.html(u.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(c=u.tokens?this.parseInline(u.tokens):u.text;t+1<k&&"text"===e[t+1].type;)u=e[++t],c+="\n"+(u.tokens?this.parseInline(u.tokens):u.text);_+=w?this.renderer.paragraph(c):c;continue;default:{const e='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return _}parseInline(e,t){t=t||this.renderer;let i,n,r,o="";const s=e.length;for(i=0;i<s;i++)if(n=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]&&(r=this.options.extensions.renderers[n.type].call({parser:this},n),!1!==r||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)))o+=r||"";else switch(n.type){case"escape":case"text":o+=t.text(n.text);break;case"html":o+=t.html(n.text);break;case"link":o+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":o+=t.image(n.href,n.title,n.text);break;case"strong":o+=t.strong(this.parseInline(n.tokens,t));break;case"em":o+=t.em(this.parseInline(n.tokens,t));break;case"codespan":o+=t.codespan(n.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(n.tokens,t));break;default:{const e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return o}}function RI(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),kI(t=yI({},RI.defaults,t||{})),i){const n=t.highlight;let r;try{r=MI.lex(e,t)}catch(e){return i(e)}const o=function(e){let o;if(!e)try{t.walkTokens&&RI.walkTokens(r,t.walkTokens),o=LI.parse(r,t)}catch(t){e=t}return t.highlight=n,e?i(e):i(null,o)};if(!n||n.length<3)return o();if(delete t.highlight,!r.length)return o();let s=0;return RI.walkTokens(r,function(e){"code"===e.type&&(s++,setTimeout(()=>{n(e.text,e.lang,function(t,i){if(t)return o(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),s--,0===s&&o()})}
6,0))}),void(0===s&&o())}try{const i=MI.lex(e,t);return t.walkTokens&&RI.walkTokens(i,t.walkTokens),LI.parse(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+sI(e.message+"",!0)+"</pre>";throw e}}RI.options=RI.setOptions=function(e){var t;return yI(RI.defaults,e),t=RI.defaults,QA=t,RI},RI.getDefaults=function(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},RI.defaults=QA,RI.use=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=yI({},...t),r=RI.defaults.extensions||{renderers:{},childTokens:{}};let o;t.forEach(e=>{if(e.extensions&&(o=!0,e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=r.renderers?r.renderers[e.name]:null;r.renderers[e.name]=t?function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];let o=e.renderer.apply(this,n);return!1===o&&(o=t.apply(this,n)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");r[e.level]?r[e.level].unshift(e.tokenizer):r[e.level]=[e.tokenizer],e.start&&("block"===e.level?r.startBlock?r.startBlock.push(e.start):r.startBlock=[e.start]:"inline"===e.level&&(r.startInline?r.startInline.push(e.start):r.startInline=[e.start]))}e.childTokens&&(r.childTokens[e.name]=e.childTokens)})),e.renderer){const t=RI.defaults.renderer||new PI;for(const i in e.renderer){const n=t[i];t[i]=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];let a=e.renderer[i].apply(t,o);return!1===a&&(a=n.apply(t,o)),a}}n.renderer=t}if(e.tokenizer){const t=RI.defaults.tokenizer||new SI;for(const i in e.tokenizer){const n=t[i];t[i]=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];let a=e.tokenizer[i].apply(t,o);return!1===a&&(a=n.apply(t,o)),a}}n.tokenizer=t}if(e.walkTokens){const t=RI.defaults.walkTokens;n.walkTokens=function(i){e.walkTokens.call(this,i),t&&t.call(this,i)}}o&&(n.extensions=r),RI.setOptions(n)})},RI.walkTokens=function(e,t){for(const i of e)switch(t.call(RI,i),i.type){case"table":for(const e of i.header)RI.walkTokens(e.tokens,t);for(const e of i.rows)for(const i of e)RI.walkTokens(i.tokens,t);break;case"list":RI.walkTokens(i.items,t);break;default:RI.defaults.extensions&&RI.defaults.extensions.childTokens&&RI.defaults.extensions.childTokens[i.type]?RI.defaults.extensions.childTokens[i.type].forEach(function(e){RI.walkTokens(i[e],t)}):i.tokens&&RI.walkTokens(i.tokens,t)}},RI.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");kI(t=yI({},RI.defaults,t||{}));try{const i=MI.lexInline(e,t);return t.walkTokens&&RI.walkTokens(i,t.walkTokens),LI.parseInline(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+sI(e.message+"",!0)+"</pre>";throw e}},RI.Parser=LI,RI.parser=LI.parse,RI.Renderer=PI,RI.TextRenderer=DI,RI.Lexer=MI,RI.lexer=MI.lex,RI.Tokenizer=SI,RI.Slugger=OI,RI.parse=RI,RI.options,RI.setOptions,RI.use,RI.walkTokens,RI.parseInline,LI.parse,MI.lex;class BI{_parser;_options={gfm:!0,breaks:!0,tables:!0,xhtml:!0,headerIds:!1};constructor(){RI.use({tokenizer:{autolink:()=>null,url:()=>null},renderer:{checkbox(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.getPrototypeOf(this).checkbox.call(this,...t).trimRight()},code(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.getPrototypeOf(this).code.call(this,...t).replace("\n</code>","</code>")}}}),this._parser=RI}parse(e){return this._parser.parse(e,this._options)}}function NI(e,t){return Array(t+1).join(e)}i.MarkdownToHtml=BI;var jI=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function FI(e){return UI(e,jI)}var zI=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function VI(e){return UI(e,zI)}var HI=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function UI(e,t){return t.indexOf(e.nodeName)>=0}function WI(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var $I={};function GI(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function qI(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function YI(e,t,i){for(var n=0;n<e.length;n++){var r=e[n];if(ZI(r,t,i))return r}}function ZI(e,t,i){var n=e.filter;if("string"==typeof n){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof n)throw new TypeError("`filter` needs to be a string, array, or function");if(n.call(e,t,i))return!0}}function XI(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function KI(e,t,i){return e&&e.parentNode===t||i(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}$I.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},$I.lineBreak={filter:"br",replacement:function(e,t,i){return i.br+"\n"}},$I.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,i){var n=Number(t.
6nodeName.charAt(1));return"setext"===i.headingStyle&&n<3?"\n\n"+e+"\n"+NI(1===n?"=":"-",e.length)+"\n\n":"\n\n"+NI("#",n)+" "+e+"\n\n"}},$I.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},$I.list={filter:["ul","ol"],replacement:function(e,t){var i=t.parentNode;return"LI"===i.nodeName&&i.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},$I.listItem={filter:"li",replacement:function(e,t,i){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var n=i.bulletListMarker+" ",r=t.parentNode;if("OL"===r.nodeName){var o=r.getAttribute("start"),s=Array.prototype.indexOf.call(r.children,t);n=(o?Number(o)+s:s+1)+". "}return n+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},$I.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,i){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},$I.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,i){for(var n,r=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],o=t.firstChild.textContent,s=i.fence.charAt(0),a=3,l=new RegExp("^"+s+"{3,}","gm");n=l.exec(o);)n[0].length>=a&&(a=n[0].length+1);var c=NI(s,a);return"\n\n"+c+r+"\n"+o.replace(/\n$/,"")+"\n"+c+"\n\n"}},$I.horizontalRule={filter:"hr",replacement:function(e,t,i){return"\n\n"+i.hr+"\n\n"}},$I.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var i=t.getAttribute("href");i&&(i=i.replace(/([()])/g,"\\$1"));var n=GI(t.getAttribute("title"));return n&&(n=' "'+n.replace(/"/g,'\\"')+'"'),"["+e+"]("+i+n+")"}},$I.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,i){var n,r,o=t.getAttribute("href"),s=GI(t.getAttribute("title"));switch(s&&(s=' "'+s+'"'),i.linkReferenceStyle){case"collapsed":n="["+e+"][]",r="["+e+"]: "+o+s;break;case"shortcut":n="["+e+"]",r="["+e+"]: "+o+s;break;default:var a=this.references.length+1;n="["+e+"]["+a+"]",r="["+a+"]: "+o+s}return this.references.push(r),n},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},$I.emphasis={filter:["em","i"],replacement:function(e,t,i){return e.trim()?i.emDelimiter+e+i.emDelimiter:""}},$I.strong={filter:["strong","b"],replacement:function(e,t,i){return e.trim()?i.strongDelimiter+e+i.strongDelimiter:""}},$I.code={filter:function(e){var t=e.previousSibling||e.nextSibling,i="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!i},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",i="`",n=e.match(/`+/gm)||[];-1!==n.indexOf(i);)i+="`";return i+t+e+t+i}},$I.image={filter:"img",replacement:function(e,t){var i=GI(t.getAttribute("alt")),n=t.getAttribute("src")||"",r=GI(t.getAttribute("title"));return n?"+")":""}},qI.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=YI(this.array,e,this.options))||(t=YI(this._keep,e,this.options))||(t=YI(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var JI,QI="undefined"!=typeof window?window:{},eM=function(){var e=QI.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?QI.DOMParser:function(){var e=function(){};return function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){QI.ActiveXObject&&(e=!0)}return e}()?e.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:e.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},e}();function tM(e,t){var i;return function(e){var t=e.element,i=e.isBlock,n=e.isVoid,r=e.isPre||function(e){return"PRE"===e.n
vendor: 2,915 bytes, line 6
6odeName};if(t.firstChild&&!r(t)){for(var o=null,s=!1,a=null,l=KI(a,t,r);l!==t;){if(3===l.nodeType||4===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(o&&!/ $/.test(o.data)||s||" "!==c[0]||(c=c.substr(1)),!c){l=XI(l);continue}l.data=c,o=l}else{if(1!==l.nodeType){l=XI(l);continue}i(l)||"BR"===l.nodeName?(o&&(o.data=o.data.replace(/ $/,"")),o=null,s=!1):n(l)||r(l)?(o=null,s=!0):o&&(s=!1)}var u=KI(a,l,r);a=l,l=u}o&&(o.data=o.data.replace(/ $/,""),o.data||XI(o))}}({element:i="string"==typeof e?(JI=JI||new eM).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):e.cloneNode(!0),isBlock:FI,isVoid:VI,isPre:t.preformattedCode?iM:null}),i}function iM(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function nM(e,t){return e.isBlock=FI(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!VI(e)&&!function(e){return UI(e,HI)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return WI(e,zI)}(e)&&!function(e){return WI(e,HI)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var i,n={leading:(i=e.textContent.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/))[1],leadingAscii:i[2],leadingNonAscii:i[3],trailing:i[4],trailingNonAscii:i[5],trailingAscii:i[6]};return n.leadingAscii&&rM("left",e,t)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&rM("right",e,t)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}(e,t),e}function rM(e,t,i){var n,r,o;return"left"===e?(n=t.previousSibling,r=/ $/):(n=t.nextSibling,r=/^ /),n&&(3===n.nodeType?o=r.test(n.nodeValue):i.preformattedCode&&"CODE"===n.nodeName?o=!1:1!==n.nodeType||FI(n)||(o=r.test(n.textContent))),o}var oM=Array.prototype.reduce,sM=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function aM(e){if(!(this instanceof aM))return new aM(e);var t={rules:$I,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}return e}({},t,e),this.rules=new qI(this.options)}function lM(e){var t=this;return oM.call(e.childNodes,function(e,i){var n="";return 3===(i=new nM(i,t.options)).nodeType?n=i.isCode?i.nodeValue:t.escape(i.nodeValue):1===i.nodeType&&(n=uM.call(t,i)),hM(e,n)},"")}function cM(e){var t=this;
6return this.rules.forEach(function(i){"function"==typeof i.append&&(e=hM(e,i.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function uM(e){var t=this.rules.forNode(e),i=lM.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(i=i.trim()),n.leading+t.replacement(i,e,this.options)+n.trailing}function hM(e,t){var i=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),n=t.replace(/^\n*/,""),r=Math.max(e.length-i.length,t.length-n.length);return i+"\n\n".substring(0,r)+n}aM.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=lM.call(this,new tM(e,this.options));return cM.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return sM.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};var dM=/highlight-(?:text|source)-([a-z0-9]+)/;function fM(e){e.addRule("highlightedCodeBlock",{filter:function(e){var t=e.firstChild;return"DIV"===e.nodeName&&dM.test(e.className)&&t&&"PRE"===t.nodeName},replacement:function(e,t,i){var n=((t.className||"").match(dM)||[null,""])[1];return"\n\n"+i.fence+n+"\n"+t.firstChild.textContent+"\n"+i.fence+"\n\n"}})}function pM(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~"+e+"~"}})}var mM=Array.prototype.indexOf,gM=Array.prototype.every,vM={};function bM(e){var t,i,n=e.parentNode;return"THEAD"===n.nodeName||n.firstChild===e&&("TABLE"===n.nodeName||(i=(t=n).previousSibling,"TBODY"===t.nodeName&&(!i||"THEAD"===i.nodeName&&/^\s*$/i.test(i.textContent))))&&gM.call(e.childNodes,function(e){return"TH"===e.nodeName})}function yM(e,t){var i=" ";return 0===mM.call(t.parentNode.childNodes,t)&&(i="| "),i+e+" |"}function wM(e){for(var t in e.keep(function(e){return"TABLE"===e.nodeName&&!bM(e.rows[0])}),vM)e.addRule(t,vM[t])}function _M(e){e.addRule("taskListItems",{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}})}function kM(e){e.use([fM,pM,wM,_M])}vM.tableCell={filter:["th","td"],replacement:function(e,t){return yM(e,t)}},vM.tableRow={filter:"tr",replacement:function(e,t){var i="",n={left:":--",right:"--:",center:":-:"};if(bM(t))for(var r=0;r<t.childNodes.length;r++){var o="---",s=(t.childNodes[r].getAttribute("align")||"").toLowerCase();s&&(o=n[s]||o),i+=yM(o,t.childNodes[r])}return"\n"+e+(i?"\n"+i:"")}},vM.table={filter:function(e){return"TABLE"===e.nodeName&&bM(e.rows[0])},replacement:function(e){return"\n\n"+(e=e.replace("\n\n","\n"))+"\n\n"}},vM.tableSection={filter:["thead","tbody","tfoot"],replacement:function(e){return e}};const xM=new RegExp(/\b(?:(?:https?|ftp):\/\/|www\.)/.source+/(?![-_])(?:[-_a-z0-9\u00a1-\uffff]{1,63}\.)+(?:[a-z\u00a1-\uffff]{2,63})/.source+/(?:[^\s<>]*)/.source,"gi");class CM extends aM{escape(e){const t=super.escape;function i(e){return(e=t(e)).replace(/</g,"\\<")}let n="",r=0;for(const t of this._matchAutolink(e)){const o=t.index;o>r&&(n+=i(e.substring(r,o)));const s=t[0];n+=s,r=o+s.length}return r<e.length&&(n+=i(e.substring(r,e.length))),n}*_matchAutolink(e){for(const t of e.matchAll(xM)){const e=t[0],i=this._autolinkFindEnd(e);yield Object.assign([e.substring(0,i)],{index:t.index})}}_autolinkFindEnd(e){let t=e.length;for(;t>0;){const i=e[t-1];if("?!.,:*_~'\"".includes(i))t--;else{if(")"!=i)break;{let i=0;for(let n=0;n<t;n++)"("==e[n]?i++:")"==e[n]&&i--;if(!(i<0))break;t--}}}return t}}class SM{_parser;constructor(){this._parser=this._createParser()}parse(e){return this._parser.turndown(e)}keep(e){this._parser.keep(e)}_createParser(){const e=new CM({codeBlockStyle:"fenced",hr:"---",headingStyle:"atx"});return e.use([kM,this._todoList]),e}_todoList(e){e.addRule("taskListItems",{filter:e=>
6"checkbox"===e.type&&("LI"===e.parentNode.nodeName||"LI"===e.parentNode.parentNode.nodeName),replacement:(e,t)=>(t.checked?"[x]":"[ ]")+" "})}}class EM{_htmlDP;_markdown2html;_html2markdown;constructor(e){this._htmlDP=new Gc(e),this._markdown2html=new BI,this._html2markdown=new SM}keepHtml(e){this._html2markdown.keep([e])}toView(e){const t=this._markdown2html.parse(e);return this._htmlDP.toView(t)}toData(e){const t=this._htmlDP.toData(e);return this._html2markdown.parse(t)}registerRawContentMatcher(e){this._htmlDP.registerRawContentMatcher(e)}useFillerType(){}}i.GFMDataProcessor=EM;i.Markdown=class extends ps{constructor(e){super(e),e.data.processor=new EM(e.data.viewDocument)}static get pluginName(){return"Markdown"}static get isOfficialPlugin(){return!0}};const TM=["SPAN","BR","PRE","CODE"];function AM(e,t){const i=(i,n,r)=>{if(!r.consumable.consume(n.item,i.name))return;const o=n.attributeNewValue,s=r.writer,a=r.mapper.toViewElement(n.item),l=[...a.getChildren()].find(e=>e.getCustomProperty("media-content"));s.remove(l);const c=e.getMediaViewElement(s,o,t);s.insert(s.createPositionAt(a,0),c)};return e=>{e.on("attribute:url:media",i)}}function IM(e){const t=e.getSelectedElement();return t&&function(e){return!!e.getCustomProperty("media")&&py(e)}(t)?t:null}function MM(e,t,i,n){return e.createContainerElement("figure",{class:"media"},[t.getMediaViewElement(e,i,n),e.createSlot()])}function PM(e){const t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function DM(e,t,i,n){e.change(r=>{const o=r.createElement("media",{url:t});e.insertObject(o,i,null,{setSelection:"on",findOptimalPosition:n?"auto":void 0})})}i.PasteFromMarkdownExperimental=class extends ps{_gfmDataProcessor;constructor(e){super(e),this._gfmDataProcessor=new EM(e.data.viewDocument)}static get pluginName(){return"PasteFromMarkdownExperimental"}static get isOfficialPlugin(){return!0}static get requires(){return[Hw]}init(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get("ClipboardPipeline");let n=!1;this.listenTo(t,"keydown",(e,t)=>{n=t.shiftKey}),this.listenTo(i,"inputTransformation",(e,t)=>{if(n)return;const i=t.dataTransfer.getData("text/html");if(!i){const e=t.dataTransfer.getData("text/plain");return void(t.content=this._gfmDataProcessor.toView(e))}const r=this._parseMarkdownFromHtml(i);r&&(t.content=this._gfmDataProcessor.toView(r))})}_parseMarkdownFromHtml(e){const t=this._removeOsSpecificTags(e);if(!this._containsOnlyAllowedFirstLevelTags(t))return null;const i=this._removeFirstLevelWrapperTagsAndBrs(t);return this._containsAnyRemainingHtmlTags(i)?null:this._replaceHtmlReservedEntitiesWithCharacters(i)}_removeOsSpecificTags(e){return e.replace(/^<meta\b[^>]*>/,"").trim().replace(/^<html>/,"").replace(/<\/html>$/,"").trim().replace(/^<body>/,"").replace(/<\/body>$/,"").trim().replace(/^<!--StartFragment-->/,"").replace(/<!--EndFragment-->$/,"").trim()}_containsOnlyAllowedFirstLevelTags(e){const t=new DOMParser,{body:i}=t.parseFromString(e,"text/html");return Array.from(i.children).map(e=>e.tagName).every(e=>TM.includes(e))}_removeFirstLevelWrapperTagsAndBrs(e){const t=new DOMParser,{body:i}=t.parseFromString(e,"text/html"),n=i.querySelectorAll("br");for(const e of n)e.replaceWith("\n");const r=i.querySelectorAll(":scope > *");for(const e of r){const t=e.cloneNode(!0);e.replaceWith(...t.childNodes)}return i.innerHTML}_containsAnyRemainingHtmlTags(e){return e.includes("<")}_replaceHtmlReservedEntitiesWithCharacters(e){return e.replace(/>/g,">").replace(/</g,"<").replace(/ /g," ")}};class OM extends gs{refresh(){const e=this.editor.model,t=e.document.selection,i=PM(t);this.value=i?i.getAttribute("url"):void 0,this.isEnabled=function(e){const t=e.getSelectedElement();return!!t&&"media"===t.name}(t)||function(e,t){let i=ky(e,t).start.parent;return i.isEmpty&&!t.schema.isLimit(i)&&(i=i.parent),t.schema.checkChild(i,"media")}(t,e)}execute(e){const t=this.editor.model,i=t.document.selection,n=PM(i);n?t.change(t=>{t.setAttribute("url",e,n)}):DM(t,e,i,!0)}}class LM{locale;providerDefinitions;constructor(e,t){const i=t.providers,n=t.extraProviders||[],r=new Set(t.removeProviders),o=i.concat(n).filter(e=>{const t=e.name;return t?!r.has(t):(b("media-embed-no-provider-name",{provider:e}),!1)});this.locale=e,this.providerDefinitions=o}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,i){return this._getMedia(t).getViewElement(e,i)}_getMedia(e){if(!e)return new RM(this.locale);e=e.trim();for(const t of this.providerDefinitions){const i=t.html,n=Uo(t.url);for(const t of n){const n=this._getUrlMatches(e,t);if(n)return new RM(this.locale,e,n,i)}}return null}_getUrlMatches(e,t){let i=e.match(t);if(i)return i;let n=e.replace(/^https?:\/\//,"");return i=n.match(t),i||(n=n.replace(/^www\./,""),i=n.match(t),i||null)}}class RM{url;_locale;_match;_previewRenderer;constructor(e,t,i,n){this.url=this._getValidUrl(t),this._locale=e,this._match=i,this._previewRenderer=n}getViewElement(e,t){const i={};let n;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i["data-oembed-url"]=this.url),t.renderForEditingView&&(i.class="ck-media__wrapper");const r=this._getPreviewHtml(t);n=e.createRawElement("div",i,(e,t)=>{t.setContentOf(e,r)})}else this.url&&(i.url=this.url),n=e.createEmptyElement(t.elementName,i);return e.setCustomProperty("media-content",!0,n),n}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new Nf,t=this._locale.t;return e.content='<svg viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.
6637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z"/></svg>',e.viewBox="0 0 64 42",new hf({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":t("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}class BM extends ps{static get pluginName(){return"MediaEmbedEditing"}static get isOfficialPlugin(){return!0}registry;constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; "><iframe src="https://www.dailymotion.com/embed/video/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" width="480" height="270" allowfullscreen allow="autoplay"></iframe></div>`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;"><iframe src="https://open.spotify.com/embed/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe></div>`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/shorts\/([\w-]+)(?:\?t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:e=>{const t=e[1],i=e[2];return`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/${t}${i?`?start=${i}`:""}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>`}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://player.vimeo.com/video/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>`},{name:"instagram",url:[/^instagram\.com\/p\/(\w+)/,/^instagram\.com\/reel\/(\w+)/]},{name:"twitter",url:[/^twitter\.com/,/^x\.com/]},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new LM(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion,r=e.config.get("mediaEmbed.previewsInData"),o=e.config.get("mediaEmbed.elementName"),s=this.registry;e.commands.add("mediaEmbed",new OM(e)),t.register("media",{inheritAllFrom
6:"$blockObject",allowAttributes:["url"]}),n.for("dataDowncast").elementToStructure({model:"media",view:(e,t)=>{let{writer:i}=t;const n=e.getAttribute("url");return MM(i,s,n,{elementName:o,renderMediaPreview:!!n&&r})}}),n.for("dataDowncast").add(AM(s,{elementName:o,renderMediaPreview:r})),n.for("editingDowncast").elementToStructure({model:"media",view:(e,t)=>{let{writer:n}=t;const r=e.getAttribute("url");return function(e,t,i){return t.setCustomProperty("media",!0,e),my(e,t,{label:i})}(MM(n,s,r,{elementName:o,renderForEditingView:!0}),n,i("media widget"))}}),n.for("editingDowncast").add(AM(s,{elementName:o,renderForEditingView:!0})),n.for("upcast").elementToElement({view:e=>["oembed",o].includes(e.name)&&e.getAttribute("url")?{name:!0}:null,model:(e,t)=>{let{writer:i}=t;const n=e.getAttribute("url");return s.hasMedia(n)?i.createElement("media",{url:n}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,t)=>{let{writer:i}=t;const n=e.getAttribute("data-oembed-url");return s.hasMedia(n)?i.createElement("media",{url:n}):null}}).add(e=>{e.on("element:figure",(e,t,i)=>{if(!i.consumable.consume(t.viewItem,{name:!0,classes:"media"}))return;const{modelRange:n,modelCursor:r}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=n,t.modelCursor=r,qo(n.getItems())||i.consumable.revert(t.viewItem,{name:!0,classes:"media"})})})}}i.MediaEmbedEditing=BM;const NM=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class jM extends ps{static get requires(){return[n_,Wv,uk]}static get pluginName(){return"AutoMediaEmbed"}static get isOfficialPlugin(){return!0}_timeoutId;_positionToInsert;constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",()=>{const e=t.selection.getFirstRange(),i=Mu.fromPosition(e.start);i.stickiness="toPrevious";const n=Mu.fromPosition(e.end);n.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(i,n),i.detach(),n.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(r.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){const i=this.editor,n=i.plugins.get(BM).registry,o=new Fl(e,t),s=o.getWalker({ignoreElementEnd:!0});let a="";for(const e of s)e.item.is("$textProxy")&&(a+=e.item.data);a=a.trim(),a.match(NM)&&n.hasMedia(a)&&i.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=Mu.fromPosition(e),this._timeoutId=r.window.setTimeout(()=>{i.model.change(e=>{this._timeoutId=null,e.remove(o),o.detach();let t=null;"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),DM(i.model,a,t,!1),this._positionToInsert.detach(),this._positionToInsert=null}),i.plugins.get(Wv).requestUndoOnBackspace()},100)):o.detach()}}i.AutoMediaEmbed=jM;class FM extends Df{focusTracker;keystrokes;urlInputView;_validators;_urlInputViewInfoDefault;_urlInputViewInfoTip;constructor(e,t){super(t),this.focusTracker=new Yo,this.keystrokes=new Jo,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView]})}render(){super.render(),Rf({view:this}),this.focusTracker.add(this.urlInputView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.urlInputView.focus()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new Bp(this.locale,Am),i=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,i.inputMode="url",i.on("input",()=>{t.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=i.element.value.trim()}),t}}class zM extends ps{static get requires(){return[BM,Kf]}static get pluginName(){return"MediaEmbedUI"}static get isOfficialPlugin(){return!0}_formView;init(){const e=this.editor;e.ui.componentFactory.add("mediaEmbed",()=>{const e=this.editor.locale.t,t=this._createDialogButton(Ff);return t.tooltip=!0,t.label=e("Insert media"),t}),e.ui.componentFactory.add("menuBar:mediaEmbed",()=>{const e=this.editor.locale.t,t=this._createDialogButton(ep);return t.label=e("Media"),t})}_createDialogButton(e){const t=this.editor,i=new e(t.locale),n=t.commands.get("mediaEmbed"),r=this.editor.plugins.get("Dialog");return i.icon='<svg viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-14.24 1h13.008v12H4.467l.029-12Zm-2.208
61h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003l-.029 1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h.974v1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Z"/><path d="M8.374 6.648a.399.399 0 0 1 .395-.4.402.402 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35V6.648Z"/></svg>',i.bind("isEnabled").to(n,"isEnabled"),i.on("execute",()=>{"mediaEmbed"===r.id?r.hide():this._showDialog()}),i}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),i=e.commands.get("mediaEmbed"),n=e.locale.t;if(!this._formView){const t=e.plugins.get(BM).registry;this._formView=new(Lf(FM))(function(e,t){return[t=>{if(!t.url.length)return e("The URL must not be empty.")},i=>{if(!t.hasMedia(i.url))return e("This media URL is not supported.")}]}(e.t,t),e.locale),this._formView.on("submit",()=>this._handleSubmitForm())}t.show({id:"mediaEmbed",title:n("Insert media"),content:this._formView,isModal:!0,onShow:()=>{this._formView.url=i.value||"",this._formView.resetFormStatus(),this._formView.urlInputView.fieldView.select()},actionButtons:[{label:n("Cancel"),withText:!0,onExecute:()=>t.hide()},{label:n("Accept"),class:"ck-button-action",withText:!0,onExecute:()=>this._handleSubmitForm()}]})}_handleSubmitForm(){const e=this.editor,t=e.plugins.get("Dialog");this._formView.isValid()&&(e.execute("mediaEmbed",this._formView.url),t.hide(),e.editing.view.focus())}}i.MediaEmbedUI=zM;i.MediaEmbed=class extends ps{static get requires(){return[BM,zM,jM,Ry]}static get pluginName(){return"MediaEmbed"}static get isOfficialPlugin(){return!0}};i.MediaEmbedToolbar=class extends ps{static get requires(){return[Ny]}static get pluginName(){return"MediaEmbedToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t;e.plugins.get(Ny).register("mediaEmbed",{ariaLabel:t("Media toolbar"),items:e.config.get("mediaEmbed.toolbar")||[],getRelatedElement:IM})}};const VM={"(":")","[":"]","{":"}"};class HM extends gs{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"mention")}execute(e){const t=this.editor.model,i=t.document.selection,n="string"==typeof e.mention?{id:e.mention}:e.mention,r=n.id,o=e.range||i.getFirstRange();if(!t.canEditAt(o))return;const s=e.text||r,a=WM({_text:s,id:r},n);if(1!=e.marker.length)throw new v("mentioncommand-incorrect-marker",this);if(r.charAt(0)!=e.marker)throw new v("mentioncommand-incorrect-id",this);t.change(e=>{const n=Qo(i.getAttributes()),r=new Map(n.entries());r.set("mention",a);const l=t.insertContent(e.createText(s,r),o),c=l.start.nodeBefore,u=l.end.nodeAfter,h=u&&u.is("$text")&&u.data.startsWith(" ");let d=!1;if(c&&u&&c.is("$text")&&u.is("$text")){const e=c.data.slice(-1),t=e in VM,i=t&&u.data.startsWith(VM[e]);d=t&&i}d||h||t.insertContent(e.createText(" ",n),o.start.getShiftedBy(s.length))})}}class UM extends ps{static get pluginName(){return"MentionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,i=t.document;t.schema.extend("$text",{allowAttributes:"mention"}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",key:"data-mention",classes:"mention"},model:{key:"mention",value:e=>$M(e)}}),e.conversion.for("downcast").attributeToElement({model:"mention",view:qM}),e.conversion.for("downcast").add(GM),i.registerPostFixer(e=>function(e,t,i){const n=t.differ.getChanges();let r=!1;for(const t of n){if("attribute"==t.type)continue;const n=t.position;if("$text"==t.name){const t=n.textNode&&n.textNode.nextSibling;r=ZM(n.textNode,e)||r,r=ZM(t,e)||r,r=ZM(n.nodeBefore,e)||r,r=ZM(n.nodeAfter,e)||r}if("$text"!=t.name&&"insert"==t.type){const t=n.nodeAfter;for(const i of e.createRangeIn(t).getItems())r=ZM(i,e)||r}
6if("insert"==t.type&&i.isInline(t.name)){const t=n.nodeAfter&&n.nodeAfter.nextSibling;r=ZM(n.nodeBefore,e)||r,r=ZM(t,e)||r}}return r}(e,i,t.schema)),i.registerPostFixer(e=>function(e,t){const i=t.differ.getChanges();let n=!1;for(const t of i)if("attribute"===t.type&&"mention"!=t.attributeKey){const i=t.range.start.nodeBefore,r=t.range.end.nodeAfter;for(const o of[i,r])YM(o)&&o.getAttribute(t.attributeKey)!=t.attributeNewValue&&(e.setAttribute(t.attributeKey,t.attributeNewValue,o),n=!0)}return n}(e,i)),i.registerPostFixer(e=>function(e,t){const i=t.selection,n=i.focus;return!!(i.isCollapsed&&i.hasAttribute("mention")&&function(e){const t=e.isAtStart;return e.nodeBefore&&e.nodeBefore.is("$text")||t}(n))&&(e.removeSelectionAttribute("mention"),!0)}(e,i)),e.commands.add("mention",new HM(e))}}function WM(e,t){return Object.assign({uid:p()},e,t||{})}function $M(e,t){const i=e.getAttribute("data-mention"),n=e.getChild(0);if(n)return WM({id:i,_text:n.data},t)}function GM(e){e.on("attribute:mention",(e,t,i)=>{const n=t.attributeNewValue;if(!t.item.is("$textProxy")||!n)return;const r=t.range.start;(r.textNode||r.nodeAfter).data!=n._text&&i.consumable.consume(t.item,e.name)},{priority:"highest"})}function qM(e,t){let{writer:i}=t;if(!e)return;const n={class:"mention","data-mention":e.id},r={id:e.uid,priority:20};return i.createAttributeElement("span",n,r)}function YM(e){return!(!e||!e.is("$text")&&!e.is("$textProxy")||!e.hasAttribute("mention"))&&e.data!=e.getAttribute("mention")._text}function ZM(e,t){return!!YM(e)&&(t.removeAttribute("mention",e),!0)}i.MentionEditing=UM;class XM extends Kp{selected;position;constructor(e){super(e),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const e=this.selected,t=this.items.getIndex(e);this.select(t+1)}selectPrevious(){const e=this.selected,t=this.items.getIndex(e);this.select(t-1)}select(e){let t=0;e>0&&e<this.items.length?t=e:e<0&&(t=this.items.length-1);const i=this.items.get(t);this.selected!==i&&(this.selected&&this.selected.removeHighlight(),i.highlight(),this.selected=i,this._isItemVisibleInScrolledArea(i)||(this.element.scrollTop=i.element.offsetTop))}executeSelected(){this.selected.fire("execute")}_isItemVisibleInScrolledArea(e){return new io(this.element).contains(new io(e.element))}}i.MentionsView=XM;class KM extends Df{domElement;constructor(e,t){super(e),this.template=void 0,this.domElement=t,this.domElement.classList.add("ck-button"),this.set("isOn",!1),this.on("change:isOn",(e,t,i)=>{i?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))}),this.listenTo(this.domElement,"click",()=>{this.fire("execute")})}render(){super.render(),this.element=this.domElement}focus(){this.domElement.focus()}}i.DomWrapperView=KM;class JM extends Yp{item;marker;highlight(){this.children.first.isOn=!0}removeHighlight(){this.children.first.isOn=!1}}i.MentionListItemView=JM;const QM=[Oo.arrowup,Oo.arrowdown,Oo.esc],eP=[Oo.enter,Oo.tab];class tP extends ps{_mentionsView;_mentionsConfigurations;_balloon;_items=new Go;_lastRequested;_requestFeedDebounced;static get pluginName(){return"MentionUI"}static get isOfficialPlugin(){return!0}static get requires(){return[iv]}constructor(e){super(e),this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=Qn(this._requestFeed,100),e.config.define("mention",{feeds:[]})}init(){const e=this.editor,t=e.config.get("mention.commitKeys")||eP,i=QM.concat(t);this._balloon=e.plugins.get(iv),e.editing.view.document.on("keydown",(e,n)=>{var r;r=n.keyCode,i.includes(r)&&this._isUIVisible&&(n.preventDefault(),e.stop(),n.keyCode==Oo.arrowdown&&this._mentionsView.selectNext(),n.keyCode==Oo.arrowup&&this._mentionsView.selectPrevious(),t.includes(n.keyCode)&&this._mentionsView.executeSelected(),n.keyCode==Oo.esc&&this._hideUIAndRemoveMarker())},{priority:"highest"}),Of({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const n=e.config.get("mention.feeds");for(const e of n){const{feed:t,marker:i,dropdownLimit:n}=e;if(!sP(i))throw new v("mentionconfig-incorrect-marker",null,{marker:i});const r={marker:i,feedCallback:"function"==typeof t?t.bind(this.editor):oP(t),itemRenderer:e.itemRenderer,dropdownLimit:n};this._mentionsConfigurations.set(i,r)}this._setupTextWatcher(n),this.listenTo(e,"change:isReadOnly",()=>{this._hideUIAndRemoveMarker()}),this.on("requestFeed:response",(e,t)=>this._handleFeedResponse(t)),this.on("requestFeed:error",()=>this._hideUIAndRemoveMarker())}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const e=this.editor.locale,t=new XM(e);return t.items.bindTo(this._items).using(i=>{const{item:n,marker:r}=i,{dropdownLimit:o}=this._mentionsConfigurations.get(r),s=o||this.editor.config.get("mention.dropdownLimit")||10;if(t.items.length>=s)return null;const a=new JM(e),l=this._renderItem(n,r);return l.delegate("execute").to(a),a.children.add(l),a.item=n,a.marker=r,a.on("execute",()=>{t.fire("execute",{item:n,marker:r})}),a}),t.on("execute",(e,t)=>{const i=this.editor,n=i.model,r=t.item,o=t.marker,s=i.model.markers.get("mention"),a=n.createPositionAt(n.document.selection.focus),l=n.createPositionAt(s.getStart()),c=n.createRange(l,a);this._hideUIAndRemoveMarker(),i.execute("mention",{mention:r,text:r.text,marker:o,range:c}),i.editing.view.focus()}),t}_getItemRenderer(e){const{itemRenderer:t}=this._mentionsConfigurations.get(e);return t}_requestFeed(e,t){this._lastRequested=t;const{feedCallback:i}=this._mentionsConfigurations.get(e),n=i(t);n instanceof Promise?n.then(i=>{this._lastRequested==t?this.fire("requestFeed:response",{feed:i,marker:e,feedText:t}):this.fire("requestFeed:discarded",{feed:i,marker:e,feedText:t})}).catch(t=>{this.fire("requestFeed:error",{error:t}),b("mention-feed-callback-error",{marker:e})}):this.fire("requestFeed:response",{feed:n,marker:e,feedText:t})}_setupTextWatcher(e){const t=this.editor,i=e.map(e=>({...e,pattern:rP(e.marker,e.minimumCharacters||0)})),n=new qv(t.model,function(e){return t=>{const i=nP(e,t);if(!i)return!1;let n=0;0!==i.position&&(n=i.position-1);const r=t.substring(n);return i.pattern.test(r)}}(i));n.on("matched",(e,n)=>{const r=nP(i,n.text),o=t.model.document.selection.focus,s=t.model.createPositionAt(o.parent,r.position);if(function(e){const t=e.textNode&&e.textNode.hasAttribute("mention"),i=e.nodeBefore;return t||i&&i.is("$text")&&i.hasAttribute("mention")}(o)||function(e){const t=e.nodeAfter;return t&&t.is("$text")&&t.hasAttribute("mention")}(s))return void this._hideUIAndRemoveMarker();const a=function(e,t){let i=0;0!==e.position&&(i=e.position-1);const n=rP(e.marker,0);return t.substring(i).match(n)[2]}(r,n.text),l=r.marker.length+a.length,c=o.getShiftedBy(-l),u=o.getShiftedBy(-a.length),h=t.model.createRange(c,u);if(aP(t)){const e=t.model.markers.get("mention");t.model.change(t=>{t.updateMarker(e,{range:h})})}else t.model.change(e=>{e.addMarker("mention",{range:h,usingOperation:!1,affectsData:!1})});this._requestFeedDebounced(r.marker,a)}),n.on("unmatched",()=>{this._hideUIAndRemoveMarker()});const r=t.commands.get("mention");return n.bind("isEnabled").to(r),n}_handleFeedResponse(e){const{feed:t,marker:i}=e;if(!aP(this.editor))return;this._items.clear();for(const e of t){const t="object"!=typeof e?{id:e,text:e}:e;this._items.add({item:t,marker:i})}const n=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(n):this._hideUIAndRemoveMarker()}_showOrUpdateUI(e){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(e,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(e,this._mentionsView.position),singleViewMode:!0}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),aP(this.editor)&&this.editor.model.change(e=>e.removeMarker("mention")),this._mentionsView.position=void 0}_renderItem(e,t){const i=this.editor;let n,r=e.id;const o=this._getItemRenderer(t);if(o){const t=o(e);"string"!=typeof t?n=new KM(i.locale,t):r=t}if(!n){const e=new Ff(i.locale);e.label=r,e.withText=!0,n=e}return n}_getBalloonPanelPositionData(e,t){const i=this.editor,n=i.editing,r=n.view.domConverter,o=n.mapper;return{target:()=>{let t=e.getRange();"$graveyard"==t.start.root.rootName&&(t=i.model.document.selection.getFirstRange());const n=o.toViewRange(t);return io.getDomRangeRects(r.viewRangeToDom(n)).pop()},limiter:()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},positions:iP(t,i.locale.uiLanguageDirection)}}}function iP(e,t){const i={caret_se:e=>({top:e.bottom+3,left:e.right,name:"caret_se",config:{withArrow:!1}
6}),caret_ne:(e,t)=>({top:e.top-t.height-3,left:e.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(e,t)=>({top:e.bottom+3,left:e.right-t.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(e,t)=>({top:e.top-t.height-3,left:e.right-t.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(i,e)?[i[e]]:"rtl"!==t?[i.caret_se,i.caret_sw,i.caret_ne,i.caret_nw]:[i.caret_sw,i.caret_se,i.caret_nw,i.caret_ne]}function nP(e,t){let i;for(const n of e){const e=t.lastIndexOf(n.marker);e>0&&!t.substring(e-1).match(n.pattern)||(!i||e>=i.position)&&(i={marker:n.marker,position:e,minimumCharacters:n.minimumCharacters,pattern:n.pattern})}return i}function rP(e,t){const i=0==t?"*":`{${t},}`,n=s.features.isRegExpUnicodePropertySupported?"\\p{Ps}\\p{Pi}\"'":"\\(\\[{\"'";return e=e.replace(/[.*+?^${}()\-|[\]\\]/g,"\\$&"),new RegExp(`(?:^|[ ${n}])([${e}])(.${i})$`,"u")}function oP(e){return t=>e.filter(e=>("string"==typeof e?e:String(e.id)).toLowerCase().includes(t.toLowerCase()))}function sP(e){return e&&1==e.length}function aP(e){return e.model.markers.has("mention")}i.MentionUI=tP;i.Mention=class extends ps{toMentionAttribute(e,t){return $M(e,t)}static get pluginName(){return"Mention"}static get isOfficialPlugin(){return!0}static get requires(){return[UM,tP]}};const lP=co("px");class cP extends Jg{_options;constructor(e,t){super(e);const i=this.bindTemplate;this.set("top",0),this.set("height",0),this._options=t,this.extendTemplate({attributes:{tabindex:-1,"aria-hidden":"true",class:["ck-minimap__iframe"],style:{top:i.to("top",e=>lP(e)),height:i.to("height",e=>lP(e))}}})}render(){return super.render().then(()=>{this._prepareDocument()})}setHeight(e){this.height=e}setTopOffset(e){this.top=e}_prepareDocument(){const e=this.element.contentWindow.document,t=e.adoptNode(this._options.domRootClone),i=this._options.useSimplePreview?"\n\t\t\t.ck.ck-editor__editable_inline img {\n\t\t\t\tfilter: contrast( 0 );\n\t\t\t}\n\n\t\t\tp, li, a, figcaption, span {\n\t\t\t\tbackground: hsl(0, 0%, 80%) !important;\n\t\t\t\tcolor: hsl(0, 0%, 80%) !important;\n\t\t\t}\n\n\t\t\th1, h2, h3, h4 {\n\t\t\t\tbackground: hsl(0, 0%, 60%) !important;\n\t\t\t\tcolor: hsl(0, 0%, 60%) !important;\n\t\t\t}\n\t\t":"",n=`<!DOCTYPE html><html lang="en">\n\t\t\t<head>\n\t\t\t\t<meta charset="utf-8">\n\t\t\t\t<meta name="viewport" content="width=device-width, initial-scale=1">\n\t\t\t\t${this._options.pageStyles.map(e=>"string"==typeof e?`<style>${e}</style>`:`<link rel="stylesheet" type="text/css" href="${e.href}">`).join("\n")}\n\t\t\t\t<style>\n\t\t\t\t\thtml, body {\n\t\t\t\t\t\tmargin: 0 !important;\n\t\t\t\t\t\tpadding: 0 !important;\n\t\t\t\t\t}\n\n\t\t\t\t\thtml {\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t}\n\n\t\t\t\t\tbody {\n\t\t\t\t\t\ttransform: scale( ${this._options.scaleRatio} );\n\t\t\t\t\t\ttransform-origin: 0 0;\n\t\t\t\t\t\toverflow: visible;\n\t\t\t\t\t}\n\n\t\t\t\t\t.ck.ck-editor__editable_inline {\n\t\t\t\t\t\tmargin: 0 !important;\n\t\t\t\t\t\tborder-color: transparent !important;\n\t\t\t\t\t\toutline-color: transparent !important;\n\t\t\t\t\t\tbox-shadow: none !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t.ck.ck-content {\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t}\n\n\t\t\t\t\t${i}\n\t\t\t\t</style>\n\t\t\t</head>\n\t\t\t<body class="${this._options.extraClasses||""}"></body>\n\t\t</html>`;e.open(),e.write(n),e.close(),e.body.appendChild(t)}}const uP=co("px");class hP extends Df{constructor(e){super(e);const t=this.bindTemplate;this.set("height",0),this.set("top",0),this.set("scrollProgress",0),this.set("_isDragging",!1),this.setTemplate({tag:"div",attributes:{class:["ck","ck-minimap__position-tracker",t.if("_isDragging","ck-minimap__position-tracker_dragging")],style:{top:t.to("top",e=>uP(e)),height:t.to("height",e=>uP(e))},"data-progress":t.to("scrollProgress")},on:{mousedown:t.to(()=>{this._isDragging=!0})}})}render(){super.render(),this.listenTo(r.document,"mousemove",(e,t)=>{this._isDragging&&this.fire("drag",t.movementY)},{useCapture:!0}),this.listenTo(r.document,"mouseup",()=>{this._isDragging=!1},{useCapture:!0})}setHeight(e){this.height=e}setTopOffset(e){this.top=e}setScrollProgress(e){this.scrollProgress=e}}class dP extends Df{_positionTrackerView;_scaleRatio;_minimapIframeView;constructor(e){let{locale:t,scaleRatio:i,pageStyles:n,extraClasse
6s:r,useSimplePreview:o,domRootClone:s}=e;super(t);const a=this.bindTemplate;this._positionTrackerView=new hP(t),this._positionTrackerView.delegate("drag").to(this),this._scaleRatio=i,this._minimapIframeView=new cP(t,{useSimplePreview:o,pageStyles:n,extraClasses:r,scaleRatio:i,domRootClone:s}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-minimap"]},children:[this._positionTrackerView],on:{click:a.to(this._handleMinimapClick.bind(this)),wheel:a.to(this._handleMinimapMouseWheel.bind(this))}})}destroy(){this._minimapIframeView.destroy(),super.destroy()}get height(){return new io(this.element).height}get scrollHeight(){return Math.max(0,Math.min(this.height,this._minimapIframeView.height)-this._positionTrackerView.height)}render(){super.render(),this._minimapIframeView.render(),this.element.appendChild(this._minimapIframeView.element)}setContentHeight(e){this._minimapIframeView.setHeight(e*this._scaleRatio)}setScrollProgress(e){const t=this._minimapIframeView,i=this._positionTrackerView;if(t.height<this.height)t.setTopOffset(0),i.setTopOffset((t.height-i.height)*e);else{const n=t.height-this.height;t.setTopOffset(-n*e),i.setTopOffset((this.height-i.height)*e)}i.setScrollProgress(Math.round(100*e))}setPositionTrackerHeight(e){this._positionTrackerView.setHeight(e*this._scaleRatio)}_handleMinimapClick(e){const t=this._positionTrackerView;if(e.target===t.element)return;const i=new io(t.element),n=(e.clientY-i.top-i.height/2)/this._minimapIframeView.height;this.fire("click",n)}_handleMinimapMouseWheel(e){this.fire("drag",e.deltaY*this._scaleRatio)}}function fP(e,t){const i=e.editing.view.document,n=i.getRoot(t),r=new Ya(i),o=new ja(r,i.selection),s=e.editing.view.getDomRoot().cloneNode();return r.bindElements(s,n),o.markToSync("children",n),o.markToSync("attributes",n),n.on("change:children",(e,t)=>o.markToSync("children",t)),n.on("change:attributes",(e,t)=>o.markToSync("attributes",t)),n.on("change:text",(e,t)=>o.markToSync("text",t)),o.render(),e.editing.view.on("render",()=>o.render()),e.on("destroy",()=>{r.unbindDomElement(s)}),s}function pP(e){return new io(e===r.document.body?r.window:e)}function mP(e){return e===r.document.body?r.window:e}i.Minimap=class extends ps{static get pluginName(){return"Minimap"}static get isOfficialPlugin(){return!0}_minimapView;_scrollableRootAncestor;_editingRootElement;init(){const e=this.editor;this._minimapView=null,this._scrollableRootAncestor=null,this.listenTo(e.ui,"ready",this._onUiReady.bind(this))}destroy(){super.destroy(),this._minimapView.destroy(),this._minimapView.element.remove()}_onUiReady(){const e=this.editor,t=this._editingRootElement=e.ui.getEditableElement();this._scrollableRootAncestor=qr(t),t.ownerDocument.body.contains(t)?(this._initializeMinimapView(),this.listenTo(e.editing.view,"render",()=>{"ready"===e.state&&this._syncMinimapToEditingRootScrollPosition()}),this._syncMinimapToEditingRootScrollPosition()):e.ui.once("update",this._onUiReady.bind(this))}_initializeMinimapView(){const e=this.editor,t=e.locale,i=e.config.get("minimap.useSimplePreview"),n=e.config.get("minimap.container"),o=this._scrollableRootAncestor,s=pP(this._editingRootElement).width,a=pP(n).width/s,l=this._minimapView=new dP({locale:t,scaleRatio:a,pageStyles:Array.from(r.document.styleSheets).map(e=>e.href&&!e.href.startsWith(r.window.location.origin)?{href:e.href}:Array.from(e.cssRules).filter(e=>!(e instanceof CSSMediaRule)).map(e=>e.cssText).join(" \n")),extraClasses:e.config.get("minimap.extraClasses"),useSimplePreview:i,domRootClone:fP(e)});l.render(),l.listenTo(r.document,"scroll",(e,t)=>{if(o===r.document.body){if(t.target!==r.document)return}else if(t.target!==o)return;this._syncMinimapToEditingRootScrollPosition()},{useCapture:!0,usePassive:!0}),l.listenTo(r.window,"resize",()=>{this._syncMinimapToEditingRootScrollPosition()}),l.on("drag",(e,t)=>{let i;i=0===l.scrollHeight?0:t/l.scrollHeight;const n=i*(o.scrollHeight-((s=o)===r.document.body?r.window.innerHeight:s.clientHeight));var s;mP(o).scrollBy(0,Math.round(n))}),l.on("click",(e,t)=>{const i=t*o.scrollHeight;mP(o).scrollBy(0,Math.round(i))}),n.appendChild(l.element)}_syncMinimapToEditingRootScrollPosition(){const e=this._editingRootElement,t=this._minimapView;t.setContentHeight(e.offsetHeight);const i=pP(e),n=pP(this._scrollableRootAncestor);let r;n.contains(i)||i.top>n.top?r=0:(r=(i.top-n.top)/(n.height-i.height),r=Math.max(0,Math.min(r,1))),t.setPositionTrackerHeight(n.getIntersection(i).height),t.setScrollProgress(r)}};class gP extends gs{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=function(e,t,i){const n=function(e,t){const i=ky(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(e,i);return t.checkChild(n,"pageBreak")}(i,t,e)}execute(){const e=this.editor.model;e.change(t=>{const i=t.createElement("pageBreak");
6e.insertObject(i,null,null,{setSelection:"after"})})}}class vP extends ps{static get pluginName(){return"PageBreakEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;t.register("pageBreak",{inheritAllFrom:"$blockObject"}),n.for("dataDowncast").elementToStructure({model:"pageBreak",view:(e,t)=>{let{writer:i}=t;return i.createContainerElement("div",{class:"page-break",style:"page-break-after: always"},i.createContainerElement("span",{style:"display: none"}))}}),n.for("editingDowncast").elementToStructure({model:"pageBreak",view:(e,t)=>{let{writer:n}=t;const r=i("Page break"),o=n.createContainerElement("div"),s=n.createRawElement("span",{class:"page-break__label"},function(e){e.innerText=i("Page break")});return n.addClass("page-break",o),n.insert(n.createPositionAt(o,0),s),function(e,t,i){return t.setCustomProperty("pageBreak",!0,e),my(e,t,{label:i})}(o,n,r)}}),n.for("upcast").elementToElement({view:e=>{const t="always"==e.getStyle("page-break-before"),i="always"==e.getStyle("page-break-after");if(!t&&!i)return null;if(1==e.childCount){const t=e.getChild(0);if(!t.is("element","span")||"none"!=t.getStyle("display"))return null}else if(e.childCount>1)return null;return{name:!0}},model:"pageBreak",converterPriority:"high"}),e.commands.add("pageBreak",new gP(e))}}i.PageBreakEditing=vP;class bP extends ps{static get pluginName(){return"PageBreakUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("pageBreak",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:pageBreak",()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("pageBreak"),r=new e(t.locale),o=i.t;return r.set({label:o("Page break"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.598.687h1.5v5h-1.5zm14.5 0h1.5v5h-1.5z"/><path d="M19.598 4.187v1.5h-16v-1.5zm-16 14.569h1.5v-5h-1.5zm14.5 0h1.5v-5h-1.5z"/><path d="M19.598 15.256v-1.5h-16v1.5zM5.081 9h6v2h-6zm8 0h6v2h-6zm-9.483 1L0 12.5v-5z"/></svg>'}),r.bind("isEnabled").to(n,"isEnabled"),this.listenTo(r,"execute",()=>{t.execute("pageBreak"),t.editing.view.focus()}),r}}i.PageBreakUI=bP;function yP(e){return void 0!==e&&e.endsWith("px")}function wP(e){return e.toFixed(2).replace(/\.?0+$/,"")+"px"}function _P(e){return function(e){return e.is("element","ol")||e.is("element","ul")}(e.element.previousSibling||e.element.parent)}function kP(e,t){const i=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,r=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,o=new RegExp(`@list\\s+l${e.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),s=new RegExp(`@list l${e.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),a=o.exec(t),l=s.exec(t),c=a&&!l,u=i.exec(t);let h="decimal",d="ol",f=null;if(u&&u[1]){const t=n.exec(u[1]);if(t&&t[1]&&(h=t[1].trim(),d="bullet"!==h&&"image"!==h?"ol":"ul"),"bullet"===h){const t=function(e){if("li"==e.name&&"ul"==e.parent.name&&e.parent.hasAttribute("type"))return e.parent.getAttribute("type");const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const i=t._data;return"o"===i?"circle":"·"===i?"disc":"§"===i?"square":null}(e.element);t&&(h=t)}else{const e=r.exec(u[1]);e&&e[1]&&(f=parseInt(e[1]))}c&&(d="ol")}return{type:d,startIndex:f,style:xP(h),isLegalStyleList:c}}function xP(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function CP(e,t,i){const n=t.createElement(e.type);return e.style&&t.setStyle("list-style-type",e.style,n),e.startIndex&&e.startIndex>1&&t.setAttribute("start",e.startIndex,n),e.isLegalStyleList&&i&&t.addClass("legal-list",n),n}function SP(e){const t=e.getStyle("mso-list");if(void 0===t)return{};const i=t.match(/(^|\s{1,100})l(\d+)/i),n=t.match(/\s{0,100}lfo(\d+)/i),r=t.match(/\s{0,100}level(\d+)/i);return i&&n&&r?{id:i[2],order:n[1],indent:parseInt(r[1])}:{indent:1}}function EP(e,t){const i=new Rs({name:"span",styles:{"mso-list":"Ignore"}}),n=t.createRangeIn(e);for(const e of n)"elementStart"===e.type&&i.match(e.item)&&t.remove(e.item)}function TP(e){const t=e.getStyle("margin-left");return void 0===t||t.endsWith("px")?t:function(e){const t=parseFloat(e);return e.endsWith("pt")?wP(96*t/72):e.endsWith("pc")?wP(12*t*96/72):e.endsWith("in")?wP(96*t):e.endsWith("cm")?wP(96*t/2.54):e.endsWith("mm")?wP(t/10*96/2.54):e}(t)}function AP(e){return btoa(e.match(/\w{2}/g).map(e=>String.fromCharCode(parseInt(e,16))).join(""))}i.PageBreak=class extends ps{static get requires(){return[vP,bP,Ry]}static get pluginName(){return"PageBreak"}static get isOfficialPlugin(){return!0}};const IP=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>
6/i,MP=/xmlns:o="urn:schemas-microsoft-com/i;class PP{document;hasMultiLevelListPlugin;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.document=e,this.hasMultiLevelListPlugin=t}isActive(e){return IP.test(e)||MP.test(e)}execute(e){const t=new gh(this.document),{body:i,stylesString:n}=e._parsedData;!function(e,t){const i=[];for(const n of t.createRangeIn(e)){const e=n.item;e.is("element","a")&&!e.hasAttribute("href")&&(e.hasAttribute("id")||e.hasAttribute("name"))&&i.push(e)}for(const e of i){const i=e.parent.getChildIndex(e)+1,n=e.getChildren();t.insertChild(i,n,e.parent)}}(i,t),function(e,t,i){if(!e.childCount)return;const n=new gh(e.document),r=function(e,t){const i=t.createRangeIn(e),n=[],r=new Set;for(const e of i.getItems()){if(!e.is("element")||!e.name.match(/^(p|h\d+|li|div)$/))continue;let t=TP(e);if(void 0===t||0!=parseFloat(t)||Array.from(e.getClassNames()).find(e=>e.startsWith("MsoList"))||(t=void 0),e.hasStyle("mso-list")||void 0!==t&&r.has(t)){const i=SP(e);n.push({element:e,id:i.id,order:i.order,indent:i.indent,marginLeft:t}),void 0!==t&&r.add(t)}else r.clear()}return n}(e,n);if(!r.length)return;const o={},s=[];for(const e of r)if(void 0!==e.indent){_P(e)||(s.length=0);const r=`${e.id}:${e.indent}`,a=Math.min(e.indent-1,s.length);if(a<s.length&&s[a].id!==e.id&&(s.length=a),a<s.length-1)s.length=a+1;else{const l=kP(e,t);if(a>s.length-1||s[a].listElement.name!=l.type){0==a&&"ol"==l.type&&void 0!==e.id&&o[r]&&(l.startIndex=o[r]);const t=CP(l,n,i);if(yP(e.marginLeft)&&(0==a||yP(s[a-1].marginLeft))){let i=e.marginLeft;a>0&&(i=wP(parseFloat(i)-parseFloat(s[a-1].marginLeft))),n.setStyle("padding-left",i,t)}if(0==s.length){const i=e.element.parent,r=i.getChildIndex(e.element)+1;n.insertChild(r,t,i)}else{const e=s[a-1].listItemElements;n.appendChild(t,e[e.length-1])}s[a]={...e,listElement:t,listItemElements:[]},0==a&&void 0!==e.id&&(o[r]=l.startIndex||1)}}const l="li"==e.element.name?e.element:n.createElement("li");n.appendChild(l,s[a].listElement),s[a].listItemElements.push(l),0==a&&void 0!==e.id&&o[r]++,e.element!=l&&n.appendChild(e.element,l),EP(e.element,n),n.removeStyle("text-indent",e.element),n.removeStyle("margin-left",e.element)}else{const t=s.find(t=>t.marginLeft==e.marginLeft);if(t){const i=t.listItemElements;n.appendChild(e.element,i[i.length-1]),n.removeStyle("margin-left",e.element)}else s.length=0}}(i,n,this.hasMultiLevelListPlugin),function(e,t){if(!e.childCount)return;const i=new gh(e.document),n=function(e,t){const i=t.createRangeIn(e),n=new Rs({name:/v:(.+)/}),r=[];for(const e of i){if("elementStart"!=e.type)continue;const t=e.item,i=t.previousSibling,o=i&&i.is("element")?i.name:null,s=["Chart"],a=n.match(t),l=t.getAttribute("o:gfxdata"),c="v:shapetype"===o,u=l&&s.some(e=>t.getAttribute("id").includes(e));a&&l&&!c&&!u&&r.push(e.item.getAttribute("id"))}return r}(e,i);!function(e,t,i){const n=i.createRangeIn(t),r=new Rs({name:"img"}),o=[];for(const t of n)if(t.item.is("element")&&r.match(t.item)){const i=t.item,n=i.getAttribute("v:shapes")?i.getAttribute("v:shapes").split(" "):[];n.length&&n.every(t=>e.indexOf(t)>-1)?o.push(i):i.getAttribute("src")||o.push(i)}for(const e of o)i.remove(e)}(n,e,i),function(e,t,i){const n=i.createRangeIn(t),r=[];for(const t of n)if("elementStart"==t.type&&t.item.is("element","v:shape")){const i=t.item.getAttribute("id");if(e.includes(i))continue;o(t.item.parent.getChildren(),i)||r.push(t.item)}for(const e of r){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const n=i.createElement("img",t);i.insertChild(e.index+1,n,e.parent)}function o(e,t){for(const i of e)if(i.is("element")){if("img"==i.name&&i.getAttribute("v:shapes")==t)return!0;if(o(i.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(n,e,i),function(e,t){const i=t.createRangeIn(e),n=new Rs({name:/v:(.+)/}),r=[];for(const e of i)"elementStart"==e.type&&n.match(e.item)&&r.push(e.item);for(const e of r)t.remove(e)}(e,i);const r=function(e,t){const i=t.createRangeIn(e),n=new Rs({name:"img"}),r=[];for(const e of i)e.item.is("element")&&n.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&r.push(e.item);return r}(e,i);r.length&&function(e,t,i){if(e.length===t.length)for(let n=0;n<e.length;n++){const r=`data:${t[n].type};base64,${AP(t[n].hex)}`;i.setAttribute("src",r,e[n])}}(r,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,i=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),n=e.match(i),r=[];if(n)for(const e of n){let i=!1;e.includes("\\pngblip")?i="image/png":e.includes("\\jpegblip")&&(i="image/jpeg"),i&&r.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:i})}return r}(t),i)}(i,e.dataTransfer.getData("text/rtf")),function(e){const t=[],i=new gh(e.document);for(const{item:n}of i.createRangeIn(e))if(n.is("element")){for(const e of n.getClassNames())/\bmso/gi.exec(e)&&i.removeClass(e,n);for(const e of n.getStyleNames())/\bmso/gi.exec(e)&&i.removeStyle(e,n);(n.is("element","w:sdt")||n.is("element","w:sdtpr")&&n.isEmpty||n.is("element","o:p")&&n.isEmpty)&&t.pu
6sh(n)}for(const e of t){const t=e.parent,n=t.getChildIndex(e);i.insertChild(n,e.getChildren(),t),i.remove(e)}}(i),e.content=i}}function DP(e,t,i,n){let{blockElements:r,inlineObjectElements:o}=n,s=i.createPositionAt(e,"forward"==t?"after":"before");return s=s.getLastMatchingPosition(e=>{let{item:t}=e;return t.is("element")&&!r.includes(t.name)&&!o.includes(t.name)},{direction:t}),"forward"==t?s.nodeAfter:s.nodeBefore}function OP(e,t){return!!e&&e.is("element")&&t.includes(e.name)}i.MSWordNormalizer=PP;const LP=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class RP{document;constructor(e){this.document=e}isActive(e){return LP.test(e)}execute(e){const t=new gh(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","b")&&"normal"===i.getStyle("font-weight")){const n=e.getChildIndex(i);t.remove(i),t.insertChild(n,i.getChildren(),e)}}(i,t),function(e,t){for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","li")){const i=e.getChild(0);i&&i.is("element","p")&&t.unwrapElement(i)}}}(i,t),function(e,t){const i=new la(t.document.stylesProcessor),n=new Ya(i,{renderingMode:"data"}),r=n.blockElements,o=n.inlineObjectElements,s=[];for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","br")){const i=DP(e,"forward",t,{blockElements:r,inlineObjectElements:o}),n=DP(e,"backward",t,{blockElements:r,inlineObjectElements:o}),a=OP(i,r);(OP(n,r)||a)&&s.push(e)}}for(const e of s)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(i,t),e.content=i}}const BP=/<google-sheets-html-origin/i;class NP{document;constructor(e){this.document=e}isActive(e){return BP.test(e)}execute(e){const t=new gh(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","google-sheets-html-origin")){const n=e.getChildIndex(i);t.remove(i),t.insertChild(n,i.getChildren(),e)}}(i,t),function(e,t){for(const i of e.getChildren())i.is("element","table")&&i.hasAttribute("xmlns")&&t.removeAttribute("xmlns",i)}(i,t),function(e,t){for(const i of e.getChildren())i.is("element","table")&&"0px"===i.getStyle("width")&&t.removeStyle("width",i)}(i,t),function(e,t){for(const i of Array.from(e.getChildren()))i.is("element","style")&&t.remove(i)}(i,t),e.content=i}}function jP(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1===t.length?" ":Array(t.length+1).join("Â ").substr(0,t.length))}function FP(e,t){const i=new DOMParser,n=function(e){return jP(jP(e)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/(<span\s+style=['"]letter-spacing:[^'"]+?['"]>)[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g,"Â </").replace(/ <o:p><\/o:p>/g,"Â <o:p></o:p>").replace(/<o:p>( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}(function(e){const t="</body>",i=e.indexOf(t);if(i<0)return e;const n=e.indexOf("</html>",i+7);return e.substring(0,i+7)+(n>=0?e.substring(n):"")}(e=(e=e.replace(/<!--\[if gte vml 1]>/g,"")).replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,""))),r=i.parseFromString(n,"text/html");!function(e){e.querySelectorAll("span[style*=spacerun]").forEach(e=>{const t=e,i=t.innerText.length||0;t.innerText=Array(i+1).join("Â ").substr(0,i)})}(r);const o=r.body.innerHTML,s=function(e,t){const i=new la(t),n=new Ya(i,{renderingMode:"data"}),r=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)r.appendChild(o[0]);return n.domToView(r,{skipComments:!0})}(r,t),a=function(e){const t=[],i=[],n=Array.from(e.getElementsByTagName("style"));for(const e of n)e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length&&(t.push(e.sheet),i.push(e.innerHTML));return{styles:t,stylesString:i.join(" ")}}(r);return{body:s,bodyString:o,styles:a.styles,stylesString:a.stylesString}}i.PasteFromOffice=class extends ps{static get pluginName(){return"PasteFromOffice"}static get isOfficialPlugin(){return!0}static get requires(){return[Hw]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),i=e.editing.view.document,n=[],r=this.editor.plugins.has("MultiLevelList");n.push(new PP(i,r)),n.push(new RP(i)),n.push(new NP(i)),t.on("inputTransformation",(t,r)=>{if(r._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const o=r.dataTransfer.getData("text/html"),s=n.find(e=>e.isActive(o));s&&(r._parsedData||(r._parsedData=FP(o,i.stylesProcessor)),s.execute(r),r._isTransformedWithPasteFromOffice=!0)},{priority:"high"})}};const zP="removeFormat";class VP extends ps{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add(zP,()=>{const e=this._createButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add(`menuBar:${zP}`,()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get(zP),r=new e(t.locale),o=i.t;return r.set({label:o("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>'}),r.bind("isEnabled").to(n,"isEnabled"),this.listenTo(r,"execute",()=>{t.execute(zP),t.editing.view.focus()}),r}}i.RemoveFormatUI=VP;class HP extends gs{refresh(){const e=this.editor.model;this.isEnabled=!!qo(this._getFormattingItems(e.document.selection,e.schema))}execute(){const e=this.editor.model,t=e.schema;e.change(i=>{for(const n of this._getFormattingItems(e.document.selection,t))if(n.is("selection"))for(const e of this._getFormattingAttributes(n,t))i.removeSelectionAttribute(e);else{const e=i.createRangeOn(n);for(const r of this._getFormattingAttributes(n,t))i.removeAttribute(r,e)}})}*_getFormattingItems(e,t){const i=e=>!!qo(this._getFormattingAttributes(e,t));for(const n of e.getRanges())for(const e of n.getItems())!t.isBlock(e)&&i(e)&&(yield e);for(const t of e.getSelectedBlocks())i(t)&&(yield t);i(e)&&(yield e)}*_getFormattingAttributes(e,t){for(const[i]of e.getAttributes()){const e=t.getAttributeProperties(i);e&&e.isFormatting&&(yield i)}}}class UP extends ps{static get pluginName(){return"RemoveFormatEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.commands.add("removeFormat",new HP(e))}}i.RemoveFormatEditing=UP;i.RemoveFormat=class extends ps{static get requires(){return[UP,VP]}static get pluginName(){return"RemoveFormat"}static get isOfficialPlugin(){return!0}};class WP extends gs{_direction;constructor(e,t){super(e),this.affectsData=!1,this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=$P(this.editor.model,this._direction);e&&this.editor.model.change(t=>{t.setSelection(e)})}_checkEnabled(){return!!$P(this.editor.model,this._direction)}}function $P(e,t){const i=e.document.selection.getFirstPosition(),n=[];for(const r of e.markers.getMarkersGroup("restrictedEditingException")){const e=r.getRange(),o=i.isTouching(e.start)&&i.hasSameParentAs(e.start)||i.isTouching(e.end)&&i.hasSameParentAs(e.end);e.containsPosition(i)||o||("forward"===t&&e.start.isAfter(i)||"backward"===t&&e.end.isBefore(i))&&n.push(e)}if(n.length)return n.sort((e,i)=>"forward"===t?e.start.isAfter(i.start)?1:-1:e.start.isBefore(i.start)?1:-1).shift()}function GP(e,t){for(const i of e.model.markers)if(qP(i.getRange(),t)&&i.name.startsWith("restrictedEditingException:"))return i}function qP(e,t){return e.containsPosition(t)||e.end.isEqual(t)||e.start.isEqual(t)}const YP="restricted-editing-exception_selected";function ZP(e,t,i,n){const r=GP(e,t.getShiftedBy(i));return!(!r||!r.getStart().isEqual(t.getShiftedBy(i))||(n.updateMarker(r,{range:n.createRange(r.getStart().getShiftedBy(-i),r.getEnd())}),0))}function XP(e,t,i,n){const r=GP(e,t);return!(!r||!r.getEnd().isEqual(t)||(n.updateMarker(r,{range:n.createRange(r.getStart(),r.getEnd().getShiftedBy(i))}),0))}const KP="RestrictedEditingMode";class JP extends ps{_alwaysEnabled;_allowedInException;static get pluginName(){return"RestrictedEditingModeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("restrictedEditing",{allowedCommands:["bold","italic","link","unlink"],allowedAttributes:["bold","italic","linkHref"]}),this._alwaysEnabled=new Set(["undo","redo"]),this._allowedInException=new Set(["input","insertText","delete","deleteForward"])}init(){const e=this.editor,t=e.editing.view;
6e.config.get("restrictedEditing.allowedCommands").forEach(e=>this._allowedInException.add(e)),this._setupConversion(),this._setupCommandsToggling(),this._setupRestrictions(),e.commands.add("goToPreviousRestrictedEditingException",new WP(e,"backward")),e.commands.add("goToNextRestrictedEditingException",new WP(e,"forward")),this.listenTo(t.document,"tab",(t,i)=>{const n=i.shiftKey?"goToPreviousRestrictedEditingException":"goToNextRestrictedEditingException";e.commands.get(n).isEnabled&&(e.execute(n),i.preventDefault(),i.stopPropagation()),t.stop()},{context:"$capture"}),e.keystrokes.set("Ctrl+A",function(e){return(t,i)=>{const n=e.model,r=e.model.document.selection,o=GP(e,r.focus);if(!o)return;const s=r.getFirstRange();(o.getRange().containsRange(s,!0)||r.isCollapsed)&&(i(),n.change(e=>{e.setSelection(o.getRange())}))}}(e)),t.change(e=>{for(const i of t.document.roots)e.addClass("ck-restricted-editing_mode_restricted",i)}),e.data.on("set",()=>{e.model.change(t=>{for(const i of e.model.markers.getMarkersGroup("restrictedEditingException"))t.removeMarker(i.name)})},{priority:"high"})}enableCommand(e){this.editor.commands.get(e).clearForceDisabled(KP),this._alwaysEnabled.add(e)}_setupConversion(){const e=this.editor,t=e.model.document;let i=0;var n;e.conversion.for("upcast").add((n={view:{name:"span",classes:"restricted-editing-exception"},model:()=>(i++,`restrictedEditingException:${i}`)},e=>e.on("element:span",(e,t,i)=>{const{writer:r}=i,o=new Rs(n.view).match(t.viewItem);if(!o)return;const s=o.match;s.name=!0;const{modelRange:a}=i.convertChildren(t.viewItem,t.modelCursor);i.consumable.consume(t.viewItem,s);const l=n.model(),c=r.createElement("$marker",{"data-name":l}),u=r.createElement("$marker",{"data-name":l});r.insert(u,a.end),r.insert(c,a.start),t.modelRange=r.createRange(r.createPositionBefore(c),r.createPositionAfter(u)),t.modelCursor=t.modelRange.end}))),e.conversion.for("downcast").add(e=>{e.on("addMarker:restrictedEditingException",(e,t,i)=>{if(!t.item)return;if(t.item.is("selection")||!i.schema.isInline(t.item))return;if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=n.createAttributeElement("span",{class:"restricted-editing-exception"},{id:t.markerName,priority:-10}),o=i.mapper.toViewRange(t.range),s=n.wrap(o,r);for(const e of s.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){i.mapper.bindElementToMarker(e,t.markerName);break}})}),e.conversion.for("downcast").markerToHighlight({model:"restrictedEditingException",view:()=>({name:"span",classes:"restricted-editing-exception",priority:-10})}),e.conversion.for("editingDowncast").markerToElement({model:"restrictedEditingException",view:(e,t)=>{let{writer:i}=t;return i.createUIElement("span",{class:"restricted-editing-exception restricted-editing-exception_collapsed"})}}),e.conversion.for("dataDowncast").markerToElement({model:"restrictedEditingException",view:(e,t)=>{let{writer:i}=t;return i.createEmptyElement("span",{class:"restricted-editing-exception"})}}),t.registerPostFixer(function(e){return t=>{let i=!1;const n=e.model.schema;for(const r of e.model.document.differ.getChanges())"insert"==r.type&&n.checkChild("$block",r.name)&&(i=ZP(e,r.position,r.length,t)||i,i=XP(e,r.position,r.length,t)||i);return i}}(e)),t.registerPostFixer(function(e){return t=>{let i=!1;for(const{name:n,data:r}of e.model.document.differ.getChangedMarkers())n.startsWith("restrictedEditingException")&&r.newRange&&"$graveyard"==r.newRange.root.rootName&&(t.updateMarker(n,{range:t.createRange(t.createPositionAt(r.oldRange.start))}),i=!0);return i}}(e)),t.registerPostFixer(function(e){return t=>{let i=!1;const n=e.model.document.differ.getChangedMarkers();for(const{data:e,name:r}of n){if(!r.startsWith("restrictedEditingException"))continue;const n=e.newRange;if(!e.oldRange&&!n.isFlat){const e=n.start,o=n.end,s=e.path.length>o.path.length,a=s?n.start:t.createPositionAt(o.parent,0),l=s?t.createPositionAt(e.parent,"end"):n.end;t.updateMarker(r,{range:t.createRange(a,l)}),i=!0}}return i}}(e)),function(e){const t=e.editing.view,i=e.model,n=new Set;t.document.registerPostFixer(t=>{const r=i.document.selection,o=GP(e,r.anchor);if(!o)return!1;for(const i of e.editing.mapper.markerNameToElements(o.name))t.addClass(YP,i),n.add(i);return!1}),e.conversion.for("editingDowncast").add(e=>{function i(){t.change(e=>{for(const t of n.values())e.removeClass(YP,t),n.delete(t)})}e.on("insert",i,{priority:"highest"}),e.on("remove",i,{priority:"highest"}),e.on("attribute",i,{priority:"highest"}),e.on("cleanSelection",i)})}(e)}_setupRestrictions(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view.document,r=e.plugins.get("ClipboardPipeline");this.listenTo(t,"deleteContent",function(e){return(t,i)=>{const[n]=i,r=GP(e,n.focus)||GP(e,n.anchor);if(!r)return void t.stop();if(n.isCollapsed)return;const o=r.getRange().getIntersection(n.getFirstRange());n.is("documentSelection")?e.model.change(e=>{e.setSelection(o)}):n.setTo(o)}}(e),{priority:"high"});const o=e.commands.get("insertText");o&&this.listenTo(o,"execute",function(e){return(t,i)=>{const[n]=i,{range:r}=n;r&&(eD(e,r)||t.stop())}}(e),{priority:"high"}),this.listenTo(r,"contentInsertion",t=>{eD(e,i.getFirstRange())||t.stop()}),this.listenTo(n,"clipboardOutput",(t,n)=>{"cut"!=n.method||eD(e,i.getFirstRange())||t.stop()},{priority:"high"});const s=e.config.get("restrictedEditing.allowedAttributes");
6t.schema.addAttributeCheck(function(e){return(t,i)=>{if(t.startsWith("$clipboardHolder"))return e.includes(i)}}(s)),t.schema.addChildCheck((e,t)=>{if(e.startsWith("$clipboardHolder"))return"$text"===t.name})}_setupCommandsToggling(){const e=this.editor.model.document;this._disableCommands(),this.listenTo(e.selection,"change",this._checkCommands.bind(this)),this.listenTo(e,"change:data",this._checkCommands.bind(this))}_checkCommands(){const e=this.editor,t=e.model.document.selection;if(t.rangeCount>1)return void this._disableCommands();const i=GP(e,t.focus);this._disableCommands(),function(e,t){if(!t)return!1;const i=t.getRange();return e.isCollapsed?qP(i,e.focus):i.containsRange(e.getFirstRange(),!0)}(t,i)&&this._enableCommands(i)}_enableCommands(e){const t=this.editor;for(const[i,n]of t.commands)n.affectsData&&!this._alwaysEnabled.has(i)&&this._allowedInException.has(i)&&(QP(i,t.model.document.selection,e.getRange())||n.clearForceDisabled(KP))}_disableCommands(){const e=this.editor;for(const[t,i]of e.commands)i.affectsData&&!this._alwaysEnabled.has(t)&&i.forceDisabled(KP)}}function QP(e,t,i){return!("delete"!=e||!i.start.isEqual(t.focus))||!("deleteForward"!=e||!t.isCollapsed||!i.end.isEqual(t.focus))}function eD(e,t){const i=GP(e,t.start),n=GP(e,t.end);return i&&n&&n===i}i.RestrictedEditingModeEditing=JP;var tD='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 6.5a3.5 3.5 0 0 1 3.495 3.308L19 10v2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5zm0-6a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2zm-9.25 8a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5z"/></svg>';class iD extends ps{static get pluginName(){return"RestrictedEditingModeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditing",i=>{const n=ym(i),r=new Go;return this._getButtonDefinitions().forEach(e=>{let{commandName:t,label:i,keystroke:n}=e;r.add(this._getButtonDefinition(t,i,n))}),xm(n,r,{role:"menu"}),n.buttonView.set({label:t("Navigate editable regions"),icon:tD,tooltip:!0,isEnabled:!0,isOn:!1}),this.listenTo(n,"execute",t=>{const{_commandName:i}=t.source;e.execute(i),e.editing.view.focus()}),n}),e.ui.componentFactory.add("menuBar:restrictedEditing",e=>{const i=new wv(e),n=new _v(e);return n.set({ariaLabel:t("Navigate editable regions"),role:"menu"}),i.buttonView.set({label:t("Navigate editable regions"),icon:tD}),i.panelView.children.add(n),this._getButtonDefinitions().forEach(t=>{let{commandName:r,label:o,keystroke:s}=t;const a=new Ig(e,i),l=this._createMenuBarButton(o,r,s);l.delegate("execute").to(i),a.children.add(l),n.items.add(a)}),i})}_createMenuBarButton(e,t,i){const n=this.editor,r=n.commands.get(t),o=new ep(n.locale);return o.set({label:e,keystroke:i,isEnabled:!0,isOn:!1}),o.bind("isEnabled").to(r),this.listenTo(o,"execute",()=>{n.execute(t),n.editing.view.focus()}),o}_getButtonDefinition(e,t,i){const n=this.editor.commands.get(e),r={type:"button",model:new ev({label:t,withText:!0,keystroke:i,withKeystroke:!0,role:"menuitem",_commandName:e})};return r.model.bind("isEnabled").to(n,"isEnabled"),r}_getButtonDefinitions(){const e=this.editor.locale.t;return[{commandName:"goToPreviousRestrictedEditingException",label:e("Previous editable region"),keystroke:"Shift+Tab"},{commandName:"goToNextRestrictedEditingException",label:e("Next editable region"),keystroke:"Tab"}]}}i.RestrictedEditingModeUI=iD;i.RestrictedEditingMode=class extends ps{static get pluginName(){return"RestrictedEditingMode"}static get isOfficialPlugin(){return!0}static get requires(){return[JP,iD]}};class nD extends gs{refresh(){const e=this.editor.model,t=e.document;this.value=!!t.selection.getAttribute("restrictedEditingException"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"restrictedEditingException")}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{const r=t.schema.getValidRanges(i.getRanges(),"restrictedEditingException");if(i.isCollapsed)if(n)e.setSelectionAttribute("restrictedEditingException",n);else{const t=e=>
6e.item.getAttribute("restrictedEditingException")===this.value,n=i.focus,r=n.getLastMatchingPosition(t,{direction:"backward"}),o=n.getLastMatchingPosition(t);e.removeSelectionAttribute("restrictedEditingException"),n.isEqual(r)||n.isEqual(o)||e.removeAttribute("restrictedEditingException",e.createRange(r,o))}else for(const t of r)n?e.setAttribute("restrictedEditingException",n,t):e.removeAttribute("restrictedEditingException",t)})}}class rD extends ps{static get pluginName(){return"StandardEditingModeEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:["restrictedEditingException"]}),e.conversion.for("upcast").elementToAttribute({model:"restrictedEditingException",view:{name:"span",classes:"restricted-editing-exception"}}),e.conversion.for("downcast").attributeToElement({model:"restrictedEditingException",view:(e,t)=>{let{writer:i}=t;if(e)return i.createAttributeElement("span",{class:"restricted-editing-exception"},{priority:-10})}}),e.commands.add("restrictedEditingException",new nD(e)),e.editing.view.change(t=>{for(const i of e.editing.view.document.roots)t.addClass("ck-restricted-editing_mode_standard",i)})}}i.StandardEditingModeEditing=rD;class oD extends ps{static get pluginName(){return"StandardEditingModeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("restrictedEditingException",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0,isToggleable:!0}),e}),e.ui.componentFactory.add("menuBar:restrictedEditingException",()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=this.editor.commands.get("restrictedEditingException"),r=new e(i),o=i.t;return r.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.25 16a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5zm.25 5.5a3.5 3.5 0 0 1 3.143 1.959.75.75 0 0 1-1.36.636A2 2 0 0 0 13.5 10v2H19a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5z"/></svg>',r.bind("isOn","isEnabled").to(n,"value","isEnabled"),r.bind("label").to(n,"value",e=>o(e?"Disable editing":"Enable editing")),this.listenTo(r,"execute",()=>{t.execute("restrictedEditingException"),t.editing.view.focus()}),r}}i.StandardEditingModeUI=oD;i.StandardEditingMode=class extends ps{static get pluginName(){return"StandardEditingMode"}static get isOfficialPlugin(){return!0}static get requires(){return[rD,oD]}};class sD extends gs{constructor(e){super(e),this.affectsData=!1,this.value=!1}execute(){const e="ck-show-blocks",t=this.editor.editing.view;t.change(i=>{for(const n of t.document.roots)n.hasClass(e)?(i.removeClass(e,n),this.value=!1):(i.addClass(e,n),this.value=!0)})}}i.ShowBlocksCommand=sD;class aD extends ps{static get pluginName(){return"ShowBlocksEditing"}static get isOfficialPlugin(){return!0}init(){const{editor:e}=this;e.commands.add("showBlocks",new sD(e))}}i.ShowBlocksEditing=aD;class lD extends ps{static get pluginName(){return"ShowBlocksUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("showBlocks",()=>{const e=this._createButton(Ff);return e.set({tooltip:!0,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m6.395 9.196 2.545-.007V6.498a.598.598 0 0 1 .598-.598h.299a.598.598 0 0 1 .598.598v6.877a.598.598 0 0 1-.598.598h-.299a.598.598 0 0 1-.598-.598v-2.691l-2.545.007v2.691a.598.598 0 0 1-.598.598h-.299a.598.598 0 0 1-.598-.598V6.505a.598.598 0 0 1 .598-.598h.299a.598.598 0 0 1 .598.598v2.691Z"/><path d="M15.094 13.417V6.462a.562.562 0 0 0-.562-.562h-.782a1 1 0 0 0-.39.08l-1.017.43a.562.562 0 0 0-.343.517v.197c0 .4.406.67.775.519l.819-.337v6.111c0 .31.251.562.561.562h.377c.31 0 .562-.251.562-.562Z"/><path d="M0 15.417v1.5h1.5v-1.5H0Z"/><path d="M18.5 15.417v1.5H20v-1.5h-1.5Z"/>
6<path d="M18.5 12.333v1.5H20v-1.5h-1.5Z"/><path d="M18.5 9.25v1.5H20v-1.5h-1.5Z"/><path d="M18.5 6.167v1.5H20v-1.5h-1.5Z"/><path d="M0 18.5v.5a1 1 0 0 0 1 1h.5v-1.5H0Z"/><path d="M3.083 18.5V20h1.5v-1.5h-1.5Z"/><path d="M6.167 18.5V20h1.5v-1.5h-1.5Z"/><path d="M9.25 18.5V20h1.5v-1.5h-1.5Z"/><path d="M12.333 18.5V20h1.5v-1.5h-1.5Z"/><path d="M15.417 18.5V20h1.5v-1.5h-1.5Z"/><path d="M18.5 18.5V20h.5a1 1 0 0 0 1-1v-.5h-1.5Z"/><path clip-rule="evenodd" d="M0 1a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v3.583h-1.5V1.5h-17v12.333H0V1Z"/></svg>'}),e}),e.ui.componentFactory.add("menuBar:showBlocks",()=>this._createButton(ep))}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("showBlocks"),r=new e(i),o=i.t;return r.set({label:o("Show blocks"),isToggleable:!0,role:"menuitemcheckbox"}),r.bind("isEnabled").to(n),r.bind("isOn").to(n,"value",n,"isEnabled",(e,t)=>e&&t),this.listenTo(r,"execute",()=>{t.execute("showBlocks"),t.editing.view.focus()}),r}}i.ShowBlocksUI=lD;function cD(e,t){return`${(arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ").repeat(Math.max(0,t))}${e}`}i.ShowBlocks=class extends ps{static get pluginName(){return"ShowBlocks"}static get isOfficialPlugin(){return!0}static get requires(){return[aD,lD]}};const uD="SourceEditingMode";function hD(e){return function(e){return e.startsWith("<")}(e)?function(e){const t=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],i=t.map(e=>e.name).join("|"),n=e.replace(new RegExp(`</?(${i})( .*?)?>`,"g"),"\n$&\n").replace(/<br[^>]*>/g,"$&\n").split("\n");let r=0,o=!1;return n.filter(e=>e.length).map(e=>(o=function(e,t){return new RegExp("<pre( .*?)?>").test(e)?"first":new RegExp("</pre>").test(e)?"last":("first"===t||"middle"===t)&&"middle"}(e,o),function(e,t){return t.some(t=>!t.isVoid&&!!new RegExp(`<${t.name}( .*?)?>`).test(e))}(e,t)?cD(e,r++):function(e,t){return t.some(t=>new RegExp(`</${t.name}>`).test(e))}(e,t)?cD(e,--r):"middle"===o||"last"===o?e:cD(e,r))).join("\n")}(e):e}i.SourceEditing=class extends ps{static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[qd]}_elementReplacer;_replacedRoots;_dataFromRoots;constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new Dr,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}init(){this._checkCompatibility();const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("sourceEditing",()=>{const e=this._createButton(Ff);return e.set({label:t("Source"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 0 5 4.5v15.003h-16V0h11zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692L3 1.5z"/><path d="M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14l3.496-2.5zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22l-3.496 2.5zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0z"/></svg>',tooltip:!0,class:"ck-source-editing-button"}),e}),e.ui.componentFactory.add("menuBar:sourceEditing",()=>{const e=this._createButton(ep);return e.set({label:t("Show source"),role:"menuitemcheckbox"}),e}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(e,t,i)=>{i?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(e,t,i)=>this._handleReadOnlyMode(!i)),this.listenTo(e,"change:isReadOnly",(e,t,i)=>this._handleReadOnlyMode(i))),e.data.on("get",()=>{this.isSourceEditingMode&&this.updateEditorData()},{priority:"high"})}updateEditorData(){const e=this.editor,t={};for(const[e,i]of this._replacedRoots){const n=this._dataFromRoots.get(e),r=i.dataset.value;n!==r&&(t[e]=r,this._dataFromRoots.set(e,r))}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,t=e.config.get("sourceEditing.allowCollaborationFeatures");if(!t&&e.plugins.has("RealTimeCollaborativeEditing"))throw new v("source-editing-incompatible-with-real-time-collaboration",null);!t&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some(t=>e.plugins.has(t))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that c
6ontains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,i=e.model;i.change(e=>{e.setSelection(null),e.removeSelectionAttribute(i.document.selection.getAttributeKeys())});for(const[i,n]of t.domRoots){const r=hD(e.data.get({rootName:i})),o=Nr(n.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),s=Nr(n.ownerDocument,"div",{class:"ck-source-editing-area","data-value":r},[o]);o.value=r,o.setSelectionRange(0,0),o.addEventListener("input",()=>{s.dataset.value=o.value,e.ui.update()}),t.change(e=>{const n=t.document.getRoot(i);e.addClass("ck-hidden",n)}),e.ui.setEditableElement("sourceEditing:"+i,o),this._replacedRoots.set(i,s),this._elementReplacer.replace(n,s),this._dataFromRoots.set(i,r)}this._focusSourceEditing()}_hideSourceEditing(){const e=this.editor.editing.view;this.updateEditorData(),e.change(t=>{for(const[i]of this._replacedRoots)t.removeClass("ck-hidden",e.document.getRoot(i))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),e.focus()}_focusSourceEditing(){const e=this.editor,[t]=this._replacedRoots.values(),i=t.querySelector("textarea");e.editing.view.document.isFocused=!1,i.focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled(uD);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(uD)}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled(uD);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(uD)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const e=this.editor.ui.view.editable;return e&&!e.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(e){const t=this.editor,i=new e(t.locale);return i.set({withText:!0,isToggleable:!0}),i.bind("isOn").to(this,"isSourceEditingMode"),i.bind("isEnabled").to(this,"isEnabled",t,"isReadOnly",t.plugins.get(qd),"hasAny",(e,t,i)=>!!e&&!t&&!i),this.listenTo(i,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),i}};class dD extends Df{tiles;focusTracker;keystrokes;constructor(e){super(e),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new Yo,this.keystrokes=new Jo,Bf({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>r.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}createTile(e,t){const i=new Ff(this.locale);return i.set({label:e,withText:!0,class:"ck-character-grid__tile"}),i.extendTemplate({attributes:{title:t},on:{mouseover:i.bindTemplate.to("mouseover"),focus:i.bindTemplate.to("focus")}}),i.on("mouseover",()=>{this.fire("tileHover",{name:t,character:e})}),i.on("focus",()=>{this.fire("tileFocus",{name:t,character:e})}),i.on("execute",()=>{this.fire("execute",{name:t,character:e})}),i}render(){super.render();for(const e of this.tiles)this.focusTracker.add(e.element);this.tiles.on("change",(e,t)=>{let{added:i,removed:n}=t;if(i.length>0)for(const e of i)this.focusTracker.add(e.element);if(n.length>0)for(const e of n)this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.first.focus()}}class fD extends Df{constructor(e){super(e);const t=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",pD),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:t.to("name",e=>e||"â")}]},{tag:"span",attributes:{class:["ck-character-info__code"]}
6,children:[{text:t.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function pD(e){return null===e?"":"U+"+("0000"+e.codePointAt(0).toString(16)).slice(-4)}class mD extends Df{items;focusTracker;keystrokes;_focusCycler;categoriesView;gridView;infoView;constructor(e,t,i,n){super(e),this.categoriesView=t,this.gridView=i,this.infoView=n,this.items=this.createCollection(),this.focusTracker=new Yo,this.keystrokes=new Jo,this._focusCycler=new Hf({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[this.categoriesView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.categoriesView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class gD extends Df{_groupNames;_dropdownView;constructor(e,t){super(e),this.set("currentGroupName",Array.from(t.entries())[0][0]),this._groupNames=t,this._dropdownView=new Bp(e,Mm),this.setTemplate({tag:"div",attributes:{class:["ck","ck-character-categories"]},children:[this._dropdownView]})}render(){super.render(),this._setupDropdown()}focus(){this._dropdownView.focus()}_setupDropdown(){const e=new Go;for(const[t,i]of this._groupNames){const n={type:"button",model:new ev({name:t,label:i,role:"menuitemradio",withText:!0})};n.model.bind("isOn").to(this,"currentGroupName",e=>e===t),e.add(n)}const t=(0,this.locale.t)("Category");this._dropdownView.set({label:t,isEmpty:!1}),this._dropdownView.fieldView.panelPosition="rtl"===this.locale.uiLanguageDirection?"se":"sw",this._dropdownView.fieldView.buttonView.set({withText:!0,tooltip:t,ariaLabel:t,ariaLabelledBy:void 0,isOn:!1}),this._dropdownView.fieldView.buttonView.bind("label").to(this,"currentGroupName",e=>this._groupNames.get(e)),this._dropdownView.fieldView.on("execute",e=>{let{source:t}=e;this.currentGroupName=t.name}),xm(this._dropdownView.fieldView,e,{ariaLabel:t,role:"menu"})}}const vD="All";i.SpecialCharacters=class extends ps{_characters;_groups;_allSpecialCharactersGroupLabel;static get requires(){return[$v,Kf]}static get pluginName(){return"SpecialCharacters"}static get isOfficialPlugin(){return!0}constructor(e){super(e);const t=e.t;this._characters=new Map,this._groups=new Map,this._allSpecialCharactersGroupLabel=t("All")}init(){const e=this.editor;e.ui.componentFactory.add("specialCharacters",()=>{const e=this._createDialogButton(Ff);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:specialCharacters",()=>this._createDialogButton(ep))}addItems(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{label:e};if(e===vD)throw new v("special-character-invalid-group-name",null);const n=this._getGroup(e,i.label);for(const e of t)n.items.add(e.title),this._characters.set(e.title,e.character)}getGroups(){const e=Array.from(this._groups.keys()),t=this.editor.config.get("specialCharacters.order")||[],i=t.find(t=>!e.includes(t));if(i)throw new v("special-character-invalid-order-group-name",null,{invalidGroup:i});return new Set([...t,...e])}getCharactersForGroup(e){if(e===vD)return new Set(this._characters.keys());const t=this._groups.get(e);return t?t.items:void 0}getCharacter(e){return this._characters.get(e)}_getGroup(e,t){return this._groups.has(e)||this._groups.set(e,{items:new Set,label:t}),this._groups.get(e)}_updateGrid(e,t){t.tiles.clear();const i=this.getCharactersForGroup(e);for(const e of i){const i=this.getCharacter(e);t.tiles.add(t.createTile(i,e))}}_createDropdownPanelContent(e){const t=Array.from(this.getGroups()).map(e=>[e,this._groups.get(e).label]),i=new Map([[vD,this._allSpecialCharactersGroupLabel],...t]),n=new gD(e,i),r=new dD(e),o=new fD(e);return r.on("tileHover",(e,t)=>{o.set(t)}),r.on("tileFocus",(e,t)=>{o.set(t)}),n.on("change:currentGroupName",(e,t,i)=>{this._updateGrid(i,r)}),this._updateGrid(n.currentGroupName,r),{categoriesView:n,gridView:r,infoView:o}}_createDialogButton(e){const t=this.editor,i=t.locale,n=new e(t.locale),r=t.commands.get("insertText"),o=i.t,s=this.editor.plugins.get("Dialog");return n.set({label:o("Special characters"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z"/></svg>',isToggleable:!0}),n.bind("isOn").to(s,"id",e=>"specialCharacters"===e),n.bind("isEnabled").to(r,"isEnabled"),n.on("execute",()=>{"specialCharacters"!==s.id?this._showDialog():s.hide()}),n}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),i=e.locale,n=i.t,{categoriesView:r,gridView:o,infoView:s}=this._createDropdownPanelContent(i),a=new mD(i,r,o,s);o.on("execute",(t,i)=>{e.execute("insertText",{text:i.character})}),t.show({id:"specialCharacters",title:n("Special characters"),className:"ck-special-characters",content:a,position:Yf.EDITOR_TOP_S
6IDE})}};class bD extends ps{static get pluginName(){return"SpecialCharactersArrows"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Arrows",[{title:t("leftwards simple arrow"),character:"â"},{title:t("rightwards simple arrow"),character:"â"},{title:t("upwards simple arrow"),character:"â"},{title:t("downwards simple arrow"),character:"â"},{title:t("leftwards double arrow"),character:"â"},{title:t("rightwards double arrow"),character:"â"},{title:t("upwards double arrow"),character:"â"},{title:t("downwards double arrow"),character:"â"},{title:t("leftwards dashed arrow"),character:"â "},{title:t("rightwards dashed arrow"),character:"â¢"},{title:t("upwards dashed arrow"),character:"â¡"},{title:t("downwards dashed arrow"),character:"â£"},{title:t("leftwards arrow to bar"),character:"â¤"},{title:t("rightwards arrow to bar"),character:"â¥"},{title:t("upwards arrow to bar"),character:"â¤"},{title:t("downwards arrow to bar"),character:"â¤"},{title:t("up down arrow with base"),character:"â¨"},{title:t("back with leftwards arrow above"),character:"ð"},{title:t("end with leftwards arrow above"),character:"ð"},{title:t("on with exclamation mark with left right arrow above"),character:"ð"},{title:t("soon with rightwards arrow above"),character:"ð"},{title:t("top with upwards arrow above"),character:"ð"}],{label:t("Arrows")})}}i.SpecialCharactersArrows=bD;class yD extends ps{static get pluginName(){return"SpecialCharactersText"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Text",[{character:"â¹",title:t("Single left-pointing angle quotation mark")},{character:"âº",title:t("Single right-pointing angle quotation mark")},{character:"«",title:t("Left-pointing double angle quotation mark")},{character:"»",title:t("Right-pointing double angle quotation mark")},{character:"â",title:t("Left single quotation mark")},{character:"â",title:t("Right single quotation mark")},{character:"â",title:t("Left double quotation mark")},{character:"â",title:t("Right double quotation mark")},{character:"â",title:t("Single low-9 quotation mark")},{character:"â",title:t("Double low-9 quotation mark")},{character:"¡",title:t("Inverted exclamation mark")},{character:"¿",title:t("Inverted question mark")},{character:"â¥",title:t("Two dot leader")},{character:"â¦",title:t("Horizontal ellipsis")},{character:"â¡",title:t("Double dagger")},{character:"â°",title:t("Per mille sign")},{character:"â±",title:t("Per ten thousand sign")},{character:"â¼",title:t("Double exclamation mark")},{character:"â",title:t("Question exclamation mark")},{character:"â",title:t("Exclamation question mark")},{character:"â",title:t("Double question mark")},{character:"©",title:t("Copyright sign")},{character:"®",title:t("Registered sign")},{character:"â¢",title:t("Trade mark sign")},{character:"§",title:t("Section sign")},{character:"¶",title:t("Paragraph sign")},{character:"â",title:t("Reversed paragraph sign")}],{label:t("Text")})}}i.SpecialCharactersText=yD;class wD extends ps{static get pluginName(){return"SpecialCharactersMathematical"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:t("Less-than sign")},{character:">",title:t("Greater-than sign")},{character:"â¤",title:t("Less-than or equal to")},{character:"â¥",title:t("Greater-than or equal to")},{character:"â",title:t("En dash")},{character:"â",title:t("Em dash")},{character:"¯",title:t("Macron")},{character:"â¾",title:t("Overline")},{character:"°",title:t("Degree sign")},{character:"â",title:t("Minus sign")},{character:"±",title:t("Plus-minus sign")},{character:"÷",title:t("Division sign")},{character:"â",title:t("Fraction slash")},{character:"Ã",title:t("Multiplication sign")},{character:"Æ",title:t("Latin small letter f with hook")},{character:"â«",title:t("Integral")},{character:"â",title:t("N-ary summation")},{character:"â",title:t("Infinity")},{character:"â",title:t("Square root")},{character:"â¼",title:t("Tilde operator")},{character:"â
",title:t("Approximately equal to")},{character:"â",title:t("Almost equal to")},{character:"â ",title:t("Not equal to")},{character:"â¡",title:t("Identical to")},{character:"â",title:t("Element of")},{character:"â",title:t("Not an element of")},{character:"â",title:t("Contains as member")},{character:"â",title:t("N-ary product")},{character:"â§",title:t("Logical and")},{character:"â¨",title:t("Logical or")},{character:"¬",title:t("Not sign")},{character:"â©",title:t("Intersection")}
6,{character:"âª",title:t("Union")},{character:"â",title:t("Partial differential")},{character:"â",title:t("For all")},{character:"â",title:t("There exists")},{character:"â
",title:t("Empty set")},{character:"â",title:t("Nabla")},{character:"â",title:t("Asterisk operator")},{character:"â",title:t("Proportional to")},{character:"â ",title:t("Angle")},{character:"¼",title:t("Vulgar fraction one quarter")},{character:"½",title:t("Vulgar fraction one half")},{character:"¾",title:t("Vulgar fraction three quarters")}],{label:t("Mathematical")})}}i.SpecialCharactersMathematical=wD;class _D extends ps{static get pluginName(){return"SpecialCharactersLatin"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ä",title:t("Latin capital letter a with macron")},{character:"Ä",title:t("Latin small letter a with macron")},{character:"Ä",title:t("Latin capital letter a with breve")},{character:"Ä",title:t("Latin small letter a with breve")},{character:"Ä",title:t("Latin capital letter a with ogonek")},{character:"Ä
",title:t("Latin small letter a with ogonek")},{character:"Ä",title:t("Latin capital letter c with acute")},{character:"Ä",title:t("Latin small letter c with acute")},{character:"Ä",title:t("Latin capital letter c with circumflex")},{character:"Ä",title:t("Latin small letter c with circumflex")},{character:"Ä",title:t("Latin capital letter c with dot above")},{character:"Ä",title:t("Latin small letter c with dot above")},{character:"Ä",title:t("Latin capital letter c with caron")},{character:"Ä",title:t("Latin small letter c with caron")},{character:"Ä",title:t("Latin capital letter d with caron")},{character:"Ä",title:t("Latin small letter d with caron")},{character:"Ä",title:t("Latin capital letter d with stroke")},{character:"Ä",title:t("Latin small letter d with stroke")},{character:"Ä",title:t("Latin capital letter e with macron")},{character:"Ä",title:t("Latin small letter e with macron")},{character:"Ä",title:t("Latin capital letter e with breve")},{character:"Ä",title:t("Latin small letter e with breve")},{character:"Ä",title:t("Latin capital letter e with dot above")},{character:"Ä",title:t("Latin small letter e with dot above")},{character:"Ä",title:t("Latin capital letter e with ogonek")},{character:"Ä",title:t("Latin small letter e with ogonek")},{character:"Ä",title:t("Latin capital letter e with caron")},{character:"Ä",title:t("Latin small letter e with caron")},{character:"Ä",title:t("Latin capital letter g with circumflex")},{character:"Ä",title:t("Latin small letter g with circumflex")},{character:"Ä",title:t("Latin capital letter g with breve")},{character:"Ä",title:t("Latin small letter g with breve")},{character:"Ä ",title:t("Latin capital letter g with dot above")},{character:"Ä¡",title:t("Latin small letter g with dot above")},{character:"Ä¢",title:t("Latin capital letter g with cedilla")},{character:"Ä£",title:t("Latin small letter g with cedilla")},{character:"Ĥ",title:t("Latin capital letter h with circumflex")},{character:"Ä¥",title:t("Latin small letter h with circumflex")},{character:"Ħ",title:t("Latin capital letter h with stroke")},{character:"ħ",title:t("Latin small letter h with stroke")},{character:"Ĩ",title:t("Latin capital letter i with tilde")},{character:"Ä©",title:t("Latin small letter i with tilde")},{character:"Ī",title:t("Latin capital letter i with macron")},{character:"Ä«",title:t("Latin small letter i with macron")},{character:"Ĭ",title:t("Latin capital letter i with breve")},{character:"Ä",title:t("Latin small letter i with breve")},{character:"Ä®",title:t("Latin capital letter i with ogonek")},{character:"į",title:t("Latin small letter i with ogonek")},{character:"İ",title:t("Latin capital letter i with dot above")},{character:"ı",title:t("Latin small letter dotless i")},{character:"IJ",title:t("Latin capital ligature ij")},{character:"ij",title:t("Latin small ligature ij")},{character:"Ä´",title:t("Latin capital letter j with circumflex")},{character:"ĵ",title:t("Latin small letter j with circumflex")},{character:"Ķ",title:t("Latin capital letter k with cedilla")},{character:"Ä·",title:t("Latin small letter k with cedilla")},{character:"ĸ",title:t("Latin small letter kra")},{character:"Ĺ",title:t("Latin capital letter l with acute")},{character:"ĺ",title:t("Latin small letter l with acute")},{character:"Ä»",title:t("Latin capital letter l with cedilla")},{character:"ļ",title:t("Latin small letter l with cedilla")},{character:"Ľ",title:t("Latin capital letter l with caron")},{character:"ľ",title:t("Latin small letter l with caron")}
vendor: 8,752 bytes, line 6
6,{character:"Ä¿",title:t("Latin capital letter l with middle dot")},{character:"Å",title:t("Latin small letter l with middle dot")},{character:"Å",title:t("Latin capital letter l with stroke")},{character:"Å",title:t("Latin small letter l with stroke")},{character:"Å",title:t("Latin capital letter n with acute")},{character:"Å",title:t("Latin small letter n with acute")},{character:"Å
",title:t("Latin capital letter n with cedilla")},{character:"Å",title:t("Latin small letter n with cedilla")},{character:"Å",title:t("Latin capital letter n with caron")},{character:"Å",title:t("Latin small letter n with caron")},{character:"Å",title:t("Latin small letter n preceded by apostrophe")},{character:"Å",title:t("Latin capital letter eng")},{character:"Å",title:t("Latin small letter eng")},{character:"Å",title:t("Latin capital letter o with macron")},{character:"Å",title:t("Latin small letter o with macron")},{character:"Å",title:t("Latin capital letter o with breve")},{character:"Å",title:t("Latin small letter o with breve")},{character:"Å",title:t("Latin capital letter o with double acute")},{character:"Å",title:t("Latin small letter o with double acute")},{character:"Å",title:t("Latin capital ligature oe")},{character:"Å",title:t("Latin small ligature oe")},{character:"Å",title:t("Latin capital letter r with acute")},{character:"Å",title:t("Latin small letter r with acute")},{character:"Å",title:t("Latin capital letter r with cedilla")},{character:"Å",title:t("Latin small letter r with cedilla")},{character:"Å",title:t("Latin capital letter r with caron")},{character:"Å",title:t("Latin small letter r with caron")},{character:"Å",title:t("Latin capital letter s with acute")},{character:"Å",title:t("Latin small letter s with acute")},{character:"Å",title:t("Latin capital letter s with circumflex")},{character:"Å",title:t("Latin small letter s with circumflex")},{character:"Å",title:t("Latin capital letter s with cedilla")},{character:"Å",title:t("Latin small letter s with cedilla")},{character:"Å ",title:t("Latin capital letter s with caron")},{character:"Å¡",title:t("Latin small letter s with caron")},{character:"Å¢",title:t("Latin capital letter t with cedilla")},{character:"Å£",title:t("Latin small letter t with cedilla")},{character:"Ť",title:t("Latin capital letter t with caron")},{character:"Å¥",title:t("Latin small letter t with caron")},{character:"Ŧ",title:t("Latin capital letter t with stroke")},{character:"ŧ",title:t("Latin small letter t with stroke")},{character:"Ũ",title:t("Latin capital letter u with tilde")},{character:"Å©",title:t("Latin small letter u with tilde")},{character:"Ū",title:t("Latin capital letter u with macron")},{character:"Å«",title:t("Latin small letter u with macron")},{character:"Ŭ",title:t("Latin capital letter u with breve")},{character:"Å",title:t("Latin small letter u with breve")},{character:"Å®",title:t("Latin capital letter u with ring above")},{character:"ů",title:t("Latin small letter u with ring above")},{character:"Ű",title:t("Latin capital letter u with double acute")},{character:"ű",title:t("Latin small letter u with double acute")},{character:"Ų",title:t("Latin capital letter u with ogonek")},{character:"ų",title:t("Latin small letter u with ogonek")},{character:"Å´",title:t("Latin capital letter w with circumflex")},{character:"ŵ",title:t("Latin small letter w with circumflex")},{character:"Ŷ",title:t("Latin capital letter y with circumflex")},{character:"Å·",title:t("Latin small letter y with circumflex")},{character:"Ÿ",title:t("Latin capital letter y with diaeresis")},{character:"Ź",title:t("Latin capital letter z with acute")},{character:"ź",title:t("Latin small letter z with acute")},{character:"Å»",title:t("Latin capital letter z with dot above")},{character:"ż",title:t("Latin small letter z with dot above")},{character:"Ž",title:t("Latin capital letter z with caron")},{character:"ž",title:t("Latin small letter z with caron")},{character:"Å¿",title:t("Latin small letter long s")}],{label:t("Latin")})}}i.SpecialCharactersLatin=_D;class kD extends ps{static get pluginName(){return"SpecialCharactersCurrency"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:t("Dollar sign")},{character:"â¬",title:t("Euro sign")},{character:"Â¥",title:t("Yen sign")},{character:"£",title:t("Pound sign")},{character:"¢",title:t("Cent sign")},{character:"â ",title:t("Euro-currency sign")},{character:"â¡",title:t("Colon sign")},{character:"â¢",title:t("Cruzeiro sign")},{character:"â£",title:t("French franc sign")},{character:"â¤",title:t("Lira sign")},{character:"¤",title:t("Currency sign")},{character:"â¿",title:t("Bitcoin sign")},{character:"â¥",title:t("Mill sign")},{character:"â¦",title:t("Naira sign")},{character:"â§",title:t("Peseta sign")},{character:"â¨",title:t("Rupee sign")},{character:"â©",title:t("Won sign")},{character:"âª",title:t("New sheqel sign")},{character:"â«",title:t("Dong sign")},{character:"â",title:t("Kip sign")},{character:"â®",title:t("Tugrik sign")},{character:"â¯",title:t("Drachma sign")},{character:"â°",title:t("German penny sign")},{character:"â±",title:t("Peso sign")},{character:"â²",title:t("Guarani sign")},{character:"â³",title:t("Austral sign")},{character:"â´",title:t("Hryvnia sign")},{character:"âµ",title:t("Cedi sign")},{character:"â¶",title:t("Livre tournois sign")},{character:"â·",title:t("Spesmilo sign")},{character:"â¸",title:t("Tenge sign")},{character:"â¹",title:t("Indian rupee sign")},{character:"âº",title:t("Turkish lira sign")},{character:"â»",title:t("Nordic mark sign")},{character:"â¼",title:t("Manat sign")},{character:"â½",title:t("Ruble sign")}],{label:t("Currency")})}}i.SpecialCharactersCurrency=kD;i.SpecialCharactersEssentials=class extends ps{static get pluginName(){return"SpecialCharactersEssentials"}static get isOfficialPlugin(){return!0}static get requires(){return[kD,yD,wD,bD,_D]}};class xD extends Ff{styleDefinition;previewView;constructor(e,t){super(e),this.styleDefinition=t,this.previewView=this._createPreview(),this.set({label:t.name,class:"ck-style-grid__button",withText:!0}),this.extendTemplate({attributes:{role:"option"}}),this.children.add(this.previewView,0)}_createPreview(){const e=new Df(this.locale);return e.setTemplate({tag:"div",attributes:{class:["ck","ck-reset_all-excluded","ck-style-grid__button__preview","ck-content"],"aria-hidden":"true"},children:[this.styleDefinition.previewTemplate]}),e}}class CD extends Df{focusTracker;keystrokes;children;constructor(e,t){super(e),this.focusTracker=new Yo,this.keystrokes=new Jo,this.set("activeStyles",[]),this.set("enabledStyles",[]),this.children=this.createCollection(),this.children.delegate("execute").to(this);for(const i of t){const t=new xD(e,i);this.children.add(t)}this.on("change:activeStyles",()=>{for(const e of this.children)e.isOn=this.activeStyles.includes(e.styleDefinition.name)}),this.on("change:enabledStyles",()=>{for(const e of this.children)e.isEnabled=this.enabledStyles.includes(e.styleDefinition.name)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-grid"],role:"listbox"},children:this.children})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element);Bf({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.children,numberOfColumns:3,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection}),this.keystrokes.listenTo(this.element)}focus(){this.children.first.focus()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}class SD extends Df{gridView;labelView;constructor(e,t,i){super(e),this.labelView=new tp(e),this.labelView.text=t,this.gridView=new CD(e,i),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel__style-group"],role:"group","aria-labelledby":this.labelView.id},children:[this.labelView,this.gridView]})}}class ED extends Df{focusTracker;keystrokes;children;blockStylesGroupView;inlineStylesGroupView;_focusables;_focusCycler;constructor(e,t){super(e);const i=e.t;this.focusTracker=new Yo,this.keystrokes=new Jo,this.children=this.createCollection(),this.blockStylesGroupView=new SD(e,i("Block styles"),t.block),this.inlineStylesGroupView=new SD(e,i("Text styles"),t.inline),this.set("activeStyles",[]),this.set("enabledStyles",[]),this._focusables=new uf,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["shift + tab"],focusNext:["tab"]}}),t.block.length&&this.children.add(this.blockStylesGroupView),t.inline.length&&this.children.add(this.inl
6ineStylesGroupView),this.blockStylesGroupView.gridView.delegate("execute").to(this),this.inlineStylesGroupView.gridView.delegate("execute").to(this),this.blockStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this,"activeStyles","enabledStyles"),this.inlineStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this,"activeStyles","enabledStyles"),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel"]},children:this.children})}render(){super.render(),this._focusables.add(this.blockStylesGroupView.gridView),this._focusables.add(this.inlineStylesGroupView.gridView),this.focusTracker.add(this.blockStylesGroupView.gridView.element),this.focusTracker.add(this.inlineStylesGroupView.gridView.element),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}const TD=["caption","colgroup","dd","dt","figcaption","legend","li","optgroup","option","rp","rt","summary","tbody","td","tfoot","th","thead","tr"];class AD extends ps{_htmlSupport;static get pluginName(){return"StyleUtils"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.decorate("isStyleEnabledForBlock"),this.decorate("isStyleActiveForBlock"),this.decorate("getAffectedBlocks"),this.decorate("isStyleEnabledForInlineSelection"),this.decorate("isStyleActiveForInlineSelection"),this.decorate("getAffectedInlineSelectable"),this.decorate("getStylePreview"),this.decorate("configureGHSDataFilter")}init(){this._htmlSupport=this.editor.plugins.get("GeneralHtmlSupport")}normalizeConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const i={block:[],inline:[]};for(const n of t){const t=[],r=[];for(const i of e.getDefinitionsForView(n.element)){const e="appliesToBlock"in i&&i.appliesToBlock;if(i.isBlock||e){if("string"==typeof e)t.push(e);else if(i.isBlock){const e=i;t.push(i.model),e.paragraphLikeModel&&t.push(e.paragraphLikeModel)}}else r.push(i.model)}const o=this.getStylePreview(n,[{text:"AaBbCcDdEeFfGgHhIiJj"}]);t.length?i.block.push({...n,previewTemplate:o,modelElements:t,isBlock:!0}):i.inline.push({...n,previewTemplate:o,ghsAttributes:r})}return i}isStyleEnabledForBlock(e,t){const i=this.editor.model,n=this._htmlSupport.getGhsAttributeNameForElement(e.element);return!!i.schema.checkAttribute(t,n)&&e.modelElements.includes(t.name)}isStyleActiveForBlock(e,t){const i=this._htmlSupport.getGhsAttributeNameForElement(e.element),n=t.getAttribute(i);return this.hasAllClasses(n,e.classes)}getAffectedBlocks(e,t){return e.modelElements.includes(t.name)?[t]:null}isStyleEnabledForInlineSelection(e,t){const i=this.editor.model;for(const n of e.ghsAttributes)if(i.schema.checkAttributeInSelection(t,n))return!0;return!1}isStyleActiveForInlineSelection(e,t){for(const i of e.ghsAttributes){const n=this._getValueFromFirstAllowedNode(t,i);if(this.hasAllClasses(n,e.classes))return!0}return!1}getAffectedInlineSelectable(e,t){return t}getStylePreview(e,t){const{element:i,classes:n}=e;return{tag:(r=i,TD.includes(r)?"div":i),attributes:{class:n},children:t};var r}hasAllClasses(e,t){return te(e)&&(i=e,Boolean(i.classes)&&Array.isArray(i.classes))&&t.every(t=>e.classes.includes(t));var i}configureGHSDataFilter(e){let{block:t,inline:i}=e;const n=this.editor.plugins.get("DataFilter");n.loadAllowedConfig(t.map(ID)),n.loadAllowedConfig(i.map(ID))}_getValueFromFirstAllowedNode(e,t){const i=this.editor.model.schema;if(e.isCollapsed)return e.getAttribute(t);for(const n of e.getRanges())for(const e of n.getItems())if(i.checkAttribute(e,t))return e.getAttribute(t);return null}}function ID(e){let{element:t,classes:i}=e;return{name:t,classes:i}}i.StyleUtils=AD;class MD extends ps{static get pluginName(){return"StyleUI"}static get isOfficialPlugin(){return!0}static get requires(){return[AD]}init(){const e=this.editor,t=e.plugins.get("DataSchema"),i=e.plugins.get("StyleUtils"),n=e.config.get("style.definitions"),r=i.normalizeConfig(t,n);e.ui.componentFactory.add("style",t=>{const i=t.t,n=ym(t),o=e.commands.get("style");return n.once("change:isOpen",()=>{const e=new ED(t,r);n.panelView.children.add(e),e.delegate("execute").to(n),e.bind("activeStyles").to(o,"value"),e.bind("enabledStyles").to(o,"enabledStyles")}),n.bind("isEnabled").to(o),n.buttonView.withText=!0,n.buttonView.bind("label").to(o,"value",e=>e.length>1?i("Multiple styles"):1===e.length?e[0]:i("Styles")),n.bind("class").to(o,"value",e=>{const t=["ck-style-dropdown"];return e.length>1&&t.push("ck-style-dropdown_multiple-active"),t.join(" ")}),n.on("execute",t=>{e.execute("style",{styleName:t.source.styleDefinition.name}),e.editing.view.focus()}),n})}}i.StyleUI=MD;class PD extends gs{_styleDefinitions;_styleUtils;constructor(e,t){super(e),this.set("value",[]),this.set("enabledStyles",[]),this._styleDefinitions=t,this._styleUtils=this.editor.plugins.get(AD)}refresh(){const e=this.editor.model,t=e.document.selection,i=new Set,n=new Set;for(const e of this._styleDefinitions.inline)this._styleUtils.isStyleEnabledForInlineSelection(e,t)&&n.add(e.name),this._styleUtils.isStyleActiveForInlineSelection(e,t)&&i.add(e.name);const r=qo(t.getSelectedBlocks())||t.getFirstPosition().parent;if(r){const t=r.getAncestors({includeSelf:!0,parentFirst:!0});for(const r of t){if(r.is("rootElement"))break;for(const e of this._styleDefinitions.block)this._styleUtils.isStyleEnabledForBlock(e,r)&&(n.add(e.name),this._styleUtils.isStyleActiveForBlock(e,r)&&i.add(e.name));if(e.schema.isObject(r))break}}this.enabledStyles=Array.from(n).sort(),this.isEnabled=this.enabledStyles.length>0,this.value=this.isEnabled?Array.from(i).sort():[]}execute(e){let{styleName:t,forceValue:i}=e;if(!this.enabledStyles.includes(t))return void b("style-command-executed-with-incorrect-style-name");const n=this.editor.model,r=n.document.selection,o=this.editor.plugins.get("GeneralHtmlSupport"),s=[...this._styleDefinitions.inline,...this._styleDefinitions.block],a=s.filter(e=>{let{name:t}=e;return this.value.includes(t)}),l=s.find(e=>{let{name:i}=e;return i==t}),c=void 0===i?!this.value.includes(l.name):i;n.change(()=>{let e;e=function(e){return"isBlock"in e}(l)?this._findAffectedBlocks(function(e){const t=Array.from(e.getSelectedBlocks());return t.length?t:[e.getFirstPosition().parent]}(r),l):[this._styleUtils.getAffectedInlineSelectable(l,r)];for(const t of e)c?o.addModelHtmlClass(l.element,l.classes,t):o.removeModelHtmlClass(l.element,DD(a,l),t)})}_findAffectedBlocks(e,t){const i=new Set;for(const n of e){const e=n.getAncestors({includeSelf:!0,parentFirst:!0});for(const n of e){if(n.is("rootElement"))break;const e=this._styleUtils.getAffectedBlocks(t,n);if(e){for(const t of e)i.add(t);break}}}return i}}function DD(e,t){return e.reduce((e,i)=>i.name===t.name?e:e.filter(e=>!i.classes.includes(e)),t.classes)}class OD extends ps{_listUtils;_styleUtils;_htmlSupport;static get pluginName(){return"ListStyleSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[AD,"GeneralHtmlSupport"]}init(){const e=this.editor;e.plugins.has("ListEditing")&&(this._styleUtils=e.plugins.get(AD),this._listUtils=this.editor.plugins.get("ListUtils"),this._htmlSupport=this.editor.plugins.get("GeneralHtmlSupport"),this.listenTo(this._styleUtils,"isStyleEnabledForBlock",(e,t)=>{let[i,n]=t;this._isStyleEnabledForBlock(i,n)&&(e.return=!0,e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"isStyleActiveForBlock",(e,t)=>{let[i,n]=t;this._isStyleActiveForBlock(i,n)&&(e.return=!0,e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getAffectedBlocks",(e,t)=>{let[i,n]=t;const r=this._getAffectedBlocks(i,n);r&&(e.return=r,e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getStylePreview",(e,t)=>{let[i,n]=t;const r=this._getStylePreview(i,n);r&&(e.return=r,e.stop())},{priority:"high"}))}_isStyleEnabledForBlock(e,t){const i=this.editor.model;if(!["ol","ul","li"].includes(e.element))return!1;if(!this._listUtils.isListItemBlock(t))return!1;const n=this._htmlSupport.getGhsAttributeNameForElement(e.element);if("ol"==e.element||"ul"==e.element){if(!i.schema.checkAttribute(t,n))return!1;const r=this._listUtils.isNumberedListType(t.getAttribute("listType"))?"ol"
6:"ul";return e.element==r}return i.schema.checkAttribute(t,n)}_isStyleActiveForBlock(e,t){const i=this._htmlSupport.getGhsAttributeNameForElement(e.element),n=t.getAttribute(i);return this._styleUtils.hasAllClasses(n,e.classes)}_getAffectedBlocks(e,t){return this._isStyleEnabledForBlock(e,t)?"li"==e.element?this._listUtils.expandListBlocksToCompleteItems(t,{withNested:!1}):this._listUtils.expandListBlocksToCompleteList(t):null}_getStylePreview(e,t){const{element:i,classes:n}=e;return"ol"==i||"ul"==i?{tag:i,attributes:{class:n},children:[{tag:"li",children:t}]}:"li"==i?{tag:"ol",children:[{tag:i,attributes:{class:n},children:t}]}:null}}class LD extends ps{_tableUtils;_styleUtils;static get pluginName(){return"TableStyleSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[AD]}init(){const e=this.editor;e.plugins.has("TableEditing")&&(this._styleUtils=e.plugins.get(AD),this._tableUtils=this.editor.plugins.get("TableUtils"),this.listenTo(this._styleUtils,"isStyleEnabledForBlock",(e,t)=>{let[i,n]=t;this._isApplicable(i,n)&&(e.return=this._isStyleEnabledForBlock(i,n),e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getAffectedBlocks",(e,t)=>{let[i,n]=t;this._isApplicable(i,n)&&(e.return=this._getAffectedBlocks(i,n),e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"configureGHSDataFilter",(e,t)=>{let[{block:i}]=t;this.editor.plugins.get("DataFilter").loadAllowedConfig(i.filter(e=>"figcaption"==e.element).map(e=>({name:"caption",classes:e.classes})))}))}_isApplicable(e,t){return["td","th"].includes(e.element)?"tableCell"==t.name:!!["thead","tbody"].includes(e.element)&&"table"==t.name}_isStyleEnabledForBlock(e,t){if(["td","th"].includes(e.element)){const i=this._tableUtils.getCellLocation(t),n=t.parent.parent,r=n.getAttribute("headingRows")||0,o=n.getAttribute("headingColumns")||0,s=i.row<r||i.column<o;return"th"==e.element?s:!s}if(["thead","tbody"].includes(e.element)){const i=t.getAttribute("headingRows")||0;return"thead"==e.element?i>0:i<this._tableUtils.getRows(t)}return!1}_getAffectedBlocks(e,t){return this._isStyleEnabledForBlock(e,t)?[t]:null}}class RD extends ps{_styleUtils;_htmlSupport;static get pluginName(){return"LinkStyleSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[AD,"GeneralHtmlSupport"]}init(){const e=this.editor;e.plugins.has("LinkEditing")&&(this._styleUtils=e.plugins.get(AD),this._htmlSupport=this.editor.plugins.get("GeneralHtmlSupport"),this.listenTo(this._styleUtils,"isStyleEnabledForInlineSelection",(e,t)=>{let[i,n]=t;"a"==i.element&&(e.return=this._isStyleEnabled(i,n),e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"isStyleActiveForInlineSelection",(e,t)=>{let[i,n]=t;"a"==i.element&&(e.return=this._isStyleActive(i,n),e.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getAffectedInlineSelectable",(e,t)=>{let[i,n]=t;if("a"!=i.element)return;const r=this._getAffectedSelectable(i,n);r&&(e.return=r,e.stop())},{priority:"high"}))}_isStyleEnabled(e,t){const i=this.editor.model;if(t.isCollapsed)return t.hasAttribute("linkHref");for(const e of t.getRanges())for(const t of e.getItems())if((t.is("$textProxy")||i.schema.isInline(t))&&t.hasAttribute("linkHref"))return!0;return!1}_isStyleActive(e,t){const i=this.editor.model,n=this._htmlSupport.getGhsAttributeNameForElement(e.element);if(t.isCollapsed){if(t.hasAttribute("linkHref")){const i=t.getAttribute(n);if(this._styleUtils.hasAllClasses(i,e.classes))return!0}return!1}for(const r of t.getRanges())for(const t of r.getItems())if((t.is("$textProxy")||i.schema.isInline(t))&&t.hasAttribute("linkHref")){const i=t.getAttribute(n);return this._styleUtils.hasAllClasses(i,e.classes)}return!1}_getAffectedSelectable(e,t){const i=this.editor.model;if(t.isCollapsed){const e=t.getAttribute("linkHref");return lb(t.getFirstPosition(),"linkHref",e,i)}const n=[];for(const e of t.getRanges()){const t=i.createRange(BD(e.start,"linkHref",!0,i),BD(e.end,"linkHref",!1,i));for(const e of t.getItems())(e.is("$textProxy")||i.schema.isInline(e))&&e.hasAttribute("linkHref")&&n.push(this.editor.model.createRangeOn(e))}return function(e){for(let t=1;t<e.length;t++){const i=e[t-1].getJoined(e[t]);i&&e.splice(--t,2,i)}return e}(n)}}function BD(e,t,i,n){const r=e.textNode||(i?e.nodeAfter:e.nodeBefore);return r&&r.hasAttribute(t)?cb(e,t,r.getAttribute(t),i,n):e}class ND extends ps{static get pluginName(){return"StyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return["GeneralHtmlSupport",AD,OD,LD,RD]}init(){const e=this.editor,t=e.plugins.get("DataSchema"),i=e.plugins.get("StyleUtils"),n=e.config.get("style.definitions"),r=i.normalizeConfig(t,n);e.commands.add("style",new PD(e,r)),i.configureGHSDataFilter(r)}}i.StyleEditing=ND;function jD(e,t){const{modelAttribute:i,styleName:n,viewElement:r,defaultValue:o,reduceBoxSides:s=!1,shouldUpcast:a=()=>!0}=t;e.for("upcast").attributeToAttribute({view:{name:r,styles:{[n]:/[\s\S]+/}},model:{key:i,value:e=>{if(!a(e))return;const t=e.getNormalizedStyle(n),i=s?HD(t):t;return o!==i?i:void 0}}})}function FD(e,t,i,n){e.for("upcast").add(e=>e.on("element:"+t,(e,t,r)=>{if(!t.modelRange)return;const o=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(e=>t.viewItem.hasStyle(e));if(!o.length)return;const s={styles:o};if(!r.consumable.test(t.viewItem,s))return;const a=[...t.modelRange.getItems({shallow:!0})].pop();r.consumable.consume(t.viewItem,s);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:HD(l.style),color:HD(l.color),width:HD(l.width)};c.style!==n.style&&r.writer.setAttribute(i.style,c.style,a),c.color!==n.color&&r.writer.setAttribute(i.color,c.color,a),c.width!==n.width&&r.writer.setAttribute(i.width,c.width,a)}))}function zD(e,t){const{modelElement:i,modelAttribute:n,styleName:r}=t;e.for("downcast").attributeToAttribute({model:{name:i,key:n},view:e=>({key:"style",value:{[r]:e}})})}function VD(e,t){const{modelAttribute:i,styleName:n}=t;e.for("downcast").add(e=>e.on(`attribute:${i}:table`,(e,t,i)=>{const{item:r,attributeNewValue:o}=t,{mapper:s,writer:a}=i;if(!i.consumable.consume(t.item,e.name))return;const l=[...s.toViewElement(r).getChildren()].find(e=>e.is("element","table"));o?a.setStyle(n,o,l):a.removeStyle(n,l)}))}function HD(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every(t=>e[t]))return e;const i=e.top;return t.every(t=>e[t]===i)?i:e}function UD(e,t,i,n){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;null!=t&&null!=r&&t>r?n.setAttribute(e,t,i):n.removeAttribute(e,i)}function WD(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=e.createElement("tableCell",i);return e.insertElement("paragraph",n),e.insert(n,t),n}function $D(e,t){const i=t.parent.parent,n=parseInt(i.getAttribute("headingColumns")||"0"),{column:r}=e.getCellLocation(t);return!!n&&r<n}function GD(e,t,i){const{modelAttribute:n}=i;e.extend("tableCell",{allowAttributes:[n]}),jD(t,{viewElement:/^(td|th)$/,...i}),zD(t,{modelElement:"tableCell",...i})}function qD(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAnce
6stor("table")}function YD(e){return t=>{t.on(`element:${e}`,(e,t,i)=>{let{writer:n}=i;if(!t.modelRange)return;const r=t.modelRange.start.nodeAfter,o=n.createPositionAt(r,0);if(t.viewItem.isEmpty)return void n.insertElement("paragraph",o);const s=Array.from(r.getChildren());if(s.every(e=>e.is("element","$marker"))){const e=n.createElement("paragraph");n.insert(e,n.createPositionAt(r,0));for(const t of s)n.move(n.createRangeOn(t),n.createPositionAt(e,"end"))}},{priority:"low"})}}function ZD(e){let t=0,i=0;const n=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;i<n.length&&"th"===n[i].name;){const e=n[i];t+=parseInt(e.getAttribute("colspan")||"1"),i++}return t}i.Style=class extends ps{static get pluginName(){return"Style"}static get isOfficialPlugin(){return!0}static get requires(){return[ND,MD]}};class XD{_table;_startRow;_endRow;_startColumn;_endColumn;_includeAllSlots;_skipRows;_row;_rowIndex;_column;_cellIndex;_spannedCells;_nextCellAtColumn;_jumpedToStartRow=!1;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._table=e,this._startRow=void 0!==t.row?t.row:t.startRow||0,this._endRow=void 0!==t.row?t.row:t.endRow,this._startColumn=void 0!==t.column?t.column:t.startColumn||0,this._endColumn=void 0!==t.column?t.column:t.endColumn,this._includeAllSlots=!!t.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0,value:void 0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null;const i=this._getSpanned();if(i)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(i.cell,i.row,i.column));else{const i=e.getChild(this._cellIndex);if(!i)return this._advanceToNextRow();const n=parseInt(i.getAttribute("colspan")||"1"),r=parseInt(i.getAttribute("rowspan")||"1");(n>1||r>1)&&this._recordSpans(i,r,n),this._shouldSkipSlot()||(t=this._formatOutValue(i)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._row,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._column;return{done:!1,value:new KD(this,e,t,i)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,i=this._column<this._startColumn,n=void 0!==this._endColumn&&this._column>this._endColumn;return e||t||i||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,i){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e<this._row+t;e++)for(let t=this._column;t<this._column+i;t++)e==this._row&&t==this._column||this._markSpannedCell(e,t,n)}_markSpannedCell(e,t,i){this._spannedCells.has(e)||this._spannedCells.set(e,new Map),this._spannedCells.get(e).set(t,i)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||"1"),0)}}class KD{cell;row;column;cellAnchorRow;cellAnchorColumn;_cellIndex;_rowIndex;_table;constructor(e,t,i,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=i,this.cellAnchorColumn=n,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function JD(e,t){return(i,n)=>
6{let{writer:r}=n;const o=i.getAttribute("headingRows")||0,s=r.createContainerElement("table",null,[]),a=r.createContainerElement("figure",{class:"table"},s);o>0&&r.insert(r.createPositionAt(s,"end"),r.createContainerElement("thead",null,r.createSlot(e=>e.is("element","tableRow")&&e.index<o))),o<e.getRows(i)&&r.insert(r.createPositionAt(s,"end"),r.createContainerElement("tbody",null,r.createSlot(e=>e.is("element","tableRow")&&e.index>=o)));for(const{positionOffset:e,filter:i}of t.additionalSlots)r.insert(r.createPositionAt(s,e),r.createSlot(i));return r.insert(r.createPositionAt(s,"after"),r.createSlot(e=>!e.is("element","tableRow")&&!t.additionalSlots.some(t=>{let{filter:i}=t;return i(e)}))),t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),my(e,t,{hasSelectionHandle:!0})}(a,r):a}}function QD(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,i)=>{let{writer:n}=i;const r=t.parent,o=r.parent,s=o.getChildIndex(r),a=new XD(o,{row:s}),l=o.getAttribute("headingRows")||0,c=o.getAttribute("headingColumns")||0;let u=null;for(const i of a)if(i.cell==t){const t=i.row<l||i.column<c?"th":"td";u=e.asWidget?_y(n.createEditableElement(t),n):n.createContainerElement(t);break}return u}}function eO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,i)=>{let{writer:n}=i;if(!t.parent.is("element","tableCell"))return null;if(!tO(t))return null;if(e.asWidget)return n.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function tO(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class iO extends gs{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema;this.isEnabled=function(e,t){const i=e.getFirstPosition().parent,n=i===i.root?i:i.parent;return t.checkChild(n,"table")}(t,i)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor,i=t.model,n=t.plugins.get("TableUtils"),r=t.config.get("table.defaultHeadings.rows"),o=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&r&&(e.headingRows=r),void 0===e.headingColumns&&o&&(e.headingColumns=o),i.change(t=>{const r=n.createTable(t,e);i.insertObject(r,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(r.getNodeByPath([0,0,0]),0))})}}class nO extends gs{order;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("TableUtils"),n="above"===this.order,r=i.getSelectionAffectedTableCells(t),o=i.getRowIndexes(r),s=n?o.first:o.last,a=r[0].findAnce
6stor("table");i.insertRows(a,{at:n?s:s+1,copyStructureFromAbove:!n})}}class rO extends gs{order;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("TableUtils"),n="left"===this.order,r=i.getSelectionAffectedTableCells(t),o=i.getColumnIndexes(r),s=n?o.first:o.last,a=r[0].findAncestor("table");i.insertColumns(a,{columns:1,at:n?s:s+1})}}class oO extends gs{direction;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function sO(e,t,i){const{startRow:n,startColumn:r,endRow:o,endColumn:s}=t,a=i.createElement("table"),l=o-n+1;for(let e=0;e<l;e++)i.insertElement("tableRow",a,"end");const c=[...new XD(e,{startRow:n,endRow:o,startColumn:r,endColumn:s,includeAllSlots:!0})];for(const{row:e,column:t,cell:l,isAnchor:u,cellAnchorRow:h,cellAnchorColumn:d}of c){const c=e-n,f=a.getChild(c);if(u){const n=i.cloneElement(l);i.append(n,f),hO(n,e,t,o,s,i)}else(h<n||d<r)&&WD(i,i.createPositionAt(f,"end"))}return function(e,t,i,n,r){const o=parseInt(t.getAttribute("headingRows")||"0");o>0&&UD("headingRows",o-i,e,r,0);const s=parseInt(t.getAttribute("headingColumns")||"0");s>0&&UD("headingColumns",s-n,e,r,0)}(a,e,n,r,i),a}
6function aO(e,t){const i=[],n=new XD(e,{startRow:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,endRow:t-1});for(const e of n){const{row:n,cellHeight:r}=e;n<t&&t<=n+r-1&&i.push(e)}return i}function lO(e,t,i){const n=e.parent,r=n.parent,o=n.index,s=t-o,a={},l=parseInt(e.getAttribute("rowspan"))-s;l>1&&(a.rowspan=l);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const u=o+s,h=[...new XD(r,{startRow:o,endRow:u,includeAllSlots:!0})];let d,f=null;for(const t of h){const{row:n,column:r,cell:o}=t;o===e&&void 0===d&&(d=r),void 0!==d&&d===r&&n===u&&(f=WD(i,t.getPositionBefore(),a))}return UD("rowspan",s,e,i),f}function cO(e,t){const i=[],n=new XD(e);for(const e of n){const{column:n,cellWidth:r}=e;n<t&&t<=n+r-1&&i.push(e)}return i}function uO(e,t,i,n){const r=i-t,o={},s=parseInt(e.getAttribute("colspan"))-r;s>1&&(o.colspan=s);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(o.rowspan=a);const l=WD(n,n.createPositionAfter(e),o);return UD("colspan",r,e,n),l}function hO(e,t,i,n,r,o){const s=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");i+s-1>r&&UD("colspan",r-i+1,e,o,1),t+a-1>n&&UD("rowspan",n-t+1,e,o,1)}function dO(e,t){const i=t.getColumns(e),n=new Array(i).fill(0);for(const{column:t}of new XD(e))n[t]++;const r=n.reduce((e,t,i)=>t?e:[...e,i],[]);if(r.length>0){const i=r[r.length-1];return t.removeColumns(e,{at:i}),!0}return!1}function fO(e,t){const i=[],n=t.getRows(e);for(let t=0;t<n;t++)e.getChild(t).isEmpty&&i.push(t);if(i.length>0){const n=i[i.length-1];return t.removeRows(e,{at:n}),!0}return!1}function pO(e,t){dO(e,t)||fO(e,t)}function mO(e,t){const i=Array.from(new XD(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(i.every(e=>{let{cellHeight:t}=e;return 1===t}))return t.lastRow;const n=i[0].cellHeight-1;return t.lastRow+n}function gO(e,t){const i=Array.from(new XD(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(i.every(e=>{let{cellWidth:t}=e;return 1===t}))return t.lastColumn;const n=i[0].cellWidth-1;return t.lastColumn+n}class vO extends gs{direction;isHorizontal;constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,i=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,r=this.direction;e.change(e=>{const t="right"==r||"down"==r,o=t?i:n,s=t?n:i,a=s.parent;!function(e,t,i){bO(e)||(bO(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end"))),i.remove(e)}(s,o,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(i.getAttribute(l)||"1"),u=parseInt(n.getAttribute(l)||"1");e.setAttribute(l,c+u,o),e.setSelection(e.createRangeIn(o));const h=this.editor.plugins.get("TableUtils");pO(a.findAncestor("table"),h)})}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),i=t.getTableCellsContainingSelection(e.selection)[0];if(!i)return;const n=this.isHorizontal?function(e,t,i){const n=e.parent.parent,r="right"==t?e.nextSibling:e.previousSibling,o=(n.getAttribute("headingColumns")||0)>0;if(!r)return;const s="right"==t?e:r,a="right"==t?r:e,{column:l}=i.getCellLocation(s),{column:c}=i.getCellLocation(a),u=parseInt(s.getAttribute("colspan")||"1"),h=$D(i,s),d=$D(i,a);return o&&h!=d?void 0:l+u===c?r:void 0}(i,this.direction,t):function(e,t,i){const n=e.parent,r=n.parent,o=r.getChildIndex(n);if("down"==t&&o===i.getRows(r)-1||"up"==t&&0===o)return null;const s=parseInt(e.getAttribute("rowspan")||"1"),a=r.getAttribute("headingRows")||0;if(a&&("down"==t&&o+s===a||"up"==t&&o===a))return null;const l=parseInt(e.getAttribute("rowspan")||"1"),c="down"==t?o+l:o,u=[...new XD(r,{endRow:c})],h=u.find(t=>t.cell===e),d=h.column,f=u.find(e=>{let{row:i,cellHeight:n,column:r}=e;return r===d&&("down"==t?i===c:c===i+n)});return f&&f.cell?f.cell:null}(i,this.direction,t);if(!n)return;const r=this.isHorizontal?"rowspan":"colspan",o=parseInt(i.getAttribute(r)||"1");return parseInt(n.getAttribute(r)||"1")===o?n:void 0}}function bO(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class yO extends gs{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=t[0];
6if(i){const n=i.findAncestor("table"),r=e.getRows(n)-1,o=e.getRowIndexes(t),s=0===o.first&&o.last===r;this.isEnabled=!s}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(i),r=i[0],o=r.findAncestor("table"),s=t.getCellLocation(r).column;e.change(e=>{const i=n.last-n.first+1;t.removeRows(o,{at:n.first,rows:i});const r=function(e,t,i,n){const r=e.getChild(Math.min(t,n-1));let o=r.getChild(0),s=0;for(const e of r.getChildren()){if(s>i)return o;o=e,s+=parseInt(e.getAttribute("colspan")||"1")}return o}(o,n.first,s,t.getRows(o));e.setSelection(e.createPositionAt(r,0))})}}class wO extends gs{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=t[0];if(i){const n=i.findAncestor("table"),r=e.getColumns(n),{first:o,last:s}=e.getColumnIndexes(t);this.isEnabled=s-o<r-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,i]=function(e,t){const i=t.getSelectionAffectedTableCells(e),n=i[0],r=i.pop(),o=[n,r];return n.isBefore(r)?o:o.reverse()}(this.editor.model.document.selection,e),n=t.parent.parent,r=[...new XD(n)],o={first:r.find(e=>e.cell===t).column,last:r.find(e=>e.cell===i).column},s=function(e,t,i,n){return parseInt(i.getAttribute("colspan")||"1")>1?i:t.previousSibling||i.nextSibling?i.nextSibling||t.previousSibling:n.first?e.reverse().find(e=>{let{column:t}=e;return t<n.first}).cell:e.reverse().find(e=>{let{column:t}=e;return t>n.last}).cell}(r,t,i,o);this.editor.model.change(t=>{const i=o.last-o.first+1;e.removeColumns(n,{at:o.first,columns:i}),t.setSelection(t.createPositionAt(s,0))})}}class _O extends gs{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,i=e.getSelectionAffectedTableCells(t.document.selection),n=i.length>0;this.isEnabled=n,this.value=n&&i.every(e=>this._isInHeading(e,e.parent.parent))}execute(){if((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,i=e.getSelectionAffectedTableCells(t.document.selection),n=i[0].findAncestor("table"),{first:r,last:o}=e.getRowIndexes(i),s=this.value?r:o+1,a=n.getAttribute("headingRows")||0;t.change(e=>{if(s){const t=aO(n,s,s>a?a:0);for(const{cell:i}of t)lO(i,s,e)}UD("headingRows",s,n,e,0)})}_isInHeading(e,t){const i=parseInt(t.getAttribute("headingRows")||"0");return!!i&&e.parent.index<i}}class kO extends gs{refresh(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=i.length>0;this.isEnabled=n,this.value=n&&i.every(e=>$D(t,e))}execute(){if((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,i=e.getSelectionAffectedTableCells(t.document.selection),n=i[0].findAncestor("table"),{first:r,last:o}=e.getColumnIndexes(i),s=this.value?r:o+1;t.change(e=>{if(s){const t=cO(n,s);for(const{cell:i,column:n}of t)uO(i,n,s,e)}UD("headingColumns",s,n,e,0)})}}function xO(e,t){return 4e3/CO(e,t)}function CO(e,t){const i=SO(e,"tbody",t)||SO(e,"thead",t);return EO(t.editing.view.domConverter.mapViewToDom(i))}function SO(e,t,i){return[...[...i.editing.mapper.toViewElement(e).getChildren()].find(e=>e.is("element","table")).getChildren()].find(e=>e.is("element",t))}function EO(e){const t=r.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function TO(e){const t=Math.pow(10,2),i="number"==typeof e?e:parseFloat(e);return Math.round(i*t)/t}function AO(e){return e.map(e=>"number"==typeof e?e:parseFloat(e)).filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0)}function IO(e){let t=function(e){const t=e.filter(e=>"auto"===e).length;if(0===t)return e.map(e=>TO(e));const i=AO(e),n=Math.max((100-i)/t,5);return e.map(e=>"auto"===e?n:e).map(e=>TO(e))}(e.map(e=>"auto"===e?e:parseFloat(e.replace("%",""))));const i=AO(t);return 100!==i&&(t=t.map(e=>TO(100*e/i)).map((e,t,i)=>t!==i.length-1?e:TO(e+100-AO(i)))),t.map(e=>e+"%")}function MO(e){const t=r.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function PO(e,t,i,n){for(let r=0;r<Math.max(i.length,e.length);r++){const o=e[r],s=i[r];s?o?n.setAttribute("columnWidth",s,o):n.appendElement("tableColumn",{columnWidth:s},t):n.remove(o)}}function DO(e){if(e.is("element","tableColumnGroup"))return e;const t=e.getChildren();return Array.from(t).find(e=>e.is("element","tableColumnGroup"))}function OO(e){const t=DO(e);return t?Array.from(t.getChildren()):[]}class LO extends ps{static get pluginName(){return"TableUtils"}static get isOfficialPlugin(){return!0}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,i=t.parent,n=i.getChildIndex(t),r=new XD(i,{row:n});for(const{cell:t,row:i,column:n}of r)if(t===e)return{row:i,column:n}}createTable(e,t){const i=e.createElement("table"),n=t.rows||2,r=t.columns||2;return RO(e,i,0,n,r),t.headingRows&&UD("headingRows",Math.min(t.headingRows,n),i,e,0),t.headingColumns&&UD("headingColumns",Math.min(t.headingColumns,r),i,e,0),i}insertRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.editor.model,n=t.at||0,r=t.rows||1,o=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),l=this.getColumns(e);if(n>a)throw new v("tableutils-insertrows-insert-out-of-range",this,{options:t});i.change(t=>{const i=e.getAttribute("headingRows")||0;if(i>n&&UD("headingRows",i+r,e,t,0),!o&&(0===n||n===a))return void RO(t,e,n,r,l);const c=o?Math.max(n,s):n,u=new XD(e,{endRow:c}),h=new Array(l).fill(1);for(const{row:e,column:i,cellHeight:a,cellWidth:l,cell:c}of u){const u=e+a-1,d=e<=s&&s<=u;e<n&&n<=u?(t.setAttribute("rowspan",a+r,c),h[i]=-l):o&&d&&(h[i]=l)}for(let i=0;i<r;i++){const i=t.createElement("tableRow");t.insert(i,e,n);for(let e=0;e<h.length;e++){const n=h[e],r=t.createPositionAt(i,"end");n>0&&WD(t,r,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}})}insertColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.editor.model,n=t.at||0,r=t.columns||1;i.change(t=>{const i=e.getAttribute("headingColumns");n<i&&t.setAttribute("headingColumns",i+r,e);const o=this.getColumns(e);if(0===n||o===n){for(const i of e.getChildren())i.is("element","tableRow")&&BO(r,t,t.createPositionAt(i,n?"end":0));return}
6const s=new XD(e,{column:n,includeAllSlots:!0});for(const e of s){const{row:i,cell:o,cellAnchorColumn:a,cellAnchorRow:l,cellWidth:c,cellHeight:u}=e;if(a<n){t.setAttribute("colspan",c+r,o);const e=l+u-1;for(let t=i;t<=e;t++)s.skipRow(t)}else BO(r,t,e.getPositionBefore())}})}removeRows(e,t){const i=this.editor.model,n=t.rows||1,r=this.getRows(e),o=t.at,s=o+n-1;if(s>r-1)throw new v("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});i.change(t=>{const i={first:o,last:s},{cellsToMove:n,cellsToTrim:r}=function(e,t){let{first:i,last:n}=t;const r=new Map,o=[];for(const{row:t,column:s,cellHeight:a,cell:l}of new XD(e,{endRow:n})){const e=t+a-1;if(t>=i&&t<=n&&e>n){const e=a-(n-t+1);r.set(s,{cell:l,rowspan:e})}if(t<i&&e>=i){let t;t=e>=n?n-i+1:e-i+1,o.push({cell:l,rowspan:a-t})}}return{cellsToMove:r,cellsToTrim:o}}(e,i);n.size&&function(e,t,i,n){const r=[...new XD(e,{includeAllSlots:!0,row:t})],o=e.getChild(t);let s;for(const{column:e,cell:t,isAnchor:a}of r)if(i.has(e)){const{cell:t,rowspan:r}=i.get(e),a=s?n.createPositionAfter(s):n.createPositionAt(o,0);n.move(n.createRangeOn(t),a),UD("rowspan",r,t,n),s=t}else a&&(s=t)}(e,s+1,n,t);for(let i=s;i>=o;i--)t.remove(e.getChild(i));for(const{rowspan:e,cell:i}of r)UD("rowspan",e,i,t);!function(e,t,i){let{first:n,last:r}=t;const o=e.getAttribute("headingRows")||0;n<o&&UD("headingRows",r<o?o-(r-n+1):n,e,i,0)}(e,i,t),dO(e,this)||fO(e,this)})}removeColumns(e,t){const i=this.editor.model,n=t.at,r=t.columns||1,o=t.at+r-1;i.change(t=>{!function(e,t,i){const n=e.getAttribute("headingColumns")||0;if(n&&t.first<n){const r=Math.min(n-1,t.last)-t.first+1;i.setAttribute("headingColumns",n-r,e)}}(e,{first:n,last:o},t);const i=OO(e);for(let r=o;r>=n;r--){for(const{cell:i,column:n,cellWidth:o}of[...new XD(e)])n<=r&&o>1&&n+o>r?UD("colspan",o-1,i,t):n===r&&t.remove(i);if(i[r]){const e=0===r?i[1]:i[r-1],n=parseFloat(i[r].getAttribute("columnWidth")),o=parseFloat(e.getAttribute("columnWidth"));t.remove(i[r]),t.setAttribute("columnWidth",n+o+"%",e)}}fO(e,this)||dO(e,this)})}splitCellVertically(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const i=this.editor.model,n=e.parent.parent,r=parseInt(e.getAttribute("rowspan")||"1"),o=parseInt(e.getAttribute("colspan")||"1");i.change(i=>{if(o>1){const{newCellsSpan:n,updatedSpan:s}=NO(o,t);UD("colspan",s,e,i);const a={};n>1&&(a.colspan=n),r>1&&(a.rowspan=r),BO(o>t?t-1:o-1,i,i.createPositionAfter(e),a)}if(o<t){const s=t-o,a=[...new XD(n)],{column:l}=a.find(t=>{let{cell:i}=t;return i===e}),c=a.filter(t=>{let{cell:i,cellWidth:n,column:r}=t;return i!==e&&r===l||r<l&&r+n>l});for(const{cell:e,cellWidth:t}of c)i.setAttribute("colspan",t+s,e);const u={};r>1&&(u.rowspan=r),BO(s,i,i.createPositionAfter(e),u);const h=n.getAttribute("headingColumns")||0;h>l&&UD("headingColumns",h+s,n,i)}})}splitCellHorizontally(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const i=this.editor.model,n=e.parent,r=n.parent,o=r.getChildIndex(n),s=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");i.change(i=>{if(s>1){const n=[...new XD(r,{startRow:o,endRow:o+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=NO(s,t);UD("rowspan",c,e,i);const{column:u}=n.find(t=>{let{cell:i}=t;return i===e}),h={};l>1&&(h.rowspan=l),a>1&&(h.colspan=a);let d=0;for(const e of n){const{column:t,row:n}=e,r=t===u;d>=l&&r&&(d=0),n>=o+c&&r&&(d||BO(1,i,e.getPositionBefore(),h),d++)}}if(s<t){const n=t-s,l=[...new XD(r,{startRow:0,endRow:o})];for(const{cell:t,cellHeight:r,row:s}of l)if(t!==e&&s+r>o){const e=r+n;i.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),RO(i,r,o+1,n,1,c);const u=r.getAttribute("headingRows")||0;u>o&&UD("headingRows",u+n,r,i)}})}getColumns(e){return[...e.getChild(0).getChildren()].filter(e=>e.is("element","tableCell")).reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||"1"),0)}getRows(e){return Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0)}createTableWalker(e){return new XD(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}getSelectedTableCells(e){const t=[];for(const i of this.sortRanges(e.getRanges())){const e=i.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];
6for(const i of e.getRanges()){const e=i.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map(e=>e.parent.index);return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),i=[...new XD(t)].filter(t=>e.includes(t.cell)).map(e=>e.column);return this._getFirstLastIndexesObject(i)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,i=new Set;let n=0;for(const r of e){const{row:e,column:o}=this.getCellLocation(r),s=parseInt(r.getAttribute("rowspan"))||1,a=parseInt(r.getAttribute("colspan"))||1;t.add(e),i.add(o),s>1&&t.add(e+s-1),a>1&&i.add(o+a-1),n+=s*a}const r=function(e,t){const i=Array.from(e.values()),n=Array.from(t.values());return(Math.max(...i)-Math.min(...i)+1)*(Math.max(...n)-Math.min(...n)+1)}(t,i);return r==n}sortRanges(e){return Array.from(e).sort(jO)}_getFirstLastIndexesObject(e){const t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}
vendor: 5,129 bytes, line 6
6_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),i=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(i,n))return!1;const r=this.getColumnIndexes(e),o=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(r,o)}_areIndexesInSameSection(e,t){let{first:i,last:n}=e;return i<t==n<t}}function RO(e,t,i,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};for(let s=0;s<n;s++){const n=e.createElement("tableRow");e.insert(n,t,i),BO(r,e,e.createPositionAt(n,"end"),o)}}function BO(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};for(let r=0;r<e;r++)WD(t,i,n)}function NO(e,t){if(e<t)return{newCellsSpan:1,updatedSpan:1};const i=Math.floor(e/t);return{newCellsSpan:i,updatedSpan:e-i*t+i}}function jO(e,t){const i=e.start,n=t.start;return i.isBefore(n)?-1:1}i.TableUtils=LO;class FO extends gs{refresh(){const e=this.editor.plugins.get(LO),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t)}execute(){const e=this.editor.model,t=this.editor.plugins.get(LO);e.change(i=>{const n=t.getSelectedTableCells(e.document.selection),r=n.shift(),{mergeWidth:o,mergeHeight:s}=function(e,t,i){let n=0,r=0;for(const e of t){const{row:t,column:o}=i.getCellLocation(e);n=HO(e,o,n,"colspan"),r=HO(e,t,r,"rowspan")}const{row:o,column:s}=i.getCellLocation(e);return{mergeWidth:n-s,mergeHeight:r-o}}(r,n,t);UD("colspan",o,r,i),UD("rowspan",s,r,i);for(const e of n)zO(e,r,i);pO(r.findAncestor("table"),t),i.setSelection(r,"in")})}}function zO(e,t,i){VO(e)||(VO(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end"))),i.remove(e)}function VO(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function HO(e,t,i,n){const r=parseInt(e.getAttribute(n)||"1");return Math.max(i,t+r)}class UO extends gs{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(i),r=i[0].findAncestor("table"),o=[];for(let t=n.first;t<=n.last;t++)for(const i of r.getChild(t).getChildren())o.push(e.createRangeOn(i));e.change(e=>{e.setSelection(o)})}}class WO extends gs{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,i=e.getSelectionAffectedTableCells(t.document.selection),n=i[0],r=i.pop(),o=n.findAncestor("table"),s=e.getCellLocation(n),a=e.getCellLocation(r),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),u=[];for(const e of new XD(o,{startColumn:l,endColumn:c}))u.push(t.createRangeOn(e.cell));t.change(e=>{e.setSelection(u)})}}function $O(e,t){let i=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),i=Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0),n=[];for(const{row:r,cell:o,cellHeight:s}of new XD(e)){if(s<2)continue;const e=r<t?t:i;if(r+s>e){const t=e-r;n.push({cell:o,rowspan:t})}}return n}(e);if(n.length){i=!0;for(const e of n)UD("rowspan",e.rowspan,e.cell,t,1)}return i}function GO(e,t){let i=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:i}of new XD(e,{includeAllSlots:!0}))t[i]++;return t}(e),r=[];for(const[t,i]of n.entries())!i&&e.getChild(t).is("element","tableRow")&&r.push(t);if(r.length){i=!0;for(const i of r.reverse())t.remove(e.getChild(i)),n.splice(i,1)}const o=n.filter((t,i)=>e.getChild(i).is("element","tableRow")),s=o[0];if(!o.every(e=>e===s)){const n=o.reduce((e,t)=>t>e?t:e,0);for(const[r,s]of o.entries()){const o=n-s;if(o){for(let i=0;i<o;i++)WD(t,t.createPositionAt(e.getChild(r),"end"));i=!0}}}return i}function qO(e){if("attribute"!==e.type)return!1;const t=e.attributeKey;return"headingRows"===t||"colspan"===t||"rowspan"===t}function YO(e,t){let i=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(i=ZO(n,t)||i);return i}function ZO(e,t){let i=!1;for(const n of e.getChildren())i=XO(n,t)||i;return i}function XO(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const i=Array.from(e.getChildren()).filter(e=>e.is("$text"));for(const e of i)t.wrap(t.createRangeOn(e),"paragraph");return!!i.length}function KO(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function JO(e,t){if(!e.is("element","paragraph"))return!1;const i=t.toViewElement(e);return!!i&&tO(e)!==i.is("element","span")}class QO extends ps{_additionalSlots;static get pluginName(){return"TableEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[LO]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,i=t.schema,n=e.conversion,r=e.plugins.get(LO);
6i.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),i.register("tableRow",{allowIn:"table",isLimit:!0}),i.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add(e=>{e.on("element:figure",(e,t,i)=>{if(!i.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!i.consumable.test(n,{name:!0}))return;i.consumable.consume(t.viewItem,{name:!0,classes:"table"});const r=qo(i.convertItem(n,t.modelCursor).modelRange.getItems());r?(i.convertChildren(t.viewItem,i.writer.createPositionAt(r,"end")),i.updateConversionResult(r,t)):i.consumable.revert(t.viewItem,{name:!0,classes:"table"})})}),n.for("upcast").add(e=>{e.on("element:table",(e,t,i)=>{const n=t.viewItem;if(!i.consumable.test(n,{name:!0}))return;const{rows:r,headingRows:o,headingColumns:s}=function(e){let t,i=0;const n=[],r=[];let o;for(const s of Array.from(e.getChildren())){if("tbody"!==s.name&&"thead"!==s.name&&"tfoot"!==s.name)continue;"thead"!==s.name||o||(o=s);const e=Array.from(s.getChildren()).filter(e=>e.is("element","tr"));for(const a of e)if(o&&s===o||"tbody"===s.name&&Array.from(a.getChildren()).length&&Array.from(a.getChildren()).every(e=>e.is("element","th")))i++,n.push(a);else{r.push(a);const e=ZD(a);(!t||e<t)&&(t=e)}}return{headingRows:i,headingColumns:t||0,rows:[...n,...r]}}(n),a={};s&&(a.headingColumns=s),o&&(a.headingRows=o);const l=i.writer.createElement("table",a);if(i.safeInsert(l,t.modelCursor)){if(i.consumable.consume(n,{name:!0}),r.forEach(e=>i.convertItem(e,i.writer.createPositionAt(l,"end"))),i.convertChildren(n,i.writer.createPositionAt(l,"end")),l.isEmpty){const e=i.writer.createElement("tableRow");i.writer.insert(e,i.writer.createPositionAt(l,"end")),WD(i.writer,i.writer.createPositionAt(e,"end"))}i.updateConversionResult(l,t)}})}),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:JD(r,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:JD(r,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),n.for("downcast").elementToElement({model:"tableRow",view:(e,t)=>{let{writer:i}=t;return e.isEmpty?i.createEmptyElement("tr"):i.createContainerElement("tr")}}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(YD("td")),n.for("upcast").add(YD("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:QD({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:QD()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:eO({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:eO(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:eL("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:eL("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new iO(e)),e.commands.add("insertTableRowAbove",new nO(e,{order:"above"})),e.commands.add("insertTableRowBelow",new nO(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new rO(e,{order:"left"})),e.commands.add("insertTableColumnRight",new rO(e,{order:"right"})),e.commands.add("removeTableRow",new yO(e)),e.commands.add("removeTableColumn",new wO(e)),e.commands.add("splitTableCellVertically",new oO(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new oO(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new FO(e)),e.commands.add("mergeTableCellRight",new vO(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new vO(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new vO(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new vO(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new kO(e)),e.commands.add("setTableRowHeader",new _O(e)),e.commands.add("selectTableRow",
6new UO(e)),e.commands.add("selectTableColumn",new WO(e)),function(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;const r=new Set;for(const t of i){let i=null;"insert"==t.type&&"table"==t.name&&(i=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(i=t.position.findAncestor("table")),qO(t)&&(i=t.range.start.findAncestor("table")),i&&!r.has(i)&&(n=$O(i,e)||n,n=GO(i,e)||n,r.add(i))}return n}(t,e))}(t),function(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i)"insert"==t.type&&"table"==t.name&&(n=YO(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=ZO(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=XO(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!KO(t)||(n=XO(t.position.parent,e)||n);return n}(t,e))}(t),this.listenTo(t.document,"change:data",()=>{!function(e,t){const i=e.document.differ;for(const e of i.getChanges()){let i,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;i=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(i=e.position.findAncestor("table"),n="tableRow"==e.name);if(!i)continue;const r=i.getAttribute("headingRows")||0,o=i.getAttribute("headingColumns")||0,s=new XD(i);for(const e of s){const i=e.row<r||e.column<o?"th":"td",s=t.mapper.toViewElement(e.cell);s&&s.is("element")&&s.name!=i&&t.reconvertItem(n?e.cell.parent:e.cell)}}}(t,e.editing),function(e,t){const i=e.document.differ,n=new Set;for(const e of i.getChanges()){const t="attribute"==e.type?e.range.start.parent:e.position.parent;t.is("element","tableCell")&&n.add(t)}for(const e of n.values()){const i=Array.from(e.getChildren()).filter(e=>JO(e,t.mapper));for(const e of i)t.reconvertItem(e)}}(t,e.editing)})}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function eL(e){return t=>{const i=parseInt(t.getAttribute(e));return Number.isNaN(i)||i<=0?null:i}}i.TableEditing=QO;class tL extends Df{items;keystrokes;focusTracker;constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new Jo,this.focusTracker=new Yo,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} Ã ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"[email protected]":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{const{row:i,column:n}=t.target.dataset;this.items.get(10*(parseInt(i,10)-1)+(parseInt(n,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(e,t,i)=>{if(!i)return;const{row:n,column:r}=i.dataset;this.set({rows:parseInt(n),columns:parseInt(r)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),Bf({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((i,n)=>{const r=Math.floor(n/10)<e&&n%10<t;i.set("isOn",r)})}_createGridButton(e,t,i,n){const r=new Ff(e);return r.set({label:n,class:"ck-insert-table-dropdown-grid-box"}),r.extendTemplate({attributes:{"data-row":t,"data-column":i}}),r}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const i=Math.floor(t/10),n=t%10,r=`${i+1} Ã ${n+1}`;e.push(this._createGridButton(this.locale,i+1,n+1,r))}return this.createCollection(e)}}class iL extends ps{static get pluginName(){return"TableUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t,i="ltr"===e.locale.contentLanguageDirection;e.ui.componentFactory.add("insertTable",i=>{const n=e.commands.get("insertTable"),r=ym(i);let o;return r.bind("isEnabled").to(n),r.buttonView.set({icon:Yd.table,label:t("Insert table"),tooltip:!0}),r.on("change:isOpen",()=>{o||(o=new tL(i),r.panelView.children.add(o),o.delegate("execute").to(r),r.on("execute",()=>{e.execute("insertTable",{rows:o.rows,columns:o.columns}),e.editing.view.focus()}))}),r}),e.ui.componentFactory.add("menuBar:insertTable",i=>{const n=e.commands.get("insertTable"),r=new wv(i),o=new tL(i);return o.delegate("execute").to(r),r.on("change:isOpen",(e,t,i)=>{i||o.reset()}),o.on("execute",()=>{e.execute("insertTable",{rows:o.rows,columns:o.columns}),e.editing.view.focus()}),r.buttonView.set({label:t("Table"),icon:Yd.table}),r.panelView.children.add(o),r.bind("isEnabled").to(n),r}),e.ui.componentFactory.add("tableColumn",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:i?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:i?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',n,e)}),e.ui.componentFactory.add("tableRow",e=>{const i=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',i,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:i?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:i?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',n,e)})}_prepareDropdown(e,t,i,n){const r=this.editor,o=ym(n),s=this._fillDropdownWithListOptions(o,i);return o.buttonView.set({label:e,icon:t,tooltip:!0}),o.bind("isEnabled").toMany(s,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),this.listenTo(o,"execute",e=>{r.execute(e.source.commandName),e.source instanceof ap||r.editing.view.focus()}),o}_prepareMergeSplitButtonDropdown(e,t,i,n){const r=this.editor,o=ym(n,bm),s="mergeTableCells",a=r.commands.get(s),l=this._fillDropdownWithListOptions(o,i);return o.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),o.bind("isEnabled").toMany([a,...l],"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),this.listenTo(o.buttonView,"execute",()=>{r.execute(s),r.editing.view.focus()}),this.listenTo(o,"execute",e=>{r.execute(e.source.commandName),r.editing.view.focus()}),o}_fillDropdownWithListOptions(e,t){const i=this.editor,n=[],r=new Go;for(const e of t)nL(e,i,n,r);return xm(e,r),n}}function nL(e,t,i,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new ev(e.model),{commandName:r,bindIsOn:o}=e.model,s=t.commands.get(r);i.push(s),n.set({commandName:r}),n.bind("isEnabled").to(s),o&&n.bind("isOn").to(s,"value"),n.set({withText:!0})}n.add(e)}i.TableUI=iL;class rL extends ps{static get pluginName(){return"TableSelection"}static get isOfficialPlugin(){return!0}static get requires(){return[LO,LO]}init(){const e=this.editor,t=e.model,i=e.editing.view;this.listenTo(t,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this.listenTo(i.document,"insertText",(e,t)=>this._handleInsertTextEvent(e,t),{priority:"high"}
6),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(LO),t=this.editor.model.document.selection,i=e.getSelectedTableCells(t);return 0==i.length?null:i}getSelectionAsFragment(){const e=this.editor.plugins.get(LO),t=this.getSelectedTableCells();return t?this.editor.model.change(i=>{const n=i.createDocumentFragment(),{first:r,last:o}=e.getColumnIndexes(t),{first:s,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=a,u=o;if(e.isSelectionRectangular(t)){const e={firstColumn:r,lastColumn:o,firstRow:s,lastRow:a};c=mO(l,e),u=gO(l,e)}const h=sO(l,{startRow:s,startColumn:r,endRow:c,endColumn:u},i);return i.insert(h,n,0),n}):null}setCellSelection(e,t){const i=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(i.cells.map(t=>e.createRangeOn(t)),{backward:i.backward})})}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=qo(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,i,n)=>{const r=n.writer;!function(e){for(const i of t)e.removeClass("ck-editor__editable_selected",i);t.clear()}(r);const o=this.getSelectedTableCells();if(!o)return;for(const e of o){const i=n.mapper.toViewElement(e);r.addClass("ck-editor__editable_selected",i),t.add(i)}const s=n.mapper.toViewElement(o[o.length-1]);r.setSelection(s,0)},{priority:"lowest"}))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(i=>{const n=i.createPositionAt(t[0],0),r=e.model.schema.getNearestSelectionRange(n);i.setSelection(r)})}})}_handleDeleteContent(e,t){const i=this.editor.plugins.get(LO),n=t[0],r=t[1],o=this.editor.model,s=!r||"backward"==r.direction,a=i.getSelectedTableCells(n);a.length&&(e.stop(),o.change(e=>{const t=a[s?a.length-1:0];o.change(e=>{for(const t of a)o.deleteContent(e.createSelection(t,"in"))});const i=o.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(i):n.setTo(i)}))}_handleInsertTextEvent(e,t){const i=this.editor,n=this.getSelectedTableCells();if(!n)return;const r=i.editing.view,o=i.editing.mapper,s=n.map(e=>r.createRangeOn(o.toViewElement(e)));t.selection=r.createSelection(s)}_getCellsToSelect(e,t){const i=this.editor.plugins.get("TableUtils"),n=i.getCellLocation(e),r=i.getCellLocation(t),o=Math.min(n.row,r.row),s=Math.max(n.row,r.row),a=Math.min(n.column,r.column),l=Math.max(n.column,r.column),c=new Array(s-o+1).fill(null).map(()=>[]),u={startRow:o,endRow:s,startColumn:a,endColumn:l};for(const{row:t,cell:i}of new XD(e.findAncestor("table"),u))c[t-o].push(i);const h=r.row<n.row,d=r.column<n.column;return h&&c.reverse(),d&&c.forEach(e=>e.reverse()),{cells:c.flat(),backward:h||d}}}i.TableSelection=rL;class oL extends ps{static get pluginName(){return"TableClipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[Vw,Hw,rL,LO]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(t,"cut",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e.model,"insertContent",(e,t)=>{let[i,n]=t;return this._onInsertContent(e,i,n)},{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const i=this.editor.editing.view,n=this.editor.plugins.get(rL),r=this.editor.plugins.get(Vw);n.getSelectedTableCells()&&("cut"!=e.name||this.editor.model.canEditAt(this.editor.model.document.selection))&&(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:"cut"===e.name},()=>{const o=r._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,()=>n.getSelectionAsFragment());i.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(o),method:e.name})}))}_onInsertContent(e,t,i){if(i&&!i.is("documentSelection"))return;const n=this.editor.model,r=this.editor.plugins.get(LO),o=this.editor.plugins.get(Vw),s=this.getTableIfOnlyTableInContent(t,n);if(!s)return;const a=r.getSelectionAffectedTableCells(n.document.selection);a.length?(e.stop(),t.is("documentFragment")?o._pasteMarkersIntoTransformedElement(t.markers,e=>this._replaceSelectedCells(s,a,e)):this.editor.model.change(e=>{this._replaceSelectedCells(s,a,e)})):pO(s,r)}_replaceSelectedCells(e,t,i){const n=this.editor.plugins.get(LO),r={width:n.getColumns(e),height:n.getRows(e)}
6,o=function(e,t,i,n){const r=e[0].findAncestor("table"),o=n.getColumnIndexes(e),s=n.getRowIndexes(e),a={firstColumn:o.first,lastColumn:o.last,firstRow:s.first,lastRow:s.last},l=1===e.length;return l&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,i,n){const r=n.getColumns(e),o=n.getRows(e);i>r&&n.insertColumns(e,{at:r,columns:i-r}),t>o&&n.insertRows(e,{at:o,rows:t-o})}(r,a.lastRow+1,a.lastColumn+1,n)),l||!n.isSelectionRectangular(e)?function(e,t,i){const{firstRow:n,lastRow:r,firstColumn:o,lastColumn:s}=t,a={first:n,last:r},l={first:o,last:s};aL(e,o,a,i),aL(e,s+1,a,i),sL(e,n,l,i),sL(e,r+1,l,i,n)}(r,a,i):(a.lastRow=mO(r,a),a.lastColumn=gO(r,a)),a}(t,r,i,n),s=o.lastRow-o.firstRow+1,a=o.lastColumn-o.firstColumn+1;e=sO(e,{startRow:0,startColumn:0,endRow:Math.min(s,r.height)-1,endColumn:Math.min(a,r.width)-1},i);const l=t[0].findAncestor("table"),c=this._replaceSelectedCellsWithPasted(e,r,l,o,i);if(this.editor.plugins.get("TableSelection").isEnabled){const e=n.sortRanges(c.map(e=>i.createRangeOn(e)));i.setSelection(e)}else i.setSelection(c[0],0);return l}_replaceSelectedCellsWithPasted(e,t,i,n,r){const{width:o,height:s}=t,a=function(e,t,i){const n=new Array(i).fill(null).map(()=>new Array(t).fill(null));for(const{column:t,row:i,cell:r}of new XD(e))n[i][t]=r;return n}(e,o,s),l=[...new XD(i,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let u;for(const e of l){const{row:t,column:i}=e;i===n.firstColumn&&(u=e.getPositionBefore());const l=t-n.firstRow,h=i-n.firstColumn,d=a[l%s][h%o],f=d?r.cloneElement(d):null,p=this._replaceTableSlotCell(e,f,u,r);p&&(hO(p,t,i,n.lastRow,n.lastColumn,r),c.push(p),u=r.createPositionAfter(p))}const h=parseInt(i.getAttribute("headingRows")||"0"),d=parseInt(i.getAttribute("headingColumns")||"0"),f=n.firstRow<h&&h<=n.lastRow,p=n.firstColumn<d&&d<=n.lastColumn;if(f){const e=sL(i,h,{first:n.firstColumn,last:n.lastColumn},r,n.firstRow);c.push(...e)}if(p){const e=aL(i,d,{first:n.firstRow,last:n.lastRow},r);c.push(...e)}return c}_replaceTableSlotCell(e,t,i,n){const{cell:r,isAnchor:o}=e;return o&&n.remove(r),t?(n.insert(t,i),t):null}getTableIfOnlyTableInContent(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(1==e.childCount&&e.getChild(0).is("element","table"))return e.getChild(0);const i=t.createRangeIn(e);for(const e of i.getItems())if(e.is("element","table")){const n=t.createRange(i.start,t.createPositionBefore(e));if(t.hasContent(n,{ignoreWhitespaces:!0}))return null;const r=t.createRange(t.createPositionAfter(e),i.end);return t.hasContent(r,{ignoreWhitespaces:!0})?null:e}return null}}function sL(e,t,i,n){if(!(t<1))return aO(e,t,arguments.length>4&&void 0!==arguments[4]?arguments[4]:0).filter(e=>{let{column:t,cellWidth:n}=e;return lL(t,n,i)}).map(e=>{let{cell:i}=e;return lO(i,t,n)})}function aL(e,t,i,n){if(!(t<1))return cO(e,t).filter(e=>{let{row:t,cellHeight:n}=e;return lL(t,n,i)}).map(e=>{let{cell:i,column:r}=e;return uO(i,r,t,n)})}function lL(e,t,i){const n=e+t-1,{first:r,last:o}=i;return e>=r&&e<=o||e<r&&n>=r}i.TableClipboard=oL;class cL extends ps{static get pluginName(){return"TableKeyboard"}static get isOfficialPlugin(){return!0}static get requires(){return[rL,LO]}init(){var e=this;const t=this.editor,i=t.editing.view.document,n=t.t;this.listenTo(i,"arrowKey",function(){return e._onArrowKey(...arguments)},{context:"table"}),this.listenTo(i,"tab",function(){return e._handleTabOnSelectedTable(...arguments)},{context:"figure"}),this.listenTo(i,"tab",function(){return e._handleTab(...arguments)},{context:["th","td"]}),t.accessibility.addKeystrokeInfoGroup({id:"table",label:n("Keystrokes that can be used in a table cell"),keystrokes:[{label:n("Move the selection to the next cell"),keystroke:"Tab"},{label:n("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:n("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:n("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const i=this.editor,n=i.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),i.model.change(e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))}))}_handleTab(e,t){const i=this.editor,n=this.editor.plugins.get(LO),r=this.editor.plugins.get("TableSelection"),o=i.model.document.selection,s=!t.shiftKey;let a=n.getTableCellsContainingSelection(o)[0];if(a||(a=r.getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();const l=a.parent,c=l.parent,u=c.getChildIndex(l),h=l.getChildIndex(a),d=0===
6h;if(!s&&d&&0===u)return void i.model.change(e=>{e.setSelection(e.createRangeOn(c))});const f=h===l.childCount-1,p=u===n.getRows(c)-1;if(s&&p&&f&&(i.execute("insertTableRowBelow"),u===n.getRows(c)-1))return void i.model.change(e=>{e.setSelection(e.createRangeOn(c))});let m;if(s&&f){const e=c.getChild(u+1);m=e.getChild(0)}else if(!s&&d){const e=c.getChild(u-1);m=e.getChild(e.childCount-1)}else m=l.getChild(h+(s?1:-1));i.model.change(e=>{e.setSelection(e.createRangeIn(m))})}_onArrowKey(e,t){const i=this.editor,n=Fo(t.keyCode,i.locale.contentLanguageDirection);this._handleArrowKeys(n,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const i=this.editor.plugins.get(LO),n=this.editor.plugins.get("TableSelection"),r=this.editor.model,o=r.document.selection,s=["right","down"].includes(e),a=i.getSelectedTableCells(o);if(a.length){let i;return i=t?n.getFocusCell():s?a[a.length-1]:a[0],this._navigateFromCellInDirection(i,e,t),!0}const l=o.focus.findAncestor("tableCell");if(!l)return!1;if(!o.isCollapsed)if(t){if(o.isBackward==s&&!o.containsEntireContent(l))return!1}else{const e=o.getSelectedElement();if(!e||!r.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(o,l,s)&&(this._navigateFromCellInDirection(l,e,t),!0)}_isSelectionAtCellEdge(e,t,i){const n=this.editor.model,r=this.editor.model.schema,o=i?e.getLastPosition():e.getFirstPosition();if(!r.getLimitElement(o).is("element","tableCell"))return n.createPositionAt(t,i?"end":0).isTouching(o);const s=n.createSelection(o);return n.modifySelection(s,{direction:i?"forward":"backward"}),o.isEqual(s.focus)}_navigateFromCellInDirection(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.editor.model,r=e.findAncestor("table"),o=[...new XD(r,{includeAllSlots:!0})],{row:s,column:a}=o[o.length-1],l=o.find(t=>{let{cell:i}=t;return i==e});let{row:c,column:u}=l;switch(t){case"left":u--;break;case"up":c--;break;case"right":u+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||u<0&&c<=0||u>a&&c>=s)return void n.change(e=>{e.setSelection(e.createRangeOn(r))});u<0?(u=i?0:a,c--):u>a&&(u=i?a:0,c++);const h=o.find(e=>e.row==c&&e.column==u).cell,d=["right","down"].includes(t),f=this.editor.plugins.get("TableSelection");if(i&&f.isEnabled){const t=f.getAnchorCell()||e;f.setCellSelection(t,h)}else{const e=n.createPositionAt(h,d?0:"end");n.change(t=>{t.setSelection(e)})}}}i.TableKeyboard=cL;class uL extends el{domEventType=["mousemove","mouseleave"];onDomEvent(e){this.fire(e.type,e)}}class hL extends ps{static get pluginName(){return"TableMouse"}static get isOfficialPlugin(){return!0}static get requires(){return[rL,LO]}init(){this.editor.editing.view.addObserver(uL),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(LO);let i=!1;const n=e.plugins.get(rL);this.listenTo(e.editing.view.document,"mousedown",(r,o)=>{const s=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!o.domEvent.shiftKey)return;const a=n.getAnchorCell()||t.getTableCellsContainingSelection(s)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(o);l&&dL(a,l)&&(i=!0,n.setCellSelection(a,l),o.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{i=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{i&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,i,n=!1,r=!1;const o=e.plugins.get(rL);this.listenTo(e.editing.view.document,"mousedown",(e,i)=>{this.isEnabled&&o.isEnabled&&(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(i)))}),this.listenTo(e.editing.view.document,"mousemove",(e,s)=>{if(!s.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(s);a&&dL(t,a)&&(i=a,n||i==t||(n=!0)),n&&(r=!0,o.setCellSelection(t,i),s.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1,r=!1,t=null,i=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{r&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,i=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(i).parent.findAnce
6stor("tableCell",{includeSelf:!0})}}function dL(e,t){return e.parent.parent==t.parent.parent}i.TableMouse=hL;class fL extends ps{static get requires(){return[QO,iL,rL,hL,cL,oL,Ry]}static get pluginName(){return"Table"}static get isOfficialPlugin(){return!0}}i.Table=fL;function pL(e,t){let{writer:i}=t;const n=e.getAttribute("headingRows")||0,r=i.createSlot(e=>e.is("element","tableRow")&&e.index<n),o=i.createSlot(e=>e.is("element","tableRow")&&e.index>=n),s=i.createSlot(e=>!e.is("element","tableRow")),a=i.createContainerElement("thead",null,r),l=i.createContainerElement("tbody",null,o),c=[];return n&&c.push(a),n<e.childCount&&c.push(l),i.createContainerElement("table",null,[s,...c])}function mL(e){return gL(e)||vL(e)}function gL(e){const t=e.getSelectedElement();return t&&bL(t)?t:null}function vL(e){const t=e.getFirstPosition();if(!t)return null;let i=t.parent;for(;i;){if(i.is("element")&&bL(i))return i;i=i.parent}return null}function bL(e){return!!e.getCustomProperty("table")&&py(e)}i.PlainTableOutput=class extends ps{static get pluginName(){return"PlainTableOutput"}static get isOfficialPlugin(){return!0}static get requires(){return[fL]}init(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:pL,converterPriority:"high"}),e.plugins.has("TableCaption")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,t)=>{let{writer:i}=t;if("table"===e.parent.name)return i.createContainerElement("caption")},converterPriority:"high"}),e.plugins.has("TableProperties")&&function(e){const t={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[i,n]of Object.entries(t))e.conversion.for("dataDowncast").add(e=>e.on(`attribute:${n}:table`,(e,t,n)=>{const{item:r,attributeNewValue:o}=t,{mapper:s,writer:a}=n;if(!n.consumable.consume(r,e.name))return;const l=s.toViewElement(r);o?a.setStyle(i,o,l):a.removeStyle(i,l)},{priority:"high"}))}(e)}};i.TableToolbar=class extends ps{static get requires(){return[Ny]}static get pluginName(){return"TableToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(Ny),n=e.config.get("table.contentToolbar"),r=e.config.get("table.tableToolbar");n&&i.register("tableContent",{ariaLabel:t("Table toolbar"),items:n,getRelatedElement:vL}),r&&i.register("table",{ariaLabel:t("Table toolbar"),items:r,getRelatedElement:gL})}};class yL extends Df{options;focusTracker;focusCycler;_focusables;dropdownView;inputView;keystrokes;_stillTyping;constructor(e,t){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=t,this.focusTracker=new Yo,this._focusables=new uf,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new Jo,this._stillTyping=!1,this.focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",(e,t,i)=>this._setInputValue(i))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach(e=>{this.focusTracker.add(e.element),this._focusables.add(e)}),this.keystrokes.listenTo(this.element)}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,i=this.bindTemplate,n=this._createColorSelector(e),r=ym(e),o=new Df;return o.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:i.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",i.if("value","ck-hidden",e=>""!=e)]}}]}),r.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),r.buttonView.children.add(o),r.buttonView.label=t("Color picker"),r.buttonView.tooltip=!0,r.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",r.panelView.children.add(n),r.bind("isEnabled").to(this,"isReadOnly",e=>!e),r.on("change:isOpen",(e,t,i)=>{i&&(n.updateSelectedColors(),n.showColorGridsFragment())}),r}_createInputTextView(){const e=this.locale,t=new Fp(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",()=>{const e=t.element.value,i=this.options.colorDefinitions.find(t=>e===t.label);this._stillTyping=!0,this.value=i&&i.color||e}),t.on("blur",()=>{this._stillTyping=!1,this._setInputValue(t.element.value)}),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,i=this.options.defaultColorValue||"",n=t(i?"Re
6store default":"Remove color"),r=new hg(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:n,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});r.appendUI(),r.on("execute",(e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||i,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1});let o=this.value;return r.on("colorPicker:cancel",()=>{this.value=o,this.fire("input"),this.dropdownView.isOpen=!1}),r.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{o=this.value}),r.bind("selectedColor").to(this,"value"),r}_setInputValue(e){if(!this._stillTyping){const t=wL(e),i=this.options.colorDefinitions.find(e=>t===wL(e.color));this.inputView.value=i?i.label:e||""}}}function wL(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const _L=e=>""===e;function kL(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function xL(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function CL(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function SL(e){return e=e.trim().toLowerCase(),_L(e)||Ch(e)}function EL(e){return e=e.trim(),_L(e)||DL(e)||Ah(e)||Mh(e)}function TL(e){return e=e.trim(),_L(e)||DL(e)||Ah(e)}function AL(e,t){const i=new Go,n=kL(e.t);for(const r in n){const o={type:"button",model:new ev({_borderStyleValue:r,label:n[r],role:"menuitemradio",withText:!0})};"none"===r?o.model.bind("isOn").to(e,"borderStyle",e=>"none"===t?!e:e===r):o.model.bind("isOn").to(e,"borderStyle",e=>e===r),i.add(o)}return i}function IL(e){const{view:t,icons:i,toolbar:n,labels:r,propertyName:o,nameToValue:s,defaultValue:a}=e;for(const e in r){const l=new Ff(t.locale);l.set({label:r[e],icon:i[e],tooltip:r[e]});const c=s?s(e):e;l.bind("isOn").to(t,o,e=>{let t=e;return""===e&&a&&(t=a),c===t}),l.on("execute",()=>{t[o]=c}),n.items.add(l)}}const ML=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function PL(e){return(t,i,n)=>{const r=new yL(t.locale,{colorDefinitions:(o=e.colorConfig,o.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var o;return r.inputView.set({id:i,ariaDescribedById:n}),r.bind("isReadOnly").to(t,"isEnabled",e=>!e),r.bind("hasError").to(t,"errorText",e=>!!e),r.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused").to(r),r}}function DL(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}class OL extends Df{children;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach(e=>this.children.add(e)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}class LL extends Df{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;paddingInput;widthInput;heightInput;horizontalAlignmentToolbar;verticalAlignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:r,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}
vendor: 8,328 bytes, line 6
6=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:u,dimensionsLabel:h}=this._createDimensionFields(),{horizontalAlignmentToolbar:d,verticalAlignmentToolbar:f,alignmentLabel:p}=this._createAlignmentFields();this.focusTracker=new Yo,this.keystrokes=new Jo,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=n,this.borderColorInput=r,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=u,this.horizontalAlignmentToolbar=d,this.verticalAlignmentToolbar=f;const{saveButtonView:m,cancelButtonView:g}=this._createActionButtons();this.saveButtonView=m,this.cancelButtonView=g,this._focusables=new uf,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Vf(e,{label:this.t("Cell properties")})),this.children.add(new OL(e,{labelView:o,children:[o,i,r,n],class:"ck-table-form__border-row"})),this.children.add(new OL(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new OL(e,{children:[new OL(e,{labelView:h,children:[h,l,c,u],class:"ck-table-form__dimensions-row"}),new OL(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new OL(e,{labelView:p,children:[p,d,f],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new OL(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Rf({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},i=PL({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,r=this.t,o=r("Style"),s=new tp(n);s.text=r("Border");const a=kL(r),l=new Bp(n,Mm);l.set({label:o,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>a[e||"none"]),l.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),l.bind("isEmpty").to(this,"borderStyle",e=>!e),xm(l.fieldView,AL(this,t.style),{role:"menu",ariaLabel:o});const c=new Bp(n,Am);c.set({label:r("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",RL),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const u=new Bp(n,i);return u.set({label:r("Color"),class:"ck-table-form__border-color"}),u.fieldView.bind("value").to(this,"borderColor"),u.bind("isEnabled").to(this,"borderStyle",RL),u.fieldView.on("input",()=>{this.borderColor=u.fieldView.value}),this.on("change:borderStyle",(e,i,n,r)=>{RL(n)||(this.borderColor="",this.borderWidth=""),RL(r)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:u,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,i=new tp(e);i.text=t("Background");const n=PL({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),r=new Bp(e,n);return r.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),r.fieldView.bind("value").to(this,"backgroundColor"),r.fieldView.on("input",()=>{this.backgroundColor=r.fieldView.value}),{backgroundRowLabel:i,backgroundInput:r}}_createDimensionFields(){const e=this.locale,t=this.t,i=new tp(e);i.text=t("Dimensions");const n=new Bp(e,Am);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",()=>{this.width=n.fieldView.element.value});const r=new Df(e);r.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"Ã"}]});const o=new Bp(e,Am);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",()=>{this.height=o.fieldView.element.value}),{dimensionsLabel:i,widthInput:n,operatorLabel:r,heightInput:o}}_createPaddingField(){const e=this.locale,t=this.t,i=new Bp(e,Am);return i.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),i.fieldView.bind("value").to(this,"padding"),i.fieldView.on("input",()=>{this.padding=i.fieldView.element.value}),i}_createAlignmentFields(){const e=this.locale,t=this.t,i=new tp(e),n={left:Yd.alignLeft,center:Yd.alignCenter,right:Yd.alignRight,justify:Yd.alignJustify,top:Yd.alignTop,middle:Yd.alignMiddle,bottom:Yd.alignBottom};i.text=t("Table cell text alignment");const r=new pm(e),o="rtl"===e.contentLanguageDirection;r.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),IL({view:this,icons:n,toolbar:r,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(o){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const s=new pm(e);return s.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),IL({view:this,icons:n,toolbar:s,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:r,verticalAlignmentToolbar:s,alignmentLabel:i}}_createActionButtons(){const e=this.locale,t=this.t,i=new Ff(e),n=new Ff(e),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return i.set({label:t("Save"),icon:Yd.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(r,"errorText",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.every(e=>!e)}),n.set({label:t("Cancel"),icon:Yd.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:n}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,i=t("Align cell text to the left"),n=t("Align cell text to the center"),r=t("Align cell text to the right"),o=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:r,center:n,left:i,justify:o}:{left:i,center:n,right:r,justify:o}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function RL(e){return"none"!==e}const BL=[om.defaultPositions.northArrowSouth,om.defaultPositions.northArrowSouthWest,om.defaultPositions.northArrowSouthEast,om.defaultPositions.southArrowNorth,om.defaultPositions.southArrowNorthWest,om.defaultPositions.southArrowNorthEast,om.defaultPositions.viewportStickyNorth];function NL(e,t){const i=e.plugins.get("ContextualBalloon"),n=e.editing.view.document.selection;let r;"cell"===t?vL(n)&&(r=FL(e)):mL(n)&&(r=jL(e)),r&&i.updatePosition(r)}function jL(e){const t=qD(e.model.document.selection),i=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(i),positions:BL}}function FL(e){const t=e.editing.mapper,i=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const i=t.editing.mapper,n=t.editing.view.domConverter,r=Array.from(e).map(e=>{const t=zL(e.start),r=i.toViewElement(t);return new io(n.mapViewToDom(r))});
6return io.getBoundingRect(r)}(n.getRanges(),e),positions:BL};const r=zL(n.getFirstPosition()),o=t.toViewElement(r);return{target:i.mapViewToDom(o),positions:BL}}function zL(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function VL(e){if(!e||!te(e))return e;const{top:t,right:i,bottom:n,left:r}=e;return t==i&&i==n&&n==r?t:void 0}function HL(e,t){const i=parseFloat(e);return Number.isNaN(i)||String(i)!==String(e)?e:`${i}${t}`}function UL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!i.alignment&&(i.alignment="center"),t.includePaddingProperty&&!i.padding&&(i.padding=""),t.includeVerticalAlignmentProperty&&!i.verticalAlignment&&(i.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!i.horizontalAlignment&&(i.horizontalAlignment=t.isRightToLeftContent?"right":"left"),i}function WL(e,t){return UL({borderStyle:"double",borderColor:"hsl(0, 0%, 70%)",borderWidth:"1px",...e},t)}function $L(e,t){return UL({borderStyle:"solid",borderColor:"hsl(0, 0%, 75%)",borderWidth:"1px",...e},t)}const GL={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroun
6dColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class qL extends ps{_defaultTableCellProperties;_balloon;view;_undoStepBatch;_isReady;static get requires(){return[iv]}static get pluginName(){return"TableCellPropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:ML,backgroundColors:ML})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=$L(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(iv),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",i=>{const n=new Ff(i);n.set({label:t("Cell properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',tooltip:!0}),this.listenTo(n,"execute",()=>this._showView());const r=Object.values(GL).map(t=>e.commands.get(t));return n.bind("isEnabled").toMany(r,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),n})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableCellProperties"),i=mp(t.borderColors),n=pp(e.locale,i),r=mp(t.backgroundColors),o=pp(e.locale,r),s=!1!==t.colorPicker,a=new LL(e.locale,{borderColors:n,backgroundColors:o,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:!!s&&(t.colorPicker||{})}),l=e.t;a.render(),this.listenTo(a,"submit",()=>{this._hideView()}),this.listenTo(a,"cancel",()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._und
vendor: 1,210 bytes, line 6
6oStepBatch),this._hideView()}),a.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),Of({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=xL(l),u=CL(l);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:SL})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableCellBorderWidth",errorText:u,validator:TL})),a.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:a.paddingInput,commandName:"tableCellPadding",errorText:u,validator:EL})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableCellWidth",errorText:u,validator:EL})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableCellHeight",errorText:u,validator:EL})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableCellBackgroun
6dColor",errorText:c,validator:SL})),a.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),a.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),a}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(GL).map(t=>{let[i,n]=t;const r=this._defaultTableCellProperties[i]||"";return[i,e.get(n).value||r]}).forEach(e=>{let[i,n]=e;("borderColor"!==i&&"borderWidth"!==i||"none"!==t.value)&&this.view.set(i,n)}),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:FL(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;vL(e.editing.view.document.selection)?this._isViewVisible&&NL(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,i,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:i,validator:n,errorText:r}=e,o=Qn(()=>{i.errorText=r},500);return(e,r,s)=>{o.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),i.errorText=null):o())}}}i.TableCellPropertiesUI=qL;class YL extends gs{attributeName;_defaultValue;constructor(e,t,i){super(e),this.attributeName=t,this._defaultValue=i}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{value:t,batch:i}=e,n=this.editor.model,r=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),o=this._getValueToSet(t);n.enqueueChange(i,e=>{o?r.forEach(t=>e.setAttribute(this.attributeName,o,t)):r.forEach(t=>e.removeAttribute(this.attributeName,t))})}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every(e=>this._getAttribute(e)===t)?t:void 0}}class ZL extends YL{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=HL(e,"px"))!==this._defaultValue)return e}}class XL extends ps{static get pluginName(){return"TableCellWidthEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[QO]}init(){const e=this.editor,t=$L(e.config.get("table.tableCellProperties.defaultProperties"));GD(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ZL(e,t.width))}}i.TableCellWidthEditing=XL;class KL extends YL{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=HL(e,"px");if(t!==this._defaultValue)return t}}class JL extends YL{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=HL(e,"px");if(t!==this._defaultValue)return t}}class QL extends YL{constructor(e,t){super(e,"tableCellBackgroun
6dColor",t)}}class eR extends YL{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class tR extends YL{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class iR extends YL{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class nR extends YL{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class rR extends YL{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=HL(e,"px");if(t!==this._defaultValue)return t}}const oR=/^(top|middle|bottom)$/,sR=/^(left|center|right|justify)$/;class aR extends ps{static get pluginName(){return"TableCellPropertiesEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[QO,XL]}init(){const e=this.editor,t=e.model.schema,i=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=$L(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules($h),function(e,t,i){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),FD(t,"td",n,i),FD(t,"th",n,i),zD(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),zD(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),zD(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,i,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new iR(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new nR(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new rR(e,n.borderWidth)),GD(t,i,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new JL(e,n.height)),e.data.addStyleProcessorRules(id),GD(t,i,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new KL(e,n.padding)),e.data.addStyleProcessorRules(Wh),GD(t,i,{modelAttribute:"tableCellBackgroun
6dColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new QL(e,n.backgroundColor)),function(e,t,i){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":sR}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===i?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:sR}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===i?null:t}}})}(t,i,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new tR(e,n.horizontalAlignment)),function(e,t,i){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":oR}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===i?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:oR}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===i?null:t}}})}(t,i,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new eR(e,n.verticalAlignment))}}i.TableCellPropertiesEditing=aR;i.TableCellProperties=class extends ps{static get pluginName(){return"TableCellProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[aR,qL]}};class lR extends gs{attributeName;_defaultValue;constructor(e,t,i){super(e),this.attributeName=t,this._defaultValue=i}refresh(){const e=qD(this.editor.model.document.selection);this.isEnabled=!!e,this.value=this._getValue(e)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.editor.model,i=t.document.selection,{value:n,batch:r}=e,o=qD(i),s=this._getValueToSet(n);t.enqueueChange(r,e=>{s?e.setAttribute(this.attributeName,s,o):e.removeAttribute(this.attributeName,o)})}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class cR extends lR{constructor(e,t){super(e,"tableBackgroundColor",t)}}class uR extends lR{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class hR extends lR{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class dR extends lR{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=VL(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=HL(e,"px");if(t!==this._defaultValue)return t}}class fR extends lR{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=HL(e,"px"))!==this._defaultValue)return e}}class pR extends lR{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=HL(e,"px"))!==this._defaultValue)return e}}class mR extends lR{constructor(e,t){super(e,"tableAlignment",t)}}const gR=/^(left|center|right)$/,vR=/^(left|none|right)$/;class bR extends ps{static get pluginName(){return"TablePropertiesEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[QO]}init(){const e=this.editor,t=e.model.schema,i=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=WL(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules($h),function(e,t,i){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),FD(t,"table",n,i),VD(t,{modelAttribute:n.color,styleName:"border-color"}),VD(t,{modelAttribute:n.style,styleName:"border-style"}),VD(t,{modelAttribute:n.width,styleName:"border-width"})}(t,i,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new uR(e,n.borderColor)),e.commands.add("tableBorderStyle",new hR(e,n.borderStyle)),e.commands.add("tableBorderWidth",new dR(e,n.borderWidth)),function(e,t,i){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:vR}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===i?null:t}}}).attributeToAttribute({view:{attributes:{align:gR}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===i?null:t}}})}(t,i,n.alignment),e.commands.add("tableAlignment",new mR(e,n.alignment)),yR(t,i,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new fR(e,n.width)),yR(t,i,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new pR(e,n.height)),e.data.addStyleProcessorRules(Wh),function(e,t,i){const{modelAttribute:n}=i;e.extend("table",{allowAttributes:[n]}),jD(t,{viewElement:"table",...i}),VD(t,i)}
vendor: 4,494 bytes, line 6
6(t,i,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new cR(e,n.backgroundColor))}}function yR(e,t,i){const{modelAttribute:n}=i;e.extend("table",{allowAttributes:[n]}),jD(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...i}),zD(t,{modelElement:"table",...i})}i.TablePropertiesEditing=bR;class wR extends Df{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;widthInput;heightInput;alignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:r,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:u,dimensionsLabel:h}=this._createDimensionFields(),{alignmentToolbar:d,alignmentLabel:f}=this._createAlignmentFields();this.focusTracker=new Yo,this.keystrokes=new Jo,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=n,this.borderColorInput=r,this.backgroundInput=a,this.widthInput=l,this.heightInput=u,this.alignmentToolbar=d;const{saveButtonView:p,cancelButtonView:m}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=m,this._focusables=new uf,this._focusCycler=new Hf({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Vf(e,{label:this.t("Table properties")})),this.children.add(new OL(e,{labelView:o,children:[o,i,r,n],class:"ck-table-form__border-row"})),this.children.add(new OL(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new OL(e,{children:[new OL(e,{labelView:h,children:[h,l,c,u],class:"ck-table-form__dimensions-row"}),new OL(e,{labelView:f,children:[f,d],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new OL(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Rf({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},i=PL({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,r=this.t,o=r("Style"),s=new tp(n);s.text=r("Border");const a=kL(r),l=new Bp(n,Mm);l.set({label:o,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>a[e||"none"]),l.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),l.bind("isEmpty").to(this,"borderStyle",e=>!e),xm(l.fieldView,AL(this,t.style),{role:"menu",ariaLabel:o});const c=new Bp(n,Am);c.set({label:r("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",_R),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const u=new Bp(n,i);return u.set({label:r("Color"),class:"ck-table-form__border-color"}),u.fieldView.bind("value").to(this,"borderColor"),u.bind("isEnabled").to(this,"borderStyle",_R),u.fieldView.on("input",()=>{this.borderColor=u.fieldView.value}),this.on("change:borderStyle",(e,i,n,r)=>{_R(n)||(this.borderColor="",this.borderWidth=""),_R(r)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:u,borderWidthInput:c}}
6_createBackgroundFields(){const e=this.locale,t=this.t,i=new tp(e);i.text=t("Background");const n=PL({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),r=new Bp(e,n);return r.set({label:t("Color"),class:"ck-table-properties-form__background"}),r.fieldView.bind("value").to(this,"backgroundColor"),r.fieldView.on("input",()=>{this.backgroundColor=r.fieldView.value}),{backgroundRowLabel:i,backgroundInput:r}}_createDimensionFields(){const e=this.locale,t=this.t,i=new tp(e);i.text=t("Dimensions");const n=new Bp(e,Am);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",()=>{this.width=n.fieldView.element.value});const r=new Df(e);r.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"Ã"}]});const o=new Bp(e,Am);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",()=>{this.height=o.fieldView.element.value}),{dimensionsLabel:i,widthInput:n,operatorLabel:r,heightInput:o}}_createAlignmentFields(){const e=this.locale,t=this.t,i=new tp(e);i.text=t("Alignment");const n=new pm(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),IL({view:this,icons:{left:Yd.objectLeft,center:Yd.objectCenter,right:Yd.objectRight},toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:i,alignmentToolbar:n}}_createActionButtons(){const e=this.locale,t=this.t,i=new Ff(e),n=new Ff(e),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return i.set({label:t("Save"),icon:Yd.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(r,"errorText",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.every(e=>!e)}),n.set({label:t("Cancel"),icon:Yd.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:n}}get _alignmentLabels(){const e=this.locale,t=this.t,i=t("Align table to the left"),n=t("Center table"),r=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:r,center:n,left:i}:{left:i,center:n,right:r}}}function _R(e){return"none"!==e}const kR={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class xR extends ps{_defaultTableProperties;_balloon;view=null;_undoStepBatch;_isReady;static get requires(){return[iv]}static get pluginName(){return"TablePropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:ML,backgroundColors:ML})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=WL(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(iv),e.ui.componentFactory.add("tableProperties",i=>{const n=new Ff(i);n.set({label:t("Table properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',tooltip:!0}),this.listenTo(n,"execute",()=>this._showView());const r=Object.values(kR).map(t=>e.commands.get(t));return n.bind("isEnabled").toMany(r,"isEnabled",function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.some(e=>e)}),n})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),i=mp(t.borderColors),n=pp(e.locale,i),r=mp(t.backgroundColors),o=pp(e.locale,r),s=!1!==t.colorPicker,a=new wR(e.locale,{borderColors:n,backgroundColors:o,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:!!s&&(t.colorPicker||{})}),l=e.t;a.render(),this.listenTo(a,"submit",()=>{this._hideView()}),this.listenTo(a,"cancel",()=>
6{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()}),a.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),Of({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=xL(l),u=CL(l);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableBorderColor",errorText:c,validator:SL})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableBorderWidth",errorText:u,validator:TL})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableBackgroundColor",errorText:c,validator:SL})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableWidth",errorText:u,validator:EL})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableHeight",errorText:u,validator:EL})),a.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),a}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(kR).map(t=>{let[i,n]=t;const r=i,o=this._defaultTableProperties[r]||"";return[r,e.get(n).value||o]}).forEach(e=>{let[i,n]=e;("borderColor"!==i&&"borderWidth"!==i||"none"!==t.value)&&this.view.set(i,n)}),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:jL(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;mL(e.editing.view.document.selection)?this._isViewVisible&&NL(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,i,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:i,validator:n,errorText:r}=e,o=Qn(()=>{i.errorText=r},500);return(e,r,s)=>{o.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),i.errorText=null):o())}}}i.TablePropertiesUI=xR;function CR(e){return!!e&&e.is("element","table")}function SR(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function ER(e){const t=e.parent;return"figcaption"==e.name&&t&&t.is("element","figure")&&t.hasClass("table")||"caption"==e.name&&t&&t.is("element","table")?{name:!0}:null}i.TableProperties=class extends ps{static get pluginName(){return"TableProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[bR,xR]}};class TR extends gs{refresh(){const e=qD(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!SR(e):this.value=!1}execute(){let{focusCaptionOnShow:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.editor.model.change(t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)})}_showTableCaption(e,t){const i=this.editor.model,n=qD(i.document.selection),r=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");i.insertContent(r,n,"end"),t&&e.setSelection(r,"in")}_hideTableCaption(e){const t=this.editor.model,i=qD(t.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),r=SR(i);n._saveCaption(i,r),t.deleteContent(e.createSelection(r,"on"))}}class AR extends ps{_savedCaptionsMap;static get pluginName(){return"TableCaptionEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema,i=e.editing.view,n=e.t;t.isRegistered("caption")?t.extend("caption",{allowIn:"table"}):t.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new TR(this.editor)),e.conversion.for("upcast").elementToElement({view:ER,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,t)=>
6{let{writer:i}=t;return CR(e.parent)?i.createContainerElement("figcaption"):null}}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,t)=>{let{writer:r}=t;if(!CR(e.parent))return null;const o=r.createEditableElement("figcaption");return r.setCustomProperty("tableCaption",!0,o),o.placeholder=n("Enter table caption"),Cs({view:i,element:o,keepOnFocus:!0}),_y(o,r)}}),function(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i){if("insert"!=t.type)continue;const i=t.position.parent;if(i.is("element","table")||"table"==t.name){const r="table"==t.name?t.position.nodeAfter:i,o=Array.from(r.getChildren()).filter(e=>e.is("element","caption")),s=o.shift();if(!s)continue;for(const t of o)e.move(e.createRangeIn(t),s,"end"),e.remove(t);s.nextSibling&&(e.move(e.createRangeOn(s),r,"end"),n=!0),n=!!o.length||n}}return n}(t,e))}(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Yl.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}i.TableCaptionEditing=AR;class IR extends ps{static get pluginName(){return"TableCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,i=e.t;e.ui.componentFactory.add("toggleTableCaption",n=>{const r=e.commands.get("toggleTableCaption"),o=new Ff(n);return o.set({icon:Yd.caption,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),o.bind("label").to(r,"value",e=>i(e?"Toggle caption off":"Toggle caption on")),this.listenTo(o,"execute",()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),r.value){const i=function(e){const t=qD(e);return t?SR(t):null}(e.model.document.selection),n=e.editing.mapper.toViewElement(i);if(!n)return;t.scrollToTheSelection(),t.change(e=>{e.addClass("table__caption_highlighted",n)})}e.editing.view.focus()}),o})}}i.TableCaptionUI=IR;i.TableCaption=class extends ps{static get pluginName(){return"TableCaption"}static get isOfficialPlugin(){return!0}static get requires(){return[AR,IR]}};class MR extends gs{refresh(){this.isEnabled=!0}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{model:t,plugins:i}=this.editor;let{table:n=t.document.selection.getSelectedElement(),columnWidths:r,tableWidth:o}=e;r&&(r=Array.isArray(r)?r:r.split(",")),t.change(e=>{o?e.setAttribute("tableWidth",o,n):e.removeAttribute("tableWidth",n);const t=i.get("TableColumnResizeEditing").getColumnGroupElement(n);if(!r&&!t)return;if(!r)return e.remove(t);const s=IO(r);if(t)Array.from(t.getChildren()).forEach((t,i)=>e.setAttribute("columnWidth",s[i],t));else{const t=e.createElement("tableColumnGroup");s.forEach(i=>e.appendElement("tableColumn",{columnWidth:i},t)),e.append(t,n)}})}}class PR extends ps{_isResizingActive;_resizingData;_domEmitter;_tableUtilsPlugin;static get requires(){return[QO,LO]}static get pluginName(){return"TableColumnResizeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(Wr()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",(t,i,n)=>{const r=n?"removeClass":"addClass";e.editing.view.change(t=>{for(const i of e.editing.view.document.roots)t[r]("ck-column-resize_disabled",e.editing.view.document.getRoot(i.rootName))})})}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:e=>e.is("element","tableColumnGroup"),positionOffset:0});const i=new MR(e);e.commands.add("resizeTableWidth",i),e.commands.add("resizeColumnWidths",i),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",i,"isEnabled",(e,t,i)=>!e&&t&&i)}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return DO(e)}getTableColumnElements(e){return OO(e)}getTableColumnsWidths(e){return function(e){return OO(e).map(e=>e.getAttribute("columnWidth"))}(e)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth"]}),this.editor.model.schema.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),this.editor.model.schema.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0})}_registerPostFixer(){const e=this.editor.model;function t(e,t,i){const n=i._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return e;const r=e.map(e=>Number(e.replace("%",""))),o=function(e,t){const i=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))i.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&i.add(e)}return i}(i.editor.model.document.differ,t);for(const e of o){const o=n-r.length;if(0===o)continue;const a=o>0,l=i._tableUtilsPlugin.getCellLocation(e).column;if(a){const e=(s=xO(t,i.editor),Array(o).fill(s));r.splice(l,0,...e)}else{const e=r.splice(l,Math.abs(o));r[l]+=AO(e)}}var s;return r.map(e=>e+"%")}e.document.registerPostFixer(i=>{let n=!1;for(const r of function(e){const t=new Set;for(const i of e.document.differ.getChanges()){let n=null;switch(i.type){case"insert":n=["table","tableRow","tableCell"].includes(i.name)?i.position:null;break;case"remove":n=["tableRow","tableCell"].includes(i.name)?i.position:null;break;case"attribute":i.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(i.range.start.nodeAfter.name)?i.range.start:null)}if(!n)continue;const r=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAnce
6stor("table");for(const i of e.createRangeOn(r).getItems())i.is("element","table")&&DO(i)&&t.add(i)}return t}(e)){const e=this.getColumnGroupElement(r),o=this.getTableColumnElements(e),s=this.getTableColumnsWidths(e);let a=IO(s);a=t(a,r,this),pr(s,a)||(PO(o,e,a,i),n=!0)}return n})}_registerConverters(){const e=this.editor.conversion;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>e.getStyle("width")}}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),e.elementToElement({model:"tableColumnGroup",view:"colgroup"}),e.elementToElement({model:"tableColumn",view:"col"}),e.for("downcast").add(e=>e.on("insert:table",(e,t,i)=>{const n=i.writer,r=t.item,o=i.mapper.toViewElement(r),s=o.is("element","table")?o:Array.from(o.getChildren()).find(e=>e.is("element","table"));DO(r)?n.addClass("ck-table-resized",s):n.removeClass("ck-table-resized",s)},{priority:"low"})),e.for("upcast").add(function(e){return t=>t.on("element:colgroup",(t,i,n)=>{const r=i.modelCursor.findAncestor("table"),o=DO(r);if(!o)return;const s=OO(o),a=e.getColumns(r);let l=(c=o,u=n.writer,OO(c).reduce((e,t)=>{const i=t.getAttribute("columnWidth"),n=t.getAttribute("colSpan");if(!n)return e.push(i),e;for(let t=0;t<n;t++)e.push(i);return u.removeAttribute("colSpan",t),e},[]));var c,u;l=Array.from({length:a},(e,t)=>l[t]||"auto"),(l.length!=s.length||l.includes("auto"))&&PO(s,o,IO(l),n.writer)},{priority:"low"})}(this._tableUtilsPlugin)),e.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:e=>{const t=e.getStyle("width");return t&&(t.endsWith("%")||t.endsWith("pt"))?t:"auto"}}}),e.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),e.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:e=>({key:"style",value:{width:e}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(uL),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(r.window.document,"mousemove",yr(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(r.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const i=t.target;if(!i.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;const n=this.editor,r=n.editing.mapper.toModelElement(i.findAncestor("figure"));if(!n.model.canEditAt(r))return;t.preventDefault(),e.stop();const o=function(e,t,i){const n=Array(t.getColumns(e)),r=new XD(e);for(const e of r){const t=i.editing.mapper.toViewElement(e.cell),r=MO(i.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||r<n[e.column])&&(n[e.column]=TO(r))}return n}(r,this._tableUtilsPlugin,n),s=i.findAncestor("table"),a=n.editing.view;Array.from(s.getChildren()).find(e=>e.is("element","colgroup"))||a.change(e=>{!function(e,t,i){const n=e.createContainerElement("colgroup");for(let i=0;i<t.length;i++){const r=e.createEmptyElement("col"),o=`${TO(t[i]/AO(t)*100)}%`;e.setStyle("width",o,r),e.insert(e.createPositionAt(n,"end"),r)}e.insert(e.createPositionAt(i,0),n)}(e,o,s)}),this._isResizingActive=!0,this._resizingData=this._getResizingData(t,o),a.change(e=>function(e,t,i){const n=i.widths.viewFigureWidth/i.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",i.elements.viewResizer),e.setStyle("width",`${TO(100*n)}%`,t.findAncestor("figure"))}(e,s,this._resizingData))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:i,flags:{isRightEdge:n,isTableCentered:r,isLtrContent:o},elements:{viewFigure:s,viewLeftColumn:a,viewRightColumn:l},widths:{viewFigureParentWidth:c,tableWidth:u,leftColumnWidth:h,rightColumnWidth:d}}=this._resizingData,f=40-h,p=n?c-u:d-40,m=(o?1:-1)*(n&&r?2:1),g=(v=(t.clientX-i)*m,b=Math.min(f,0),y=Math.max(p,0),TO(v<=b?b:v>=y?y:v));var v,b,y;0!==g&&this.editor.editing.view.change(e=>{const t=TO(100*(h+g)/u);if(e.setStyle("width",`${t}%`,a),n){const t=TO(100*(u+g)/c);e.setStyle("width",`${t}%`,s)}else{const t=TO(100*(d-g)/u);e.setStyle("width",`${t}%`,l)}})}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:i,viewColgroup:n}=this._resizingData.elements,r=this.editor,o=r.editing.view,s=this.getColumnGroupElement(t),a=Array.from(n.getChildren()).filter(e=>e.is("view:element")),l=s?this.getTableColumnsWidths(s):null,c=a.map(e=>e.getStyle("width")),u=!pr(l,c),h=t.getAttribute("tableWidth"),d=i.getStyle("width"),f=h!==d;(u||f)&&(this._isResizingAllowed?r.execute("resizeTableWidth",{table:t,tableWidth:`${TO(d)}%`,columnWidths:c}):o.change(e=>{if(l)for(const t of a)e.setStyle("width",l.shift(),t);else e.remove(n);f&&(h?e.setStyle("width",h,i):e.removeStyle("width",i)),l||h||e.removeClass("ck-table-resized",[...i.getChildren()].find(e=>"table"===e.name))})),o.change(t=>{t.removeClass("ck-table-column-resizer__active",e)}),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const i=this.editor,n=e.domEvent.clientX,r=e.target,o=r.findAnce
6stor("td")||r.findAncestor("th"),s=i.editing.mapper.toModelElement(o),a=s.findAncestor("table"),l=function(e,t){const i=t.getCellLocation(e).column;return{leftEdge:i,rightEdge:i+(e.getAttribute("colspan")||1)-1}}(s,this._tableUtilsPlugin).rightEdge,c=l===this._tableUtilsPlugin.getColumns(a)-1,u=!a.hasAttribute("tableAlignment"),h="rtl"!==i.locale.contentLanguageDirection,d=o.findAncestor("table"),f=d.findAncestor("figure"),p=[...d.getChildren()].find(e=>e.is("element","colgroup")),m=p.getChild(l),g=c?void 0:p.getChild(l+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:u,isLtrContent:h},elements:{viewResizer:r,modelTable:a,viewFigure:f,viewColgroup:p,viewLeftColumn:m,viewRightColumn:g},widths:{viewFigureParentWidth:EO(i.editing.view.domConverter.mapViewToDom(f.parent)),viewFigureWidth:EO(i.editing.view.domConverter.mapViewToDom(f)),tableWidth:CO(a,i),leftColumnWidth:t[l],rightColumnWidth:c?void 0:t[l+1]}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add(e=>{e.on("insert:tableCell",(e,t,i)=>{const n=t.item,r=i.mapper.toViewElement(n),o=i.writer;o.insert(o.createPositionAt(r,"end"),o.createUIElement("div",{class:"ck-table-column-resizer"}))},{priority:"lowest"})})}}i.TableColumnResizeEditing=PR;function DR(e){if(e.is("$text")||e.is("$textProxy"))return e.data;const t=e;let i="",n=null;for(const e of t.getChildren()){const t=DR(e);n&&n.is("element")&&(i+="\n"),i+=t,n=e}return i}i.TableColumnResize=class extends ps{static get requires(){return[PR,XL]}static get pluginName(){return"TableColumnResize"}static get isOfficialPlugin(){return!0}};i.WordCount=class extends ps{_config;_outputView;_wordsMatchRegExp;constructor(e){super(e),this.set("characters",0),this.set("words",0),Object.defineProperties(this,{characters:{get(){return this.characters=this._getCharacters(this._getText())}},words:{get(){return this.words=this._getWords(this._getText())}}}),this.set("_wordsLabel",void 0),this.set("_charactersLabel",void 0),this._config=e.config.get("wordCount")||{},this._outputView=void 0,this._wordsMatchRegExp=s.features.isRegExpUnicodePropertySupported?new RegExp("([\\p{L}\\p{N}]+\\S?)+","gu"):/([a-zA-Z0-9Ã-ž]+\S?)+/gu}static get pluginName(){return"WordCount"}static get isOfficialPlugin(){return!0}init(){this.editor.model.document.on("change:data",yr(this._refreshStats.bind(this),250)),"function"==typeof this._config.onUpdate&&this.on("update",(e,t)=>{this._config.onUpdate(t)}),fr(this._config.container)&&this._config.container.appendChild(this.wordCountContainer)}destroy(){this._outputView&&(this._outputView.element.remove(),this._outputView.destroy()),super.destroy()}get wordCountContainer(){const e=this.editor,t=e.t,i=e.config.get("wordCount.displayWords"),n=e.config.get("wordCount.displayCharacters"),r=hf.bind(this,this),o=[];return this._outputView||(this._outputView=new Df,(i||void 0===i)&&(this.bind("_wordsLabel").to(this,"words",e=>t("Words: %0",e)),o.push({tag:"div",children:[{text:[r.to("_wordsLabel")]}],attributes:{class:"ck-word-count__words"}})),(n||void 0===n)&&(this.bind("_charactersLabel").to(this,"characters",e=>t("Characters: %0",e)),o.push({tag:"div",children:[{text:[r.to("_charactersLabel")]}],attributes:{class:"ck-word-count__characters"}})),this._outputView.setTemplate({tag:"div",attributes:{class:["ck","ck-word-count"]},children:o}),this._outputView.render()),this._outputView.element}_getText(){let e="";for(const t of this.editor.model.document.getRoots())""!==e&&(e+="\n"),e+=DR(t);return e}_getCharacters(e){return e.replace(/\n/g,"").length}_getWords(e){return(e.match(this._wordsMatchRegExp)||[]).length}_refreshStats(){const e=this._getText(),t=this.words=this._getWords(e),i=this.characters=this._getCharacters(e);this.fire("update",{words:t,characters:i})}}},{}],24:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0; 7/** 8 * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 9 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 10 */ 11i.default={cs:{dictionary:{"Words: %0":"PoÄet slov: %0","Characters: %0":"PoÄet znaků: %0","Widget toolbar":"Panel nástrojů ovládacÃho prvku","Insert paragraph before block":"Vložte odstavec pÅed blok","Insert paragraph after block":"Vložte odstavec za blok","Press Enter to type after or press Shift + Enter to type before the widget":"StisknutÃm klávesy Enter můžete psát za widgetem a stisknutÃm Shift + Enter pÅed nÃm","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Klávesy, které lze použÃt, když je vybraný widget (napÅ: obrázek, tabulka atd.)","Insert a new paragraph directly after a widget":"
11Vložte odstavec pÅÃmo po widgetu","Insert a new paragraph directly before a widget":"Vložte nový odstavec pÅÃmo pÅed widget","Move the caret to allow typing directly before a widget":"PÅesuÅte stÅÃÅ¡ku pro umožnÄnà psanà pÅÃmo pÅed widget","Move the caret to allow typing directly after a widget":"PÅesuÅte stÅÃÅ¡ku pro umožnÄnà psanà pÅÃmo pÅed widget","Move focus from an editable area back to the parent widget":"PÅesunout zamÄÅenà z upravitelné oblasti zpÄt na nadÅazený widget","Upload in progress":"ProbÃhá nahrávánÃ",Undo:"ZpÄt",Redo:"Znovu","Rich Text Editor":"Textový editor","Edit block":"Upravit blok","Click to edit block":"KliknutÃm upravÃte blok","Drag to move":"PÅesuÅte potaženÃm",Next:"DalÅ¡Ã",Previous:"PÅedchozÃ","Editor toolbar":"Panel nástrojů editoru","Dropdown toolbar":"Rozbalovacà panel nástrojů","Dropdown menu":"Rozbalovacà nabÃdka",Black:"Äerná","Dim grey":"TmavÄ Å¡edá",Grey:"Å edá","Light grey":"SvÄtle Å¡edá",White:"BÃlá",Red:"Äervená",Orange:"Oranžová",Yellow:"Žlutá","Light green":"SvÄtle zelená",Green:"Zelená",Aquamarine:"AkvamarÃnová",Turquoise:"Tyrkysová","Light blue":"SvÄtle modrá",Blue:"Modrá",Purple:"Fialová","Editor block content toolbar":"Panel nástrojů obsahu bloku editoru","Editor contextual toolbar":"Kontextový panel nástrojů editoru",HEX:"HEX","No results found":"Nenalezeny žádné výsledky","No searchable items":"Žádné položky k vyhledánÃ","Editor dialog":"Dialog editoru",Close:"ZavÅÃt","Help Contents. To close this dialog press ESC.":"Obsah podpory. Pro zavÅenà tohoto dialogu stisknÄte ESC.","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Seznam klávesových zkratek, které lze v editoru použÃt, můžete nalézt nÞe.","(may require <kbd>Fn</kbd>)":"(může vyžadovat <kbd>Fn</kbd>)",Accessibility:"PÅÃstupnost","Accessibility help":"Podpora pÅÃstupnosti","Press %0 for help.":"StisknÄte %0 pro podporu","Move focus in and out of an active dialog window":"PÅesouvejte zamÄÅenà dovnitÅ a ven z aktivnÃho dialogového okna",MENU_BAR_MENU_FILE:"Soubor",MENU_BAR_MENU_EDIT:"Upravit",MENU_BAR_MENU_VIEW:"Zobrazit",MENU_BAR_MENU_INSERT:"Vložit",MENU_BAR_MENU_FORMAT:"Formát",MENU_BAR_MENU_TOOLS:"Nástroje",MENU_BAR_MENU_HELP:"NápovÄda",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_FONT:"PÃsmo","Editor menu bar":"Panel nabÃdek editoru",'Please enter a valid color (e.g. "ff0000").':"Zadejte platnou barvu (napÅ. âff0000â).","Insert table":"Vložit tabulku","Header column":"Sloupec záhlavÃ","Insert column left":"Vložit sloupec vlevo","Insert column right":"Vložit sloupec vpravo","Delete column":"Smazat sloupec","Select column":"Vybrat sloupec",Column:"Sloupec","Header row":"Åádek záhlavÃ","Insert row below":"Vložit Åádek pod","Insert row above":"Vložit Åádek pÅed","Delete row":"Smazat Åádek","Select row":"Vybrat Åádek",Row:"Åádek","Merge cell up":"SlouÄit s buÅkou nad","Merge cell right":"SlouÄit s buÅkou vpravo","Merge cell down":"SlouÄit s buÅkou pod","Merge cell left":"SlouÄit s buÅkou vlevo","Split cell vertically":"RozdÄlit buÅky vertikálnÄ","Split cell horizontally":"RozdÄlit buÅky horizontálnÄ","Merge cells":"SlouÄit buÅky","Table toolbar":"Panel nástrojů tabulky","Table properties":"Vlastnosti tabulky","Cell properties":"Vlastnosti buÅky",Border:"Okraj",Style:"Styl",Width:"Å ÃÅka",Height:"Výška",Color:"Barva",Background:"PozadÃ",Padding:"VnitÅnà okraj",Dimensions:"RozmÄry","Table cell text alignment":"Zarovnánà textu buÅky tabulky",Alignment:"ZarovnánÃ","Horizontal text alignment toolbar":"Horizontálnà zarovnánà textu v panelu","Vertical text alignment toolbar":"Vertikálnà zarovnánà textu v panelu","Table alignment toolbar":"Panel zarovnánà tabulky",None:"Žádná",Solid:"Plná",Dotted:"TeÄkovaná",Dashed:"Äárkovaná",Double:"Dvojitá",Groove:"Drážkovaná",Ridge:"Rámovaná",Inset:"Vložená zevnitÅ",Outset:"Vložená zvenku","Align cell text to the left":"Zarovnat text buÅky doleva","Align cell text to the center"
11:"Zarovnat text buÅky na stÅed","Align cell text to the right":"Zarovnat text buÅky doprava","Justify cell text":"Zarovnat text buÅky z obou stran","Align cell text to the top":"Zarovnat text buÅky nahoru","Align cell text to the middle":"Zarovnat text buÅky na stÅed","Align cell text to the bottom":"Zarovnat text buÅky dolů","Align table to the left":"Zarovnat tabulku doleva","Center table":"Centrovat tabulku","Align table to the right":"Zarovnat tabulku doprava",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Barva má nesprávný formát. Zkuste "#FF0000", "rgb(255,0,0)" nebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávná. Zkuste "10px", "2em" nebo jednoduÅ¡e "2".',"Enter table caption":"Zadejte titulek tabulky","Keystrokes that can be used in a table cell":"Klávesy, které lze použÃt v buÅce tabulky","Move the selection to the next cell":"PÅesunout výbÄr do dalšà buÅky","Move the selection to the previous cell":"PÅesunout výbÄr do pÅedchozà buÅky","Insert a new table row (when in the last cell of a table)":"Vložit nový Åádek tabulky (když jste v poslednà buÅce tabulky)","Navigate through the table":"Procházet tabulkou",Table:"Tabulka",Styles:"Styly","Multiple styles":"VÃce stylů","Block styles":"Styly bloků","Text styles":"Styly textu","Special characters":"Speciálnà znaky",Category:"Kategorie",All:"VÅ¡e",Arrows:"Å ipky",Currency:"MÄna",Latin:"Latina",Mathematical:"Matematické",Text:"Text","leftwards simple arrow":"jednoduchá Å¡ipka doleva","rightwards simple arrow":"jednoduchá Å¡ipka doprava","upwards simple arrow":"jednoduchá Å¡ipka nahoru","downwards simple arrow":"jednoduchá Å¡ipka dolů","leftwards double arrow":"dvojitá Å¡ipka doleva","rightwards double arrow":"dvojitá Å¡ipka doprava","upwards double arrow":"dvojitá Å¡ipka nahoru","downwards double arrow":"dvojitá Å¡ipka dolů","leftwards dashed arrow":"pÅeruÅ¡ovaná Å¡ipka doleva","rightwards dashed arrow":"Äárkovaná Å¡ipka doprava","upwards dashed arrow":"Äárkovaná Å¡ipka nahoru","downwards dashed arrow":"pÅeruÅ¡ovaná Å¡ipka dolů","leftwards arrow to bar":"Å¡ipka doleva do svislé Äáry","rightwards arrow to bar":"Å¡ipka doprava do svislé Äáry","upwards arrow to bar":"Å¡ipka nahoru do svislé Äáry","downwards arrow to bar":"Å¡ipka dolů do svislé Äáry","up down arrow with base":"Å ipka nahoru-dolů od základny","back with leftwards arrow above":"Å¡ipka zpÄt","end with leftwards arrow above":"Å¡ipka konec","on with exclamation mark with left right arrow above":"ON s vykÅiÄnÃkem se Å¡ipkou doleva doprava nahoru","soon with rightwards arrow above":"brzy se Å¡ipkou doprava nahoru","top with upwards arrow above":"TOP se Å¡ipkou nahoru","Dollar sign":"Znak Dolar","Euro sign":"Znak Euro","Yen sign":"Znak Jen","Pound sign":"Znak Libra","Cent sign":"Znak cent","Euro-currency sign":"Mena Euro","Colon sign":"dvojteÄka","Cruzeiro sign":"MÄna Cruzeiro","French franc sign":"MÄna Francouzský Frank","Lira sign":"MÄna Lira","Currency sign":"Znak mÄny","Bitcoin sign":"MÄna Bitcoin","Mill sign":"Znak Mill","Naira sign":"Znak Naira","Peseta sign":"Znak Peseta","Rupee sign":"Znak Rupee","Won sign":"Znak Won","New sheqel sign":"Nový znak Å¡ekel","Dong sign":"Znak Dong","Kip sign":"Znak Kip","Tugrik sign":"Znak Tugrik","Drachma sign":"Znak Drachma","German penny sign":"NÄmecká penny","Peso sign":"Znak Peso","Guarani sign":"Znak Guarani","Austral sign":"Znak Austral","Hryvnia sign":"Znak Hryvnia","Cedi sign":"Znak Cedi","Livre tournois sign":"Znak Livre tournois","Spesmilo sign":"Znak Spesmilo","Tenge sign":"Znak Tenge","Indian rupee sign":"Znak Indická rupia","Turkish lira sign":"Znak Turecká lÃra","Nordic mark sign":"Znak Nórska marka","Manat sign":"Znak Manat","Ruble sign":"Znak Ruble","Latin capital letter a with macron":"Latinské velké pÃsmeno a s Äárou","Latin small letter a with macron":"Latinské malé pÃsmeno a s Äárou","Latin capital letter a with breve":"Latinské velké pÃsmeno a s háÄkem","Latin small letter a with breve":"Latinské malé pÃsmeno a s háÄkem","Latin capital letter a with ogonek":"Latinské velké pÃsmeno a s háÄkem","Latin small letter a with ogonek":"Latinské malé pÃsmeno a s háÄkem","Latin capital letter c with acute":"Latinské velké pÃsmeno c s Äárkou","Latin small letter c with acute":"Latinské malé pÃsmeno c s Äárkou","Latin capital letter c with circumflex":"Latinské velké pÃsmeno c s obráceným háÄkem","Latin small letter c with circumflex":"Latinské malé pÃsmeno c s obráceným háÄkem","Latin capital letter c with dot above":"Latinské velké pÃsmeno c s teÄkou nad znakem","Latin small letter c with dot above":"Latinské malé pÃsmeno c s teÄkou nad znakem","Latin capital letter c with caron":"Latinské veľké pÃsmeno c s mäkÄeÅom","Latin small letter c with caron":"Latinské malé pÃsmeno c s háÄkem","Latin capital letter d with caron":"Latinské velké pÃsmeno d s háÄkem","Latin small letter d with caron":"Latinské malé pÃsmeno d s háÄkem","Latin capital letter d with stroke":"Latinské velké pÃsmeno d s pÅeÅ¡krtnutÃm","Latin small letter d with stroke":"Latinské malé pÃsmeno d s pÅeÅ¡krtnutÃm","Latin capital letter e with macron":"Latinské velké pÃsmeno e s Äárou","Latin small letter e with macron":"Latinské malé pÃsmeno e s Äárou","Latin capital letter e with breve":"Latinské velké pÃsmeno e s háÄkem","Latin small letter e with breve":"Latinské malé pÃsmeno e s háÄkem","Latin capital letter e with dot above":"Latinské velké pÃsmeno e s teÄkou nad znakem","Latin small letter e with dot above":"Latinské malé pÃsmeno e s teÄkou nad znakem","Latin capital letter e with ogonek":"Latinské velké pÃsmeno e s háÄkem","Latin small letter e with ogonek":"Latinské malé pÃsmeno e s háÄkem","Latin capital letter e with caron":"Latinské velké pÃsmeno e s háÄkem","Latin small letter e with caron":"Latinské malé pÃsmeno e s háÄkem","Latin capital letter g with circumflex":"Latinské velké pÃsmeno g s obráceným háÄkem","Latin small letter g with circumflex":"Latinské malé pÃsmeno g s obráceným háÄkem","Latin capital letter g with breve":"Latinské velké pÃsmeno g s háÄkem","Latin small letter g with breve":"Latinské malé pÃsmeno g s háÄkem","Latin capital letter g with dot above":"Latinské velké pÃsmeno g s teÄkou nad znakem","Latin small letter g with dot above":"Latinské malé pÃsmeno g s teÄkou nad znakem","Latin capital letter g with cedilla":"Latinské velké pÃsmeno g s háÄkem","Latin small letter g with cedilla":"Latinské malé pÃsmeno g s háÄkem","Latin capital letter h with circumflex":"Latinské velké pÃsmeno h s obráceným háÄkem","Latin small letter h with circumflex":"Latinské malé pÃsmeno h s obráceným háÄkem","Latin capital letter h with stroke":"Latinské velké pÃsmeno h s pÅeÅ¡krtnutÃm","Latin small letter h with stroke":"Latinské malé pÃsmeno h s pÅeÅ¡krtnutÃm","Latin capital letter i with tilde":"Latinské velké pÃsmeno i s vlnovkou","Latin small letter i with tilde":"Latinské malé pÃsmeno i s vlnovkou","Latin capital letter i with macron":"Latinské velké pÃsmeno i s Äárou","Latin small letter i with macron":"Latinské malé pÃsmeno i s Äárou","Latin capital letter i with breve":"Latinské velké pÃsmeno i s háÄkem","Latin small letter i with breve":"Latinské malé pÃsmeno i s háÄkem","Latin capital letter i with ogonek":"Latinské velké pÃsmeno i s háÄkem","Latin small letter i with ogonek":"Latinské malé pÃsmeno i s háÄkem","Latin capital letter i with dot above":"Latinské velké pÃsmeno i s teÄkou nad znakem","Latin small letter dotless i":"Latinské malé pÃsmeno i bez teÄky","Latin capital ligature ij":"Latinský velký znak ligatury ij","
11Latin small ligature ij":"Latinský malý znak ligatury ij","Latin capital letter j with circumflex":"Latinské velké pÃsmeno j s obráceným háÄkem","Latin small letter j with circumflex":"Latinské malé pÃsmeno j s obráceným háÄkem","Latin capital letter k with cedilla":"Latinské velké pÃsmeno k s háÄkem","Latin small letter k with cedilla":"Latinské malé pÃsmeno k s háÄkem","Latin small letter kra":"Latinský malý znak Kra","Latin capital letter l with acute":"Latinské velké pÃsmeno l s Äárkou","Latin small letter l with acute":"Latinské malé pÃsmeno l s Äárkou","Latin capital letter l with cedilla":"Latinské velké pÃsmeno l s háÄkem","Latin small letter l with cedilla":"Latinské malé pÃsmeno l s háÄkem","Latin capital letter l with caron":"Latinské velké pÃsmeno l s háÄkem","Latin small letter l with caron":"Latinské malé pÃsmeno l s háÄkem","Latin capital letter l with middle dot":"Latinské velké pÃsmeno l s teÄkou uprostÅed","Latin small letter l with middle dot":"Latinské malé pÃsmeno l s teÄkou uprostÅed","Latin capital letter l with stroke":"Latinské velké pÃsmeno l s pÅeÅ¡krtnutÃm","Latin small letter l with stroke":"Latinské malé pÃsmeno l s pÅeÅ¡krtnutÃm","Latin capital letter n with acute":"Latinské velké pÃsmeno n s Äárkou","Latin small letter n with acute":"Latinské malé pÃsmeno n s Äárkou","Latin capital letter n with cedilla":"Latinské velké pÃsmeno n s háÄkem","Latin small letter n with cedilla":"Latinské malé pÃsmeno n s háÄkem","Latin capital letter n with caron":"Latinské velké pÃsmeno n s háÄkem","Latin small letter n with caron":"Latinské malé pÃsmeno n s háÄkem","Latin small letter n preceded by apostrophe":"Latinské malé pÃsmeno n s apostrofem","Latin capital letter eng":"Latinské velké pÃsmeno Eng","Latin small letter eng":"Latinské malé pÃsmeno Eng","Latin capital letter o with macron":"Latinské velké pÃsmeno o s Äárou","Latin small letter o with macron":"Latinské malé pÃsmeno o s Äárou","Latin capital letter o with breve":"Latinské velké pÃsmeno o s háÄkem","Latin small letter o with breve":"Latinské malé pÃsmeno o s háÄkem","Latin capital letter o with double acute":"Latinské velké pÃsmeno o s Äárkou","Latin small letter o with double acute":"Latinské malé pÃsmeno o s Äárkou","Latin capital ligature oe":"Latinský velký znak ligatury oe","Latin small ligature oe":"Latinský malý znak ligatury oe","Latin capital letter r with acute":"Latinské velké pÃsmeno r s Äárkou","Latin small letter r with acute":"Latinské malé pÃsmeno r s Äárkou","Latin capital letter r with cedilla":"Latinské velké pÃsmeno r s háÄkem","Latin small letter r with cedilla":"Latinské malé pÃsmeno r s háÄkem","Latin capital letter r with caron":"Latinské velké pÃsmeno r s háÄkem","Latin small letter r with caron":"Latinské malé pÃsmeno r s háÄkem","Latin capital letter s with acute":"Latinské velké pÃsmeno s s Äárkou","Latin small letter s with acute":"Latinské malé pÃsmeno s s Äárkou","Latin capital letter s with circumflex":"Latinské velké pÃsmeno s s obráceným háÄkem","Latin small letter s with circumflex":"Latinské malé pÃsmeno s s obráceným háÄkem","Latin capital letter s with cedilla":"Latinské velké pÃsmeno s s háÄkem","Latin small letter s with cedilla":"Latinské malé pÃsmeno s s háÄkem","Latin capital letter s with caron":"Latinské velké pÃsmeno s s háÄkem","Latin small letter s with caron":"Latinské malé pÃsmeno s s háÄkem","Latin capital letter t with cedilla":"Latinské velké pÃsmeno t s háÄkem","Latin small letter t with cedilla":"Latinské malé pÃsmeno t s háÄkem","Latin capital letter t with caron":"Latinské velké pÃsmeno t s háÄkem","Latin small letter t with caron":"Latinské malé pÃsmeno t s háÄkem","Latin capital letter t with stroke":"Latinské velké pÃsmeno t s pÅeÅ¡krtnutÃm","Latin small letter t with stroke":"Latinské malé pÃsmeno t s pÅeÅ¡krtnutÃm","Latin capital letter u with tilde":"Latinské velké pÃsmeno u s vlnovkou","Latin small letter u with tilde":"Latinské malé pÃsmeno u s vlnovkou","Latin capital letter u with macron":"Latinské velké pÃsmeno u s Äárou","Latin small letter u with macron":"Latinské malé pÃsmeno o s Äárou","Latin capital letter u with breve":"Latinské velké pÃsmeno u s háÄkem","Latin small letter u with breve":"Latinské malé pÃsmeno u s háÄkem","Latin capital letter u with ring above":"Latinské velké pÃsmeno u s kroužkem nad znakem","Latin small letter u with ring above":"Latinské malé pÃsmeno u s kroužkem nad znakem","Latin capital letter u with double acute":"Latinské velké pÃsmeno u s dvojitým akcentu","Latin small letter u with double acute":"Latinské malé pÃsmeno u s dvojitým akcentu","Latin capital letter u with ogonek":"Latinské velké pÃsmeno u s háÄkem","Latin small letter u with ogonek":"Latinské malé pÃsmeno u s háÄkem","Latin capital letter w with circumflex":"Latinské velké pÃsmeno w s obráceným háÄkem","Latin small letter w with circumflex":"Latinské malé pÃsmeno w s obráceným háÄkem","Latin capital letter y with circumflex":"Latinské velké pÃsmeno y s obráceným háÄkem","Latin small letter y with circumflex":"Latinské malé pÃsmeno y s obráteným mäkÄeÅom","Latin capital letter y with diaeresis":"Latinské velké pÃsmeno y s dvojteÄkou nad znakem","Latin capital letter z with acute":"Latinské velké pÃsmeno z s Äárkou","Latin small letter z with acute":"Latinské malé pÃsmeno z s Äárkou","Latin capital letter z with dot above":"Latinské velké pÃsmeno z s teÄkou nad znakem","Latin small letter z with dot above":"Latinské malé pÃsmeno z s teÄkou nad znakem","Latin capital letter z with caron":"Latinské velké pÃsmeno z s háÄkem","Latin small letter z with caron":"Malé pÃsmeno s z háÄkem","Latin small letter long s":"Malé dlouhé pÃsmeno s","Less-than sign":"Menšà než","Greater-than sign":"VÄtšà než","Less-than or equal to":"Menšà nebo roven","Greater-than or equal to":"VÄtšà nebo roven","En dash":"PomlÄka","Em dash":"Dlouhá pomlÄka",Macron:"Hornà Äára",Overline:"PÅeÅ¡krtnutÃ","Degree sign":"Znak stupeÅ","Minus sign":"Znak mÃnus","Plus-minus sign":"Znak plus-minus","Division sign":"DÄlenÃ","Fraction slash":"LomÃtko / DÄlenÃ","Multiplication sign":"NásobenÃ","Latin small letter f with hook":"Funkce",Integral:"Integrál","N-ary summation":"Znak cyklického sÄÃtánÃ",Infinity:"NekoneÄno","Square root":"Odmocnina","Tilde operator":"Vlnovka","Approximately equal to":"Aproximace","Almost equal to":"ÄásteÄnÄ rovný","Not equal to":"Nerovná se","Identical to":"Identický k","Element of":"PatÅà / Je souÄástÃ","Not an element of":"NepatÅà / Nenà souÄástÃ","Contains as member":"Obsahuje prve
11k","N-ary product":"Znak cyklického násobenÃ","Logical and":"Logický AND","Logical or":"Logický OR","Not sign":"Nenà rovný",Intersection:"PrůseÄÃk / Průnik",Union:"SjednocenÃ","Partial differential":"Parciálnà diference","For all":"Pro vÅ¡echny prvky v množinÄ","There exists":"Existuje v množinÄ","Empty set":"Prázdná množina",Nabla:"Nabla","Asterisk operator":"HvÄzdiÄka / násobenÃ","Proportional to":"ÃmÄrný k",Angle:"Ãhel","Vulgar fraction one quarter":"Jedna Ätvrtina","Vulgar fraction one half":"Polovina","Vulgar fraction three quarters":"TÅi Ätvrtiny","Single left-pointing angle quotation mark":"Å ipka ukazujÃcà do leva","Single right-pointing angle quotation mark":"Å ipka ukazujÃcà do prava","Left-pointing double angle quotation mark":"Dvojitá Å¡ipka ukazujÃcà do leva","Right-pointing double angle quotation mark":"Dvojitá Å¡ipka ukazujÃcà do prava","Left single quotation mark":"Levá uvozovka","Right single quotation mark":"Pravá uvozovka","Left double quotation mark":"Levá dvojitá uvozovka","Right double quotation mark":"Pravá dvojitá uvozovka","Single low-9 quotation mark":"Spodnà uvozovka","Double low-9 quotation mark":"Dvojitá spodnà uvozovka","Inverted exclamation mark":"Obrácený vykÅiÄnÃk","Inverted question mark":"Obrácený otaznÃk","Two dot leader":"Horizontálnà dvojteÄka","Horizontal ellipsis":"TeÄky","Double dagger":"DvojkÅÞ","Per mille sign":"Promile","Per ten thousand sign":"Na deset tisÃc","Double exclamation mark":"Dvojitý vykÅiÄnÃk","Question exclamation mark":"OtaznÃk a vykÅiÄnÃk","Exclamation question mark":"VykÅiÄnÃk a otaznÃk","Double question mark":"Dvojitý otaznÃk","Copyright sign":"Copyright","Registered sign":"Registrovaný","Trade mark sign":"Ochranná známka","Section sign":"Sekce","Paragraph sign":"Odstavec","Reversed paragraph sign":"Obrácený znak odstavce",Source:"Zdroj","Show source":"Zobrazit zdroj","Show blocks":"Zobrazit bloky","Select all":"Vybrat vÅ¡e","Disable editing":"Zakázat úpravy","Enable editing":"Povolit úpravy","Previous editable region":"PÅedchozà upravitelná oblast","Next editable region":"NásledujÃcà upravitelná oblast","Navigate editable regions":"Procházet upravitelnými oblastmi","Remove Format":"Odstranit formátovánÃ","Page break":"Konec stránky","media widget":"ovládacà prvek médiÃ","Media URL":"URL adresa","Paste the media URL in the input.":"Vložte URL média do vstupnÃho pole.","Tip: Paste the URL into the content to embed faster.":"Rada: Vložte URL pÅÃmo do editoru pro rychlejšà vnoÅenÃ.","The URL must not be empty.":"URL adresa musà být vyplnÄna.","This media URL is not supported.":"Tato adresa bohužel nenà podporována.","Insert media":"Vložit média",Media:"Média","Media toolbar":"Panel nástrojů médiÃ","Open media in new tab":"OtevÅete média na nové kartÄ","Numbered List":"ÄÃslovánÃ","Bulleted List":"Odrážky","To-do List":"Seznam úkolů","Bulleted list styles toolbar":"Panel seznamu s odrážkami","Numbered list styles toolbar":"Panel se styly ÄÃslovaného seznamu","Toggle the disc list style":"PÅepnout na seznam s oznaÄenÃm plného kruhu","Toggle the circle list style":"PÅepnout na seznam s kruhovým oznaÄenÃm","Toggle the square list style":"PÅepnout na seznam se Ätvercovým oznaÄenÃm","Toggle the decimal list style":"PÅepnout na ÄÃselný seznam","Toggle the decimal with leading zero list style":"PÅepnout na ÄÃselný seznam s nulou na zaÄátku","Toggle the lowerâroman list style":"PÅepnout na seznam s malými ÅÃmskými ÄÃsly","Toggle the upperâroman list style":"PÅepnout na seznam s velkými ÅÃmskými ÄÃsly","Toggle the lowerâlatin list style":"PÅepnout na seznam s malými pÃsmeny","Toggle the upperâlatin list style":"PÅepnout na seznam s velkými pÃsmeny",Disc:"Plný kruh",Circle:"Kruh",Square:"Ätverec",Decimal:"ÄÃsla","Decimal with leading zero":"ÄÃsla s nulou na zaÄátku","Lowerâroman":"Malé ÅÃmské ÄÃsla","Upper-roman":"Velké ÅÃmské ÄÃsla","Lower-latin":"Malá pÃsmena","Upper-latin":"Velká pÃsmena","List properties":"Vlastnosti seznamu","Start at":"ZaÄÃt na","Invalid start index value.":"Neplatná poÄáteÄnà hodnota indexu.","Start index must be greater than 0.":"PoÄátek musà být vÄtšà jak 0.","Reversed order":"Obrácené poÅadÃ","Keystrokes that can be used in a list":"Klávesy, které lze použÃt v seznamu","Increase list item indent":"ZvÄtÅ¡it odsazenà položky seznamu","Decrease list item indent":"ZmenÅ¡it odsazenà položky seznamu","Entering a to-do list":"Zadánà seznamu úkolů","Leaving a to-do list":"OpuÅ¡tÄnà seznamu úkolů",Unlink:"Odstranit odkaz",Link:"Odkaz","Link URL":"URL odkazu","Link URL must not be empty.":"Adresa URL odkazu nesmà být prázdná.","Link image":"Adresa obrázku","Edit link":"Uprav
11it odkaz","Open link in new tab":"OtevÅÃt odkaz v nové kartÄ","This link has no URL":"Tento odkaz nemá žádnou URL","Open in a new tab":"OtevÅÃt v nové kartÄ",Downloadable:"Ke staženÃ","Create link":"VytvoÅit odkaz","Move out of a link":"OdejÃt z odkazu","Scroll to target":"PÅejÃt na cÃl",Language:"Jazyk","Choose language":"Vybrat jazyk","Remove language":"Odstranit jazyk","Increase indent":"ZvÄtÅ¡it odsazenÃ","Decrease indent":"ZmenÅ¡it odsazenÃ","image widget":"ovládacà prvek obrázku","Wrap text":"Text nahoÅe a dole","Break text":"Obtékánà textu","In line":"RovnobÄžnÄ s textem","Side image":"Postrannà obrázek","Full size image":"Obrázek v plné velikosti","Left aligned image":"Obrázek zarovnaný vlevo","Centered image":"Obrázek zarovnaný na stÅed","Right aligned image":"Obrázek zarovnaný vpravo","Change image text alternative":"ZmÄnit alternativnà text obrázku","Text alternative":"Alternativnà text","Enter image caption":"Zadejte popis obrázku","Insert image":"Vložit obrázek","Replace image":"Nahradit obrázek","Upload from computer":"Nahrát z poÄÃtaÄe","Replace from computer":"Nahradit z poÄÃtaÄe","Upload image from computer":"Nahrát obrázek z poÄÃtaÄe","Image from computer":"Obrázek z poÄÃtaÄe","From computer":"Z poÄÃtaÄe","Replace image from computer":"Nahradit obrázek z poÄÃtaÄe","Upload failed":"Nahránà selhalo","You have no image upload permissions.":"Nemáte oprávnÄnà k nahrávánà obrázků.","Image toolbar":"Panel nástrojů obrázku","Resize image":"ZmÄnit velikost","Resize image to %0":"ZmÄnit velikost na %0","Resize image to the original size":"ZmÄnit velikost na původnà velikost","Resize image (in %0)":"ZmÄnit velikost obrázku (v %0)",Original:"OriginálnÃ","Custom image size":"Vlastnà velikost obrázku",Custom:"VlastnÃ","Image resize list":"Seznam možnostà zmÄny velikosti","Insert image via URL":"Vložit obrázek pomocà URL","Insert via URL":"Vložit pÅes URL","Image via URL":"Obrázek pÅes URL","Via URL":"PÅes URL","Update image URL":"Aktualizovat URL obrázku","Caption for the image":"Popisek k obrázku","Caption for image: %0":"Popisek k obrázku: %0","The value must not be empty.":"Hodnota nesmà být prázdná","The value should be a plain number.":"Hodnota musà být prosté ÄÃslo.","Uploading image":"Nahrávánà obrázku","Image upload complete":"Nahrávánà obrázku dokonÄeno","Error during image upload":"PÅi nahrávánà obrázku doÅ¡lo k chybÄ",Image:"Obrázek","HTML object":"HTML objekt","Insert HTML":"Vložit kód HTML","HTML snippet":"Kód HTML","Paste raw HTML here...":"Sem vložte kód HTML ...","Edit source":"Upravit zdroj","Save changes":"Uložit zmÄny","No preview available":"Náhled nenà k dispozici","Empty snippet content":"Prázdný obsah kódu","Horizontal line":"Vodorovná Äára","Yellow marker":"Žlutý fix","Green marker":"Zelený fix","Pink marker":"Růžový fix","Blue marker":"Modrý fix","Red pen":"Äervený fix","Green pen":"Zelené pero","Remove highlight":"Odstranit zvýraznÄnÃ",Highlight:"ZvýraznÄnÃ","Text highlight toolbar":"Panel nástrojů zvýraznÄnà textu",Heading:"Nadpis","Choose heading":"Zvolte nadpis","Heading 1":"Nadpis 1","Heading 2":"Nadpis 2","Heading 3":"Nadpis 3","Heading 4":"Nadpis 4","Heading 5":"Nadpis 5","Heading 6":"Nadpis 6","Type your title":"Sem zadejte název","Type or paste your content here.":"Zde zadejte nebo vložte obsah.","Font Size":"Velikost pÃsma",Tiny:"Drobné",Small:"Malé",Big:"Velké",Huge:"Obrovské","Font Family":"Typ pÃsma",Default:"VýchozÃ","Font Color":"Barva pÃsma","Font Background Color":"Barva pozadà pÃsma","Document colors":"Barvy dokumentu","Find and replace":"NajÃt a nahradit","Find in textâ¦":"NajÃt v textu...",Find:"NajÃt","Previous result":"PÅedchozà výskyt","Next result":"Dalšà výskyt",Replace:"Nahradit","Replace all":"Nahradit vÅ¡e","Match case":"RozliÅ¡ovat velikost pÃsmen","Whole words only":"Pouze celá slova","Replace withâ¦":"Nahradit ÄÃm...","Text to find must not be empty.":"Hledaný text nesmà být prázdný.","Tip: Find s
11ome text first in order to replace it.":"Tip: Nejprve najdÄte nÄjaký text, abyste jej mohli nahradit.","Advanced options":"PokroÄilé možnosti","Find in the document":"NajÃt v dokumentu","Insert a soft break (a <code><br></code> element)":"Vložit mÄkkou mezeru (prvek <code><br></code>)","Insert a hard break (a new paragraph)":"Vložit tvrdou mezeru (nový odstavec)",Cancel:"ZruÅ¡it",Clear:"Smazat","Remove color":"Odstranit barvu","Restore default":"Obnovit výchozÃ",Save:"Uložit","Show more items":"Zobrazit dalšà položky","%0 of %1":"%0 z %1","Cannot upload file:":"Soubor nelze nahrát:","Rich Text Editor. Editing area: %0":"EditaÄnà oblast rich text editoru: %0","Insert with file manager":"Vložit pomocà správce souborů","Replace with file manager":"Nahradit pomocà správce souborů","Insert image with file manager":"Vložit obrázek pomocà správce souborů","Replace image with file manager":"Nahradit obrázek pomocà správce souborů",File:"Soubor","With file manager":"Pomocà správce souborů","Toggle caption off":"Vypnout titulek","Toggle caption on":"Zapnout titulek","Content editing keystrokes":"Klávesy na úpravu obsahu","These keyboard shortcuts allow for quick access to content editing features.":"Tyto klávesové zkratky vám umožnà rychlý pÅÃstup k funkcÃm úpravy obsahu.","User interface and content navigation keystrokes":"Klávesy navigace v uživatelském rozhranà a obsahu","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Pro efektivnà navigaci v uživatelském rozhranà CKEditor 5 použijte následujÃcà klávesy.","Close contextual balloons, dropdowns, and dialogs":"ZavÅÃt kontextuálnà balóny, rozbalovacà menu a dialogy","Open the accessibility help dialog":"OtevÅÃt dialog podpory pÅÃstupnosti","Move focus between form fields (inputs, buttons, etc.)":"PÅesunout zamÄÅenà mezi poli formuláÅe (vstupy, tlaÄÃtka atd.)","Move focus to the menu bar, navigate between menu bars":"ZamÄÅte se na panel nabÃdek, procházejte mezi panely nabÃdek","Move focus to the toolbar, navigate between toolbars":"PÅesunout zamÄÅenà na liÅ¡tu nástrojů, navigace mezi liÅ¡tami nástrojů","Navigate through the toolbar or menu bar":"Procházenà panelu nástrojů nebo panelu nabÃdek","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"SpusÅ¥te aktuálnÄ zamÄÅené tlaÄÃtko. SpuÅ¡tÄnÃm tlaÄÃtek, která interagujà s obsahem editoru, se zamÄÅenà pÅesune zpÄt na obsah.",Accept:"PÅijmout",Paragraph:"Odstavec","Color picker":"Vybrat barvu","Insert code block":"Vložit blok zdrojového kódu","Plain text":"Prostý text","Leaving %0 code snippet":"OpouÅ¡tà se fragment kódu %0","Entering %0 code snippet":"Zadávánà fragmentu kódu %0","Entering code snippet":"Zadávánà fragmentu kódu","Leaving code snippet":"OpuÅ¡tÄnà fragmentu kódu","Code block":"Blok kódu","Copy selected content":"ZkopÃrovat vybraný obsah","Paste content":"Vložit obsah","Paste content as plain text":"Vyložit obsah jako prostý text","Insert image or file":"Vložit obrázek nebo soubor","Could not obtain resized image URL.":"Nelze zÃskat URL obrázku se zmÄnÄnou velikostÃ.","Selecting resized image failed":"VýbÄr obrázku se zmÄnÄnou velikostà selhal","Could not insert image at the current position.":"Na souÄasnou pozici nelze vložit obrázek.","Inserting image failed":"Vloženà obrázku selhalo","Open file manager":"OtevÅÃt správce souborů","Cannot determine a category for the uploaded file.":"Nelze urÄit kategorii pro nahraný soubor.","Cannot access default workspace.":"Nelze zÃskat pÅÃstup k výchozÃmu pracoviÅ¡ti.","You have no image editing permissions.":"Nemáte oprávnÄnà k úpravám obrázků.","Edit image":"Upravit obrázek","Processing the edited image.":"Zpracovánà upraveného obrázku.","Server failed to process the image.":"Serveru se nepodaÅilo zpracovat obrázek.","Failed to determine category of edited image.":"NepodaÅilo se urÄit kategorii upraveného obrázku.",Bookmark:"Záložka",Insert:"Vložit",Update:"Aktualizace","Edit bookmark":"Uprav
11it záložku","Remove bookmark":"Odstranit záložku","Bookmark name":"Název záložky","Enter the bookmark name without spaces.":"Zadejte název záložky bez mezer.","Bookmark must not be empty.":"Záložka nesmà být prázdná","Bookmark name cannot contain space characters.":"Název záložky nemůže obsahovat znaky mezery.","Bookmark name already exists.":"Záložka s tÃmto názvem už existuje.","bookmark widget":"widget záložky","Block quote":"Citace",Bold:"TuÄné",Italic:"KurzÃva",Underline:"Podtržené",Code:"Kódový blok",Strikethrough:"PÅeÅ¡krtnuté",Subscript:"Dolnà index",Superscript:"Hornà index","Italic text":"KurzÃva","Move out of an inline code style":"OdejÃt ze stylu vloženého kódu","Bold text":"TuÄnÄ","Underline text":"PodtrhnutÃ","Strikethrough text":"PÅeÅ¡ktnutÃ","Saving changes":"Ukládánà zmÄn","Revert autoformatting action":"VzÃt zpÄt akci automatického formátovánÃ","Align left":"Zarovnat vlevo","Align right":"Zarovnat vpravo","Align center":"Zarovnat na stÅed",Justify:"Zarovnat do bloku","Text alignment":"Zarovnánà textu","Text alignment toolbar":"Panel nástrojů zarovnánà textu"},getPluralForm:e=>1==e?0:e>=2&&e<=4?1:2}}},{}],25:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){return r.ClassicEditor.create(e,{height:400,simpleUpload:{uploadUrl:e.dataset.uploadUrl,withCredentials:!0,headers:{}},mediaEmbed:{previewsInData:!0},toolbar:{items:["heading","|","bold","italic","underline","strikethrough","subscript","superscript","code","removeFormat","|","link","insertImage","mediaEmbed","insertTable","blockQuote","|","bulletedList","numberedList","todoList","outdent","indent","|","sourceEditing","showBlocks"],shouldNotGroupWhenFull:!1},plugins:[r.Autoformat,r.AutoImage,r.Autosave,r.BalloonToolbar,r.BlockQuote,r.Bold,r.Code,r.Essentials,r.Heading,r.ImageBlock,r.ImageCaption,r.ImageInline,r.ImageInsert,r.ImageInsertViaUrl,r.ImageResize,r.ImageStyle,r.ImageTextAlternative,r.ImageToolbar,r.ImageUpload,r.Indent,r.IndentBlock,r.Italic,r.Link,r.LinkImage,r.List,r.ListProperties,r.MediaEmbed,r.Paragraph,r.PasteFromOffice,r.RemoveFormat,r.ShowBlocks,r.SimpleUploadAdapter,r.SourceEditing,r.Strikethrough,r.Subscript,r.Superscript,r.Table,r.TableCaption,r.TableCellProperties,r.TableColumnResize,r.TableProperties,r.TableToolbar,r.TextTransformation,r.TodoList,r.Underline],balloonToolbar:["bold","italic","|","link","insertImage","|","bulletedList","numberedList"],heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h1",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"},{model:"heading4",view:"h4",title:"Heading 4",class:"ck-heading_heading4"},{model:"heading5",view:"h5",title:"Heading 5",class:"ck-heading_heading5"},{model:"heading6",view:"h6",title:"Heading 6",class:"ck-heading_heading6"}]},image:{toolbar:["toggleImageCaption","imageTextAlternative","|","imageStyle:inline","imageStyle:wrapText","imageStyle:breakText","|","resizeImage"]},language:"cs",licenseKey:a,link:{addTargetToExternalLinks:!0,defaultProtocol:"https://",decorators:{toggleDownloadable:{mode:"manual",label:"Downloadable",attributes:{download:"file"}}}},list:{properties:{styles:!0,startIndex:!0,reversed:!0}},placeholder:"ZaÄnÄte psát",table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties"]},translations:[o.default]})};var n,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,i&&i.set(e,n),n}(e("./ckeditor5.js")),o=(n=e("./cs.js"))&&n.__esModule?n:{default:n};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const a="GPL"},{"./ckeditor5.js":23,"./cs.js":24}],26:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e="body.page-about-team";document.querySelectorAll(`${e}
11 .content-wrap.toggle`).forEach(e=>{e.dataset.height=function(e){if(!e.cloneNode)return null;const t=e.cloneNode(!0);Object.assign(t.style,{overflow:"visible",height:"auto",maxHeight:"none",opacity:"0",visibility:"hidden",display:"block"}),e.after(t);const i=t.offsetHeight;return t.remove(),i}(e)}),document.querySelectorAll(`${e} .list-toggle`).forEach(e=>{e.addEventListener("click",e=>{const t=e.target.closest(".container"),i=t.querySelector(".content-wrap"),n=e.target.dataset.action,r=t.querySelector(".buttons .btn-square-arrow-up"),o=t.querySelector(".buttons .btn-square-arrow-down");if(r.classList.toggle("hidden"),o.classList.toggle("hidden"),"show"===n)i.style.display="block";else{i.style.display="none";const e=function(e){var t=e.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,n=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+n,left:t.left+i}}(t),n=document.querySelector("header").offsetHeight;!function(e){document.body.scrollTop=e,document.documentElement.scrollTop=e}(e.top-n),t.classList.add("blink"),t.addEventListener("webkitAnimationEnd",()=>{t.classList.remove("blink")},!1)}})})}},{}],27:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelector("body.page-contact .media-contacts");if(!e)return;const t=e.querySelector(".media-contacts-content"),i=e.querySelector(".btn-square-arrow-up"),n=e.querySelector(".btn-square-arrow-down");e.querySelectorAll(".list-toggle").forEach(e=>{e.addEventListener("click",()=>{const r="show"===e.dataset.action;t.style.display=r?"block":"none",i.classList.toggle("hidden"),n.classList.toggle("hidden")})})}},{}],28:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){(function(){const e=document.querySelector('[data-animation="hero-top"]');if(e){const t=5e3,i=50,n=.05,r=e.querySelectorAll('span[data-animation="text-change"]');let o=0;const s=(e,t)=>{let r=1,o=e,s=setInterval(()=>{o===e?(r<=n&&(o.classList.add("hidden"),o=t,o.classList.remove("hidden")),r-=n):(r>=1&&clearInterval(s),r+=n),o.style.opacity=r,o.style.filter="alpha(opacity="+100*r+")"},i)};setInterval(()=>{if("visible"===document.visibilityState){let e=r[o];o=(o+1)%r.length;let t=r[o];s(e,t)}},t+1/n*i+i)}})(),function(){const e=document.querySelector(".fond-people-button"),t=document.querySelector(".fond-people-grid");if(document.body.contains(e)){const i=e.dataset.showmore,n=e.dataset.showless;e.addEventListener("click",r=>{r.preventDefault(),t.classList.toggle("collapsed"),t.classList.contains("collapsed")?e.innerHTML=i:e.innerHTML=n})}}(),function(){const e=document.querySelector(".fond-portfolio-button"),t=document.querySelector(".fond-portfolio-grid");if(document.body.contains(e)){const i=e.dataset.showmore,n=e.dataset.showless;e.addEventListener("click",r=>{t.classList.toggle("collapsed"),t.classList.contains("collapsed")?e.innerHTML=i:e.innerHTML=n})}}(),Array.from(document.querySelectorAll(".iti-input")).forEach(e=>{const t=(0,r.default)(e,{initialCountry:s(),utilsScript:"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.15/js/utils.min.js",preferredCountries:["cz","sk","pl","gb","de"]}),i=e.closest("form").id;e.value=`+${t.getSelectedCountryData().dialCode}`,e.addEventListener("countrychange",()=>{e.value=`+${t.getSelectedCountryData().dialCode}`,document.getElementById(i+"-phone").focus()}),e.addEventListener("click",e=>{document.getElementById(i+"-phone").focus()})})};var n,r=(n=e("intl-tel-input"))&&n.__esModule?n:{default:n},o=e("swiper");function s(){switch(document.documentElement.getAttribute("lang")){case"cs":default:return"cz";case"en":return"gb";case"pl":return"pl";case"sk":return"sk";case"hr":return"hr";case"es":return"es"}}o.Swiper.use([o.Navigation,o.Scrollbar])},{"intl-tel-input":249,swiper:397}],29:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){(0,r.default)({selector:".glightbox",openEffect:"zoom",closeEffect:"fade"})};var n,r=(n=e("glightbox"))&&n.__esModule?n:{default:n}},{glightbox:215}],30:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;async function n(e){try{const t=await fetch(e,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"}});if(t.status>300)throw Error();return await async function(e){const{snippets:t={}}=await e.json();
11return Object.keys(t).forEach(e=>{const i=document.getElementById(e);i&&(i.innerHTML=t[e])}),Object.keys(t)}(t)}catch(e){console.error(e)}}i.default=()=>{document.addEventListener("click",async e=>{const t=e.target.closest(":not(form)[data-ajax]");if(t&&t){e.preventDefault();const i=t.dataset.ajax?t.dataset.ajax:t.href;await n(i)}}),Array.from(document.querySelectorAll("[data-update-modal]")).forEach(e=>{e.addEventListener("click",async t=>{t.preventDefault();const[i]=await n(e.dataset.updateModal),r=document.getElementById(i);r&&r.parentNode.showModal&&r.parentNode.showModal()})})}},{}],31:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n,r=e("../utils"),o=e("./recaptcha"),s=(n=e("./netteForms"))&&n.__esModule?n:{default:n};i.default=()=>{document.addEventListener("submit",async e=>{const t=e.target.closest("form.ajax");if(!t)return;console.log("ajax submit"),e.preventDefault();const i=t.dataset.response&&document.querySelector(t.dataset.response)||document.createElement("div"),n=t.querySelectorAll("[required]");let a=!0;if(n.forEach(e=>{!e.value||"checkbox"===e.type&&!e.checked?(a=!1,e.classList.add("invalid"),e.addEventListener("input",()=>{e.classList.remove("invalid")})):e.classList.remove("invalid")}),!a)return void console.log("Please fill in all required fields.");if(!s.default.validateForm(t,!0))return void console.log("Please fill in all required fields correctly.");await(0,o.verifyRecaptcha)(t);const l=new XMLHttpRequest,c=t.querySelector("[type='submit']"),u=c.textContent,h=c.dataset.submitText?c.dataset.submitText:null;l.onreadystatechange=async function(){if(this.readyState<XMLHttpRequest.DONE&&(t.classList.add("loading"),h&&(c.textContent=h)),4!==this.readyState)return;const e=JSON.parse(this.responseText);this.readyState===XMLHttpRequest.DONE&&200===this.status&&(i.innerHTML=e,t.classList.add("success"),t.classList.remove("loading"),h&&(c.textContent=u)),await(0,r.applySnippets)(e),document.dispatchEvent(new CustomEvent("showModalEvent")),this.readyState===XMLHttpRequest.DONE&&this.status>=300&&this.status<400&&(i.innerHTML="",location.href=this.responseText),this.readyState===XMLHttpRequest.DONE&&this.status>=400&&(i.innerHTML=JSON.parse(this.responseText).response,t.classList.add("failure"),t.classList.remove("loading"),setTimeout(()=>{t.classList.remove("failure"),i.innerHTML=""},5e3))},l.open(t.method,t.action),l.setRequestHeader("X-Requested-With","XMLHttpRequest"),l.send(new FormData(t))})}},{"../utils":55,"./netteForms":39,"./recaptcha":41}],32:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if("http:"===window.location.protocol||!document.querySelector("html").dataset.cookiesInit)return;a=window.initCookieConsent(),a.run({cookie_name:"cookie_policy",current_lang:r,autoclear_cookies:!0,theme_css:"https://cdn.jsdelivr.net/gh/orestbida/[email protected]/dist/cookieconsent.css",page_scripts:!0,cookie_same_site:"None",onFirstAction(e,t){let i="";a.allowedCategory("analytics")?i+="allowed analytics,":i+="denied analytics,",a.allowedCategory("marketing")?i+="allowed marketing,":i+="denied marketing,",function(e){const t=document.getElementById("cookies-component");if(console.log("log:",e),t){const i=`${t.dataset.consentLog}&log=${encodeURIComponent(e)}`;try{if(fetch(i,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"}}).status>300)throw Error()}catch(e){console.error(e)}}}(i)},onAccept(){console.log("onAccept fired!"),a.allowedCategory("analytics")?c():u(),a.allowedCategory("marketing")?h():d(),f(),l()},onChange(e,t){console.log("onChange fired!"),a.allowedCategory("analytics")?c():u(),a.allowedCategory("marketing")?h():d(),f(),l()},languages:p()}),l()};var n;(n=e("vanilla-cookieconsent"))&&n.__esModule;const r=document.documentElement.getAttribute("lang"),o=`/files/documents/accolade_cookies_policy_102018_${r}.pdf`,s=`/files/documents/accolade_privacy_notice_102018_${r}.pdf`;let a;function l(){const e=document.getElementById("cookies-component");a.get("level")?e.style.visibility="hidden":e.style.visibility="visible"}function c(){console.log("accepting analytics"),gtag("consent","update",{analytics_storage:"granted"})}function u(){console.log("denying analytics"),gtag("consent","update",{analytics_storage:"denied"})}function h(){console.log("accepting marketing"),gtag("consent","update",{ad_storage:"granted"}),console.log("accepting user data"),gtag("consent","update",{ad_user_data:"granted"}),console.log("accepting personalization"),gtag("consent","update",{ad_personalization:"granted"})}function d(){console.log("denying marketing"),gtag("consent","update",{ad_storage:"denied"}),console.log("denying user data"),gtag("consent","update",{ad_user_data:"denied"}),console.log("denying personalization"),gtag("consent","update",{ad_personalization:"denied"})}function f(){dataLayer.push({event:"consent-update"})}function p(){const e={};for(const[t,i]of Object.entries(g))e[t]={consent_modal:{title:i.consentModal.title,de
11scription:i.consentModal.description,primary_btn:{text:i.consentModal.primaryBtn,role:"accept_all"},secondary_btn:{text:i.consentModal.secondaryBtn,role:"accept_necessary"}},settings_modal:{title:i.settingsModal.title,save_settings_btn:i.settingsModal.saveSettingsBtn,accept_all_btn:i.settingsModal.acceptAllBtn,reject_all_btn:i.settingsModal.rejectAllBtn,close_btn_label:i.settingsModal.closeBtnLabel,cookie_table_headers:[{col1:i.settingsModal.headers.col1},{col2:i.settingsModal.headers.col2},{col3:i.settingsModal.headers.col3},{col4:i.settingsModal.headers.col4}],blocks:[{title:i.settingsModal.blocks.intro.title,description:i.settingsModal.blocks.intro.description},{title:i.settingsModal.blocks.necessary.title,description:i.settingsModal.blocks.necessary.description,toggle:{value:"necessary",enabled:!0,readonly:!0},cookie_table:m(v.necessary,t)},{title:i.settingsModal.blocks.analytics.title,description:i.settingsModal.blocks.analytics.description,toggle:{value:"analytics",enabled:!1,readonly:!1},cookie_table:m(v.analytics,t)},{title:i.settingsModal.blocks.marketing.title,description:i.settingsModal.blocks.marketing.description,toggle:{value:"marketing",enabled:!1,readonly:!1},cookie_table:m(v.marketing,t)},{title:i.settingsModal.blocks.info.title,description:i.settingsModal.blocks.info.description}]}};return e}function m(e,t){return e.map(e=>({col1:e.name,col2:e.domain,col3:e.expiration[t],col4:e.description[t]}))}const g={cs:{consentModal:{title:"PoužÃváme cookies!",description:'Dobrý den, tato webová stránka použÃvá nezbytné soubory cookie k zajiÅ¡tÄnà správného fungovánà a analytické soubory cookie, abychom pochopili, jak stránky použÃváte a mohli je dále vylepÅ¡ovat. <button type="button" data-cc="c-settings" class="cc-link">Nechte mÄ vybrat</button>',primaryBtn:"PÅijmout vÅ¡e",secondaryBtn:"OdmÃtnout vÅ¡e"},settingsModal:{title:"PÅedvolby souborů cookie",saveSettingsBtn:"Uložit nastavenÃ",acceptAllBtn:"PÅijmout vÅ¡e",rejectAllBtn:"OdmÃtnout vÅ¡e",closeBtnLabel:"ZavÅÃt",headers:{col1:"Název",col2:"Doména",col3:"Expirace",col4:"Popis"},blocks:{intro:{title:"PoužÃvánà souborů cookie ð¢",description:`Soubory cookie použÃváme k zajiÅ¡tÄnà základnÃch funkcà webu a ke zlepÅ¡enà vaÅ¡eho online zážitku. Pro každou kategorii si můžete vybrat, zda se chcete pÅihlásit/odhlásit kdykoli budete chtÃt, a to prostÅednictvÃm odkazu trvale umÃstÄného na webu. Dalšà podrobnosti týkajÃcà se souborů cookie naleznete v naÅ¡ich <a href="${o}" class="cc-link" target="_blank">Zásadách použÃvánà cookies.</a>.`},necessary:{title:"NezbytnÄ nutné cookies",description:"Tyto soubory cookie jsou nezbytné pro správné fungovánà mých webových stránek. Bez tÄchto cookies by web nefungoval správnÄ."},analytics:{title:"Analytické soubory cookie",description:"Tyto soubory cookie umožÅujà webu zapamatovat si volby, které jste provedli v minulosti."},marketing:{title:"Advertisement and Marketing cookies",description:"Marketingové cookies jsou použÃvány pro sledovánà návÅ¡tÄvnÃků na webových stránkách. ZámÄrem je zobrazit reklamu, která je relevantnà a zajÃmavá pro jednotlivého uživatele a tÃmto hodnotnÄjšà pro vydavatele a inzerenty tÅetÃch stran."},info:{title:"VÃce informacÃ",description:`Dalšà informace o tom, jak nakládáme s osobnÃmi údaji naleznete v naÅ¡ich <a class="cc-link" href="${s}" target="_blank">Zásadách zpracovánà osobnÃch údajů</a>.`}}}},en:{consentModal:{title:"We use cookies!",description:'Good morning! Our website uses essential cookies to ensure its proper functioning and analytical cookies to let us know how the users interact with our site in order for us to improve it. <button type="button" data-cc="c-settings" class="cc-link">Let me decide</button>',primaryBtn:"Accept all",secondaryBtn:"Reject all"},settingsModal:{title:"Cookie preferences",saveSettingsBtn:"Save settings",acceptAllBtn:"Accept all",rejectAllBtn:"Reject all",closeBtnLabel:"Close",headers:{col1:"Name",col2:"Domain",col3:"Expiration",col4:"Description"},blocks:{intro:{title:"Use of cookies ð¢",description:`We use cookies to ensure the basic functions of the website and to improve your online experience. For each category, you can choose whether to log in / out whenever you want, via a link permanently located on the website. Further details regarding cookies can be found in our <a href="${o}" class="cc-link" target="_blank">Cookies Policy.</a>.`},necessary:{title:"Essential cookies",description:"These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly"},analytics:{title:"Analytics cookies",description:"These cookies allow the website to remember the choices you have made in the past"},marketing:{title:"Advertising and marketing cookies",description:"Marketing cookies are used to track visitors to the website. The intention is to display advertising that is relevant and interesting to the individual user and thus more valuable to publishers and third-party advertisers."},info:{title:"More information",description:`For more information about how we handle personal information, please see our <a class="cc-link" href="${s}" target="_blank">Privacy Policy</a>.`}}}},de:{consentModal:{title:"Wir verwenden Cookies!",description:'Hallo, diese Website verwendet notwendige Cookies, um ein korrektes Funktionieren zu gewährleisten, sowie Analyse-Cookies, um zu verstehe
11n, wie du die Website nutzt, und sie weiter verbessern zu können. <button type="button" data-cc="c-settings" class="cc-link">Ich möchte auswählen</button>',primaryBtn:"Alle akzeptieren",secondaryBtn:"Alle ablehnen"},settingsModal:{title:"Cookie-Einstellungen",saveSettingsBtn:"Einstellungen speichern",acceptAllBtn:"Alle akzeptieren",rejectAllBtn:"Alle ablehnen",closeBtnLabel:"SchlieÃen",headers:{col1:"Name",col2:"Domain",col3:"Ablauf",col4:"Beschreibung"},blocks:{intro:{title:"Verwendung von Cookies ð¢",description:`Wir verwenden Cookies, um grundlegende Funktionen der Website bereitzustellen und dein Online-Erlebnis zu verbessern. Du kannst für jede Kategorie jederzeit über einen permanenten Link auf der Website deine Einwilligung geben oder widerrufen. Weitere Einzelheiten zu Cookies findest du in unserer <a href="${o}" class="cc-link" target="_blank">Cookie-Richtlinie.</a>.`},necessary:{title:"Unbedingt notwendige Cookies",description:"Diese Cookies sind für das ordnungsgemäÃe Funktionieren meiner Website erforderlich. Ohne sie würde die Website nicht richtig funktionieren."},analytics:{title:"Analyse-Cookies",description:"Diese Cookies ermöglichen es der Website, sich an Entscheidungen zu erinnern, die du in der Vergangenheit getroffen hast."},marketing:{title:"Werbe- und Marketing-Cookies",description:"Marketing-Cookies werden verwendet, um Besucher über Websites hinweg zu verfolgen. Ziel ist es, Werbung anzuzeigen, die für den einzelnen Nutzer relevant und ansprechend ist und damit für Publisher und Drittanbieter wertvoller ist."},info:{title:"Weitere Informationen",description:`Weitere Informationen darüber, wie wir mit personenbezogenen Daten umgehen, findest du in unserer <a class="cc-link" href="${s}" target="_blank">Datenschutzerklärung</a>.`}}}},es:{consentModal:{title:"¡Utilizamos cookies!",description:'Hola, este sitio web utiliza cookies necesarias para garantizar el correcto funcionamiento y cookies analÃticas para comprender cómo usted utiliza el sitio web y para seguir mejorándolo. <button type="button" data-cc="c-settings" class="cc-link"> Déjeme elegir</button>',primaryBtn:"Aceptar todo",secondaryBtn:"Rechazar todo"},settingsModal:{title:"Preferencias de cookies ",saveSettingsBtn:"Guardar la configuración",acceptAllBtn:"Aceptar todo",rejectAllBtn:"Rechazar todo",closeBtnLabel:"Cerca",headers:{col1:"Nombre",col2:"Dominio",col3:"Caducidad",col4:"Descripción"},blocks:{intro:{title:"Uso de cookies ð¢",description:`Usamos cookies para proporcionar la funcionalidad básica de la página web y para mejorar su experiencia en lÃnea. Para cada categorÃa, puede optar por aceptar o rechazar cuando lo desee a través del enlace colocado de forma permanente en la página web. Para obtener más detalles sobre las cookies, consulte nuestra <a href="${o}" class="cc-link" target="_blank"> PolÃtica de uso de cookies.</a>.`},necessary:{title:"Cookies necesarias",description:"Estas cookies son necesarias para el correcto funcionamiento de mi página web. Sin estas cookies, la página web no funcionarÃa bien"},analytics:{title:"Cookies analÃticas",description:"Estas cookies permiten que la página web recuerde las elecciones que usted ha realizado en el pasado."},marketing:{title:"Cookies de publicidad y marketing",description:"Las cookies de marketing se utilizan para hacer un seguimiento de los visitantes del sitio web. La intención es mostrar publicidad que sea relevante e interesante para el usuario individual y, por lo tanto, más valiosa para los editores y anunciantes de terceros."},info:{title:"Más información",description:`Para obtener más información sobre cómo tratamos los datos personales, consulte nuestra <a class="cc-link" href="${s}" target="_blank">PolÃtica de tratamiento de datos personales</a>.`}}}},pl:{consentModal:{title:"Używamy plików cookie!",description:'DzieÅ dobry! Nasza witryna używa niezbÄdnych plików cookie w celu zapewnienia jej prawidÅowego funkcjonowania oraz analitycznych plików cookie, abyÅmy wiedzieli, w jaki sposób użytkownicy z niej korzystajÄ
, i mogli jÄ
ulepszaÄ. <button type="button" data-cc="c-settings" class="cc-link">Pozwól mi wybraÄ</button>',primaryBtn:"Zaakceptuj wszystko",secondaryBtn:"OdrzuÄ wszystko"},settingsModal:{title:"Preferencje plików cookie",saveSettingsBtn:"Zapisz ustawienia",acceptAllBtn:"Zaakceptuj wszystko",rejectAllBtn:"OdrzuÄ wszystko",closeBtnLabel:"Blisko",headers:{col1:"Nazwa",col2
11:"Domena",col3:"WygaÅniÄcie",col4:"Opis"},blocks:{intro:{title:"Korzystanie z plików cookie ð¢",description:`Używamy plików cookie, aby zapewniÄ podstawowe funkcje witryny i poprawiÄ komfort korzystania z Internetu. Dla każdej kategorii możesz wybraÄ, czy chcesz siÄ zalogowaÄ/wylogowaÄ, kiedy tylko chcesz, poprzez link na staÅe znajdujÄ
cy siÄ na stronie. Dalsze szczegóÅy dotyczÄ
ce plików cookie można znaleÅºÄ w naszej <a href="${o}" class="cc-link" target="_blank">Polityce plików cookie.</a>.`},necessary:{title:"NiezbÄdne pliki cookie",description:"Te pliki cookie sÄ
niezbÄdne do prawidÅowego funkcjonowania mojej witryny. Bez tych plików cookie strona nie dziaÅaÅaby poprawnie."},analytics:{title:"Analityczne pliki cookie",description:"Te pliki cookie umożliwiajÄ
witrynie zapamiÄtanie wyborów dokonanych w przeszÅoÅci."},marketing:{title:"Reklamowe i marketingowe pliki cookie",description:"Marketingowe pliki cookie sÅużÄ
do Åledzenia odwiedzajÄ
cych witrynÄ. Celem jest wyÅwietlanie reklam, które sÄ
istotne i interesujÄ
ce dla poszczególnych użytkowników, a tym samym bardziej wartoÅciowe dla wydawców i zewnÄtrznych reklamodawców."},info:{title:"WiÄcej informacji",description:`Aby uzyskaÄ wiÄcej informacji o tym, jak postÄpujemy z danymi osobowymi, zapoznaj siÄ z naszÄ
<a class="cc-link" href="${s}" target="_blank">PolitykÄ
prywatnoÅci</a>.`}}}},sk:{consentModal:{title:"PoužÃvame súbory cookie!",description:'Dobrý deÅ, táto webová stránka použÃva nevyhnutné súbory cookie na zabezpeÄenie správneho fungovania a analytické súbory cookie, aby sme pochopili, ako stránky použÃvate, a aby sme ich mohli Äalej vylepÅ¡ovaÅ¥. <button type="button" data-cc="c-settings" class="cc-link">Nechajte ma vybraÅ¥</button>',primaryBtn:"PrijaÅ¥ vÅ¡etky",secondaryBtn:"OdmietnuÅ¥ vÅ¡etky"},settingsModal:{title:"PÅedvolby souborů cookie",saveSettingsBtn:"UložiÅ¥ nastavenia",acceptAllBtn:"PrijaÅ¥ vÅ¡etky",rejectAllBtn:"OdmietnuÅ¥ vÅ¡etky",closeBtnLabel:"ZavÅÃt",headers:{col1:"Název",col2:"Doména",col3:"Expirace",col4:"Popis"},blocks:{intro:{title:"PoužÃvanie súborov cookie ð¢",description:`Súbory cookie použÃvame na zaistenie základných funkcià webu a na zlepÅ¡enie vášho online zážitku. Pre každú kategóriu si môžete vybraÅ¥, Äi sa chcete prihlásiÅ¥/odhlásiÅ¥ kedykoľvek budete chcieÅ¥, a to prostrednÃctvom odkazu trvalo umiestneného na webe. ÄalÅ¡ie podrobnosti týkajúce sa súborov cookie nájdete v naÅ¡ich <a href="${o}" class="cc-link" target="_blank">Zásadách použÃvania cookies.</a>.`},necessary:{title:"Nevyhnutné súbory cookie",description:"Tyto soubory cookie jsou nezbytné pro správné fungovánà mých webových stránek. Bez tÄchto cookies by web nefungoval správnÄ."},analytics:{title:"Analytické súbory cookie",description:"Tyto soubory cookie umožÅujà webu zapamatovat si volby, které jste provedli v minulosti."},marketing:{title:"Reklamné a marketingové súbory cookie",description:"Marketingové súbory cookie sa použÃvajú na sledovanie návÅ¡tevnÃkov webovej stránky. Zámerom je zobrazovaÅ¥ reklamu, ktorá je relevantná a zaujÃmavá pre konkrétneho použÃvateľa, a tým hodnotnejÅ¡ia pre vydavateľov a inzerentov tretÃch strán."},info:{title:"Viac informáciÃ",description:`ÄalÅ¡ie informácie o tom, ako nakladáme s osobnými údajmi nájdete v naÅ¡ich <a class="cc-link" href="${s}" target="_blank">Zásadách spracovania osobných údajov</a>.`}}}},hr:{consentModal:{title:"Koristimo cookies!",description:'Zdravo! NaÅ¡a web stranica koristi bitne cookies kako bi osigurala ispravno funkcioniranje i analitiÄke cookies koji nam daju do znanja kako korisnici stupaju u interakciju s naÅ¡om stranicom kako bismo je poboljÅ¡ali. <button type="button" data-cc="c-settings" class="cc-link">Pusti me da odluÄim</button>',primaryBtn:"Prihvatiti sve",secondaryBtn:"Odbaci sve"},settingsModal:{title:"Postavke cookies",saveSettingsBtn:"Spremi postavke",acceptAllBtn:"Prihvatiti sve",rejectAllBtn:"Odbaci sve",closeBtnLabel:"Zatvoriti",headers:{col1:"Naziv",col2:"Domena",col3:"Istek",col4:"Opis"},blocks:{intro:{title:"KoriÅ¡tenje cookies ð¢",description:'Cookies koristimo kako bismo osigurali osnovne funkcije web stranice i poboljÅ¡ali vaÅ¡e online iskustvo. Za svaku kategoriju možete odabrati želite li se prijaviti/odjaviti kad god želite, putem poveznice koja se stalno nalazi na web stranici. Dodatne pojedinosti o kolaÄiÄima možete pronaÄi u naÅ¡em <a href="${cookiePolicyDocument}" class="cc-link" target="_blank">Politika cookies</a>.'},necessary:{title:"Neophodni cookies",description:"Ovi su cookies neophodni za ispravno funkcioniranje moje web stranice. Bez ovih cookies web stranica ne bi ispravno radila"},analytics:{title:"AnalitiÄki cookies",description:"Ovi cookies omoguÄuju web stranici da zapamti odabire koje ste napravili u proÅ¡losti"},marketing:{title:"OglaÅ¡ivaÄki i marketinÅ¡ki cookies",description:"MarketinÅ¡ki kolaÄiÄi koriste se za praÄenje posjetitelja web stranice. Namjera je prikazati oglaÅ¡avanje koje je relevantno i zanimljivo pojedinaÄnom korisniku i stoga vrednije izdavaÄima i oglaÅ¡ivaÄima treÄih strana."},info:{title:"ViÅ¡e informacija",description:'Za viÅ¡e informacija o tome kako postupamo s osobnim podacima pogledajte naÅ¡e <a class="cc-link" href="${privacyPolicyDocument}" target="_blank">Politika privatnosti</a>.'}}}}},v={necessary:[{name:"_dc_gtm_UA-T2SX74V",domain:"google.com",expiration:{cs:"nÄkolik sekund",en:"few seconds",pl:"kilka sekund",es:"unos segundos"},description:{cs:"Tento soubor cookie se použÃvá k naÄtenà dalÅ¡Ãch skriptů a kódu na stránce.",en:"This cookie is used to load additional scripts and code at page.",pl:"Ten plik cookie sÅuży do Åadowania dodatkowych skryptów i kodu w strona.",es:"Esta cookie se usa para cargar otros scripts y el código en la página."}},{name:"_ym_d",domain:"accolade.eu",expiration:{cs:"1 rok",en:"1 year",pl:"1 rok",es:"1 año"},description:{cs:"Sloužà k uloženà prvnà návÅ¡tÄvy webu.",en:"Used to save the first visit to the site.",pl:"SÅuży do zapisywania pierwszej wizyty na stronie.",es:"Sirve para guardar la primera visita a la página web"}},{name:"nette-samesite",domain:"360.accolade.eu",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"Obrana systému proti útoku CSRF.",en:"System defense against CSRF attack.",pl:"Obrona systemu przed atakiem CSRF.",es:"Defensa del Sistema contra ataques CSRF."}},{name:"_nss",domain:"accolade.eu",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"Tento soubor cookie se použÃvá k detekci útoku CSRF.",en:"This cookie is used to detect a CSRF attack.",pl:"Ten plik cookie sÅuży do wykrywania ataku CSRF.",es:"Esta cookie se utiliza para detectar un ataque CSRF."}}],analytics:[{name:"lang",domain:"linkedin.com",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"PoužÃvá se k zapamatovánà jazykového nastavenà uživatele. aby se zajistilo, že se LinkedIn.com zobrazà v jazyce zvoleném uživatelem ve svém nastavenÃ.",en:"Used to remember the user's language setting. To ensure that LinkedIn.com appears in the language selected by your settings.",pl:"SÅuży do zapamiÄtywania ustawieÅ jÄzykowych użytkownika. Do upewnij siÄ, że LinkedIn.com pojawia siÄ w jÄzyku wybranym przez Twoje ustawienia.",es:"Se utiliza para recordar la configuración de idioma del usuario para garantizar que LinkedIn.com se muestre en el idioma seleccionado por el usuario en su configuración."}},{name:"_ga",domain:"accolade.eu",expiration:{cs:"2 roky",en:"2 years",pl:"2 lata",es:"2 años"},description:{cs:"RozliÅ¡enà uživatelů pÅiÅazenÃm náhodnÄ generovaného ÄÃsla, sloužà k výpoÄtu poÄtu návÅ¡tÄvnÃků, relacà a kampanà pro základnà analýzy.",en:"Distinguish users by assigning a randomly generated number to calculating the number of visitors, sessions and campaigns for basic analysis",pl:"Wyróżnij użytkowników, przypisujÄ
c losowo wygenerowany numer do obliczanie liczby odwiedzajÄ
cych, sesji i kampanii do podstawowej analizy.",es:"La distinción de usuarios mediante la asignación de un número generado aleatoriamente se utiliza para calcular el número de visitantes, sesiones y campañas para los análisis básicos."}},{name:"_gclxxxx",domain:"accolade.eu",expiration:{cs:"3 mÄsÃce",en:"3 months",pl:"3 miesiÄ
ce",es:"3 meses"},description:{cs:"MÄÅenà interakce uživatelů.",en:"Measuring user interaction.",pl:"Mierzenie interakcji użytkownika.",es:"Medición de la interacción de usuarios."}},{name:"_gid",domain:"accolade.eu",expiration:{cs:"1 den",en:"1 day",pl:"1 dzieÅ",es:"1 dÃa"},description:{cs:"Ukládánà poÄtu zobrazených stránek.",en:"Saving the number of pages viewed.",pl:"Zapisywanie liczby przeglÄ
danych stron.",es:"Guardar el número de páginas mostradas."}},{name:"_ym_uid",domain:"accolade.eu",expiration:{cs:"1 rok",en:"1 year",pl:"1 rok",es:"1 año"},description:{cs:"Tyto soubory cookie se použÃvajà k identifikaci uživatelů webu.",en:"These cookies are used to identify website users.",pl:"Te pliki cookie sÅużÄ
do identyfikacji użytkowników serwisu.",es:"Estas cookies se utilizan para identificar a los usuarios de la página web."}},{name:"_ym_visorc",domain:"accolade.eu",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"Soubor cookie pro webovou analytiku obsahuje jedineÄný identifikátor, který
11je pÅiÅazen každému prohlÞeÄi za úÄelem sledovánà interakce uživatele s webovou stránkou.",en:"The web analytics cookie contains a unique one an identifier that is assigned to each browser for the purpose of monitoring user interaction with the website.",pl:"Plik cookie analityki internetowej zawiera unikalny plik identyfikator przypisany do każdej przeglÄ
darki w celu monitorowanie interakcji użytkownika ze stronÄ
internetowÄ
.",es:"La cookie de análisis web contiene un identificador único que se asigna a cada navegador para rastrear la interacción del usuario con la página web."}},{name:"_ym_isad",domain:"accolade.eu",expiration:{cs:"nÄkolik sekund",en:"few seconds",pl:"kilka sekund",es:"unos segundos"},description:{cs:"UrÄuje, zda má uživatel zapnuty blokátory reklam.",en:"Specifies whether the user has ad blockers enabled.",pl:"OkreÅla, czy użytkownik ma wÅÄ
czone blokowanie reklam.",es:"Determina si el usuario tiene bloqueadores de anuncios."}},{name:"yandexuid",domain:"yandex.ru",expiration:{cs:"1 rok",en:"1 year",pl:"1 rok",es:"1 año"},description:{cs:"Tento soubor cookie sloužà k identifikaci uživatelů, shromažÄuje informace o tom, jak návÅ¡tÄvnÃci použÃvajà webové stránky, použÃvá se k internà analýze pro optimalizaci stránek.",en:"This cookie is used to identify the users it collects information about how visitors use the website to internal analysis for site optimization.",pl:"Ten plik cookie sÅuży do identyfikacji gromadzonych użytkowników informacje o tym, jak odwiedzajÄ
cy korzystajÄ
ze strony internetowej do analizy wewnÄtrznej w celu optymalizacji witryny.",es:"Esta cookie se usa para identificar a los usuarios, recopila información sobre cómo los visitantes usan la página web y se utiliza para análisis internos para optimizar la página web."}},{name:"AnalyticsSyncHistory",domain:"linkedin.com",expiration:{cs:"1 mÄsÃc",en:"1 month",pl:"1 miesiÄ
c",es:"1 mes"},description:{cs:"PoužÃvá se k ukládánà informacà o Äase, kdy doÅ¡lo k synchronizaci se souborem cookie.",en:"Used to store information about when the synchronization occurred cookie.",pl:"SÅuży do przechowywania informacji o tym, kiedy nastÄ
piÅa synchronizacja ciastko.",es:"Se utiliza para almacenar información sobre la hora en que se sincronizó la cookie."}},{name:"metrika_enabled",domain:"mc.yandex.ru",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"Zjišťuje poÄet uživatelů, zdroje návÅ¡tÄvnosti a chovánà uživatelů na stránkách webu.",en:"Detects the number of users, traffic sources, and user behavior on web pages.",pl:"Wykrywa liczbÄ użytkowników, źródÅa ruchu i zachowanie użytkowników na strony internetowe.",es:"Detecta el número de usuarios, fuentes de tráfico y comportamiento de los usuarios en las páginas del sitio web."}},{name:"yabs-sid",domain:"mc.yandex.ru",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"Registruje údaje o chovánà návÅ¡tÄvnÃků webu.",en:"Registers data about the behavior of site visitors.",pl:"Rejestruje dane o zachowaniu odwiedzajÄ
cych witrynÄ.",es:"Registra datos sobre el comportamiento de los visitantes de la página web."}}],marketing:[{name:"_fbp",domain:"accolade.eu",expiration:{cs:"3 mÄsÃce",en:"3 months",pl:"3 miesiÄ
ce",es:"3 meses"},description:{cs:"PoužÃvá Facebook k poskytovánà Åady reklamnÃch produktů, jako jsou nabÃdky v reálném Äase od inzerentů tÅetÃch stran.",en:"It uses Facebook to provide a variety of promotional products such as real-time bids from third-party advertisers.",pl:"Wykorzystuje Facebooka do dostarczania różnych produktów promocyjnych, takich jak stawki w czasie rzeczywistym od reklamodawców zewnÄtrznych.",es:"Utiliza Facebook para proporcionar una variedad de productos publicitarios, como ofertas en tiempo real de anunciantes de terceros."}},{name:"metrika_enabled",domain:"accolade.eu",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"PoužÃvá se ke sledovánà návÅ¡tÄvnÃků na vÃce webových stránkách za úÄelem prezentace relevantnà reklamy na základÄ preferencà návÅ¡tÄvnÃka.",en:"Used to track visitors to multiple websites behind to present relevant advertising based on preferences visitor.",pl:"PoužÃvá se ke sledovánà návÅ¡tÄvnÃků na vÃce webových stránkách za úÄelem prezentace relevantnà reklamy na základÄ preferencà návÅ¡tÄvnÃka.",es:"Se utiliza para rastrear a los visitantes a través de múltiples sitios web para presentar publicidad relevante basada en las preferencias del visitante."}},{name:"sid",domain:"seznam.cz",expiration:{cs:"29 dnÃ",en:"29 days",pl:"29 dni",es:"29 dÃas"},description:{cs:"Uloženà informacà o uživateli napÅÃÄ webem.",en:"Store user information across the web.",pl:"Przechowuj informacje o użytkownikach w sieci.",es:"Almacenamiento de información del usuario en toda la página web."}},{name:"VISITOR_INFO1_ŽIVÄ",domain:"youtube.com",expiration:{cs:"6 mÄsÃců",en:"6 months",pl:"6 miesiÄcy",es:"6 meses"},description:{cs:"Tento soubor cookie nastavuje Youtube, aby sledoval uživatelské preference pro videa YouTube vložená do stránek; může také urÄit, zda návÅ¡tÄvnÃk webu použÃvá novou nebo starou verzi rozhranà Youtube.",en:"This cookie sets Youtube to follow the user preferences for YouTube videos embedded on the site;
11 may also determine whether the site visitor uses a new or old version of the interface Youtube.",pl:"Ten plik cookie pozwala YouTube ÅledziÄ użytkownika preferencje dotyczÄ
ce osadzonych w serwisie filmów z YouTube; może również okreÅliÄ czy odwiedzajÄ
cy witrynÄ używa nowej czy starej wersji interfejsu Youtube.",es:"Esta cookie configura a Youtube para rastrear las preferencias del usuario para los vÃdeos de YouTube incrustados en las páginas; también puede determinar si un visitante del sitio web está utilizando una versión nueva o antigua de la interfaz de Youtube."}},{name:"li_gc",domain:"linkedin.com",expiration:{cs:"2 roky",en:"2 years",pl:"2 lata",es:"2 años"},description:{cs:"Sloužà k uloženà preferencà uživatelů.",en:"Used to store user preferences.",pl:"SÅuży do przechowywania preferencji użytkownika.",es:"Se utiliza para almacenar las preferencias del usuario"}},{name:"IDE",domain:"doubleclick.net",expiration:{cs:"1 rok",en:"1 year",pl:"1 rok",es:"1 año"},description:{cs:"Zobrazovánà reklam Google na webech tÅetÃch stran.",en:"Display Google ads on third-party sites.",pl:"WyÅwietlaj reklamy Google w witrynach innych firm.",es:"Visualización de anuncios de Google en sitios web de terceros."}},{name:"lidc",domain:"linkedin.com",expiration:{cs:"1 den",en:"1 day",pl:"1 dzieÅ",es:"1 dÃa"},description:{cs:"Ukládá akce uživatele na webu.",en:"Stores user actions on the web.",pl:"Przechowuje dziaÅania użytkownika w sieci.",es:"Almacena las acciones del usuario en la página web"}},{name:"bcookie",domain:"linkedin.com",expiration:{cs:"2 roky",en:"2 years",pl:"2 lata",es:"2 años"},description:{cs:"Toto je soubor cookie prvnà strany Microsoft MSN pro sdÃlenà obsahu webových stránek prostÅednictvÃm sociálnÃch médiÃ.",en:"This is a first-party Microsoft MSN content sharing cookie websites through social media.",pl:"To jest plik cookie udostÄpniania treÅci Microsoft MSN wÅasnej firmy strony internetowe za poÅrednictwem mediów spoÅecznoÅciowych.",es:"Esta es una cookie propia de Microsoft MSN para compartir contenido de la página web a través de las redes sociales."}},{name:"YSC",domain:"youtube.com",expiration:{cs:"relace",en:"session",pl:"sesja",es:"sesión"},description:{cs:"Zapamatovánà uživatelského vstupu a pÅidruženà akcà uživatele.",en:"Remember user input and associate user actions.",pl:"ZapamiÄtaj dane wprowadzone przez użytkownika i powiÄ
ż dziaÅania użytkownika.",es:"Recordar la entrada del usuario y asociar las acciones del usuario."}},{name:"CONSENT",domain:"youtube.com",expiration:{cs:"17 let",en:"17 years",pl:"17 lat",es:"17 años"},description:{cs:"Tento soubor cookie poskytuje informace o tom, jak koncový uživatel použÃvá webovou stránku, a jakoukoli reklamu, kterou koncový uživatel mohl vidÄt pÅed návÅ¡tÄvou uvedené webové stránky.",en:"This cookie provides information about how the end user uses the website, and any advertising you end up the user could see before visiting that website.",pl:"Ten plik cookie dostarcza informacji o tym, w jaki sposób użytkownik koÅcowy korzysta z witryny, a wszelkie reklamy, które wylÄ
dujesz, użytkownik mógÅ zobaczyÄ przed odwiedzeniem tej witryny.",es:"Esta cookie proporciona información sobre el uso que el usuario final hace del sitio web y de la publicidad que el usuario final pudo haber visto antes de visitar dicho sitio web."}},{name:"UserMatchHistory",domain:"linkedin.com",expiration:{cs:"1 mÄsÃc",en:"1 month",pl:"1 miesiÄ
c",es:"1 mes"},description:{cs:"Tento soubor cookie se použÃvá ke sledovánà návÅ¡tÄvnÃků, aby mohly být prezentovány relevantnÄjšà reklamy na základÄ preferencà návÅ¡tÄvnÃka.",en:"This cookie is used to track visitors so they can be presented with more relevant ads based on preferences visitor.",pl:"Ten plik cookie sÅuży do Åledzenia odwiedzajÄ
cych, aby mogli otrzymywaÄ trafniejsze reklamy na podstawie preferencji goÅÄ.",es:"Esta cookie se utiliza para realizar un seguimiento de los visitantes, de modo que se puedan presentar anuncios más relevantes en función de las preferencias del visitante."}},{name:"bscookie",domain:"www.linkedin.com",expiration:{cs:"2 roky",en:"2 years",pl:"2 lata",es:"2 años"},description:{cs:"PoužÃvá se službou sociálnÃch sÃtà LinkedIn ke sledovánà použÃvánà vestavÄných služeb.",en:"Used by LinkedIn social networking services to monitor usage embedded services.",pl:"Używane przez serwisy spoÅecznoÅciowe LinkedIn do monitorowania użytkowania usÅugi wbudowane.",es:"Utilizada por el servicio de red social LinkedIn para rastrear el uso de los servicios incorporados."}},{name:"ymex",domain:"yandex.ru",expiration:{cs:"1 rok",en:"1 year",pl:"1 rok",es:"1 año"},description:{cs:"Zaznamenává údaje o chovánà návÅ¡tÄvnÃků na webových stránkách.",en:"Records data about visitor behavior on the website.",pl:"Zaznamenává údaje o chovánà návÅ¡tÄvnÃků na webových stránkách.",es:"Registra datos sobre el comportamiento de los visitantes en los sitios web."}},{name:"C",domain:"adform.net",expiration:{cs:"1 mÄsÃc",en:"1 month",pl:"1 miesiÄ
c",es:"1 mes"}
11,description:{cs:"Identifikuje, zda prohlÞeÄ uživatele pÅijÃmá soubory cookie.",en:"Identifies whether the user's browser accepts cookies.",pl:"OkreÅla, czy przeglÄ
darka użytkownika akceptuje pliki cookie.",es:"Identifica si el navegador del usuario acepta cookies."}},{name:"testovacÃ_cookie",domain:"doubleclick.net",expiration:{cs:"nÄkolik sekund",en:"few seconds",pl:"kilka sekund",es:"unos segundos"},description:{cs:"Tento soubor cookie nastavuje spoleÄnost DoubleClick (která je ve vlastnictvà spoleÄnosti Google), aby zjistila, zda prohlÞeÄ návÅ¡tÄvnÃka webové stránky podporuje soubory cookie.",en:"This cookie is set by DoubleClick (which is in owned by Google) to determine if the visitor's browser The website supports cookies.",pl:"Ten plik cookie jest ustawiany przez firmÄ DoubleClick (która jest in należÄ
ce do Google) w celu ustalenia, czy przeglÄ
darka odwiedzajÄ
cego Serwis obsÅuguje pliki cookies.",es:"Esta cookie la establece la empresa DoubleClick (que es propiedad de Google) para determinar si el navegador del visitante del sitio web admite cookies."}}]}},{"vanilla-cookieconsent":403}],33:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e={root:null,rootMargin:"0px",threshold:.1};function t(e){const t=parseFloat(e.dataset.counterMax),i=parseInt(e.dataset.counterRound),n=parseInt(e.dataset.decimals);let s=4e3;e.hasAttribute("data-counter-duration")&&(s=parseInt(e.dataset.counterDuration)),function(e,t,i,n,s){e.style.visibility="visible",(0,r.default)({targets:e,innerHTML:[0,t],easing:"easeInQuad",round:i,duration:n,autoplay:!0,loop:!1,update(t){const i=t.animations[0].currentValue,n=new Intl.NumberFormat(o,{minimumFractionDigits:s,maximumFractionDigits:s,trailingZeroDisplay:"auto"}).format(i);e.innerHTML=n}})}(e,t,i,s,n)}const i=new IntersectionObserver((e,i)=>{e.forEach(e=>{e.isIntersecting&&(e.target.querySelectorAll(".js-counter").forEach(t),i.unobserve(e.target))})},{...e,threshold:.3}),n=new IntersectionObserver((e,i)=>{e.forEach(e=>{e.isIntersecting&&(t(e.target),i.unobserve(e.target))})},e);document.querySelectorAll("[data-counter-group]").forEach(e=>{i.observe(e)}),document.querySelectorAll(".js-counter:not([data-counter-group] .js-counter)").forEach(e=>{n.observe(e)})};var n,r=(n=e("animejs"))&&n.__esModule?n:{default:n};const o=document.querySelector("html").getAttribute("lang")},{animejs:60}],34:[function(e,t,i){"use strict";function n(e){const t=e.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,n=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+n,left:t.left+i}}function r(e){return e.getBoundingClientRect().height}Object.defineProperty(i,"__esModule",{value:!0}),i.getElementPositionData=function(e){let t;t=e?"string"==typeof e||e instanceof String?document.querySelector(e):e:document.documentElement;const i=n(t).top,o=r(t),s=document.documentElement.scrollTop,a=(s-i)/o,l=(s+window.innerHeight-i)/o,c=s+window.innerHeight,u=i+o;return{realTop:a,top:a>0?a:0,realBottom:l,bottom:l>0?l:0,topTouch:a>=0&&a<=1,bottomTouch:l>=0&&l<=1,topOffset:i,bottomOffset:i+o,windowTop:s,windowBottom:s+window.innerHeight,visible:s<i&&c>i||s>i&&s<u}},i.getHeight=r,i.getOffset=n},{}],35:[function(e,t,i){"use strict";function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};r(`${location.origin}/dist/front/polyfill/${e}.js`,t)}function r(e,t){const i=document.createElement("script");i.src=e,i.onload=function(){t()},i.onerror=function(){t(new Error(`Failed to load script ${e}`))},document.head.appendChild(i)}Object.defineProperty(i,"__esModule",{value:!0}),i.conditionallyPolyfillDialog=function(){"function"!=typeof HTMLDialogElement&&n("dialog")},i.loadPolyfill=n,i.loadScript=r},{}],36:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.leaseDetailMapStyle=void 0;i.leaseDetailMapStyle=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#36383a"},{lightness:55}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#36383a"},{lightness:70}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#40bfef"},{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#FA7308"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#FA7308"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#FA7308"}]}]},{}],37:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.citiesEn=i.cities=void 0;i.cities="undefined"!=typeof google?[{name:"Praha",coords:new google.maps.LatLng(50.078196,14.440257)},{name:"PlzeÅ",coords:new google.maps.LatLng(49.739559,13.371627)}
11,{name:"Äeské BudÄjovice",coords:new google.maps.LatLng(48.973554,14.479836)},{name:"Brno",coords:new google.maps.LatLng(49.192047,16.605787)},{name:"Liberec",coords:new google.maps.LatLng(50.75532,15.054188)},{name:"Ostrava",coords:new google.maps.LatLng(49.8163,18.260316)},{name:"Hradec Králové",coords:new google.maps.LatLng(50.212776,15.823433)},{name:"Cheb",coords:new google.maps.LatLng(50.0900727,12.3716315)},{name:"Karlovy Vary",coords:new google.maps.LatLng(50.241259,12.869521)},{name:"Mnichov",coords:new google.maps.LatLng(48.139031,11.579269)},{name:"Norimberk",coords:new google.maps.LatLng(49.446353,11.076052)},{name:"DrážÄany",coords:new google.maps.LatLng(51.0479,13.739145)},{name:"BerlÃn",coords:new google.maps.LatLng(52.527179,13.405552)},{name:"VÃdeÅ",coords:new google.maps.LatLng(48.206903,16.373968)},{name:"Linec",coords:new google.maps.LatLng(48.304781,14.281941)},{name:"Bratislava",coords:new google.maps.LatLng(48.142804,17.10335)},{name:"Krakov",coords:new google.maps.LatLng(50.06731,19.936067)},{name:"Vratislav",coords:new google.maps.LatLng(51.113261,17.031505)},{name:"PoznaÅ",coords:new google.maps.LatLng(52.403169,16.928072)},{name:"Å tÄtÃn",coords:new google.maps.LatLng(53.485948,14.553339)},{name:"Bydgoszcz",coords:new google.maps.LatLng(53.125042,18.00801)},{name:"BiaÅystok",coords:new google.maps.LatLng(53.145846,23.155985)},{name:"GdaÅsk",coords:new google.maps.LatLng(54.349737,18.637936)},{name:"Lodž",coords:new google.maps.LatLng(51.764052,19.45414)},{name:"Lublin",coords:new google.maps.LatLng(51.249419,22.576707)},{name:"Warszawa",coords:new google.maps.LatLng(52.240697,21.024163)},{name:"Alsdorf",coords:new google.maps.LatLng(50.871915,6.174262)},{name:"Madrid",coords:new google.maps.LatLng(40.43003,-3.70564)},{name:"Barcelona",coords:new google.maps.LatLng(41.38279,2.1831)},{name:"Sevilla",coords:new google.maps.LatLng(37.39064,-5.98458)},{name:"Vitoria-Gasteiz",coords:new google.maps.LatLng(42.84981,-2.67252)},{name:"Valencie",coords:new google.maps.LatLng(39.47431,-.37696)}]:[],i.citiesEn="undefined"!=typeof google?[{name:"Prague",coords:new google.maps.LatLng(50.078196,14.440257)},{name:"Pilsen",coords:new google.maps.LatLng(49.739559,13.371627)},{name:"Czech Budejovice",coords:new google.maps.LatLng(48.973554,14.479836)},{name:"Brno",coords:new google.maps.LatLng(49.192047,16.605787)},{name:"Liberec",coords:new google.maps.LatLng(50.75532,15.054188)},{name:"Ostrava",coords:new google.maps.LatLng(49.8163,18.260316)},{name:"Hradec Králové",coords:new google.maps.LatLng(50.212776,15.823433)},{name:"Cheb",coords:new google.maps.LatLng(50.0900727,12.3716315)},{name:"Carlsbad",coords:new google.maps.LatLng(50.241259,12.869521)},{name:"Munich",coords:new google.maps.LatLng(48.139031,11.579269)},{name:"Nuremberg",coords:new google.maps.LatLng(49.446353,11.076052)},{name:"Dresden",coords:new google.maps.LatLng(51.0479,13.739145)},{name:"Berlin",coords:new google.maps.LatLng(52.527179,13.405552)},{name:"Vienna",coords:new google.maps.LatLng(48.206903,16.373968)},{name:"Linz",coords:new google.maps.LatLng(48.304781,14.281941)},{name:"Bratislava",coords:new google.maps.LatLng(48.142804,17.10335)},{name:"Kraków",coords:new google.maps.LatLng(50.06731,19.936067)},{name:"WrocÅaw",coords:new google.maps.LatLng(51.113261,17.031505)},{name:"Poznan",coords:new google.maps.LatLng(52.403169,16.928072)},{name:"Szczecin",coords:new google.maps.LatLng(53.485948,14.553339)},{name:"Bydgoszcz",coords:new google.maps.LatLng(53.125042,18.00801)},{name:"BiaÅystok",coords:new google.maps.LatLng(53.145846,23.155985)},{name:"GdaÅsk",coords:new google.maps.LatLng(54.349737,18.637936)},{name:"Åódź",coords:new google.maps.LatLng(51.764052,19.45414)},{name:"Lublin",coords:new google.maps.LatLng(51.249419,22.576707)},{name:"Warsaw",coords:new google.maps.LatLng(52.240697,21.024163)},{name:"Alsdorf",coords:new google.maps.LatLng(50.871915,6.174262)},{name:"Madrid",coords:new google.maps.LatLng(40.43003,-3.70564)},{name:"Barcelona",coords:new google.maps.LatLng(41.38279,2.1831)},{name:"Seville",coords:new google.maps.LatLng(37.39064,-5.98458)},{name:"Vitoria-Gasteiz",coords:new google.maps.LatLng(42.84981,-2.67252)},{name:"Valencia",coords:new google.maps.LatLng(39.47431,-.37696)}]:[]},{}],38:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.colors=void 0,i.getClusterStyle=function(e){const t=(void 0===e?n.blue:e)===n.blue?"pin_cluster_acc_symbol":"pin_cluster_acc_symbol_orange";return{textColor:"white",url:`${window.location.origin}/dist/front/images/${t}.svg`,height:58,width:34,textSize:16,textLineHeight:58,fontWeight:400}},i.getSymbolStyle=function(e){const t=void 0===e?n.blue:e;return{path:t===n.blue?"M15.88,6.6h-3.01c-0.12-0.4-0.27-0.77-0.43-1.06L9.53,0.5c-0.39-0.67-1.02-0.67-1.41,0L5.21,5.54C4.82,6.21,4.5,7.4,4.5,8.18v5.82c0,0.78,0.63,1.41,1.41,1.41h3.01c0.12,0.4,0.27,0.77,0.43,1.06l2.91,5.03c0.39,0.67,1.02,0.67,1.41,0l2.91-5.03c0.39-0.67,0.71-1.86,0.71-2.64V8.01C17.29,7.23,16.65,6.6,15.88,6.6z":"M30 17.5h-7.9c-.3-1-.7-1.9-1.1-2.8L13.3 1.4c-1-1.8-2.7-1.8-3.7 0L1.9 14.7C.8 16.9.1 19.3 0 21.7V37c0 2 1.7 3.7 3.7 3.7h7.9c.3 1 .7 1.9 1.1 2.8l7.7 13.3c1 1.8 2.7 1.8 3.7 0l7.7-13.3c1.1-2.2 1.8-4.6 1.9-7V21.2c0-2-1.7-3.7-3.7-3.7z",anchor:void 0!==google?new google.maps.Point(11,11):null,fillColor:t,fillOpacity:1,strokeWeight:0,scale:1}},i.symbolStyleWhite=i.symbolStyleDark=i.mapStylesLight=i.mapStylesDark=i.mapBgColorLight=i.mapBgColorDark=void 0;
11const n=i.colors={blue:"#41c0f0",orange:"#FA7308"};i.mapStylesDark=[{elementType:"geometry",stylers:[{color:"#36383a"}]},{elementType:"labels",stylers:[{visibility:"off"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#2C2E30"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"administrative.country",stylers:[{color:"#5b5b5b"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"off"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.business",stylers:[{visibility:"off"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#2c2e30"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],i.mapStylesLight=[{elementType:"geometry",stylers:[{color:"#edf4f7"}]},{elementType:"labels",stylers:[{visibility:"off"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#cad7db"}]},{featureType:"administrative.country",stylers:[{color:"#cad7db"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"off"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.business",stylers:[{visibility:"off"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#d9e0e3"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}];i.symbolStyleWhite="undefined"!=typeof google?{path:"M15.88,6.6h-3.01c-0.12-0.4-0.27-0.77-0.43-1.06L9.53,0.5c-0.39-0.67-1.02-0.67-1.41,0L5.21,5.54C4.82,6.21,4.5,7.4,4.5,8.18v5.82c0,0.78,0.63,1.41,1.41,1.41h3.01c0.12,0.4,0.27,0.77,0.43,1.06l2.91,5.03c0.39,0.67,1.02,0.67,1.41,0l2.91-5.03c0.39-0.67,0.71-1.86,0.71-2.64V8.01C17.29,7.23,16.65,6.6,15.88,6.6z",anchor:void 0!==google?new google.maps.Point(11,11):null,fillColor:"#ffffff",fillOpacity:1,strokeWeight:0,scale:1.5}:{},i.symbolStyleDark="undefined"!=typeof google?{path:"M15.88,6.6h-3.01c-0.12-0.4-0.27-0.77-0.43-1.06L9.53,0.5c-0.39-0.67-1.02-0.67-1.41,0L5.21,5.54C4.82,6.21,4.5,7.4,4.5,8.18v5.82c0,0.78,0.63,1.41,1.41,1.41h3.01c0.12,0.4,0.27,0.77,0.43,1.06l2.91,5.03c0.39,0.67,1.02,0.67,1.41,0l2.91-5.03c0.39-0.67,0.71-1.86,0.71-2.64V8.01C17.29,7.23,16.65,6.6,15.88,6.6z",anchor:new google.maps.Point(11,11),fillColor:"#000000",fillOpacity:1,strokeWeight:0,scale:1.5}:{};i.mapBgColorDark="#36383a",i.mapBgColorLight="#edf4f7"},{}],39:[function(e,t,i){"use strict"; 12/**! 13 * NetteForms - simple form validation. 14 * 15 * This file is part of the Nette Framework (https://nette.org) 16 * Copyright (c) 2004 David Grudl (https://davidgrudl.com) 17 */!function(e,i){if(e.JSON)if("function"==typeof define&&define.amd)define(function(){return i(e)});else if("object"==typeof t&&"object"==typeof t.exports)t.exports=i(e);else{var n=!e.Nette||!e.Nette.noInit;e.Nette=i(e),n&&e.Nette.initOnLoad()}}("undefined"!=typeof window?window:void 0,function(e){var t={},i={},n={},r=new e.WeakMap;return t.formErrors=[],t.version="3.3.0",t.invalidNumberMessage="Please enter a valid value.",t.onDocumentReady=function(e){"loading"!==document.readyState?e.call(this):document.addEventListener("DOMContentLoaded",e)},t.getValue=function(e){var i;if(e){if(e.tagName){if("radio"===e.type){var n=e.form.elements;for(i=0;i<n.length;i++)if(n[i].name===e.name&&n[i].checked)return n[i].value;return null}if("file"===e.type)return e.files||e.value;if("select"===e.tagName.toLowerCase()){var r=e.selectedIndex,o=e.options,s=[];if("select-one"===e.type)return r<0?null:o[r].value;for(i=0;i<o.length;i++)o[i].selected&&s.push(o[i].value);return s}if(e.name&&"[]"===e.name.substr(-2)){for(n=e.form.elements[e.name].tagName?[e]:e.form.elements[e.name],s=[],i=0;i<n.length;i++)("checkbox"!==n[i].type||n[i].checked)&&s.push(n[i].value);return s}return"checkbox"===e.type?e.checked:"textarea"===e.tagName.toLowerCase()?e.value.replace("\r",""):e.value.replace("\r","").replace(/^\s+|\s+$/g,"")}return e[0]?t.getValue(e[0]):null}return null},t.getEffectiveValue=function(e,n){var r=t.getValue(e);if(e.getAttribute&&r===e.getAttribute("data-nette-empty-value")&&(r=""),n&&void 0===i[e.name]){i[e.name]=!0;var o={value:r};t.validateControl(e,null,!0,o),r=o.value,delete i[e.name]}return r},t.validateControl=function(e,i,n,r,o){e=e.tagName?e:e[0],i=i||JSON.parse(e.getAttribute("data-nette-rules")||"[]"),r=void 0===r?{value:t.getEffectiveValue(e)}:r,o=void 0===o?!t.validateRule(e,":filled",null,r):o;for(var s=0,a=i.length;s<a;s++){var l=i[s],c=l.op.match(/(~)?([^?]+)/),u=l.control?e.form.elements.namedItem(l.control):e;if(l.neg=c[1],l.op=c[2],l.condition=!!l.rules,u&&(!o||l.condition||":filled"===l.op)){u=u.tagName?u:u[0];var h=t.validateRule(u,l.op,l.arg,e===u?r:void 0);if(null!==h)if(l.neg&&(h=!h),l.condition&&h){if(!t.validateControl(e,l.rules,n,r,":blank"!==l.op&&o))return!1}else if(!l.condition&&!h){if(t.isDisabled(u))continue;if(!n){var d=Array.isArray(l.arg)?l.arg:[l.arg],f=l.msg.replace(/%(value|\d+)/g,function(i,n){return t.getValue("value"===n?u:e.form.elements.namedItem(d[n].control))});t.addError(u,f)}return!1}}}return!0},t.validateForm=function(e,i){var n=e.form||e,r=!1;if(t.formErrors=[],n["nette-submittedBy"]&&null!==n["nette-submittedBy"].getAttribute("formnovalidate")){var o=JSON.parse(n["nette-submittedBy"].getAttribute("data-nette-validation-scope")||"[]");if(!o.length)return t.showFormErrors(n,[]),!0;r=new RegExp("^("+o.join("-|")+"-)")}var s,a,l={};for(s=0;s<n.elements.length;s++)if(!(a=n.elements[s]).tagName||a.tagName.toLowerCase()in{input:1,select:1,textarea:1,button:1}){if("radio"===a.type){if(l[a.name])continue;l[a.name]=!0}else if("number"===a.type&&a.validity.badInput&&!t.isDisabled(a)){if(i)return!1;t.addError(a,t.invalidNumberMessage);continue}if(!(r&&!a.name.replace(/]\[|\[|]|$/g,"-").match(r)||t.isDisabled(a)||t.validateControl(a,null,i)||t.formErrors.length))return!1}var c=!t.formErrors.length;return t.showFormErrors(n,t.formErrors),c},t.isDisabled=function(e){if("radio"===e.type){for(var t=0,i=e.form.elements;t<i.length;t++)if(i[t].name===e.name&&!i[t].disabled)return!1;return!0}return e.disabled},t.addError=function(e,i){t.formErrors.push({element:e,message:i})},t.showFormErrors=function(e,i){for(var n,r=[],o=0;o<i.length;o++){var s=i[o].element,a=i[o].message;r.indexOf(a)<0&&(r.push(a),!n&&s.focus&&(n=s))}r.length&&t.showModal(r.join("\n"),function(){n&&n.focus()})},t.showModal=function(e,t){var i=document.createElement("dialog");if(!i.showModal)return alert(e),void t();var n=document.createElement("style");n.innerText=".netteFormsModal { text-align: center; margin: auto; border: 2px solid black; padding: 1rem } .netteFormsModal button { padding: .1em 2em }";var r=document.createElement("button");r.innerText="OK",r.onclick=function(){i.remove(),t()},i.setAttribute("class","netteFormsModal"),i.innerText=e+"\n\n",i.append(n,r),document.body.append(i),i.showModal()},t.validateRule=function(e,i,n,r){if("number"===e.type&&e.validity.badInput)return"filled"===i;r=void 0===r?{value:t.getEffectiveValue(e,!0)}:r,":"===i.charAt(0)&&(i=i.substr(1)),i=(i=i.replace("::","_")).replace(/\\/g,"");for(var o=Array.isArray(n)?n.slice(0):[n],s=0,a=o.length;s<a;s++)if(o[s]&&o[s].control){var l=e.form.elements.namedItem(o[s].control);o[s]=l===e?r.value:t.getEffectiveValue(l,!0)}return t.validators[i]?t.validators[i](e,Array.isArray(n)?o:o[0],r.value,r):null},t.validators={filled:function(e,t,i){return""!==i&&!1!==i&&null!==i&&(!Array.isArray(i)||!!i.length)&&(!(i instanceof FileList)||i.length)},blank:function(e,i,n){return!t.validators.filled(e,i,n)},valid:function(e){return t.validateControl(e,null,!0)},equal:function(e,t,i){if(void 0===t)return null;var n=function(e){return"number"==typeof e||"string"==typeof e?""+e:!0===e?"1":""};i=Array.isArray(i)?i:[i],t=Array.isArray(t)?t:[t];e:for(var r=0,o=i.length;r<o;r++){for(var s=0,a=t.length;s<a;s++)if(n(i[r])===n(t[s]))continue e;return!1}return i.length>0},notEqual:function(e,i,n){return void 0===i?null:!t.validators.equal(e,i,n)},minLength:function(e,t,i){return i.length>=t},maxLength:function(e,t,i){return i.length<=t},length:function(e,t,i){return(null===(t=Array.isArray(t)?t:[t,t])[0]||i.length>=t[0])&&(null===t[1]||i.length<=t[1])},email:function(e,t,i){return/^("([ !#-[\]-~]|\\[ -~])+"|[-a-z0-9!#$%&'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*)@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?$/i.test(i)},url:function(e,t,i,n){return/^[a-z\d+.-]+:/.test(i)||(i="https://"+i),!!/^https?:\/\/((([-_0-9a-z\u00C0-\u02FF\u0370-\u1EFF]+\.)*[0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)?[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[[0-9a-f:]{3,39}\])(:\d{1,5})?(\/\S*)?$/i.test(i)&&(n.value=i,!0)},regexp:function(e,t,i){var n="string"==typeof t&&t.match(/^\/(.*)\/([imu]*)$/);try{return n&&new RegExp(n[1],n[2].replace("u","")).test(i)}catch(e){}},pattern:function(e,t,i,n,r){if("string"!=typeof t)return null;try{try{var o=new RegExp("^(?:"+t+")$",r?"ui":"u")}catch(e){o=new RegExp("^(?:"+t+")$",r?"i":"")}if(i instanceof FileList){for(var s=0;s<i.length;s++)if(!o.test(i[s].name))return!1;return!0}return o.test(i)}catch(e){}},patternCaseInsensitive:function(e,i,n){return t.validators.pattern(e,i,n,null,!0)},numeric:function(e,t,i){return/^[0-9]+$/.test(i)},integer:function(e,t,i){return/^-?[0-9]+$/.test(i)},float:function(e,t,i,n){return i=i.replace(/ +/g,"").replace(/,/g,"."),!!/^-?[0-9]*\.?[0-9]+$/.test(i)&&(n.value=i,!0)},min:function(e,t,i){return Number.isFinite(t)&&(i=parseFloat(i)),i>=t},max:function(e,t,i){return Number.isFinite(t)&&(i=parseFloat(i)),i<=t},range:function(e,i,n){return Array.isArray(i)?"time"===e.type&&i[0]>i[1]?n>=i[0]||n<=i[1]:(null===i[0]||t.validators.min(e,i[0],n))&&(null===i[1]||t.validators.max(e,i[1],n)):null},submitted:function(e){return e.form["nette-submittedBy"]===e},fileSize:function(e,t,i){for(var n=0;n<i.length;n++)if(i[n].size>t)return!1;return!0},mimeType:function(e,t,i){for(var n=0,r=(t=Array.isArray(t)?t:[t]).length,o=[];n<r;n++)o.push("^"+t[n].replace(/([^\w])/g,"\\$1").replace("\\*",".*")+"$");if(o=new RegExp(o.join("|")),i instanceof FileList)for(n=0;n<i.length;n++){if(i[n].type&&!o.test(i[n].type))return!1;if(e.validity.badInput)return null}return!0},image:function(e,i,n){return t.validators.mimeType(e,i||["image/gif","
17image/png","image/jpeg","image/webp"],n)},static:function(e,t){return t}},t.toggleForm=function(e,i){var r;for(n={},r=0;r<e.elements.length;r++)e.elements[r].tagName.toLowerCase()in{input:1,select:1,textarea:1,button:1}&&t.toggleControl(e.elements[r],null,null,!i);for(r in n)t.toggle(r,n[r].state,n[r].elem,i)},t.toggleControl=function(e,i,o,s,a,l){i=i||JSON.parse(e.getAttribute("data-nette-rules")||"[]"),a=void 0===a?{value:t.getEffectiveValue(e)}:a,l=void 0===l?!t.validateRule(e,":filled",null,a):l;for(var c,u=!1,h=function(i){t.toggleForm(e.form,i)},d=0,f=i.length;d<f;d++){var p=i[d],m=p.op.match(/(~)?([^?]+)/),g=p.control?e.form.elements.namedItem(p.control):e;if(p.neg=m[1],p.op=m[2],p.condition=!!p.rules,g&&(!l||p.condition||":filled"===p.op)){if(c=o,!1!==o){if(null===(c=t.validateRule(g,p.op,p.arg,e===g?a:void 0)))continue;p.neg&&(c=!c),p.condition||(o=c)}if(p.condition&&t.toggleControl(e,p.rules,c,s,a,":blank"!==p.op&&l)||p.toggle){if(u=!0,s)for(var v=g.tagName?g.name:g[0].name,b=g.tagName?g.form.elements:g,y=0;y<b.length;y++)b[y].name!==v||r.has(b[y])||(b[y].addEventListener("change",h),r.set(b[y],null));for(var w in p.toggle||[])n[w]=n[w]||{elem:e},n[w].state=n[w].state||(p.toggle[w]?c:!c)}}}return u},t.toggle=function(e,t,i,n){/^\w[\w.:-]*$/.test(e)&&(e="#"+e);for(var r=document.querySelectorAll(e),o=0;o<r.length;o++)r[o].hidden=!t},t.compactCheckboxes=function(e){var t,i,n,r={};for(i=0;i<e.elements.length;i++)(n=e.elements[i]).tagName&&"input"===n.tagName.toLowerCase()&&"checkbox"===n.type&&(n.name&&"[]"===n.name.substr(-2)&&(t=n.name.substr(0,n.name.length-2),n.removeAttribute("name"),n.setAttribute("data-nette-name",t)),(t=n.getAttribute("data-nette-name"))&&(r[t]=r[t]||[],n.checked&&!n.disabled&&r[t].push(n.value)));for(t in r)void 0===e.elements[t]&&((n=document.createElement("input")).setAttribute("name",t),n.setAttribute("type","hidden"),e.append(n)),e.elements[t].value=r[t].join(","),e.elements[t].disabled=0===r[t].length},t.initForm=function(e){"get"===e.method&&e.hasAttribute("data-nette-compact")&&e.addEventListener("submit",function(i){t.compactCheckboxes(e)});e:{for(var i=0;i<e.elements.length;i++)if(e.elements[i].getAttribute("data-nette-rules"))break e;return}t.toggleForm(e),e.noValidate||(e.noValidate=!0,e.addEventListener("submit",function(i){t.validateForm(e)||(i.stopPropagation(),i.preventDefault())}),e.addEventListener("reset",function(){setTimeout(function(){t.toggleForm(e)})}))},t.initOnLoad=function(){console.log("Nette initOnLoad"),t.onDocumentReady(function(){for(var e=0;e<document.forms.length;e++)t.initForm(document.forms[e]);document.body.addEventListener("click",function(e){for(var t=e.target;t;){if(t.form&&t.type in{submit:1,image:1}){t.form["nette-submittedBy"]=t;break}t=t.parentNode}})})},t.webalize=function(e){e=e.toLowerCase();var i,n="";for(i=0;i<e.length;i++)n+=t.webalizeTable[e.charAt(i)]||e.charAt(i);return n.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")},t.webalizeTable={"á":"a","ä":"a","Ä":"c","Ä":"d","é":"e","Ä":"e","Ã":"i","ľ":"l","Å":"n","ó":"o","ô":"o","Å":"r","Å¡":"s","Å¥":"t","ú":"u","ů":"u","ý":"y","ž":"z"},t})},{}],40:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelectorAll("[data-slide-target]");Array.from(e).forEach(e=>{const t=e.dataset.slideTarget,i=document.querySelector(t);let n=0;e.hasAttribute("data-slide-offset")&&(n=parseInt(e.dataset.slideOffset)),e.addEventListener("click",t=>{t.preventDefault(),window.scrollTo({top:i.getBoundingClientRect().top+window.pageYOffset+n,behavior:"smooth"}),e.classList.contains("muralart-nav-link")&&document.querySelector(".page-header").classList.remove("is-active")})})}},{}],41:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){document.querySelectorAll("input[name='recaptcha_token']").forEach(e=>{const t=e.closest("form");if(!t||t.classList.contains("ajax"))return;t.querySelector("[type='submit']").addEventListener("click",async e=>{e.preventDefault(),await o(t),t.submit()})})},i.verifyRecaptcha=o;const{recaptchaPublicKey:n}=document.documentElement.dataset,r=5e3;function o(e){const t=e.querySelector('input[name="recaptcha_token"]');return t?n&&void 0!==window.grecaptcha?new Promise(e=>{const i=setTimeout(()=>{console.warn("reCAPTCHA timed out"),e()},r);window.grecaptcha.ready(()=>{new Promise(e=>e(window.grecaptcha.execute(n,{action:"submit"}))).then(e=>{t.value=e}).catch(e=>console.warn(e)).finally(()=>{clearTimeout(i),e()})})}):(console.warn("reCAPTCHA is not loaded"),Promise.resolve()):Promise.resolve()}},{}],42:[function(e,t,i){"use strict";e("scroll-behavior-polyfill");var n=W(e("alpinejs")),r=(e("../../admin/js/imports/ajax"),W(e("../../../app/modules/Front/components/BuildingCard/BuildingCard.js"))),o=W(e("../../../app/modules/Front/components/CardSlider/CardSli
17der.js")),s=W(e("./fond")),a=W(e("../../../app/modules/Front/components/Gallery/Gallery.js")),l=W(e("../../../app/modules/Front/components/ButtonScrollToTop/ButtonScrollToTop.js")),c=W(e("../../../app/modules/Front/components/Header/Header.js")),u=W(e("./utils/sectionTextImage.js")),h=W(e("../../../app/modules/Front/components/FlashMessage/FlashMessage.js")),d=W(e("../../../app/modules/Front/components/Youtube/Youtube.js")),f=W(e("../../../app/modules/Front/components/DownloadSlider/DownloadSlider.js")),p=W(e("./import/counters.js")),m=W(e("./lottie_animations.js")),g=W(e("./import/ajaxForm")),v=e("./import/initPolyfills.js"),b=W(e("./import/netteForms")),y=W(e("./import/ajaxElements.js")),w=W(e("../../../app/modules/Front/components/FondPopUp/FondPopUp.js")),_=W(e("../../../app/modules/Front/components/HpIntroSlider/HpIntroSlider.js")),k=W(e("../../../app/modules/Front/components/EarthAnimation/EarthAnimation")),x=W(e("./import/recaptcha.js")),C=W(e("./import/cookies.js")),S=W(e("./import/pageSliding.js")),E=W(e("./about_team")),T=W(e("./contact")),A=W(e("../../../app/modules/Front/components/TenantsPie/TenantsPie")),I=W(e("./glightbox")),M=W(e("../../../app/modules/Front/components/ArticleListFilter/ArticleListFilter")),P=W(e("./page/homepage")),D=W(e("./page/homepage-earth")),O=W(e("./page/parks-slider")),L=W(e("./map_park_list")),R=W(e("./page/lease")),B=e("./utils"),N=W(e("./page/lease-detail")),j=W(e("./page/ajaxLeaseFilter.js")),F=W(e("./page/dictionaryFromEmail.js")),z=W(e("./page/brochureFromEmail.js")),V=W(e("../../../app/modules/Front/components/ChartIframe/ChartIframe")),H=W(e("./temp-custom-lease-parks")),U=W(e("./page/christmas"));function W(e){return e&&e.__esModule?e:{default:e}}b.default.initOnLoad(),window.scrollPercent=B.scrollPercent,window.scrollToTarget=B.scrollToTarget,n.default.data("ajax",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{loading:!1,interactive:!1,state:e,getBody(){let e=null;return this.$el instanceof HTMLFormElement&&(e=new FormData(this.$el)),this.$root instanceof HTMLFormElement&&(e=new FormData(this.$root)),e&&this.$el instanceof HTMLButtonElement&&e.append(this.$el.name,this.$el.value),e},getUrl(){return this.$el instanceof HTMLFormElement?this.$el.action:this.$root instanceof HTMLFormElement?this.$root.action:this.$el instanceof HTMLAnchorElement?this.$el.href:e.url},request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.loading=!0,fetch(this.getUrl(),{method:e||this.getBody()?"POST":"GET",headers:{"X-Requested-With":"XMLHttpRequest"},body:e instanceof InputEvent||e instanceof PointerEvent||e instanceof MouseEvent||e instanceof SubmitEvent?this.getBody():e||this.getBody()}).then(e=>(e.redirected&&(location.href=e.url),e.json())).then(e=>{const{snippets:t,redirect:i,url:n}=e;i&&(location.href=i),n&&window.history.pushState(t,"",n),t&&((0,B.applySnippets)(e),this.interactive=!0,this.loading=!1)}).catch(e=>{console.warn(e),this.loading=!1})}}}),window.addEventListener("DOMContentLoaded",()=>{(0,g.default)(),(0,y.default)(),(0,x.default)(),console.log("DOMContentLoaded"),(0,C.default)(),(0,w.default)(),(0,I.default)(),(0,o.default)(),(0,r.default)(),(0,h.default)(),(0,a.default)(),(0,l.default)(),(0,c.default)(),(0,u.default)(),(0,d.default)(),(0,_.default)(),(0,f.default)(),(0,v.conditionallyPolyfillDialog)(),(0,p.default)(),(0,S.default)(),function(){const e=document.querySelectorAll(".form-field-upload");Array.from(e).forEach(e=>{const t=e.querySelector("input"),i=e.querySelector(".form-field-upload-text-filename"),n=i.innerHTML;t.addEventListener("change",e=>{i.innerHTML=function(e){return[...e.target.files].map(e=>e.name).join(", ")}(e)||n})})}(),(0,m.default)(),(0,s.default)(),(0,P.default)(),(0,E.default)(),(0,T.default)(),(0,M.default)(),(0,D.default)(),(0,E.default)(),(0,k.default)(),(0,A.default)(),(0,O.default)(),(0,L.default)(),(0,R.default)(),(0,N.default)(),(0,j.default)(),(0,z.default)(),(0,F.default)(),(0,V.default)(),(0,H.default)(),(0,U.default)(),window.Alpine=n.default,n.default.start()})},{"../../../app/modules/Front/components/ArticleListFilter/ArticleListFilter":4,"../../../app/modules/Front/components/BuildingCard/BuildingCard.js":5,"../../../app/modules/Front/components/ButtonScrollToTop/ButtonScrollToTop.js":6,"../../../app/modules/Front/components/CardSlider/CardSli
17der.js":7,"../../../app/modules/Front/components/ChartIframe/ChartIframe":8,"../../../app/modules/Front/components/DownloadSlider/DownloadSlider.js":9,"../../../app/modules/Front/components/EarthAnimation/EarthAnimation":10,"../../../app/modules/Front/components/FlashMessage/FlashMessage.js":11,"../../../app/modules/Front/components/FondPopUp/FondPopUp.js":12,"../../../app/modules/Front/components/Gallery/Gallery.js":13,"../../../app/modules/Front/components/Header/Header.js":14,"../../../app/modules/Front/components/HpIntroSlider/HpIntroSlider.js":15,"../../../app/modules/Front/components/TenantsPie/TenantsPie":16,"../../../app/modules/Front/components/Youtube/Youtube.js":17,"../../admin/js/imports/ajax":19,"./about_team":26,"./contact":27,"./fond":28,"./glightbox":29,"./import/ajaxElements.js":30,"./import/ajaxForm":31,"./import/cookies.js":32,"./import/counters.js":33,"./import/initPolyfills.js":35,"./import/netteForms":39,"./import/pageSliding.js":40,"./import/recaptcha.js":41,"./lottie_animations.js":43,"./map_park_list":44,"./page/ajaxLeaseFilter.js":45,"./page/brochureFromEmail.js":46,"./page/christmas":47,"./page/dictionaryFromEmail.js":48,"./page/homepage":50,"./page/homepage-earth":49,"./page/lease":52,"./page/lease-detail":51,"./page/parks-slider":53,"./temp-custom-lease-parks":54,"./utils":55,"./utils/sectionTextImage.js":56,alpinejs:58,"scroll-behavior-polyfill":297}],43:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=new IntersectionObserver((e,t)=>{Array.from(e).forEach(e=>{const t=e.target.id,{animationData:i,animationLoop:n}=e.target.dataset;e.isIntersecting&&"false"===e.target.dataset.animationLoaded&&(e.target.dataset.animationLoaded="true",function(e,t,i){const n="true"==i,o=r.default.loadAnimation({name:e.id,container:e,renderer:"svg",loop:n,autoplay:!1,path:`/lottie_animations/${t}.json?v230228`,rendererSettings:{progressiveLoad:!0}});o.addEventListener("DOMLoaded",e=>{o.wrapper.querySelector("svg").style.transform=""})}(e.target,i,n)),e.isIntersecting&&r.default.play(t)})},{root:null,rootMargin:"50px 0px 50px 0px",threshold:0}),t=document.querySelectorAll(".js-lottie-animation");Array.from(t).forEach(t=>{e.observe(t)})};var n,r=(n=e("lottie-web"))&&n.__esModule?n:{default:n}},{"lottie-web":251}],44:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(!document.querySelector(".park-list-wrap"))return;console.log("initParksList...");const e=document.body.classList.contains("page-planned-park-list"),t=e?{mapStyles:o.mapStylesLight,mapBackground:o.mapBgColorLight,activeSymbolStyles:o.symbolStyleDark,activeClusterFilter:"brightness(0%)",activeClusterColor:"#fff"}:{mapStyles:o.mapStylesDark,mapBackground:o.mapBgColorDark,activeSymbolStyles:o.symbolStyleWhite,activeClusterFilter:"brightness(0%) invert(1)",activeClusterColor:"#000"},i={text:"",countries:[]},a=document.querySelector("#map-canvas"),l=document.querySelectorAll(".park-card"),c=document.querySelector(".park-list-content-cards"),u=document.querySelector(".park-list-content"),h=document.querySelector(".park-search-form-search-field"),d=document.querySelector(".park-search-form"),f=document.querySelectorAll(".park-search-form-country-field"),p=[...l].map(e=>{let{dataset:{title:t,latitude:i,longitude:n}}=e;return{title:t,lat:parseFloat(i),lng:parseFloat(n)}}),m=[],g=function(){const e=new google.maps.Map(a,{disableDefaultUI:!0,zoomControl:!1,zoom:5,maxZoom:12,minZoom:4,styles:t.mapStyles,backgroundColor:t.mapBackground});return y(e,p)}(),v=new n.default(g,m,{gridSize:40,maxZoom:9,styles:[(0,o.getClusterStyle)(o.colors.blue)],averageCenter:!0});let b;b="cs"===document.querySelector('[data-type="locales"] > .is-active > .locale-short').innerHTML?s.cities.map(t=>{let{coords:i,name:n}=t;return new google.maps.Marker({position:i,zIndex:99999,visible:!1,label:{text:n,color:e?"black":"white"},map:g,icon:{path:google.maps.SymbolPath.CIRCLE,scale:0}})}):s.citiesEn.map(t=>{let{coords:i,name:n}=t;return new google.maps.Marker({position:i,zIndex:99999,visible:!1,label:{text:n,color:e?"black":"white"},map:g,icon:{path:google.maps.SymbolPath.CIRCLE,scale:0}})});function y(e,t){const i=new google.maps.LatLngBounds;
17return t.forEach(e=>{let{lat:t,lng:n}=e;i.extend({lat:t,lng:n})}),e.fitBounds(i,{left:window.innerWidth<1e3?0:window.innerWidth/2,top:100,bottom:40,right:40}),e}function w(){m.forEach(e=>{e.setIcon((0,o.getSymbolStyle)(o.colors.blue))}),Array.from(l).forEach(e=>{e.classList.remove("is-active")}),c.classList.remove("is-active"),u.removeEventListener("scroll",w)}function _(){console.log("checkParkCheckboxes...");const e=document.querySelectorAll(".park-search-form-country-field input:checked"),t=[];Array.from(e).forEach(e=>{t.push(e.value)}),i.countries=t;const n=new URL(window.location.href),r=n.href.split("?")[0],o=new URLSearchParams(r.search);let s="";t.length?(o.set("country",encodeURIComponent(t)),s=`?${o.toString()}`):s=n.pathname,history.replaceState(null,null,s),k(i)}function k(e){Array.from(l).forEach(t=>{const i=t.dataset.title.toLowerCase().includes(e.text.toLowerCase())&&(0==e.countries.length||e.countries.includes(t.dataset.country));t.style.display=!0===i?"flex":"none"})}_(),google.maps.event.addListener(v,"click",e=>{y(g,e.getMarkers().map(e=>({lat:e.getPosition().lat(),lng:e.getPosition().lng(),title:e.getTitle()})))}),google.maps.event.addListenerOnce(g,"tilesloaded",()=>{p.forEach((e,n)=>{!function(e,n){window.setTimeout(()=>{const n=new google.maps.Marker({position:{lat:e.lat,lng:e.lng},map:g,icon:(0,o.getSymbolStyle)(o.colors.blue),animation:google.maps.Animation.DROP,title:e.title});n.addListener("click",()=>{w(),n.setIcon(t.activeSymbolStyles),h.value="",i.text="",i.countries=[],k(i);const e=document.querySelector(`.park-card[data-title="${n.getTitle()}"]`);e.classList.add("is-active"),c.classList.add("is-active"),e.scrollIntoView({behavior:"smooth"}),(0,r.default)({targets:u,scrollTop:e.offsetTop-window.innerHeight/2,duration:500,easing:"easeInOutQuad",loop:!1,autoplay:!0,complete(){u.addEventListener("scroll",w)}})}),m.push(n),setTimeout(()=>{v.addMarker(n)},1500)},n)}(e,40*n)})}),google.maps.event.addListener(g,"zoom_changed",()=>{const e=g.getZoom();b.forEach(t=>{t.setVisible(e>=6)})}),google.maps.event.addListener(g,"click",()=>{w()}),Array.from(l).forEach(e=>{const i=(n=e.dataset.title,e=>{const i="mouseleave"===e.type,r=m.find(e=>{let{title:t}=e;return t===n});if(r){r.setIcon(i?(0,o.getSymbolStyle)(o.colors.blue):t.activeSymbolStyles);const e=v.getClusters().find(e=>e.getMarkers().find(e=>{let{title:t}=e;return t===n}));if(e){const n=e.clusterIcon_.div_.firstElementChild,r=e.clusterIcon_.div_.lastElementChild;n&&(n.style.filter=i?"none":t.activeClusterFilter),r&&(r.style.color=i?clusterStyle[0].textColor:t.activeClusterColor)}}});var n;e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",i)}),h.addEventListener("keyup",e=>{const t=e.target.value.toLowerCase();i.text=t,k(i)}),d.addEventListener("submit",e=>{e.preventDefault()}),console.log("searchFieldsCountry",f),Array.from(f).forEach(e=>{e.querySelector("input").addEventListener("change",e=>{console.log("change"),_()})})};var n=a(e("@google/markerclustererplus")),r=a(e("animejs")),o=e("./import/mapStyles"),s=e("./import/mapData");function a(e){return e&&e.__esModule?e:{default:e}}},{"./import/mapData":37,"./import/mapStyles":38,"@google/markerclustererplus":57,animejs:60}],45:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelector("body.lease");if(!e)return;let t,i=!1;function r(){const n=e.querySelector("#frm-leaseFilterForm"),r=n.querySelector("[name='text']");!function(e){e.focus();const t=e.value.length;if(e.setSelectionRange)e.setSelectionRange(t,t);else if(e.createTextRange){const i=e.createTextRange();i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",t),i.select()}}(r),t&&(r.value=t,t=null),n.addEventListener("submit",e=>{e.preventDefault()}),n.querySelectorAll("[type='checkbox']").forEach(e=>{e.addEventListener("change",()=>{o(n)})}),n.querySelectorAll("[type='text']").forEach(e=>{e.addEventListener("keyup",r=>{i?t=e.value:(i=!0,setTimeout(()=>{o(n)},1e3))})}),e.querySelectorAll(".option-remove").forEach(e=>{e.addEventListener("click",()=>{const{targetInput:t}=e.dataset;n.querySelector(`[data-input-id="${t}"]`).click(),e.remove()})})}function o(e){console.log("sendRequest");const t=e.dataset.formHandleUrl,{loadingText:o}=e.dataset,s=function(e){const t=new FormData(e),i={};return t.forEach((e,t)=>{if(t.endsWith("[]")){const n=t.slice(0,-2);i[n]||(i[n]=[]),i[n].push(e)}else i[t]=e}),i}(e);i=!0,e.querySelector("[type='submit']").textContent=o,e.classList.add("grayscale","pointer-event-none"),fetch(t,{method:"POST",body:JSON.stringify(s),headers:{"X-Requested-With":"XMLHttpRequest"}}).then(async e=>{e.status>=200&&e.status<300?(i=!1,e.json().then(e=>{(0,n.applySnippets)(e),r(),window.scrollToTarget(document.querySelector(".park-list"))}).catch(e=>{console.log("NÄco se pokazilo",e),console.log(e)})):console.log("NÄco se pokazilo")}).catch(e=>{console.log("NÄco se pokazilo",e)})}r()};var n=e("../utils")},{"../utils":55}],46:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelector("#brochureCountdown");if(e){let t=parseInt(e.dataset.countdownValue,10),i=e.dataset.countdownPdf;if(!isNaN(t)){const n=()=>{e.textContent=t,t>0?(t--,setTimeout(n,1e3)):(e.classList.remove("typo-size-h2"),e.textContent="ready!",window.location.replace(i))};n()}}}},{}],47:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(!document.querySelector("body").classList.contains("christmas-page"))return;const e=document.getElementById("show-more-gallery"),t=document.querySelector(".gallery__masonry");if(!e||!t)return;const i=Array.from(t.querySelectorAll(".gallery__masonry .gallery-img")),r=i.filter(e=>!e.classList.contains("hidden")).length||6,o=e.querySelector("#show-more-text")||document.getElementById("show-more-text"),s=e.querySelector("#show-less-text")||document.getElementById("show-less-text");o&&o.classList.remove("hidden");s&&s.classList.add("hidden");e.addEventListener("click",function(e){e.preventDefault();i.some((e,t)=>t>=r&&e.classList.contains("hidden"))?(i.forEach((e,t)=>{t>=r&&e.classList.remove("hidden")}),o&&o.classList.add("hidden"),s&&s.classList.remove("hidden")):(i.forEach((e,t)=>{t>=r&&e.classList.add("hidden")}),o&&o.classList.remove("hidden"),s&&s.classList.add("hidden"))});const a=Array.from(document.querySelectorAll('[class*="map__number--"]')),l=Array.from(document.querySelectorAll('[class*="map__image--"]'));
17a.length&&l.length&&a.forEach(e=>{e.addEventListener("click",()=>{const t=e.className.match(/map__number--(\d+)/),i=t?t[1]:e.textContent.trim();if(i){const t=document.querySelector(".map__image--"+i);e.classList.contains("active")?(e.classList.remove("active"),t&&t.classList.remove("active")):(l.forEach(e=>e.classList.remove("active")),a.forEach(e=>e.classList.remove("active")),t&&t.classList.add("active"),e.classList.add("active"))}})});document.getElementById("christmas-gallery--mobile")&&new n.Swiper("#christmas-gallery--mobile",{slidesPerView:"auto",centeredSlides:!0,spaceBetween:20,loop:!0,navigation:{nextEl:".gallery-next",prevEl:".gallery-prev"}})};var n=e("swiper");n.Swiper.use([n.Navigation])},{swiper:397}],48:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelector("#dictionaryCountdown");if(e){let t=parseInt(e.dataset.countdownValue,10),i=e.dataset.countdownPdf;if(!isNaN(t)){const n=()=>{e.textContent=t,t>0?(t--,setTimeout(n,1e3)):(e.classList.remove("typo-size-h2"),e.textContent="ready!",window.location.replace(i))};n()}}}},{}],49:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("expansion");if(!e)return;const t=document.querySelectorAll(".step");setInterval(()=>{for(const e of t)if(e.classList.contains("active")){const t=e.querySelectorAll(".animate");let i=0;const n="show";i<t.length&&(t[i].classList.add(n),i++);const r=setInterval(()=>{i>=t.length?clearInterval(r):(t[i].classList.add(n),i++)},1e3)}},10),document.addEventListener("scroll",()=>{!function(){if(window.innerWidth<e.dataset.breakpoint){const t="active";e.querySelectorAll(".animate").forEach(e=>{"none"!==window.getComputedStyle(e).display&&(0,n.getElementPositionData)(e).bottom>.5&&e.closest(".step").classList.add(t)})}}()})};var n=e("../import/helper")},{"../import/helper":34}],50:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(!document.querySelector(".page-home"))return;(function(){const e=document.getElementById("expansion-anchor");e&&e.addEventListener("click",e=>{e.preventDefault(),document.querySelector("html").classList.remove("scroll-smooth");const t=(0,r.getElementPositionData)(document.getElementById("expansion"));(0,o.default)(t.topOffset+1,{speed:500}).then(()=>{const e=new WheelEvent("wheel",{deltaY:1,deltaMode:1});window.dispatchEvent(e)})})})(),document.addEventListener("scroll",()=>{!function(){const e=document.getElementById("hp-sustainability"),t=document.querySelector(".bee-container-1"),i=t.querySelector(".bee-wrap-1").querySelector(".bee-1"),n=document.querySelector(".bee-container-2"),o=n.querySelector(".bee-wrap-2").querySelector(".bee-2");(0,r.getElementPositionData)(e).bottom>0&&i.classList.add("animate"),(0,r.getElementPositionData)(e).bottom>.8&&o.classList.add("animate"),t.style.top=(0,r.getElementPositionData)(e).topOffset-150+"px",n.style.top=`${(0,r.getElementPositionData)(e).bottomOffset}px`}(),function(){if(window.innerWidth<1024)return;document.getElementById("expansion").querySelectorAll(".animate").forEach(e=>{(0,r.getElementPositionData)(e).bottom>.9&&e.classList.add("show")})}()})};var n,r=e("../import/helper"),o=(n=e("animated-scroll-to"))&&n.__esModule?n:{default:n}},{"../import/helper":34,"animated-scroll-to":59}],51:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("visualization-map");if(!e)return;const t=parseFloat(e.dataset.lat.replace(/,/g,".")),i=parseFloat(e.dataset.lng.replace(/,/g,".")),o=e.dataset.mapPointHtml;console.log("lat",t),console.log("lng",i);const s=new google.maps.Map(e,{center:{lat:t,lng:i},zoom:13,styles:n.leaseDetailMapStyle,disableDefaultUI:!0,zoomControl:!1,maxZoom:20,minZoom:4});return new r(new google.maps.LatLng(t,i),o,s),s};var n=e("../import/leaseDetailMapStyle");class r extends google.maps.OverlayView{constructor(e,t,i){super(),this.position=e,this.map=i,this.mapPointHtml=t,this.setMap(i)}onAdd(){this.div=document.createElement("div"),this.div.style.position="absolute",this.div.innerHTML=this.mapPointHtml;this.getPanes().floatPane.appendChild(this.div)}draw(){const e=this.getProjection().fromLatLngToDivPixel(this.position),t=this.div;t.style.left=e.x+"px",t.style.top=e.y+"px"}onRemove(){this.div&&(this.div.parentNode.removeChild(this.div),this.div=null)}}},{"../import/leaseDetailMapStyle":36}],52:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("lease-map");if(!e)return;const t=JSON.parse(e.dataset.parksCoords),i={mapStyles:o.mapStylesDark,mapBackgroun
17d:o.mapBgColorDark,activeSymbolStyles:o.symbolStyleWhite,activeClusterFilter:"brightness(0%) invert(1)",activeClusterColor:"#000"};const n=[],a=new google.maps.Map(e,{center:{lat:50.09222371030819,lng:14.43166469141548},zoom:5.02,disableDefaultUI:!0,zoomControl:!1,maxZoom:12,minZoom:4,styles:i.mapStyles,backgroundColor:i.mapBackground}),l=[(0,o.getClusterStyle)(o.colors.blue),(0,o.getClusterStyle)(o.colors.orange)],c=new r.default(a,n,{gridSize:40,maxZoom:9,styles:l,averageCenter:!0,calculator:e=>{let t=1,i=0;for(const n of e)n.myCustomData&&n.myCustomData.lease&&(t=2,i++);return{text:i||e.length,index:t}}});function u(e,t){window.setTimeout(()=>{const{lease:t}=e,r=new google.maps.Marker({position:{lat:e.location.lat,lng:e.location.lng},map:a,icon:(0,o.getSymbolStyle)(t?o.colors.orange:o.colors.blue),animation:google.maps.Animation.DROP,title:e.title,clickable:t});t&&(r.myCustomData={lease:!0,title:e.title,id:e.id,link:e.link},function(e){e.addListener("click",()=>{const{id:t}=e.myCustomData,{title:n}=e.myCustomData;e.setIcon(i.activeSymbolStyles);const r=document.getElementById("parks-list").querySelector(`.lease-park-card[data-id="${t}"]`);if(r)(0,s.scrollToTarget)(r);else{const e=document.getElementById("frm-leaseFilterForm-text");e.value=n;const t=new Event("keyup");e.dispatchEvent(t);const i=document.getElementById("filter");(0,s.scrollToTarget)(i)}})}(r)),n.push(r),setTimeout(()=>{c.addMarker(r)},1500)},t)}google.maps.event.addListenerOnce(a,"tilesloaded",()=>{t.forEach((e,t)=>{u(e,40*t)})});const h=a.getCenter();var d=h;function f(){console.log("setMapCenter");const e=.08*a.getDiv().offsetWidth,t=.07*a.getDiv().offsetHeight,i=a.getProjection(),n=i.fromLatLngToPoint(d),r=Math.pow(2,a.getZoom()),o=n.x-e/r,s=n.y+t/r,l=new google.maps.Point(o,s),c=i.fromPointToLatLng(l);a.setCenter(c)}google.maps.event.addListener(c,"clusterclick",function(e){d=e.getCenter()}),google.maps.event.addListenerOnce(a,"idle",()=>{f()}),window.addEventListener("resize",()=>{console.log("resize"),d=h,f()})};var n,r=(n=e("@google/markerclustererplus"))&&n.__esModule?n:{default:n},o=e("../import/mapStyles"),s=e("../utils")},{"../import/mapStyles":38,"../utils":55,"@google/markerclustererplus":57}],53:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.getElementById("parks-slider");if(!e)return;const t=e.querySelector("[data-swiper-slider]");let i;function r(){if(window.innerWidth<=e.dataset.sliderBreakpoint)t.classList.add("swiper-wrapper"),t.querySelectorAll("[data-swiper-slide]").forEach(e=>{e.classList.add("swiper-slide")}),i=new n.Swiper(e,{slidesPerView:1,spaceBetween:16,breakpoints:{600:{slidesPerView:2}}});else{if(!i)return;i.destroy(),t.querySelectorAll("[data-swiper-slide]").forEach(e=>{e.classList.remove("swiper-slide")}),t.classList.remove("swiper-wrapper")}}r(),window.addEventListener("resize",r)};var n=e("swiper")},{swiper:397}],54:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){const e=document.querySelector(".technical-specification-accolade-funds-park-stribro"),t=document.querySelector(".park-detail-buildings-accolade-funds-park-stribro"),i=document.documentElement.lang||"cs";if(e){[{element:e.querySelector("#BUILDING_4"),id:"building4"},{element:e.querySelector("#BUILDING_5"),id:"building5"},{element:e.querySelector("#BUILDING_7\\.2"),id:"building7"},{element:e.querySelector("#BUILDING_9"),id:"building9"},{element:e.querySelector("#BUILDING_10\\.3"),id:"building10"}].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}/lease/35/park-stribro-ii?building=${e.element.id}#technical-specification`})})}if(t){[{element:t.querySelector("#BUILDING_4"),id:"building4"},{element:t.querySelector("#BUILDING_5"),id:"building5"},{element:t.querySelector("#BUILDING_7\\.2"),id:"building7"},{element:t.querySelector("#BUILDING_9"),id:"building9"},{element:t.querySelector("#BUILDING_10\\.3"),id:"building10"}].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}
17/lease/35/park-stribro-ii?building=${e.element.id}#technical-specification`})})}const n=document.querySelector(".technical-specification-park-stribro-ii"),r=document.querySelector(".park-detail-buildings-park-stribro-ii");if(n){[{element:n.querySelector("#BUILDING_1\\.1"),id:"building11"},{element:n.querySelector("#BUILDING_1\\.2"),id:"building12"},{element:n.querySelector("#BUILDING_2\\.1"),id:"building21"},{element:n.querySelector("#BUILDING_2\\.2"),id:"building22"},{element:n.querySelector("#BUILDING_3\\.1"),id:"building31"},{element:n.querySelector("#BUILDING_3\\.2"),id:"building32"},{element:n.querySelector("#BUILDING_6"),id:"building6"},{element:n.querySelector("#BUILDING_7\\.1"),id:"building7"},{element:n.querySelector("#BUILDING_8\\.1"),id:"building8"},{element:n.querySelector("#BUILDING_10\\.1"),id:"building101"},{element:n.querySelector("#BUILDING_10\\.2"),id:"building102"}].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}/lease/3/accolade-funds-park-stribro?building=${e.element.id}#technical-specification`})})}if(r){[{element:r.querySelector("#BUILDING_1\\.1"),id:"building11"},{element:r.querySelector("#BUILDING_1\\.2"),id:"building12"},{element:r.querySelector("#BUILDING_2\\.1"),id:"building21"},{element:r.querySelector("#BUILDING_2\\.2"),id:"building22"},{element:r.querySelector("#BUILDING_3\\.1"),id:"building31"},{element:r.querySelector("#BUILDING_3\\.2"),id:"building32"},{element:r.querySelector("#BUILDING_6"),id:"building6"},{element:r.querySelector("#BUILDING_7\\.1"),id:"building7"},{element:r.querySelector("#BUILDING_8\\.1"),id:"building8"},{element:r.querySelector("#BUILDING_10\\.1"),id:"building101"},{element:r.querySelector("#BUILDING_10\\.2"),id:"building102"}].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}/lease/3/accolade-funds-park-stribro?building=${e.element.id}#technical-specification`})})}const o=document.querySelector(".park-detail-buildings-accolade-funds-park-kojetin");if(o){[{element:o.querySelector("#BUILDING_1\\.1"),id:"building11"}
17].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}/lease/92/park-kojetin-ii?building=${e.element.id}#technical-specification`})})}const s=document.querySelector(".park-detail-buildings-park-kojetin-ii");if(s){[{element:s.querySelector("#BUILDING_1"),id:"building1"}].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}/park/51/accolade-funds-park-kojetin?building=${e.element.id}#park-detail-buildings`})})}const a=document.querySelector(".technical-specification-park-kojetin-ii");if(a){[{element:a.querySelector("#BUILDING_1"),id:"building1"}].forEach(e=>{e.element&&e.element.addEventListener("click",function(){window.location.href=`${window.location.origin}/${i}/park/51/accolade-funds-park-kojetin?building=${e.element.id}#park-detail-buildings`})})}!function(){const e=new URLSearchParams(window.location.search).get("building");if(!e)return;console.log(e);const t=e.replace(/\./g,"\\.");let i=!1;function n(){if(i)return;const e=document.querySelector("#technical-specification");if(!e)return;const r=e.getBoundingClientRect();r.top<window.innerHeight&&r.bottom>0&&(i=!0,setTimeout(()=>{const e=document.querySelector(`[data-layer="${t}"]`);e&&e.click()},350),window.removeEventListener("scroll",n),window.removeEventListener("resize",n))}console.log(t),window.addEventListener("scroll",n),window.addEventListener("resize",n),n()}()}},{}],55:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.anchorClick=function(){document.querySelectorAll("a").forEach(e=>{const t=e.href;t.includes("#")&&e.addEventListener("click",e=>{e.preventDefault();o(`#${t.split("#").pop()}`)})})},i.applySnippets=async function(e){const{snippets:t}=e;if(!t)return;for(const[e,i]of Object.entries(t)){const t=document.getElementById(e);t&&(void 0!==t.dataset.ajaxAppend?t.innerHTML=t.innerHTML+i:t.innerHTML=i)}},i.arrayRange=function(e,t){if(e>t)return[];return Array.from({length:t-e+1}).map((t,i)=>e+i)},i.formSubmitLoading=function(){document.querySelector("form .loading-icon")},i.generateHash=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return r.default.randomBytes(e).toString("hex",0,e)},i.isInputFilled=function(e){return""!==e.value},i.scrollPercent=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=("object"==typeof e?e:document.querySelector(e)).getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,r=i.top+n-window.innerHeight,o=r+i.height+window.innerHeight,s=window.pageYOffset||document.documentElement.scrollTop,a=o-s;let l;l=t?Math.round((2*i.height-a)/i.height*100):Math.round((s-r)/(o-r)*100);return l},i.scrollToTarget=o;var n,r=(n=e("crypto"))&&n.__esModule?n:{default:n};function o(e){const t="object"==typeof e?e:document.querySelector(e);if(!t)return;const i=t.getBoundingClientRect().top+window.scrollY-54;window.scrollTo(0,i)}},{crypto:181}],56:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){!function(){const e=new IntersectionObserver((e,t)=>{Array.from(e).forEach(e=>{var t;e.isIntersecting&&!e.target.classList.contains("section-part-image-revealed")&&(e.target.classList.add("section-part-image-revealed"),t=e.target,(0,r.default)({targets:t,opacity:[0,1],scale:[.95,1],easing:"easeInQuad",duration:250,autoplay:!0,loop:!1}))})},{root:null,rootMargin:"0px",threshold:.7}),t=document.querySelectorAll(".section-part-image");Array.from(t).forEach(t=>{e.observe(t)})}()};var n,r=(n=e("animejs"))&&n.__esModule?n:{default:n}},{animejs:60}],57:[function(e,t,i){(function(e){(function(){var n,r;n=this,r=function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function i(e,t){return e(t={exports:{}},t.exports),t.exports}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},s=!o(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}}
vendor: 34,780 bytes, line 17
17)[1]}),a={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c={f:l&&!a.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:a},u=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},h={}.toString,d=function(e){return h.call(e).slice(8,-1)},f="".split,p=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==d(e)?f.call(e,""):Object(e)}:Object,m=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return p(m(e))},v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},b=function(e,t){if(!v(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!v(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!v(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!v(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,w=function(e,t){return y.call(e,t)},_=r.document,k=v(_)&&v(_.createElement),x=!s&&!o(function(){return 7!=Object.defineProperty(k?_.createElement("div"):{},"a",{get:function(){return 7}}).a}),C=Object.getOwnPropertyDescriptor,S={f:s?C:function(e,t){if(e=g(e),t=b(t,!0),x)try{return C(e,t)}catch(e){}if(w(e,t))return u(!c.f.call(e,t),e[t])}},E=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},T=Object.defineProperty,A={f:s?T:function(e,t,i){if(E(e),t=b(t,!0),E(i),x)try{return T(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},I=s?function(e,t,i){return A.f(e,t,u(1,i))}:function(e,t,i){return e[t]=i,e},M=function(e,t){try{I(r,e,t)}catch(i){r[e]=t}return t},P=r["__core-js_shared__"]||M("__core-js_shared__",{}),D=Function.toString;"function"!=typeof P.inspectSource&&(P.inspectSource=function(e){return D.call(e)});var O,L,R,B,N=P.inspectSource,j=r.WeakMap,F="function"==typeof j&&/native code/.test(N(j)),z=i(function(e){(e.exports=function(e,t){return P[e]||(P[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),V=0,H=Math.random(),U=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+H).toString(36)},W=z("keys"),$={},G=r.WeakMap;if(F){var q=new G,Y=q.get,Z=q.has,X=q.set;O=function(e,t){return X.call(q,e,t),t},L=function(e){return Y.call(q,e)||{}},R=function(e){return Z.call(q,e)}}else{var K=W[B="state"]||(W[B]=U(B));$[K]=!0,O=function(e,t){return I(e,K,t),t},L=function(e){return w(e,K)?e[K]:{}},R=function(e){return w(e,K)}}var J={set:O,get:L,has:R,enforce:function(e){return R(e)?L(e):O(e,{})},getterFor:function(e){return function(t){var i;if(!v(t)||(i=L(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}},Q=i(function(e){var t=J.get,i=J.enforce,n=String(String).split("String");(e.exports=function(e,t,o,s){var a=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet;"function"==typeof o&&("string"!=typeof t||w(o,"name")||I(o,"name",t),i(o).source=n.join("string"==typeof t?t:"")),e!==r?(a?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=o:I(e,t,o)):l?e[t]=o:M(t,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||N(this)})}),ee=r,te=function(e){return"function"==typeof e?e:void 0},ie=function(e,t){return arguments.length<2?te(ee[e])||te(r[e]):ee[e]&&ee[e][t]||r[e]&&r[e][t]},ne=Math.ceil,re=Math.floor,oe=function(e){return isNaN(e=+e)?0:(e>0?re:ne)(e)},se=Math.min,ae=function(e){return e>0?se(oe(e),9007199254740991):0},le=Math.max,ce=Math.min,ue=function(e,t){var i=oe(e);return i<0?le(i+t,0):ce(i,t)},he=function(e){return function(t,i,n){var r,o=g(t),s=ae(o.length),a=ue(n,s);if(e&&i!=i){for(;s>a;)if((r=o[a++])!=r)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===i)return e||a||0;return!e&&-1}},de={includes:he(!0),indexOf:he(!1)},fe=de.indexOf,pe=function(e,t){var i,n=g(e),r=0,o=[];for(i in n)!w($,i)&&w(n,i)&&o.push(i);for(;t.length>r;)w(n,i=t[r++])&&(~fe(o,i)||o.push(i));return o},me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ge=me.concat("length","prototype"),ve={f:Object.getOwnPropertyNames||function(e){return pe(e,ge)}},be={f:Object.getOwnPropertySymbols},ye=ie("Reflect","ownKeys")||function(e){var t=ve.f(E(e)),i=be.f;return i?t.concat(i(e)):t},we=function(e,t){for(var i=ye(t),n=A.f,r=S.f,o=0;o<i.length;o++){var s=i[o];w(e,s)||n(e,s,r(t,s))}},_e=/#|\.prototype\./,ke=function(e,t){var i=Ce[xe(e)];return i==Ee||i!=Se&&("function"==typeof t?o(t):!!t)},xe=ke.normalize=function(e){return String(e).replace(_e,".").toLowerCase()},Ce=ke.data={},Se=ke.NATIVE="N",Ee=ke.POLYFILL="P",Te=ke,Ae=S.f,Ie=function(e,t){var i,n,o,s,a,l=e.target,c=e.global,u=e.stat;if(i=c?r:u?r[l]||M(l,{}):(r[l]||{}).prototype)for(n in t){if(s=t[n],o=e.noTargetGet?(a=Ae(i,n))&&a.value:i[n],!Te(c?n:l+(u?".":"#")+n,e.forced)&&void 0!==o){if(typeof s==typeof o)continue;we(s,o)}(e.sham||o&&o.sham)&&I(s,"sham",!0),Q(i,n,s,e)}},Me=function(e,t){var i=[][e];return!!i&&o(function(){i.call(null,t||function(){throw 1},1)})},Pe=Object.defineProperty,De={},Oe=function(e){throw e},Le=function(e,t){if(w(De,e))return De[e];t||(t={});var i=[][e],n=!!w(t,"ACCESSORS")&&t.ACCESSORS,r=w(t,0)?t[0]:Oe,a=w(t,1)?t[1]:void 0;return De[e]=!!i&&!o(function(){if(n&&!s)return!0;var e={length:-1};n?Pe(e,1,{enumerable:!0,get:Oe}):e[1]=1,i.call(e,r,a)})},Re=de.indexOf,Be=[].indexOf,Ne=!!Be&&1/[1].indexOf(1,-0)<0,je=Me("indexOf"),Fe=Le("indexOf",{ACCESSORS:!0,1:0});Ie({target:"Array",proto:!0,forced:Ne||!je||!Fe},{indexOf:function(e){return Ne?Be.apply(this,arguments)||0:Re(this,e,arguments.length>1?arguments[1]:void 0)}});var ze,Ve,He=Array.isArray||function(e){return"Array"==d(e)},Ue=function(e,t,i){var n=b(t);n in e?A.f(e,n,u(0,i)):e[n]=i},We=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())}),$e=We&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=z("wks"),qe=r.Symbol,Ye=$e?qe:qe&&qe.withoutSetter||U,Ze=function(e){return w(Ge,e)||(We&&w(qe,e)?Ge[e]=qe[e]:Ge[e]=Ye("Symbol."+e)),Ge[e]},Xe=ie("navigator","userAgent")||"",Ke=r.process,Je=Ke&&Ke.versions,Qe=Je&&Je.v8;Qe?Ve=(ze=Qe.split("."))[0]+ze[1]:Xe&&(!(ze=Xe.match(/Edge\/(\d+)/))||ze[1]>=74)&&(ze=Xe.match(/Chrome\/(\d+)/))&&(Ve=ze[1]);var et=Ve&&+Ve,tt=Ze("species"),it=function(e){return et>=51||!o(function(){var t=[];return(t.constructor={})[tt]=function(){return{foo:1}},1!==t[e](Boolean).foo})},nt=it("slice"),rt=Le("slice",{ACCESSORS:!0,0:0,1:2}),ot=Ze("species"),st=[].slice,at=Math.max;Ie({target:"Array",proto:!0,forced:!nt||!rt},{slice:function(e,t){var i,n,r,o=g(this),s=ae(o.length),a=ue(e,s),l=ue(void 0===t?s:t,s);if(He(o)&&("function"!=typeof(i=o.constructor)||i!==Array&&!He(i.prototype)?v(i)&&null===(i=i[ot])&&(i=void 0):i=void 0,i===Array||void 0===i))return st.call(o,a,l);for(n=new(void 0===i?Array:i)(at(l-a,0)),r=0;a<l;a++,r++)a in o&&Ue(n,r,o[a]);return n.length=r,n}});var lt=function(e){return Object(m(e))},ct=Ze("species"),ut=function(e,t){var i;return He(e)&&("function"!=typeof(i=e.constructor)||i!==Array&&!He(i.prototype)?v(i)&&null===(i=i[ct])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===t?0:t)},ht=it("splice"),dt=Le("splice",{ACCESSORS:!0,0:0,1:2}),ft=Math.max,pt=Math.min;Ie({target:"Array",proto:!0,forced:!ht||!dt},{splice:function(e,t){var i,n,r,o,s,a,l=lt(this),c=ae(l.length),u=ue(e,c),h=arguments.length;if(0===h?i=n=0:1===h?(i=0,n=c-u):(i=h-2,n=pt(ft(oe(t),0),c-u)),c+i-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(r=ut(l,n),o=0;o<n;o++)(s=u+o)in l&&Ue(r,o,l[s]);if(r.length=n,i<n){for(o=u;o<c-n;o++)a=o+i,(s=o+n)in l?l[a]=l[s]:delete l[a];for(o=c;o>c-n+i;o--)delete l[o-1]}else if(i>n)for(o=c-n;o>u;o--)a=o+i-1,(s=o+n-1)in l?l[a]=l[s]:delete l[a];for(o=0;o<i;o++)l[o+u]=arguments[o+2];return l.length=c-n+i,r}});var mt=Date.prototype,gt=mt.toString,vt=mt.getTime;new Date(NaN)+""!="Invalid Date"&&Q(mt,"toString",function(){var e=vt.call(this);return e==e?gt.call(this):"Invalid Date"});var bt=Object.keys||function(e){return pe(e,me)},yt=Object.assign,wt=Object.defineProperty,_t=!yt||o(function(){if(s&&1!==yt({b:1},yt(wt({},"a",{enumerable:!0,get:function(){wt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol();return e[i]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!=yt({},e)[i]||"abcdefghijklmnopqrst"!=bt(yt({},t)).join("")})?function(e,t){for(var i=lt(e),n=arguments.length,r=1,o=be.f,a=c.f;n>r;)for(var l,u=p(arguments[r++]),h=o?bt(u).concat(o(u)):bt(u),d=h.length,f=0;d>f;)l=h[f++],s&&!a.call(u,l)||(i[l]=u[l]);return i}:yt;Ie({target:"Object",stat:!0,forced:Object.assign!==_t},{assign:_t});var kt={};kt[Ze("toStringTag")]="z";var xt="[object z]"===String(kt),Ct=Ze("toStringTag"),St="Arguments"==d(function(){return arguments}()),Et=xt?d:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Ct))?i:St?d(t):"Object"==(n=d(t))&&"function"==typeof t.callee?"Arguments":n},Tt=xt?{}.toString:function(){return"[object "+Et(this)+"]"};xt||Q(Object.prototype,"toString",Tt,{unsafe:!0});var At=function(){var e=E(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},It=RegExp.prototype,Mt=It.toString,Pt=o(function(){return"/a/b"!=Mt.call({source:"a",flags:"b"})}),Dt="toString"!=Mt.name;function Ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lt(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rt(e,t,i){return t&&Lt(e.prototype,t),i&&Lt(e,i),e}function Bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jt(e,t)}function Nt(e){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jt(e,t){return(jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(Pt||Dt)&&Q(RegExp.prototype,"toString",function(){var e=E(this),t=String(e.source),i=e.flags;return"/"+t+"/"+String(void 0===i&&e instanceof RegExp&&!("flags"in It)?At.call(e):i)},{unsafe:!0});var zt=Ze("isConcatSpreadable"),Vt=et>=51||!o(function(){var e=[];return e[zt]=!1,e.concat()[0]!==e}),Ht=it("concat"),Ut=function(e){if(!v(e))return!1;var t=e[zt];return void 0!==t?!!t:He(e)};Ie({target:"Array",proto:!0,forced:!Vt||!Ht},{concat:function(e){var t,i,n,r,o,s=lt(this),a=ut(s,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(Ut(o=-1===t?s:arguments[t])){if(l+(r=ae(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(i=0;i<r;i++,l++)i in o&&Ue(a,l,o[i])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Ue(a,l++,o)}return a.length=l,a}});var Wt=[].join,$t=p!=Object,Gt=Me("join",",");Ie({target:"Array",proto:!0,forced:$t||!Gt},{join:function(e){return Wt.call(g(this),void 0===e?",":e)}});var qt=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Yt=function(e){return function(t,i,n,r){qt(i);var o=lt(t),s=p(o),a=ae(o.length),l=e?a-1:0,c=e?-1:1;if(n<2)for(;;){if(l in s){r=s[l],l+=c;break}if(l+=c,e?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:a>l;l+=c)l in s&&(r=i(r,s[l],l,o));return r}},Zt=[Yt(!1),Yt(!0)][0],Xt=Me("reduce"),Kt=Le("reduce",{1:0});Ie({target:"Array",proto:!0,forced:!Xt||!Kt},{reduce:function(e){return Zt(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}}),Ie({target:"Object",stat:!0,forced:o(function(){bt(1)})},{keys:function(e){return bt(lt(e))}});var Jt="\t\n\v\f\r  áââââââ
ââââââ¯âã\u2028\u2029\ufeff",Qt="["+Jt+"]",ei=RegExp("^"+Qt+Qt+"*"),ti=RegExp(Qt+Qt+"*$"),ii=function(e){return function(t){var i=String(m(t));return 1&e&&(i=i.replace(ei,"")),2&e&&(i=i.replace(ti,"")),i}},ni=(ii(1),ii(2),ii(3)),ri=r.parseInt,oi=/^[+-]?0[Xx]/,si=8!==ri(Jt+"08")||22!==ri(Jt+"0x16")?function(e,t){var i=ni(String(e));return ri(i,t>>>0||(oi.test(i)?16:10))}:ri;function ai(e,t){return RegExp(e,t)}Ie({global:!0,forced:parseInt!=si},{parseInt:si});var li,ci,ui={UNSUPPORTED_Y:o(function(){var e=ai("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),BROKEN_CARET:o(function(){var e=ai("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},hi=RegExp.prototype.exec,di=String.prototype.replace,fi=hi,pi=(li=/a/,ci=/b*/g,hi.call(li,"a"),hi.call(ci,"a"),0!==li.lastIndex||0!==ci.lastIndex),mi=ui.UNSUPPORTED_Y||ui.BROKEN_CARET,gi=void 0!==/()??/.exec("")[1];(pi||gi||mi)&&(fi=function(e){var t,i,n,r,o=this,s=mi&&o.sticky,a=At.call(o),l=o.source,c=0,u=e;return s&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),u=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),i=new RegExp("^(?:"+l+")",a)),gi&&(i=new RegExp("^"+l+"$(?!\\s)",a)),pi&&(t=o.lastIndex),n=hi.call(s?i:o,u),s?n?(n.input=n.input.slice(c),n[0]=n[0].slice(c),n.index=o.lastIndex,o.lastIndex+=n[0].length):o.lastIndex=0:pi&&n&&(o.lastIndex=o.global?n.index+n[0].length:t),gi&&n&&n.length>1&&di.call(n[0],i,function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(n[r]=void 0)}),n});var vi=fi;Ie({target:"RegExp",proto:!0,forced:/./.exec!==vi},{exec:vi});var bi=Ze("species"),yi=!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),wi="$0"==="a".replace(/./,"$0"),_i=Ze("replace"),ki=!!/./[_i]&&""===/./[_i]("a","$0"),xi=!o(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),Ci=function(e,t,i,n){var r=Ze(e),s=!o(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)}),a=s&&!o(function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[bi]=function(){return i},i.flags="",i[r]=/./[r]),i.exec=function(){return t=!0,null},i[r](""),!t});if(!s||!a||"replace"===e&&(!yi||!wi||ki)||"split"===e&&!xi){var l=/./[r],c=i(r,""[e],function(e,t,i,n,r){return t.exec===vi?s&&!r?{done:!0,value:l.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}},{REPLACE_KEEPS_$0:wi,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ki}),u=c[0],h=c[1];Q(String.prototype,e,u),Q(RegExp.prototype,r,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)})}n&&I(RegExp.prototype[r],"sham",!0)},Si=function(e){return function(t,i){var n,r,o=String(m(t)),s=oe(i),a=o.length;return s<0||s>=a?e?"":void 0:(n=o.charCodeAt(s))<55296||n>56319||s+1===a||(r=o.charCodeAt(s+1))<56320||r>57343?e?o.charAt(s):n:e?o.slice(s,s+2):r-56320+(n-55296<<10)+65536}},Ei=(Si(!1),Si(!0)),Ti=function(e,t,i){return t+(i?Ei(e,t).length:1)},Ai=function(e,t){var i=e.exec;if("function"==typeof i){var n=i.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==d(e))throw TypeError("RegExp#exec called on incompatible receiver");return vi.call(e,t)},Ii=Math.max,Mi=Math.min,Pi=Math.floor,Di=/\$([$&'`]|\d\d?|<[^>]*>)/g,Oi=/\$([$&'`]|\d\d?)/g;Ci("replace",2,function(e,t,i,n){var r=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=n.REPLACE_KEEPS_$0,s=r?"$":"$0";return[function(i,n){var r=m(this),o=null==i?void 0:i[e];return void 0!==o?o.call(i,r,n):t.call(String(r),i,n)},function(e,n){if(!r&&o||"string"==typeof n&&-1===n.indexOf(s)){var l=i(t,e,this,n);if(l.done)return l.value}var c=E(e),u=String(this),h="function"==typeof n;h||(n=String(n));var d=c.global;if(d){var f=c.unicode;c.lastIndex=0}for(var p=[];;){var m=Ai(c,u);if(null===m)break;if(p.push(m),!d)break;""===String(m[0])&&(c.lastIndex=Ti(u,ae(c.lastIndex),f))}for(var g,v="",b=0,y=0;y<p.length;y++){m=p[y];for(var w=String(m[0]),_=Ii(Mi(oe(m.index),u.length),0),k=[],x=1;x<m.length;x++)k.push(void 0===(g=m[x])?g:String(g));var C=m.groups;if(h){var S=[w].concat(k,_,u);void 0!==C&&S.push(C);var T=String(n.apply(void 0,S))}else T=a(w,u,_,k,C,n);_>=b&&(v+=u.slice(b,_)+T,b=_+w.length)}return v+u.slice(b)}];function a(e,i,n,r,o,s){var a=n+e.length,l=r.length,c=Oi;return void 0!==o&&(o=lt(o),c=Di),t.call(s,c,function(t,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return i.slice(0,n);case"'":return i.slice(a);case"<":c=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return t;if(u>l){var h=Pi(u/10);return 0===h?t:h<=l?void 0===r[h-1]?s.charAt(1):r[h-1]+s.charAt(1):t}c=r[u-1]}return void 0===c?"":c})}});var Li=Ze("match"),Ri=Ze("species"),Bi=[].push,Ni=Math.min,ji=!o(function(){return!RegExp(4294967295,"y")});Ci("split",2,function(e,t,i){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var n,r,o=String(m(this)),s=void 0===i?4294967295:i>>>0;if(0===s)return[];if(void 0===e)return[o];if(!v(n=e)||(void 0!==(r=n[Li])?!r:"RegExp"!=d(n)))return t.call(o,e,s);for(var a,l,c,u=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,p=new RegExp(e.source,h+"g");(a=vi.call(p,o))&&!((l=p.lastIndex)>f&&(u.push(o.slice(f,a.index)),a.length>1&&a.index<o.length&&Bi.apply(u,a.slice(1)),c=a[0].length,f=l,u.length>=s));)p.lastIndex===a.index&&p.lastIndex++;return f===o.length?!c&&p.test("")||u.push(""):u.push(o.slice(f)),u.length>s?u.slice(0,s):u}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:t.call(this,e,i)}:t,[function(t,i){var r=m(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,r,i):n.call(String(r),t,i)},function(e,r){var o=i(n,e,this,r,n!==t);if(o.done)return o.value;var s=E(e),a=String(this),l=function(e,t){var i,n=E(e).constructor;return void 0===n||null==(i=E(n)[Ri])?t:qt(i)}(s,RegExp),c=s.unicode,u=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(ji?"y":"g"),h=new l(ji?s:"^(?:"+s.source+")",u),d=void 0===r?4294967295:r>>>0;if(0===d)return[];if(0===a.length)return null===Ai(h,a)?[a]:[];for(var f=0,p=0,m=[];p<a.length;){h.lastIndex=ji?p:0;var g,v=Ai(h,ji?a:a.slice(p));if(null===v||(g=Ni(ae(h.lastIndex+(ji?0:p)),a.length))===f)p=Ti(a,p,c);else{if(m.push(a.slice(f,p)),m.length===d)return m;for(var b=1;b<=v.length-1;b++)if(m.push(v[b]),m.length===d)return m;p=f=g}}return m.push(a.slice(f)),m}]},!ji);var Fi=function e(){Ot(this,e),function(e,t){for(var i in t.prototype)e.prototype[i]=t.prototype[i]}(e,google.maps.OverlayView)};function zi(e){return Object.keys(e).reduce(function(t,i){return e[i]&&t.push(i+":"+e[i]),t},[]).join(";")}function Vi(e){return e?e+"px":void 0}var Hi=function(e){function t(e,i){var n;return Ot(this,t),(n=Ft(this,Nt(t).call(this))).cluster_=e,n.styles_=i,n.center_=null,n.div_=null,n.sums_=null,n.visible_=!1,n.style=null,n.setMap(e.getMap()),n}return Bt(t,e),Rt(t,[{key:"onAdd",value:function(){var e,t,i=this,n=this.cluster_.getMarkerClusterer(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return i}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(google.maps.version.split("."),2),o=r[0],s=r[1],a=100*parseInt(o,10)+parseInt(s,10);this.div_=document.createElement("div"),this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){t=e}),google.maps.event.addDomListener(this.div_,"mousedown",function(){e=!0,t=!1}),a>=332&&google.maps.event.addDomListener(this.div_,"touchstart",function(e){e.stopPropagation()}),google.maps.event.addDomListener(this.div_,"click",function(r){if(e=!1,!t){if(google.maps.event.trigger(n,"click",i.cluster_),google.maps.event.trigger(n,"clusterclick",i.cluster_),n.getZoomOnClick()){var o=n.getMaxZoom(),s=i.cluster_.getBounds();n.getMap().fitBounds(s),setTimeout(function(){n.getMap().fitBounds(s),null!==o&&n.getMap().getZoom()>o&&n.getMap().setZoom(o+1)},100)}r.cancelBubble=!0,r.stopPropagation&&r.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){google.maps.event.trigger(n,"mouseover",i.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){google.maps.event.trigger(n,"mouseout",i.cluster_)})}},{key:"onRemove",value:function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)}},{key:"draw",value:function(){if(this.visible_){var e=this.getPosFromLatLng_(this.center_);this.div_.style.top=e.y+"px",this.div_.style.left=e.x+"px"}}},{key:"hide",value:function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1}},{key:"show",value:function(){this.div_&&(this.div_.className=this.className_,this.div_.style.cssText=this.createCss_(this.getPosFromLatLng_(this.center_)),this.div_.innerHTML=(this.style.url?this.getImageElementHtml():"")+this.getLabelDivHtml(),void 0===this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""),this.visible_=!0}},{key:"getLabelDivHtml",value:function(){var e=this.cluster_.getMarkerClusterer().ariaLabelFn(this.sums_.text),t={position:"absolute",top:Vi(this.anchorText_[0]),left:Vi(this.anchorText_[1]),color:this.style.textColor,"font-size":Vi(this.style.textSize),"font-family":this.style.fontFamily,"font-weight":this.style.fontWeight,"font-style":this.style.fontStyle,"text-decoration":this.style.textDecoration,"text-align":"center",width:Vi(this.style.width),"line-height":Vi(this.style.textLineHeight)};return'\n<div aria-label="'.concat(e,'" style="').concat(zi(t),'" tabindex="0">\n <span aria-hidden="true">').concat(this.sums_.text,"</span>\n</div>\n")}},{key:"getImageElementHtml",value:function(){var e=(this.style.backgroundPosition||"0 0").split(" "),t=parseInt(e[0].replace(/^\s+|\s+$/g,""),10),i=parseInt(e[1].replace(/^\s+|\s+$/g,""),10),n={};if(this.cluster_.getMarkerClusterer().getEnableRetinaIcons())n={width:Vi(this.style.width),height:Vi(this.style.height)};else{var r=-1*i,o=-1*t+this.style.width,s=-1*i+this.style.height,a=-1*t;n={clip:"rect(".concat(r,"px, ").concat(o,"px, ").concat(s,"px, ").concat(a,"px)")}}var l=zi(Object.assign({position:"absolute",top:Vi(i),left:Vi(t)},n));return'<img alt="'.concat(this.sums_.text,'" aria-hidden="true" src="').concat(this.style.url,'" style="').concat(l,'"/>')}},{key:"useStyle",value:function(e){this.sums_=e;var t=Math.max(0,e.index-1);t=Math.min(this.styles_.length-1,t),this.style=this.styles_[t],this.anchorText_=this.style.anchorText||[0,0],this.anchorIcon_=this.style.anchorIcon||[Math.floor(this.style.height/2),Math.floor(this.style.width/2)],this.className_=this.cluster_.getMarkerClusterer().getClusterClass()+" "+(this.style.className||"cluster-"+t)}},{key:"setCenter",value:function(e){this.center_=e}},{key:"createCss_",value:function(e){return zi({"z-index":"".concat(this.cluster_.getMarkerClusterer().getZIndex()),top:Vi(e.y),left:Vi(e.x),width:Vi(this.style.width),height:Vi(this.style.height),cursor:"pointer",position:"absolute","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-o-user-select":"none","user-select":"none"})}},{key:"getPosFromLatLng_",value:function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return t.x=Math.floor(t.x-this.anchorIcon_[1]),t.y=Math.floor(t.y-this.anchorIcon_[0]),t}}]),t}(Fi),Ui=function(){function e(t){Ot(this,e),this.markerClusterer_=t,this.map_=this.markerClusterer_.getMap(),this.minClusterSize_=this.markerClusterer_.getMinimumClusterSize(),this.averageCenter_=this.markerClusterer_.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new Hi(this,this.markerClusterer_.getStyles())}return Rt(e,[{key:"getSize",value:function(){return this.markers_.length}},{key:"getMarkers",value:function(){return this.markers_}},{key:"getCenter",value:function(){return this.center_}},{key:"getMap",value:function(){return this.map_}},{key:"getMarkerClusterer",value:function(){return this.markerClusterer_}},{key:"getBounds",value:function(){for(var e=new google.maps.LatLngBounds(this.center_,this.center_),t=this.getMarkers(),i=0;i<t.length;i++)e.extend(t[i].getPosition());return e}},{key:"remove",value:function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_}},{key:"addMarker",value:function(e){if(this.isMarkerAlreadyAdded_(e))return!1;if(this.center_){if(this.averageCenter_){var t=this.markers_.length+1,i=(this.center_.lat()*(t-1)+e.getPosition().lat())/t,n=(this.center_.lng()*(t-1)+e.getPosition().lng())/t;this.center_=new google.maps.LatLng(i,n),this.calculateBounds_()}}else this.center_=e.getPosition(),this.calculateBounds_();e.isAdded=!0,this.markers_.push(e);var r=this.markers_.length,o=this.markerClusterer_.getMaxZoom();if(null!==o&&this.map_.getZoom()>o)e.getMap()!==this.map_&&e.setMap(this.map_);else if(r<this.minClusterSize_)e.getMap()!==this.map_&&e.setMap(this.map_);else if(r===this.minClusterSize_)for(var s=0;s<r;s++)this.markers_[s].setMap(null);else e.setMap(null);return!0}},{key:"isMarkerInClusterBounds",value:function(e){return this.bounds_.contains(e.getPosition())}},{key:"calculateBounds_",value:function(){var e=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(e)}},{key:"updateIcon",value:function(){var e=this.markers_.length,t=this.markerClusterer_.getMaxZoom();if(null!==t&&this.map_.getZoom()>t)this.clusterIcon_.hide();else if(e<this.minClusterSize_)this.clusterIcon_.hide();else{var i=this.markerClusterer_.getStyles().length,n=this.markerClusterer_.getCalculator()(this.markers_,i);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(n),this.clusterIcon_.show()}}},{key:"isMarkerAlreadyAdded_",value:function(e){if(this.markers_.indexOf)return-1!==this.markers_.indexOf(e);for(var t=0;t<this.markers_.length;t++)if(e===this.markers_[t])return!0;return!1}}]),e}(),Wi=function(e,t,i){return void 0!==e[t]?e[t]:i},$i=function(e){function t(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ot(this,t),(i=Ft(this,Nt(t).call(this))).options=r,i.markers_=[],i.clusters_=[],i.listeners_=[],i.activeMap_=null,i.ready_=!1,i.ariaLabelFn=i.options.ariaLabelFn||function(){return""},i.zIndex_=i.options.zIndex||google.maps.Marker.MAX_ZINDEX+1,i.gridSize_=i.options.gridSize||60,i.minClusterSize_=i.options.minimumClusterSize||2,i.maxZoom_=i.options.maxZoom||null,i.styles_=i.options.styles||[],i.title_=i.options.title||"",i.zoomOnClick_=Wi(i.options,"zoomOnClick",!0),i.averageCenter_=Wi(i.options,"averageCenter",!1),i.ignoreHidden_=Wi(i.options,"ignoreHidden",!1),i.enableRetinaIcons_=Wi(i.options,"enableRetinaIcons",!1),i.imagePath_=i.options.imagePath||t.IMAGE_PATH,i.imageExtension_=i.options.imageExtension||t.IMAGE_EXTENSION,i.imageSizes_=i.options.imageSizes||t.IMAGE_SIZES,i.calculator_=i.options.calculator||t.CALCULATOR,i.batchSize_=i.options.batchSize||t.BATCH_SIZE,i.batchSizeIE_=i.options.batchSizeIE||t.BATCH_SIZE_IE,i.clusterClass_=i.options.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(i.batchSize_=i.batchSizeIE_),i.setupStyles_(),i.addMarkers(n,!0),i.setMap(e),i}return Bt(t,e),Rt(t,[{key:"onAdd",value:function(){var e=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.prevZoom_=this.getMap().getZoom(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){var t=e.getMap(),i=t.minZoom||0,n=Math.min(t.maxZoom||100,t.mapTypes[t.getMapTypeId()].maxZoom),r=Math.min(Math.max(e.getMap().getZoom(),i),n);e.prevZoom_!=r&&(e.prevZoom_=r,e.resetViewport_(!1))}),google.maps.event.addListener(this.getMap(),"idle",function(){e.redraw_()})]}},{key:"onRemove",value:function(){for(var e=0;e<this.markers_.length;e++)this.markers_[e].getMap()!==this.activeMap_&&this.markers_[e].setMap(this.activeMap_);for(var t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();this.clusters_=[];for(var i=0;i<this.listeners_.length;i++)google.maps.event.removeListener(this.listeners_[i]);this.listeners_=[],this.activeMap_=null,this.ready_=!1}},{key:"draw",value:function(){}},{key:"setupStyles_",value:function(){if(!(this.styles_.length>0))for(var e=0;e<this.imageSizes_.length;e++){var i=this.imageSizes_[e];this.styles_.push(t.withDefaultStyle({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:i,width:i}))}}},{key:"fitMapToMarkers",value:function(e){for(var t=this.getMarkers(),i=new google.maps.LatLngBounds,n=0;n<t.length;n++)!t[n].getVisible()&&this.getIgnoreHidden()||i.extend(t[n].getPosition());this.getMap().fitBounds(i,e)}},{key:"getGridSize",value:function(){return this.gridSize_}},{key:"setGridSize",value:function(e){this.gridSize_=e}},{key:"getMinimumClusterSize",value:function(){return this.minClusterSize_}},{key:"setMinimumClusterSize",value:function(e){this.minClusterSize_=e}},{key:"getMaxZoom",value:function(){return this.maxZoom_}},{key:"setMaxZoom",value:function(e){this.maxZoom_=e}},{key:"getZIndex",value:function(){return this.zIndex_}},{key:"setZIndex",value:function(e){this.zIndex_=e}},{key:"getStyles",value:function(){return this.styles_}},{key:"setStyles",value:function(e){this.styles_=e}},{key:"getTitle",value:function(){return this.title_}},{key:"setTitle",value:function(e){this.title_=e}},{key:"getZoomOnClick",value:function(){return this.zoomOnClick_}},{key:"setZoomOnClick",value:function(e){this.zoomOnClick_=e}},{key:"getAverageCenter",value:function(){return this.averageCenter_}},{key:"setAverageCenter",value:function(e){this.averageCenter_=e}},{key:"getIgnoreHidden",value:function(){return this.ignoreHidden_}},{key:"setIgnoreHidden",value:function(e){this.ignoreHidden_=e}},{key:"getEnableRetinaIcons",value:function(){return this.enableRetinaIcons_}},{key:"setEnableRetinaIcons",value:function(e){this.enableRetinaIcons_=e}},{key:"getImageExtension",value:function(){return this.imageExtension_}},{key:"setImageExtension",value:function(e){this.imageExtension_=e}},{key:"getImagePath",value:function(){return this.imagePath_}},{key:"setImagePath",value:function(e){this.imagePath_=e}},{key:"getImageSizes",value:function(){return this.imageSizes_}},{key:"setImageSizes",value:function(e){this.imageSizes_=e}},{key:"getCalculator",value:function(){return this.calculator_}},{key:"setCalculator",value:function(e){this.calculator_=e}},{key:"getBatchSizeIE",value:function(){return this.batchSizeIE_}},{key:"setBatchSizeIE",value:function(e){this.batchSizeIE_=e}},{key:"getClusterClass",value:function(){return this.clusterClass_}},{key:"setClusterClass",value:function(e){this.clusterClass_=e}},{key:"getMarkers",value:function(){return this.markers_}},{key:"getTotalMarkers",value:function(){return this.markers_.length}},{key:"getClusters",value:function(){return this.clusters_}},{key:"getTotalClusters",value:function(){return this.clusters_.length}},{key:"addMarker",value:function(e,t){this.pushMarkerTo_(e),t||this.redraw_()}},{key:"addMarkers",value:function(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&this.pushMarkerTo_(e[i]);t||this.redraw_()}},{key:"pushMarkerTo_",value:function(e){var t=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){t.ready_&&(e.isAdded=!1,t.repaint())}),e.isAdded=!1,this.markers_.push(e)}},{key:"removeMarker",value:function(e,t){var i=this.removeMarker_(e);return!t&&i&&this.repaint(),i}},{key:"removeMarkers",value:function(e,t){for(var i=!1,n=0;n<e.length;n++){var r=this.removeMarker_(e[n]);i=i||r}return!t&&i&&this.repaint(),i}},{key:"removeMarker_",value:function(e){var t=-1;if(this.markers_.indexOf)t=this.markers_.indexOf(e);else for(var i=0;i<this.markers_.length;i++)if(e===this.markers_[i]){t=i;break}return-1!==t&&(e.setMap(null),this.markers_.splice(t,1),!0)}},{key:"clearMarkers",value:function(){this.resetViewport_(!0),this.markers_=[]}},{key:"repaint",value:function(){var e=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout(function(){for(var t=0;t<e.length;t++)e[t].remove()},0)}},{key:"getExtendedBounds",value:function(e){var t=this.getProjection(),i=new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()),n=new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()),r=t.fromLatLngToDivPixel(i);r.x+=this.gridSize_,r.y-=this.gridSize_;var o=t.fromLatLngToDivPixel(n);o.x-=this.gridSize_,o.y+=this.gridSize_;var s=t.fromDivPixelToLatLng(r),a=t.fromDivPixelToLatLng(o);return e.extend(s),e.extend(a),e}},{key:"redraw_",value:function(){this.createClusters_(0)}},{key:"resetViewport_",value:function(e){for(var t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();this.clusters_=[];for(var i=0;i<this.markers_.length;i++){var n=this.markers_[i];n.isAdded=!1,e&&n.setMap(null)}}},{key:"distanceBetweenPoints_",value:function(e,t){var i=(t.lat()-e.lat())*Math.PI/180,n=(t.lng()-e.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371}},{key:"isMarkerInBounds_",value:function(e,t){return t.contains(e.getPosition())}},{key:"addToClosestCluster_",value:function(e){for(var t=4e4,i=null,n=0;n<this.clusters_.length;n++){var r=this.clusters_[n],o=r.getCenter();if(o){var s=this.distanceBetweenPoints_(o,e.getPosition());s<t&&(t=s,i=r)}}if(i&&i.isMarkerInClusterBounds(e))i.addMarker(e);else{var a=new Ui(this);a.addMarker(e),this.clusters_.push(a)}}},{key:"createClusters_",value:function(e){var t=this;if(this.ready_){var i;0===e&&(google.maps.event.trigger(this,"clusteringbegin",this),void 0!==this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest
17(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));for(var n=this.getExtendedBounds(i),r=Math.min(e+this.batchSize_,this.markers_.length),o=e;o<r;o++){var s=this.markers_[o];!s.isAdded&&this.isMarkerInBounds_(s,n)&&(!this.ignoreHidden_||this.ignoreHidden_&&s.getVisible())&&this.addToClosestCluster_(s)}if(r<this.markers_.length)this.timerRefStatic=window.setTimeout(function(){t.createClusters_(r)},0);else{delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this);for(var a=0;a<this.clusters_.length;a++)this.clusters_[a].updateIcon()}}}}],[{key:"CALCULATOR",value:function(e,t){for(var i=0,n=e.length,r=n;0!==r;)r=Math.floor(r/10),i++;return i=Math.min(i,t),{text:n.toString(),index:i,title:""}}},{key:"withDefaultStyle",value:function(e){return Object.assign({textColor:"black",textSize:11,textDecoration:"none",textLineHeight:e.height,fontWeight:"bold",fontStyle:"normal",fontFamily:"Arial,sans-serif",backgroundPosition:"0 0"},e)}}]),t}(Fi);return $i.BATCH_SIZE=2e3,$i.BATCH_SIZE_IE=500,$i.IMAGE_PATH="../images/m",$i.IMAGE_EXTENSION="png",$i.IMAGE_SIZES=[53,56,66,78,90],$i},"object"==typeof i&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).MarkerClusterer=r()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(e,t,i){(function(e){(function(){var i,n=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t)=>function(){return t||(0,e[s(e)[0]])((t={exports:{}}).exports,t),t.exports},u=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of s(t))l.call(e,a)||a===i||r(e,a,{get:()=>t[a],enumerable:!(n=o(t,a))||n.enumerable});return e},h=c({"node_modules/@vue/shared/dist/shared.cjs.js"(t){"use strict";function i(e,t){const i=Object.create(null),n=e.split(",");for(let e=0;e<n.length;e++)i[n[e]]=!0;return t?e=>!!i[e.toLowerCase()]:e=>!!i[e]}Object.defineProperty(t,"__esModule",{value:!0});var n={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},r={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},o=i("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");var s="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",a=i(s),l=i(s+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),c=/[>/="'\u0009\u000a\u000c\u0020]/,u={};var h=i("animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width"),d=i("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap");var f=/;
17(?![^(]*\))/g,p=/:(.+)/;function m(e){const t={};return e.split(f).forEach(e=>{if(e){const i=e.split(p);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}var g=i("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),v=i("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),b=i("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),y=/["'&<>]/;var w=/^-?>|<!--|-->|--!>|<!-$/g;function _(e,t){if(e===t)return!0;let i=D(e),n=D(t);if(i||n)return!(!i||!n)&&e.getTime()===t.getTime();if(i=I(e),n=I(t),i||n)return!(!i||!n)&&function(e,t){if(e.length!==t.length)return!1;let i=!0;for(let n=0;i&&n<e.length;n++)i=_(e[n],t[n]);return i}(e,t);if(i=R(e),n=R(t),i||n){if(!i||!n)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e){const n=e.hasOwnProperty(i),r=t.hasOwnProperty(i);if(n&&!r||!n&&r||!_(e[i],t[i]))return!1}}return String(e)===String(t)}var k,x=(e,t)=>M(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,i])=>(e[`${t} =>`]=i,e),{})}:P(t)?{[`Set(${t.size})`]:[...t.values()]}:!R(t)||I(t)||j(t)?t:String(t),C=Object.freeze({}),S=Object.freeze([]),E=/^on[^a-z]/,T=Object.assign,A=Object.prototype.hasOwnProperty,I=Array.isArray,M=e=>"[object Map]"===N(e),P=e=>"[object Set]"===N(e),D=e=>e instanceof Date,O=e=>"function"==typeof e,L=e=>"string"==typeof e,R=e=>null!==e&&"object"==typeof e,B=Object.prototype.toString,N=e=>B.call(e),j=e=>"[object Object]"===N(e),F=i(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),z=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},V=/-(\w)/g,H=z(e=>e.replace(V,(e,t)=>t?t.toUpperCase():"")),U=/\B([A-Z])/g,W=z(e=>e.replace(U,"-$1").toLowerCase()),$=z(e=>e.charAt(0).toUpperCase()+e.slice(1)),G=z(e=>e?`on${$(e)}`:"");t.EMPTY_ARR=S,t.EMPTY_OBJ=C,t.NO=()=>!1,t.NOOP=()=>{},t.PatchFlagNames=n,t.babelParserDefaultPlugins=["bigInt","optionalChaining","nullishCoalescingOperator"],t.camelize=H,t.capitalize=$,t.def=(e,t,i)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:i})},t.escapeHtml=function(e){const t=""+e,i=y.exec(t);if(!i)return t;let n,r,o="",s=0;for(r=i.index;r<t.length;r++){switch(t.charCodeAt(r)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}s!==r&&(o+=t.substring(s,r)),s=r+1,o+=n}return s!==r?o+t.substring(s,r):o},t.escapeHtmlComment=function(e){return e.replace(w,"")},t.extend=T,t.generateCodeFrame=function(e,t=0,i=e.length){let n=e.split(/(\r?\n)/);const r=n.filter((e,t)=>t%2==1);n=n.filter((e,t)=>t%2==0);let o=0;const s=[];for(let e=0;e<n.length;e++)if(o+=n[e].length+(r[e]&&r[e].length||0),o>=t){for(let a=e-2;a<=e+2||i>o;a++){if(a<0||a>=n.length)continue;const l=a+1;s.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${n[a]}`);const c=n[a].length,u=r[a]&&r[a].length||0;if(a===e){const e=t-(o-(c+u)),n=Math.max(1,i>o?c-e:i-t);s.push(" | "+" ".repeat(e)+"^".repeat(n))}else if(a>e){if(i>o){const e=Math.max(Math.min(i-o,c),1);s.push(" | "+"^".repeat(e))}o+=c+u}}break}return s.join("\n")},t.getGlobalThis=()=>k||(k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{}),t.hasChanged=(e,t)=>e!==t&&(e==e||t==t),t.hasOwn=(e,t)=>A.call(e,t),t.hyphenate=W,t.invokeArrayFns=(e,t)=>{for(let i=0;i<e.length;i++)e[i](t)},t.isArray=I,t.isBooleanAttr=l,t.isDate=D,t.isFunction=O,t.isGloballyWhitelisted=o,t.isHTMLTag=g,t.isIntegerKey=e=>L(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,t.isKnownAttr=d,t.isMap=M,t.isModelListener=e=>e.startsWith("onUpdate:"),t.isNoUnitNumericStyleProp=h,t.isObject=R,t.isOn=e=>E.test(e),t.isPlainObject=j,t.isPromise=e=>R(e)&&O(e.then)&&O(e.catch),t.isReservedProp=F,t.isSSRSafeAttrName=function(e){if(u.hasOwnProperty(e))return u[e];const t=c.test(e);return t&&console.error(`unsafe attribute name: ${e}`),u[e]=!t},t.isSVGTag=v,t.isSet=P,t.isSpecialBooleanAttr=a,t.isString=L,t.isSymbol
17=e=>"symbol"==typeof e,t.isVoidTag=b,t.looseEqual=_,t.looseIndexOf=function(e,t){return e.findIndex(e=>_(e,t))},t.makeMap=i,t.normalizeClass=function e(t){let i="";if(L(t))i=t;else if(I(t))for(let n=0;n<t.length;n++){const r=e(t[n]);r&&(i+=r+" ")}else if(R(t))for(const e in t)t[e]&&(i+=e+" ");return i.trim()},t.normalizeStyle=function e(t){if(I(t)){const i={};for(let n=0;n<t.length;n++){const r=t[n],o=e(L(r)?m(r):r);if(o)for(const e in o)i[e]=o[e]}return i}if(R(t))return t},t.objectToString=B,t.parseStringStyle=m,t.propsToAttrMap={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},t.remove=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},t.slotFlagsText=r,t.stringifyStyle=function(e){let t="";if(!e)return t;for(const i in e){const n=e[i],r=i.startsWith("--")?i:W(i);(L(n)||"number"==typeof n&&h(r))&&(t+=`${r}:${n};`)}return t},t.toDisplayString=e=>null==e?"":R(e)?JSON.stringify(e,x,2):String(e),t.toHandlerKey=G,t.toNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t},t.toRawType=e=>N(e).slice(8,-1),t.toTypeString=N}}),d=c({"node_modules/@vue/shared/index.js"(e,t){"use strict";t.exports=h()}}),f=c({"node_modules/@vue/reactivity/dist/reactivity.cjs.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t,i=d(),n=new WeakMap,r=[],o=Symbol("iterate"),s=Symbol("Map key iterate");function a(e,n=i.EMPTY_OBJ){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const o=function(e,i){const n=function(){if(!n.active)return e();if(!r.includes(n)){c(n);try{return p(),r.push(n),t=n,e()}finally{r.pop(),m(),t=r[r.length-1]}}};return n.id=l++,n.allowRecurse=!!i.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=i,n}(e,n);return n.lazy||o(),o}var l=0;function c(e){const{deps:t}=e;if(t.length){for(let i=0;i<t.length;i++)t[i].delete(e);t.length=0}}var u=!0,h=[];function f(){h.push(u),u=!1}function p(){h.push(u),u=!0}function m(){const e=h.pop();u=void 0===e||e}function g(e,i,r){if(!u||void 0===t)return;let o=n.get(e);o||n.set(e,o=new Map);let s=o.get(r);s||o.set(r,s=new Set),s.has(t)||(s.add(t),t.deps.push(s),t.options.onTrack&&t.options.onTrack({effect:t,target:e,type:i,key:r}))}function v(e,r,a,l,c,u){const h=n.get(e);if(!h)return;const d=new Set,f=e=>{e&&e.forEach(e=>{(e!==t||e.allowRecurse)&&d.add(e)})};if("clear"===r)h.forEach(f);
17else if("length"===a&&i.isArray(e))h.forEach((e,t)=>{("length"===t||t>=l)&&f(e)});else switch(void 0!==a&&f(h.get(a)),r){case"add":i.isArray(e)?i.isIntegerKey(a)&&f(h.get("length")):(f(h.get(o)),i.isMap(e)&&f(h.get(s)));break;case"delete":i.isArray(e)||(f(h.get(o)),i.isMap(e)&&f(h.get(s)));break;case"set":i.isMap(e)&&f(h.get(o))}d.forEach(t=>{t.options.onTrigger&&t.options.onTrigger({effect:t,target:e,key:a,type:r,newValue:l,oldValue:c,oldTarget:u}),t.options.scheduler?t.options.scheduler(t):t()})}var b=i.makeMap("__proto__,__v_isRef,__isVue"),y=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(i.isSymbol)),w=E(),_=E(!1,!0),k=E(!0),x=E(!0,!0),C=S();function S(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const i=me(this);for(let e=0,t=this.length;e<t;e++)g(i,"get",e+"");const n=i[t](...e);return-1===n||!1===n?i[t](...e.map(me)):n}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){f();const i=me(this)[t].apply(this,e);return m(),i}}),e}function E(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_raw"===r&&o===(e?t?le:ae:t?se:oe).get(n))return n;const s=i.isArray(n);if(!e&&s&&i.hasOwn(C,r))return Reflect.get(C,r,o);const a=Reflect.get(n,r,o);if(i.isSymbol(r)?y.has(r):b(r))return a;if(e||g(n,"get",r),t)return a;
17if(ve(a)){return!s||!i.isIntegerKey(r)?a.value:a}return i.isObject(a)?e?ue(a):ce(a):a}}var T=I(),A=I(!0);function I(e=!1){return function(t,n,r,o){let s=t[n];if(!e&&(r=me(r),s=me(s),!i.isArray(t)&&ve(s)&&!ve(r)))return s.value=r,!0;const a=i.isArray(t)&&i.isIntegerKey(n)?Number(n)<t.length:i.hasOwn(t,n),l=Reflect.set(t,n,r,o);return t===me(o)&&(a?i.hasChanged(r,s)&&v(t,"set",n,r,s):v(t,"add",n,r)),l}}var M={get:w,set:T,deleteProperty:function(e,t){const n=i.hasOwn(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&v(e,"delete",t,void 0,r),o},has:function(e,t){const n=Reflect.has(e,t);return i.isSymbol(t)&&y.has(t)||g(e,"has",t),n},ownKeys:function(e){return g(e,"iterate",i.isArray(e)?"length":o),Reflect.ownKeys(e)}},P={get:k,set:(e,t)=>(console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0),deleteProperty:(e,t)=>(console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0)},D=i.extend({},M,{get:_,set:A}),O=i.extend({},P,{get:x}),L=e=>i.isObject(e)?ce(e):e,R=e=>i.isObject(e)?ue(e):e,B=e=>e,N=e=>Reflect.getPrototypeOf(e);function j(e,t,i=!1,n=!1){const r=me(e=e.__v_raw),o=me(t);t!==o&&!i&&g(r,"get",t),!i&&g(r,"get",o);const{has:s}=N(r),a=n?B:i?R:L;return s.call(r,t)?a(e.get(t)):s.call(r,o)?a(e.get(o)):void(e!==r&&e.get(t))}function F(e,t=!1){const i=this.__v_raw,n=me(i),r=me(e);return e!==r&&!t&&g(n,"has",e),!t&&g(n,"has",r),e===r?i.has(e):i.has(e)||i.has(r)}function z(e,t=!1){return e=e.__v_raw,!t&&g(me(e),"iterate",o),Reflect.get(e,"size",e)}function V(e){e=me(e);const t=me(this);return N(t).has.call(t,e)||(t.add(e),v(t,"add",e,e)),this}function H(e,t){t=me(t);const n=me(this),{has:r,get:o}=N(n);let s=r.call(n,e);s?re(n,r,e):(e=me(e),s=r.call(n,e));const a=o.call(n,e);return n.set(e,t),s?i.hasChanged(t,a)&&v(n,"set",e,t,a):v(n,"add",e,t),this}function U(e){const t=me(this),{has:i,get:n}=N(t);let r=i.call(t,e);r?re(t,i,e):(e=me(e),r=i.call(t,e));const o=n?n.call(t,e):void 0,s=t.delete(e);return r&&v(t,"delete",e,void 0,o),s}function W(){const e=me(this),t=0!==e.size,n=i.isMap(e)?new Map(e):new Set(e),r=e.clear();return t&&v(e,"clear",void 0,void 0,n),r}function $(e,t){return function(i,n){const r=this,s=r.__v_raw,a=me(s),l=t?B:e?R:L;
17return!e&&g(a,"iterate",o),s.forEach((e,t)=>i.call(n,l(e),l(t),r))}}function G(e,t,n){return function(...r){const a=this.__v_raw,l=me(a),c=i.isMap(l),u="entries"===e||e===Symbol.iterator&&c,h="keys"===e&&c,d=a[e](...r),f=n?B:t?R:L;return!t&&g(l,"iterate",h?s:o),{next(){const{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:u?[f(e[0]),f(e[1])]:f(e),done:t}},[Symbol.iterator](){return this}}}}function q(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${i.capitalize(e)} operation ${n}failed: target is readonly.`,me(this))}return"delete"!==e&&this}}function Y(){const e={get(e){return j(this,e)},get size(){return z(this)},has:F,add:V,set:H,delete:U,clear:W,forEach:$(!1,!1)},t={get(e){return j(this,e,!1,!0)},get size(){return z(this)},has:F,add:V,set:H,delete:U,clear:W,forEach:$(!1,!0)},i={get(e){return j(this,e,!0)},get size(){return z(this,!0)},has(e){return F.call(this,e,!0)},add:q("add"),set:q("set"),delete:q("delete"),clear:q("clear"),forEach:$(!0,!1)},n={get(e){return j(this,e,!0,!0)},get size(){return z(this,!0)},has(e){return F.call(this,e,!0)},add:q("add"),set:q("set"),delete:q("delete"),clear:q("clear"),forEach:$(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=G(r,!1,!1),i[r]=G(r,!0,!1),t[r]=G(r,!1,!0),n[r]=G(r,!0,!0)}),[e,i,t,n]}var[Z,X,K,J]=Y();function Q(e,t){const n=t?e?J:K:e?X:Z;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(i.hasOwn(n,r)&&r in t?n:t,r,o)}var ee={get:Q(!1,!1)},te={get:Q(!1,!0)},ie={get:Q(!0,!1)},ne={get:Q(!0,!0)};function re(e,t,n){const r=me(n);if(r!==n&&t.call(e,r)){const t=i.toRawType(e);console.warn(`Reactive ${t} contains both the raw and reactive versions of the same object${"Map"===t?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var oe=new WeakMap,se=new WeakMap,ae=new WeakMap,le=new WeakMap;function ce(e){return e&&e.__v_isReadonly?e:he(e,!1,M,ee,oe)}function ue(e){return he(e,!0,P,ie,ae)}function he(e,t,n,r,o){if(!i.isObject(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const a=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(i.toRawType(l));var l;if(0===a)return e;const c=new Proxy(e,2===a?r:n);return o.set(e,c),c}function de(e){return fe(e)?de(e.__v_raw):!(!e||!e.__v_isReactive)}function fe(e){return!(!e||!e.__v_isReadonly)}function pe(e){return de(e)||fe(e)}function me(e){return e&&me(e.__v_raw)||e}var ge=e=>i.isObject(e)?ce(e):e;function ve(e){return Boolean(e&&!0===e.__v_isRef)}var be=class{constructor(e,t=!1){this._shallow=t,this.__v_isRef=!0,this._rawValue=t?e:me(e),this._value=t?e:ge(e)}get value(){return g(me(this),"get","value"),this._value}set value(e){e=this._shallow?e:me(e),i.hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:ge(e),v(me(this),"set","value",e))}};function ye(e,t=!1){return ve(e)?e:new be(e,t)}function we(e){return ve(e)?e.value:e}var _e={get:(e,t,i)=>we(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const r=e[t];return ve(r)&&!ve(i)?(r.value=i,!0):Reflect.set(e,t,i,n)}};var ke=class{constructor(e){this.__v_isRef=!0;const{get:t,set:i}=e(()=>g(this,"get","value"),()=>v(this,"set","value"));this._get=t,this._set=i}get value(){return this._get()}set value(e){this._set(e)}};var xe=class{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}};function Ce(e,t){return ve(e[t])?e[t]:new xe(e,t)}var Se=class{constructor(e,t,i){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=a(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,v(me(this),"set","value"))}}),this.__v_isReadonly=i}get value(){const e=me(this);return e._dirty&&(e._value=this.effect(),e._dirty=!1),g(e,"get","value"),e._value}set value(e){this._setter(e)}};e.ITERATE_KEY=o,e.computed=function(e){let t,n;return i.isFunction(e)?(t=e,n=()=>{console.warn("Write operation failed: computed value is readonly")}):(t=e.get,n=e.set),new Se(t,n,i.isFunction(e)||!e.set)},e.customRef=function(e){return new ke(e)},e.effect=a,e.enableTracking=p,e.isProxy=pe,e.isReactive=de,e.isReadonly=fe,e.isRef=ve,e.markRaw=function(e){return i.def(e,"__v_skip",!0),e},e.pauseTracking=f,e.proxyRefs=function(e){return de(e)?e:new Proxy(e,_e)},e.reactive=ce,e.readonly=ue,e.ref=function(e){return ye(e)},e.resetTracking=m,e.shallowReactive=function(e){return he(e,!1,D,te,se)},e.shallowReadonly=function(e){return he(e,!0,O,ne,le)},e.shallowRef=function(e){return ye(e,!0)},e.stop=function(e){e.active&&(c(e),e.options.onStop&&e.options.onStop(),e.active=!1)},e.toRaw=me,e.toRef=Ce,e.toRefs=function(e){pe(e)||console.warn("toRefs() expects a reactive object but received a plain one.");const t=i.isArray(e)?new Array(e.length):{};for(const i in e)t[i]=Ce(e,i);return t},e.track=g,e.trigger=v,e.triggerRef=function(e){v(me(e),"set","value",e.value)},e.unref=we}}),p=c({"node_modules/@vue/reactivity/index.js"(e,t){"use strict";
17t.exports=f()}}),m={};((e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(m,{default:()=>Wt}),t.exports=(i=m,u(r({},"__esModule",{value:!0}),i));var g,v,b,y,w=!1,_=!1,k=[],x=-1;function C(e){!function(e){k.includes(e)||k.push(e);_||w||(w=!0,queueMicrotask(E))}(e)}function S(e){let t=k.indexOf(e);-1!==t&&t>x&&k.splice(t,1)}function E(){w=!1,_=!0;for(let e=0;e<k.length;e++)k[e](),x=e;k.length=0,x=-1,_=!1}var T=!0;function A(e){v=e}function I(e,t,i={}){e.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0,cancelable:!0}))}function M(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach(e=>M(e,t));let i=!1;if(t(e,()=>i=!0),i)return;let n=e.firstElementChild;for(;n;)M(n,t),n=n.nextElementSibling}function P(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var D=!1;var O=[],L=[];function R(){return O.map(e=>e())}function B(){return O.concat(L).map(e=>e())}function N(e){O.push(e)}function j(e){L.push(e)}function F(e,t=!1){return z(e,e=>{if((t?B():R()).some(t=>e.matches(t)))return!0})}function z(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),e.parentElement)return z(e.parentElement,t)}}var V=[];function H(e,t=M,i=()=>{}){!function(e){Re=!0;let t=Symbol();Ne=t,Be.set(t,[]);let i=()=>{for(;Be.get(t).length;)Be.get(t).shift()();Be.delete(t)},n=()=>{Re=!1,i()};e(i),n()}(()=>{t(e,(e,t)=>{i(e,t),V.forEach(i=>i(e,t)),Oe(e,e.attributes).forEach(e=>e()),e._x_ignore&&t()})})}function U(e){M(e,e=>{X(e),function(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}(e)})}var W=[],$=[],G=[];function q(e,t){"function"==typeof t?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,$.push(t))}function Y(e){W.push(e)}function Z(e,t,i){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(i)}function X(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([i,n])=>{(void 0===t||t.includes(i))&&(n.forEach(e=>e()),delete e._x_attributeCleanups[i])})}var K=new MutationObserver(se),J=!1;function Q(){K.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),J=!0}function ee(){(te=te.concat(K.takeRecords())).length&&!ie&&(ie=!0,queueMicrotask(()=>{se(te),te.length=0,ie=!1})),K.disconnect(),J=!1}var te=[],ie=!1;function ne(e){if(!J)return e();ee();let t=e();return Q(),t}var re=!1,oe=[];function se(e){if(re)return void(oe=oe.concat(e));let t=[],i=[],n=new Map,r=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&("childList"===e[o].type&&(e[o].addedNodes.forEach(e=>1===e.nodeType&&t.push(e)),e[o].removedNodes.forEach(e=>1===e.nodeType&&i.push(e))),"attributes"===e[o].type)){let t=e[o].target,i=e[o].attributeName,s=e[o].oldValue,a=()=>{n.has(t)||n.set(t,[]),n.get(t).push({name:i,value:t.getAttribute(i)})},l=()=>{r.has(t)||r.set(t,[]),r.get(t).push(i)};t.hasAttribute(i)&&null===s?a():t.hasAttribute(i)?(l(),a()):l()}r.forEach((e,t)=>{X(t,e)}),n.forEach((e,t)=>{W.forEach(i=>i(t,e))});for(let e of i)t.includes(e)||($.forEach(t=>t(e)),U(e));t.forEach(e=>{e._x_ignoreSelf=!0,e._x_ignore=!0});for(let e of t)i.includes(e)||e.isConnected&&(delete e._x_ignoreSelf,delete e._x_ignore,G.forEach(t=>t(e)),e._x_ignore=!0,e._x_ignoreSelf=!0);t.forEach(e=>{delete e._x_ignoreSelf,delete e._x_ignore}),t=null,i=null,n=null,r=null}function ae(e){return ue(ce(e))}function le(e,t,i){return e._x_dataStack=[t,...ce(i||e)],()=>{e._x_dataStack=e._x_dataStack.filter(e=>e!==t)}}function ce(e){return e._x_dataStack?e._x_dataStack:"function"==typeof ShadowRoot&&e instanceof ShadowRoot?ce(e.host):e.parentNode?ce(e.parentNode):[]}function ue(e){return new Proxy({objects:e},he)}var he={ownKeys:({objects:e})=>Array.from(new Set(e.flatMap(e=>Object.keys(e)))),has:({objects:e},t)=>t!=Symbol.unscopables&&e.some(e=>Object.prototype.hasOwnProperty.call(e,t)),get:({objects:e},t,i)=>"toJSON"==t?de:Reflect.get(e.find(e=>Object.prototype.hasOwnProperty.call(e,t))||{},t,i),set({objects:e},t,i,n){const r=e.find(e=>Object.prototype.hasOwnProperty.call(e,t))||e[e.length-1],o=Object.getOwnPropertyDescriptor(r,t);return(null==o?void 0:o.set)&&(null==o?void 0:o.get)?Reflect.set(r,t,i,n):Reflect.set(r,t,i)}};function de(){return Reflect.ownKeys(this).reduce((e,t)=>
17(e[t]=Reflect.get(this,t),e),{})}function fe(e){let t=(i,n="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([r,{value:o,enumerable:s}])=>{if(!1===s||void 0===o)return;let a=""===n?r:`${n}.${r}`;var l;"object"==typeof o&&null!==o&&o._x_interceptor?i[r]=o.initialize(e,a,r):"object"!=typeof(l=o)||Array.isArray(l)||null===l||o===i||o instanceof Element||t(o,a)})};return t(e)}function pe(e,t=()=>{}){let i={initialValue:void 0,_x_interceptor:!0,initialize(t,i,n){return e(this.initialValue,()=>function(e,t){return t.split(".").reduce((e,t)=>e[t],e)}(t,i),e=>me(t,i,e),i,n)}};return t(i),e=>{if("object"==typeof e&&null!==e&&e._x_interceptor){let t=i.initialize.bind(i);i.initialize=(n,r,o)=>{let s=e.initialize(n,r,o);return i.initialValue=s,t(n,r,o)}}else i.initialValue=e;return i}}function me(e,t,i){if("string"==typeof t&&(t=t.split(".")),1!==t.length){if(0===t.length)throw error;return e[t[0]]||(e[t[0]]={}),me(e[t[0]],t.slice(1),i)}e[t[0]]=i}var ge={};function ve(e,t){ge[e]=t}function be(e,t){return Object.entries(ge).forEach(([i,n])=>{let r=null;Object.defineProperty(e,`$${i}`,{get:()=>n(t,function(){if(r)return r;{let[e,i]=je(t);return r={interceptor:pe,...e},q(t,i),r}}()),enumerable:!1})}),e}function ye(e,t,i,...n){try{return i(...n)}catch(i){we(i,e,t)}}function we(e,t,i=void 0){Object.assign(e,{el:t,expression:i}),console.warn(`Alpine Expression Error: ${e.message}\n\n${i?'Expression: "'+i+'"\n\n':""}`,t),setTimeout(()=>{throw e},0)}var _e=!0;function ke(e){let t=_e;_e=!1;let i=e();return _e=t,i}function xe(e,t,i={}){let n;return Ce(e,t)(e=>n=e,i),n}function Ce(...e){return Se(...e)}var Se=Ee;function Ee(e,t){let i={};be(i,e);let n=[i,...ce(e)],r="function"==typeof t?function(e,t){return(i=()=>{},{scope:n={},params:r=[]}={})=>{Ae(i,t.apply(ue([n,...e]),r))}}(n,t):function(e,t,i){let n=function(e,t){if(Te[e])return Te[e];let i=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e;const r=()=>{try{let t=new i(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`);return Object.defineProperty(t,"name",{value:`[Alpine] ${e}`}),t}catch(i){return we(i,t,e),Promise.resolve()}};let o=r();return Te[e]=o,o}(t,i);return(r=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=ue([o,...e]);if("function"==typeof n){let e=n(n,a).catch(e=>we(e,i,t));n.finished?(Ae(r,n.result,a,s,i),n.result=void 0):e.then(e=>{Ae(r,e,a,s,i)}).catch(e=>we(e,i,t)).finally(()=>n.result=void 0)}}}(n,t,e);return ye.bind(null,e,t,r)}var Te={};function Ae(e,t,i,n,r){if(_e&&"function"==typeof t){let o=t.apply(i,n);o instanceof Promise?o.then(t=>Ae(e,t,i,n)).catch(e=>we(e,r,t)):e(o)}else"object"==typeof t&&t instanceof Promise?t.then(t=>e(t)):e(t)}var Ie="x-";function Me(e=""){return Ie+e}var Pe={};function De(e,t){return Pe[e]=t,{before(t){if(!Pe[t])return void console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");const i=Ge.indexOf(t);Ge.splice(i>=0?i:Ge.indexOf("DEFAULT"),0,e)}}}function Oe(e,t,i){if(t=Array.from(t),e._x_virtualDirectives){let i=Object.entries(e._x_virtualDirectives).map(([e,t])=>({name:e,value:t})),n=Le(i);i=i.map(e=>n.find(t=>t.name===e.name)?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e),t=t.concat(i)}let n={},r=t.map(ze((e,t)=>n[e]=t)).filter(Ue).map(function(e,t){return({name:i,value:n})=>{let r=i.match(We()),o=i.match(/:([a-zA-Z0-9\-_:]+)/),s=i.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[i]||i;return{type:r?r[1]:null,value:o?o[1]:null,modifiers:s.map(e=>e.replace(".","")),expression:n,original:a}}}(n,i)).sort(qe);return r.map(t=>function(e,t){let i=()=>{},n=Pe[t.type]||i,[r,o]=je(e);Z(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,r),n=n.bind(n,e,t,r),Re?Be.get(Ne).push(n):n())};return s.runCleanups=o,s}(e,t))}function Le(e){return Array.from(e).map(ze()).filter(e=>!Ue(e))}var Re=!1,Be=new Map,Ne=Symbol();function je(e){let t=[],[i,n]=function(e){let t=()=>{};return[i=>{let n=v(i);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>
17{e._x_effects.forEach(e=>e())}),e._x_effects.add(n),t=()=>{void 0!==n&&(e._x_effects.delete(n),b(n))},n},()=>{t()}]}(e);t.push(n);return[{Alpine:Tt,effect:i,cleanup:e=>t.push(e),evaluateLater:Ce.bind(Ce,e),evaluate:xe.bind(xe,e)},()=>t.forEach(e=>e())]}var Fe=(e,t)=>({name:i,value:n})=>(i.startsWith(e)&&(i=i.replace(e,t)),{name:i,value:n});function ze(e=()=>{}){return({name:t,value:i})=>{let{name:n,value:r}=Ve.reduce((e,t)=>t(e),{name:t,value:i});return n!==t&&e(n,t),{name:n,value:r}}}var Ve=[];function He(e){Ve.push(e)}function Ue({name:e}){return We().test(e)}var We=()=>new RegExp(`^${Ie}([^:^.]+)\\b`);var $e="DEFAULT",Ge=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",$e,"teleport"];function qe(e,t){let i=-1===Ge.indexOf(e.type)?$e:e.type,n=-1===Ge.indexOf(t.type)?$e:t.type;return Ge.indexOf(i)-Ge.indexOf(n)}var Ye=[],Ze=!1;function Xe(e=()=>{}){return queueMicrotask(()=>{Ze||setTimeout(()=>{Ke()})}),new Promise(t=>{Ye.push(()=>{e(),t()})})}function Ke(){for(Ze=!1;Ye.length;)Ye.shift()()}function Je(e,t){return Array.isArray(t)?Qe(e,t.join(" ")):"object"==typeof t&&null!==t?function(e,t){let i=e=>e.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([e,t])=>!!t&&i(e)).filter(Boolean),r=Object.entries(t).flatMap(([e,t])=>!t&&i(e)).filter(Boolean),o=[],s=[];return r.forEach(t=>{e.classList.contains(t)&&(e.classList.remove(t),s.push(t))}),n.forEach(t=>{e.classList.contains(t)||(e.classList.add(t),o.push(t))}),()=>{s.forEach(t=>e.classList.add(t)),o.forEach(t=>e.classList.remove(t))}}(e,t):"function"==typeof t?Je(e,t()):Qe(e,t)}function Qe(e,t){return t=!0===t?t="":t||"",i=t.split(" ").filter(t=>!e.classList.contains(t)).filter(Boolean),e.classList.add(...i),()=>{e.classList.remove(...i)};var i}function et(e,t){return"object"==typeof t&&null!==t?function(e,t){let i={};return Object.entries(t).forEach(([t,n])=>{i[t]=e.style[t],t.startsWith("--")||(t=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),e.style.setProperty(t,n)}),setTimeout(()=>{0===e.style.length&&e.removeAttribute("style")}),()=>{et(e,i)}}(e,t):function(e,t){let i=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",i||"")}}(e,t)}function tt(e,t=()=>{}){let i=!1;return function(){i?t.apply(this,arguments):(i=!0,e.apply(this,arguments))}}function it(e,t,i={}){e._x_transition||(e._x_transition={enter:{during:i,start:i,end:i},leave:{during:i,start:i,end:i},in(i=()=>{},n=()=>{}){rt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},i,n)},out(i=()=>{},n=()=>{}){rt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},i,n)}})}function nt(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:nt(t)}function rt(e,t,{during:i,start:n,end:r}={},o=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),0===Object.keys(i).length&&0===Object.keys(n).length&&0===Object.keys(r).length)return o(),void s();let a,l,c;!function(e,t){let i,n,r,o=tt(()=>{ne(()=>{i=!0,n||t.before(),r||(t.end(),Ke()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(e){this.beforeCancels.push(e)},cancel:tt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},ne(()=>{t.start(),t.during()}),Ze=!0,requestAnimationFrame(()=>{if(i)return;let o=1e3*Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s","")),s=1e3*Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""));0===o&&(o=1e3*Number(getComputedStyle(e).animationDuration.replace("s",""))),ne(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{i||(ne(()=>{t.end()}),Ke(),setTimeout(e._x_transitioning.finish,o+s),r=!0)})})}(e,{start(){a=t(e,n)},during(){l=t(e,i)},before:o,end(){a(),c=t(e,r)},after:s,cleanup(){l(),c()}})}function ot(e,t,i){if(-1===e.indexOf(t))return i;const n=e[e.indexOf(t)+1];if(!n)return i;if("scale"===t&&isNaN(n))return i;if("duration"===t||"delay"===t){let e=n.match(/([0-9]+)ms/);if(e)return e[1]}return"origin"===t&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}De("transition",(e,{value:t,modifiers:i,expression:n},{evaluate:r})=>{"function"==typeof n&&(n=r(n)),!1!==n&&(n&&"boolean"!=typeof n?function(e,t,i){it(e,Je,"");let n={enter:t=>{e._x_transition.enter.during=t},"enter-start":t=>{e._x_transition.enter.start=t},"enter-end":t=>{e._x_transition.enter.end=t},leave:t=>{e._x_transition.leave.during=t},"leave-start":t=>{e._x_transition.leave.start=t},"leave-end":t=>{e._x_transition.leave.end=t}};n[i](t)}(e,n,t):function(e,t,i){it(e,et);let n=!t.includes("in")&&!t.includes("out")&&!i,r=n||t.includes("in")||["enter"].includes(i),o=n||t.includes("out")||["leave"].includes(i);t.includes("in")&&!n&&(t=t.filter((e,i)=>i<t.indexOf("out")));t.includes("out")&&!n&&(t=t.filter((e,i)=>i>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,u=l?ot(t,"scale",95)/100:1,h=ot(t,"delay",0)/1e3,d=ot(t,"origin","center"),f="opacity, transform",p=ot(t,"duration",150)/1e3,m=ot(t,"duration",75)/1e3,g="cubic-bezier(0.4, 0.0, 0.2, 1)";r&&(e._x_transition.enter.during={transformOrigin:d,transitionDelay:`${h}s`,transitionProperty:f,transitionDuration:`${p}s`,transitionTimingFunction:g},e._x_transition.enter.start={opacity:c,transform:`scale(${u})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"});o&&(e._x_transition.leave.during={transformOrigin:d,transitionDelay:`${h}s`,transitionProperty:f,transitionDuration:`${m}s`,transitionTimingFunction:g},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${u})`})}(e,i,t))}),window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,i,n){const r="visible"===document.visibilityState?requestAnimationFrame:setTimeout;let o=()=>r(i);t?e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(i):o():e._x_transition?e._x_transition.in(i):o():(e._x_hidePromise=e._x_transition?new Promise((t,i)=>{e._x_transition.out(()=>{},()=>t(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>i({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let t=nt(e);t?(t._x_hideChildren||(t._x_hideChildren=[]),t._x_hideChildren.push(e)):r(()=>{let t=e=>{let i=Promise.all([e._x_hidePromise,...(e._x_hideChildren||[]).map(t)]).then(([e])=>e());return delete e._x_hidePromise,delete e._x_hideChildren,i};t(e).catch(e=>{if(!e.isFromCancelledTransition)throw e})})}))};var st=!1;function at(e,t=()=>{}){return(...i)=>
17st?t(...i):e(...i)}var lt=[];function ct(e){lt.push(e)}var ut=!1;function ht(e){let t=v;A((e,i)=>{let n=t(e);return b(n),()=>{}}),e(),A(t)}function dt(e,t,i,n=[]){switch(e._x_bindings||(e._x_bindings=g({})),e._x_bindings[t]=i,t=n.includes("camel")?t.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase()):t){case"value":!function(e,t){if("radio"===e.type)void 0===e.attributes.value&&(e.value=t),window.fromModel&&(e.checked="boolean"==typeof t?mt(e.value)===t:pt(e.value,t));else if("checkbox"===e.type)Number.isInteger(t)?e.value=t:Array.isArray(t)||"boolean"==typeof t||[null,void 0].includes(t)?Array.isArray(t)?e.checked=t.some(t=>pt(t,e.value)):e.checked=!!t:e.value=String(t);else if("SELECT"===e.tagName)!function(e,t){const i=[].concat(t).map(e=>e+"");Array.from(e.options).forEach(e=>{e.selected=i.includes(e.value)})}(e,t);else{if(e.value===t)return;e.value=void 0===t?"":t}}(e,i);break;case"style":!function(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles();e._x_undoAddedStyles=et(e,t)}(e,i);break;case"class":!function(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses();e._x_undoAddedClasses=Je(e,t)}(e,i);break;case"selected":case"checked":!function(e,t,i){ft(e,t,i),function(e,t,i){e[t]!==i&&(e[t]=i)}(e,t,i)}(e,t,i);break;default:ft(e,t,i)}}function ft(e,t,i){[null,void 0,!1].includes(i)&&function(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}(t)?e.removeAttribute(t):(gt(t)&&(i=t),function(e,t,i){e.getAttribute(t)!=i&&e.setAttribute(t,i)}(e,t,i))}function pt(e,t){return e==t}function mt(e){return!![1,"1","true","on","yes",!0].includes(e)||![0,"0","false","off","no",!1].includes(e)&&(e?Boolean(e):null)}function gt(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function vt(e,t,i){let n=e.getAttribute(t);return null===n?"function"==typeof i?i():i:""===n||(gt(t)?!![t,"true"].includes(n):n)}function bt(e,t){var i;return function(){var n=this,r=arguments;clearTimeout(i),i=setTimeout(function(){i=null,e.apply(n,r)},t)}}function yt(e,t){let i;return function(){let n=this,r=arguments;i||(e.apply(n,r),i=!0,setTimeout(()=>i=!1,t))}}function wt({get:e,set:t},{get:i,set:n}){let r,o=!0,s=v(()=>{const s=e(),a=i();if(o)n(_t(s)),o=!1,r=JSON.stringify(s);else{const e=JSON.stringify(s);e!==r?(n(_t(s)),r=e):(t(_t(a)),r=JSON.stringify(a))}JSON.stringify(i()),JSON.stringify(e())});return()=>{b(s)}}function _t(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var kt={},xt=!1;var Ct={};function St(e,t,i){let n=[];for(;n.length;)n.pop()();let r=Object.entries(t).map(([e,t])=>({name:e,value:t})),o=Le(r);return r=r.map(e=>o.find(t=>t.name===e.name)?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e),Oe(e,r,i).map(e=>{n.push(e.runCleanups),e()}),()=>{for(;n.length;)n.pop()()}}var Et={};var Tt={get reactive(){return g},get release(){return b},get effect(){return v},get raw(){return y},version:"3.13.3",flushAndStopDeferringMutations:function(){re=!1,se(oe),oe=[]},dontAutoEvaluateFunctions:ke,disableEffectScheduling:function(e){T=!1,e(),T=!0},startObservingMutations:Q,stopObservingMutations:ee,setReactivityEngine:function(e){g=e.reactive,b=e.release,v=t=>e.effect(t,{scheduler:e=>{T?C(e):e()}}),y=e.raw},onAttributeRemoved:Z,onAttributesAdded:Y,closestDataStack:ce,skipDuringClone:at,onlyDuringClone:function(e){return(...t)=>st&&e(...t)},addRootSelector:N,addInitSelector:j,interceptClone:ct,addScopeToNode:le,deferMutations:function(){re=!0},mapAttributes:He,evaluateLater:Ce,interceptInit:function(e){V.push(e)},setEvaluator:function(e){Se=e},mergeProxies:ue,extractProp:function(e,t,i,n=!0){if(e._x_bindings&&void 0!==e._x_bindings[t])return e._x_bindings[t];if(e._x_inlineBindings&&void 0!==e._x_inlineBindings[t]){let i=e._x_inlineBindings[t];return i.extract=n,ke(()=>xe(e,i.expression))}return vt(e,t,i)},findClosest:z,onElRemoved:q,closestRoot:F,destroyTree:U,interceptor:pe,transition:rt,setStyles:et,mutateDom:ne,directive:De,entangle:wt,throttle:yt,debounce:bt,evaluate:xe,initTree:H,nextTick:Xe,prefixed:Me,prefix:function(e){Ie=e}
17,plugin:function(e){(Array.isArray(e)?e:[e]).forEach(e=>e(Tt))},magic:ve,store:function(e,t){if(xt||(kt=g(kt),xt=!0),void 0===t)return kt[e];kt[e]=t,"object"==typeof t&&null!==t&&t.hasOwnProperty("init")&&"function"==typeof t.init&&kt[e].init(),fe(kt[e])},start:function(){var e;D&&P("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),D=!0,document.body||P("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),I(document,"alpine:init"),I(document,"alpine:initializing"),Q(),e=e=>H(e,M),G.push(e),q(e=>U(e)),Y((e,t)=>{Oe(e,t).forEach(e=>e())}),Array.from(document.querySelectorAll(B().join(","))).filter(e=>!F(e.parentElement,!0)).forEach(e=>{H(e)}),I(document,"alpine:initialized")},clone:function(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),st=!0,ut=!0,ht(()=>{!function(e){let t=!1;H(e,(e,i)=>{M(e,(e,n)=>{if(t&&function(e){return R().some(t=>e.matches(t))}(e))return n();t=!0,i(e,n)})})}(t)}),st=!1,ut=!1},cloneNode:function(e,t){lt.forEach(i=>i(e,t)),st=!0,ht(()=>{H(t,(e,t)=>{t(e,()=>{})})}),st=!1},bound:function(e,t,i){return e._x_bindings&&void 0!==e._x_bindings[t]?e._x_bindings[t]:vt(e,t,i)},$data:ae,walk:M,data:function(e,t){Et[e]=t},bind:function(e,t){let i="function"!=typeof t?()=>t:t;return e instanceof Element?St(e,i()):(Ct[e]=i,()=>{})}},At=((e,t,i)=>(i=null!=e?n(a(e)):{},u(!t&&e&&e.__esModule?i:r(i,"default",{value:e,enumerable:!0}),e)))(p());ve("nextTick",()=>Xe),ve("dispatch",e=>I.bind(I,e)),ve("watch",(e,{evaluateLater:t,effect:i})=>(n,r)=>{let o,s=t(n),a=!0,l=i(()=>s(e=>{JSON.stringify(e),a?o=e:queueMicrotask(()=>{r(e,o),o=e}),a=!1}));e._x_effects.delete(l)}),ve("store",function(){return kt}),ve("data",e=>ae(e)),ve("root",e=>F(e)),ve("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=ue(function(e){let t=[],i=e;for(;i;)i._x_refs&&t.push(i._x_refs),i=i.parentNode;return t}(e))),e._x_refs_proxy));var It={};function Mt(e){return It[e]||(It[e]=0),++It[e]}function Pt(e,t,i){ve(t,n=>P(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${i}`,n))}ve("id",e=>(t,i=null)=>{let n=function(e,t){return z(e,e=>{if(e._x_ids&&e._x_ids[t])return!0})}(e,t),r=n?n._x_ids[t]:Mt(t);return i?`${t}-${r}-${i}`:`${t}-${r}`}),ve("el",e=>e),Pt("Focus","focus","focus"),Pt("Persist","persist","persist"),De("modelable",(e,{expression:t},{effect:i,evaluateLater:n,cleanup:r})=>{let o=n(t),s=()=>{let e;return o(t=>e=t),e},a=n(`${t} = __placeholder`),l=e=>a(()=>{},{scope:{__placeholder:e}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let t=e._x_model.get,i=e._x_model.set,n=wt({get:()=>t(),set(e){i(e)}},{get:()=>s(),set(e){l(e)}});r(n)})}),De("teleport",(e,{modifiers:t,expression:i},{cleanup:n})=>{"template"!==e.tagName.toLowerCase()&&P("x-teleport can only be used on a <template> tag",e);let r=Ot(i),o=e.content.cloneNode(!0).firstElementChild;e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents&&e._x_forwardEvents.forEach(t=>{o.addEventListener(t,t=>{t.stopPropagation(),e.dispatchEvent(new t.constructor(t.type,t))})}),le(o,{},e);let s=(e,t,i)=>{i.includes("prepend")?t.parentNode.insertBefore(e,t):i.includes("append")?t.parentNode.insertBefore(e,t.nextSibling):t.appendChild(e)};ne(()=>{s(o,r,t),H(o),o._x_ignore=!0}),e._x_teleportPutBack=()=>{let n=Ot(i);ne(()=>{s(e._x_teleport,n,t)})},n(()=>o.remove())});var Dt=document.createElement("div");function Ot(e){let t=at(()=>document.querySelector(e),()=>Dt)();return t||P(`Cannot find x-teleport element for selector: "${e}"`),t}var Lt=()=>{};function Rt(e,t,i,n){let r=e,o=e=>n(e),s={},a=(e,t)=>i=>t(e,i);if(i.includes("dot")&&(t=t.replace(/-/g,".")),i.includes("camel")&&(t=function(e){return e.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase())}(t)),i.includes("passive")&&(s.passive=!0),i.includes("capture")&&(s.capture=!0),i.includes("window")&&(r=window),i.includes("document")&&(r=document),i.includes("debounce")){let e=i[i.indexOf("debounce")+1]||"invalid-wait",t=Bt(e.split("ms")[0])?Number(e.split("ms")[0]):250;o=bt(o,t)}if(i.includes("throttle")){let e=i[i.indexOf("throttle")+1]||"invalid-wait",t=Bt(e.split("ms")[0])?Number(e.split("ms")[0]):250;o=yt(o,t)}return i.includes("prevent")&&(o=a(o,(e,t)=>{t.preventDefault(),e(t)}
17)),i.includes("stop")&&(o=a(o,(e,t)=>{t.stopPropagation(),e(t)})),i.includes("self")&&(o=a(o,(t,i)=>{i.target===e&&t(i)})),(i.includes("away")||i.includes("outside"))&&(r=document,o=a(o,(t,i)=>{e.contains(i.target)||!1!==i.target.isConnected&&(e.offsetWidth<1&&e.offsetHeight<1||!1!==e._x_isShown&&t(i))})),i.includes("once")&&(o=a(o,(e,i)=>{e(i),r.removeEventListener(t,o,s)})),o=a(o,(e,n)=>{(function(e){return["keydown","keyup"].includes(e)})(t)&&function(e,t){let i=t.filter(e=>!["window","document","prevent","stop","once","capture"].includes(e));if(i.includes("debounce")){let e=i.indexOf("debounce");i.splice(e,Bt((i[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(i.includes("throttle")){let e=i.indexOf("throttle");i.splice(e,Bt((i[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(0===i.length)return!1;if(1===i.length&&Nt(e.key).includes(i[0]))return!1;const n=["ctrl","shift","alt","meta","cmd","super"].filter(e=>i.includes(e));if(i=i.filter(e=>!n.includes(e)),n.length>0){if(n.filter(t=>("cmd"!==t&&"super"!==t||(t="meta"),e[`${t}Key`])).length===n.length&&Nt(e.key).includes(i[0]))return!1}return!0}(n,i)||e(n)}),r.addEventListener(t,o,s),()=>{r.removeEventListener(t,o,s)}}function Bt(e){return!Array.isArray(e)&&!isNaN(e)}function Nt(e){if(!e)return[];var t;e=[" ","_"].includes(t=e)?t:t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase();let i={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"=",minus:"-",underscore:"_"};return i[e]=e,Object.keys(i).map(t=>{if(i[t]===e)return t}).filter(e=>e)}function jt(e){let t=e?parseFloat(e):null;return i=t,Array.isArray(i)||isNaN(i)?e:t;var i}function Ft(e){return null!==e&&"object"==typeof e&&"function"==typeof e.get&&"function"==typeof e.set}Lt.inline=(e,{modifiers:t},{cleanup:i})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,i(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})},De("ignore",Lt),De("effect",at((e,{expression:t},{effect:i})=>{i(Ce(e,t))})),De("model",(e,{modifiers:t,expression:i},{effect:n,cleanup:r})=>{let o=e;t.includes("parent")&&(o=e.parentNode);let s,a=Ce(o,i);s="string"==typeof i?Ce(o,`${i} = __placeholder`):"function"==typeof i&&"string"==typeof i()?Ce(o,`${i()} = __placeholder`):()=>{};let l=()=>{let e;return a(t=>e=t),Ft(e)?e.get():e},c=e=>{let t;a(e=>t=e),Ft(t)?t.set(e):s(()=>{},{scope:{__placeholder:e}})};"string"==typeof i&&"radio"===e.type&&ne(()=>{e.hasAttribute("name")||e.setAttribute("name",i)});var u="select"===e.tagName.toLowerCase()||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let h=st?()=>{}:Rt(e,u,t,i=>{c(function(e,t,i,n){return ne(()=>{if(i instanceof CustomEvent&&void 0!==i.detail)return null!==i.detail&&void 0!==i.detail?i.detail:i.target.value;if("checkbox"===e.type){if(Array.isArray(n)){let e=null;return e=t.includes("number")?jt(i.target.value):t.includes("boolean")?mt(i.target.value):i.target.value,i.target.checked?n.concat([e]):n.filter(t=>!(t==e))}return i.target.checked}return"select"===e.tagName.toLowerCase()&&e.multiple?t.includes("number")?Array.from(i.target.selectedOptions).map(e=>jt(e.value||e.text)):t.includes("boolean")?Array.from(i.target.selectedOptions).map(e=>mt(e.value||e.text)):Array.from(i.target.selectedOptions).map(e=>e.value||e.text):t.includes("number")?jt(i.target.value):t.includes("boolean")?mt(i.target.value):t.includes("trim")?i.target.value.trim():i.target.value})}(e,t,i,l()))});if(t.includes("fill")&&([null,""].includes(l())||"checkbox"===e.type&&Array.isArray(l()))&&e.dispatchEvent(new Event(u,{})),e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=h,r(()=>e._x_removeModelListeners.default()),e.form){let t=Rt(e.form,"reset",[],t=>{Xe(()=>e._x_model&&e._x_model.set(e.value))});r(()=>t())}e._x_model={get:()=>l(),set(e){c(e)}},e._x_forceModelUpdate=t=>{void 0===t&&"string"==typeof i&&i.match(/\./)&&(t=""),window.fromModel=!0,ne(()=>dt(e,"value",t)),delete window.fromModel},n(()=>{let i=l();t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate(i)})}),De("cloak",e=>queueMicrotask(()=>ne(()=>e.removeAttribute(Me("cloak"))))),j(()=>`[${Me("init")}]`),De("init",at((e,{expression:t},{evaluate:i})=>"string"==typeof t?!!t.trim()&&i(t,{},!1):i(t,{},!1))),De("text",(e,{expression:t},{effect:i,evaluateLater:n})=>{let r=n(t);i(()=>{r(t=>{ne(()=>{e.textContent=t})})})}),De("html",(e,{expression:t},{effect:i,evaluateLater:n})=>{let r=n(t);i(()=>{r(t=>{ne(()=>{e.innerHTML=t,e._x_ignoreSelf=!0,H(e),delete e._x_ignoreSelf})})})}),He(Fe(":",Me("bind:")));var zt=(e,{value:t,modifiers:i,expression:n,original:r},{effect:o})=>{if(!t){let t={};return s=t,Object.entries(Ct).forEach(([e,t])=>{Object.defineProperty(s,e,{get:()=>(...e)=>t(...e)})}),void Ce(e,n)(t=>{St(e,t,r)},{scope:t})}var s;if("key"===t)return function(e,t){e._x_keyExpression=t}(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=Ce(e,n);o(()=>a(r=>{void 0===r&&"string"==typeof n&&n.match(/\./)&&(r=""),ne(()=>
17dt(e,t,r,i))}))};function Vt(e,t,i,n){let r={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t)){e.item.replace("[","").replace("]","").split(",").map(e=>e.trim()).forEach((e,i)=>{r[e]=t[i]})}else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&"object"==typeof t){e.item.replace("{","").replace("}","").split(",").map(e=>e.trim()).forEach(e=>{r[e]=t[e]})}else r[e.item]=t;return e.index&&(r[e.index]=i),e.collection&&(r[e.collection]=n),r}function Ht(){}function Ut(e,t,i){De(t,n=>P(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${i}`,n))}zt.inline=(e,{value:t,modifiers:i,expression:n})=>{t&&(e._x_inlineBindings||(e._x_inlineBindings={}),e._x_inlineBindings[t]={expression:n,extract:!1})},De("bind",zt),N(()=>`[${Me("data")}]`),De("data",(e,{expression:t},{cleanup:i})=>{if(function(e){return!!st&&(!!ut||e.hasAttribute("data-has-alpine-state"))}(e))return;t=""===t?"{}":t;let n={};be(n,e);let r={};var o,s;o=r,s=n,Object.entries(Et).forEach(([e,t])=>{Object.defineProperty(o,e,{get:()=>(...e)=>t.bind(s)(...e),enumerable:!1})});let a=xe(e,t,{scope:r});void 0!==a&&!0!==a||(a={}),be(a,e);let l=g(a);fe(l);let c=le(e,l);l.init&&xe(e,l.init),i(()=>{l.destroy&&xe(e,l.destroy),c()})}),ct((e,t)=>{e._x_dataStack&&(t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0))}),De("show",(e,{modifiers:t,expression:i},{effect:n})=>{let r=Ce(e,i);e._x_doHide||(e._x_doHide=()=>{ne(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{ne(()=>{1===e.style.length&&"none"===e.style.display?e.removeAttribute("style"):e.style.removeProperty("display")})});let o,s=()=>{e._x_doHide(),e._x_isShown=!1},a=()=>{e._x_doShow(),e._x_isShown=!0},l=()=>setTimeout(a),c=tt(e=>e?a():s(),t=>{"function"==typeof e._x_toggleAndCascadeWithTransitions?e._x_toggleAndCascadeWithTransitions(e,t,a,s):t?l():s()}),u=!0;n(()=>r(e=>{(u||e!==o)&&(t.includes("immediate")&&(e?l():s()),c(e),o=e,u=!1)}))}),De("for",(e,{expression:t},{effect:i,cleanup:n})=>{let r=function(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,i=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,r=e.match(n);if(!r)return;let o={};o.items=r[2].trim();let s=r[1].replace(i,"").trim(),a=s.match(t);a?(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s;return o}(t),o=Ce(e,r.items),s=Ce(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},i(()=>function(e,t,i,n){let r=e=>"object"==typeof e&&!Array.isArray(e),o=e;i(i=>{var s;s=i,!Array.isArray(s)&&!isNaN(s)&&i>=0&&(i=Array.from(Array(i).keys(),e=>e+1)),void 0===i&&(i=[]);let a=e._x_lookup,l=e._x_prevKeys,c=[],u=[];if(r(i))i=Object.entries(i).map(([e,r])=>{let o=Vt(t,r,e,i);n(e=>u.push(e),{scope:{index:e,...o}}),c.push(o)});else for(let e=0;e<i.length;e++){let r=Vt(t,i[e],e,i);n(e=>u.push(e),{scope:{index:e,...r}}),c.push(r)}let h=[],d=[],f=[],p=[];for(let e=0;e<l.length;e++){let t=l[e];-1===u.indexOf(t)&&f.push(t)}l=l.filter(e=>!f.includes(e));let m="template";for(let e=0;e<u.length;e++){let t=u[e],i=l.indexOf(t);if(-1===i)l.splice(e,0,t),h.push([m,e]);else if(i!==e){let t=l.splice(e,1)[0],n=l.splice(i-1,1)[0];l.splice(e,0,n),l.splice(i,0,t),d.push([t,n])}else p.push(t);m=t}for(let e=0;e<f.length;e++){let t=f[e];a[t]._x_effects&&a[t]._x_effects.forEach(S),a[t].remove(),a[t]=null,delete a[t]}for(let e=0;e<d.length;e++){let[t,i]=d[e],n=a[t],r=a[i],s=document.createElement("div");ne(()=>{r||P('x-for ":key" is undefined or invalid',o),r.after(s),n.after(r),r._x_currentIfEl&&r.after(r._x_currentIfEl),s.before(n),n._x_currentIfEl&&n.after(n._x_currentIfEl),s.remove()}),r._x_refreshXForScope(c[u.indexOf(i)])}for(let e=0;e<h.length;e++){let[t,i]=h[e],n="template"===t?o:a[t];n._x_currentIfEl&&(n=n._x_currentIfEl);let r=c[i],s=u[i],l=document.importNode(o.content,!0).firstElementChild,d=g(r);le(l,d,o),l._x_refreshXForScope=e=>{Object.entries(e).forEach(([e,t])=>{d[e]=t})},ne(()=>{n.after(l),H(l)}),"object"==typeof s&&P("x-for key cannot be an object, it must be a string or an integer",o),a[s]=l}for(let e=0;e<p.length;e++)a[p[e]]._x_refreshXForScope(c[u.indexOf(p[e])]);o._x_prevKeys=u})}(e,r,o,s)),n(()=>
17{Object.values(e._x_lookup).forEach(e=>e.remove()),delete e._x_prevKeys,delete e._x_lookup})}),Ht.inline=(e,{expression:t},{cleanup:i})=>{let n=F(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,i(()=>delete n._x_refs[t])},De("ref",Ht),De("if",(e,{expression:t},{effect:i,cleanup:n})=>{"template"!==e.tagName.toLowerCase()&&P("x-if can only be used on a <template> tag",e);let r=Ce(e,t);i(()=>r(t=>{t?(()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let t=e.content.cloneNode(!0).firstElementChild;le(t,{},e),ne(()=>{e.after(t),H(t)}),e._x_currentIfEl=t,e._x_undoIf=()=>{M(t,e=>{e._x_effects&&e._x_effects.forEach(S)}),t.remove(),delete e._x_currentIfEl}})():e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)})),n(()=>e._x_undoIf&&e._x_undoIf())}),De("id",(e,{expression:t},{evaluate:i})=>{i(t).forEach(t=>function(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Mt(t))}(e,t))}),He(Fe("@",Me("on:"))),De("on",at((e,{value:t,modifiers:i,expression:n},{cleanup:r})=>{let o=n?Ce(e,n):()=>{};"template"===e.tagName.toLowerCase()&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=Rt(e,t,i,e=>{o(()=>{},{scope:{$event:e},params:[e]})});r(()=>s())})),Ut("Collapse","collapse","collapse"),Ut("Intersect","intersect","intersect"),Ut("Focus","trap","focus"),Ut("Mask","mask","mask"),Tt.setEvaluator(Ee),Tt.setReactivityEngine({reactive:At.reactive,effect:At.effect,release:At.stop,raw:At.toRaw});var Wt=Tt}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],59:[function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};function r(e){let t=0,i=0,n=e;do{t+=n.offsetTop||0,i+=n.offsetLeft||0,n=n.offsetParent}while(n);return{top:t,left:i}}Object.defineProperty(i,"__esModule",{value:!0});class o{constructor(e){this.element=e}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(e,t){return r(e).left-r(t).left}getVerticalElementScrollOffset(e,t){return r(e).top-r(t).top}scrollTo(e,t){this.element.scrollLeft=e,this.element.scrollTop=t}}class s{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(e){return(window.scrollX||document.documentElement.scrollLeft)+e.getBoundingClientRect().left}getVerticalElementScrollOffset(e){return(window.scrollY||document.documentElement.scrollTop)+e.getBoundingClientRect().top}scrollTo(e,t){window.scrollTo(e,t)}}const a={elements:[],cancelMethods:[],add:(e,t)=>{a.elements.push(e),a.cancelMethods.push(t)},remove:(e,t)=>{const i=a.elements.indexOf(e);i>-1&&(t&&a.cancelMethods[i](),a.elements.splice(i,1),a.cancelMethods.splice(i,1))}},l="undefined"!=typeof window,c={cancelOnUserAction:!0,easing:e=>--e*e*e+1,elementToScroll:l?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};i.default=function(e,t={}){return n(this,void 0,void 0,function*(){if(!l)return new Promise(e=>{e(!1)});if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill.";let i,n,r,u=Object.assign(Object.assign({},c),t);const h=u.elementToScroll===window,d=!!u.elementToScroll.nodeName;if(!h&&!d)throw"Element to scroll needs to be either window or DOM element.";const f=h?document.documentElement:u.elementToScroll;"smooth"===getComputedStyle(f).getPropertyValue("scroll-behavior")&&console.warn(`${f.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);const p=h?new s:new o(u.elementToScroll);if(e instanceof Element){if(r=e,d&&(!u.elementToScroll.contains(r)||u.elementToScroll.isSameNode(r)))throw"options.elementToScroll has to be a parent of scrollToElement";i=p.getHorizontalElementScrollOffset(r,u.elementToScroll),n=p.getVerticalElementScrollOffset(r,u.elementToScroll)}else if("number"==typeof e)i=p.getHorizontalScroll(),n=e;else{if(!Array.isArray(e)||2!==e.length)throw"Wrong function signature. Check documentation.\nAvailable method signatures are:\n animateScrollTo(y:number, options)\n animateScrollTo([x:number | null, y:number | null], options)\n animateScrollTo(scrollToElement:Element, options)";i=null===e[0]?p.getHorizontalScroll():e[0],n=null===e[1]?p.getVerticalScroll():e[1]}i+=u.horizontalOffset,n+=u.verticalOffset;const m=p.getMaxHorizontalScroll(),g=p.getHorizontalScroll();i>m&&(i=m);const v=i-g,b=p.getMaxVerticalScroll(),y=p.getVerticalScroll();n>b&&(n=b);const w=n-y,_=Math.abs(Math.round(v/1e3*u.speed)),k=Math.abs(Math.round(w/1e3*u.speed));let x=_>k?_:k;return x<u.minDuration?x=u.minDuration:x>u.maxDuration&&(x=u.maxDuration),new Promise((e,t)=>
vendor: 15,901 bytes, line 17
17{let r;0===v&&0===w&&e(!0),a.remove(p.element,!0);const o=()=>{h(),cancelAnimationFrame(r),e(!1)};a.add(p.element,o);const s=u.cancelOnUserAction?o:e=>e.preventDefault(),l=u.cancelOnUserAction?{passive:!0}:{passive:!1},c=["wheel","touchstart","keydown","mousedown"],h=()=>{c.forEach(e=>{p.element.removeEventListener(e,s,l)})};c.forEach(e=>{p.element.addEventListener(e,s,l)});const d=Date.now(),f=()=>{var t=Date.now()-d,o=t/x;const s=Math.round(g+v*u.easing(o)),l=Math.round(y+w*u.easing(o));t<x&&(s!==i||l!==n)?(p.scrollTo(s,l),r=requestAnimationFrame(f)):(p.scrollTo(i,n),cancelAnimationFrame(r),h(),a.remove(p.element,!1),e(!0))};r=requestAnimationFrame(f)})})}},{}],60:[function(e,t,i){"use strict";var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},r={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},o=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],s={CSS:{},springs:{}};function a(e,t,i){return Math.min(Math.max(e,t),i)}function l(e,t){return e.indexOf(t)>-1}function c(e,t){return e.apply(null,t)}var u={arr:function(e){return Array.isArray(e)},obj:function(e){return l(Object.prototype.toString.call(e),"Object")},pth:function(e){return u.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||u.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},nil:function(e){return u.und(e)||null===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return u.hex(e)||u.rgb(e)||u.hsl(e)},key:function(e){return!n.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}};function h(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(e){return parseFloat(e)}):[]}function d(e,t){var i=h(e),n=a(u.und(i[0])?1:i[0],.1,100),r=a(u.und(i[1])?100:i[1],.1,100),o=a(u.und(i[2])?10:i[2],.1,100),l=a(u.und(i[3])?0:i[3],.1,100),c=Math.sqrt(r/n),d=o/(2*Math.sqrt(r*n)),f=d<1?c*Math.sqrt(1-d*d):0,p=d<1?(d*c-l)/f:-l+c;function m(e){var i=t?t*e/1e3:e;return i=d<1?Math.exp(-i*d*c)*(1*Math.cos(f*i)+p*Math.sin(f*i)):(1+p*i)*Math.exp(-i*c),0===e||1===e?e:1-i}return t?m:function(){var t=s.springs[e];if(t)return t;for(var i=1/6,n=0,r=0;;)if(1===m(n+=i)){if(++r>=16)break}else r=0;var o=n*i*1e3;return s.springs[e]=o,o}}function f(e){return void 0===e&&(e=10),function(t){return Math.ceil(a(t,1e-6,1)*e)*(1/e)}}var p,m,g=function(){var e=.1;function t(e,t){return 1-3*t+3*e}function i(e,t){return 3*t-6*e}function n(e){return 3*e}function r(e,r,o){return((t(r,o)*e+i(r,o))*e+n(r))*e}function o(e,r,o){return 3*t(r,o)*e*e+2*i(r,o)*e+n(r)}return function(t,i,n,s){if(0<=t&&t<=1&&0<=n&&n<=1){var a=new Float32Array(11);if(t!==i||n!==s)for(var l=0;l<11;++l)a[l]=r(l*e,t,n);return function(e){return t===i&&n===s||0===e||1===e?e:r(c(e),i,s)}}function c(i){for(var s=0,l=1;10!==l&&a[l]<=i;++l)s+=e;--l;var c=s+(i-a[l])/(a[l+1]-a[l])*e,u=o(c,t,n);return u>=.001?function(e,t,i,n){for(var s=0;s<4;++s){var a=o(t,i,n);if(0===a)return t;t-=(r(t,i,n)-e)/a}return t}(i,c,t,n):0===u?c:function(e,t,i,n,o){var s,a,l=0;do{(s=r(a=t+(i-t)/2,n,o)-e)>0?i=a:t=a}while(Math.abs(s)>1e-7&&++l<10);return a}(i,s,s+e,t,n)}}}(),v=(p={linear:function(){return function(e){return e}}},m={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Expo:function(){return function(e){return e?Math.pow(2,10*e-10):0}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var i=a(e,1,10),n=a(t,.1,2);return function(e){return 0===e||1===e?e:-i*Math.pow(2,10*(e-1))*Math.sin((e-1-n/(2*Math.PI)*Math.asin(1/i))*(2*Math.PI)/n)}}},["Quad","Cubic","Quart","Quint"].forEach(function(e,t){m[e]=function(){return function(e){return Math.pow(e,t+2)}}}),Object.keys(m).forEach(function(e){var t=m[e];p["easeIn"+e]=t,p["easeOut"+e]=function(e,i){return function(n){return 1-t(e,i)(1-n)}},p["easeInOut"+e]=function(e,i){return function(n){return n<.5?t(e,i)(2*n)/2:1-t(e,i)(-2*n+2)/2}},p["easeOutIn"+e]=function(e,i){return function(n){return n<.5?(1-t(e,i)(1-2*n))/2:(t(e,i)(2*n-1)+1)/2}}}),p);function b(e,t){if(u.fnc(e))return e;var i=e.split("(")[0],n=v[i],r=h(e);switch(i){case"spring":return d(e,t);case"cubicBezier":return c(g,r);case"steps":return c(f,r);default:return c(n,r)}}function y(e){try{return document.querySelectorAll(e)}catch(e){return}}function w(e,t){for(var i=e.length,n=arguments.length>=2?arguments[1]:void 0,r=[],o=0;o<i;o++)if(o in e){var s=e[o];t.call(n,s,o,e)&&r.push(s)}return r}function _(e){return e.reduce(function(e,t){return e.concat(u.arr(t)?_(t):t)},[])}function k(e){return u.arr(e)?e:(u.str(e)&&(e=y(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function x(e,t){return e.some(function(e){return e===t})}function C(e){var t={};for(var i in e)t[i]=e[i];return t}function S(e,t){var i=C(e);for(var n in e)i[n]=t.hasOwnProperty(n)?t[n]:e[n];return i}function E(e,t){var i=C(e);for(var n in t)i[n]=u.und(e[n])?t[n]:e[n];return i}function T(e){return u.rgb(e)?(i=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t=e))?"rgba("+i[1]+",1)":t:u.hex(e)?function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,i,n){return t+t+i+i+n+n}),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgba("+parseInt(i[1],16)+","+parseInt(i[2],16)+","+parseInt(i[3],16)+",1)"}(e):u.hsl(e)?function(e){var t,i,n,r=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),o=parseInt(r[1],10)/360,s=parseInt(r[2],10)/100,a=parseInt(r[3],10)/100,l=r[4]||1;function c(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}if(0==s)t=i=n=a;else{var u=a<.5?a*(1+s):a+s-a*s,h=2*a-u;t=c(h,u,o+1/3),i=c(h,u,o),n=c(h,u,o-1/3)}return"rgba("+255*t+","+255*i+","+255*n+","+l+")"}(e):void 0;var t,i}function A(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function I(e,t){return u.fnc(e)?e(t.target,t.id,t.total):e}function M(e,t){return e.getAttribute(t)}function P(e,t,i){if(x([i,"deg","rad","turn"],A(t)))return t;var n=s.CSS[t+i];if(!u.und(n))return n;var r=document.createElement(e.tagName),o=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;o.appendChild(r),r.style.position="absolute",r.style.width=100+i;var a=100/r.offsetWidth;o.removeChild(r);var l=a*parseFloat(t);return s.CSS[t+i]=l,l}function D(e,t,i){if(t in e.style){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=e.style[t]||getComputedStyle(e).getPropertyValue(n)||"0";return i?P(e,r,i):r}}function O(e,t){return u.dom(e)&&!u.inp(e)&&(!u.nil(M(e,t))||u.svg(e)&&e[t])?"attribute":u.dom(e)&&x(o,t)?"transform":u.dom(e)&&"transform"!==t&&D(e,t)?"css":null!=e[t]?"object":void 0}function L(e){if(u.dom(e)){for(var t,i=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map;t=n.exec(i);)r.set(t[1],t[2]);return r}}function R(e,t,i,n){var r=l(t,"scale")?1:0+function(e){return l(e,"translate")||"perspective"===e?"px":l(e,"rotate")||l(e,"skew")?"deg":void 0}(t),o=L(e).get(t)||r;return i&&(i.transforms.list.set(t,o),i.transforms.last=t),n?P(e,o,n):o}function B(e,t,i,n){switch(O(e,t)){case"transform":return R(e,t,n,i);case"css":return D(e,t,i);case"attribute":return M(e,t);default:return e[t]||0}}function N(e,t){var i=/^(\*=|\+=|-=)/.exec(e);if(!i)return e;var n=A(e)||0,r=parseFloat(t),o=parseFloat(e.replace(i[0],""));switch(i[0][0]){case"+":return r+o+n;case"-":return r-o+n;case"*":return r*o+n}}function j(e,t){if(u.col(e))return T(e);if(/\s/g.test(e))return e;var i=A(e),n=i?e.substr(0,e.length-i.length):e;return t?n+t:n}function F(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function z(e){for(var t,i=e.points,n=0,r=0;r<i.numberOfItems;r++){var o=i.getItem(r);r>0&&(n+=F(t,o)),t=o}return n}function V(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*M(e,"r")}(e);case"rect":return function(e){return 2*M(e,"width")+2*M(e,"height")}(e);case"line":return function(e){return F({x:M(e,"x1"),y:M(e,"y1")},{x:M(e,"x2"),y:M(e,"y2")})}(e);case"polyline":return z(e);case"polygon":return function(e){var t=e.points;return z(e)+F(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function H(e,t){var i=t||{},n=i.el||function(e){for(var t=e.parentNode;u.svg(t)&&u.svg(t.parentNode);)t=t.parentNode;return t}(e),r=n.getBoundingClientRect(),o=M(n,"viewBox"),s=r.width,a=r.height,l=i.viewBox||(o?o.split(" "):[0,0,s,a]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:s,h:a,vW:l[2],vH:l[3]}}function U(e,t,i){function n(i){void 0===i&&(i=0);var n=t+i>=1?t+i:0;return e.el.getPointAtLength(n)}var r=H(e.el,e.svg),o=n(),s=n(-1),a=n(1),l=i?1:r.w/r.vW,c=i?1:r.h/r.vH;switch(e.property){case"x":return(o.x-r.x)*l;case"y":return(o.y-r.y)*c;case"angle":return 180*Math.atan2(a.y-s.y,a.x-s.x)/Math.PI}}function W(e,t){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=j(u.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(i)?n.match(i).map(Number):[0],strings:u.str(e)||t?n.split(i):[]}}function $(e){return w(e?_(u.arr(e)?e.map(k):k(e)):[],function(e,t,i){return i.indexOf(e)===t})}function G(e){var t=$(e);return t.map(function(e,i){return{target:e,id:i,total:t.length,transforms:{list:L(e)}}})}function q(e,t){var i=C(t);if(/^spring/.test(i.easing)&&(i.duration=d(i.easing)),u.arr(e)){var n=e.length;2===n&&!u.obj(e[0])?e={value:e}:u.fnc(t.duration)||(i.duration=t.duration/n)}var r=u.arr(e)?e:[e];return r.map(function(e,i){var n=u.obj(e)&&!u.pth(e)?e:{value:e};return u.und(n.delay)&&(n.delay=i?0:t.delay),u.und(n.endDelay)&&(n.endDelay=i===r.length-1?t.endDelay:0),n}).map(function(e){return E(e,i)})}function Y(e,t){var i=[],n=t.keyframes;for(var r in n&&(t=E(function(e){for(var t=w(_(e.map(function(e){return Object.keys(e)})),function(e){return u.key(e)}).reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]),i={},n=function(n){var r=t[n];i[r]=e.map(function(e){var t={};for(var i in e)u.key(i)?i==r&&(t.value=e[i]):t[i]=e[i];return t})},r=0;r<t.length;r++)n(r);return i}(n),t)),t)u.key(r)&&i.push({name:r,tweens:q(t[r],e)});return i}function Z(e,t){var i;return e.tweens.map(function(n){var r=function(e,t){var i={};for(var n in e){var r=I(e[n],t);u.arr(r)&&1===(r=r.map(function(e){return I(e,t)})).length&&(r=r[0]),i[n]=r}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}(n,t),o=r.value,s=u.arr(o)?o[1]:o,a=A(s),l=B(t.target,e.name,a,t),c=i?i.to.original:l,h=u.arr(o)?o[0]:c,d=A(h)||A(l),f=a||d;return u.und(s)&&(s=c),r.from=W(h,f),r.to=W(N(s,h),f),r.start=i?i.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=b(r.easing,r.duration),r.isPath=u.pth(o),r.isPathTargetInsideSVG=r.isPath&&u.svg(t.target),r.isColor=u.col(r.from.original),r.isColor&&(r.round=1),i=r,r})}var X={css:function(e,t,i){return e.style[t]=i},attribute:function(e,t,i){return e.setAttribute(t,i)},object:function(e,t,i){return e[t]=i},transform:function(e,t,i,n,r){if(n.list.set(t,i),t===n.last||r){var o="";n.list.forEach(function(e,t){o+=t+"("+e+") "}),e.style.transform=o}}};function K(e,t){G(e).forEach(function(e){for(var i in t){var n=I(t[i],e),r=e.target,o=A(n),s=B(r,i,o,e),a=N(j(n,o||A(s)),s),l=O(r,i);X[l](r,i,a,e.transforms,!0)}})}function J(e,t){return w(_(e.map(function(e){return t.map(function(t){return function(e,t){var i=O(e.target,t.name);if(i){var n=Z(t,e),r=n[n.length-1];return{type:i,property:t.name,animatable:e,tweens:n,duration:r.end,delay:n[0].delay,endDelay:r.endDelay}}}(e,t)})})),function(e){return!u.und(e)})}function Q(e,t){var i=e.length,n=function(e){return e.timelineOffset?e.timelineOffset:0},r={};return r.duration=i?Math.max.apply(Math,e.map(function(e){return n(e)+e.duration})):t.duration,r.delay=i?Math.min.apply(Math,e.map(function(e){return n(e)+e.delay})):t.delay,r.endDelay=i?r.duration-Math.max.apply(Math,e.map(function(e){return n(e)+e.duration-e.endDelay})):t.endDelay,r}var ee=0;var te=[],ie=function(){var e;function t(i){for(var n=te.length,r=0;r<n;){var o=te[r];o.paused?(te.splice(r,1),n--):(o.tick(i),r++)}e=r>0?requestAnimationFrame(t):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){re.suspendWhenDocumentHidden&&(ne()?e=cancelAnimationFrame(e):(te.forEach(function(e){return e._onDocumentVisibility()}),ie()))}),function(){e||ne()&&re.suspendWhenDocumentHidden||!(te.length>0)||(e=requestAnimationFrame(t))}}();function ne(){return!!document&&document.hidden}function re(e){void 0===e&&(e={});var t,i=0,o=0,s=0,l=0,c=null;function u(e){var t=window.Promise&&new Promise(function(e){return c=e});return e.finished=t,t}var h=function(e){var t=S(n,e),i=S(r,e),o=Y(i,e),s=G(e.targets),a=J(s,o),l=Q(a,i),c=ee;return ee++,E(t,{id:c,children:[],animatables:s,animations:a,duration:l.duration,delay:l.delay,endDelay:l.endDelay})}(e);u(h);function d(){var e=h.direction;"alternate"!==e&&(h.direction="normal"!==e?"normal":"reverse"),h.reversed=!h.reversed,t.forEach(function(e){return e.reversed=h.reversed})}function f(e){return h.reversed?h.duration-e:e}function p(){i=0,o=f(h.currentTime)*(1/re.speed)}function m(e,t){t&&t.seek(e-t.timelineOffset)}function g(e){for(var t=0,i=h.animations,n=i.length;t<n;){var r=i[t],o=r.animatable,s=r.tweens,l=s.length-1,c=s[l];l&&(c=w(s,function(t){return e<t.end})[0]||c);for(var u=a(e-c.start-c.delay,0,c.duration)/c.duration,d=isNaN(u)?1:c.easing(u),f=c.to.strings,p=c.round,m=[],g=c.to.numbers.length,v=void 0,b=0;b<g;b++){var y=void 0,_=c.to.numbers[b],k=c.from.numbers[b]||0;y=c.isPath?U(c.value,d*_,c.isPathTargetInsideSVG):k+d*(_-k),p&&(c.isColor&&b>2||(y=Math.round(y*p)/p)),m.push(y)}var x=f.length;if(x){v=f[0];for(var C=0;C<x;C++){f[C];var S=f[C+1],E=m[C];isNaN(E)||(v+=S?E+S:E+" ")}}else v=m[0];X[r.type](o.target,r.property,v,o.transforms),r.currentValue=v,t++}}function v(e){h[e]&&!h.passThrough&&h[e](h)}function b(e){var n=h.duration,r=h.delay,p=n-h.endDelay,b=f(e);h.progress=a(b/n*100,0,100),h.reversePlayback=b<h.currentTime,t&&function(e){if(h.reversePlayback)for(var i=l;i--;)m(e,t[i]);else for(var n=0;n<l;n++)m(e,t[n])}(b),!h.began&&h.currentTime>0&&(h.began=!0,v("begin")),!h.loopBegan&&h.currentTime>0&&(h.loopBegan=!0,v("loopBegin")),b<=r&&0!==h.currentTime&&g(0),(b>=p&&h.currentTime!==n||!n)&&g(n),b>r&&b<p?(h.changeBegan||(h.changeBegan=!0,h.changeCompleted=!1,v("changeBegin")),v("change"),g(b)):h.changeBegan&&(h.changeCompleted=!0,h.changeBegan=!1,v("changeComplete")),h.currentTime=a(b,0,n),h.began&&v("update"),e>=n&&(o=0,h.remaining&&!0!==h.remaining&&h.remaining--,h.remaining?(i=s,v("loopComplete"),h.loopBegan=!1,"alternate"===h.direction&&d()):(h.paused=!0,h.completed||(h.completed=!0,v("loopComplete"),v("complete"),!h.passThrough&&"Promise"in window&&(c(),u(h)))))}return h.reset=function(){var e=h.direction;h.passThrough=!1,h.currentTime=0,h.progress=0,h.paused=!0,h.began=!1,h.loopBegan=!1,h.changeBegan=!1,h.completed=!1,h.changeCompleted=!1,h.reversePlayback=!1,h.reversed="reverse"===e,h.remaining=h.loop,t=h.children;for(var i=l=t.length;i--;)h.children[i].reset();(h.reversed&&!0!==h.loop||"alternate"===e&&1===h.loop)&&h.remaining++,g(h.reversed?h.duration:0)},h._onDocumentVisibility=p,h.set=function(e,t){return K(e,t),h}
17,h.tick=function(e){s=e,i||(i=s),b((s+(o-i))*re.speed)},h.seek=function(e){b(f(e))},h.pause=function(){h.paused=!0,p()},h.play=function(){h.paused&&(h.completed&&h.reset(),h.paused=!1,te.push(h),p(),ie())},h.reverse=function(){d(),h.completed=!h.reversed,p()},h.restart=function(){h.reset(),h.play()},h.remove=function(e){se($(e),h)},h.reset(),h.autoplay&&h.play(),h}function oe(e,t){for(var i=t.length;i--;)x(e,t[i].animatable.target)&&t.splice(i,1)}function se(e,t){var i=t.animations,n=t.children;oe(e,i);for(var r=n.length;r--;){var o=n[r],s=o.animations;oe(e,s),s.length||o.children.length||n.splice(r,1)}i.length||n.length||t.pause()}re.version="3.2.1",re.speed=1,re.suspendWhenDocumentHidden=!0,re.running=te,re.remove=function(e){for(var t=$(e),i=te.length;i--;){se(t,te[i])}},re.get=B,re.set=K,re.convertPx=P,re.path=function(e,t){var i=u.str(e)?y(e)[0]:e,n=t||100;return function(e){return{property:e,el:i,svg:H(i),totalLength:V(i)*(n/100)}}},re.setDashoffset=function(e){var t=V(e);return e.setAttribute("stroke-dasharray",t),t},re.stagger=function(e,t){void 0===t&&(t={});var i=t.direction||"normal",n=t.easing?b(t.easing):null,r=t.grid,o=t.axis,s=t.from||0,a="first"===s,l="center"===s,c="last"===s,h=u.arr(e),d=h?parseFloat(e[0]):parseFloat(e),f=h?parseFloat(e[1]):0,p=A(h?e[1]:e)||0,m=t.start||0+(h?d:0),g=[],v=0;return function(e,t,u){if(a&&(s=0),l&&(s=(u-1)/2),c&&(s=u-1),!g.length){for(var b=0;b<u;b++){if(r){var y=l?(r[0]-1)/2:s%r[0],w=l?(r[1]-1)/2:Math.floor(s/r[0]),_=y-b%r[0],k=w-Math.floor(b/r[0]),x=Math.sqrt(_*_+k*k);"x"===o&&(x=-_),"y"===o&&(x=-k),g.push(x)}else g.push(Math.abs(s-b));v=Math.max.apply(Math,g)}n&&(g=g.map(function(e){return n(e/v)*v})),"reverse"===i&&(g=g.map(function(e){return o?e<0?-1*e:-e:Math.abs(v-e)}))}return m+(h?(f-d)/v:d)*(Math.round(100*g[t])/100)+p}},re.timeline=function(e){void 0===e&&(e={});var t=re(e);return t.duration=0,t.add=function(i,n){var o=te.indexOf(t),s=t.children;function a(e){e.passThrough=!0}o>-1&&te.splice(o,1);for(var l=0;l<s.length;l++)a(s[l]);var c=E(i,S(r,e));c.targets=c.targets||e.targets;var h=t.duration;c.autoplay=!1,c.direction=t.direction,c.timelineOffset=u.und(n)?h:N(n,h),a(t),t.seek(c.timelineOffset);var d=re(c);a(d),s.push(d);var f=Q(s,e);return t.delay=f.delay,t.endDelay=f.endDelay,t.duration=f.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},re.easing=b,re.penner=v,re.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},t.exports=re},{}],61:[function(e,t,i){"use strict";const n=i;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":62,"./asn1/base":64,"./asn1/constants":68,"./asn1/decoders":70,"./asn1/encoders":73,"bn.js":75}],62:[function(e,t,i){"use strict";const n=e("./encoders"),r=e("./decoders"),o=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}i.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function i(e){this._initNamed(e,t)}return o(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i)},new i(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r[e])),this.decoders[e]},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},{"./decoders":70,"./encoders":73,inherits:247}],63:[function(e,t,i){"use strict";const n=e("inherits"),r=e("../base/reporter").Reporter,o=e("safer-buffer").Buffer;function s(e,t){r.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,r),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:r.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,r.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},i.EncoderBuffer=a,a.isEncoderBuffer=function(e){if(e instanceof a)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,t),t+=i.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":66,inherits:247,"safer-buffer":296}],64:[function(e,t,i){"use strict";const n=i;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":63,"./node":65,"./reporter":66}],65:[function(e,t,i){"use strict";const n=e("../base/reporter").Reporter,r=e("../base/buffer").EncoderBuffer,o=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t,i){const n={};this._baseState=n,n.name=i,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=c;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};u.forEach(function(i){t[i]=e[i]});const i=new this.constructor(t.parent);return i._baseState=t,i},c.prototype._wrap=function(){const e=this._baseState;l.forEach(function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}},this)},c.prototype._init=function(e){const t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,i=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==i.length&&(s(null===t.children),t.children=i,i.forEac
vendor: 24,291 bytes, line 17
17h(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach(function(i){i==(0|i)&&(i|=0);const n=e[i];t[n]=i}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),a.forEach(function(e){c.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}}),c.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let n,r=i.default,s=!0,a=null;if(null!==i.key&&(a=e.enterKey(i.key)),i.optional){let n=null;if(null!==i.explicit?n=i.explicit:null!==i.implicit?n=i.implicit:null!==i.tag&&(n=i.tag),null!==n||i.any){if(s=this._peekTag(e,n,i.any),e.isError(s))return s}else{const n=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(n)}}if(i.obj&&s&&(n=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const n=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(n))return n;i.any?r=e.raw(t):e=n}if(t&&t.track&&null!==i.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(r=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(r))return r;if(i.any||null!==i.choice||null===i.children||i.children.forEach(function(i){i._decode(e,t)}),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const n=new o(r);r=this._getUse(i.contains,e._reporterState.obj)._decode(n,t)}}return i.obj&&s&&(r=e.leaveObject(n)),null===i.key||null===r&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,i.key,r),r},c.prototype._decodeGeneric=function(e,t,i){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],i):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},c.prototype._decodeChoice=function(e,t){const i=this._baseState;let n=null,r=!1;return Object.keys(i.choice).some(function(o){const s=e.save(),a=i.choice[o];try{const i=a._decode(e,t);if(e.isError(i))return!1;n={type:o,value:i},r=!0}catch(t){return e.restore(s),!1}return!0},this),r?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new r(e,this.reporter)},c.prototype._encode=function(e,t,i){const n=this._baseState;if(null!==n.default&&n.default===e)return;const r=this._encodeValue(e,t,i);return void 0===r||this._skipDefault(r,t,i)?void 0:r},c.prototype._encodeValue=function(e,t,i){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}let s=null,a=!1;if(r.any)o=this._createEncoderBuffer(e);else if(r.choice)o=this._encodeChoice(e,t);else if(r.contains)s=this._getUse(r.contains,i)._encode(e,t),a=!0;else if(r.children)s=r.children.map(function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const n=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const r=i._encode(e[i._baseState.key],t,e);return t.leaveKey(n),r},this).filter(function(e){return e}),s=this._createEncoderBuffer(s);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map(function(i){const n=this._baseState;return this._getUse(n.args[0],e)._encode(i,t)},i))}else null!==r.use?o=this._getUse(r.use,i)._encode(e,t):(s=this._encodePrimitive(r.tag,e),a=!0);if(!r.any&&null===r.choice){const e=null!==r.implicit?r.implicit:r.tag,i=null===r.implicit?"universal":"context";null===e?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(o=this._encodeComposite(e,a,i,s))}return null!==r.explicit&&(o=this._encodeComposite(r.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const i=this._baseState,n=i.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":63,"../base/reporter":66,"minimalistic-assert":255}],66:[function(e,t,i){"use strict";const n=e("inherits");function r(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}i.Reporter=r,r.prototype.isError=function(e){return e instanceof o},r.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},r.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},r.prototype.enterKey=function(e){return this._reporterState.path.push(e)},r.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},r.prototype.leaveKey=function(e,t,i){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=i)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},r.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},r.prototype.error=function(e){let t;const i=this._reporterState,n=e instanceof o;if(t=n?e:new o(i.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw t;return n||i.errors.push(t),t},r.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:247}],67:[function(e,t,i){"use strict";function n(e){const t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);const n=e[i];t[n]=i}),t}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=n(i.tagClass),i.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},i.tagByName=n(i.tag)},{}],68:[function(e,t,i){"use strict";const n=i;n._reverse=function(e){const t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);const n=e[i];t[n]=i}),t},n.der=e("./der")},{"./der":67}],69:[function(e,t,i){"use strict";const n=e("inherits"),r=e("bn.js"),o=e("../base/buffer").DecoderBuffer,s=e("../base/node"),a=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.call(this,"der",e)}function u(e,t){let i=e.readUInt8(t);if(e.isError(i))return i;const n=a.tagClass[i>>6],r=!(32&i);if(31&~i)i&=31;else{let n=i;for(i=0;!(128&~n);){if(n=e.readUInt8(t),e.isError(n))return n;i<<=7,i|=127&n}}return{cls:n,primitive:r,tag:i,tagStr:a.tag[i]}}function h(e,t,i){let n=e.readUInt8(i);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;const r=127&n;if(r>4)return e.error("length octect is too long");n=0;for(let t=0;t<r;t++){n<<=8;const t=e.readUInt8(i);if(e.isError(t))return t;n|=t}return n}t.exports=l,l.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,s),c.prototype._peekTag=function(e,t,i){if(e.isEmpty())return!1;const n=e.save(),r=u(e,'Failed to peek tag: "'+t+'"');return e.isError(r)?r:(e.restore(n),r.tag===t||r.tagStr===t||r.tagStr+"of"===t||i)},c.prototype._decodeTag=function(e,t,i){const n=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let r=h(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(r))return r;if(!i&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==r)return e.skip(r,'Failed to match body of: "'+t+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(r=e.offset-o.offset,e.restore(o),e.skip(r,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const i=u(e,t);if(e.isError(i))return i;const n=h(e,i.primitive,t);if(e.isError(n))return n;let r;if(r=i.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(r))return r;if("end"===i.tagStr)break}},c.prototype._decodeList=function(e,t,i,n){const r=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=i.decode(e,"der",n);if(e.isError(o)&&t)break;r.push(o)}return r},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let i="";for(let e=0;e<t.length/2;e++)i+=String.fromCharCode(t.readUInt16BE(2*e));return i}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,i){let n;const r=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=127&s,128&s||(r.push(o),o=0);128&s&&r.push(o);const a=r[0]/40|0,l=r[0]%40;if(n=i?r:[a,l].concat(r.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},c.prototype._decodeTime=function(e,t){const i=e.raw().toString();let n,r,o,s,a,l;if("gentime"===t)n=0|i.slice(0,4),r=0|i.slice(4,6),o=0|i.slice(6,8),s=0|i.slice(8,10),a=0|i.slice(10,12),l=0|i.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|i.slice(0,2),r=0|i.slice(2,4),o=0|i.slice(4,6),s=0|i.slice(6,8),a=0|i.slice(8,10),l=0|i.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,r-1,o,s,a,l,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const i=e.raw();let n=new r(i);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../base/buffer":63,"../base/node":65,"../constants/der":67,"bn.js":75,inherits:247}],70:[function(e,t,i){"use strict";const n=i;n.der=e("./der"),n.pem=e("./pem")},{"./der":69,"./pem":71}],71:[function(e,t,i){"use strict";const n=e("inherits"),r=e("safer-buffer").Buffer,o=e("./der");function s(e){o.call(this,e),this.enc="pem"}n(s,o),t.exports=s,s.prototype.decode=function(e,t){const i=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,l=-1;for(let e=0;e<i.length;e++){const t=i[e].match(s);if(null!==t&&t[2]===n){if(-1!==a){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+n);const c=i.slice(a+1,l).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const u=r.from(c,"base64");return o.prototype.decode.call(this,u,t)}},{"./der":69,inherits:247,"safer-buffer":296}],72:[function(e,t,i){"use strict";const n=e("inherits"),r=e("safer-buffer").Buffer,o=e("../base/node"),s=e("../constants/der");function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}t.exports=a,a.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(l,o),l.prototype._encodeComposite=function(e,t,i,n){const o=function(e,t,i,n){let r;"seqof"===e?e="seq":"setof"===e&&(e="set");if(s.tagByName.hasOwnProperty(e))r=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);r=e}if(r>=31)return n.error("Multi-octet tag encoding unsupported");t||(r|=32);return r|=s.tagClassByName[i||"universal"]<<6,r}(e,t,i,this.reporter);if(n.length<128){const e=r.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let a=1;for(let e=n.length;e>=256;e>>=8)a++;const l=r.alloc(2+a);l[0]=o,l[1]=128|a;for(let e=1+a,t=n.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,n])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=r.alloc(2*e.length);for(let i=0;i<e.length;i++)t.writeUInt16BE(e.charCodeAt(i),2*i);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},l.prototype._encodeObjid=function(e,t,i){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t<e.length;t++){let i=e[t];for(n++;i>=128;i>>=7)n++}const o=r.alloc(n);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let i=e[t];for(o[s--]=127&i;(i>>=7)>0;)o[s--]=128|127&i}return this._createEncoderBuffer(o)},l.prototype._encodeTime=function(e,t){let i;const n=new Date(e);return"gentime"===t?i=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!r.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=r.from(t)}if(r.isBuffer(e)){let t=e.length;0===e.length&&t++;const i=r.alloc(t);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let t=e;t>=256;t>>=8)i++;const n=new Array(i);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(r.from(n))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,i){const n=this._baseState;let r;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,i).join()),o.length!==n.defaultBuffer.length)return!1;for(r=0;r<o.length;r++)if(o[r]!==n.defaultBuffer[r])return!1;return!0}},{"../base/node":65,"../constants/der":67,inherits:247,"safer-buffer":296}],73:[function(e,t,i){"use strict";const n=i;n.der=e("./der"),n.pem=e("./pem")},{"./der":72,"./pem":74}],74:[function(e,t,i){"use strict";const n=e("inherits"),r=e("./der");function o(e){r.call(this,e),this.enc="pem"}n(o,r),t.exports=o,o.prototype.encode=function(e,t){const i=r.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<i.length;e+=64)n.push(i.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":72,inherits:247}],75:[function(e,t,i){!function(t,i){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function o(e,t,i){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof t?t.exports=o:i.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function l(e,t,i){var n=a(e,i);return i-1>=t&&(n|=a(e,i-1)<<4),n}function c(e,t,i,n){for(var r=0,o=Math.min(e.length,i),s=t;s<o;s++){var a=e.charCodeAt(s)-48;r*=n,r+=a>=49?a-49+10:a>=17?a-17+10:a}return r}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r<e.length&&(16===t?this._parseHex(e,r,i):(this._parseBase(e,t,r),"le"===i&&this._initArray(this.toArray(),t,i)))},o.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},o.prototype._initArray=function(e,t,i){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,s,a=0;if("be"===i)for(r=e.length-1,o=0;r>=0;r-=3)s=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(r=0,o=0;r<e.length;r+=3)s=e[r]|e[r+1]<<8|e[r+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,o=0,s=0;if("be"===i)for(n=e.length-1;n>=t;n-=2)r=l(e,t,n)<<o,this.words[s]|=67108863&r,o>=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)r=l(e,t,n)<<o,this.words[s]|=67108863&r,o>=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var o=e.length-i,s=o%n,a=Math.min(o,o-s)+i,l=0,u=i;u<a;u+=n)l=c(e,u,u+n,t),this.imuln(r),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=c(e,u,e.length,t),u=0;u<s;u++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,143489
vendor: 4,214 bytes, line 17
1707,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,i){i.negative=t.negative^e.negative;var n=e.length+t.length|0;i.length=n,n=n-1|0;var r=0|e.words[0],o=0|t.words[0],s=r*o,a=67108863&s,l=s/67108864|0;i.words[0]=a;for(var c=1;c<n;c++){for(var u=l>>>26,h=67108863&l,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;u+=(s=(r=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}i.words[c]=0|h,l=0|u}return 0!==l?i.words[c]=0|l:i.length--,i.strip()}o.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var r=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<r|o)).toString(16);i=0!==(o=a>>>24-r&16777215)||s!==this.length-1?u[6-l.length]+l+i:l+i,(r+=2)>=26&&(r-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=d[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);i=(p=p.idivn(f)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,i){var r=this.byteLength(),o=i||Math.max(1,r);n(r<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,c=new e(o),u=this.clone();if(l){for(a=0;!u.isZero();a++)s=u.andln(255),u.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-r;a++)c[a]=0;for(a=0;!u.isZero();a++)s=u.andln(255),u.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 8191&t||(i+=13,t>>>=13),127&t||(i+=7,t>>>=7),15&t||(i+=4,t>>>=4),3&t||(i+=2,t>>>=2),1&t||i++,i},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var n=0;n<i.length;
vendor: 7,410 bytes, line 17
17n++)this.words[n]=t.words[n]^i.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var r=0;r<t;r++)this.words[r]=67108863&~this.words[r];return i>0&&(this.words[r]=~this.words[r]&67108863>>26-i),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var i=e/26|0,r=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<r:this.words[i]&~(1<<r),this.strip()},o.prototype.iadd=function(e){var t,i,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,n=e):(i=e,n=this);for(var r=0,o=0;o<n.length;o++)t=(0|i.words[o])+(0|n.words[o])+r,this.words[o]=67108863&t,r=t>>>26;for(;0!==r&&o<i.length;o++)t=(0|i.words[o])+r,this.words[o]=67108863&t,r=t>>>26;if(this.length=i.length,0!==r)this.words[this.length]=r,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,n=e):(i=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|i.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<i.length;s++)o=(t=(0|i.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,i){var n,r,o,s=e.words,a=t.words,l=i.words,c=0,u=0|s[0],h=8191&u,d=u>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,k=0|s[4],x=8191&k,C=k>>>13,S=0|s[5],E=8191&S,T=S>>>13,A=0|s[6],I=8191&A,M=A>>>13,P=0|s[7],D=8191&P,O=P>>>13,L=0|s[8],R=8191&L,B=L>>>13,N=0|s[9],j=8191&N,F=N>>>13,z=0|a[0],V=8191&z,H=z>>>13,U=0|a[1],W=8191&U,$=U>>>13,G=0|a[2],q=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,K=Z>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],ie=8191&te,ne=te>>>13,re=0|a[6],oe=8191&re,se=re>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,ue=0|a[8],he=8191&ue,de=ue>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var ge=(c+(n=Math.imul(h,V))|0)+((8191&(r=(r=Math.imul(h,H))+Math.imul(d,V)|0))<<13)|0;c=((o=Math.imul(d,H))+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,V),r=(r=Math.imul(p,H))+Math.imul(m,V)|0,o=Math.imul(m,H);var ve=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(r=(r=r+Math.imul(h,$)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,$)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,V),r=(r=Math.imul(v,H))+Math.imul(b,V)|0,o=Math.imul(b,H),n=n+Math.imul(p,W)|0,r=(r=r+Math.imul(p,$)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,$)|0;var be=(c+(n=n+Math.imul(h,q)|0)|0)+((8191&(r=(r=r+Math.imul(h,Y)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,V),r=(r=Math.imul(w,H))+Math.imul(_,V)|0,o=Math.imul(_,H),n=n+Math.imul(v,W)|0,r=(r=r+Math.imul(v,$)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(p,q)|0,r=(r=r+Math.imul(p,Y)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,Y)|0;var ye=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(r=(r=r+Math.imul(h,K)|0)+Math.imul(d,X)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(x,V),r=(r=Math.imul(x,H))+Math.imul(C,V)|0,o=Math.imul(C,H),n=n+Math.imul(w,W)|0,r=(r=r+Math.imul(w,$)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(v,q)|0,r=(r=r+Math.imul(v,Y)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,X)|0,r=(r=r+Math.imul(p,K)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,K)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(r=(r=r+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,V),r=(r=Math.imul(E,H))+Math.imul(T,V)|0,o=Math.imul(T,H),n=n+Math.imul(x,W)|0,r=(r=r+Math.imul(x,$)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(w,q)|0,r=(r=r+Math.imul(w,Y)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,K)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,Q)|0,r=(r=r+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,ie)|0)|0)+((8191&(r=(r=r+Math.imul(h,ne)|0)+Math.imul(d,ie)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,V),r=(r=Math.imul(I,H))+Math.imul(M,V)|0,o=Math.imul(M,H),n=n+Math.imul(E,W)|0,r=(r=r+Math.imul(E,$)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(x,q)|0,r=(r=r+Math.imul(x,Y)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,ie)|0,r=(r=r+Math.imul(p,ne)|0)+Math.imul(m,ie)|0,o=o+Math.imul(m,ne)|0;var ke=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(r=(r=r+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,V),r=(r=Math.imul(D,H))+Math.imul(O,V)|0,o=Math.imul(O,H),n=n+Math.imul(I,W)|0,r=(r=r+Math.imul(I,$)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,$)|0,n=n+Math.imul(E,q)|0,r=(r=r+Math.imul(E,Y)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(x,X)|0,r=(r=r+Math.imul(x,K)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(b,ie)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,r=(r=r+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var xe=(c+(n=n+Math.imul(h,le)|0)|0)+((8191&(r=(r=r+Math.imul(h,ce)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(R,V),r=(r=Math.imul(R,H))+Math.imul(B,V)|0,o=Math.imul(B,H),n=n+Math.imul(D,W)|0,r=(r=r+Math.imul(D,$)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,q)|0,r=(r=r+Math.imul(I,Y)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(E,X)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(x,Q)|0,r=(r=r+Math.imul(x,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(_,ie)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(v,oe)|0,r=(r=r+Math.imul(v,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,le)|0,r=(r=r+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;
vendor: 2,733 bytes, line 17
17var Ce=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,V),r=(r=Math.imul(j,H))+Math.imul(F,V)|0,o=Math.imul(F,H),n=n+Math.imul(R,W)|0,r=(r=r+Math.imul(R,$)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(D,q)|0,r=(r=r+Math.imul(D,Y)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(I,X)|0,r=(r=r+Math.imul(I,K)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(x,ie)|0,r=(r=r+Math.imul(x,ne)|0)+Math.imul(C,ie)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,r=(r=r+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(v,le)|0,r=(r=r+Math.imul(v,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,he)|0,r=(r=r+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(r=(r=r+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,W),r=(r=Math.imul(j,$))+Math.imul(F,W)|0,o=Math.imul(F,$),n=n+Math.imul(R,q)|0,r=(r=r+Math.imul(R,Y)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,K)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(I,Q)|0,r=(r=r+Math.imul(I,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(T,ie)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(x,oe)|0,r=(r=r+Math.imul(x,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(w,le)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(v,he)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,de)|0;var Ee=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(r=(r=r+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,q),r=(r=Math.imul(j,Y))+Math.imul(F,q)|0,o=Math.imul(F,Y),n=n+Math.imul(R,X)|0,r=(r=r+Math.imul(R,K)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(D,Q)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(I,ie)|0,r=(r=r+Math.imul(I,ne)|0)+Math.imul(M,ie)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,r=(r=r+Math.imul(E,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(x,le)|0,r=(r=r+Math.imul(x,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(w,he)|0,r=(r=r+Math.imul(w,de)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,de)|0;var Te=(c+(n=n+Math.imul(v,pe)|0)|0)+((8191&(r=(r=r+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),r=(r=Math.imul(j,K))+Math.imul(F,X
vendor: 11,207 bytes, line 17
17)|0,o=Math.imul(F,K),n=n+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(O,ie)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(I,oe)|0,r=(r=r+Math.imul(I,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,n=n+Math.imul(E,le)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(x,he)|0,r=(r=r+Math.imul(x,de)|0)+Math.imul(C,he)|0,o=o+Math.imul(C,de)|0;var Ae=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(r=(r=r+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,Q),r=(r=Math.imul(j,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(R,ie)|0,r=(r=r+Math.imul(R,ne)|0)+Math.imul(B,ie)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(D,oe)|0,r=(r=r+Math.imul(D,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(I,le)|0,r=(r=r+Math.imul(I,ce)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(E,he)|0,r=(r=r+Math.imul(E,de)|0)+Math.imul(T,he)|0,o=o+Math.imul(T,de)|0;var Ie=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(r=(r=r+Math.imul(x,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ie),r=(r=Math.imul(j,ne))+Math.imul(F,ie)|0,o=Math.imul(F,ne),n=n+Math.imul(R,oe)|0,r=(r=r+Math.imul(R,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(D,le)|0,r=(r=r+Math.imul(D,ce)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(I,he)|0,r=(r=r+Math.imul(I,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(r=(r=r+Math.imul(E,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,me)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,oe),r=(r=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(R,le)|0,r=(r=r+Math.imul(R,ce)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(D,he)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Pe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(r=(r=r+Math.imul(I,me)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,me)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),r=(r=Math.imul(j,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),n=n+Math.imul(R,he)|0,r=(r=r+Math.imul(R,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var De=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(r=(r=r+Math.imul(D,me)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,me)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,he),r=(r=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Oe=(c+(n=n+Math.imul(R,pe)|0)|0)+((8191&(r=(r=r+Math.imul(R,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,me)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Le=(c+(n=Math.imul(j,pe))|0)+((8191&(r=(r=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(r>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=be,l[3]=ye,l[4]=we,l[5]=_e,l[6]=ke,l[7]=xe,l[8]=Ce,l[9]=Se,l[10]=Ee,l[11]=Te,l[12]=Ae,l[13]=Ie,l[14]=Me,l[15]=Pe,l[16]=De,l[17]=Oe,l[18]=Le,0!==c&&(l[19]=c,i.length++),i};function m(e,t,i){return(new g).mulp(e,t,i)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),o.prototype.mulTo=function(e,t){var i,n=this.length+e.length;return i=10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var n=0,r=0,o=0;o<i.length-1;o++){var s=r;r=0;for(var a=67108863&n,l=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=l;c++){var u=o-c,h=(0|e.words[u])*(0|t.words[c]),d=67108863&h;a=67108863&(d=d+a|0),r+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=a,n=s,s=r}return 0!==n?i.words[o]=n:i.length--,i.strip()}(this,e,t):m(this,e,t),i},g.prototype.makeRBT=function(e){for(var t=new Array(e),i=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,i,e);return t},g.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var n=0,r=0;r<t;r++)n|=(1&e)<<t-r-1,e>>=1;return n},g.prototype.permute=function(e,t,i,n,r,o){for(var s=0;s<o;s++)n[s]=t[e[s]],r[s]=i[e[s]]},g.prototype.transform=function(e,t,i,n,r,o){this.permute(o,e,t,i,n,r);for(var s=1;s<r;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<r;u+=a)for(var h=l,d=c,f=0;f<s;f++){var p=i[u+f],m=n[u+f],g=i[u+f+s],v=n[u+f+s],b=h*g-d*v;v=h*v+d*g,g=b,i[u+f]=p+g,n[u+f]=m+v,i[u+f+s]=p-g,n[u+f+s]=m-v,f!==a&&(b=l*h-c*d,d=l*d+c*h,h=b)}},g.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),n=1&i,r=0;for(i=i/2|0;i;i>>>=1)r++;return 1<<r+1+n},g.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var n=0;n<i/2;n++){var r=e[n];e[n]=e[i-n-1],e[i-n-1]=r,r=t[n],t[n]=-t[i-n-1],t[i-n-1]=-r}},g.prototype.normalize13b=function(e,t){for(var i=0,n=0;n<t/2;n++){var r=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+i;e[n]=67108863&r,i=r<67108864?0:r/67108864|0}return e},g.prototype.convert13b=function(e,t,i,r){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<r;++s)i[s]=0;n(0===o),n(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},g.prototype.mulp=function(e,t,i){var n=2*this.guessLen13b(e.length,t.length),r=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),h=new Array(n),d=i.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,l,n,r),this.transform(c,o,u,h,n,r);for(var f=0;f<n;f++){var p=a[f]*u[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*u[f],a[f]=p}return this.conjugate(a,l,n),this.transform(a,l,d,o,n,r),this.conjugate(d,o,n),this.normalize13b(d,n),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,i=0;i<this.length;i++){var r=(0|this.words[i])*e,o=(67108863&r)+(67108863&t);t>>=26,t+=r/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var n=i/26|0,r=i%26;t[i]=(e.words[n]&1<<r)>>>r}return t}(e);if(0===t.length)return new o(1);for(var i=this,n=0;n<t.length&&0===t[n];n++,i=i.sqr());if(++n<t.length)for(var r=i.sqr();n<t.length;n++,r=r.sqr())0!==t[n]&&(i=i.mul(r));return i},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,i=e%26,r=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<i;this.words[t]=l|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t<r;t++)this.words[t]=0;this.length+=r}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,i){var r;n("number"==typeof e&&e>=0),r=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=i;if(r-=s,r=Math.max(0,r),l){for(var c=0;c<s;c++)l.words[c]=this.words[c];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=r);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,i){return n(0===this.negative),this.iushrn(e,t,i)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,r=1<<t;return!(this.length<=i)&&!!(this.words[i]&r)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var r=67108863^67108863>>>t<<t;this.words[this.length-1]&=r}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,i){var r,o,s=e.length+i;this._expand(s);var a=0;for(r=0;r<e.length;r++){o=(0|this.words[r+i])+a;var l=(0|e.words[r])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[r+i]=67108863&o}for(;r<this.length-i;r++)a=(o=(0|this.words[r+i])+a)>>26,this.words[r+i]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r<this.length;r++)a=(o=-(0|this.words[r])+a)>>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var i=(this.length,e.length),n=this.clone(),r=e,s=0|r.words[r.length-1];0!==(i=26-this._countBits(s))&&(r=r.ushln(i),n.iushln(i),s=0|r.words[r.length-1]);var a,l=n.length-r.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=n.clone()._ishlnsubmul(r,1,l);0===u.negative&&(n=u,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|n.words[r.length+h])+(0|n.words[r.length+h-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(r,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(r,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==i&&n.iushrn(i),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,i){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:r,mod:s}
vendor: 9,131 bytes, line 17
17):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),o=i.cmp(n);return o<0||1===r&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,i=0,r=this.length-1;r>=0;r--)i=(t*i+(0|this.words[r]))%e;return i},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var r=(0|this.words[i])+67108864*t;this.words[i]=r/e|0,t=r%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new o(1),s=new o(0),a=new o(0),l=new o(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var u=i.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(r.isOdd()||s.isOdd())&&(r.iadd(u),s.isub(h)),r.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),r.isub(a),s.isub(l)):(i.isub(t),a.isub(r),l.isub(s))}return{a:a,b:l,gcd:i.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,s=new o(1),a=new o(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0===(i.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(i.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(r=0===t.cmpn(1)?s:a).cmpn(0)<0&&r.iadd(e),r},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var n=0;t.isEven()&&i.isEven();n++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var r=t.cmp(i);if(r<0){var o=t;t=i,i=o}else if(0===r||0===i.cmpn(1))break;t.isub(i)}return i.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,i=(e-t)/26,r=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=r,this;for(var o=r,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:r<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var n=0|this.words[i],r=0|e.words[i];if(n!==r){n<r?t=-1:n>r&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:i.ucmp(this.p);return 0===n?(i.words[0]=0,i.length=1):n>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(y,b),y.prototype.split=function(e,t){for(var i=4194303,n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&i,r=10;r<e.length;r++){var s=0|e.words[r];e.words[r-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,e.words[r-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(w,b),r(_,b),r(k,b),k.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,r=67108863&n;n>>>=26,e.words[i]=r,t=n}
vendor: 2,754 bytes, line 17
17return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return v[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},x.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var i=this.m.add(new o(1)).iushrn(2);return this.pow(e,i)}for(var r=this.m.subn(1),s=0;!r.isZero()&&0===r.andln(1);)s++,r.iushrn(1);n(!r.isZero());var a=new o(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,r),d=this.pow(e,r.addn(1).iushrn(1)),f=this.pow(e,r),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=e;for(var n=2;n<i.length;n++)i[n]=this.mul(i[n-1],e);var r=i[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;r!==i[0]&&(r=this.sqr(r)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===u)&&(r=this.mul(r,i[s]),a=0,s=0)):a=0}
vendor: 7,400 bytes, line 17
17l=26}return r},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},r(C,x),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var i=e.mul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:79}],76:[function(e,t,i){"use strict";i.byteLength=function(e){var t=l(e),i=t[0],n=t[1];return 3*(i+n)/4-n},i.toByteArray=function(e){var t,i,n=l(e),s=n[0],a=n[1],c=new o(function(e,t,i){return 3*(t+i)/4-i}(0,s,a)),u=0,h=a>0?s-4:s;for(i=0;i<h;i+=4)t=r[e.charCodeAt(i)]<<18|r[e.charCodeAt(i+1)]<<12|r[e.charCodeAt(i+2)]<<6|r[e.charCodeAt(i+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===a&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,c[u++]=255&t);1===a&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},i.fromByteArray=function(e){for(var t,i=e.length,r=i%3,o=[],s=16383,a=0,l=i-r;a<l;a+=s)o.push(u(e,a,a+s>l?l:a+s));1===r?(t=e[i-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===r&&(t=(e[i-2]<<8)+e[i-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],r[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,i){for(var n,r=[],o=t;o<i;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),r.push(c(n));return r.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},{}],77:[function(e,t,i){!function(t,i){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function o(e,t,i){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof t?t.exports=o:i.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+e)}function l(e,t,i){var n=a(e,i);return i-1>=t&&(n|=a(e,i-1)<<4),n}function c(e,t,i,r){for(var o=0,s=0,a=Math.min(e.length,i),l=t;l<a;l++){var c=e.charCodeAt(l)-48;o*=r,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<r,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r<e.length&&(16===t?this._parseHex(e,r,i):(this._parseBase(e,t,r),"le"===i&&this._initArray(this.toArray(),t,i)))},o.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},o.prototype._initArray=function(e,t,i){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,s,a=0;if("be"===i)for(r=e.length-1,o=0;r>=0;r-=3)s=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(r=0,o=0;r<e.length;r+=3)s=e[r]|e[r+1]<<8|e[r+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,o=0,s=0;if("be"===i)for(n=e.length-1;n>=t;n-=2)r=l(e,t,n)<<o,this.words[s]|=67108863&r,o>=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)r=l(e,t,n)<<o,this.words[s]|=67108863&r,o>=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var o=e.length-i,s=o%n,a=Math.min(o,o-s)+i,l=0,u=i;u<a;u+=n)l=c(e,u,u+n,t),this.imuln(r),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=c(e,u,e.length,t),u=0;u<s;u++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 4,774 bytes, line 17
17777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var r=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<r|o)).toString(16);o=a>>>24-r&16777215,(r+=2)>=26&&(r-=26,s--),i=0!==o||s!==this.length-1?d[6-l.length]+l+i:l+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],u=p[e];i="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(u).toString(e);i=(h=h.idivn(u)).isZero()?m+i:d[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,i){i.negative=t.negative^e.negative;var n=e.length+t.length|0;i.length=n,n=n-1|0;var r=0|e.words[0],o=0|t.words[0],s=r*o,a=67108863&s,l=s/67108864|0;i.words[0]=a;for(var c=1;c<n;c++){for(var u=l>>>26,h=67108863&l,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;u+=(s=(r=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}i.words[c]=0|h,l=0|u}return 0!==l?i.words[c]=0|l:i.length--,i._strip()}o.prototype.toArrayLike=function(e,t,i){this._strip();var r=this.byteLength(),o=i||Math.max(1,r);n(r<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,r),s},o.prototype._toArrayLikeLE=function(e,t){for(var i=0,n=0,r=0,o=0;r<this.length;r++){var s=this.words[r]<<o|n;e[i++]=255&s,i<e.length&&(e[i++]=s>>8&255),i<e.length&&(e[i++]=s>>16&255),6===o?(i<e.length&&(e[i++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i<e.length)for(e[i++]=n;i<e.length;)e[i++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var i=e.length-1,n=0,r=0,o=0;r<this.length;r++){var s=this.words[r]<<o|n;e[i--]=255&s,i>=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===o?(i>=0&&(e[i--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i>=0)for(e[i--]=n;i>=0;)e[i--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 8191&t||(i+=13,t>>>=13),127&t||(i+=7,t>>>=7),15&t||(i+=4,t>>>=4),3&t||(i+=2,t>>>=2),1&t||i++,i},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var n=0;n<i.length;
vendor: 7,414 bytes, line 17
17n++)this.words[n]=t.words[n]^i.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var r=0;r<t;r++)this.words[r]=67108863&~this.words[r];return i>0&&(this.words[r]=~this.words[r]&67108863>>26-i),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var i=e/26|0,r=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<r:this.words[i]&~(1<<r),this._strip()},o.prototype.iadd=function(e){var t,i,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,n=e):(i=e,n=this);for(var r=0,o=0;o<n.length;o++)t=(0|i.words[o])+(0|n.words[o])+r,this.words[o]=67108863&t,r=t>>>26;for(;0!==r&&o<i.length;o++)t=(0|i.words[o])+r,this.words[o]=67108863&t,r=t>>>26;if(this.length=i.length,0!==r)this.words[this.length]=r,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,n=e):(i=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|i.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<i.length;s++)o=(t=(0|i.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,i){var n,r,o,s=e.words,a=t.words,l=i.words,c=0,u=0|s[0],h=8191&u,d=u>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,k=0|s[4],x=8191&k,C=k>>>13,S=0|s[5],E=8191&S,T=S>>>13,A=0|s[6],I=8191&A,M=A>>>13,P=0|s[7],D=8191&P,O=P>>>13,L=0|s[8],R=8191&L,B=L>>>13,N=0|s[9],j=8191&N,F=N>>>13,z=0|a[0],V=8191&z,H=z>>>13,U=0|a[1],W=8191&U,$=U>>>13,G=0|a[2],q=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,K=Z>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],ie=8191&te,ne=te>>>13,re=0|a[6],oe=8191&re,se=re>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,ue=0|a[8],he=8191&ue,de=ue>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var ge=(c+(n=Math.imul(h,V))|0)+((8191&(r=(r=Math.imul(h,H))+Math.imul(d,V)|0))<<13)|0;c=((o=Math.imul(d,H))+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,V),r=(r=Math.imul(p,H))+Math.imul(m,V)|0,o=Math.imul(m,H);var ve=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(r=(r=r+Math.imul(h,$)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,$)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,V),r=(r=Math.imul(v,H))+Math.imul(b,V)|0,o=Math.imul(b,H),n=n+Math.imul(p,W)|0,r=(r=r+Math.imul(p,$)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,$)|0;var be=(c+(n=n+Math.imul(h,q)|0)|0)+((8191&(r=(r=r+Math.imul(h,Y)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,V),r=(r=Math.imul(w,H))+Math.imul(_,V)|0,o=Math.imul(_,H),n=n+Math.imul(v,W)|0,r=(r=r+Math.imul(v,$)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(p,q)|0,r=(r=r+Math.imul(p,Y)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,Y)|0;var ye=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(r=(r=r+Math.imul(h,K)|0)+Math.imul(d,X)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(x,V),r=(r=Math.imul(x,H))+Math.imul(C,V)|0,o=Math.imul(C,H),n=n+Math.imul(w,W)|0,r=(r=r+Math.imul(w,$)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(v,q)|0,r=(r=r+Math.imul(v,Y)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,X)|0,r=(r=r+Math.imul(p,K)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,K)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(r=(r=r+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,V),r=(r=Math.imul(E,H))+Math.imul(T,V)|0,o=Math.imul(T,H),n=n+Math.imul(x,W)|0,r=(r=r+Math.imul(x,$)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(w,q)|0,r=(r=r+Math.imul(w,Y)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,K)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,Q)|0,r=(r=r+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,ie)|0)|0)+((8191&(r=(r=r+Math.imul(h,ne)|0)+Math.imul(d,ie)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,V),r=(r=Math.imul(I,H))+Math.imul(M,V)|0,o=Math.imul(M,H),n=n+Math.imul(E,W)|0,r=(r=r+Math.imul(E,$)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(x,q)|0,r=(r=r+Math.imul(x,Y)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,ie)|0,r=(r=r+Math.imul(p,ne)|0)+Math.imul(m,ie)|0,o=o+Math.imul(m,ne)|0;var ke=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(r=(r=r+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,V),r=(r=Math.imul(D,H))+Math.imul(O,V)|0,o=Math.imul(O,H),n=n+Math.imul(I,W)|0,r=(r=r+Math.imul(I,$)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,$)|0,n=n+Math.imul(E,q)|0,r=(r=r+Math.imul(E,Y)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(x,X)|0,r=(r=r+Math.imul(x,K)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(b,ie)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,r=(r=r+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var xe=(c+(n=n+Math.imul(h,le)|0)|0)+((8191&(r=(r=r+Math.imul(h,ce)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(R,V),r=(r=Math.imul(R,H))+Math.imul(B,V)|0,o=Math.imul(B,H),n=n+Math.imul(D,W)|0,r=(r=r+Math.imul(D,$)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,q)|0,r=(r=r+Math.imul(I,Y)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(E,X)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(x,Q)|0,r=(r=r+Math.imul(x,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(_,ie)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(v,oe)|0,r=(r=r+Math.imul(v,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,le)|0,r=(r=r+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;
vendor: 6,959 bytes, line 17
17var Ce=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,V),r=(r=Math.imul(j,H))+Math.imul(F,V)|0,o=Math.imul(F,H),n=n+Math.imul(R,W)|0,r=(r=r+Math.imul(R,$)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(D,q)|0,r=(r=r+Math.imul(D,Y)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(I,X)|0,r=(r=r+Math.imul(I,K)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(x,ie)|0,r=(r=r+Math.imul(x,ne)|0)+Math.imul(C,ie)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,r=(r=r+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(v,le)|0,r=(r=r+Math.imul(v,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,he)|0,r=(r=r+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(r=(r=r+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,W),r=(r=Math.imul(j,$))+Math.imul(F,W)|0,o=Math.imul(F,$),n=n+Math.imul(R,q)|0,r=(r=r+Math.imul(R,Y)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,K)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(I,Q)|0,r=(r=r+Math.imul(I,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(T,ie)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(x,oe)|0,r=(r=r+Math.imul(x,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(w,le)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(v,he)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,de)|0;var Ee=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(r=(r=r+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,q),r=(r=Math.imul(j,Y))+Math.imul(F,q)|0,o=Math.imul(F,Y),n=n+Math.imul(R,X)|0,r=(r=r+Math.imul(R,K)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(D,Q)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(I,ie)|0,r=(r=r+Math.imul(I,ne)|0)+Math.imul(M,ie)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,r=(r=r+Math.imul(E,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(x,le)|0,r=(r=r+Math.imul(x,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(w,he)|0,r=(r=r+Math.imul(w,de)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,de)|0;var Te=(c+(n=n+Math.imul(v,pe)|0)|0)+((8191&(r=(r=r+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),r=(r=Math.imul(j,K))+Math.imul(F,X)|0,o=Math.imul(F,K),n=n+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(O,ie)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(I,oe)|0,r=(r=r+Math.imul(I,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,n=n+Math.imul(E,le)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(x,he)|0,r=(r=r+Math.imul(x,de)|0)+Math.imul(C,he)|0,o=o+Math.imul(C,de)|0;var Ae=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(r=(r=r+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,Q),r=(r=Math.imul(j,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(R,ie)|0,r=(r=r+Math.imul(R,ne)|0)+Math.imul(B,ie)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(D,oe)|0,r=(r=r+Math.imul(D,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(I,le)|0,r=(r=r+Math.imul(I,ce)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(E,he)|0,r=(r=r+Math.imul(E,de)|0)+Math.imul(T,he)|0,o=o+Math.imul(T,de)|0;var Ie=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(r=(r=r+Math.imul(x,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ie),r=(r=Math.imul(j,ne))+Math.imul(F,ie)|0,o=Math.imul(F,ne),n=n+Math.imul(R,oe)|0,r=(r=r+Math.imul(R,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(D,le)|0,r=(r=r+Math.imul(D,ce)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(I,he)|0,r=(r=r+Math.imul(I,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(r=(r=r+Math.imul(E,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,me)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,oe),r=(r=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(R,le)|0,r=(r=r+Math.imul(R,ce)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(D,he)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Pe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(r=(r=r+Math.imul(I,me)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,me)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),r=(r=Math.imul(j,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),n=n+Math.imul(R,he)|0,r=(r=r+Math.imul(R,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var De=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(r=(r=r+Math.imul(D,me)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,me)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,he),r=(r=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Oe=(c+(n=n+Math.imul(R,pe)|0)|0)+((8191&(r=(r=r+Math.imul(R,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,me)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Le=(c+(n=Math.imul(j,pe))|0)+((8191&(r=(r=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(r>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=be,l[3]=ye,l[4]=we,l[5]=_e,l[6]=ke,l[7]=xe,l[8]=Ce,l[9]=Se,l[10]=Ee,l[11]=Te,l[12]=Ae,l[13]=Ie,l[14]=Me,l[15]=Pe,l[16]=De,l[17]=Oe,l[18]=Le,0!==c&&(l[19]=c,i.length++),i};function v(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var n=0,r=0,o=0;o<i.length-1;o++){var s=r;r=0;for(var a=67108863&n,l=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=l;c++){var u=o-c,h=(0|e.words[u])*(0|t.words[c]),d=67108863&h;a=67108863&(d=d+a|0),r+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=a,n=s,s=r}return 0!==n?i.words[o]=n:i.length--,i._strip()}function b(e,t,i){return v(e,t,i)}function y(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):i<63?m(this,e,t):i<1024?v(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),i=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,i,e);return t},y.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var n=0,r=0;r<t;r++)n|=(1&e)<<t-r-1,e>>=1;return n},y.prototype.permute=function(e,t,i,n,r,o){for(var s=0;s<o;s++)n[s]=t[e[s]],r[s]=i[e[s]]},y.prototype.transform=function(e,t,i,n,r,o){this.permute(o,e,t,i,n,r);for(var s=1;s<r;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<r;u+=a)for(var h=l,d=c,f=0;f<s;
vendor: 4,579 bytes, line 17
17f++){var p=i[u+f],m=n[u+f],g=i[u+f+s],v=n[u+f+s],b=h*g-d*v;v=h*v+d*g,g=b,i[u+f]=p+g,n[u+f]=m+v,i[u+f+s]=p-g,n[u+f+s]=m-v,f!==a&&(b=l*h-c*d,d=l*d+c*h,h=b)}},y.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),n=1&i,r=0;for(i=i/2|0;i;i>>>=1)r++;return 1<<r+1+n},y.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var n=0;n<i/2;n++){var r=e[n];e[n]=e[i-n-1],e[i-n-1]=r,r=t[n],t[n]=-t[i-n-1],t[i-n-1]=-r}},y.prototype.normalize13b=function(e,t){for(var i=0,n=0;n<t/2;n++){var r=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+i;e[n]=67108863&r,i=r<67108864?0:r/67108864|0}return e},y.prototype.convert13b=function(e,t,i,r){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<r;++s)i[s]=0;n(0===o),n(!(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},y.prototype.mulp=function(e,t,i){var n=2*this.guessLen13b(e.length,t.length),r=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),h=new Array(n),d=i.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,l,n,r),this.transform(c,o,u,h,n,r);for(var f=0;f<n;f++){var p=a[f]*u[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*u[f],a[f]=p}return this.conjugate(a,l,n),this.transform(a,l,d,o,n,r),this.conjugate(d,o,n),this.normalize13b(d,n),i.negative=e.negative^t.negative,i.length=e.length+t.length,i._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var i=0,r=0;r<this.length;r++){var o=(0|this.words[r])*e,s=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=s>>>26,this.words[r]=67108863&s}return 0!==i&&(this.words[r]=i,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var n=i/26|0,r=i%26;t[i]=e.words[n]>>>r&1}return t}(e);if(0===t.length)return new o(1);for(var i=this,n=0;n<t.length&&0===t[n];n++,i=i.sqr());if(++n<t.length)for(var r=i.sqr();n<t.length;n++,r=r.sqr())0!==t[n]&&(i=i.mul(r));return i},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,i=e%26,r=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<i;this.words[t]=l|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t<r;t++)this.words[t]=0;this.length+=r}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,i){var r;n("number"==typeof e&&e>=0),r=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=i;if(r-=s,r=Math.max(0,r),l){for(var c=0;c<s;c++)l.words[c]=this.words[c];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=r);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,i){return n(0===this.negative),this.iushrn(e,t,i)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,r=1<<t;return!(this.length<=i)&&!!(this.words[i]&r)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var r=67108863^67108863>>>t<<t;this.words[this.length-1]&=r}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?
vendor: 11,680 bytes, line 17
17(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,i){var r,o,s=e.length+i;this._expand(s);var a=0;for(r=0;r<e.length;r++){o=(0|this.words[r+i])+a;var l=(0|e.words[r])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[r+i]=67108863&o}for(;r<this.length-i;r++)a=(o=(0|this.words[r+i])+a)>>26,this.words[r+i]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,r=0;r<this.length;r++)a=(o=-(0|this.words[r])+a)>>26,this.words[r]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var i=(this.length,e.length),n=this.clone(),r=e,s=0|r.words[r.length-1];0!==(i=26-this._countBits(s))&&(r=r.ushln(i),n.iushln(i),s=0|r.words[r.length-1]);var a,l=n.length-r.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=n.clone()._ishlnsubmul(r,1,l);0===u.negative&&(n=u,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|n.words[r.length+h])+(0|n.words[r.length+h-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(r,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(r,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==i&&n.iushrn(i),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,i){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:r,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var r,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),o=i.cmp(n);return o<0||1===r&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var i=(1<<26)%e,r=0,o=this.length-1;o>=0;o--)r=(i*r+(0|this.words[o]))%e;return t?-r:r},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var i=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*i;this.words[r]=o/e|0,i=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new o(1),s=new o(0),a=new o(0),l=new o(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var u=i.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(r.isOdd()||s.isOdd())&&(r.iadd(u),s.isub(h)),r.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),r.isub(a),s.isub(l)):(i.isub(t),a.isub(r),l.isub(s))}return{a:a,b:l,gcd:i.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,s=new o(1),a=new o(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0===(i.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(i.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(r=0===t.cmpn(1)?s:a).cmpn(0)<0&&r.iadd(e),r},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var n=0;t.isEven()&&i.isEven();n++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var r=t.cmp(i);if(r<0){var o=t;t=i,i=o}else if(0===r||0===i.cmpn(1))break;t.isub(i)}return i.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,i=(e-t)/26,r=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=r,this;for(var o=r,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:r<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var n=0|this.words[i],r=0|e.words[i];if(n!==r){n<r?t=-1:n>r&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:i.ucmp(this.p);return 0===n?(i.words[0]=0,i.length=1):n>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},r(k,_),k.prototype.split=function(e,t){for(var i=4194303,n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&i,r=10;r<e.length;r++){var s=0|e.words[r];e.words[r-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,e.words[r-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(x,_),r(C,_),r(S,_),S.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,r=67108863&n;n>>>=26,e.words[i]=r,t=n}
vendor: 2,763 bytes, line 17
17return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new x;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return w[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var i=this.m.add(new o(1)).iushrn(2);return this.pow(e,i)}for(var r=this.m.subn(1),s=0;!r.isZero()&&0===r.andln(1);)s++,r.iushrn(1);n(!r.isZero());var a=new o(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,r),d=this.pow(e,r.addn(1).iushrn(1)),f=this.pow(e,r),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=e;for(var n=2;n<i.length;n++)i[n]=this.mul(i[n-1],e);var r=i[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;r!==i[0]&&(r=this.sqr(r)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===u)&&(r=this.mul(r,i[s]),a=0,s=0)):a=0}
vendor: 22,299 bytes, line 17
17l=26}return r},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},r(T,E),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var i=e.mul(t),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:79}],78:[function(e,t,i){var n;function r(e){this.rand=e}if(t.exports=function(e){return n||(n=new r(null)),n.generate(e)},t.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=e("crypto");if("function"!=typeof o.randomBytes)throw new Error("Not supported");r.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},{crypto:79}],79:[function(e,t,i){},{}],80:[function(e,t,i){var n=e("safe-buffer").Buffer;function r(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,i=new Array(t),r=0;r<t;r++)i[r]=e.readUInt32BE(4*r);return i}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,i,n,r){for(var o,s,a,l,c=i[0],u=i[1],h=i[2],d=i[3],f=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,b=1;b<r;b++)o=c[f>>>24]^u[p>>>16&255]^h[m>>>8&255]^d[255&g]^t[v++],s=c[p>>>24]^u[m>>>16&255]^h[g>>>8&255]^d[255&f]^t[v++],a=c[m>>>24]^u[g>>>16&255]^h[f>>>8&255]^d[255&p]^t[v++],l=c[g>>>24]^u[f>>>16&255]^h[p>>>8&255]^d[255&m]^t[v++],f=o,p=s,m=a,g=l;return o=(n[f>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^t[v++],s=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&f])^t[v++],a=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[f>>>8&255]<<8|n[255&p])^t[v++],l=(n[g>>>24]<<24|n[f>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[v++],[o>>>=0,s>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],n=[],r=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,l=0;l<256;++l){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,i[s]=c,n[c]=s;var u=e[s],h=e[u],d=e[h],f=257*e[c]^16843008*c;r[0][s]=f<<24|f>>>8,r[1][s]=f<<16|f>>>16,r[2][s]=f<<8|f>>>24,r[3][s]=f,f=16843009*d^65537*h^257*u^16843008*s,o[0][c]=f<<24|f>>>8,o[1][c]=f<<16|f>>>16,o[2][c]=f<<8|f>>>24,o[3][c]=f,0===s?s=a=1:(s=u^e[e[e[d^u]]],a^=e[e[a]])}return{SBOX:i,INV_SBOX:n,SUB_MIX:r,INV_SUB_MIX:o}}();function c(e){this._key=r(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,n=4*(i+1),r=[],o=0;o<t;o++)r[o]=e[o];for(o=t;o<n;o++){var s=r[o-1];o%t===0?(s=s<<8|s>>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t===4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),r[o]=r[o-t]^s}for(var c=[],u=0;u<n;u++){var h=n-u,d=r[h-(u%4?0:4)];c[u]=u<4||h<=4?d:l.INV_SUB_MIX[0][l.SBOX[d>>>24]]^l.INV_SUB_MIX[1][l.SBOX[d>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[d>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&d]]}this._nRounds=i,this._keySchedule=r,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=r(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=n.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},c.prototype.decryptBlock=function(e){var t=(e=r(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},{"safe-buffer":295}],81:[function(e,t,i){var n=e("./aes"),r=e("safe-buffer").Buffer,o=e("cipher-base"),s=e("inherits"),a=e("./ghash"),l=e("buffer-xor"),c=e("./incr32");function u(e,t,i,s){o.call(this);var l=r.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new a(u),i=function(e,t,i){if(12===t.length)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var n=new a(i),o=t.length,s=o%16;n.update(t),s&&(s=16-s,n.update(r.alloc(s,0))),n.update(r.alloc(8,0));var l=8*o,u=r.alloc(8);u.writeUIntBE(l,0,8),n.update(u),e._finID=n.state;var h=r.from(e._finID);return c(h),h}(this,i,u),this._prev=r.from(i),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(u,o),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var n=Math.min(e.length,t.length),r=0;r<n;++r)i+=e[r]^t[r];return i}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!r.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=u},{"./aes":80,"./ghash":85,"./incr32":86,"buffer-xor":122,"cipher-base":125,inherits:247,"safe-buffer":295}],82:[function(e,t,i){var n=e("./encrypter"),r=e("./decrypter"),o=e("./modes/list.json");i.createCipher=i.Cipher=n.createCipher,i.createCipheriv=i.Cipheriv=n.createCipheriv,i.createDecipher=i.Decipher=r.createDecipher,i.createDecipheriv=i.Decipheriv=r.createDecipheriv,i.listCiphers=i.getCiphers=function(){return Object.keys(o)}},{"./decrypter":83,"./encrypter":84,"./modes/list.json":94}],83:[function(e,t,i){var n=e("./authCipher"),r=e("safe-buffer").Buffer,o=e("./modes"),s=e("./streamCipher"),a=e("cipher-base"),l=e("./aes"),c=e("evp_bytestokey");function u(e,t,i){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new l.AES(t),this._prev=r.from(i),this._mode=e,this._autopadding=!0}function h(){this.cache=r.allocUnsafe(0)}function d(e,t,i){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=r.from(i)),"GCM"!==a.mode&&i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof t&&(t=r.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,i,!0):"auth"===a.type?new n(a.module,t,i,!0):new u(a.module,t,i)}e("inherits")(u,a),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,t),n.push(i);return r.concat(n)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<t;)if(e[i+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=r.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function(e,t){var i=o[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=c(t,!1,i.key,i.iv);return d(e,n.key,n.iv)},i.createDecipheriv=d},{"./aes":80,"./authCipher":81,"./modes":93,"./streamCipher":96,"cipher-base":125,evp_bytestokey:212,inherits:247,"safe-buffer":295}],84:[function(e,t,i){var n=e("./modes"),r=e("./authCipher"),o=e("safe-buffer").Buffer,s=e("./streamCipher"),a=e("cipher-base"),l=e("./aes"),c=e("evp_bytestokey");function u(e,t,i){a.call(this),this._cache=new d,this._cipher=new l.AES(t),this._prev=o.from(i),this._mode=e,this._autopadding=!0}e("inherits")(u,a),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var n=[];t=this._cache.get();)i=this._mode.encrypt(this,t),n.push(i);return o.concat(n)};var h=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function f(e,t,i){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=o.from(i)),"GCM"!==a.mode&&i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===a.type?new s(a.module,t,i):"auth"===a.type?new r(a.module,t,i):new u(a.module,t,i)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),i=-1;++i<e;)t.writeUInt8(e,i);return o.concat([this.cache,t])},i.createCipheriv=f,i.createCipher=function(e,t){var i=n[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=c(t,!1,i.key,i.iv);return f(e,r.key,r.iv)}},{"./aes":80,"./authCipher":81,"./modes":93,"./streamCipher":96,"cipher-base":125,evp_bytestokey:212,inherits:247,"safe-buffer":295}],85:[function(e,t,i){var n=e("safe-buffer").Buffer,r=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,i,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],r=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),i=!!(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,i&&(n[0]=n[0]^225<<24)}this.state=o(r)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,r],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=s},{"safe-buffer":295}],86:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break}e.writeUInt8(0,i)}}},{}],87:[function(e,t,i){var n=e("buffer-xor");i.encrypt=function(e,t){var i=n(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return n(r,i)}},{"buffer-xor":122}],88:[function(e,t,i){var n=e("safe-buffer").Buffer,r=e("buffer-xor");function o(e,t,i){var o=t.length,s=r(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,i?t:s]),s}i.encrypt=function(e,t,i){for(var r,s=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){s=n.concat([s,o(e,t,i)]);break}r=e._cache.length,s=n.concat([s,o(e,t.slice(0,r),i)]),t=t.slice(r)}return s}},{"buffer-xor":122,"safe-buffer":295}],89:[function(e,t,i){var n=e("safe-buffer").Buffer;function r(e,t,i){for(var n,r,s=-1,a=0;++s<8;)n=t&1<<7-s?128:0,a+=(128&(r=e._cipher.encryptBlock(e._prev)[0]^n))>>s%8,e._prev=o(e._prev,i?n:r);return a}function o(e,t){var i=e.length,r=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++r<i;)o[r]=e[r]<<1|e[r+1]>>7;return o}i.encrypt=function(e,t,i){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=r(e,t[a],i);return s}},{"safe-buffer":295}],90:[function(e,t,i){var n=e("safe-buffer").Buffer;function r(e,t,i){var r=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([i?t:r])]),r}i.encrypt=function(e,t,i){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=r(e,t[a],i);return s}},{"safe-buffer":295}],91:[function(e,t,i){var n=e("buffer-xor"),r=e("safe-buffer").Buffer,o=e("../incr32");function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}i.encrypt=function(e,t){var i=Math.ceil(t.length/16),o=e._cache.length;e._cache=r.concat([e._cache,r.allocUnsafe(16*i)]);for(var a=0;a<i;a++){var l=s(e),c=o+16*a;e._cache.writeUInt32BE(l[0],c+0),e._cache.writeUInt32BE(l[1],c+4),e._cache.writeUInt32BE(l[2],c+8),e._cache.writeUInt32BE(l[3],c+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,u)}},{"../incr32":86,"buffer-xor":122,"safe-buffer":295}],92:[function(e,t,i){i.encrypt=function(e,t){return e._cipher.encryptBlock(t)},i.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],93:[function(e,t,i){var n={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},r=e("./list.json");for(var o in r)r[o].module=n[r[o].mode];t.exports=r},{"./cbc":87,"./cfb":88,"./cfb1":89,"./cfb8":90,"./ctr":91,"./ecb":92,"./list.json":94,"./ofb":95}],94:[function(e,t,i){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],95:[function(e,t,i){(function(t){(function(){var n=e("buffer-xor");function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}i.encrypt=function(e,i){for(;e._cache.length<i.length;)e._cache=t.concat([e._cache,r(e)]);var o=e._cache.slice(0,i.length);return e._cache=e._cache.slice(i.length),n(i,o)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:123,"buffer-xor":122}],96:[function(e,t,i){var n=e("./aes"),r=e("safe-buffer").Buffer,o=e("cipher-base");function s(e,t,i,s){o.call(this),this._cipher=new n.AES(t),this._prev=r.from(i),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=s,this._mode=e}e("inherits")(s,o),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},{"./aes":80,"cipher-base":125,inherits:247,"safe-buffer":295}],97:[function(e,t,i){var n=e("browserify-des"),r=e("browserify-aes/browser"),o=e("browserify-aes/modes"),s=e("browserify-des/modes"),a=e("evp_bytestokey");function l(e,t,i){if(e=e.toLowerCase(),o[e])return r.createCipheriv(e,t,i);if(s[e])return new n({key:t,iv:i,mode:e});throw new TypeError("invalid suite type")}function c(e,t,i){if(e=e.toLowerCase(),o[e])return r.createDecipheriv(e,t,i);if(s[e])return new n({key:t,iv:i,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}i.createCipher=i.Cipher=function(e,t){var i,n;if(e=e.toLowerCase(),o[e])i=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");i=8*s[e].key,n=s[e].iv}var r=a(t,!1,i,n);return l(e,r.key,r.iv)},i.createCipheriv=i.Cipheriv=l,i.createDecipher=i.Decipher=function(e,t){var i,n;if(e=e.toLowerCase(),o[e])i=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");i=8*s[e].key,n=s[e].iv}var r=a(t,!1,i,n);return c(e,r.key,r.iv)},i.createDecipheriv=i.Decipheriv=c,i.listCiphers=i.getCiphers=function(){return Object.keys(s).concat(r.getCiphers())}},{"browserify-aes/browser":82,"browserify-aes/modes":93,"browserify-des":98,"browserify-des/modes":99,evp_bytestokey:212}],98:[function(e,t,i){var n=e("cipher-base"),r=e("des.js"),o=e("inherits"),s=e("safe-buffer").Buffer,a={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};function l(e){n.call(this);var t,i=e.mode.toLowerCase(),r=a[i];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==i&&"des-ede-cbc"!==i||(o=s.concat([o,o.slice(0,8)]));var l=e.iv;s.isBuffer(l)||(l=s.from(l)),this._des=r.create({key:o,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=l,o(l,n),l.prototype._update=function(e){return s.from(this._des.update(e))},l.prototype._final=function(){return s.from(this._des.final())}},{"cipher-base":125,"des.js":182,inherits:247,"safe-buffer":295}],99:[function(e,t,i){i["des-ecb"]={key:8,iv:0},i["des-cbc"]=i.des={key:8,iv:8},i["des-ede3-cbc"]=i.des3={key:24,iv:8},i["des-ede3"]={key:24,iv:0},i["des-ede-cbc"]={key:16,iv:8},i["des-ede"]={key:16,iv:0}},{}],100:[function(e,t,i){(function(i){(function(){var n=e("bn.js"),r=e("randombytes");function o(e){var t,i=e.modulus.byteLength();do{t=new n(r(i))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),s=t.modulus.byteLength(),a=new n(e).mul(r.blinder).umod(t.modulus),l=a.toRed(n.mont(t.prime1)),c=a.toRed(n.mont(t.prime2)),u=t.coefficient,h=t.prime1,d=t.prime2,f=l.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=f.isub(p).imul(u).umod(h).imul(d);return p.iadd(m).imul(r.unblinder).umod(t.modulus).toArrayLike(i,"be",s)}s.getr=o,t.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":77,buffer:123,randombytes:277}],101:[function(e,t,i){"use strict";t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":102}],102:[function(e,t,i){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""}
17,DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],103:[function(e,t,i){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],104:[function(e,t,i){"use strict";var n=e("safe-buffer").Buffer,r=e("create-hash"),o=e("readable-stream"),s=e("inherits"),a=e("./sign"),l=e("./verify"),c=e("./algorithms.json");function u(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");
vendor: 8,840 bytes, line 17
17this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new u(e)}function f(e){return new h(e)}Object.keys(c).forEach(function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]}),s(u,o.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i()},u.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),n=a(i,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},s(h,o.Writable),h.prototype._write=function(e,t,i){this._hash.update(e),i()},h.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},h.prototype.verify=function(e,t,i){var r="string"==typeof t?n.from(t,i):t;this.end();var o=this._hash.digest();return l(r,o,e,this._signType,this._tag)},t.exports={Sign:d,Verify:f,createSign:d,createVerify:f}},{"./algorithms.json":102,"./sign":105,"./verify":106,"create-hash":177,inherits:247,"readable-stream":121,"safe-buffer":295}],105:[function(e,t,i){"use strict";var n=e("safe-buffer").Buffer,r=e("create-hmac"),o=e("browserify-rsa"),s=e("elliptic").ec,a=e("bn.js"),l=e("parse-asn1"),c=e("./curves.json");function u(e,t,i,o){if((e=n.from(e.toArray())).length<t.byteLength()){var s=n.alloc(t.byteLength()-e.length);e=n.concat([s,e])}var a=i.length,l=function(e,t){e=h(e,t),e=e.mod(t);var i=n.from(e.toArray());if(i.length<t.byteLength()){var r=n.alloc(t.byteLength()-i.length);i=n.concat([r,i])}return i}(i,t),c=n.alloc(a);c.fill(1);var u=n.alloc(a);return u=r(o,u).update(c).update(n.from([0])).update(e).update(l).digest(),c=r(o,u).update(c).digest(),{k:u=r(o,u).update(c).update(n.from([1])).update(e).update(l).digest(),v:c=r(o,u).update(c).digest()}}function h(e,t){var i=new a(e),n=(e.length<<3)-t.bitLength();return n>0&&i.ishrn(n),i}function d(e,t,i){var o,s;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=r(i,t.k).update(t.v).digest(),o=n.concat([o,t.v]);s=h(o,e),t.k=r(i,t.k).update(t.v).update(n.from([0])).digest(),t.v=r(i,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function f(e,t,i,n){return e.toRed(a.mont(i)).redPow(t).fromRed().mod(n)}t.exports=function(e,t,i,r,p){var m=l(t);if(m.curve){if("ecdsa"!==r&&"ecdsa/rsa"!==r)throw new Error("wrong private key type");return function(e,t){var i=c[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var r=new s(i).keyFromPrivate(t.privateKey),o=r.sign(e);return n.from(o.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==r)throw new Error("wrong private key type");return function(e,t,i){var r,o=t.params.priv_key,s=t.params.p,l=t.params.q,c=t.params.g,p=new a(0),m=h(e,l).mod(l),g=!1,v=u(o,l,e,i);for(;!1===g;)p=f(c,r=d(l,v,i),s,l),0===(g=r.invm(l).imul(m.add(o.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var i=e.length+t.length+4,r=[48,i,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,g)}(e,m,i)}if("rsa"!==r&&"ecdsa/rsa"!==r)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=n.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return o(v,m)},t.exports.getKey=u,t.exports.makeKey=d},{"./curves.json":103,"bn.js":77,"browserify-rsa":100,"create-hmac":179,elliptic:194,"parse-asn1":261,"safe-buffer":295}],106:[function(e,t,i){"use strict";var n=e("safe-buffer").Buffer,r=e("bn.js"),o=e("elliptic").ec,s=e("parse-asn1"),a=e("./curves.json");function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}t.exports=function(e,t,i,c,u){var h=s(i);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,i){var n=a[i.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var r=new o(n),s=i.data.subjectPrivateKey.data;return r.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,i){var n=i.data.p,o=i.data.q,a=i.data.g,c=i.data.pub_key,u=s.signature.decode(e,"der"),h=u.s,d=u.r;l(h,o),l(d,o);var f=r.mont(n),p=h.invm(o),m=a.toRed(f).redPow(new r(t).mul(p).mod(o)).fromRed().mul(c.toRed(f).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o);return 0===m.cmp(d)}(e,t,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([u,t]);for(var d=h.modulus.byteLength(),f=[1],p=0;t.length+f.length+2<d;)f.push(255),p+=1;f.push(0);for(var m=-1;++m<t.length;)f.push(t[m]);f=n.from(f);var g=r.mont(h.modulus);e=(e=new r(e).toRed(g)).redPow(new r(h.publicExponent)),e=n.from(e.fromRed().toArray());var v=p<8?1:0;for(d=Math.min(e.length,f.length),e.length!==f.length&&(v=1),m=-1;++m<d;)v|=e[m]^f[m];return 0===v}},{"./curves.json":103,"bn.js":77,elliptic:194,"parse-asn1":261,"safe-buffer":295}],107:[function(e,t,i){"use strict";var n={};function r(e,t,i){i||(i=Error);var r=function(e){var i,n;function r(i,n,r){return e.call(this,function(e,i,n){return"string"==typeof t?t:t(e,i,n)}(i,n,r))||this}return n=e,(i=r).prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n,r}(i);r.prototype.name=i.name,r.prototype.code=e,n[e]=r}function o(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map(function(e){return String(e)}),i>2?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,i){var n,r,s,a;if("string"==typeof t&&(r="not ",t.substr(!s||s<0?0:+s,r.length)===r)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof i)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],108:[function(e,t,i){(function(i){(function(){"use strict";var n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=c;var r=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(c,r);for(var s=n(o.prototype),a=0;a<s.length;a++){var l=s[a];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);r.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||i.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":110,"./_stream_writable":112,_process:269,inherits:247}],109:[function(e,t,i){"use strict";
vendor: 4,093 bytes, line 17
17t.exports=r;var n=e("./_stream_transform");function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}e("inherits")(r,n),r.prototype._transform=function(e,t,i){i(null,e)}},{"./_stream_transform":111,inherits:247}],110:[function(e,t,i){(function(i,n){(function(){"use strict";var r;t.exports=S,S.ReadableState=C;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),a=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,u=e("util");c=u&&u.debuglog?u.debuglog("stream"):function(){};var h,d,f,p=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(S,s);var k=m.errorOrDestroy,x=["error","close","destroy","pause","resume"];function C(t,i,n){r=r||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=i instanceof r),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function S(t){if(r=r||e("./_stream_duplex"),!(this instanceof S))return new S(t);var i=this instanceof r;this._readableState=new C(t,this,i),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(e,t,i,n,r){c("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,s);else if(r||(o=function(e,t){var i;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(i=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return i}(s,t)),o)k(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?k(e,new _):T(e,s,t,!0);else if(s.ended)k(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):D(e,s)):T(e,s,t,!1)}else n||(s.reading=!1,D(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(e,t,i,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",i)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&M(e)),D(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),i=!0),E(this,e,t,!1,i)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var i=new h(t);this._readableState.decoder=i,this._readableState.encoding=this._readableState.decoder.encoding;
vendor: 4,740 bytes, line 17
17for(var n=this._readableState.buffer.head,r="";null!==n;)r+=i.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var A=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function D(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var i=t.length;if(c("maybeReadMore read 0"),e.read(0),i===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){c("readable nexttick read 0"),e.read(0)}function B(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i}function F(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(z,t,e))}function z(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function V(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}S.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):M(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,r=t.needReadable;return c("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",r=!0),t.ended||t.reading?c("reading or ended",r=!1):r&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(i,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(e){k(this,new w("_read()"))},S.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,c("pipe count=%d opts=%j",r.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:g;function a(t,i){c("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",a),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",d),h=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){c("onend"),e.end()}r.endEmitted?i.nextTick(s):n.once("end",s),e.on("unpipe",a);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",u);var h=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==V(r.pipes,e))&&!h&&(c("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,i){if("function"==typeof e.prependListener)return e.prepe
vendor: 25,329 bytes, lines 17-24
17ndListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",f),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(c("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=V(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this},S.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,c("on readable",r.length,r.reading),r.length?M(this):r.reading||i.nextTick(R,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),n},S.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,i=this._readableState,n=!1;for(var r in e.on("end",function(){if(c("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){(c("wrapped data"),i.decoder&&(r=i.decoder.write(r)),i.objectMode&&null==r)||(i.objectMode||r&&r.length)&&(t.push(r)||(n=!0,e.pause()))}),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<x.length;o++)e.on(x[o],this.emit.bind(this,x[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=j,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,i){return void 0===f&&(f=e("./internal/streams/from")),f(S,t,i)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:269,buffer:123,events:211,inherits:247,"string_decoder/":308,util:79}],111:[function(e,t,i){"use strict";t.exports=u;var n=e("../errors").codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function c(e,t){var i=this._transformState;i.transforming=!1;var n=i.writecb;if(null===n)return this.emit("error",new o);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,i){d(e,t,i)})}function d(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}e("inherits")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,i){i(new r("_transform()"))},u.prototype._write=function(e,t,i){var n=this._transformState;if(n.writecb=i,n.writechunk=e,n.writeencoding=t,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":107,"./_stream_duplex":108,inherits:247}],112:[function(e,t,i){(function(i,n){(function(){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var n=e.entry;e.entry=null;for(;n;){var r=n.callback;t.pendingcb--,r(i),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=S,S.WritableState=C;var s={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),l=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,h=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,f=e("../errors").codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,k=h.errorOrDestroy;function x(){}function C(t,n,s){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=n instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(P,e,t),e._writableState.errorEmitted=!0,k(e,r)):(o(r),e._writableState.errorEmitted=!0,k(e,r),P(e,t))}(e,n,r,t,o);else{var s=I(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||A(e,n),r?i.nextTick(T,e,n,s,o):T(e,n,s,o)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function S(t){var i=this instanceof(o=o||e("./_stream_duplex"));if(!i&&!u.call(S,this))return new S(t);this._writableState=new C(t,this,i),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function E(e,t,i,n,r,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):i?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function T(e,t,i,n){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function A(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=i;for(var a=0,l=!0;i;)o[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;o.allBuffers=l,E(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,u=i.encoding,h=i.callback;if(E(e,t,!1,t.objectMode?1:c.length,c,u,h),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final(function(i){t.pendingcb--,i&&k(e,i),t.prefinished=!0,e.emit("prefinish"),P(e,t)})}function P(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}e("inherits")(S,a),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(C.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===S&&(e&&e._writableState instanceof C)}})):u=function(e){return e instanceof this},S.prototype.pipe=function(){k(this,new v)},S.prototype.write=function(e,t,n){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=e,l.isBuffer(r)||r instanceof c);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=x),o.ending?function(e,t){var n=new w;k(e,n),i.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var o;return null===n?o=new y:"string"==typeof n||t.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(k(e,o),i.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,i,n,r,o){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,i));return t}(t,n,r);n!==s&&(i=!0,r="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:r,isBuf:i,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else E(e,t,!1,a,n,r,o);return c}(this,o,a,e,t,n)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,i){i(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,P(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=h.destroy,S.prototype._undestroy=h.undestroy,S.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:269,buffer:123,inherits:247,"util-deprecate":402}],113:[function(e,t,i){(function(i){(function(){"use strict";var n;function r(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var o=e("./end-of-stream"),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var i=e[d].read();null!==i&&(e[u]=null,e[s]=null,e[a]=null,t(f(i,!1)))}}function m(e){i.nextTick(p,e)}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((r(n={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){i.nextTick(function(){e[l]?n(e[l]):t(f(void 0,!0))})});var n,r=this[u];if(r)n=new Promise(function(e,t){return function(i,n){e.then(function(){t[c]?i(f(void 0,!0)):t[h](i,n)},n)}}(r,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));n=new Promise(this[h])}return this[u]=n,n}},Symbol.asyncIterator,function(){return this}),r(n,"return",function(){var e=this;return new Promise(function(t,i){e[d].destroy(null,function(e){e?i(e):t(f(void 0,!0))})})}),n),g);t.exports=function(e){var t,i=Object.create(v,(r(t={},d,{value:e,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,c,{value:e._readableState.endEmitted,writable:!0}),r(t,h,{value:function(e,t){var n=i[d].read();n?(i[u]=null,i[s]=null,i[a]=null,e(f(n,!1))):(i[s]=e,i[a]=t)},writable:!0}),t));return i[u]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[a];return null!==t&&(i[u]=null,i[s]=null,i[a]=null,t(e)),void(i[l]=e)}var n=i[s];null!==n&&(i[u]=null,i[s]=null,i[a]=null,n(f(void 0,!0))),i[c]=!0}),e.on("readable",m.bind(null,i)),i}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":116,_process:269}],114:[function(e,t,i){"use strict";function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach(function(t){o(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function o(e,t,i){return(t=a(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=e("buffer").Buffer,c=e("util").inspect,u=c&&c.custom||"inspect";function h(e,t,i){l.prototype.copy.call(e,t,i)}t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,i,n;return t=e,(i=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t=l.allocUnsafe(e>>>0),i=this.head,n=0;i;)h(i.data,t,n),n+=i.data.length,i=i.next;return t}},{key:"consume",value:function(e,t){var i;return e<this.head.data.length?(i=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):i=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,i=1,n=t.data;for(e-=n.length;t=t.next;){var r=t.data,o=e>r.length?r.length:e;if(o===r.length?n+=r:n+=r.slice(0,e),0===(e-=o)){o===r.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(o));break}++i}return this.length-=i,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),i=this.head,n=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var r=i.data,o=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,o),0===(e-=o)){o===r.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=r.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return c(this,r(r({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,i),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:123,util:79}],115:[function(e,t,i){(function(e){(function(){"use strict";function i(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(r,this,t)):e.nextTick(r,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(i,s,t)):e.nextTick(i,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var i=e._readableState,n=e._writableState;i&&i.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:269}],116:[function(e,t,i){"use strict";var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}t.exports=function e(t,i,o){if("function"==typeof i)return e(t,null,i);i||(i={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];e.apply(this,n)}}}(o||r);var s=i.readable||!1!==i.readable&&t.readable,a=i.writable||!1!==i.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){a=!1,c=!0,s||o.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){s=!1,h=!0,a||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return s&&!h?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",d),t.on("finish",u),!1!==i.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",p)}}},{"../../../errors":107}],117:[function(e,t,i){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],118:[function(e,t,i){"use strict";var n;var r=e("../../../errors").codes,o=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];var u,h=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new o("streams");var d=i.map(function(t,r){var o=r<i.length-1;return function(t,i,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;t.on("close",function(){a=!0}),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:i,writable:r},function(e){if(e)return o(e);a=!0,o()});var l=!1;return function(e){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}(t,o,r>0,function(e){u||(u=e),e&&d.forEach(l),o||(d.forEach(l),h(u))})});return i.reduce(c)}},{"../../../errors":107,"./end-of-stream":116}],119:[function(e,t,i){"use strict";var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,r){var o=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null}(t,r,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(r?i:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{"../../../errors":107}],120:[function(e,t,i){t.exports=e("events").EventEmitter},{events:211}],121:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118}],122:[function(e,t,i){(function(e){(function(){t.exports=function(t,i){for(var n=Math.min(t.length,i.length),r=new e(n),o=0;o<n;++o)r[o]=t[o]^i[o];return r}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:123}],123:[function(e,t,i){(function(t){(function(){ 18/*! 19 * The buffer module from node.js, for the browser. 20 * 21 * @author Feross Aboukhadijeh <https://feross.org> 22 * @license MIT 23 */ 24"use strict";var t=e("base64-js"),n=e("ieee754");i.Buffer=s,i.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},i.INSPECT_MAX_BYTES=50;var r=2147483647;function o(e){if(e>
vendor: 9,137 bytes, line 24
24r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return a(e,t,i)}function a(e,t,i){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|d(e,t),n=o(i),r=n.write(e,t);r!==i&&(n=n.slice(0,r));return n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return function(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i);return n.__proto__=s.prototype,n}(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,i);var r=function(e){if(s.isBuffer(e)){var t=0|h(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}if(void 0!==e.length)return"number"!=typeof e.length||V(e.length)?o(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),o(e<0?0:0|h(e))}function u(e){for(var t=e.length<0?0:0|h(e.length),i=o(t),n=0;n<t;n+=1)i[n]=255&e[n];return i}function h(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return j(e).length;default:if(r)return n?-1:N(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return E(this,t,i);case"latin1":case"binary":return T(this,t,i);case"base64":return x(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function m(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),V(i=+i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:g(e,t,i,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):g(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function g(e,t,i,n,r){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=i;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(i+l>a&&(i=a-l),o=i;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function v(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[i+s]=a}return s}function b(e,t,i,n){return F(N(t,e.length-i),e,i,n)}function y(e,t,i,n){return F(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function w(e,t,i,n){return y(e,t,i,n)}function _(e,t,i,n){return F(j(t),e,i,n)}function k(e,t,i,n){return F(function(e,t){for(var i,n,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,r=i%256,o.push(r),o.push(n);return o}(t,e.length-i),e,i,n)}function x(e,i,n){return 0===i&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(i,n))}function C(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var o,s,a,l,c=e[r],u=null,h=c>239?4:c>223?3:c>191?2:1;if(r+h<=i)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[r+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=h}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=S));return i}(n)}i.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,i){return a(e,t,i)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,i){return function(e,t,i){return l(e),e<=0?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)}(e,t,i)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,n=t.length,r=0,o=Math.min(i,n);r<o;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=s.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var o=e[i];if(z(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):f.apply(this,arguments)}
vendor: 9,565 bytes, line 24
24,s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=i.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,i,n,r){if(z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(n>>>=0),a=(i>>>=0)-(t>>>=0),l=Math.min(o,a),c=this.slice(n,r),u=e.slice(t,i),h=0;h<l;++h)if(c[h]!==u[h]){o=c[h],a=u[h];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},s.prototype.indexOf=function(e,t,i){return m(this,e,t,i,!0)},s.prototype.lastIndexOf=function(e,t,i){return m(this,e,t,i,!1)},s.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return y(this,e,t,i);case"latin1":case"binary":return w(this,e,t,i);case"base64":return _(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function E(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function T(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function A(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",o=t;o<i;++o)r+=B(e[o]);return r}function I(e,t,i){for(var n=e.slice(t,i),r="",o=0;o<n.length;o+=2)r+=String.fromCharCode(n[o]+256*n[o+1]);return r}function M(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,i,n,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function D(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function O(e,t,i,r,o){return t=+t,i>>>=0,o||D(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function L(e,t,i,r,o){return t=+t,i>>>=0,o||D(e,0,i,8),n.write(e,t,i,r,52,8),i+8}s.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||M(e,t,this.length);for(var n=this[e],r=1,o=0;++o<t&&(r*=256);)n+=this[e+o]*r;return n},s.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||M(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||M(e,t,this.length);for(var n=this[e],r=1,o=0;++o<t&&(r*=256);)n+=this[e+o]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||M(e,t,this.length);for(var n=t,r=1,o=this[e+--n];n>0&&(r*=256);)o+=this[e+--n]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t>>>=0,i>>>=0,n)||P(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,o=0;for(this[t]=255&e;++o<i&&(r*=256);)this[t+o]=e/r&255;return t+i},s.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t>>>=0,i>>>=0,n)||P(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+i},s.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var r=Math.pow(2,8*i-1);P(this,e,t,i,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+i},s.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var r=Math.pow(2,8*i-1);P(this,e,t,i,r-1,-r)}var o=i-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+i},s.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,i){return O(this,e,t,!0,i)},s.prototype.writeFloatBE=function(e,t,i){return O(this,e,t,!1,i)},s.prototype.writeDoubleLE=function(e,t,i){return L(this,e,t,!0,i)},s.prototype.writeDoubleBE=function(e,t,i){return L(this,e,t,!1,i)},s.prototype.copy=function(e,t,i,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r=n-i;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,i,n);else if(this===e&&i<t&&t<n)for(var o=r-1;o>=0;--o)e[o+t]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,n),t);return r},s.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var r=e.charCodeAt(0);("utf8"===n&&r<128||"latin1"===n)&&(e=r)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),l=a.length;
24if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=a[o%l]}return this};var R=/[^+/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var i;t=t||1/0;for(var n=e.length,r=null,o=[],s=0;s<n;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function j(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":76,buffer:123,ieee754:246}],124:[function(e,t,i){ 25/*! choices.js v9.1.0 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ 26var n,r;n=window,r=function(){return function(){var e={282:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearChoices=t.activateChoices=t.filterChoices=t.addChoice=void 0;var n=i(883);t.addChoice=function(e){var t=e.value,i=e.label,r=e.id,o=e.groupId,s=e.disabled,a=e.elementId,l=e.customProperties,c=e.placeholder,u=e.keyCode;return{type:n.ACTION_TYPES.ADD_CHOICE,value:t,label:i,id:r,groupId:o,disabled:s,elementId:a,customProperties:l,placeholder:c,keyCode:u}},t.filterChoices=function(e){return{type:n.ACTION_TYPES.FILTER_CHOICES,results:e}},t.activateChoices=function(e){return void 0===e&&(e=!0),{type:n.ACTION_TYPES.ACTIVATE_CHOICES,active:e}},t.clearChoices=function(){return{type:n.ACTION_TYPES.CLEAR_CHOICES}}},783:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGroup=void 0;var n=i(883);t.addGroup=function(e){var t=e.value,i=e.id,r=e.active,o=e.disabled;return{type:n.ACTION_TYPES.ADD_GROUP,value:t,id:i,active:r,disabled:o}}},464:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.highlightItem=t.removeItem=t.addItem=void 0;var n=i(883);t.addItem=function(e){var t=e.value,i=e.label,r=e.id,o=e.choiceId,s=e.groupId,a=e.customProperties,l=e.placeholder,c=e.keyCode;return{type:n.ACTION_TYPES.ADD_ITEM,value:t,label:i,id:r,choiceId:o,groupId:s,customProperties:a,placeholder:l,keyCode:c}},t.removeItem=function(e,t){return{type:n.ACTION_TYPES.REMOVE_ITEM,id:e,choiceId:t}},t.highlightItem=function(e,t){return{type:n.ACTION_TYPES.HIGHLIGHT_ITEM,id:e,highlighted:t}}},137:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setIsLoading=t.resetTo=t.clearAll=void 0;var n=i(883);t.clearAll=function(){return{type:n.ACTION_TYPES.CLEAR_ALL}},t.resetTo=function(e){return{type:n.ACTION_TYPES.RESET_TO,state:e}},t.setIsLoading=function(e){return{type:n.ACTION_TYPES.SET_IS_LOADING,isLoading:e}}},373:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(i(996)),s=r(i(70)),a=i(282),l=i(783),c=i(464),u=i(137),h=i(520),d=i(883),f=i(789),p=i(799),m=i(655),g=r(i(744)),v=r(i(686)),b="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,y={},w=function(){function e(t,i){var r=this;void 0===t&&(t="[data-choice]"),void 0===i&&(i={}),this.config=o.default.all([f.DEFAULT_CONFIG,e.defaults.options,i],{arrayMerge:function(e,t){return n([],t,!0)}});var s=(0,p.diff)(this.config,f.DEFAULT_CONFIG);s.length&&console.warn("Unknown config option(s) passed",s.join(", "));var a="string"==typeof t?document.querySelector(t):t;if(!(a instanceof HTMLInputElement||a instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement=a.type===d.TEXT_TYPE,this._isSelectOneElement=a.type===d.SELECT_ONE_TYPE,this._isSelectMultipleElement=a.type===d.SELECT_MULTIPLE_TYPE,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this.config.searchEnabled=this._isSelectMultipleElement||this.config.searchEnabled,["auto","always"].includes("".concat(this.config.render
vendor: 4,840 bytes, line 26
26SelectedChoices))||(this.config.renderSelectedChoices="auto"),i.addItemFilter&&"function"!=typeof i.addItemFilter){var l=i.addItemFilter instanceof RegExp?i.addItemFilter:new RegExp(i.addItemFilter);this.config.addItemFilter=l.test.bind(l)}if(this._isTextElement?this.passedElement=new h.WrappedInput({element:a,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new h.WrappedSelect({element:a,classNames:this.config.classNames,template:function(e){return r._templates.option(e)}}),this.initialised=!1,this._store=new g.default,this._initialState=m.defaultState,this._currentState=m.defaultState,this._prevState=m.defaultState,this._currentValue="",this._canSearch=!!this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=(0,p.generateId)(this.passedElement.element,"choices-"),this._direction=this.passedElement.dir,!this._direction){var c=window.getComputedStyle(this.passedElement.element).direction;c!==window.getComputedStyle(document.documentElement).direction&&(this._direction=c)}if(this._idNames={itemChoice:"item-choice"},this._isSelectElement&&(this._presetGroups=this.passedElement.optionGroups,this._presetOptions=this.passedElement.options),this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&this._isTextElement){var u=this.passedElement.value.split(this.config.delimiter);this._presetItems=this._presetItems.concat(u)}if(this.passedElement.options&&this.passedElement.options.forEach(function(e){r._presetChoices.push({value:e.value,label:e.innerHTML,selected:!!e.selected,disabled:e.disabled||e.parentNode.disabled,placeholder:""===e.value||e.hasAttribute("placeholder"),customProperties:e.dataset["custom-properties"]})}),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onSelectKey=this._onSelectKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive)return this.config.silent||console.warn("Trying to initialise Choices on element already initialised",{element:t}),void(this.initialised=!0);this.init()}return Object.defineProperty(e,"defaults",{get:function(){return Object.preventExtensions({get options(){return y},get templates(){return v.default}})},enumerable:!1,configurable:!0}),e.prototype.init=function(){if(!this.initialised){this._createTemplates(),this._createElements(),this._createStructure(),this._store.subscribe(this._render),this._render(),this._addEventListeners(),(!this.config.addItems||this.passedElement.element.hasAttribute("disabled"))&&this.disable(),this.initialised=!0;var e=this.config.callbackOnInit;e&&"function"==typeof e&&e.call(this)}},e.prototype.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this.clearStore(),this._isSelectElement&&(this.passedElement.options=this._presetOptions),this._templates=v.default,this.initialised=!1)},e.prototype.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},e.prototype.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},e.prototype.highlightItem=function(e,t){if(void 0===t&&(t=!0),!e||!e.id)return this;var i=e.id,n=e.groupId,r=void 0===n?-1:n,o=e.value,s=void 0===o?"":o,a=e.label,l=void 0===a?"":a,u=r>=0?this._store.getGroupById(r):null;return this._store.dispatch((0,c.highlightItem)(i,!0)),t&&this.passedElement.triggerEvent(d.EVENTS.highlightItem,{id:i,value:s,label:l,groupValue:u&&u.value?u.value:null}),this},e.prototype.unhighlightItem=function(e){if(!e||!e.id)return this;var t=e.id,i=e.groupId,n=void 0===i?-1:i,r=e.value,o=void 0===r?"":r,s=e.label,a=void 0===s?"":s,l=n>=0?this._store.getGroupById(n):null;return this._store.dispatch((0,c.highlightItem)(t,!1)),this.passedElement.triggerEvent(d.EVENTS.highlightItem,{id:t,value:o,label:a,groupValue:l&&l.value?l.value:null}),this},e.prototype.highlightAll=function(){var e=this;
26return this._store.items.forEach(function(t){return e.highlightItem(t)}),this},e.prototype.unhighlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.unhighlightItem(t)}),this},e.prototype.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter(function(t){return t.value===e}).forEach(function(e){return t._removeItem(e)}),this},e.prototype.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter(function(t){return t.id!==e}).forEach(function(e){return t._removeItem(e)}),this},e.prototype.removeHighlightedItems=function(e){var t=this;return void 0===e&&(e=!1),this._store.highlightedActiveItems.forEach(function(i){t._removeItem(i),e&&t._triggerChange(i.value)}),this},e.prototype.showDropdown=function(e){var t=this;return this.dropdown.isActive||requestAnimationFrame(function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(d.EVENTS.showDropdown,{})}),this},e.prototype.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame(function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(d.EVENTS.hideDropdown,{})}),this):this},e.prototype.getValue=function(e){void 0===e&&(e=!1);var t=this._store.activeItems.reduce(function(t,i){var n=e?i.value:i;return t.push(n),t},[]);return this._isSelectOneElement?t[0]:t},e.prototype.setValue=function(e){var t=this;return this.initialised?(e.forEach(function(e){return t._setChoiceOrItem(e)}),this):this},e.prototype.setChoiceByValue=function(e){var t=this;return!this.initialised||this._isTextElement||(Array.isArray(e)?e:[e]).forEach(function(e){return t._findAndSelectChoiceByValue(e)}),this},e.prototype.setChoices=function(e,t,i,n){var r=this;if(void 0===e&&(e=[]),void 0===t&&(t="value"),void 0===i&&(i="label"),void 0===n&&(n=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if("string"!=typeof t||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(n&&this.clearChoices(),"function"==typeof e){var o=e(this);if("function"==typeof Promise&&o instanceof Promise)return new Promise(function(e){return requestAnimationFrame(e)}).then(function(){return r._handleLoadingState(!0)}).then(function(){return o}).then(function(e){return r.setChoices(e,t,i,n)}).catch(function(e){r.config.silent||console.error(e)}).then(function(){return r._handleLoadingState(!1)}).then(function(){return r});if(!Array.isArray(o))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof o));return this.setChoices(o,t,i,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach(function(e){if(e.choices)r._addGroup({id:e.id?parseInt("".concat(e.id),10):null,group:e,valueKey:t,labelKey:i});else{var n=e;r._addChoice({value:n[t],label:n[i],isSelected:!!n.selected,isDisabled:!!n.disabled,placeholder:!!n.placeholder,customProperties:n.customProperties})}}),this._stopLoading(),this},e.prototype.clearChoices=function(){return this._store.dispatch((0,a.clearChoices)()),this},e.prototype.clearStore=function(){return this._store.dispatch((0,u.clearAll)()),this},e.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch((0,a.activateChoices)(!0))),this},e.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,i=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),i&&this._renderItems(),this._prevState=this._currentState)}},e.prototype._renderChoices=function(){var e=this,t=this._store,i=t.activeGroups,n=t.activeChoices,r=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return e.choiceList.scrollToTop()}),i.length>=1&&!this._isSearching){var o=n.filter(function(e){return!0===e.placeholder&&-1===e.groupId});o.length>=1&&(r=this._createChoicesFragment(o,r)),r=this._createGroupsFragment(i,n,r)}else n.length>=1&&(r=this._createChoicesFragment(n,r));if(r.childNodes&&r.childNodes.length>0){var s=this._store.activeItems,a=this._canAddItem(s,this.input.value);if(a.response)this.choiceList.append(r),this._highlightChoice();else{var l=this._getTemplate("notice",a.notice);this.choiceList.append(l)}}else{var c=void 0;l=void 0,this._isSearching?(l="function"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,c=this._getTemplate("notice",l,"no-results")):(l="function"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,c=this._getTemplate("notice",l,"no-choices")),this.choiceList.append(c)}},e.prototype._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},e.prototype._createGroupsFragment=function(e,t,i){var n=this;return void 0===i&&(i=document.createDocumentFragment()),this.config.shouldSort&&e.sort(this.config.sorter),e.forEach(function(e){var r=function(e){return t.filter(function(t){return n._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&("always"===n.config.render
vendor: 14,113 bytes, line 26
26SelectedChoices||!t.selected)})}(e);if(r.length>=1){var o=n._getTemplate("choiceGroup",e);i.appendChild(o),n._createChoicesFragment(r,i,!0)}}),i},e.prototype._createChoicesFragment=function(e,t,i){var r=this;void 0===t&&(t=document.createDocumentFragment()),void 0===i&&(i=!1);var o=this.config,s=o.renderSelectedChoices,a=o.searchResultLimit,l=o.renderChoiceLimit,c=this._isSearching?p.sortByScore:this.config.sorter,u=function(e){if("auto"!==s||r._isSelectOneElement||!e.selected){var i=r._getTemplate("choice",e,r.config.itemSelectText);t.appendChild(i)}},h=e;"auto"!==s||this._isSelectOneElement||(h=e.filter(function(e){return!e.selected}));var d=h.reduce(function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e},{placeholderChoices:[],normalChoices:[]}),f=d.placeholderChoices,m=d.normalChoices;(this.config.shouldSort||this._isSearching)&&m.sort(c);var g=h.length,v=this._isSelectOneElement?n(n([],f,!0),m,!0):m;this._isSearching?g=a:l&&l>0&&!i&&(g=l);for(var b=0;b<g;b+=1)v[b]&&u(v[b]);return t},e.prototype._createItemsFragment=function(e,t){var i=this;void 0===t&&(t=document.createDocumentFragment());var n=this.config,r=n.shouldSortItems,o=n.sorter,s=n.removeItemButton;return r&&!this._isSelectOneElement&&e.sort(o),this._isTextElement?this.passedElement.value=e.map(function(e){return e.value}).join(this.config.delimiter):this.passedElement.options=e,e.forEach(function(e){var n=i._getTemplate("item",e,s);t.appendChild(n)}),t},e.prototype._triggerChange=function(e){null!=e&&this.passedElement.triggerEvent(d.EVENTS.change,{value:e})},e.prototype._selectPlaceholderChoice=function(e){this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value)},e.prototype._handleButtonAction=function(e,t){if(e&&t&&this.config.removeItems&&this.config.removeItemButton){var i=t.parentNode&&t.parentNode.dataset.id,n=i&&e.find(function(e){return e.id===parseInt(i,10)});n&&(this._removeItem(n),this._triggerChange(n.value),this._isSelectOneElement&&this._store.placeholderChoice&&this._selectPlaceholderChoice(this._store.placeholderChoice))}},e.prototype._handleItemAction=function(e,t,i){var n=this;if(void 0===i&&(i=!1),e&&t&&this.config.removeItems&&!this._isSelectOneElement){var r=t.dataset.id;e.forEach(function(e){e.id!==parseInt("".concat(r),10)||e.highlighted?!i&&e.highlighted&&n.unhighlightItem(e):n.highlightItem(e)}),this.input.focus()}},e.prototype._handleChoiceAction=function(e,t){if(e&&t){var i=t.dataset.id,n=i&&this._store.getChoiceById(i);if(n){var r=e[0]&&e[0].keyCode?e[0].keyCode:void 0,o=this.dropdown.isActive;n.keyCode=r,this.passedElement.triggerEvent(d.EVENTS.choice,{choice:n}),n.selected||n.disabled||this._canAddItem(e,n.value).response&&(this._addItem({value:n.value,label:n.label,choiceId:n.id,groupId:n.groupId,customProperties:n.customProperties,placeholder:n.placeholder,keyCode:n.keyCode}),this._triggerChange(n.value)),this.clearInput(),o&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},e.prototype._handleBackspace=function(e){if(this.config.removeItems&&e){var t=e[e.length-1],i=e.some(function(e){return e.highlighted});this.config.editItems&&!i&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(i||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},e.prototype._startLoading=function(){this._store.dispatch((0,u.setIsLoading)(!0))},e.prototype._stopLoading=function(){this._store.dispatch((0,u.setIsLoading)(!1))},e.prototype._handleLoadingState=function(e){void 0===e&&(e=!0);var t=this.itemList.getChild(".".concat(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText))&&this.itemList.append(t):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},e.prototype._handleSearch=function(e){if(e&&this.input.isFocussed){var t=this._store.choices,i=this.config,n=i.searchFloor,r=i.searchChoices,o=t.some(function(e){return!e.active});if(e&&e.length>=n){var s=r?this._searchChoices(e):0;this.passedElement.triggerEvent(d.EVENTS.search,{value:e,resultCount:s})}else o&&(this._isSearching=!1,this._store.dispatch((0,a.activateChoices)(!0)))}},e.prototype._canAddItem=function(e,t){var i=!0,n="function"==typeof this.config.addItemText?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var r=(0,p.existsInArray)(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(i=!1,n="function"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&r&&i&&(i=!1,n="function"==typeof this.config.uniqueItemText?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&i&&"function"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(i=!1,n="function"==typeof this.config.customAddItemText?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:i,notice:n}},e.prototype._searchChoices=function(e){var t="string"==typeof e?e.trim():e,i="string"==typeof this._currentValue?this._currentValue.trim():this._currentValue;if(t.length<1&&t==="".concat(i," "))return 0;var r=this._store.searchableChoices,o=t,l=n([],this.config.searchFields,!0),c=Object.assign(this.config.fuseOptions,{keys:l,includeMatches:!0}),u=new s.default(r,c).search(o);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,a.filterChoices)(u)),u.length},e.prototype._addEventListeners=function(){var e=document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},e.prototype._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},e.prototype._onKeyDown=function(e){var t=e.keyCode,i=this._store.activeItems,n=this.input.isFocussed,r=this.dropdown.isActive,o=this.itemList.hasChildren(),s=String.fromCharCode(t),a=/[a-zA-Z0-9-_ ]/.test(s),l=d.KEY_CODES.BACK_KEY,c=d.KEY_CODES.DELETE_KEY,u=d.KEY_CODES.ENTER_KEY,h=d.KEY_CODES.A_KEY,f=d.KEY_CODES.ESC_KEY,p=d.KEY_CODES.UP_KEY,m=d.KEY_CODES.DOWN_KEY,g=d.KEY_CODES.PAGE_UP_KEY,v=d.KEY_CODES.PAGE_DOWN_KEY;switch(this._isTextElement||r||!a||(this.showDropdown(),this.input.isFocussed||(this.input.value+=s.toLowerCase())),t){case h:return this._onSelectKey(e,o);case u:return this._onEnterKey(e,i,r);case f:return this._onEscapeKey(r);case p:case g:case m:case v:return this._onDirectionKey(e,r);case c:case l:return this._onDeleteKey(e,i,n)}},e.prototype._onKeyUp=function(e){var t=e.target,i=e.keyCode,n=this.input.value,r=this._store.activeItems,o=this._canAddItem(r,n),s=d.KEY_CODES.BACK_KEY,l=d.KEY_CODES.DELETE_KEY;if(this._isTextElement)if(o.notice&&n){var c=this._getTemplate("notice",o.notice);this.dropdown.element.innerHTML=c.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var u=(i===s||i===l)&&t&&!t.value,h=!this._isTextElement&&this._isSearching,f=this._canSearch&&o.response;u&&h?(this._isSearching=!1,this._store.dispatch((0,a.activateChoices)(!0))):f&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},e.prototype._onSelectKey=function(e,t){var i=e.ctrlKey,n=e.metaKey;(i||n)&&t&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},e.prototype._onEnterKey=function(e,t,i){var n=e.target,r=d.KEY_CODES.ENTER_KEY,o=n&&n.hasAttribute("data-button");if(this._isTextElement&&n&&n.value){var s=this.input.value;this._canAddItem(t,s).response&&(this.hideDropdown(!0),this._addItem({value:s}),this._triggerChange(s),this.clearInput())}if(o&&(this._handleButtonAction(t,n),e.preventDefault()),i){var a=this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));a&&(t[0]&&(t[0].keyCode=r),this._handleChoiceAction(t,a)),e.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),e.preventDefault())},e.prototype._onEscapeKey=function(e){e&&(this.hideDropdown(!0),this.containerOuter.focus())},e.prototype._onDirectionKey=function(e,t){var i=e.keyCode,n=e.metaKey,r=d.KEY_CODES.DOWN_KEY,o=d.KEY_CODES.PAGE_UP_KEY,s=d.KEY_CODES.PAGE_DOWN_KEY;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var a=i===r||i===s?1:-1,l="[data-choice-selectable]",c=void 0;if(n||i===s||i===o)c=a>0?this.dropdown.element.querySelector("".concat(l,":last-of-type")):this.dropdown.element.querySelector(l);else{var u=this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));c=u?(0,p.getAdjacentEl)(u,l,a):this.dropdown.element.querySelector(l)}c&&((0,p.isScrolledIntoView)(c,this.choiceList.element,a)||this.choiceList.scrollToChildElement(c,a),this._highlightChoice(c)),e.preventDefault()}},e.prototype._onDeleteKey=function(e,t,i){var n=e.target;this._isSelectOneElement||n.value||!i||(this._handleBackspace(t),e.preventDefault())},e.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},e.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(t)&&((t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()),this._wasTap=!0},e.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(b&&this.choiceList.element.contains(t)){var i=this.choiceList.element.firstElementChild,n="ltr"===this._direction?e.offsetX>=i.offsetWidth:e.offsetX<i.offsetLeft;this._isScrollingOnIe=n}if(t!==this.input.element){var r=t.closest("[data-button],[data-item],[data-choice]");if(r instanceof HTMLElement){var o=e.shiftKey,s=this._store.activeItems,a=r.dataset;"button"in a?this._handleButtonAction(s,r):"item"in a?this._handleItemAction(s,r,o):"choice"in a&&this._handleChoiceAction(s,r)}e.preventDefault()}}},e.prototype._onMouseOver=function(e){var t=e.target;t instanceof HTMLElement&&"choice"in t.dataset&&this._highlightChoice(t)},e.prototype._onClick=function(e){var t=e.target;this.containerOuter.element.contains(t)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&t!==this.input.element&&!this.dropdown.element.contains(t)&&this.hideDropdown():this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),this.containerOuter.focus()):(this._store.highlightedActiveItems.length>0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},e.prototype._onFocus=function(e){var t,i=this,n=e.target;n&&this.containerOuter.element.contains(n)&&((t={})[d.TEXT_TYPE]=function(){n===i.input.element&&i.containerOuter.addFocusState()},t[d.SELECT_ONE_TYPE]=function(){i.containerOuter.addFocusState(),n===i.input.element&&i.showDropdown(!0)},t[d.SELECT_MULTIPLE_TYPE]=function(){n===i.input.element&&(i.showDropdown(!0),i.containerOuter.addFocusState())},t)[this.passedElement.element.type]()},e.prototype._onBlur=function(e){var t,i=this,n=e.target;if(n&&this.containerOuter.element.contains(n)&&!this._isScrollingOnIe){var r=this._store.activeItems.some(function(e){return e.highlighted});((t={})[d.TEXT_TYPE]=function(){n===i.input.element&&(i.containerOuter.removeFocusState(),r&&i.unhighlightAll(),i.hideDropdown(!0))},t[d.SELECT_ONE_TYPE]=function(){i.containerOuter.removeFocusState(),(n===i.input.element||n===i.containerOuter.element&&!i._canSearch)&&i.hideDropdown(!0)},t[d.SELECT_MULTIPLE_TYPE]=function(){n===i.input.element&&(i.containerOuter.removeFocusState(),i.hideDropdown(!0),r&&i.unhighlightAll())},t)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},e.prototype._onFormReset=function(){this._store.dispatch((0,u.resetTo)(this._initialState))},e.prototype._highlightChoice=function(e){var t=this;void 0===e&&(e=null);var i=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(i.length){var n=e;Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState))).forEac
vendor: 7,683 bytes, line 26
26h(function(e){e.classList.remove(t.config.classNames.highlightedState),e.setAttribute("aria-selected","false")}),n?this._highlightPosition=i.indexOf(n):(n=i.length>this._highlightPosition?i[this._highlightPosition]:i[i.length-1])||(n=i[0]),n.classList.add(this.config.classNames.highlightedState),n.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(d.EVENTS.highlightChoice,{el:n}),this.dropdown.isActive&&(this.input.setActiveDescendant(n.id),this.containerOuter.setActiveDescendant(n.id))}},e.prototype._addItem=function(e){var t=e.value,i=e.label,n=void 0===i?null:i,r=e.choiceId,o=void 0===r?-1:r,s=e.groupId,a=void 0===s?-1:s,l=e.customProperties,u=void 0===l?{}:l,h=e.placeholder,f=void 0!==h&&h,p=e.keyCode,m=void 0===p?-1:p,g="string"==typeof t?t.trim():t,v=this._store.items,b=n||g,y=o||-1,w=a>=0?this._store.getGroupById(a):null,_=v?v.length+1:1;this.config.prependValue&&(g=this.config.prependValue+g.toString()),this.config.appendValue&&(g+=this.config.appendValue.toString()),this._store.dispatch((0,c.addItem)({value:g,label:b,id:_,choiceId:y,groupId:a,customProperties:u,placeholder:f,keyCode:m})),this._isSelectOneElement&&this.removeActiveItems(_),this.passedElement.triggerEvent(d.EVENTS.addItem,{id:_,value:g,label:b,customProperties:u,groupValue:w&&w.value?w.value:null,keyCode:m})},e.prototype._removeItem=function(e){var t=e.id,i=e.value,n=e.label,r=e.customProperties,o=e.choiceId,s=e.groupId,a=s&&s>=0?this._store.getGroupById(s):null;t&&o&&(this._store.dispatch((0,c.removeItem)(t,o)),this.passedElement.triggerEvent(d.EVENTS.removeItem,{id:t,value:i,label:n,customProperties:r,groupValue:a&&a.value?a.value:null}))},e.prototype._addChoice=function(e){var t=e.value,i=e.label,n=void 0===i?null:i,r=e.isSelected,o=void 0!==r&&r,s=e.isDisabled,l=void 0!==s&&s,c=e.groupId,u=void 0===c?-1:c,h=e.customProperties,d=void 0===h?{}:h,f=e.placeholder,p=void 0!==f&&f,m=e.keyCode,g=void 0===m?-1:m;if(null!=t){var v=this._store.choices,b=n||t,y=v?v.length+1:1,w="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(y);this._store.dispatch((0,a.addChoice)({id:y,groupId:u,elementId:w,value:t,label:b,disabled:l,customProperties:d,placeholder:p,keyCode:g})),o&&this._addItem({value:t,label:b,choiceId:y,customProperties:d,placeholder:p,keyCode:g})}},e.prototype._addGroup=function(e){var t=this,i=e.group,n=e.id,r=e.valueKey,o=void 0===r?"value":r,s=e.labelKey,a=void 0===s?"label":s,c=(0,p.isType)("Object",i)?i.choices:Array.from(i.getElementsByTagName("OPTION")),u=n||Math.floor((new Date).valueOf()*Math.random()),h=!!i.disabled&&i.disabled;c?(this._store.dispatch((0,l.addGroup)({value:i.label,id:u,active:!0,disabled:h})),c.forEach(function(e){var i=e.disabled||e.parentNode&&e.parentNode.disabled;t._addChoice({value:e[o],label:(0,p.isType)("Object",e)?e[a]:e.innerHTML,isSelected:e.selected,isDisabled:i,groupId:u,customProperties:e.customProperties,placeholder:e.placeholder})})):this._store.dispatch((0,l.addGroup)({value:i.label,id:i.id,active:!1,disabled:i.disabled}))},e.prototype._getTemplate=function(e){for(var t,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];var o=this.config.classNames;return(t=this._templates[e]).call.apply(t,n([this,o],i,!1))},e.prototype._createTemplates=function(){var e=this.config.callbackOnCreateTemplates,t={};e&&"function"==typeof e&&(t=e.call(this,p.strToEl)),this._templates=(0,o.default)(v.default,t)},e.prototype._createElements=function(){this.containerOuter=new h.Container({element:this._getTemplate("containerOuter",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new h.Container({element:this._getTemplate("containerInner"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new h.Input({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new h.List({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new h.List({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new h.Dropdown({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},e.prototype._createStructure=function(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth()),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement&&(this._highlightPosition=0,this._isSearching=!1,this._startLoading(),this._presetGroups.length?this._addPredefinedGroups(this._presetGroups):this._addPredefinedChoices(this._presetChoices),this._stopLoading()),this._isTextElement&&this._addPredefinedItems(this._presetItems)},e.prototype._addPredefinedGroups=function(e){var t=this,i=this.passedElement.placeholderOption;i&&i.parentNode&&"SELECT"===i.parentNode.tagName&&this._addChoice({value:i.value,label:i.innerHTML,isSelected:i.selected,isDisabled:i.disabled,placeholder:!0}),e.forEach(function(e){return t._addGroup({group:e,id:e.id||null})})},e.prototype._addPredefinedChoices=function(e){var t=this;this.config.shouldSort&&e.sort(this.config.sorter);var i=e.some(function(e){return e.selected}),n=e.findIndex(function(e){return void 0===e.disabled||!e.disabled});e.forEach(function(e,r){var o=e.value,s=void 0===o?"":o,a=e.label,l=e.customProperties,c=e.placeholder;if(t._isSelectElement)if(e.choices)t._addGroup({group:e,id:e.id||null});else{var u=!(!t._isSelectOneElement||i||r!==n)||e.selected,h=e.disabled;t._addChoice({value:s,label:a,isSelected:!!u,isDisabled:!!h,placeholder:!!c,customProperties:l})}else t._addChoice({value:s,label:a,isSelected:!!e.selected,isDisabled:!!e.disabled,placeholder:!!e.placeholder,customProperties:l})})},e.prototype._addPredefinedItems=function(e){var t=this;e.forEach(function(e){"object"==typeof e&&e.value&&t._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}),"string"==typeof e&&t._addItem({value:e})})},e.prototype._setChoiceOrItem=function(e){var t=this;({object:function(){e.value&&(t._isTextElement?t._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}):t._addChoice({value:e.value,label:e.label,isSelected:!0,isDisabled:!1,customProperties:e.customProperties,placeholder:e.placeholder}))},string:function(){t._isTextElement?t._addItem({value:e}):t._addChoice({value:e,label:e,isSelected:!0,isDisabled:!1})}})[(0,p.getType)(e).toLowerCase()]()},e.prototype._findAndSelectChoiceByValue=function(e){var t=this,i=this._store.choices.find(function(i){return t.config.valueComparer(i.value,e)});i&&!i.selected&&this._addItem({value:i.value,label:i.label,choiceId:i.id,groupId:i.groupId,customProperties:i.customProperties,placeholder:i.placeholder,ke
vendor: 4,160 bytes, line 26
26yCode:i.keyCode})},e.prototype._generatePlaceholderValue=function(){if(this._isSelectElement&&this.passedElement.placeholderOption){var e=this.passedElement.placeholderOption;return e?e.text:null}var t=this.config,i=t.placeholder,n=t.placeholderValue,r=this.passedElement.element.dataset;if(i){if(n)return n;if(r.placeholder)return r.placeholder}return null},e}();t.default=w},613:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(799),r=i(883),o=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,r=e.position;this.element=t,this.classNames=n,this.type=i,this.position=r,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return e.prototype.addEventListeners=function(){this.element.addEventListener("focus",this._onFocus),this.element.addEventListener("blur",this._onBlur)},e.prototype.removeEventListeners=function(){this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},e.prototype.shouldFlip=function(e){if("number"!=typeof e)return!1;var t=!1;return"auto"===this.position?t=!window.matchMedia("(min-height: ".concat(e+1,"px)")).matches:"top"===this.position&&(t=!0),t},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype.open=function(e){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},e.prototype.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},e.prototype.focus=function(){this.isFocussed||this.element.focus()},e.prototype.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},e.prototype.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},e.prototype.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.type===r.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},e.prototype.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.type===r.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},e.prototype.wrap=function(e){(0,n.wrap)(e,this.element)},e.prototype.unwrap=function(e){this.element.parentNode&&(this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element))},e.prototype.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},e.prototype.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},e.prototype._onFocus=function(){this.isFocussed=!0},e.prototype._onBlur=function(){this.isFocussed=!1},e}();t.default=o},217:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){var t=e.element,i=e.type,n=e.classNames;this.element=t,this.classNames=n,this.type=i,this.isActive=!1}return Object.defineProperty(e.prototype,"distanceFromTopWindow",{get:function(){return this.element.getBoundingClientRect().bottom},enumerable:!1,configurable:!0}),e.prototype.getChild=function(e){return this.element.querySelector(e)},e.prototype.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},e.prototype.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","fal
26se"),this.isActive=!1,this},e}();t.default=i},520:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WrappedSelect=t.WrappedInput=t.List=t.Input=t.Container=t.Dropdown=void 0;var r=n(i(217));t.Dropdown=r.default;var o=n(i(613));t.Container=o.default;var s=n(i(11));t.Input=s.default;var a=n(i(624));t.List=a.default;var l=n(i(541));t.WrappedInput=l.default;var c=n(i(982));t.WrappedSelect=c.default},11:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(799),r=i(883),o=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,r=e.preventPaste;this.element=t,this.type=i,this.classNames=n,this.preventPaste=r,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=t.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return Object.defineProperty(e.prototype,"placeholder",{set:function(e){this.element.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return(0,n.sanitise)(this.element.value)},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},e.prototype.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},e.prototype.focus=function(){this.isFocussed||this.element.focus()},e.prototype.blur=function(){this.isFocussed&&this.element.blur()},e.prototype.clear=function(e){return void 0===e&&(e=!0),this.element.value&&(this.element.value=""),e&&this.setWidth(),this},e.prototype.setWidth=function(){var e=this.element,t=e.style,i=e.value,n=e.placeholder;t.minWidth="".concat(n.length+1,"ch"),t.width="".concat(i.length+1,"ch")},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype._onInput=function(){this.type!==r.SELECT_ONE_TYPE&&this.setWidth()},e.prototype._onPaste=function(e){this.preventPaste&&e.preventDefault()},e.prototype._onFocus=function(){this.isFocussed=!0},e.prototype._onBlur=function(){this.isFocussed=!1},e}();t.default=o},624:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(883),r=function(){function e(e){var t=e.element;this.element=t,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}return e.prototype.clear=function(){this.element.innerHTML=""},e.prototype.append=function(e){this.element.appendChild(e)},e.prototype.getChild=function(e){return this.element.querySelector(e)},e.prototype.hasChildren=function(){return this.element.hasChildNodes()},e.prototype.scrollToTop=function(){this.element.scrollTop=0},e.prototype.scrollToChildElement=function(e,t){var i=this;if(e){var n=this.element.offsetHeight,r=this.element.scrollTop+n,o=e.offsetHeight,s=e.offsetTop+o,a=t>0?this.element.scrollTop+s-r:e.offsetTop;requestAnimationFrame(function(){i._animateScroll(a,t)})}},e.prototype._scrollDown=function(e,t,i){var n=(i-e)/t,r=n>1?n:1;this.element.scrollTop=e+r},e.prototype._scrollUp=function(e,t,i){var n=(e-i)/t,r=n>1?n:1;this.element.scrollTop=e-r},e.prototype._animateScroll=function(e,t){var i=this,r=n.SCROLLING_SPEED,o=this.element.scrollTop,s=!1;t>0?(this._scrollDown(o,r,e),o<e&&(s=!0)):(this._scrollUp(o,r,e),o>e&&(s=!0)),s&&requestAnimationFrame(function(){i._animateScroll(e,t)})},e}();t.default=r},730:function(e,t,i){"use strict";
vendor: 2,790 bytes, line 26
26Object.defineProperty(t,"__esModule",{value:!0});var n=i(799),r=function(){function e(e){var t=e.element,i=e.classNames;if(this.element=t,this.classNames=i,!(t instanceof HTMLInputElement||t instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}return Object.defineProperty(e.prototype,"isActive",{get:function(){return"active"===this.element.dataset.choice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var e=this.element.getAttribute("style");e&&this.element.setAttribute("data-choice-orig-style",e),this.element.setAttribute("data-choice","active")},e.prototype.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var e=this.element.getAttribute("data-choice-orig-style");e?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",e)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},e.prototype.triggerEvent=function(e,t){(0,n.dispatchEvent)(this.element,e,t)},e}();t.default=r},541:function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var i=t.element,n=t.classNames,r=t.delimiter,o=e.call(this,{element:i,classNames:n})||this;return o.delimiter=r,o}return r(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.setAttribute("value",e),this.element.value=e},enumerable:!1,configurable:!0}),t}(o(i(730)).default);t.default=s},982:function(e,t,i){"use strict";
vendor: 4,647 bytes, line 26
26var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var i=t.element,n=t.classNames,r=t.template,o=e.call(this,{element:i,classNames:n})||this;return o.template=r,o}return r(t,e),Object.defineProperty(t.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optionGroups",{get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return Array.from(this.element.options)},set:function(e){var t=this,i=document.createDocumentFragment();e.forEach(function(e){return n=e,r=t.template(n),void i.appendChild(r);var n,r}),this.appendDocFragment(i)},enumerable:!1,configurable:!0}),t.prototype.appendDocFragment=function(e){this.element.innerHTML="",this.element.appendChild(e)},t}(o(i(730)).default);t.default=s},883:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCROLLING_SPEED=t.SELECT_MULTIPLE_TYPE=t.SELECT_ONE_TYPE=t.TEXT_TYPE=t.KEY_CODES=t.ACTION_TYPES=t.EVENTS=void 0,t.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"},t.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL",RESET_TO:"RESET_TO",SET_IS_LOADING:"SET_IS_LOADING"},t.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},t.TEXT_TYPE="text",t.SELECT_ONE_TYPE="select-one",t.SELECT_MULTIPLE_TYPE="select-multiple",t.SCROLLING_SPEED=4},789:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONFIG=t.DEFAULT_CLASSNAMES=void 0;var n=i(799);t.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},t.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:n.sortByAlpha,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(e){return'Press Enter to add <b>"'.concat((0,n.sanitise)(e),'"</b>')},maxItemText:function(e){return"Only ".concat(e," values can be added")},valueComparer:function(e,t){return e===t},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:t.DEFAULT_CLASSNAMES}},799:function(e,t){"use strict";var i;
vendor: 13,797 bytes, line 26
26Object.defineProperty(t,"__esModule",{value:!0}),t.diff=t.cloneObject=t.existsInArray=t.dispatchEvent=t.sortByScore=t.sortByAlpha=t.strToEl=t.sanitise=t.isScrolledIntoView=t.getAdjacentEl=t.wrap=t.isType=t.getType=t.generateId=t.generateChars=t.getRandomNumber=void 0,t.getRandomNumber=function(e,t){return Math.floor(Math.random()*(t-e)+e)},t.generateChars=function(e){return Array.from({length:e},function(){return(0,t.getRandomNumber)(0,36).toString(36)}).join("")},t.generateId=function(e,i){var n=e.id||e.name&&"".concat(e.name,"-").concat((0,t.generateChars)(2))||(0,t.generateChars)(4);return n=n.replace(/(:|\.|\[|\]|,)/g,""),n="".concat(i,"-").concat(n)},t.getType=function(e){return Object.prototype.toString.call(e).slice(8,-1)},t.isType=function(e,i){return null!=i&&(0,t.getType)(i)===e},t.wrap=function(e,t){return void 0===t&&(t=document.createElement("div")),e.parentNode&&(e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t)),t.appendChild(e)},t.getAdjacentEl=function(e,t,i){void 0===i&&(i=1);for(var n="".concat(i>0?"next":"previous","ElementSibling"),r=e[n];r;){if(r.matches(t))return r;r=r[n]}return r},t.isScrolledIntoView=function(e,t,i){return void 0===i&&(i=1),!!e&&(i>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop)},t.sanitise=function(e){return"string"!=typeof e?e:e.replace(/&/g,"&").replace(/>/g,"&rt;").replace(/</g,"<").replace(/"/g,""")},t.strToEl=(i=document.createElement("div"),function(e){var t=e.trim();i.innerHTML=t;for(var n=i.children[0];i.firstChild;)i.removeChild(i.firstChild);return n}),t.sortByAlpha=function(e,t){var i=e.value,n=e.label,r=void 0===n?i:n,o=t.value,s=t.label,a=void 0===s?o:s;return r.localeCompare(a,[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},t.sortByScore=function(e,t){var i=e.score,n=void 0===i?0:i,r=t.score;return n-(void 0===r?0:r)},t.dispatchEvent=function(e,t,i){void 0===i&&(i=null);var n=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});return e.dispatchEvent(n)},t.existsInArray=function(e,t,i){return void 0===i&&(i="value"),e.some(function(e){return"string"==typeof t?e[i]===t.trim():e[i]===t})},t.cloneObject=function(e){return JSON.parse(JSON.stringify(e))},t.diff=function(e,t){var i=Object.keys(e).sort(),n=Object.keys(t).sort();return i.filter(function(e){return n.indexOf(e)<0})}},273:function(e,t){"use strict";var i=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=[],t.default=function(e,n){switch(void 0===e&&(e=t.defaultState),void 0===n&&(n={}),n.type){case"ADD_CHOICE":var r=n,o={id:r.id,elementId:r.elementId,groupId:r.groupId,value:r.value,label:r.label||r.value,disabled:r.disabled||!1,selected:!1,active:!0,score:9999,customProperties:r.customProperties,placeholder:r.placeholder||!1};return i(i([],e,!0),[o],!1);case"ADD_ITEM":var s=n;return s.choiceId>-1?e.map(function(e){var t=e;return t.id===parseInt("".concat(s.choiceId),10)&&(t.selected=!0),t}):e;case"REMOVE_ITEM":var a=n;return a.choiceId&&a.choiceId>-1?e.map(function(e){var t=e;return t.id===parseInt("".concat(a.choiceId),10)&&(t.selected=!1),t}):e;case"FILTER_CHOICES":var l=n;return e.map(function(e){var t=e;return t.active=l.results.some(function(e){var i=e.item,n=e.score;return i.id===t.id&&(t.score=n,!0)}),t});case"ACTIVATE_CHOICES":var c=n;return e.map(function(e){var t=e;return t.active=c.active,t});case"CLEAR_CHOICES":return t.defaultState;default:return e}}},871:function(e,t){"use strict";var i=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=[],t.default=function(e,n){switch(void 0===e&&(e=t.defaultState),void 0===n&&(n={}),n.type){case"ADD_GROUP":var r=n;return i(i([],e,!0),[{id:r.id,value:r.value,active:r.active,disabled:r.disabled}],!1);case"CLEAR_CHOICES":return[];default:return e}}},655:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0;var r=i(857),o=n(i(52)),s=n(i(871)),a=n(i(273)),l=n(i(502)),c=i(799);t.defaultState={groups:[],items:[],choices:[],loading:!1};var u=(0,r.combineReducers)({items:o.default,groups:s.default,choices:a.default,loading:l.default});t.default=function(e,i){var n=e;if("CLEAR_ALL"===i.type)n=t.defaultState;else if("RESET_TO"===i.type)return(0,c.cloneObject)(i.state);return u(n,i)}},52:function(e,t){"use strict";var i=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=[],t.default=function(e,n){switch(void 0===e&&(e=t.defaultState),void 0===n&&(n={}),n.type){case"ADD_ITEM":var r=n;return i(i([],e,!0),[{id:r.id,choiceId:r.choiceId,groupId:r.groupId,value:r.value,label:r.label,active:!0,highlighted:!1,customProperties:r.customProperties,placeholder:r.placeholder||!1,keyCode:null}],!1).map(function(e){var t=e;return t.highlighted=!1,t});case"REMOVE_ITEM":return e.map(function(e){var t=e;return t.id===n.id&&(t.active=!1),t});case"HIGHLIGHT_ITEM":var o=n;return e.map(function(e){var t=e;return t.id===o.id&&(t.highlighted=o.highlighted),t});default:return e}}},502:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=!1,t.default=function(e,i){return void 0===e&&(e=t.defaultState),void 0===i&&(i={}),"SET_IS_LOADING"===i.type?i.isLoading:e}},744:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(857),s=r(i(655)),a=function(){function e(){this._store=(0,o.createStore)(s.default,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}return e.prototype.subscribe=function(e){this._store.subscribe(e)},e.prototype.dispatch=function(e){this._store.dispatch(e)},Object.defineProperty(e.prototype,"state",{get:function(){return this._store.getState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.state.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeItems",{get:function(){return this.items.filter(function(e){return!0===e.active})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"highlightedActiveItems",{get:function(){return this.items.filter(function(e){return e.active&&e.highlighted})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"choices",{get:function(){return this.state.choices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeChoices",{get:function(){return this.choices.filter(function(e){return!0===e.active})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectableChoices",{get:function(){return this.choices.filter(function(e){return!0!==e.disabled})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"searchableChoices",{get:function(){return this.selectableChoices.filter(function(e){return!0!==e.placeholder})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholderChoice",{get:function(){return n([],this.choices,!0).reverse().find(function(e){return!0===e.placeholder})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groups",{get:function(){return this.state.groups},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeGroups",{get:function(){var e=this.groups,t=this.choices;return e.filter(function(e){var i=!0===e.active&&!1===e.disabled,n=t.some(function(e){return!0===e.active&&!1===e.disabled});return i&&n},[])},enumerable:!1,configurable:!0}),e.prototype.isLoading=function(){return this.state.loading},e.prototype.getChoiceById=function(e){return this.activeChoices.find(function(t){return t.id===parseInt(e,10)})},e.prototype.getGroupById=function(e){return this.groups.find(function(t){return t.id===e})},e}();t.default=a},686:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={containerOuter:function(e,t,i,n,r,o){var s=e.containerOuter,a=Object.assign(document.createElement("div"),{className:s});return a.dataset.type=o,t&&(a.dir=t),n&&(a.tabIndex=0),i&&(a.setAttribute("role",r?"combobox":"listbox"),r&&a.setAttribute("aria-autocomplete","list")),a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"),a},containerInner:function(e){var t=e.containerInner;return Object.assign(document.createElement("div"),{className:t})},itemList:function(e,t){var i=e.list,n=e.listSingle,r=e.listItems;return Object.assign(document.createElement("div"),{className:"".concat(i," ").concat(t?n:r)})},placeholder:function(e,t){var i=e.placeholder;return Object.assign(document.createElement("div"),{className:i,innerHTML:t})},item:function(e,t,i){var n=e.item,r=e.button,o=e.highlightedState,s=e.itemSelectable,a=e.placeholder,l=t.id,c=t.value,u=t.label,h=t.customProperties,d=t.active,f=t.disabled,p=t.highlighted,m=t.placeholder,g=Object.assign(document.createElement("div"),{className:n,innerHTML:u});if(Object.assign(g.dataset,{item:"",id:l,value:c,customProperties:h}),d&&g.setAttribute("aria-selected","true"),f&&g.setAttribute("aria-disabled","true"),m&&g.classList.add(a),g.classList.add(p?o:s),i){f&&g.classList.remove(s),g.dataset.deletable="";var v="Remove item",b=Object.assign(document.createElement("button"),{type:"button",className:r,innerHTML:v});b.setAttribute("aria-label","".concat(v,": '").concat(c,"'")),b.dataset.button="",g.appendChild(b)}return g},choiceList:function(e,t){var i=e.list,n=Object.assign(document.createElement("div"),{className:i});return t||n.setAttribute("aria-multiselectable","true"),n.setAttribute("role","listbox"),n},choiceGroup:function(e,t){var i=e.group,n=e.groupHeading,r=e.itemDisabled,o=t.id,s=t.value,a=t.disabled,l=Object.assign(document.createElement("div"),{className:"".concat(i," ").concat(a?r:"")});return l.setAttribute("role","group"),Object.assign(l.dataset,{group:"",id:o,value:s}),a&&l.setAttribute("aria-disabled","true"),l.appendChild(Object.assign(document.createElement("div"),{className:n,innerHTML:s})),l},choice:function(e,t,i){var n=e.item,r=e.itemChoice,o=e.itemSelectable,s=e.selectedState,a=e.itemDisabled,l=e.placeholder,c=t.id,u=t.value,h=t.label,d=t.groupId,f=t.elementId,p=t.disabled,m=t.selected,g=t.placeholder,v=Object.assign(document.createElement("div"),{id:f,innerHTML:h,className:"".concat(n," ").concat(r)});return m&&v.classList.add(s),g&&v.classList.add(l),v.setAttribute("role",d&&d>0?"treeitem":"option"),Object.assign(v.dataset,{choice:"",id:c,value:u,selectText:i}),p?(v.classList.add(a),v.dataset.choiceDisabled="",v.setAttribute("aria-disabled","true")):(v.classList.add(o),v.dataset.choiceSelectable=""),v},input:function(e,t){var i=e.input,n=e.inputCloned,r=Object.assign(document.createElement("input"),{type:"text",className:"".concat(i," ").concat(n),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return r.setAttribute("role","textbox"),r.setAttribute("aria-autocomplete","list"),r.setAttribute("aria-label",t),r},dropdown:function(e){var t=e.list,i=e.listDropdown,n=document.createElement("div");return n.classList.add(t,i),n.setAttribute("aria-expanded","false"),n},notice:function(e,t,i){var n=e.item,r=e.itemChoice,o=e.noResults,s=e.noChoices;void 0===i&&(i="");var a=[n,r];return"no-choices"===i?a.push(s):"no-results"===i&&a.push(o),Object.assign(document.createElement("div"),{innerHTML:t,className:a.join(" ")})},option:function(e){var t=e.label,i=e.value,n=e.customProperties,r=e.active,o=e.disabled,s=new Option(t,i,!1,r);return n&&(s.dataset.customProperties="".concat(n)),s.disabled=!!o,s}};t.default=i},996:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function r(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,t,i){var r={};return i.isMergeableObject(e)&&o(e).forEach(function(t){r[t]=n(e[t],i)}),o(t).forEach(function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&i.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return l;var i=t.customMerge(e);return"function"==typeof i?i:l}(o,i)(e[o],t[o],i):r[o]=n(t[o],i))}),r}function l(e,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);
vendor: 13,860 bytes, lines 26-35
26return s===Array.isArray(e)?s?o.arrayMerge(e,i,o):a(e,i,o):n(i,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,i){return l(e,i,t)},{})};var c=l;e.exports=c},70:function(e){ 27/*! 28 * Fuse.js v3.4.6 - Lightweight fuzzy-search (http://fusejs.io) 29 * 30 * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me) 31 * All Rights Reserved. Apache Software License 2.0 32 * 33 * http://www.apache.org/licenses/LICENSE-2.0 34 */ 35e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,i){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=i(2),s=i(8),a=i(0),l=function(){function e(t,i){var n=i.location,r=void 0===n?0:n,o=i.distance,a=void 0===o?100:o,l=i.threshold,c=void 0===l?.6:l,u=i.maxPatternLength,h=void 0===u?32:u,d=i.caseSensitive,f=void 0!==d&&d,p=i.tokenSeparator,m=void 0===p?/ +/g:p,g=i.findAllMatches,v=void 0!==g&&g,b=i.minMatchCharLength,y=void 0===b?1:b,w=i.id,_=void 0===w?null:w,k=i.keys,x=void 0===k?[]:k,C=i.shouldSort,S=void 0===C||C,E=i.getFn,T=void 0===E?s:E,A=i.sortFn,I=void 0===A?function(e,t){return e.score-t.score}:A,M=i.tokenize,P=void 0!==M&&M,D=i.matchAllTokens,O=void 0!==D&&D,L=i.includeMatches,R=void 0!==L&&L,B=i.includeScore,N=void 0!==B&&B,j=i.verbose,F=void 0!==j&&j;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:r,distance:a,threshold:c,maxPatternLength:h,isCaseSensitive:f,tokenSeparator:m,findAllMatches:v,minMatchCharLength:y,id:_,keys:x,includeMatches:R,includeScore:N,shouldSort:S,getFn:T,sortFn:I,verbose:F,tokenize:P,matchAllTokens:O},this.setCollection(t)}var t,i,l;return t=e,(i=[{key:"setCollection",value:function(e){return this.list=e,e}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\nSearch pattern: "'.concat(e,'"'));var i=this._prepareSearchers(e),n=i.tokenSearchers,r=i.fullSearcher,o=this._search(n,r),s=o.weights,a=o.results;return this._computeScore(s,a),this.options.shouldSort&&this._sort(a),t.limit&&"number"==typeof t.limit&&(a=a.slice(0,t.limit)),this._format(a)}},{key:"_prepareSearchers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(var i=e.split(this.options.tokenSeparator),n=0,r=i.length;n<r;n+=1)t.push(new o(i[n],this.options));return{tokenSearchers:t,fullSearcher:new o(e,this.options)}}},{key:"_search",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,i=this.list,n={},r=[];if("string"==typeof i[0]){for(var o=0,s=i.length;o<s;o+=1)this._analyze({key:"",value:i[o],record:o,index:o},{resultMap:n,results:r,tokenSearchers:e,fullSearcher:t});return{weights:null,results:r}}for(var a={},l=0,c=i.length;l<c;l+=1)for(var u=i[l],h=0,d=this.options.keys.length;h<d;h+=1){var f=this.options.keys[h];if("string"!=typeof f){if(a[f.name]={weight:1-f.weight||1},f.weight<=0||f.weight>1)throw new Error("Key weight has to be > 0 and <= 1");f=f.name}else a[f]={weight:1};this._analyze({key:f,value:this.options.getFn(u,f),record:u,index:l},{resultMap:n,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var i=e.key,n=e.arrayIndex,r=void 0===n?-1:n,o=e.value,s=e.record,l=e.index,c=t.tokenSearchers,u=void 0===c?[]:c,h=t.fullSearcher,d=void 0===h?[]:h,f=t.resultMap,p=void 0===f?{}:f,m=t.results,g=void 0===m?[]:m;if(null!=o){var v=!1,b=-1,y=0;if("string"==typeof o){this._log("\nKey: ".concat(""===i?"-":i));var w=d.search(o);if(this._log('Full text: "'.concat(o,'", score: ').concat(w.score)),this.options.tokenize){for(var _=o.split(this.options.tokenSeparator),k=[],x=0;x<u.length;x+=1){var C=u[x];this._log('\nPattern: "'.concat(C.pattern,'"'));for(var S=!1,E=0;E<_.length;E+=1){var T=_[E],A=C.search(T),I={};A.isMatch?(I[T]=A.score,v=!0,S=!0,k.push(A.score)):(I[T]=1,this.options.matchAllTokens||k.push(1)),this._log('Token: "'.concat(T,'", score: ').concat(I[T]))}S&&(y+=1)}b=k[0];for(var M=k.length,P=1;P<M;P+=1)b+=k[P];b/=M,this._log("Token score average:",b)}var D=w.score;b>-1&&(D=(D+b)/2),this._log("Score average:",D);var O=!this.options.tokenize||!this.options.matchAllTokens||y>=u.length;if(this._log("\nCheck Matches: ".concat(O)),(v||w.isMatch)&&O){var L=p[l];L?L.output.push({key:i,arrayIndex:r,value:o,score:D,matchedIndices:w.matchedIndices}):(p[l]={item:s,output:[{key:i,arrayIndex:r,value:o,score:D,matchedIndices:w.matchedIndices}]},g.push(p[l]))}}else if(a(o))for(var R=0,B=o.length;R<B;R+=1)this._analyze({key:i,arrayIndex:R,value:o[R],record:s,index:l},{resultMap:p,results:g,tokenSearchers:u,fullSearcher:d})}}},{key:"_computeScore",value:function(e,t){this._log("\n\nComputing score:\n");for(var i=0,n=t.length;i<n;i+=1){for(var r=t[i].output,o=r.length,s=1,a=1,l=0;l<o;l+=1){var c=e?e[r[l].key].weight:1,u=(1===c?r[l].score:r[l].score||.001)*c;1!==c?a=Math.min(a,u):(r[l].nScore=u,s*=u)}t[i].score=1===a?s:a,this._log(t[i])}}},{key:"_sort",value:function(e){this._log("\n\nSorting...."),e.sort(this.options.sortFn)}},{key:"_format",value:function(e){var t=[];if(this.options.verbose){var i=[];this._log("\n\nOutput:\n\n",JSON.stringify(e,function(e,t){if("object"===n(t)&&null!==t){if(-1!==i.indexOf(t))return;i.push(t)}return t})),i=null}var r=[];this.options.includeMatches&&r.push(function(e,t){var i=e.output;t.matches=[];for(var n=0,r=i.length;n<r;n+=1){var o=i[n];if(0!==o.matchedIndices.length){var s={indices:o.matchedIndices,value:o.value};o.key&&(s.key=o.key),o.hasOwnProperty("arrayIndex")&&o.arrayIndex>-1&&(s.arrayIndex=o.arrayIndex),t.matches.push(s)}}}),this.options.includeScore&&r.push(function(e,t){t.score=e.score});for(var o=0,s=e.length;o<s;o+=1){var a=e[o];if(this.options.id&&(a.item=this.options.getFn(a.item,this.options.id)[0]),r.length){for(var l={item:a.item},c=0,u=r.length;c<u;c+=1)r[c](a,l);t.push(l)}else t.push(a.item)}return t}},{key:"_log",value:function(){var e;this.options.verbose&&(e=console).log.apply(e,arguments)}}])&&r(t.prototype,i),l&&r(t,l),e}();e.exports=l},function(e,t,i){function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var r=i(3),o=i(4),s=i(7),a=function(){function e(t,i){var n=i.location,r=void 0===n?0:n,o=i.distance,a=void 0===o?100:o,l=i.threshold,c=void 0===l?.6:l,u=i.maxPatternLength,h=void 0===u?32:u,d=i.isCaseSensitive,f=void 0!==d&&d,p=i.tokenSeparator,m=void 0===p?/ +/g:p,g=i.findAllMatches,v=void 0!==g&&g,b=i.minMatchCharLength,y=void 0===b?1:b;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:r,distance:a,threshold:c,maxPatternLength:h,isCaseSensitive:f,tokenSeparator:m,findAllMatches:v,minMatchCharLength:y},this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.pattern.length<=h&&(this.patternAlphabet=s(this.pattern))}var t,i,a;return t=e,(i=[{key:"search",value:function(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};var t=this.options,i=t.maxPatternLength,n=t.tokenSeparator;if(this.pattern.length>i)return r(e,this.pattern,n);var s=this.options,a=s.location,l=s.distance,c=s.threshold,u=s.findAllMatches,h=s.minMatchCharLength;return o(e,this.pattern,this.patternAlphabet,{location:a,distance:l,threshold:c,findAllMatches:u,minMatchCharLength:h})}}])&&n(t.prototype,i),a&&n(t,a),e}();e.exports=a},function(e,t){var i=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,r=new RegExp(t.replace(i,"\\$&").replace(n,"|")),o=e.match(r),s=!!o,a=[];if(s)for(var l=0,c=o.length;l<c;l+=1){var u=o[l];a.push([e.indexOf(u),u.length-1])}return{score:s?.5:1,isMatch:s,matchedIndices:a}}},function(e,t,i){var n=i(5),r=i(6);e.exports=function(e,t,i,o){for(var s=o.location,a=void 0===s?0:s,l=o.distance,c=void 0===l?100:l,u=o.threshold,h=void 0===u?.6:u,d=o.findAllMatches,f=void 0!==d&&d,p=o.minMatchCharLength,m=void 0===p?1:p,g=a,v=e.length,b=h,y=e.indexOf(t,g),w=t.length,_=[],k=0;k<v;k+=1)_[k]=0;if(-1!==y){var x=n(t,{errors:0,currentLocation:y,expectedLocation:g,distance:c});if(b=Math.min(x,b),-1!==(y=e.lastIndexOf(t,g+w))){var C=n(t,{errors:0,currentLocation:y,expectedLocation:g,distance:c});b=Math.min(C,b)}}y=-1;for(var S=[],E=1,T=w+v,A=1<<(w<=31?w-1:30),I=0;I<w;I+=1){for(var M=0,P=T;M<P;)n(t,{errors:I,currentLocation:g+P,expectedLocation:g,distance:c})<=b?M=P:T=P,P=Math.floor((T-M)/2+M);T=P;var D=Math.max(1,g-P+1),O=f?v:Math.min(g+P,v)+w,L=Array(O+2);L[O+1]=(1<<I)-1;for(var R=O;R>=D;R-=1){var B=R-1,N=i[e.charAt(B)];if(N&&(_[B]=1),L[R]=(L[R+1]<<1|1)&N,0!==I&&(L[R]|=(S[R+1]|S[R])<<1|1|S[R+1]),L[R]&A&&(E=n(t,{errors:I,currentLocation:B,expectedLocation:g,distance:c}))<=b){if(b=E,(y=B)<=g)break;D=Math.max(1,2*g-y)}}if(n(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:c})>b)break;S=L}return{isMatch:y>=0,score:0===E?.001:E,matchedIndices:r(_,m)}}},function(e,t){e.exports=function(e,t){var i=t.errors,n=void 0===i?0:i,r=t.currentLocation,o=void 0===r?0:r,s=t.expectedLocation,a=void 0===s?0:s,l=t.distance,c=void 0===l?100:l,u=n/e.length,h=Math.abs(a-o);return c?u+h/c:h?1:u}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=[],n=-1,r=-1,o=0,s=e.length;o<s;o+=1){var a=e[o];a&&-1===n?n=o:a||-1===n||((r=o-1)-n+1>=t&&i.push([n,r]),n=-1)}return e[o-1]&&o-n>=t&&i.push([n,o-1]),i}},function(e,t){e.exports=function(e){for(var t={},i=e.length,n=0;n<i;n+=1)t[e.charAt(n)]=0;for(var r=0;r<i;r+=1)t[e.charAt(r)]|=1<<i-r-1;return t}},function(e,t,i){var n=i(0);e.exports=function(e,t){return function e(t,i,r){if(i){var o=i.indexOf("."),s=i,a=null;-1!==o&&(s=i.slice(0,o),a=i.slice(o+1));var l=t[s];if(null!=l)if(a||"string"!=typeof l&&"number"!=typeof l)if(n(l))for(var c=0,u=l.length;c<u;c+=1)e(l[c],a,r);else a&&e(l,a,r);else r.push(l.toString())}else r.push(t);return r}(e,t,[])}}])},857:function(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}i.r(t),i.d(t,{__DO_NOT_USE__ActionTypes:function(){return c},applyMiddleware:function(){return g},bindActionCreators:function(){return p},combineReducers:function(){return d},compose:function(){return m},createStore:function(){return h}});var a="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function h(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(s(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(s(1));return i(h)(e,t)}if("function"!=typeof e)throw new Error(s(2));var r=e,o=t,l=[],d=l,f=!1;function p(){d===l&&(d=l.slice())}function m(){if(f)throw new Error(s(3));return o}function g(e){if("function"!=typeof e)throw new Error(s(4));if(f)throw new Error(s(5));var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error(s(6));t=!1,p();var i=d.indexOf(e);d.splice(i,1),l=null}}}function v(e){if(!u(e))throw new Error(s(7));if(void 0===e.type)throw new Error(s(8));if(f)throw new Error(s(9));
35try{f=!0,o=r(o,e)}finally{f=!1}for(var t=l=d,i=0;i<t.length;i++)(0,t[i])();return e}return v({type:c.INIT}),(n={dispatch:v,subscribe:g,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw new Error(s(10));r=e,v({type:c.REPLACE})}})[a]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(s(11));function i(){e.next&&e.next(m())}return i(),{unsubscribe:t(i)}}})[a]=function(){return this},e},n}function d(e){for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n];"function"==typeof e[r]&&(i[r]=e[r])}var o,a=Object.keys(i);try{!function(e){Object.keys(e).forEach(function(t){var i=e[t];if(void 0===i(void 0,{type:c.INIT}))throw new Error(s(12));if(void 0===i(void 0,{type:c.PROBE_UNKNOWN_ACTION()}))throw new Error(s(13))})}(i)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var n=!1,r={},l=0;l<a.length;l++){var c=a[l],u=i[c],h=e[c],d=u(h,t);if(void 0===d)throw t&&t.type,new Error(s(14));r[c]=d,n=n||d!==h}return(n=n||a.length!==Object.keys(e).length)?r:e}}function f(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t){if("function"==typeof e)return f(e,t);if("object"!=typeof e||null===e)throw new Error(s(16));var i={};for(var n in e){var r=e[n];"function"==typeof r&&(i[n]=f(r,t))}return i}function m(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function g(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return function(){var i=e.apply(void 0,arguments),n=function(){throw new Error(s(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},a=t.map(function(e){return e(r)});return n=m.apply(void 0,a)(i.dispatch),o(o({},i),{},{dispatch:n})}}}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=i(373);return n=n.default}()},"object"==typeof i&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof i?i.Choices=r():n.Choices=r()},{}],125:[function(e,t,i){var n=e("safe-buffer").Buffer,r=e("stream").Transform,o=e("string_decoder").StringDecoder;function s(e){r.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(s,r),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=n.from(e,t));var r=this._update(e);return this.hashMode?this:(i&&(r=this._toString(r,i)),r)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,i){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{i(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return i&&(n+=this._decoder.end()),n},t.exports=s},{inherits:247,"safe-buffer":295,stream:307,string_decoder:308}],126:[function(e,t,i){"use strict";var n=e("../internals/is-callable"),r=e("../internals/try-to-string"),o=TypeError;t.exports=function(e){if(n(e))return e;throw new o(r(e)+" is not a function")}},{"../internals/is-callable":150,"../internals/try-to-string":168}],127:[function(e,t,i){"use strict";var n=e("../internals/is-object"),r=String,o=TypeError;t.exports=function(e){if(n(e))return e;throw new o(r(e)+" is not an object")}},{"../internals/is-object":152}],128:[function(e,t,i){"use strict";var n=e("../internals/descriptors"),r=e("../internals/object-define-property"),o=e("../internals/create-property-descriptor");t.exports=n?function(e,t,i){return r.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},{"../internals/create-property-descriptor":129,"../internals/descriptors":132,"../internals/object-define-property":156}],129:[function(e,t,i){"use strict";
vendor: 19,206 bytes, line 35
35t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],130:[function(e,t,i){"use strict";var n=e("../internals/make-built-in"),r=e("../internals/object-define-property");t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},{"../internals/make-built-in":155,"../internals/object-define-property":156}],131:[function(e,t,i){"use strict";var n=e("../internals/global"),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},{"../internals/global":144}],132:[function(e,t,i){"use strict";var n=e("../internals/fails");t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"../internals/fails":137}],133:[function(e,t,i){"use strict";var n="object"==typeof document&&document.all,r=void 0===n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:r}},{}],134:[function(e,t,i){"use strict";var n=e("../internals/global"),r=e("../internals/is-object"),o=n.document,s=r(o)&&r(o.createElement);t.exports=function(e){return s?o.createElement(e):{}}},{"../internals/global":144,"../internals/is-object":152}],135:[function(e,t,i){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},{}],136:[function(e,t,i){"use strict";var n,r,o=e("../internals/global"),s=e("../internals/engine-user-agent"),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(r=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(r=+n[1]),t.exports=r},{"../internals/engine-user-agent":135,"../internals/global":144}],137:[function(e,t,i){"use strict";t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],138:[function(e,t,i){"use strict";var n=e("../internals/fails");t.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"../internals/fails":137}],139:[function(e,t,i){"use strict";var n=e("../internals/function-bind-native"),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},{"../internals/function-bind-native":138}],140:[function(e,t,i){"use strict";var n=e("../internals/descriptors"),r=e("../internals/has-own-property"),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=r(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},{"../internals/descriptors":132,"../internals/has-own-property":145}],141:[function(e,t,i){"use strict";var n=e("../internals/function-bind-native"),r=Function.prototype,o=r.call,s=n&&r.bind.bind(o,o);t.exports=n?s:function(e){return function(){return o.apply(e,arguments)}}},{"../internals/function-bind-native":138}],142:[function(e,t,i){"use strict";var n=e("../internals/global"),r=e("../internals/is-callable");t.exports=function(e,t){return arguments.length<2?(i=n[e],r(i)?i:void 0):n[e]&&n[e][t];var i}},{"../internals/global":144,"../internals/is-callable":150}],143:[function(e,t,i){"use strict";var n=e("../internals/a-callable"),r=e("../internals/is-null-or-undefined");t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},{"../internals/a-callable":126,"../internals/is-null-or-undefined":151}],144:[function(e,t,i){(function(e){(function(){"use strict";var i=function(e){return e&&e.Math===Math&&e};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],145:[function(e,t,i){"use strict";var n=e("../internals/function-uncurry-this"),r=e("../internals/to-object"),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return o(r(e),t)}},{"../internals/function-uncurry-this":141,"../internals/to-object":165}],146:[function(e,t,i){"use strict";t.exports={}},{}],147:[function(e,t,i){"use strict";var n=e("../internals/descriptors"),r=e("../internals/fails"),o=e("../internals/document-create-element");t.exports=!n&&!r(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},{"../internals/descriptors":132,"../internals/document-create-element":134,"../internals/fails":137}],148:[function(e,t,i){"use strict";var n=e("../internals/function-uncurry-this"),r=e("../internals/is-callable"),o=e("../internals/shared-store"),s=n(Function.toString);r(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),t.exports=o.inspectSource},{"../internals/function-uncurry-this":141,"../internals/is-callable":150,"../internals/shared-store":162}],149:[function(e,t,i){"use strict";var n,r,o,s=e("../internals/weak-map-basic-detection"),a=e("../internals/global"),l=e("../internals/is-object"),c=e("../internals/create-non-enumerable-property"),u=e("../internals/has-own-property"),h=e("../internals/shared-store"),d=e("../internals/shared-key"),f=e("../internals/hidden-keys"),p="Object already initialized",m=a.TypeError,g=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new m(p);return t.facade=e,v.set(e,t),t},r=function(e){return v.get(e)||{}},o=function(e){return v.has(e)}}else{var b=d("state");f[b]=!0,n=function(e,t){if(u(e,b))throw new m(p);return t.facade=e,c(e,b,t),t},r=function(e){return u(e,b)?e[b]:{}},o=function(e){return u(e,b)}}t.exports={set:n,get:r,has:o,enforce:function(e){return o(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!l(t)||(i=r(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return i}}}},{"../internals/create-non-enumerable-property":128,"../internals/global":144,"../internals/has-own-property":145,"../internals/hidden-keys":146,"../internals/is-object":152,"../internals/shared-key":161,"../internals/shared-store":162,"../internals/weak-map-basic-detection":172}],150:[function(e,t,i){"use strict";var n=e("../internals/document-all"),r=n.all;t.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===r}:function(e){return"function"==typeof e}},{"../internals/document-all":133}],151:[function(e,t,i){"use strict";t.exports=function(e){return null==e}},{}],152:[function(e,t,i){"use strict";var n=e("../internals/is-callable"),r=e("../internals/document-all"),o=r.all;t.exports=r.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===o}:function(e){return"object"==typeof e?null!==e:n(e)}},{"../internals/document-all":133,"../internals/is-callable":150}],153:[function(e,t,i){"use strict";t.exports=!1},{}],154:[function(e,t,i){"use strict";var n=e("../internals/get-built-in"),r=e("../internals/is-callable"),o=e("../internals/object-is-prototype-of"),s=e("../internals/use-symbol-as-uid"),a=Object;t.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&o(t.prototype,a(e))}},{"../internals/get-built-in":142,"../internals/is-callable":150,"../internals/object-is-prototype-of":157,"../internals/use-symbol-as-uid":170}],155:[function(e,t,i){"use strict";var n=e("../internals/function-uncurry-this"),r=e("../internals/fails"),o=e("../internals/is-callable"),s=e("../internals/has-own-property"),a=e("../internals/descriptors"),l=e("../internals/function-name").CONFIGURABLE,c=e("../internals/inspect-source"),u=e("../internals/internal-state"),h=u.enforce,d=u.get,f=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),v=n([].join),b=a&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),y=String(String).split("String"),w=t.exports=function(e,t,i){"Symbol("===m(f(t),0,7)&&(t="["+g(f(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!s(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),b&&i&&s(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&s(i,"constructor")&&i.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=h(e);return s(n,"source")||(n.source=v(y,"string"==typeof t?t:"")),e};Function.prototype.toString=w(function(){return o(this)&&d(this).source||c(this)},"toString")},{"../internals/descriptors":132,"../internals/fails":137,"../internals/function-name":140,"../internals/function-uncurry-this":141,"../internals/has-own-property":145,"../internals/inspect-source":148,"../internals/internal-state":149,"../internals/is-callable":150}],156:[function(e,t,i){"use strict";var n=e("../internals/descriptors"),r=e("../internals/ie8-dom-define"),o=e("../internals/v8-prototype-define-bug"),s=e("../internals/an-object"),a=e("../internals/to-property-key"),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";i.f=n?o?function(e,t,i){if(s(e),t=a(t),s(i),"function"==typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var n=u(e,t);n&&n[f]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:h in i?i[h]:n[h],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(s(e),t=a(t),s(i),r)try{return c(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},{"../internals/an-object":127,"../internals/descriptors":132,"../internals/ie8-dom-define":147,"../internals/to-property-key":167,"../internals/v8-prototype-define-bug":171}],157:[function(e,t,i){"use strict";var n=e("../internals/function-uncurry-this");t.exports=n({}.isPrototypeOf)},{"../internals/function-uncurry-this":141}],158:[function(e,t,i){"use strict";var n=e("../internals/function-call"),r=e("../internals/is-callable"),o=e("../internals/is-object"),s=TypeError;t.exports=function(e,t){var i,a;if("string"===t&&r(i=e.toString)&&!o(a=n(i,e)))return a;if(r(i=e.valueOf)&&!o(a=n(i,e)))return a;if("string"!==t&&r(i=e.toString)&&!o(a=n(i,e)))return a;throw new s("Can't convert object to primitive value")}},{"../internals/function-call":139,"../internals/is-callable":150,"../internals/is-object":152}],159:[function(e,t,i){"use strict";var n=e("../internals/an-object");t.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},{"../internals/an-object":127}],160:[function(e,t,i){"use strict";var n=e("../internals/is-null-or-undefined"),r=TypeError;t.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},{"../internals/is-null-or-undefined":151}],161:[function(e,t,i){"use strict";var n=e("../internals/shared"),r=e("../internals/uid"),o=n("keys");t.exports=function(e){return o[e]||(o[e]=r(e))}},{"../internals/shared":163,"../internals/uid":169}],162:[function(e,t,i){"use strict";var n=e("../internals/global"),r=e("../internals/define-global-property"),o="__core-js_shared__",s=n[o]||r(o,{});t.exports=s},{"../internals/define-global-property":131,"../internals/global":144}],163:[function(e,t,i){"use strict";var n=e("../internals/is-pure"),r=e("../internals/shared-store");(t.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.34.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":153,"../internals/shared-store":162}],164:[function(e,t,i){"use strict";var n=e("../internals/engine-v8-version"),r=e("../internals/fails"),o=e("../internals/global").String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"../internals/engine-v8-version":136,"../internals/fails":137,"../internals/global":144}],165:[function(e,t,i){"use strict";var n=e("../internals/require-object-coercible"),r=Object;t.exports=function(e){return r(n(e))}},{"../internals/require-object-coercible":160}],166:[function(e,t,i){"use strict";var n=e("../internals/function-call"),r=e("../internals/is-object"),o=e("../internals/is-symbol"),s=e("../internals/get-method"),a=e("../internals/ordinary-to-primitive"),l=e("../internals/well-known-symbol"),c=TypeError,u=l("toPrimitive");t.exports=function(e,t){if(!r(e)||o(e))return e;var i,l=s(e,u);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!r(i)||o(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},{"../internals/function-call":139,"../internals/get-method":143,"../internals/is-object":152,"../internals/is-symbol":154,"../internals/ordinary-to-primitive":158,"../internals/well-known-symbol":173}],167:[function(e,t,i){"use strict";var n=e("../internals/to-primitive"),r=e("../internals/is-symbol");t.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},{"../internals/is-symbol":154,"../internals/to-primitive":166}],168:[function(e,t,i){"use strict";var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},{}],169:[function(e,t,i){"use strict";var n=e("../internals/function-uncurry-this"),r=0,o=Math.random(),s=n(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++r+o,36)}},{"../internals/function-uncurry-this":141}],170:[function(e,t,i){"use strict";var n=e("../internals/symbol-constructor-detection");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/symbol-constructor-detection":164}],171:[function(e,t,i){"use strict";var n=e("../internals/descriptors"),r=e("../internals/fails");t.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{"../internals/descriptors":132,"../internals/fails":137}],172:[function(e,t,i){"use strict";var n=e("../internals/global"),r=e("../internals/is-callable"),o=n.WeakMap;t.exports=r(o)&&/native code/.test(String(o))},{"../internals/global":144,"../internals/is-callable":150}],173:[function(e,t,i){"use strict";var n=e("../internals/global"),r=e("../internals/shared"),o=e("../internals/has-own-property"),s=e("../internals/uid"),a=e("../internals/symbol-constructor-detection"),l=e("../internals/use-symbol-as-uid"),c=n.Symbol,u=r("wks"),h=l?c.for||c:c&&c.withoutSetter||s;t.exports=function(e){return o(u,e)||(u[e]=a&&o(c,e)?c[e]:h("Symbol."+e)),u[e]}},{"../internals/global":144,"../internals/has-own-property":145,"../internals/shared":163,"../internals/symbol-constructor-detection":164,"../internals/uid":169,"../internals/use-symbol-as-uid":170}],174:[function(e,t,i){function n(e){return Object.prototype.toString.call(e)}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},i.isBoolean=function(e){return"boolean"==typeof e},i.isNull=function(e){return null===e},i.isNullOrUndefined=function(e){return null==e},i.isNumber=function(e){return"number"==typeof e},i.isString=function(e){return"string"==typeof e},i.isSymbol=function(e){return"symbol"==typeof e},i.isUndefined=function(e){return void 0===e},i.isRegExp=function(e){return"[object RegExp]"===n(e)},i.isObject=function(e){return"object"==typeof e&&null!==e},i.isDate=function(e){return"[object Date]"===n(e)},i.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},i.isFunction=function(e){return"function"==typeof e},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},i.isBuffer=e("buffer").Buffer.isBuffer},{buffer:123}],175:[function(e,t,i){(function(i){(function(){var n=e("elliptic"),r=e("bn.js");t.exports=function(e){return new s(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(e,t,n){Array.isArray(e)||(e=e.toArray());var r=new i(e);if(n&&r.length<n){var o=new i(n-r.length);o.fill(0),r=i.concat([o,r])}return t?r.toString(t):r}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,t,n){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var i=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(i[i.length-1]%2?i[0]=7:i[0]=6),a(i,e)},s.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",i.isBuffer(e)||(e=new i(e,t));var n=new r(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":176,buffer:123,elliptic:194}],176:[function(e,t,i){arguments[4][75][0].apply(i,arguments)},{buffer:79,dup:75}],177:[function(e,t,i){"use strict";var n=e("inherits"),r=e("md5.js"),o=e("ripemd160"),s=e("sha.js"),a=e("cipher-base");function l(e){a.call(this,"digest"),this._hash=e}n(l,a),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new r:"rmd160"===e||"ripemd160"===e?new o:new l(s(e))}},{"cipher-base":125,inherits:247,"md5.js":252,ripemd160:294,"sha.js":299}],178:[function(e,t,i){var n=e("md5.js");t.exports=function(e){return(new n).update(e).digest()}},{"md5.js":252}],179:[function(e,t,i){"use strict";var n=e("inherits"),r=e("./legacy"),o=e("cipher-base"),s=e("safe-buffer").Buffer,a=e("create-hash/md5"),l=e("ripemd160"),c=e("sha.js"),u=s.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var i="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>i)?t=("rmd160"===e?new l:c(e)).update(t).digest():t.length<i&&(t=s.concat([t,u],i));for(var n=this._ipad=s.allocUnsafe(i),r=this._opad=s.allocUnsafe(i),a=0;a<i;a++)n[a]=54^t[a],r[a]=92^t[a];this._hash="rmd160"===e?new l:c(e),this._hash.update(n)}n(h,o),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:c(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new r(a,t):new h(e,t)}},{"./legacy":180,"cipher-base":125,"create-hash/md5":178,inherits:247,ripemd160:294,"safe-buffer":295,"sha.js":299}],180:[function(e,t,i){"use strict";var n=e("inherits"),r=e("safe-buffer").Buffer,o=e("cipher-base"),s=r.alloc(128),a=64;
vendor: 9,796 bytes, line 35
35function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=r.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=r.concat([t,s],a));for(var i=this._ipad=r.allocUnsafe(a),n=this._opad=r.allocUnsafe(a),l=0;l<a;l++)i[l]=54^t[l],n[l]=92^t[l];this._hash=[i]}n(l,o),l.prototype._update=function(e){this._hash.push(e)},l.prototype._final=function(){var e=this._alg(r.concat(this._hash));return this._alg(r.concat([this._opad,e]))},t.exports=l},{"cipher-base":125,inherits:247,"safe-buffer":295}],181:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),r=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);i.getHashes=function(){return o};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var a=e("browserify-cipher");i.Cipher=a.Cipher,i.createCipher=a.createCipher,i.Cipheriv=a.Cipheriv,i.createCipheriv=a.createCipheriv,i.Decipher=a.Decipher,i.createDecipher=a.createDecipher,i.Decipheriv=a.Decipheriv,i.createDecipheriv=a.createDecipheriv,i.getCiphers=a.getCiphers,i.listCiphers=a.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var c=e("browserify-sign");i.createSign=c.createSign,i.Sign=c.Sign,i.createVerify=c.createVerify,i.Verify=c.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var h=e("randomfill");i.randomFill=h.randomFill,i.randomFillSync=h.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},i.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":97,"browserify-sign":104,"browserify-sign/algos":101,"create-ecdh":175,"create-hash":177,"create-hmac":179,"diffie-hellman":188,pbkdf2:262,"public-encrypt":270,randombytes:277,randomfill:278}],182:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede")},{"./des/cbc":183,"./des/cipher":184,"./des/des":185,"./des/ede":186,"./des/utils":187}],183:[function(e,t,i){"use strict";var n=e("minimalistic-assert"),r=e("inherits"),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}i.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}r(t,e);for(var i=Object.keys(o),n=0;n<i.length;n++){var s=i[n];t.prototype[s]=o[s]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},o._update=function(e,t,i,n){var r=this._cbcState,o=this.constructor.super_.prototype,s=r.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];o._update.call(this,s,0,i,n);for(a=0;a<this.blockSize;a++)s[a]=i[n+a]}else{o._update.call(this,e,t,i,n);for(a=0;a<this.blockSize;a++)i[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},{inherits:247,"minimalistic-assert":255}],184:[function(e,t,i){"use strict";var n=e("minimalistic-assert");function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}t.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=i,i},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(e){var t=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,r=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(r,i)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,r,i),i+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return r},r.prototype._updateDecrypt=function(e){for(var t=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,r=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),i+=this._flushBuffer(r,i);return t+=this._buffer(e,t),r},r.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},r.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":255}],185:[function(e,t,i){"use strict";var n=e("minimalistic-assert"),r=e("inherits"),o=e("./utils"),s=e("./cipher");function a(){this.tmp=new Array(2),this.keys=null}function l(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}r(l,s),t.exports=l,l.create=function(e){return new l(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var i=o.readUInt32BE(t,0),r=o.readUInt32BE(t,4);o.pc1(i,r,e.tmp,0),i=e.tmp[0],r=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var a=c[s>>>1];i=o.r28shl(i,a),r=o.r28shl(r,a),o.pc2(i,r,e.keys,s)}},l.prototype._update=function(e,t,i,n){var r=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,r.tmp,0),s=r.tmp[0],a=r.tmp[1],"encrypt"===this.type?this._encrypt(r,s,a,r.tmp,0):this._decrypt(r,s,a,r.tmp,0),s=r.tmp[0],a=r.tmp[1],o.writeUInt32BE(i,s,n),o.writeUInt32BE(i,a,n+4)},l.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var i=e.length-t,n=t;n<e.length;n++)e[n]=i;return!0},l.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],i=e.length-t;i<e.length;i++)n.equal(e[i],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,i,n,r){for(var s=t,a=i,l=0;l<e.keys.length;l+=2){var c=e.keys[l],u=e.keys[l+1];o.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=o.substitute(c,u),d=a;a=(s^o.permute(h))>>>0,s=d}o.rip(a,s,n,r)},l.prototype._decrypt=function(e,t,i,n,r){for(var s=i,a=t,l=e.keys.length-2;l>=0;l-=2){var c=e.keys[l],u=e.keys[l+1];o.expand(s,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=o.substitute(c,u),d=s;s=(a^o.permute(h))>>>0,a=d}o.rip(s,a,n,r)}},{"./cipher":184,"./utils":187,inherits:247,"minimalistic-assert":255}],186:[function(e,t,i){"use strict";var n=e("minimalistic-assert"),r=e("inherits"),o=e("./cipher"),s=e("./des");function a(e,t){n.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),r=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i})]}function l(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}r(l,o),t.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,i,n){var r=this._edeState;r.ciphers[0]._update(e,t,i,n),r.ciphers[1]._update(i,n,i,n),r.ciphers[2]._update(i,n,i,n)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},{"./cipher":184,"./des":185,inherits:247,"minimalistic-assert":255}],187:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},i.ip=function(e,t,i,n){for(var r=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)r<<=1,r|=t>>>a+s&1;for(a=0;a<=24;a+=8)r<<=1,r|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}i[n+0]=r>>>0,i[n+1]=o>>>0},i.rip=function(e,t,i,n){for(var r=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)r<<=1,r|=t>>>a+s&1,r<<=1,r|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;i[n+0]=r>>>0,i[n+1]=o>>>0},i.pc1=function(e,t,i,n){for(var r=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)r<<=1,r|=t>>a+s&1;for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+s&1}for(a=0;a<=24;a+=8)r<<=1,r|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;i[n+0]=r>>>0,i[n+1]=o>>>0},i.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,r){for(var o=0,s=0,a=n.length>>>1,l=0;l<a;l++)o<<=1,o|=e>>>n[l]&1;for(l=a;l<n.length;l++)s<<=1,s|=t>>>n[l]&1;i[r+0]=o>>>0,i[r+1]=s>>>0},i.expand=function(e,t,i){var n=0,r=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>
vendor: 10,381 bytes, line 35
35=3;o-=4)r|=e>>>o&63,r<<=6;r|=(31&e)<<1|e>>>31,t[i+0]=n>>>0,t[i+1]=r>>>0};var r=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];i.substitute=function(e,t){for(var i=0,n=0;n<4;n++){i<<=4,i|=r[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){i<<=4,i|=r[256+64*n+(t>>>18-6*n&63)]}return i>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];i.permute=function(e){for(var t=0,i=0;i<o.length;i++)t<<=1,t|=e>>>o[i]&1;return t>>>0},i.padSplit=function(e,t,i){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var r=[],o=0;o<t;o+=i)r.push(n.slice(o,o+i));return r.join(" ")}},{}],188:[function(e,t,i){(function(t){(function(){var n=e("./lib/generatePrime"),r=e("./lib/primes.json"),o=e("./lib/dh");var s={binary:!0,hex:!0,base64:!0};i.DiffieHellmanGroup=i.createDiffieHellmanGroup=i.getDiffieHellman=function(e){var i=new t(r[e].prime,"hex"),n=new t(r[e].gen,"hex");return new o(i,n)},i.createDiffieHellman=i.DiffieHellman=function e(i,r,a,l){return t.isBuffer(r)||void 0===s[r]?e(i,"binary",r,a):(r=r||"binary",l=l||"binary",a=a||new t([2]),t.isBuffer(a)||(a=new t(a,l)),"number"==typeof i?new o(n(i,a),a,!0):(t.isBuffer(i)||(i=new t(i,r)),new o(i,a,!0)))}}).call(this)}).call(this,e("buffer").Buffer)},{"./lib/dh":189,"./lib/generatePrime":190,"./lib/primes.json":191,buffer:123}],189:[function(e,t,i){(function(i){(function(){var n=e("bn.js"),r=new(e("miller-rabin")),o=new n(24),s=new n(11),a=new n(10),l=new n(3),c=new n(7),u=e("./generatePrime"),h=e("randombytes");function d(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._pub=new n(e),this}function f(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._priv=new n(e),this}t.exports=m;var p={};function m(e,t,i){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=d,this.setPrivateKey=f):this._primeCode=8}function g(e,t){var n=new i(e.toArray());return t?n.toString(t):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var i=t.toString("hex"),n=[i,e.toString(16)].join("_");if(n in p)return p[n];var h,d=0;if(e.isEven()||!u.simpleSieve||!u.fermatTest(e)||!r.test(e))return d+=1,d+="02"===i||"05"===i?8:4,p[n]=d,d;switch(r.test(e.shrn(1))||(d+=2),i){case"02":e.mod(o).cmp(s)&&(d+=8);break;case"05":(h=e.mod(a)).cmp(l)&&h.cmp(c)&&(d+=8);break;default:d+=4}return p[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new i(t.toArray()),o=this.getPrime();if(r.length<o.length){var s=new i(o.length-r.length);s.fill(0),r=i.concat([s,r])}return r},m.prototype.getPublicKey=function(e){return g(this._pub,e)},m.prototype.getPrivateKey=function(e){return g(this._priv,e)},m.prototype.getPrime=function(e){return g(this.__prime,e)},m.prototype.getGenerator=function(e){return g(this._gen,e)},m.prototype.setGenerator=function(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this.__gen=e,this._gen=new n(e),this}}).call(this)}).call(this,e("buffer").Buffer)},{"./generatePrime":190,"bn.js":192,buffer:123,"miller-rabin":253,randombytes:277}],190:[function(e,t,i){var n=e("randombytes");t.exports=b,b.simpleSieve=g,b.fermatTest=v;var r=e("bn.js"),o=new r(24),s=new(e("miller-rabin")),a=new r(1),l=new r(2),c=new r(5),u=(new r(16),new r(8),new r(10)),h=new r(3),d=(new r(7),new r(11)),f=new r(4),p=(new r(12),null);function m(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,i=3;i<1048576;i+=2){for(var n=Math.ceil(Math.sqrt(i)),r=0;r<t&&e[r]<=n&&i%e[r]!==0;r++);t!==r&&e[r]<=n||(e[t++]=i)}return p=e,e}function g(e){for(var t=m(),i=0;i<t.length;i++)if(0===e.modn(t[i]))return 0===e.cmpn(t[i]);return!0}function v(e){var t=r.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new r(2===t||5===t?[140,123]:[140,39]);var i,p;for(t=new r(t);;){for(i=new r(n(Math.ceil(e/8)));i.bitLength()>e;)i.ishrn(1);if(i.isEven()&&i.iadd(a),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(c))for(;i.mod(u).cmp(h);)i.iadd(f)}else for(;i.mod(o).cmp(d);)i.iadd(f);if(g(p=i.shrn(1))&&g(i)&&v(p)&&v(i)&&s.test(p)&&s.test(i))return i}}},{"bn.js":192,"miller-rabin":253,randombytes:277}],191:[function(e,t,i){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd4
3507b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],192:[function(e,t,i){arguments[4][75][0].apply(i,arguments)},{buffer:79,dup:75}],193:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("ssr-window");function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function s(e,t,i){return s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&o(r,i.prototype),r},s.apply(null,arguments)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,r(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,e)},a(e)}var l=function(e){var t,i;function n(t){var i,n,r;return i=e.call.apply(e,[this].concat(t))||this,n=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i),r=n.__proto__,Object.defineProperty(n,"__proto__",{get:function(){return r},set:function(e){r.__proto__=e}}),i}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,n}(a(Array));function c(e){void 0===e&&(e=[]);var t=[];return e.forEach(function(e){Array.isArray(e)?t.push.apply(t,c(e)):t.push(e)}),t}function u(e,t){return Array.prototype.filter.call(e,t)}function h(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function d(e,t){var i=n.getWindow(),r=n.getDocument(),o=[];if(!t&&e instanceof l)return e;if(!e)return new l(o);if("string"==typeof e){var s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var a="div";0===s.indexOf("<li")&&(a="ul"),0===s.indexOf("<tr")&&(a="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(a="tr"),0===s.indexOf("<tbody")&&(a="table"),0===s.indexOf("<option")&&(a="select");var c=r.createElement(a);c.innerHTML=s;for(var u=0;u<c.childNodes.length;u+=1)o.push(c.childNodes[u])}else o=function(e,t){if("string"!=typeof e)return[e];for(var i=[],n=t.querySelectorAll(e),r=0;r<n.length;r+=1)i.push(n[r]);return i}(e.trim(),t||r)}else if(e.nodeType||e===i||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof l)return e;o=e}return new l(function(e){for(var t=[],i=0;i<e.length;
35i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}(o))}d.fn=l.prototype;var f="resize scroll".split(" ");function p(e){return function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];if(void 0===i[0]){for(var r=0;r<this.length;r+=1)f.indexOf(e)<0&&(e in this[r]?this[r][e]():d(this[r]).trigger(e));return this}return this.on.apply(this,[e].concat(i))}}var m=p("click"),g=p("blur"),v=p("focus"),b=p("focusin"),y=p("focusout"),w=p("keyup"),_=p("keydown"),k=p("keypress"),x=p("submit"),C=p("change"),S=p("mousedown"),E=p("mousemove"),T=p("mouseup"),A=p("mouseenter"),I=p("mouseleave"),M=p("mouseout"),P=p("mouseover"),D=p("touchstart"),O=p("touchend"),L=p("touchmove"),R=p("resize"),B=p("scroll");i.$=d,i.add=function(){for(var e,t,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];for(e=0;e<n.length;e+=1){var o=d(n[e]);for(t=0;t<o.length;t+=1)this.push(o[t])}return this},i.addClass=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=c(t.map(function(e){return e.split(" ")}));return this.forEach(function(e){var t;(t=e.classList).add.apply(t,n)}),this},i.animate=function(e,t){var i,r=n.getWindow(),o=this,s={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:o,animating:!1,que:[],easingProgress:function(e,t){return"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t},stop:function(){s.frameId&&r.cancelAnimationFrame(s.frameId),s.animating=!1,s.elements.each(function(e){delete e.dom7AnimateInstance}),s.que=[]},done:function(e){if(s.animating=!1,s.elements.each(function(e){delete e.dom7AnimateInstance}),e&&e(o),s.que.length>0){var t=s.que.shift();s.animate(t[0],t[1])}},animate:function(e,t){if(s.animating)return s.que.push([e,t]),s;var i=[];s.elements.each(function(t,n){var o,a,l,c,u;t.dom7AnimateInstance||(s.elements[n].dom7AnimateInstance=s),i[n]={container:t},Object.keys(e).forEach(function(s){o=r.getComputedStyle(t,null).getPropertyValue(s).replace(",","."),a=parseFloat(o),l=o.replace(a,""),c=parseFloat(e[s]),u=e[s]+l,i[n][s]={initialFullValue:o,initialValue:a,unit:l,finalValue:c,finalFullValue:u,currentValue:a}})});var n,a,l=null,c=0,u=0,h=!1;return s.animating=!0,s.frameId=r.requestAnimationFrame(function d(){var f,p;n=(new Date).getTime(),h||(h=!0,t.begin&&t.begin(o)),null===l&&(l=n),t.progress&&t.progress(o,Math.max(Math.min((n-l)/t.duration,1),0),l+t.duration-n<0?0:l+t.duration-n,l),i.forEach(function(r){var o=r;a||o.done||Object.keys(e).forEach(function(r){if(!a&&!o.done){f=Math.max(Math.min((n-l)/t.duration,1),0),p=s.easingProgress(t.easing,f);var h=o[r],d=h.initialValue,m=h.finalValue,g=h.unit;o[r].currentValue=d+p*(m-d);var v=o[r].currentValue;(m>d&&v>=m||m<d&&v<=m)&&(o.container.style[r]=m+g,(u+=1)===Object.keys(e).length&&(o.done=!0,c+=1),c===i.length&&(a=!0)),a?s.done(t.complete):o.container.style[r]=v+g}})}),a||(s.frameId=r.requestAnimationFrame(d))}),s}};if(0===s.elements.length)return o;for(var a=0;a<s.elements.length;a+=1)s.elements[a].dom7AnimateInstance?i=s.elements[a].dom7AnimateInstance:s.elements[a].dom7AnimateInstance=s;return i||(i=s),"stop"===e?i.stop():i.animate(s.props,s.params),o},i.animationEnd=function(e){var t=this;return e&&t.on("animationend",function i(n){n.target===this&&(e.call(this,n),t.off("animationend",i))}),this},i.append=function(){for(var e,t=n.getDocument(),i=0;i<arguments.length;i+=1){e=i<0||arguments.length<=i?void 0:arguments[i];for(var r=0;r<this.length;r+=1)if("string"==typeof e){var o=t.createElement("div");for(o.innerHTML=e;o.firstChild;)this[r].appendChild(o.firstChild)}else if(e instanceof l)for(var s=0;s<e.length;s+=1)this[r].appendChild(e[s]);else this[r].appendChild(e)}return this},i.appendTo=function(e){return d(e).append(this),this},i.attr=function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===arguments.length)this[i].setAttribute(e,t);else for(var n in e)this[i][n]=e[n],this[i].setAttribute(n,e[n]);return this},i.blur=g,i.change=C,i.children=function(e){for(var t=[],i=0;i<this.length;i+=1)for(var n=this[i].children,r=0;r<n.length;r+=1)e&&!d(n[r]).is(e)||t.push(n[r]);return d(t)},i.click=m,i.closest=function(e){var t=this;return void 0===e?d([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},i.css=function(e,t){var i,r=n.getWindow();if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(var o in e)this[i].style[o]=e[o];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this},i.data=function(e,t){var i;if(void 0===t){if(!(i=this[0]))return;if(i.dom7ElementDataStorage&&e in i.dom7ElementDataStorage)return i.dom7ElementDataStorage[e];var n=i.getAttribute("data-"+e);return n||void 0}for(var r=0;r<this.length;r+=1)(i=this[r]).dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return this},i.dataset=function(){var e=this[0];if(e){var t={};if(e.dataset)for(var i in e.dataset)t[i]=e.dataset[i];else for(var n=0;n<e.attributes.length;n+=1){var r=e.attributes[n];r.name.indexOf("data-")>=0&&(t[h(r.name.split("data-")[1])]=r.value)}for(var o in t)"false"===t[o]?t[o]=!1:"true"===t[o]?t[o]=!0:parseFloat(t[o])===1*t[o]&&(t[o]*=1);return t}},i.default=d,i.detach=function(){return this.remove()},i.each=function(e){return e?(this.forEach(function(t,i){e.apply(t,[t,i])}),this):this},i.empty=function(){for(var e=0;e<this.length;e+=1){var t=this[e];if(1===t.nodeType){for(var i=0;i<t.childNodes.length;i+=1)t.childNodes[i].parentNode&&t.childNodes[i].parentNode.removeChild(t.childNodes[i]);t.textContent=""}}return this},i.eq=function(e){if(void 0===e)return this;var t=this.length;if(e>t-1)return d([]);if(e<0){var i=t+e;return d(i<0?[]:[this[i]])}return d([this[e]])},i.filter=function(e){return d(u(this,e))},i.find=function(e){for(var t=[],i=0;i<this.length;i+=1)for(var n=this[i].querySelectorAll(e),r=0;r<n.length;r+=1)t.push(n[r]);return d(t)},i.focus=v,i.focusin=b,i.focusout=y,i.hasClass=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=c(t.map(function(e){return e.split(" ")}));return u(this,function(e){return n.filter(function(t){return e.classList.contains(t)}).length>0}).length>0},i.height=function(){var e=n.getWindow();
35return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null},i.hide=function(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this},i.html=function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},i.index=function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},i.insertAfter=function(e){for(var t=d(e),i=0;i<this.length;i+=1)if(1===t.length)t[0].parentNode.insertBefore(this[i],t[0].nextSibling);else if(t.length>1)for(var n=0;n<t.length;n+=1)t[n].parentNode.insertBefore(this[i].cloneNode(!0),t[n].nextSibling)},i.insertBefore=function(e){for(var t=d(e),i=0;i<this.length;i+=1)if(1===t.length)t[0].parentNode.insertBefore(this[i],t[0]);else if(t.length>1)for(var n=0;n<t.length;n+=1)t[n].parentNode.insertBefore(this[i].cloneNode(!0),t[n])},i.is=function(e){var t,i,r=n.getWindow(),o=n.getDocument(),s=this[0];if(!s||void 0===e)return!1;if("string"==typeof e){if(s.matches)return s.matches(e);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(e);if(s.msMatchesSelector)return s.msMatchesSelector(e);for(t=d(e),i=0;i<t.length;i+=1)if(t[i]===s)return!0;return!1}if(e===o)return s===o;if(e===r)return s===r;if(e.nodeType||e instanceof l){for(t=e.nodeType?[e]:e,i=0;i<t.length;i+=1)if(t[i]===s)return!0;return!1}return!1},i.keydown=_,i.keypress=k,i.keyup=w,i.mousedown=S,i.mouseenter=A,i.mouseleave=I,i.mousemove=E,i.mouseout=M,i.mouseover=P,i.mouseup=T,i.next=function(e){return this.length>0?e?this[0].nextElementSibling&&d(this[0].nextElementSibling).is(e)?d([this[0].nextElementSibling]):d([]):this[0].nextElementSibling?d([this[0].nextElementSibling]):d([]):d([])},i.nextAll=function(e){var t=[],i=this[0];if(!i)return d([]);for(;i.nextElementSibling;){var n=i.nextElementSibling;e?d(n).is(e)&&t.push(n):t.push(n),i=n}return d(t)},i.off=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=t[1],o=t[2],s=t[3];"function"==typeof t[1]&&(n=t[0],o=t[1],s=t[2],r=void 0),s||(s=!1);for(var a=n.split(" "),l=0;l<a.length;l+=1)for(var c=a[l],u=0;u<this.length;u+=1){var h=this[u],d=void 0;if(!r&&h.dom7Listeners?d=h.dom7Listeners[c]:r&&h.dom7LiveListeners&&(d=h.dom7LiveListeners[c]),d&&d.length)for(var f=d.length-1;f>=0;f-=1){var p=d[f];o&&p.listener===o||o&&p.listener&&p.listener.dom7proxy&&p.listener.dom7proxy===o?(h.removeEventListener(c,p.proxyListener,s),d.splice(f,1)):o||(h.removeEventListener(c,p.proxyListener,s),d.splice(f,1))}}return this},i.offset=function(){if(this.length>0){var e=n.getWindow(),t=n.getDocument(),i=this[0],r=i.getBoundingClientRect(),o=t.body,s=i.clientTop||o.clientTop||0,a=i.clientLeft||o.clientLeft||0,l=i===e?e.scrollY:i.scrollTop,c=i===e?e.scrollX:i.scrollLeft;return{top:r.top+l-s,left:r.left+c-a}}return null},i.on=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=t[1],o=t[2],s=t[3];function a(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),d(t).is(r))o.apply(t,i);else for(var n=d(t).parents(),s=0;s<n.length;s+=1)d(n[s]).is(r)&&o.apply(n[s],i)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),o.apply(this,t)}"function"==typeof t[1]&&(n=t[0],o=t[1],s=t[2],r=void 0),s||(s=!1);for(var c,u=n.split(" "),h=0;h<this.length;h+=1){var f=this[h];if(r)for(c=0;c<u.length;c+=1){var p=u[c];f.dom7LiveListeners||(f.dom7LiveListeners={}),f.dom7LiveListeners[p]||(f.dom7LiveListeners[p]=[]),f.dom7LiveListeners[p].push({listener:o,proxyListener:a}),f.addEventListener(p,a,s)}else for(c=0;c<u.length;c+=1){var m=u[c];f.dom7Listeners||(f.dom7Listeners={}),f.dom7Listeners[m]||(f.dom7Listeners[m]=[]),f.dom7Listeners[m].push({listener:o,proxyListener:l}),f.addEventListener(m,l,s)}}return this},i.once=function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=i[0],o=i[1],s=i[2],a=i[3];function l(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];s.apply(this,i),e.off(r,o,l,a),l.dom7proxy&&delete l.dom7proxy}return"function"==typeof i[1]&&(r=i[0],s=i[1],a=i[2],o=void 0),l.dom7proxy=s,e.on(r,o,l,a)},i.outerHeight=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},i.outerWidth=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+
35parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},i.parent=function(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?d(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return d(t)},i.parents=function(e){for(var t=[],i=0;i<this.length;i+=1)for(var n=this[i].parentNode;n;)e?d(n).is(e)&&t.push(n):t.push(n),n=n.parentNode;return d(t)},i.prepend=function(e){var t,i,r=n.getDocument();for(t=0;t<this.length;t+=1)if("string"==typeof e){var o=r.createElement("div");for(o.innerHTML=e,i=o.childNodes.length-1;i>=0;i-=1)this[t].insertBefore(o.childNodes[i],this[t].childNodes[0])}else if(e instanceof l)for(i=0;i<e.length;i+=1)this[t].insertBefore(e[i],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},i.prependTo=function(e){return d(e).prepend(this),this},i.prev=function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&d(t.previousElementSibling).is(e)?d([t.previousElementSibling]):d([]):t.previousElementSibling?d([t.previousElementSibling]):d([])}return d([])},i.prevAll=function(e){var t=[],i=this[0];if(!i)return d([]);for(;i.previousElementSibling;){var n=i.previousElementSibling;e?d(n).is(e)&&t.push(n):t.push(n),i=n}return d(t)},i.prop=function(e,t){if(1!==arguments.length||"string"!=typeof e){for(var i=0;i<this.length;i+=1)if(2===arguments.length)this[i][e]=t;else for(var n in e)this[i][n]=e[n];return this}return this[0]?this[0][e]:this},i.remove=function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},i.removeAttr=function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},i.removeClass=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=c(t.map(function(e){return e.split(" ")}));return this.forEach(function(e){var t;(t=e.classList).remove.apply(t,n)}),this},i.removeData=function(e){for(var t=0;t<this.length;t+=1){var i=this[t];i.dom7ElementDataStorage&&i.dom7ElementDataStorage[e]&&(i.dom7ElementDataStorage[e]=null,delete i.dom7ElementDataStorage[e])}},i.resize=R,i.scroll=B,i.scrollLeft=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=t[1],o=t[2],s=t[3];3===t.length&&"function"==typeof o&&(n=t[0],r=t[1],s=t[2],o=t[3]);var a=this;return void 0===n?a.length>0?a[0].scrollLeft:null:a.scrollTo(n,void 0,r,o,s)},i.scrollTo=function(){for(var e=n.getWindow(),t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];var o=i[0],s=i[1],a=i[2],l=i[3],c=i[4];return 4===i.length&&"function"==typeof l&&(c=l,o=i[0],s=i[1],a=i[2],c=i[3],l=i[4]),void 0===l&&(l="swing"),this.each(function(){var t,i,n,r,u,h,d,f,p=this,m=s>0||0===s,g=o>0||0===o;if(void 0===l&&(l="swing"),m&&(t=p.scrollTop,a||(p.scrollTop=s)),g&&(i=p.scrollLeft,a||(p.scrollLeft=o)),a){m&&(n=p.scrollHeight-p.offsetHeight,u=Math.max(Math.min(s,n),0)),g&&(r=p.scrollWidth-p.offsetWidth,h=Math.max(Math.min(o,r),0));var v=null;m&&u===t&&(m=!1),g&&h===i&&(g=!1),e.requestAnimationFrame(function n(r){void 0===r&&(r=(new Date).getTime()),null===v&&(v=r);var o,s=Math.max(Math.min((r-v)/a,1),0),b="linear"===l?s:.5-Math.cos(s*Math.PI)/2;m&&(d=t+b*(u-t)),g&&(f=i+b*(h-i)),m&&u>t&&d>=u&&(p.scrollTop=u,o=!0),m&&u<t&&d<=u&&(p.scrollTop=u,o=!0),g&&h>i&&f>=h&&(p.scrollLeft=h,o=!0),g&&h<i&&f<=h&&(p.scrollLeft=h,o=!0),o?c&&c():(m&&(p.scrollTop=d),g&&(p.scrollLeft=f),e.requestAnimationFrame(n))})}})},i.scrollTop=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=t[1],o=t[2],s=t[3];3===t.length&&"function"==typeof o&&(n=t[0],r=t[1],s=t[2],o=t[3]);var a=this;return void 0===n?a.length>0?a[0].scrollTop:null:a.scrollTo(void 0,n,r,o,s)},i.show=function(){for(var e=n.getWindow(),t=0;t<this.length;t+=1){var i=this[t];"none"===i.style.display&&(i.style.display=""),"none"===e.getComputedStyle(i,null).getPropertyValue("display")&&(i.style.display="block")}return this},i.siblings=function(e){return this.nextAll(e).add(this.prevAll(e))},i.stop=function(){for(var e=this,t=0;t<e.length;t+=1)e[t].dom7AnimateInstance&&e[t].dom7AnimateInstance.stop()},i.styles=function(){var e=n.getWindow();return this[0]?e.getComputedStyle(this[0],null):{}},i.submit=x,i.text=function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},i.toggleClass=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=c(t.map(function(e){return e.split(" ")}));
35this.forEach(function(e){n.forEach(function(t){e.classList.toggle(t)})})},i.touchend=O,i.touchmove=L,i.touchstart=D,i.transform=function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},i.transition=function(e){for(var t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?e+"ms":e;return this},i.transitionEnd=function(e){var t=this;return e&&t.on("transitionend",function i(n){n.target===this&&(e.call(this,n),t.off("transitionend",i))}),this},i.trigger=function(){for(var e=n.getWindow(),t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];for(var o=i[0].split(" "),s=i[1],a=0;a<o.length;a+=1)for(var l=o[a],c=0;c<this.length;c+=1){var u=this[c];if(e.CustomEvent){var h=new e.CustomEvent(l,{detail:s,bubbles:!0,cancelable:!0});u.dom7EventData=i.filter(function(e,t){return t>0}),u.dispatchEvent(h),u.dom7EventData=[],delete u.dom7EventData}}return this},i.val=function(e){if(void 0===e){var t=this[0];if(!t)return;if(t.multiple&&"select"===t.nodeName.toLowerCase()){for(var i=[],n=0;n<t.selectedOptions.length;n+=1)i.push(t.selectedOptions[n].value);return i}return t.value}for(var r=0;r<this.length;r+=1){var o=this[r];if(Array.isArray(e)&&o.multiple&&"select"===o.nodeName.toLowerCase())for(var s=0;s<o.options.length;s+=1)o.options[s].selected=e.indexOf(o.options[s].value)>=0;else o.value=e}return this},i.value=function(e){return this.val(e)},i.width=function(){var e=n.getWindow();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}},{"ssr-window":306}],194:[function(e,t,i){"use strict";var n=i;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":210,"./elliptic/curve":197,"./elliptic/curves":200,"./elliptic/ec":201,"./elliptic/eddsa":204,"./elliptic/utils":208,brorand:78}],195:[function(e,t,i){"use strict";var n=e("bn.js"),r=e("../utils"),o=r.getNAF,s=r.getJSF,a=r.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){a(e.precomputed);var i=e._getDoubles(),n=o(t,1,this._bitLength),r=(1<<i.step+1)-(i.step%2==0?2:1);r/=3;var s,l,c=[];for(s=0;s<n.length;s+=i.step){l=0;for(var u=s+i.step-1;u>=s;u--)l=(l<<1)+n[u];c.push(l)}for(var h=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=r;f>0;f--){for(s=0;s<c.length;s++)(l=c[s])===f?d=d.mixedAdd(i.points[s]):l===-f&&(d=d.mixedAdd(i.points[s].neg()));h=h.add(d)}return h.toP()},l.prototype._wnafMul=function(e,t){var i=4,n=e._getNAFPoints(i);i=n.wnd;for(var r=n.points,s=o(t,i,this._bitLength),l=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var u=0;c>=0&&0===s[c];c--)u++;if(c>=0&&u++,l=l.dblp(u),c<0)break;var h=s[c];a(0!==h),l="affine"===e.type?h>0?l.mixedAdd(r[h-1>>1]):l.mixedAdd(r[-h-1>>1].neg()):h>0?l.add(r[h-1>>1]):l.add(r[-h-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,i,n,r){var a,l,c,u=this._wnafT1,h=this._wnafT2,d=this._wnafT3,f=0;for(a=0;a<n;a++){var p=(c=t[a])._getNAFPoints(e);u[a]=p.wnd,h[a]=p.points}for(a=n-1;a>=1;a-=2){var m=a-1,g=a;if(1===u[m]&&1===u[g]){var v=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(v[1]=t[m].add(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].add(t[g].neg())):(v[1]=t[m].toJ().mi
vendor: 5,245 bytes, line 35
35xedAdd(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=s(i[m],i[g]);for(f=Math.max(y[0].length,f),d[m]=new Array(f),d[g]=new Array(f),l=0;l<f;l++){var w=0|y[0][l],_=0|y[1][l];d[m][l]=b[3*(w+1)+(_+1)],d[g][l]=0,h[m]=v}}else d[m]=o(i[m],u[m],this._bitLength),d[g]=o(i[g],u[g],this._bitLength),f=Math.max(d[m].length,f),f=Math.max(d[g].length,f)}var k=this.jpoint(null,null,null),x=this._wnafT4;for(a=f;a>=0;a--){for(var C=0;a>=0;){var S=!0;for(l=0;l<n;l++)x[l]=0|d[l][a],0!==x[l]&&(S=!1);if(!S)break;C++,a--}if(a>=0&&C++,k=k.dblp(C),a<0)break;for(l=0;l<n;l++){var E=x[l];0!==E&&(E>0?c=h[l][E-1>>1]:E<0&&(c=h[l][-E-1>>1].neg()),k="affine"===c.type?k.mixedAdd(c):k.add(c))}}for(a=0;a<n;a++)h[a]=null;return r?k:k.toP()},l.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(e,t){e=r.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return r.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,r=0;r<t;r+=e){for(var o=0;o<e;o++)n=n.dbl();i.push(n)}return{step:e,points:i}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,n=1===i?null:this.dbl(),r=1;r<i;r++)t[r]=t[r-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}},{"../utils":208,"bn.js":209}],196:[function(e,t,i){"use strict";var n=e("../utils"),r=e("bn.js"),o=e("inherits"),s=e("./base"),a=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,i,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===i&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new r(t,16),this.y=new r(i,16),this.z=n?new r(n,16):this.curve.one,this.t=o&&new r(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(l,s),t.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,i,n){return this.point(e,t,i,n)},l.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),n=this.c2.redSub(this.a.redMul(i)),o=this.one.redSub(this.c2.redMul(this.d).redMul(i)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),n=i.redSub(this.c2),o=i.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),n=t.redMul(this.a).redAdd(i),r=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===n.cmp(r)},o(c,s.BasePoint),l.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},l.prototype.point=function(e,t,i,n){return new c(this,e,t,i,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>
35":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(i),a=n.redSub(t),l=r.redMul(s),c=o.redMul(a),u=r.redMul(a),h=s.redMul(o);return this.curve.point(l,c,h,u)},c.prototype._projDbl=function(){var e,t,i,n,r,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(l);this.zOne?(e=s.redSub(a).redSub(l).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(l)),i=c.redSqr().redSub(c).redSub(c)):(r=this.z.redSqr(),o=c.redSub(r).redISub(r),e=s.redSub(a).redISub(l).redMul(o),t=c.redMul(n.redSub(l)),i=c.redMul(o))}else n=a.redAdd(l),r=this.curve._mulC(this.z).redSqr(),o=n.redSub(r).redSub(r),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(l)),i=n.redMul(o);return this.curve.point(e,t,i)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),o=i.redSub(t),s=r.redSub(n),a=r.redAdd(n),l=i.redAdd(t),c=o.redMul(s),u=a.redMul(l),h=o.redMul(l),d=s.redMul(a);return this.curve.point(c,u,d,h)},c.prototype._projAdd=function(e){var t,i,n=this.z.redMul(e.z),r=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),l=r.redSub(a),c=r.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=n.redMul(l).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),i=l.redMul(c)):(t=n.redMul(c).redMul(s.redSub(o)),i=this.curve._mulC(l).redMul(c)),this.curve.point(h,t,i)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},c.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},{"../utils":208,"./base":195,"bn.js":209,inherits:247}],197:[function(e,t,i){"use strict";var n=i;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":195,"./edwards":196,"./mont":198,"./short":199}],198:[function(e,t,i){"use strict";var n=e("bn.js"),r=e("inherits"),o=e("./base"),s=e("../utils");function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,i){o.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(a,o),t.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),n=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},r(l,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>
35":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),n=e.redMul(t),r=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(n,r)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),r=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(i),s=r.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),l=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),i=this,n=this.curve.point(null,null),r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var o=r.length-1;o>=0;o--)0===r[o]?(i=i.diffAdd(n,this),n=n.dbl()):(n=i.diffAdd(n,this),i=i.dbl());return n},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":208,"./base":195,"bn.js":209,inherits:247}],199:[function(e,t,i){"use strict";var n=e("../utils"),r=e("bn.js"),o=e("inherits"),s=e("./base"),a=n.assert;function l(e){s.call(this,"short",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,i,n){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(t,16),this.y=new r(i,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,i,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(t,16),this.y=new r(i,16),this.z=new r(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new r(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)i=new r(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?i=o[0]:(i=o[1],a(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map(function(e){return{a:new r(e.a,16),b:new r(e.b,16)}}):this._getEndoBasis(i)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:r.mont(e),i=new r(2).toRed(t).redInvm(),n=i.redNeg(),o=new r(3).toRed(t).redNeg().redSqrt().redMul(i);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,i,n,o,s,a,l,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),p=new r(1),m=new r(0),g=new r(0),v=new r(1),b=0;0!==d.cmpn(0);){var y=f.div(d);c=f.sub(y.mul(d)),u=g.sub(y.mul(p));var w=v.sub(y.mul(m));if(!n&&c.cmp(h)<0)t=l.neg(),i=p,n=c.neg(),o=u;else if(n&&2===++b)break;l=c,f=d,d=c,g=p,p=u,v=m,m=w}s=c.neg(),a=u;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=i),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],n=t[1],r=n.b.mul(e).divRound(this.n),o=i.b.neg().mul(e).divRound(this.n),s=r.mul(i.a),a=o.mul(n.a),l=r.mul(i.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:l.add(c).neg()}},l.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(0!==n.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,n=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===i.redSqr().redISub(r).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,i){for(var n=this._endoWnafT1,r=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),n[2*o]=a,n[2*o+1]=l,r[2*o]=s.k1,r[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,r,2*o,i),u=0;u<2*o;u++)n[u]=null,r[u]=null;return c},o(c,s.BasePoint),l.prototype.point=function(e,t,i){return new c(this,e,t,i)},l.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.prec
vendor: 19,892 bytes, line 35
35omputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,n=function(e){return i.point(e.x.redMul(i.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],i);if(!t[2])return n;function r(t){return e.point(t[0],t[1],i)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(r))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(r))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),n=e.redInvm(),r=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(n),o=r.redSqr().redISub(this.x.redAdd(this.x)),s=r.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new r(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,i){var n=[this,t],r=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,r):this.curve._wnafMulAdd(1,n,r,2)},c.prototype.jmulAdd=function(e,t,i){var n=[this,t],r=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,r,!0):this.curve._wnafMulAdd(1,n,r,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(i,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(t),r=e.x.redMul(i),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),a=n.redSub(r),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),h=n.redMul(c),d=l.redSqr().redIAdd(u).redISub(h).redISub(h),f=l.redMul(h.redISub(d)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,n=e.x.redMul(t),r=this.y,o=e.y.redMul(t).redMul(this.z),s=i.redSub(n),a=r.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),u=i.redMul(l),h=a.redSqr().redIAdd(c).redISub(u).redISub(u),d=a.redMul(u.redISub(h)).redISub(r.redMul(c)),f=this.z.redMul(s);return this.curve.jpoint(h,d,f)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var i=this;for(t=0;t<e;t++)i=i.dbl();return i}var n=this.curve.a,r=this.curve.tinv,o=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var u=o.redSqr(),h=c.redSqr(),d=h.redSqr(),f=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(l)),p=o.redMul(h),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=f.redMul(g);v=v.redIAdd(v).redISub(d);var b=c.redMul(a);t+1<e&&(l=l.redMul(d)),o=m,a=b,c=v}return this.curve.jpoint(o,c.redMul(r),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,i;if(this.zOne){var n=this.x.redSqr(),r=this.y.redSqr(),o=r.redSqr(),s=this.x.redAdd(r).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),l=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=a.redMul(s.redISub(l)).redISub(c),i=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),f=this.x.redAdd(h).redSqr().redISub(u).redISub(d);f=f.redIAdd(f);var p=u.redAdd(u).redIAdd(u),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(e,t,i)},u.prototype._threeDbl=function(){var e,t,i;if(this.zOne){var n=this.x.redSqr(),r=this.y.redSqr(),o=r.redSqr(),s=this.x.redAdd(r).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(l)).redISub(c),i=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),f=this.x.redSub(u).redMul(this.x.redAdd(u));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),i=this.y.redAdd(this.z).redSqr().redISub(h).redISub(u);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,i)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,n=this.z,r=n.redSqr().redSqr(),o=t.redSqr(),s=i.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(r)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(s),u=a.redSqr().redISub(c.redAdd(c)),h=c.redISub(u),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(h).redISub(d),p=i.redAdd(i).redMul(n);return this.curve.jpoint(u,f,p)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),n=t.redSqr(),r=e.redAdd(e).redIAdd(e),o=r.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),l=n.redIAdd(n);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=r.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(l),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var h=this.x.redMul(a).redISub(u);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(c.redMul(l.redISub(c)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(i).redISub(a);return this.curve.jpoint(h,d,f)},u.prototype.mul=function(e,t){return e=new r(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),r=i.redMul(e.z);return 0===this.y.redMul(r).redISub(e.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(r),0===this.x.cmp(i))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":208,"./base":195,"bn.js":209,inherits:247}],200:[function(e,t,i){"use strict";var n,r=i,o=e("hash.js"),s=e("./curve"),a=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var i=new l(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:i}),i}})}r.PresetCurve=l,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":197,"./precomputed/secp256k1":207,"./utils":208,"hash.js":232}],201:[function(e,t,i){"use strict";var n=e("bn.js"),r=e("hmac-drbg"),o=e("../utils"),s=e("../curves"),a=e("brorand"),l=o.assert,c=e("./key"),u=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=h,h.prototype.keyPair=function(e){return new c(this,e)},h.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new r({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(i));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,i,o){"object"==typeof i&&(o=i,i=null),o||(o={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),l=e.toArray("be",s),c=new r({hash:this.hash,entropy:a,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),d=0;;d++){var f=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(h)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=f.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new u({r:g,s:v,recoveryParam:b})}}}}}},h.prototype.verify=function(e,t,i,r){e=this._truncateToN(new n(e,16)),i=this.keyFromPublic(i,r);var o=(t=new u(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,l=s.invm(this.n),c=l.mul(e).umod(this.n),h=l.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,i.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,i.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,t,i,r){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,r);var o=this.n,s=new n(e),a=t.r,c=t.s,h=1&i,d=i>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var f=t.r.invm(o),p=o.sub(s).mul(f).umod(o),m=c.mul(f).umod(o);return this.g.mulAdd(p,a,m)},h.prototype.getKeyRecoveryParam=function(e,t,i,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var r=0;r<4;r++){var o;try{o=this.recoverPubKey(e,t,r)}catch(e){continue}if(o.eq(i))return r}throw new Error("Unable to find valid recovery factor")}},{"../curves":200,"../utils":208,"./key":202,"./signature":203,"bn.js":209,brorand:78,"hmac-drbg":245}],202:[function(e,t,i){"use strict";var n=e("bn.js"),r=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=o,o.fromPublic=function(e,t,i){return t instanceof o?t:new o(e,{pub:t,pubEnc:i})},o.fromPrivate=function(e,t,i){return t instanceof o?t:new o(e,{priv:t,privEnc:i})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?r(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||r(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":208,"bn.js":209}],203:[function(e,t,i){"use strict";var n=e("bn.js"),r=e("../utils"),o=r.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var n=15&i;if(0===n||n>4)return!1;for(var r=0,o=0,s=t.place;o<n;o++,s++)r<<=8,r|=e[s],r>>>=0;return!(r<=127)&&(t.place=s,r)}function c(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t<i;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var i=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}t.exports=s,s.prototype._importDER=function(e,t){e=r.toArray(e,t);var i=new a;
vendor: 5,005 bytes, line 35
35if(48!==e[i.place++])return!1;var o=l(e,i);if(!1===o)return!1;if(o+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var c=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var h=e.slice(i.place,u+i.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(c),this.s=new n(h),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=c(t),i=c(i);!(i[0]||128&i[1]);)i=i.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,i.length);var o=n.concat(i),s=[48];return u(s,o.length),s=s.concat(o),r.encode(s,e)}},{"../utils":208,"bn.js":209}],204:[function(e,t,i){"use strict";var n=e("hash.js"),r=e("../curves"),o=e("../utils"),s=o.assert,a=o.parseBytes,l=e("./key"),c=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=r[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=u,u.prototype.sign=function(e,t){e=a(e);var i=this.keyFromSecret(t),n=this.hashInt(i.messagePrefix(),e),r=this.g.mul(n),o=this.encodePoint(r),s=this.hashInt(o,i.pubBytes(),e).mul(i.priv()),l=n.add(s).umod(this.curve.n);return this.makeSignature({R:r,S:l,Rencoded:o})},u.prototype.verify=function(e,t,i){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(i),r=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(r)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),r=o.intFromLE(i);return this.curve.pointFromY(r,n)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../curves":200,"../utils":208,"./key":205,"./signature":206,"hash.js":232}],205:[function(e,t,i){"use strict";var n=e("../utils"),r=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),s(a,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),s(a,"privBytes",function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n}),s(a,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),s(a,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),s(a,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(e){return r(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return r(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},t.exports=a},{"../utils":208}],206:[function(e,t,i){"use strict";var n=e("bn.js"),r=e("../utils"),o=r.assert,s=r.cachedProperty,a=r.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),s(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),s(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),s(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},t.exports=l},{"../utils":208,"bn.js":209}],207:[function(e,t,i){t
vendor: 26,141 bytes, line 35
35.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],
vendor: 2,447 bytes, line 35
35208:[function(e,t,i){"use strict";var n=i,r=e("bn.js"),o=e("minimalistic-assert"),s=e("minimalistic-crypto-utils");n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,i){var n=new Array(Math.max(e.bitLength(),i)+1);n.fill(0);for(var r=1<<t+1,o=e.clone(),s=0;s<n.length;s++){var a,l=o.andln(r-1);o.isOdd()?(a=l>(r>>1)-1?(r>>1)-l:l,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var n,r=0,o=0;e.cmpn(-r)>0||t.cmpn(-o)>0;){var s,a,l=e.andln(3)+r&3,c=t.andln(3)+o&3;3===l&&(l=-1),3===c&&(c=-1),s=1&l?3!==(n=e.andln(7)+r&7)&&5!==n||2!==c?l:-l:0,i[0].push(s),a=1&c?3!==(n=t.andln(7)+o&7)&&5!==n||2!==l?c:-c:0,i[1].push(a),2*r===s+1&&(r=1-r),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return i},n.cachedProperty=function(e,t,i){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=i.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new r(e,"hex","le")}},{"bn.js":209,"minimalistic-assert":255,"minimalistic-crypto-utils":256}],209:[function(e,t,i){arguments[4][75][0].apply(i,arguments)},{buffer:79,dup:75}],210:[function(e,t,i){t.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"[email protected]:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <[email protected]>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],211:[function(e,t,i){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},r=Object.keys||function(e){var t=[];
vendor: 4,762 bytes, line 35
35for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return i},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),a=0===c.x}catch(e){a=!1}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,i,r){var o,s,a;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),a=s[t]):(s=e._events=n(null),e._eventsCount=0),a){if("function"==typeof a?a=s[t]=r?[i,a]:[a,i]:r?a.unshift(i):a.push(i),!a.warned&&(o=u(e))&&o>0&&a.length>o){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else a=s[t]=i,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function f(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=o.call(d,n);return r.listener=i,n.wrapFn=r,r}function p(e,t,i){var n=e._events;if(!n)return[];var r=n[t];return r?"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):g(r,r.length):[]}function m(e){var t=this._events;if(t){var i=t[e];if("function"==typeof i)return 1;if(i)return i.length}return 0}function g(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}a?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');l=e}}):s.defaultMaxListeners=l,s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){var t,i,n,r,o,s,a="error"===e;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(a){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(i=s[e]))return!1;var c="function"==typeof i;switch(n=arguments.length){case 1:!function(e,t,i){if(t)e.call(i);else for(var n=e.length,r=g(e,n),o=0;o<n;++o)r[o].call(i)}(i,c,this);break;case 2:!function(e,t,i,n){if(t)e.call(i,n);else for(var r=e.length,o=g(e,r),s=0;s<r;++s)o[s].call(i,n)}(i,c,this,arguments[1]);break;case 3:!function(e,t,i,n,r){if(t)e.call(i,n,r);else for(var o=e.length,s=g(e,o),a=0;a<o;++a)s[a].call(i,n,r)}(i,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,i,n,r,o){if(t)e.call(i,n,r,o);else for(var s=e.length,a=g(e,s),l=0;l<s;++l)a[l].call(i,n,r,o)}(i,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=new Array(n-1),o=1;o<n;o++)r[o-1]=arguments[o];!function(e,t,i,n){if(t)e.apply(i,n);else for(var r=e.length,o=g(e,r),s=0;s<r;++s)o[s].apply(i,n)}(i,c,this,r)}return!0},s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,r,o,s,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[e]))return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=n(null):(delete r[e],r.removeListener&&this.emit
35("removeListener",e,i.listener||t));else if("function"!=typeof i){for(o=-1,s=i.length-1;s>=0;s--)if(i[s]===t||i[s].listener===t){a=i[s].listener,o=s;break}if(o<0)return this;0===o?i.shift():function(e,t){for(var i=t,n=i+1,r=e.length;n<r;i+=1,n+=1)e[i]=e[n];e.pop()}(i,o),1===i.length&&(r[e]=i[0]),r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.removeAllListeners=function(e){var t,i,o;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):i[e]&&(0===--this._eventsCount?this._events=n(null):delete i[e]),this;if(0===arguments.length){var s,a=r(i);for(o=0;o<a.length;++o)"removeListener"!==(s=a[o])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],212:[function(e,t,i){var n=e("safe-buffer").Buffer,r=e("md5.js");t.exports=function(e,t,i,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,a=n.alloc(s),l=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var u=new r;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var h=0;if(s>0){var d=a.length-s;h=Math.min(s,c.length),c.copy(a,d,0,h),s-=h}if(h<c.length&&o>0){var f=l.length-o,p=Math.min(o,c.length-h);c.copy(l,f,h,h+p),o-=p}}return c.fill(0),{key:a,iv:l}}},{"md5.js":252,"safe-buffer":295}],213:[function(e,t,i){ 36/* flatpickr v4.6.13, @license MIT */ 37!function(e,n){"object"==typeof i&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=n()}(this,function(){"use strict"; 38/*! ***************************************************************************** 39 Copyright (c) Microsoft Corporation. 40 41 Permission to use, copy, modify, and/or distribute this software for any 42 purpose with or without fee is hereby granted. 43 44 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 45 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 46 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 47 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 48 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 49 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 50 PERFORMANCE OF THIS SOFTWARE. 51 ***************************************************************************** */var e=function(){return e=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},e.apply(this,arguments)};function t(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<i;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n}var i=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var i=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewB
51ox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},r={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},o=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},s=function(e){return!0===e?1:0};function a(e,t){var i;return function(){var n=this,r=arguments;clearTimeout(i),i=setTimeout(function(){return e.apply(n,r)},t)}}var l=function(e){return e instanceof Array?e:[e]};function c(e,t,i){if(!0===i)return e.classList.add(t);e.classList.remove(t)}function u(e,t,i){var n=window.document.createElement(e);return t=t||"",i=i||"",n.className=t,void 0!==i&&(n.textContent=i),n}function h(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function d(e,t){return t(e)?e:e.parentNode?d(e.parentNode,t):void 0}function f(e,t){var i=u("div","numInputWrapper"),n=u("input","numInput "+e),r=u("span","arrowUp"),o=u("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?n.type="number":(n.type="text",n.pattern="\\d*"),void 0!==t)for(var s in t)n.setAttribute(s,t[s]);return i.appendChild(n),i.appendChild(r),i.appendChild(o),i}function p(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var m=function(){},g=function(e,t,i){return i.months[t?"shorthand":"longhand"][e]},v={D:m,F:function(e,t,i){e.setMonth(i.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,i){e.setHours(e.getHours()%12+12*s(new RegExp(i.amPM[1],"i").test(t)))},M:function(e,t,i){e.setMonth(i.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,i){var n=parseInt(t),r=new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek),r},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:m,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:m,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},b={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},y={Z:function(e){return e.toISOString()},D:function(e,t,i){return t.weekdays.shorthand[y.w(e,t,i)]},F:function(e,t,i){return g(y.n(e,t,i)-1,!1,t)},G:function(e,t,i){return o(y.h(e,t,i))},H:function(e){return o(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[s(e.getHours()>11)]},M:function(e,t){return g(e.getMonth(),!0,t)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,i){return i.getWeek(e)},Y:function(e){return o(e.getFullYear(),4)},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},w=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,s=void 0===o?r:o,a=e.isMobile,l=void 0!==a&&a;return function(e,t,n){var r=n||s;return void 0===i.formatDate||l?t.split("").map(function(t,n,o){return y[t]&&"\\"!==o[n-1]?y[t](e,r,i):"\\"!==t?t:""}).join(""):i.formatDate(e,t,r)}},_=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,s=void 0===o?r:o;return function(e,t,r,o){if(0===e||e){var a,l=o||s,c=e;if(e instanceof Date)a=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)a=new Date(e);else if("string"==typeof e){var u=t||(i||n).dateFormat,h=String(e).trim();if("today"===h)a=new Date,r=!0;else if(i&&i.parseDate)a=i.parseDate(e,u);else if(/Z$/.test(h)||/GMT$/.test(h))a=new Date(e);else{for(var d=void 0,f=[],p=0,m=0,g="";p<u.length;p++){var y=u[p],w="\\"===y,_="\\"===u[p-1]||w;if(b[y]&&!_){g+=b[y];var k=new RegExp(g).exec(e);k&&(d=!0)&&f["Y"!==y?"push":"unshift"]({fn:v[y],val:k[++m]})}else w||(g+=".")}a=i&&i.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),f.forEach(function(e){var t=e.fn,i=e.val;return a=t(a,i,l)||a}),a=d?a:void 0}}if(a instanceof Date&&!isNaN(a.getTime()))return!0===r&&a.setHours(0,0,0,0),a;i.errorHandler(new Error("Invalid date provided: "+c))}}};function k(e,t,i){return void 0===i&&(i=!0),!1!==i?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var x=function(e,t,i){return 3600*e+60*t+i},C=864e5;function S(e){var t=e.defaultHour,i=e.defaultMinute,n=e.defaultSeconds;if(void 0!==e.minDate){var r=e.minDate.getHours(),o=e.minDate.getMinutes(),s=e.minDate.getSeconds();t<r&&(t=r),t===r&&i<o&&(i=o),t===r&&i===o&&n<s&&(n=e.minDate.getSeconds())}if(void 0!==e.maxDate){var a=e.maxDate.getHours(),l=e.maxDate.getMinutes();(t=Math.min(t,a))===a&&(i=Math.min(l,i)),t===a&&i===l&&(n=e.maxDate.getSeconds())}return{hours:t,minutes:i,seconds:n}}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var n=function(t){t&&Object.keys(t).forEach(function(i){return e[i]=t[i]})},r=0,o=t;r<o.length;r++){n(o[r])}return e});function E(m,v){var y={config:e(e({},n),A.defaultConfig),l10n:r};function E(){var e;return(null===(e=y.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function T(e){return e.bind(y)}function I(){var e=y.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==y.calendarContainer&&(y.calendarContainer.style.visibility="hidden",y.calendarContainer.style.display="block"),void 0!==y.daysContainer){var t=(y.days.offsetWidth+1)*e.showMonths;y.daysContainer.style.width=t+"px",y.calendarContainer.style.width=t+(void 0!==y.weekWrapper?y.weekWrapper.offsetWidth:0)+"px",y.calendarContainer.style.removeProperty("visibility"),y.calendarContainer.style.removeProperty("display")}})}function M(e){if(0===y.selectedDates.length){var t=void 0===y.config.minDate||k(new Date,y.config.minDate)>=0?new Date:new Date(y.config.minDate.getTime()),i=S(y.config);t.setHours(i.hours,i.minutes,i.seconds,t.getMilliseconds()),y.selectedDates=[t],y.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,i=p(e),n=i;void 0!==y.amPM&&i===y.amPM&&(y.amPM.textContent=y.l10n.amPM[s(y.amPM.textContent===y.l10n.amPM[0])]);var r=parseFloat(n.getAttribute("min")),a=parseFloat(n.getAttribute("max")),l=parseFloat(n.getAttribute("step")),c=parseInt(n.value,10),u=e.delta||(t?38===e.which?1:-1:0),h=c+l*u;if(void 0!==n.value&&2===n.value.length){var d=n===y.hourElement,f=n===y.minuteElement;h<r?(h=a+h+s(!d)+(s(d)&&s(!y.amPM)),f&&F(void 0,-1,y.hourElement)):h>a&&(h=n===y.hourElement?h-a-s(!y.amPM):r,f&&F(void 0,1,y.hourElement)),y.amPM&&d&&(1===l?h+c===23:Math.abs(h-c)>l)&&(y.amPM.textContent=y.l10n.amPM[s(y.amPM.textContent===y.l10n.amPM[0])]),n.value=o(h)}}(e);var n=y._input.value;P(),xe(),y._input.value!==n&&y._debouncedChange()}function P(){if(void 0!==y.hourElement&&void 0!==y.minuteElement){var e,t,i=(parseInt(y.hourElement.value.slice(-2),10)||0)%24,n=(parseInt(y.minuteElement.value,10)||0)%60,r=void 0!==y.secondElement?(parseInt(y.secondElement.value,10)||0)%60:0;void 0!==y.amPM&&(e=i,t=y.amPM.textContent,i=e%12+12*s(t===y.l10n.amPM[1]));var o=void 0!==y.config.minTime||y.config.minDate&&y.minDateHasTime&&y.latestSelectedDateObj&&0===k(y.latestSelectedDateObj,y.config.minDate,!0),a=void 0!==y.config.maxTime||y.config.maxDate&&y.maxDateHasTime&&y.latestSelectedDateObj&&0===k(y.latestSelectedDateObj,y.config.maxDate,!0);
vendor: 13,170 bytes, line 51
51if(void 0!==y.config.maxTime&&void 0!==y.config.minTime&&y.config.minTime>y.config.maxTime){var l=x(y.config.minTime.getHours(),y.config.minTime.getMinutes(),y.config.minTime.getSeconds()),c=x(y.config.maxTime.getHours(),y.config.maxTime.getMinutes(),y.config.maxTime.getSeconds()),u=x(i,n,r);if(u>c&&u<l){var h=function(e){var t=Math.floor(e/3600),i=(e-3600*t)/60;return[t,i,e-3600*t-60*i]}(l);i=h[0],n=h[1],r=h[2]}}else{if(a){var d=void 0!==y.config.maxTime?y.config.maxTime:y.config.maxDate;(i=Math.min(i,d.getHours()))===d.getHours()&&(n=Math.min(n,d.getMinutes())),n===d.getMinutes()&&(r=Math.min(r,d.getSeconds()))}if(o){var f=void 0!==y.config.minTime?y.config.minTime:y.config.minDate;(i=Math.max(i,f.getHours()))===f.getHours()&&n<f.getMinutes()&&(n=f.getMinutes()),n===f.getMinutes()&&(r=Math.max(r,f.getSeconds()))}}O(i,n,r)}}function D(e){var t=e||y.latestSelectedDateObj;t&&t instanceof Date&&O(t.getHours(),t.getMinutes(),t.getSeconds())}function O(e,t,i){void 0!==y.latestSelectedDateObj&&y.latestSelectedDateObj.setHours(e%24,t,i||0,0),y.hourElement&&y.minuteElement&&!y.isMobile&&(y.hourElement.value=o(y.config.time_24hr?e:(12+e)%12+12*s(e%12==0)),y.minuteElement.value=o(t),void 0!==y.amPM&&(y.amPM.textContent=y.l10n.amPM[s(e>=12)]),void 0!==y.secondElement&&(y.secondElement.value=o(i)))}function L(e){var t=p(e),i=parseInt(t.value)+(e.delta||0);(i/1e3>1||"Enter"===e.key&&!/[^\d]/.test(i.toString()))&&ee(i)}function R(e,t,i,n){return t instanceof Array?t.forEach(function(t){return R(e,t,i,n)}):e instanceof Array?e.forEach(function(e){return R(e,t,i,n)}):(e.addEventListener(t,i,n),void y._handlers.push({remove:function(){return e.removeEventListener(t,i,n)}}))}function B(){be("onChange")}function N(e,t){var i=void 0!==e?y.parseDate(e):y.latestSelectedDateObj||(y.config.minDate&&y.config.minDate>y.now?y.config.minDate:y.config.maxDate&&y.config.maxDate<y.now?y.config.maxDate:y.now),n=y.currentYear,r=y.currentMonth;try{void 0!==i&&(y.currentYear=i.getFullYear(),y.currentMonth=i.getMonth())}catch(e){e.message="Invalid date supplied: "+i,y.config.errorHandler(e)}t&&y.currentYear!==n&&(be("onYearChange"),G()),!t||y.currentYear===n&&y.currentMonth===r||be("onMonthChange"),y.redraw()}function j(e){var t=p(e);~t.className.indexOf("arrow")&&F(e,t.classList.contains("arrowUp")?1:-1)}function F(e,t,i){var n=e&&p(e),r=i||n&&n.parentNode&&n.parentNode.firstChild,o=ye("increment");o.delta=t,r&&r.dispatchEvent(o)}function z(e,t,i,n){var r=te(t,!0),o=u("span",e,t.getDate().toString());return o.dateObj=t,o.$i=n,o.setAttribute("aria-label",y.formatDate(t,y.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===k(t,y.now)&&(y.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),r?(o.tabIndex=-1,we(t)&&(o.classList.add("selected"),y.selectedDateElem=o,"range"===y.config.mode&&(c(o,"startRange",y.selectedDates[0]&&0===k(t,y.selectedDates[0],!0)),c(o,"endRange",y.selectedDates[1]&&0===k(t,y.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===y.config.mode&&function(e){return!("range"!==y.config.mode||y.selectedDates.length<2)&&(k(e,y.selectedDates[0])>=0&&k(e,y.selectedDates[1])<=0)}(t)&&!we(t)&&o.classList.add("inRange"),y.weekNumbers&&1===y.config.showMonths&&"prevMonthDay"!==e&&n%7==6&&y.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+y.config.getWeek(t)+"</span>"),be("onDayCreate",o),o}function V(e){e.focus(),"range"===y.config.mode&&oe(e)}function H(e){for(var t=e>0?0:y.config.showMonths-1,i=e>0?y.config.showMonths:-1,n=t;n!=i;n+=e)for(var r=y.daysContainer.children[n],o=e>0?0:r.children.length-1,s=e>0?r.children.length:-1,a=o;a!=s;a+=e){var l=r.children[a];if(-1===l.className.indexOf("hidden")&&te(l.dateObj))return l}}function U(e,t){var i=E(),n=ie(i||document.body),r=void 0!==e?e:n?i:void 0!==y.selectedDateElem&&ie(y.selectedDateElem)?y.selectedDateElem:void 0!==y.todayDateElem&&ie(y.todayDateElem)?y.todayDateElem:H(t>0?1:-1);void 0===r?y._input.focus():n?function(e,t){for(var i=-1===e.className.indexOf("Month")?e.dateObj.getMonth():y.currentMonth,n=t>0?y.config.showMonths:-1,r=t>0?1:-1,o=i-y.currentMonth;o!=n;o+=r)for(var s=y.daysContainer.children[o],a=i-y.currentMonth===o?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,c=a;c>=0&&c<l&&c!=(t>0?l:-1);c+=r){var u=s.children[c];if(-1===u.className.indexOf("hidden")&&te(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return V(u)}y.changeMonth(r),U(H(r),0)}(r,t):V(r)}function W(e,t){for(var i=(new Date(e,t,1).getDay()-y.l10n.firstDayOfWeek+7)%7,n=y.utils.getDaysInMonth((t-1+12)%12,e),r=y.utils.getDaysInMonth(t,e),o=window.document.createDocumentFragment(),s=y.config.showMonths>1,a=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",c=n+1-i,h=0;c<=n;c++,h++)o.appendChild(z("flatpickr-day "+a,new Date(e,t-1,c),0,h));for(c=1;c<=r;c++,h++)o.appendChild(z("flatpickr-day",new Date(e,t,c),0,h));for(var d=r+1;d<=42-i&&(1===y.config.showMonths||h%7!=0);d++,h++)o.appendChild(z("flatpickr-day "+l,new Date(e,t+1,d%r),0,h));var f=u("div","dayContainer");return f.appendChild(o),f}function $(){if(void 0!==y.daysContainer){h(y.daysContainer),y.weekNumbers&&h(y.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<y.config.showMonths;t++){var i=new Date(y.currentYear,y.currentMonth,1);i.setMonth(y.currentMonth+t),e.appendChild(W(i.getFullYear(),i.getMonth()))}y.daysContainer.appendChild(e),y.days=y.daysContainer.firstChild,"range"===y.config.mode&&1===y.selectedDates.length&&oe()}}function G(){if(!(y.config.showMonths>1||"dropdown"!==y.config.monthSelectorType)){var e=function(e){return!(void 0!==y.config.minDate&&y.currentYear===y.config.minDate.getFullYear()&&e<y.config.minDate.getMonth())&&!(void 0!==y.config.maxDate&&y.currentYear===y.config.maxDate.getFullYear()&&e>y.config.maxDate.getMonth())};y.monthsDropdownContainer.tabIndex=-1,y.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var i=u("option","flatpickr-monthDropdown-month");i.value=new Date(y.currentYear,t).getMonth().toString(),i.textContent=g(t,y.config.shorthandCurrentMonth,y.l10n),i.tabIndex=-1,y.currentMonth===t&&(i.selected=!0),y.monthsDropdownContainer.appendChild(i)}}}function q(){var e,t=u("div","flatpickr-month"),i=window.document.createDocumentFragment();y.config.showMonths>1||"static"===y.config.monthSelectorType?e=u("span","cur-month"):(y.monthsDropdownContainer=u("select","flatpickr-monthDropdown-months"),y.monthsDropdownContainer.setAttribute("aria-label",y.l10n.monthAriaLabel),R(y.monthsDropdownContainer,"change",function(e){var t=p(e),i=parseInt(t.value,10);y.changeMonth(i-y.currentMonth),be("onMonthChange")}),G(),e=y.monthsDropdownContainer);var n=f("cur-year",{tabindex:"-1"}),r=n.getElementsByTagName("input")[0];r.setAttribute("aria-label",y.l10n.yearAriaLabel),y.config.minDate&&r.setAttribute("min",y.config.minDate.getFullYear().toString()),y.config.maxDate&&(r.setAttribute("max",y.config.maxDate.getFullYear().toString()),r.disabled=!!y.config.minDate&&y.config.minDate.getFullYear()===y.config.maxDate.getFullYear());var o=u("div","flatpickr-current-month");return o.appendChild(e),o.appendChild(n),i.appendChild(o),t.appendChild(i),{container:t,yearElement:r,monthElement:e}}function Y(){h(y.monthNav),y.monthNav.appendChild(y.prevMonthNav),y.config.showMonths&&(y.yearElements=[],y.monthElements=[]);for(var e=y.config.showMonths;e--;){var t=q();y.yearElements.push(t.yearElement),y.monthElements.push(t.monthElement),y.monthNav.appendChild(t.container)}y.monthNav.appendChild(y.nextMonthNav)}function Z(){y.weekdayContainer?h(y.weekdayContainer):y.weekdayContainer=u("div","flatpickr-weekdays");for(var e=y.config.showMonths;e--;){var t=u("div","flatpickr-weekdaycontainer");y.weekdayContainer.appendChild(t)}return X(),y.weekdayContainer}function X(){if(y.weekdayContainer){var e=y.l10n.firstDayOfWeek,i=t(y.l10n.weekdays.shorthand);e>0&&e<i.length&&(i=t(i.splice(e,i.length),i.splice(0,e)));for(var n=y.config.showMonths;n--;)y.weekdayContainer.children[n].innerHTML="\n <span class='flatpickr-weekday'>\n "+i.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function K(e,t){void 0===t&&(t=!0);var i=t?e:e-y.currentMonth;i<0&&!0===y._hidePrevMonthArrow||i>0&&!0===y._hideNextMonthArrow||(y.currentMonth+=i,(y.currentMonth<0||y.currentMonth>11)&&(y.currentYear+=y.currentMonth>11?1:-1,y.currentMonth=(y.currentMonth+12)%12,be("onYearChange"),G()),$(),be("onMonthChange"),_e())}function J(e){return y.calendarContainer.contains(e)}function Q(e){if(y.isOpen&&!y.config.inline){var t=p(e),i=J(t),n=!(t===y.input||t===y.altInput||y.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(y.input)||~e.path.indexOf(y.altInput)))&&!i&&!J(e.relatedTarget),r=!y.config.ignoredFocusElements.some(function(e){return e.contains(t)});n&&r&&(y.config.allowInput&&y.setDate(y._input.value,!1,y.config.altInput?y.config.altFormat:y.config.dateFormat),void 0!==y.timeContainer&&void 0!==y.minuteElement&&void 0!==y.hourElement&&""!==y.input.value&&void 0!==y.input.value&&M(),y.close(),y.config&&"range"===y.config.mode&&1===y.selectedDates.length&&y.clear(!1))}}function ee(e){if(!(!e||y.config.minDate&&e<y.config.minDate.getFullYear()||y.config.maxDate&&e>y.config.maxDate.getFullYear())){var t=e,i=y.currentYear!==t;y.currentYear=t||y.currentYear,y.config.maxDate&&y.currentYear===y.config.maxDate.getFullYear()?y.currentMonth=Math.min(y.config.maxDate.getMonth(),y.currentMonth):y.config.minDate&&y.currentYear===y.config.minDate.getFullYear()&&(y.currentMonth=Math.max(y.config.minDate.getMonth(),y.currentMonth)),i&&(y.redraw(),be("onYearChange"),G())}}function te(e,t){var i;void 0===t&&(t=!0);var n=y.parseDate(e,void 0,t);if(y.config.minDate&&n&&k(n,y.config.minDate,void 0!==t?t:!y.minDateHasTime)<0||y.config.maxDate&&n&&k(n,y.config.maxDate,void 0!==t?t:!y.maxDateHasTime)>0)return!1;if(!y.config.enable&&0===y.config.disable.length)return!0;if(void 0===n)return!1;for(var r=!!y.config.enable,o=null!==(i=y.config.enable)&&void 0!==i?i:y.config.disable,s=0,a=void 0;s<o.length;s++){if("function"==typeof(a=o[s])&&a(n))return r;if(a instanceof Date&&void 0!==n&&a.getTime()===n.getTime())return r;if("string"==typeof a){var l=y.parseDate(a,void 0,!0);return l&&l.getTime()===n.getTime()?r:!r}if("object"==typeof a&&void 0!==n&&a.from&&a.to&&n.getTime()>=a.from.getTime()&&n.getTime()<=a.to.getTime())return r}return!r}function ie(e){return void 0!==y.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&y.daysContainer.contains(e))}function ne(e){var t=e.target===y._input,i=y._input.value.trimEnd()!==ke();!t||!i||e.relatedTarget&&J(e.relatedTarget)||y.setDate(y._input.value,!0,e.target===y.altInput?y.config.altFormat:y.config.dateFormat)}function re(e){var t=p(e),i=y.config.wrap?m.contains(t):t===y._input,n=y.config.allowInput,r=y.isOpen&&(!n||!i),o=y.config.inline&&i&&!n;if(13===e.keyCode&&i){if(n)return y.setDate(y._input.value,!0,t===y.altInput?y.config.altFormat:y.config.dateFormat),y.close(),t.blur();y.open()}else if(J(t)||r||o){var s=!!y.timeContainer&&y.timeContainer.contains(t);switch(e.keyCode){case 13:s?(e.preventDefault(),M(),de()):fe(e);break;case 27:e.preventDefault(),de();break;case 8:case 46:i&&!y.config.allowInput&&(e.preventDefault(),y.clear());break;case 37:case 39:if(s||i)y.hourElement&&y.hourElement.focus();else{e.preventDefault();var a=E();if(void 0!==y.daysContainer&&(!1===n||a&&ie(a))){var l=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),K(l),U(H(1),0)):U(void 0,l)}}break;case 38:case 40:e.preventDefault();var c=40===e.keyCode?1:-1;y.daysContainer&&void 0!==t.$i||t===y.input||t===y.altInput?e.ctrlKey?(e.stopPropagation(),ee(y.currentYear-c),U(H(1),0)):s||U(void 0,7*c):t===y.currentYearElement?ee(y.currentYear-c):y.config.enableTime&&(!s&&y.hourElement&&y.hourElement.focus(),M(e),y._debouncedChange());break;case 9:if(s){var u=[y.hourElement,y.minuteElement,y.secondElement,y.amPM].concat(y.pluginElements).filter(function(e){return e}),h=u.indexOf(t);if(-1!==h){var d=u[h+(e.shiftKey?-1:1)];e.preventDefault(),(d||y._input).focus()}}else!y.config.noCalendar&&y.daysContainer&&y.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),y._input.focus())}}if(void 0!==y.amPM&&t===y.amPM)switch(e.key){case y.l10n.amPM[0].charAt(0):case y.l10n.amPM[0].charAt(0).toLowerCase():y.amPM.textContent=y.l10n.amPM[0],P(),xe();break;case y.l10n.amPM[1].charAt(0):case y.l10n.amPM[1].charAt(0).toLowerCase():y.amPM.textContent=y.l10n.amPM[1],P(),xe()}(i||J(t))&&be("onKeyDown",e)}function oe(e,t){if(void 0===t&&(t="flatpickr-day"),1===y.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var i=e?e.dateObj.getTime():y.days.firstElementChild.dateObj.getTime(),n=y.parseDate(y.selectedDates[0],void 0,!0).getTime(),r=Math.min(i,y.selectedDates[0].getTime()),o=Math.max(i,y.selectedDates[0].getTime()),s=!1,a=0,l=0,c=r;c<o;c+=C)te(new Date(c),!0)||(s=s||c>r&&c<o,c<n&&(!a||c>a)?a=c:c>n&&(!l||c<l)&&(l=c));Array.from(y.rContainer.querySelectorAll("*:nth-child(-n+"+y.config.showMonths+") >
51 ."+t)).forEach(function(t){var r,o,c,u=t.dateObj.getTime(),h=a>0&&u<a||l>0&&u>l;if(h)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(e){t.classList.remove(e)});s&&!h||(["startRange","inRange","endRange","notAllowed"].forEach(function(e){t.classList.remove(e)}),void 0!==e&&(e.classList.add(i<=y.selectedDates[0].getTime()?"startRange":"endRange"),n<i&&u===n?t.classList.add("startRange"):n>i&&u===n&&t.classList.add("endRange"),u>=a&&(0===l||u<=l)&&(o=n,c=i,(r=u)>Math.min(o,c)&&r<Math.max(o,c))&&t.classList.add("inRange")))})}}function se(){!y.isOpen||y.config.static||y.config.inline||ue()}function ae(e){return function(t){var i=y.config["_"+e+"Date"]=y.parseDate(t,y.config.dateFormat),n=y.config["_"+("min"===e?"max":"min")+"Date"];void 0!==i&&(y["min"===e?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0),y.selectedDates&&(y.selectedDates=y.selectedDates.filter(function(e){return te(e)}),y.selectedDates.length||"min"!==e||D(i),xe()),y.daysContainer&&(he(),void 0!==i?y.currentYearElement[e]=i.getFullYear().toString():y.currentYearElement.removeAttribute(e),y.currentYearElement.disabled=!!n&&void 0!==i&&n.getFullYear()===i.getFullYear())}}function le(){return y.config.wrap?m.querySelector("[data-input]"):m}function ce(){"object"!=typeof y.config.locale&&void 0===A.l10ns[y.config.locale]&&y.config.errorHandler(new Error("flatpickr: invalid locale "+y.config.locale)),y.l10n=e(e({},A.l10ns.default),"object"==typeof y.config.locale?y.config.locale:"default"!==y.config.locale?A.l10ns[y.config.locale]:void 0),b.D="("+y.l10n.weekdays.shorthand.join("|")+")",b.l="("+y.l10n.weekdays.longhand.join("|")+")",b.M="("+y.l10n.months.shorthand.join("|")+")",b.F="("+y.l10n.months.longhand.join("|")+")",b.K="("+y.l10n.amPM[0]+"|"+y.l10n.amPM[1]+"|"+y.l10n.amPM[0].toLowerCase()+"|"+y.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},v),JSON.parse(JSON.stringify(m.dataset||{}))).time_24hr&&void 0===A.defaultConfig.time_24hr&&(y.config.time_24hr=y.l10n.time_24hr),y.formatDate=w(y),y.parseDate=_({config:y.config,l10n:y.l10n})}function ue(e){if("function"!=typeof y.config.position){if(void 0!==y.calendarContainer){be("onPreCalendarPosition");var t=e||y._positionElement,i=Array.prototype.reduce.call(y.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),n=y.calendarContainer.offsetWidth,r=y.config.position.split(" "),o=r[0],s=r.length>1?r[1]:null,a=t.getBoundingClientRect(),l=window.innerHeight-a.bottom,u="above"===o||"below"!==o&&l<i&&a.top>i,h=window.pageYOffset+a.top+(u?-i-2:t.offsetHeight+2);if(c(y.calendarContainer,"arrowTop",!u),c(y.calendarContainer,"arrowBottom",u),!y.config.inline){var d=window.pageXOffset+a.left,f=!1,p=!1;"center"===s?(d-=(n-a.width)/2,f=!0):"right"===s&&(d-=n-a.width,p=!0),c(y.calendarContainer,"arrowLeft",!f&&!p),c(y.calendarContainer,"arrowCenter",f),c(y.calendarContainer,"arrowRight",p);var m=window.document.body.offsetWidth-(window.pageXOffset+a.right),g=d+n>window.document.body.offsetWidth,v=m+n>window.document.body.offsetWidth;if(c(y.calendarContainer,"rightMost",g),!y.config.static)if(y.calendarContainer.style.top=h+"px",g)if(v){var b=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var i=document.styleSheets[t];if(i.cssRules){try{i.cssRules}catch(e){continue}e=i;break}}return null!=e?e:(n=document.createElement("style"),document.head.appendChild(n),n.sheet);var n}();if(void 0===b)return;var w=window.document.body.offsetWidth,_=Math.max(0,w/2-n/2),k=b.cssRules.length,x="{left:"+a.left+"px;right:auto;}";c(y.calendarContainer,"rightMost",!1),c(y.calendarContainer,"centerMost",!0),b.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+x,k),y.calendarContainer.style.left=_+"px",y.calendarContainer.style.right="auto"}else y.calendarContainer.style.left="auto",y.calendarContainer.style.right=m+"px";else y.calendarContainer.style.left=d+"px",y.calendarContainer.style.right="auto"}}}else y.config.position(y,e)}function he(){y.config.noCalendar||y.isMobile||(G(),_e(),$())}function de(){y._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(y.close,0):y.close()}function fe(e){e.preventDefault(),e.stopPropagation();var t=d(p(e),function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var i=t,n=y.latestSelectedDateObj=new Date(i.dateObj.getTime()),r=(n.getMonth()<y.currentMonth||n.getMonth()>y.currentMonth+y.config.showMonths-1)&&"range"!==y.config.mode;if(y.selectedDateElem=i,"single"===y.config.mode)y.selectedDates=[n];else if("multiple"===y.config.mode){var o=we(n);o?y.selectedDates.splice(parseInt(o),1):y.selectedDates.push(n)}else"range"===y.config.mode&&(2===y.selectedDates.length&&y.clear(!1,!1),y.latestSelectedDateObj=n,y.selectedDates.push(n),0!==k(n,y.selectedDates[0],!0)&&y.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(P(),r){var s=y.currentYear!==n.getFullYear();y.currentYear=n.getFullYear(),y.currentMonth=n.getMonth(),s&&(be("onYearChange"),G()),be("onMonthChange")}
vendor: 3,295 bytes, line 51
51if(_e(),$(),xe(),r||"range"===y.config.mode||1!==y.config.showMonths?void 0!==y.selectedDateElem&&void 0===y.hourElement&&y.selectedDateElem&&y.selectedDateElem.focus():V(i),void 0!==y.hourElement&&void 0!==y.hourElement&&y.hourElement.focus(),y.config.closeOnSelect){var a="single"===y.config.mode&&!y.config.enableTime,l="range"===y.config.mode&&2===y.selectedDates.length&&!y.config.enableTime;(a||l)&&de()}B()}}y.parseDate=_({config:y.config,l10n:y.l10n}),y._handlers=[],y.pluginElements=[],y.loadedPlugins=[],y._bind=R,y._setHoursFromDate=D,y._positionCalendar=ue,y.changeMonth=K,y.changeYear=ee,y.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);y.input.value="",void 0!==y.altInput&&(y.altInput.value="");void 0!==y.mobileInput&&(y.mobileInput.value="");y.selectedDates=[],y.latestSelectedDateObj=void 0,!0===t&&(y.currentYear=y._initialDate.getFullYear(),y.currentMonth=y._initialDate.getMonth());if(!0===y.config.enableTime){var i=S(y.config);O(i.hours,i.minutes,i.seconds)}y.redraw(),e&&be("onChange")},y.close=function(){y.isOpen=!1,y.isMobile||(void 0!==y.calendarContainer&&y.calendarContainer.classList.remove("open"),void 0!==y._input&&y._input.classList.remove("active"));be("onClose")},y.onMouseOver=oe,y._createElement=u,y.createDay=z,y.destroy=function(){void 0!==y.config&&be("onDestroy");for(var e=y._handlers.length;e--;)y._handlers[e].remove();if(y._handlers=[],y.mobileInput)y.mobileInput.parentNode&&y.mobileInput.parentNode.removeChild(y.mobileInput),y.mobileInput=void 0;else if(y.calendarContainer&&y.calendarContainer.parentNode)if(y.config.static&&y.calendarContainer.parentNode){var t=y.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else y.calendarContainer.parentNode.removeChild(y.calendarContainer);y.altInput&&(y.input.type="text",y.altInput.parentNode&&y.altInput.parentNode.removeChild(y.altInput),delete y.altInput);y.input&&(y.input.type=y.input._type,y.input.classList.remove("flatpickr-input"),y.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete y[e]}catch(e){}})},y.isEnabled=te,y.jumpToDate=N,y.updateValue=xe,y.open=function(e,t){void 0===t&&(t=y._positionElement);if(!0===y.isMobile){if(e){e.preventDefault();var i=p(e);i&&i.blur()}return void 0!==y.mobileInput&&(y.mobileInput.focus(),y.mobileInput.click()),void be("onOpen")}if(y._input.disabled||y.config.inline)return;var n=y.isOpen;y.isOpen=!0,n||(y.calendarContainer.classList.add("open"),y._input.classList.add("active"),be("onOpen"),ue(t));!0===y.config.enableTime&&!0===y.config.noCalendar&&(!1!==y.config.allowInput||void 0!==e&&y.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return y.hourElement.select()},50))}
vendor: 5,399 bytes, line 51
51,y.redraw=he,y.set=function(e,t){if(null!==e&&"object"==typeof e)for(var n in Object.assign(y.config,e),e)void 0!==pe[n]&&pe[n].forEach(function(e){return e()});else y.config[e]=t,void 0!==pe[e]?pe[e].forEach(function(e){return e()}):i.indexOf(e)>-1&&(y.config[e]=l(t));y.redraw(),xe(!0)},y.setDate=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=y.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return y.clear(t);me(e,i),y.latestSelectedDateObj=y.selectedDates[y.selectedDates.length-1],y.redraw(),N(void 0,t),D(),0===y.selectedDates.length&&y.clear(!1);xe(t),t&&be("onChange")},y.toggle=function(e){if(!0===y.isOpen)return y.close();y.open(e)};var pe={locale:[ce,X],showMonths:[Y,I,Z],minDate:[N],maxDate:[N],positionElement:[ve],clickOpens:[function(){!0===y.config.clickOpens?(R(y._input,"focus",y.open),R(y._input,"click",y.open)):(y._input.removeEventListener("focus",y.open),y._input.removeEventListener("click",y.open))}]};function me(e,t){var i=[];if(e instanceof Array)i=e.map(function(e){return y.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)i=[y.parseDate(e,t)];else if("string"==typeof e)switch(y.config.mode){case"single":case"time":i=[y.parseDate(e,t)];break;case"multiple":i=e.split(y.config.conjunction).map(function(e){return y.parseDate(e,t)});break;case"range":i=e.split(y.l10n.rangeSeparator).map(function(e){return y.parseDate(e,t)})}else y.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));y.selectedDates=y.config.allowInvalidPreload?i:i.filter(function(e){return e instanceof Date&&te(e,!1)}),"range"===y.config.mode&&y.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ge(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?y.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:y.parseDate(e.from,void 0),to:y.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function ve(){y._positionElement=y.config.positionElement||y._input}function be(e,t){if(void 0!==y.config){var i=y.config[e];if(void 0!==i&&i.length>0)for(var n=0;i[n]&&n<i.length;n++)i[n](y.selectedDates,y.input.value,y,t);"onChange"===e&&(y.input.dispatchEvent(ye("change")),y.input.dispatchEvent(ye("input")))}}function ye(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function we(e){for(var t=0;t<y.selectedDates.length;t++){var i=y.selectedDates[t];if(i instanceof Date&&0===k(i,e))return""+t}return!1}function _e(){y.config.noCalendar||y.isMobile||!y.monthNav||(y.yearElements.forEach(function(e,t){var i=new Date(y.currentYear,y.currentMonth,1);i.setMonth(y.currentMonth+t),y.config.showMonths>1||"static"===y.config.monthSelectorType?y.monthElements[t].textContent=g(i.getMonth(),y.config.shorthandCurrentMonth,y.l10n)+" ":y.monthsDropdownContainer.value=i.getMonth().toString(),e.value=i.getFullYear().toString()}),y._hidePrevMonthArrow=void 0!==y.config.minDate&&(y.currentYear===y.config.minDate.getFullYear()?y.currentMonth<=y.config.minDate.getMonth():y.currentYear<y.config.minDate.getFullYear()),y._hideNextMonthArrow=void 0!==y.config.maxDate&&(y.currentYear===y.config.maxDate.getFullYear()?y.currentMonth+1>y.config.maxDate.getMonth():y.currentYear>y.config.maxDate.getFullYear()))}function ke(e){var t=e||(y.config.altInput?y.config.altFormat:y.config.dateFormat);return y.selectedDates.map(function(e){return y.formatDate(e,t)}).filter(function(e,t,i){return"range"!==y.config.mode||y.config.enableTime||i.indexOf(e)===t}).join("range"!==y.config.mode?y.config.conjunction:y.l10n.rangeSeparator)}function xe(e){void 0===e&&(e=!0),void 0!==y.mobileInput&&y.mobileFormatStr&&(y.mobileInput.value=void 0!==y.latestSelectedDateObj?y.formatDate(y.latestSelectedDateObj,y.mobileFormatStr):""),y.input.value=ke(y.config.dateFormat),void 0!==y.altInput&&(y.altInput.value=ke(y.config.altFormat)),!1!==e&&be("onValueUpdate")}function Ce(e){var t=p(e),i=y.prevMonthNav.contains(t),n=y.nextMonthNav.contains(t);i||n?K(i?-1:1):y.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?y.changeYear(y.currentYear+1):t.classList.contains("arrowDown")&&y.changeYear(y.currentYear-1)}return function(){y.element=y.input=m,y.isOpen=!1,function(){var t=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],r=e(e({},JSON.parse(JSON.stringify(m.dataset||{}))),v),o={};y.config.parseDate=r.parseDate,y.config.formatDate=r.formatDate,Object.defineProperty(y.config,"enable",{get:function(){return y.config._enable},set:function(e){y.config._enable=ge(e)}}),Object.defineProperty(y.config,"disable",{get:function(){return y.config._disable},set:function(e){y.config._disable=ge(e)}});var s="time"===r.mode;if(!r.dateFormat&&(r.enableTime||s)){var a=A.defaultConfig.dateFormat||n.dateFormat;o.dateFormat=r.noCalendar||s?"H:i"+(r.enableSeconds?":S":""):a+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||s)&&!r.altFormat){var c=A.defaultConfig.altFormat||n.altFormat;o.altFormat=r.noCalendar||s?"h:i"+(r.enableSeconds?":S K":" K"):c+" h:i"+(r.enableSeconds?":S":"")+" K"}Object.defineProperty(y.config,"minDate",{get:function(){return y.config._minDate},set:ae("min")}),Object.defineProperty(y.config,"maxDate",{get:function(){return y.config._maxDate},set:ae("max")}
vendor: 12,850 bytes, line 51
51);var u=function(e){return function(t){y.config["min"===e?"_minTime":"_maxTime"]=y.parseDate(t,"H:i:S")}};Object.defineProperty(y.config,"minTime",{get:function(){return y.config._minTime},set:u("min")}),Object.defineProperty(y.config,"maxTime",{get:function(){return y.config._maxTime},set:u("max")}),"time"===r.mode&&(y.config.noCalendar=!0,y.config.enableTime=!0);Object.assign(y.config,o,r);for(var h=0;h<t.length;h++)y.config[t[h]]=!0===y.config[t[h]]||"true"===y.config[t[h]];i.filter(function(e){return void 0!==y.config[e]}).forEach(function(e){y.config[e]=l(y.config[e]||[]).map(T)}),y.isMobile=!y.config.disableMobile&&!y.config.inline&&"single"===y.config.mode&&!y.config.disable.length&&!y.config.enable&&!y.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(h=0;h<y.config.plugins.length;h++){var d=y.config.plugins[h](y)||{};for(var f in d)i.indexOf(f)>-1?y.config[f]=l(d[f]).map(T).concat(y.config[f]):void 0===r[f]&&(y.config[f]=d[f])}r.altInputClass||(y.config.altInputClass=le().className+" "+y.config.altInputClass);be("onParseConfig")}(),ce(),function(){if(y.input=le(),!y.input)return void y.config.errorHandler(new Error("Invalid input element specified"));y.input._type=y.input.type,y.input.type="text",y.input.classList.add("flatpickr-input"),y._input=y.input,y.config.altInput&&(y.altInput=u(y.input.nodeName,y.config.altInputClass),y._input=y.altInput,y.altInput.placeholder=y.input.placeholder,y.altInput.disabled=y.input.disabled,y.altInput.required=y.input.required,y.altInput.tabIndex=y.input.tabIndex,y.altInput.type="text",y.input.setAttribute("type","hidden"),!y.config.static&&y.input.parentNode&&y.input.parentNode.insertBefore(y.altInput,y.input.nextSibling));y.config.allowInput||y._input.setAttribute("readonly","readonly");ve()}(),function(){y.selectedDates=[],y.now=y.parseDate(y.config.now)||new Date;var e=y.config.defaultDate||("INPUT"!==y.input.nodeName&&"TEXTAREA"!==y.input.nodeName||!y.input.placeholder||y.input.value!==y.input.placeholder?y.input.value:null);e&&me(e,y.config.dateFormat);y._initialDate=y.selectedDates.length>0?y.selectedDates[0]:y.config.minDate&&y.config.minDate.getTime()>y.now.getTime()?y.config.minDate:y.config.maxDate&&y.config.maxDate.getTime()<y.now.getTime()?y.config.maxDate:y.now,y.currentYear=y._initialDate.getFullYear(),y.currentMonth=y._initialDate.getMonth(),y.selectedDates.length>0&&(y.latestSelectedDateObj=y.selectedDates[0]);void 0!==y.config.minTime&&(y.config.minTime=y.parseDate(y.config.minTime,"H:i"));void 0!==y.config.maxTime&&(y.config.maxTime=y.parseDate(y.config.maxTime,"H:i"));y.minDateHasTime=!!y.config.minDate&&(y.config.minDate.getHours()>0||y.config.minDate.getMinutes()>0||y.config.minDate.getSeconds()>0),y.maxDateHasTime=!!y.config.maxDate&&(y.config.maxDate.getHours()>0||y.config.maxDate.getMinutes()>0||y.config.maxDate.getSeconds()>0)}(),y.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=y.currentMonth),void 0===t&&(t=y.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:y.l10n.daysInMonth[e]}},y.isMobile||function(){var e=window.document.createDocumentFragment();if(y.calendarContainer=u("div","flatpickr-calendar"),y.calendarContainer.tabIndex=-1,!y.config.noCalendar){if(e.appendChild((y.monthNav=u("div","flatpickr-months"),y.yearElements=[],y.monthElements=[],y.prevMonthNav=u("span","flatpickr-prev-month"),y.prevMonthNav.innerHTML=y.config.prevArrow,y.nextMonthNav=u("span","flatpickr-next-month"),y.nextMonthNav.innerHTML=y.config.nextArrow,Y(),Object.defineProperty(y,"_hidePrevMonthArrow",{get:function(){return y.__hidePrevMonthArrow},set:function(e){y.__hidePrevMonthArrow!==e&&(c(y.prevMonthNav,"flatpickr-disabled",e),y.__hidePrevMonthArrow=e)}}),Object.defineProperty(y,"_hideNextMonthArrow",{get:function(){return y.__hideNextMonthArrow},set:function(e){y.__hideNextMonthArrow!==e&&(c(y.nextMonthNav,"flatpickr-disabled",e),y.__hideNextMonthArrow=e)}}),y.currentYearElement=y.yearElements[0],_e(),y.monthNav)),y.innerContainer=u("div","flatpickr-innerContainer"),y.config.weekNumbers){var t=function(){y.calendarContainer.classList.add("hasWeeks");var e=u("div","flatpickr-weekwrapper");e.appendChild(u("span","flatpickr-weekday",y.l10n.weekAbbreviation));var t=u("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),i=t.weekWrapper,n=t.weekNumbers;y.innerContainer.appendChild(i),y.weekNumbers=n,y.weekWrapper=i}y.rContainer=u("div","flatpickr-rContainer"),y.rContainer.appendChild(Z()),y.daysContainer||(y.daysContainer=u("div","flatpickr-days"),y.daysContainer.tabIndex=-1),$(),y.rContainer.appendChild(y.daysContainer),y.innerContainer.appendChild(y.rContainer),e.appendChild(y.innerContainer)}y.config.enableTime&&e.appendChild(function(){y.calendarContainer.classList.add("hasTime"),y.config.noCalendar&&y.calendarContainer.classList.add("noCalendar");var e=S(y.config);y.timeContainer=u("div","flatpickr-time"),y.timeContainer.tabIndex=-1;var t=u("span","flatpickr-time-separator",":"),i=f("flatpickr-hour",{"aria-label":y.l10n.hourAriaLabel});y.hourElement=i.getElementsByTagName("input")[0];var n=f("flatpickr-minute",{"aria-label":y.l10n.minuteAriaLabel});y.minuteElement=n.getElementsByTagName("input")[0],y.hourElement.tabIndex=y.minuteElement.tabIndex=-1,y.hourElement.value=o(y.latestSelectedDateObj?y.latestSelectedDateObj.getHours():y.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),y.minuteElement.value=o(y.latestSelectedDateObj?y.latestSelectedDateObj.getMinutes():e.minutes),y.hourElement.setAttribute("step",y.config.hourIncrement.toString()),y.minuteElement.setAttribute("step",y.config.minuteIncrement.toString()),y.hourElement.setAttribute("min",y.config.time_24hr?"0":"1"),y.hourElement.setAttribute("max",y.config.time_24hr?"23":"12"),y.hourElement.setAttribute("maxlength","2"),y.minuteElement.setAttribute("min","0"),y.minuteElement.setAttribute("max","59"),y.minuteElement.setAttribute("maxlength","2"),y.timeContainer.appendChild(i),y.timeContainer.appendChild(t),y.timeContainer.appendChild(n),y.config.time_24hr&&y.timeContainer.classList.add("time24hr");if(y.config.enableSeconds){y.timeContainer.classList.add("hasSeconds");var r=f("flatpickr-second");y.secondElement=r.getElementsByTagName("input")[0],y.secondElement.value=o(y.latestSelectedDateObj?y.latestSelectedDateObj.getSeconds():e.seconds),y.secondElement.setAttribute("step",y.minuteElement.getAttribute("step")),y.secondElement.setAttribute("min","0"),y.secondElement.setAttribute("max","59"),y.secondElement.setAttribute("maxlength","2"),y.timeContainer.appendChild(u("span","flatpickr-time-separator",":")),y.timeContainer.appendChild(r)}y.config.time_24hr||(y.amPM=u("span","flatpickr-am-pm",y.l10n.amPM[s((y.latestSelectedDateObj?y.hourElement.value:y.config.defaultHour)>11)]),y.amPM.title=y.l10n.toggleTitle,y.amPM.tabIndex=-1,y.timeContainer.appendChild(y.amPM));return y.timeContainer}());c(y.calendarContainer,"rangeMode","range"===y.config.mode),c(y.calendarContainer,"animate",!0===y.config.animate),c(y.calendarContainer,"multiMonth",y.config.showMonths>1),y.calendarContainer.appendChild(e);var r=void 0!==y.config.appendTo&&void 0!==y.config.appendTo.nodeType;if((y.config.inline||y.config.static)&&(y.calendarContainer.classList.add(y.config.inline?"inline":"static"),y.config.inline&&(!r&&y.element.parentNode?y.element.parentNode.insertBefore(y.calendarContainer,y._input.nextSibling):void 0!==y.config.appendTo&&y.config.appendTo.appendChild(y.calendarContainer)),y.config.static)){var a=u("div","flatpickr-wrapper");y.element.parentNode&&y.element.parentNode.insertBefore(a,y.element),a.appendChild(y.element),y.altInput&&a.appendChild(y.altInput),a.appendChild(y.calendarContainer)}y.config.static||y.config.inline||(void 0!==y.config.appendTo?y.config.appendTo:window.document.body).appendChild(y.calendarContainer)}(),function(){y.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(y.element.querySelectorAll("[data-"+e+"]"),function(t){return R(t,"click",y[e])})});if(y.isMobile)return void function(){var e=y.config.enableTime?y.config.noCalendar?"time":"datetime-local":"date";y.mobileInput=u("input",y.input.className+" flatpickr-mobile"),y.mobileInput.tabIndex=1,y.mobileInput.type=e,y.mobileInput.disabled=y.input.disabled,y.mobileInput.required=y.input.required,y.mobileInput.placeholder=y.input.placeholder,y.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",y.selectedDates.length>0&&(y.mobileInput.defaultValue=y.mobileInput.value=y.formatDate(y.selectedDates[0],y.mobileFormatStr));y.config.minDate&&(y.mobileInput.min=y.formatDate(y.config.minDate,"Y-m-d"));y.config.maxDate&&(y.mobileInput.max=y.formatDate(y.config.maxDate,"Y-m-d"));y.input.getAttribute("step")&&(y.mobileInput.step=String(y.input.getAttribute("step")));y.input.type="hidden",void 0!==y.altInput&&(y.altInput.type="hidden");try{y.input.parentNode&&y.input.parentNode.insertBefore(y.mobileInput,y.input.nextSibling)}catch(e){}R(y.mobileInput,"change",function(e){y.setDate(p(e).value,!1,y.mobileFormatStr),be("onChange"),be("onClose")})}();var e=a(se,50);y._debouncedChange=a(B,300),y.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&R(y.daysContainer,"mouseover",function(e){"range"===y.config.mode&&oe(p(e))});R(y._input,"keydown",re),void 0!==y.calendarContainer&&R(y.calendarContainer,"keydown",re);y.config.inline||y.config.static||R(window,"resize",e);void 0!==window.ontouchstart?R(window.document,"touchstart",Q):R(window.document,"mousedown",Q);R(window.document,"focus",Q,{capture:!0}),!0===y.config.clickOpens&&(R(y._input,"focus",y.open),R(y._input,"click",y.open));void 0!==y.daysContainer&&(R(y.monthNav,"click",Ce),R(y.monthNav,["keyup","increment"],L),R(y.daysContainer,"click",fe));if(void 0!==y.timeContainer&&void 0!==y.minuteElement&&void 0!==y.hourElement){var t=function(e){return p(e).select()};R(y.timeContainer,["increment"],M),R(y.timeContainer,"blur",M,{capture:!0}),R(y.timeContainer,"click",j),R([y.hourElement,y.minuteElement],["focus","click"],t),void 0!==y.secondElement&&R(y.secondElement,"focus",function(){return y.secondElement&&y.secondElement.select()}),void 0!==y.amPM&&R(y.amPM,"click",function(e){M(e)})}y.config.allowInput&&R(y._input,"blur",ne)}(),(y.selectedDates.length||y.config.noCalendar)&&(y.config.enableTime&&D(y.config.noCalendar?y.latestSelectedDateObj:void 0),xe(!1)),I();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!y.isMobile&&t&&ue(),be("onReady")}(),y}function T(e,t){for(var i=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),n=[],r=0;r<i.length;r++){var o=i[r];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=E(o,t||{}),n.push(o._flatpickr)}catch(e){console.error(e)}}return 1===n.length?n[0]:n}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return T(this,e)},HTMLElement.prototype.flatpickr=function(e){return T([this],e)});var A=function(e,t){return"string"==typeof e?T(window.document.querySelectorAll(e),t):e instanceof Node?T([e],t):T(e,t)};return A.defaultConfig={},A.l10ns={en:e({},r),default:e({},r)},A.localize=function(t){A.l10ns.default=e(e({},A.l10ns.default),t)},A.setDefaults=function(t){A.defaultConfig=e(e({},A.defaultConfig),t)},A.parseDate=_({}),A.formatDate=w({}),A.compareDates=k,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return T(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=A),A})},{}],214:[function(e,t,i){!function(e,n){"object"==typeof i&&void 0!==t?n(i):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).cs={})}(this,function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},i={weekdays:{shorthand:["Ne","Po","Ãt","St","Ät","Pá","So"],longhand:["NedÄle","PondÄlÃ","Ãterý","StÅeda","Ätvrtek","Pátek","Sobota"]},months:{shorthand:["Led","Ãn","BÅe","Dub","KvÄ","Äer","Ävc","Srp","ZáÅ","ÅÃj","Lis","Pro"],longhand:["Leden","Ãnor","BÅezen","Duben","KvÄten","Äerven","Äervenec","Srpen","ZáÅÃ","ÅÃjen","Listopad","Prosinec"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" do ",weekAbbreviation:"Týd.",scrollTitle:"Rolujte pro zmÄnu",toggleTitle:"PÅepnout dopoledne/odpoledne",amPM:["dop.","odp."],yearAriaLabel:"Rok",time_24hr:!0};t.l10ns.cs=i;var n=t.l10ns;
vendor: 5,915 bytes, line 51
51e.Czech=i,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})})},{}],215:[function(e,t,i){var n,r;n=this,r=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}var r=Date.now();function o(){var e={},t=!0,i=0,n=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],i++);for(var r=function(i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t&&"[object Object]"===Object.prototype.toString.call(i[n])?e[n]=o(!0,e[n],i[n]):e[n]=i[n])};i<n;i++)r(arguments[i]);return e}function s(e,t){if((C(e)||e===window||e===document)&&(e=[e]),E(e)||T(e)||(e=[e]),0!=M(e))if(E(e)&&!T(e))for(var i=e.length,n=0;n<i&&!1!==t.call(e[n],e[n],n,e);n++);else if(T(e))for(var r in e)if(I(e,r)&&!1===t.call(e[r],e[r],r,e))break}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[r]=e[r]||[],o={all:n,evt:null,found:null};return t&&i&&M(n)>0&&s(n,function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return o.found=!0,o.evt=n,!1}),o}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,r=t.avoidDuplicate,o=void 0===r||r,l=t.once,c=void 0!==l&&l,u=t.useCapture,h=void 0!==u&&u,d=arguments.length>2?arguments[2]:void 0,f=i||[];function p(e){k(n)&&n.call(d,e,this),c&&p.destroy()}return x(f)&&(f=document.querySelectorAll(f)),p.destroy=function(){s(f,function(t){var i=a(t,e,p);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,p,h)})},s(f,function(t){var i=a(t,e,p);(t.addEventListener&&o&&!i.found||!o)&&(t.addEventListener(e,p,h),i.all.push({eventName:e,fn:p}))}),p}function c(e,t){s(t.split(" "),function(t){return e.classList.add(t)})}function u(e,t){s(t.split(" "),function(t){return e.classList.remove(t)})}function h(e,t){return e.classList.contains(t)}function d(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if("function"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||""===t)return!1;if("none"===t)return k(i)&&i(),!1;var n=function(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}(),r=t.split(" ");s(r,function(t){c(e,"g"+t)}),l(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){s(r,function(e){u(t,"g"+e)}),k(i)&&i()}})}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===t)return e.style.webkitTransform="",e.style.MozTransform="",e.style.msTransform="",e.style.OTransform="",e.style.transform="",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function m(e){e.style.display="block"}function g(e){e.style.display="none"}function v(e){var t=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function b(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function y(e,t,i,n){if(e())t();else{var r;i||(i=100);var o=setInterval(function(){e()&&(clearInterval(o),r&&clearTimeout(r),t())},i);n&&(r=setTimeout(function(){clearInterval(o)},n))}}function w(e,t,i){if(A(e))console.error("Inject assets error");else if(k(t)&&(i=t,t=!1),x(t)&&t in window)k(i)&&i();else{var n;if(-1!==e.indexOf(".css")){if((n=document.querySelectorAll('link[href="'+e+'"]'))&&n.length>0)return void(k(i)&&i());var r=document.getElementsByTagName("head")[0],o=r.querySelectorAll('link[rel="stylesheet"]'),s=document.createElement("link");return s.rel="stylesheet",s.type="text/css",s.href=e,s.media="all",o?r.insertBefore(s,o[0]):r.appendChild(s),void(k(i)&&i())}if((n=document.querySelectorAll('script[src="'+e+'"]'))&&n.length>0){if(k(i)){if(x(t))return y(function(){return void 0!==window[t]},function(){i()}),!1;i()}}else{var a=document.createElement("script");a.type="text/javascript",a.src=e,a.onload=function(){if(k(i)){if(x(t))return y(function(){return void 0!==window[t]},function(){i()}),!1;i()}},document.body.appendChild(a)}}}function _(){return"navigator"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function k(e){return"function"==typeof e}function x(e){return"string"==typeof e}function C(e){return!(!e||!e.nodeType||1!=e.nodeType)}function S(e){return Array.isArray(e)}function E(e){return e&&e.length&&isFinite(e.length)}function T(t){return"object"===e(t)&&null!=t&&!k(t)&&!S(t)}function A(e){return null==e}function I(e,t){return null!==e&&hasOwnProperty.call(e,t)}function M(e){if(T(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)I(e,i)&&t++;return t}return e.length}function P(e){return!isNaN(parseFloat(e))&&isFinite(e)}function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");if(!t.length)return!1;if(1==t.length)return t[0];"string"==typeof e&&(e=parseInt(e));var i=[];
vendor: 15,879 bytes, line 51
51s(t,function(e){i.push(e.getAttribute("data-taborder"))});var n=Math.max.apply(Math,i.map(function(e){return parseInt(e)})),r=e<0?1:e+1;r>n&&(r="1");var o=i.filter(function(e){return e>=parseInt(r)}),a=o.sort()[0];return document.querySelector('.gbtn[data-taborder="'.concat(a,'"]'))}function O(e){return Math.sqrt(e.x*e.x+e.y*e.y)}var L=function(){function e(i){t(this,e),this.handlers=[],this.el=i}return n(e,[{key:"add",value:function(e){this.handlers.push(e)}},{key:"del",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:"dispatch",value:function(){for(var e=0,t=this.handlers.length;e<t;e++){var i=this.handlers[e];"function"==typeof i&&i.apply(this.el,arguments)}}}]),e}();function R(e,t){var i=new L(e);return i.add(t),i}var B=function(){function e(i,n){t(this,e),this.element="string"==typeof i?document.querySelector(i):i,this.start=this.start.bind(this),this.move=this.move.bind(this),this.end=this.end.bind(this),this.cancel=this.cancel.bind(this),this.element.addEventListener("touchstart",this.start,!1),this.element.addEventListener("touchmove",this.move,!1),this.element.addEventListener("touchend",this.end,!1),this.element.addEventListener("touchcancel",this.cancel,!1),this.preV={x:null,y:null},this.pinchStartLen=null,this.zoom=1,this.isDoubleTap=!1;var r=function(){};this.rotate=R(this.element,n.rotate||r),this.touchStart=R(this.element,n.touchStart||r),this.multipointStart=R(this.element,n.multipointStart||r),this.multipointEnd=R(this.element,n.multipointEnd||r),this.pinch=R(this.element,n.pinch||r),this.swipe=R(this.element,n.swipe||r),this.tap=R(this.element,n.tap||r),this.doubleTap=R(this.element,n.doubleTap||r),this.longTap=R(this.element,n.longTap||r),this.singleTap=R(this.element,n.singleTap||r),this.pressMove=R(this.element,n.pressMove||r),this.twoFingerPressMove=R(this.element,n.twoFingerPressMove||r),this.touchMove=R(this.element,n.touchMove||r),this.touchEnd=R(this.element,n.touchEnd||r),this.touchCancel=R(this.element,n.touchCancel||r),this.translateContainer=this.element,this._cancelAllHandler=this.cancelAll.bind(this),window.addEventListener("scroll",this._cancelAllHandler),this.delta=null,this.last=null,this.now=null,this.tapTimeout=null,this.singleTapTimeout=null,this.longTapTimeout=null,this.swipeTimeout=null,this.x1=this.x2=this.y1=this.y2=null,this.preTapPosition={x:null,y:null}}return n(e,[{key:"start",value:function(e){if(e.touches)if(e.target&&e.target.nodeName&&["a","button","input"].indexOf(e.target.nodeName.toLowerCase())>=0)console.log("ignore drag for this touched element",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=O(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}},{key:"move",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,r=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var o=e.touches[1].pageX,s=e.touches[1].pageY,a={x:e.touches[1].pageX-n,y:e.touches[1].pageY-r};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=O(a)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=function(e,t){var i=function(e,t){var i=O(e)*O(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}(a,t),this.rotate.dispatch(e,this.element)),t.x=a.x,t.y=a.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+o-this.sx2)/2,e.deltaY=(r-this.y2+s-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=o,this.sy2=s}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=r-this.y2;var l=Math.abs(this.x1-this.x2),c=Math.abs(this.y1-this.y2);(l>10||c>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=r,i>1&&e.preventDefault()}}},{key:"end",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout(function(){t.swipe.dispatch(e,t.element)},0)):(this.tapTimeout=setTimeout(function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)},0),t.isDoubleTap||(t.singleTapTimeout=setTimeout(function(){t.singleTap.dispatch(e,t.element)},250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?"Left":"Right":i-n>0?"Up":"Down"}},{key:"on",value:function(e,t){this[e]&&this[e].add(t)}},{key:"off",value:function(e,t){this[e]&&this[e].del(t)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),e}();function N(e){var t=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=h(e,"gslide-media")?e:e.querySelector(".gslide-media"),r=d(n,".ginner-container"),o=e.querySelector(".gslide-description");i>769&&(n=r),c(n,"greset"),p(n,"translate3d(0, 0, 0)"),l(t,{onElement:n,once:!0,withCallback:function(e,t){u(n,"greset")}}),n.style.opacity="",o&&(o.style.opacity="")}var j=function(){function e(i,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t(this,e),this.img=i,this.slide=n,this.onclose=o,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",function(e){return r.dragStart(e)},!1),this.img.addEventListener("mouseup",function(e){return r.dragEnd(e)},!1),this.img.addEventListener("mousemove",function(e){return r.drag(e)},!1),this.img.addEventListener("click",function(e){return r.slide.classList.contains("dragging-nav")?(r.zoomOut(),!1):r.zoomedIn?void(r.zoomedIn&&!r.dragging&&r.zoomOut()):r.zoomIn()},!1),this.img.setZoomEvents=!0}return n(e,[{key:"zoomIn",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute("data-style",t.getAttribute("style")),t.style.maxWidth=t.naturalWidth+"px",t.style.maxHeight=t.naturalHeight+"px",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(e){e.preventDefault(),this.zoomedIn?("touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout(function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove("dragging")},100)}},{key:"drag",value:function(e){this.active&&(e.preventDefault(),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:"setTranslate",value:function(e,t,i){e.style.transform="translate3d("+t+"px, "+i+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),e}(),F=function(){function e(){var i=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);var r=n.dragEl,o=n.toleranceX,s=void 0===o?40:o,a=n.toleranceY,l=void 0===a?65:a,c=n.slide,u=void 0===c?null:c,h=n.instance,d=void 0===h?null:h;this.el=r,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=s,this.toleranceY=l,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=u,this.instance=d,this.el.addEventListener("mousedown",function(e){return i.dragStart(e)},!1),this.el.addEventListener("mouseup",function(e){return i.dragEnd(e)},!1),this.el.addEventListener("mousemove",function(e){return i.drag(e)},!1)}return n(e,[{key:"dragStart",value:function(e){if(this.slide.classList.contains("zoomed"))this.active=!1;else{"touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains("nodrag")||d(e.target,".nodrag")||-1!==["input","select","textarea","button","a"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||"img"!==t&&d(e.target,".gslide-inline"))&&(this.active=!0,this.el.classList.add("dragging"),this.dragContainer=d(e.target,".ginner-container")))}}},{key:"dragEnd",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,"right"==this.doSlideChange&&this.instance.prevSlide(),"left"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout(function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove("dragging"),t.slide.classList.remove("dragging-nav"),t.dragContainer.style.transform="",t.dragContainer.style.transition=""},100)}},{key:"drag",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add("dragging-nav"),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||"x"==this.lastDirection)){this.yOffset=0,this.lastDirection="x",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),"right"==n&&this.instance.prevSlide(),void("left"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||"y"==this.lastDirection)){this.xOffset=0,this.lastDirection="y",this.setTranslate(this.dragContainer,0,this.currentY);var r=this.shouldClose();return!this.instance.settings.dragAutoSnap&&r&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&r&&this.instance.close())}}}},{key:"shouldChange",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?"right":"left";("left"==t&&this.slide!==this.slide.parentNode.lastChild||"right"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:"shouldClose",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:"setTranslate",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?"all .2s ease":"",e.style.transform="translate3d(".concat(t,"px, ").concat(i,"px, 0)")}}]),e}();function z(e,t,i,n){var r=this,o=e.querySelector(".ginner-container"),s="gvideo"+i,a=e.querySelector(".gslide-media"),l=this.getAllPlayers();c(o,"gvideo-container"),a.insertBefore(v('<div class="gvideo-wrapper"></div>'),a.firstChild);var u=e.querySelector(".gvideo-wrapper");w(this.settings.plyr.css,"Plyr");var h=t.href,d=null==t?void 0:t.videoProvider,f=!1;a.style.maxWidth=t.width,w(this.settings.plyr.js,"Plyr",function(){if(!d&&h.match(/vimeo\.com\/([0-9]*)/)&&(d="vimeo"),!d&&(h.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||h.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||h.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))&&
51(d="youtube"),"local"===d||!d){d="local";var o='<video id="'+s+'" ';o+='style="background:#000; max-width: '.concat(t.width,';" '),o+='preload="metadata" ',o+='x-webkit-airplay="allow" ',o+="playsinline ",o+="controls ",o+='class="gvideo-local">',o+='<source src="'.concat(h,'">'),f=v(o+="</video>")}var a=f||v('<div id="'.concat(s,'" data-plyr-provider="').concat(d,'" data-plyr-embed-id="').concat(h,'"></div>'));c(u,"".concat(d,"-video gvideo")),u.appendChild(a),u.setAttribute("data-id",s),u.setAttribute("data-index",i);var p=I(r.settings.plyr,"config")?r.settings.plyr.config:{},m=new Plyr("#"+s,p);m.on("ready",function(e){l[s]=e.detail.plyr,k(n)&&n()}),y(function(){return e.querySelector("iframe")&&"true"==e.querySelector("iframe").dataset.ready},function(){r.resize(e)}),m.on("enterfullscreen",V),m.on("exitfullscreen",V)})}function V(e){var t=d(e.target,".gslide-media");"enterfullscreen"===e.type&&c(t,"fullscreen"),"exitfullscreen"===e.type&&u(t,"fullscreen")}function H(e,t,i,n){var r,o=this,s=e.querySelector(".gslide-media"),a=!(!I(t,"href")||!t.href)&&t.href.split("#").pop().trim(),u=!(!I(t,"content")||!t.content)&&t.content;if(u&&(x(u)&&(r=v('<div class="ginlined-content">'.concat(u,"</div>
51"))),C(u))){"none"==u.style.display&&(u.style.display="block");var h=document.createElement("div");h.className="ginlined-content",h.appendChild(u),r=h}if(a){var d=document.getElementById(a);if(!d)return!1;var f=d.cloneNode(!0);f.style.height=t.height,f.style.maxWidth=t.width,c(f,"ginlined-content"),r=f}if(!r)return console.error("Unable to append inline slide content",t),!1;s.style.height=t.height,s.style.width=t.width,s.appendChild(r),this.events["inlineclose"+a]=l("click",{onElement:s.querySelectorAll(".gtrigger-close"),withCallback:function(e){e.preventDefault(),o.close()}}),k(n)&&n()}function U(e,t,i,n){var r=e.querySelector(".gslide-media"),o=function(e){var t=e.url,i=e.allow,n=e.callback,r=e.appendTo,o=document.createElement("iframe");return o.className="vimeo-video gvideo",o.src=t,o.style.width="100%",o.style.height="100%",i&&o.setAttribute("allow",i),o.onload=function(){o.onload=null,c(o,"node-ready"),k(n)&&n()},r&&r.appendChild(o),o}({url:t.href,callback:n});r.parentNode.style.maxWidth=t.width,r.parentNode.style.height=t.height,r.appendChild(o)}var W=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.defaults={href:"",sizes:"",srcset:"",title:"",type:"",videoProvider:"",description:"",alt:"",descPosition:"bottom",effect:"",width:"",height:"",content:!1,zoomable:!0,draggable:!0},T(i)&&(this.defaults=o(this.defaults,i))}return n(e,[{key:"sourceType",value:function(e){var t=e;return null!==(e=e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/)?"image":e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||null!==e.match(/\.(mp4|ogg|webm|mov)/)?"video":null!==e.match(/\.(mp3|wav|wma|aac|ogg)/)?"audio":e.indexOf("#")>-1&&""!==t.split("#").pop().trim()?"inline":e.indexOf("goajax=true")>-1?"ajax":"external"}},{key:"parseConfig",value:function(e,t){var i=this,n=o({descPosition:t.descPosition},this.defaults);if(T(e)&&!C(e)){I(e,"type")||(I(e,"content")&&e.content?e.type="inline":I(e,"href")&&(e.type=this.sourceType(e.href)));var r=o(n,e);return this.setSize(r,t),r}var a="",l=e.getAttribute("data-glightbox"),c=e.nodeName.toLowerCase();if("a"===c&&(a=e.href),"img"===c&&(a=e.src,n.alt=e.alt),n.href=a,s(n,function(r,o){I(t,o)&&"width"!==o&&(n[o]=t[o]);var s=e.dataset[o];A(s)||(n[o]=i.sanitizeValue(s))}),n.content&&(n.type="inline"),!n.type&&a&&(n.type=this.sourceType(a)),A(l)){if(!n.title&&"a"==c){var u=e.title;A(u)||""===u||(n.title=u)}if(!n.title&&"img"==c){var h=e.alt;A(h)||""===h||(n.title=h)}}else{var d=[];s(n,function(e,t){d.push(";\\s?"+t)}),d=d.join("\\s?:|"),""!==l.trim()&&s(n,function(e,t){var r=l,o=new RegExp("s?"+t+"s?:s?(.*?)("+d+"s?:|$)"),s=r.match(o);if(s&&s.length&&s[1]){var a=s[1].trim().replace(/;\s*$/,"");n[t]=i.sanitizeValue(a)}})}if(n.description&&"."===n.description.substring(0,1)){var f;try{f=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}f&&(n.description=f)}if(!n.description){var p=e.querySelector(".glightbox-desc");p&&(n.description=p.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:"setSize",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n="video"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),r=this.checkSize(t.height);return e.width=I(e,"width")&&""!==e.width?this.checkSize(e.width):n,e.height=I(e,"height")&&""!==e.height?this.checkSize(e.height):r,i&&"image"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:"checkSize",value:function(e){return P(e)?"".concat(e,"px"):e}},{key:"sanitizeValue",value:function(e){return"true"!==e&&"false"!==e?e:"true"===e}}]),e}(),$=function(){function e(i,n,r){t(this,e),this.element=i,this.instance=n,this.index=r}return n(e,[{key:"setContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(h(t,"loaded"))return!1;var n=this.instance.settings,r=this.slideConfig,o=_();k(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var s=r.type,a=r.descPosition,l=t.querySelector(".gslide-media"),u=t.querySelector(".gslide-title"),d=t.querySelector(".gslide-desc"),f=t.querySelector(".gdesc-inner"),p=i,m="gSlideTitle_"+this.index,g="gSlideDesc_"+this.index;
51if(k(n.afterSlideLoad)&&(p=function(){k(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),""==r.title&&""==r.description?f&&f.parentNode.parentNode.removeChild(f.parentNode):(u&&""!==r.title?(u.id=m,u.innerHTML=r.title):u.parentNode.removeChild(u),d&&""!==r.description?(d.id=g,o&&n.moreLength>0?(r.smallDescription=this.slideShortDesc(r.description,n.moreLength,n.moreText),d.innerHTML=r.smallDescription,this.descriptionEvents(d,r)):d.innerHTML=r.description):d.parentNode.removeChild(d),c(l.parentNode,"desc-".concat(a)),c(f.parentNode,"description-".concat(a))),c(l,"gslide-".concat(s)),c(t,"loaded"),"video"!==s){if("external"!==s)return"inline"===s?(H.apply(this.instance,[t,r,this.index,p]),void(r.draggable&&new F({dragEl:t.querySelector(".gslide-inline"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void("image"!==s?k(p)&&p():function(e,t,i,n){var r=e.querySelector(".gslide-media"),o=new Image,s="gSlideTitle_"+i,a="gSlideDesc_"+i;o.addEventListener("load",function(){k(n)&&n()},!1),o.src=t.href,""!=t.sizes&&""!=t.srcset&&(o.sizes=t.sizes,o.srcset=t.srcset),o.alt="",A(t.alt)||""===t.alt||(o.alt=t.alt),""!==t.title&&o.setAttribute("aria-labelledby",s),""!==t.description&&o.setAttribute("aria-describedby",a),t.hasOwnProperty("_hasCustomWidth")&&t._hasCustomWidth&&(o.style.width=t.width),t.hasOwnProperty("_hasCustomHeight")&&t._hasCustomHeight&&(o.style.height=t.height),r.insertBefore(o,r.firstChild)}(t,r,this.index,function(){var i=t.querySelector("img");r.draggable&&new F({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),r.zoomable&&i.naturalWidth>i.offsetWidth&&(c(i,"zoomable"),new j(i,t,function(){e.instance.resize()})),k(p)&&p()}));U.apply(this,[t,r,this.index,p])}else z.apply(this.instance,[t,r,this.index,p])}}
vendor: 19,092 bytes, line 51
51,{key:"slideShortDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.innerHTML=e;var r=i;if((e=n.innerText.trim()).length<=t)return e;var o=e.substr(0,t-1);return r?(n=null,o+'... <a href="#" class="desc-more">'+i+"</a>"):o}},{key:"descriptionEvents",value:function(e,t){var i=this,n=e.querySelector(".desc-more");if(!n)return!1;l("click",{onElement:n,withCallback:function(e,n){e.preventDefault();var r=document.body,o=d(n,".gslide-desc");if(!o)return!1;o.innerHTML=t.description,c(r,"gdesc-open");var s=l("click",{onElement:[r,d(o,".gslide-description")],withCallback:function(e,n){"a"!==e.target.nodeName.toLowerCase()&&(u(r,"gdesc-open"),c(r,"gdesc-closed"),o.innerHTML=t.smallDescription,i.descriptionEvents(o,t),setTimeout(function(){u(r,"gdesc-closed")},400),s.destroy())}})}})}},{key:"create",value:function(){return v(this.instance.settings.slideHTML)}},{key:"getConfig",value:function(){C(this.element)||this.element.hasOwnProperty("draggable")||(this.element.draggable=this.instance.settings.draggable);var e=new W(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]),e}(),G=_(),q=null!==_()||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,Y=document.getElementsByTagName("html")[0],Z={selector:".glightbox",elements:null,skin:"clean",theme:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:"https://cdn.plyr.io/3.6.12/plyr.css",js:"https://cdn.plyr.io/3.6.12/plyr.js",config:{ratio:"16:9",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoom",closeEffect:"zoom",slideEffect:"slide",moreText:"See more",moreLength:60,cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slideBack:{in:"slideInLeft",out:"slideOutRight"},none:{in:"none",out:"none"}},svg:{close:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve"><g><g><path d="M505.943,6.058c-8.077-8.077-21.172-8.077-29.249,0L6.058,476.693c-8.077,8.077-8.077,21.172,0,29.249C10.096,509.982,15.39,512,20.683,512c5.293,0,10.586-2.019,14.625-6.059L505.943,35.306C514.019,27.23,514.019,14.135,505.943,6.058z"/></g></g><g><g><path d="M505.942,476.694L35.306,6.059c-8.076-8.077-21.172-8.077-29.248,0c-8.077,8.076-8.077,21.171,0,29.248l470.636,470.636c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.624-6.057C514.018,497.866,514.018,484.771,505.942,476.694z"/></g></g></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"> <g><path d="M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z"/></g></svg>',prev:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"><g><path d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/></g></svg>'},slideHTML:'<div class="gslide">\n <div class="gslide-inner-content">\n <div class="ginner-container">\n <div class="gslide-media">\n </div>\n <div class="gslide-description">\n <div class="gdesc-inner">\n <h4 class="gslide-title"></h4>\n <div class="gslide-desc"></div>\n </div>\n </div>\n </div>\n </div>\n</div>',lightboxHTML:'<div id="glightbox-body" class="glightbox-container" tabindex="-1" role="dialog" aria-hidden="false">\n <div class="gloader visible"></div>\n <div class="goverlay"></div>\n <div class="gcontainer">\n <div id="glightbox-slider" class="gslider"></div>\n <button class="gclose gbtn" aria-label="Close" data-taborder="3">{closeSVG}</button>\n <button class="gprev gbtn" aria-label="Previous" data-taborder="2">{prevSVG}</button>\n <button class="gnext gbtn" aria-label="Next" data-taborder="1">{nextSVG}</button>\n</div>\n</div>'},X=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.customOptions=i,this.settings=o(Z,i),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}return n(e,[{key:"init",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=l("click",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=P(t)?t:this.settings.startAt;if(C(e)){var n=e.getAttribute("data-gallery");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),A(i)&&(i=this.getElementIndex(e))<0&&(i=0)}P(i)||(i=0),this.build(),f(this.overlay,"none"===this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var r=document.body,o=window.innerWidth-document.documentElement.clientWidth;if(o>0){var s=document.createElement("style");s.type="text/css",s.className="gcss-styles",s.innerText=".gscrollbar-fixer {margin-right: ".concat(o,"px}"),document.head.appendChild(s),c(r,"gscrollbar-fixer")}c(r,"glightbox-open"),c(Y,"glightbox-open"),G&&(c(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(i,!0),1===this.elements.length?(c(this.prevButton,"glightbox-button-hidden"),c(this.nextButton,"glightbox-button-hidden")):(u(this.prevButton,"glightbox-button-hidden"),u(this.nextButton,"glightbox-button-hidden")),this.lightboxOpen=!0,this.trigger("open"),k(this.settings.onOpen)&&this.settings.onOpen(),q&&this.settings.touchNavigation&&function(e){if(e.events.hasOwnProperty("touch"))return!1;var t,i,n,r=b(),o=r.width,s=r.height,a=!1,l=null,f=null,m=null,g=!1,v=1,y=1,w=!1,_=!1,k=null,x=null,C=null,S=null,E=0,T=0,A=!1,I=!1,M={},P={},D=0,O=0,L=document.getElementById("glightbox-slider"),R=document.querySelector(".goverlay"),j=new B(L,{touchStart:function(t){if(a=!0,(h(t.targetTouches[0].target,"ginner-container")||d(t.targetTouches[0].target,".gslide-desc")||"a"==t.targetTouches[0].target.nodeName.toLowerCase())&&(a=!1),d(t.targetTouches[0].target,".gslide-inline")&&!h(t.targetTouches[0].target.parentNode,"gslide-inline")&&(a=!1),a){if(P=t.targetTouches[0],M.pageX=t.targetTouches[0].pageX,M.pageY=t.targetTouches[0].pageY,D=t.targetTouches[0].clientX,O=t.targetTouches[0].clientY,l=e.activeSlide,f=l.querySelector(".gslide-media"),n=l.querySelector(".gslide-inline"),m=null,h(f,"gslide-image")&&(m=f.querySelector("img")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(f=l.querySelector(".ginner-container")),u(R,"greset"),t.pageX>20&&t.pageX<window.innerWidth-20)return;t.preventDefault()}},touchMove:function(r){if(a&&(P=r.targetTouches[0],!w&&!_)){if(n&&n.offsetHeight>s){var l=M.pageX-P.pageX;if(Math.abs(l)<=13)return!1}g=!0;var c,u=r.targetTouches[0].clientX,h=r.targetTouches[0].clientY,d=D-u,v=O-h;if(Math.abs(d)>Math.abs(v)?(A=!1,I=!0):(I=!1,A=!0),t=P.pageX-M.pageX,E=100*t/o,i=P.pageY-M.pageY,T=100*i/s,A&&m&&(c=1-Math.abs(i)/s,R.style.opacity=c,e.settings.touchFollowAxis&&(E=0)),I&&(c=1-Math.abs(t)/o,f.style.opacity=c,e.settings.touchFollowAxis&&(T=0)),!m)return p(f,"translate3d(".concat(E,"%, 0, 0)"));p(f,"translate3d(".concat(E,"%, ").concat(T,"%, 0)"))}},touchEnd:function(){if(a){if(g=!1,_||w)return C=k,void(S=x);var t=Math.abs(parseInt(T)),i=Math.abs(parseInt(E));if(!(t>29&&m))return t<29&&i<25?(c(R,"greset"),R.style.opacity=1,N(f)):void 0;e.close()}},multipointEnd:function(){setTimeout(function(){w=!1},50)},multipointStart:function(){w=!0,v=y||1},pinch:function(e){if(!m||g)return!1;w=!0,m.scaleX=m.scaleY=v*e.zoom;var t=v*e.zoom;if(_=!0,t<=1)return _=!1,t=1,S=null,C=null,k=null,x=null,void m.setAttribute("style","");t>4.5&&(t=4.5),m.style.transform="scale3d(".concat(t,", ").concat(t,", 1)"),y=t},pressMove:function(e){if(_&&!w){var t=P.pageX-M.pageX,i=P.pageY-M.pageY;C&&(t+=C),S&&(i+=S),k=t,x=i;var n="translate3d(".concat(t,"px, ").concat(i,"px, 0)");y&&(n+=" scale3d(".concat(y,", ").concat(y,", 1)")),p(m,n)}},swipe:function(t){if(!_)if(w)w=!1;else{if("Left"==t.direction){if(e.index==e.elements.length-1)return N(f);e.nextSlide()}if("Right"==t.direction){if(0==e.index)return N(f);e.prevSlide()}}}});e.events.touch=j}(this),this.settings.keyboardNavigation&&function(e){if(e.events.hasOwnProperty("keyboard"))return!1;e.events.keyboard=l("keydown",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var r=document.querySelector(".gbtn.focused");if(!r){var o=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==o||"textarea"==o||"button"==o)return}t.preventDefault();var s=document.querySelectorAll(".gbtn[data-taborder]");if(!s||s.length<=0)return;if(!r){var a=D();return void(a&&(a.focus(),c(a,"focused")))}var l=D(r.getAttribute("data-taborder"));u(r,"focused"),l&&(l.focus(),c(l,"focused"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}(this)}},{key:"openAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:"showSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(".current");n&&u(n,"current"),this.slideAnimateOut();var r=this.slidesContainer.querySelectorAll(".gslide")[t];if(h(r,"loaded"))this.slideAnimateIn(r,i),g(this.loader);else{m(this.loader);var o=this.elements[t],s={index:this.index,slide:r,slideNode:r,slideConfig:o.slideConfig,slideIndex:this.index,trigger:o.node,player:null};this.trigger("slide_before_load",s),o.instance.setContent(r,function(){g(e.loader),e.resize(),e.slideAnimateIn(r,i),e.trigger("slide_after_load",s)})}this.slideDescription=r.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&h(this.slideDescription.parentNode,"gslide-media"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=r}},{key:"preloadSlide",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(A(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(".gslide")[e];if(h(i,"loaded"))return!1;var n=this.elements[e],r=n.type,o={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger("slide_before_load",o),"video"===r||"external"===r?setTimeout(function(){n.instance.setContent(i,function(){t.trigger("slide_after_load",o)})},200):n.instance.setContent(i,function(){t.trigger("slide_after_load",o)})}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:"insertSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new $(e,this,t),n=i.getConfig(),r=o({},n),s=i.create(),a=this.elements.length-1;r.index=t,r.node=!1,r.instance=i,r.slideConfig=n,this.elements.splice(t,0,r);var l=null,c=null;if(this.slidesContainer){if(t>a)this.slidesContainer.appendChild(s);else{var u=this.slidesContainer.querySelectorAll(".gslide")[t];this.slidesContainer.insertBefore(s,u)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),l=this.slidesContainer.querySelectorAll(".gslide")[t],c=this.getSlidePlayerInstance(t),r.slideNode=l}this.trigger("slide_inserted",{index:t,slide:l,slideNode:l,slideConfig:n,slideIndex:t,trigger:null,player:c}),k(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:l,player:c})}},{key:"removeSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(".gslide")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger("slide_removed",e),k(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:"slideAnimateIn",value:function(e,t){var i=this,n=e.querySelector(".gslide-media"),r=e.querySelector(".gslide-description"),o={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:A(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:A(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},s={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&r&&(g(r),r.style.display=""),u(e,this.effectsClasses),t)f(e,this.settings.cssEfects[this.settings.openEffect].in,function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:o,current:s}),k(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[o,s])});else{var a=this.settings.slideEffect,l="none"!==a?this.settings.cssEfects[a].in:a;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(l=this.settings.cssEfects.slideBack.in),f(e,l,function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:o,current:s}),k(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[o,s])})}setTimeout(function(){i.resize(e)},100),c(e,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;u(e,this.effectsClasses),c(e,"prev");var t=this.settings.slideEffect,i="none"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger("slide_before_change",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:A(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:A(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),k(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),f(e,i,function(){var t=e.querySelector(".ginner-container"),i=e.querySelector(".gslide-media"),n=e.querySelector(".gslide-description");t.style.transform="",i.style.transform="",u(i,"greset"),i.style.opacity="",n&&(n.style.opacity=""),u(e,"prev")})}},{key:"getAllPlayers",value:function(){return this.videoPlayers}},{key:"getSlidePlayerInstance",value:function(e){var t="gvideo"+e,i=this.getAllPlayers();return!(!I(i,t)||!i[t])&&i[t]}},{key:"stopSlideVideo",value:function(e){if(C(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("stopSlideVideo is deprecated, use slidePlayerPause");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"slidePlayerPause",value:function(e){if(C(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"playSlideVideo",value:function(e){if(C(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("playSlideVideo is deprecated, use slidePlayerPlay");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:"slidePlayerPlay",value:function(e){var t;if(!G||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(C(e)){var i=e.querySelector(".gvideo-wrapper");i&&(e=i.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:"setElements",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&s(e,function(e,n){var r=new $(e,t,n),s=r.getConfig(),a=o({},s);a.slideConfig=s,a.instance=r,a.index=n,i.push(a)}),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML="",this.elements.length&&(s(this.elements,function(){var e=v(t.settings.slideHTML);t.slidesContainer.appendChild(e)}),this.showSlide(0,!0)))}},{key:"getElementIndex",value:function(e){var t=!1;return s(this.elements,function(i,n){if(I(i,"node")&&i.node==e)return t=n,!0}),t}},{key:"getElements",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!A(this.settings.elements)&&S(this.settings.elements)&&this.settings.elements.length&&s(this.settings.elements,function(i,n){var r=new $(i,e,n),s=r.getConfig(),a=o({},s);a.node=!1,a.index=n,a.instance=r,a.slideConfig=s,t.push(a)});var i=!1;
51return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(s(i,function(i,n){var r=new $(i,e,n),s=r.getConfig(),a=o({},s);a.node=i,a.index=n,a.instance=r,a.slideConfig=s,a.gallery=i.getAttribute("data-gallery"),t.push(a)}),t):t}},{key:"getGalleryElements",value:function(e,t){return e.filter(function(e){return e.gallery==t})}},{key:"getSelector",value:function(){return!this.settings.elements&&(this.settings.selector&&"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector)}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push("g".concat(i.in)),e.push("g".concat(i.out))}return e.join(" ")}},{key:"build",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];s(t,function(e){e.parentNode==document.body&&"#"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute("aria-hidden")&&(i.push(e),e.setAttribute("aria-hidden","true"))});var n=I(this.settings.svg,"next")?this.settings.svg.next:"",r=I(this.settings.svg,"prev")?this.settings.svg.prev:"",o=I(this.settings.svg,"close")?this.settings.svg.close:"",a=this.settings.lightboxHTML;a=v(a=(a=(a=a.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,r)).replace(/{closeSVG}/g,o)),document.body.appendChild(a);var u=document.getElementById("glightbox-body");this.modal=u;var f=u.querySelector(".gclose");this.prevButton=u.querySelector(".gprev"),this.nextButton=u.querySelector(".gnext"),this.overlay=u.querySelector(".goverlay"),this.loader=u.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.bodyHiddenChildElms=i,this.events={},c(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&f&&(this.events.close=l("click",{onElement:f,withCallback:function(t,i){t.preventDefault(),e.close()}})),f&&!this.settings.closeButton&&f.parentNode.removeChild(f),this.nextButton&&(this.events.next=l("click",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=l("click",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=l("click",{onElement:u,withCallback:function(t,i){e.preventOutsideClick||h(document.body,"glightbox-mobile")||d(t.target,".ginner-container")||d(t.target,".gbtn")||h(t.target,"gnext")||h(t.target,"gprev")||e.close()}})),s(this.elements,function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(".gslide")[i]}),q&&c(document.body,"glightbox-touch"),this.events.resize=l("resize",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!h(e,"zoomed")){var t=b(),i=e.querySelector(".gvideo-wrapper"),n=e.querySelector(".gslide-image"),r=this.slideDescription,o=t.width,s=t.height;if(o<=768?c(document.body,"glightbox-mobile"):u(document.body,"glightbox-mobile"),i||n){var a=!1;if(r&&(h(r,"description-bottom")||h(r,"description-top"))&&!h(r,"gabsolute")&&(a=!0),n)if(o<=768)n.querySelector("img");else if(a){var l=r.offsetHeight,d=n.querySelector("img");d.setAttribute("style","max-height: calc(100vh - ".concat(l,"px)")),r.setAttribute("style","max-width: ".concat(d.offsetWidth,"px;"))}if(i){var f=I(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"";if(!f){var p=i.clientWidth,m=i.clientHeight,g=p/m;f="".concat(p/g,":").concat(m/g)}var v=f.split(":"),y=this.settings.videosWidth,w=this.settings.videosWidth,_=(w=P(y)||-1!==y.indexOf("px")?parseInt(y):-1!==y.indexOf("vw")?o*parseInt(y)/100:-1!==y.indexOf("vh")?s*parseInt(y)/100:-1!==y.indexOf("%")?o*parseInt(y)/100:parseInt(i.clientWidth))/(parseInt(v[0])/parseInt(v[1]));if(_=Math.floor(_),a&&(s-=r.offsetHeight),w>o||_>s||s<_&&o>w){var k=i.offsetWidth,x=i.offsetHeight,C=s/x,S={width:k*C,height:x*C};i.parentNode.setAttribute("style","max-width: ".concat(S.width,"px")),a&&r.setAttribute("style","max-width: ".concat(S.width,"px;"))}else i.parentNode.style.maxWidth="".concat(y),a&&r.setAttribute("style","max-width: ".concat(y,";"))}}}}},{key:"reload",value:function(){this.init()}},{key:"updateNavigationClasses",value:function(){var e=this.loop();u(this.nextButton,"disabled"),u(this.prevButton,"disabled"),0==this.index&&this.elements.length-1==0?(c(this.prevButton,"disabled"),c(this.nextButton,"disabled")):0!==this.index||e?this.index!==this.elements.length-1||e||c(this.nextButton,"disabled"):c(this.prevButton,"disabled")}},{key:"loop",value:function(){var e=I(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return e=I(this.settings,"loop")?this.settings.loop:e}},{key:"close",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&s(this.bodyHiddenChildElms,function(e){e.removeAttribute("aria-hidden")}),c(this.modal,"glightbox-closing"),f(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),f(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;u(Y,"glightbox-open"),u(i,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),e.modal.parentNode.removeChild(e.modal),e.trigger("close"),k(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(".gcss-styles");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null})}},{key:"destroy",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:"on",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!k(t))throw new TypeError("Event name and callback must be defined");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:"once",value:function(e,t){this.on(e,t,!0)}},{key:"trigger",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];s(this.apiEvents,function(t,r){var o=t.evt,s=t.once,a=t.callback;o==e&&(a(i),s&&n.push(r))}),n.length&&s(n,function(e){return t.apiEvents.splice(e,1)})}},{key:"clearAllEvents",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:"version",value:function(){return"3.1.0"}}]),e}();return function(){var e=new X(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return e.init(),e}},"object"==typeof i&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).GLightbox=r()},{}],216:[function(e,t,i){"use strict";var n=e("safe-buffer").Buffer,r=e("readable-stream").Transform;function o(e){r.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,r),o.prototype._transform=function(e,t,i){var n=null;try{this.update(e,t)}catch(e){n=e}i(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var i=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o++]=e[r++];this._update(),this._blockOffset=0}for(;r<e.length;)i[this._blockOffset++]=e[r++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:247,"readable-stream":231,"safe-buffer":295}],217:[function(e,t,i){arguments[4][107][0].apply(i,arguments)},{dup:107}],218:[function(e,t,i){(function(i){(function(){"use strict";var n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=c;
vendor: 5,355 bytes, line 51
51var r=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(c,r);for(var s=n(o.prototype),a=0;a<s.length;a++){var l=s[a];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);r.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||i.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":220,"./_stream_writable":222,_process:269,inherits:247}],219:[function(e,t,i){arguments[4][109][0].apply(i,arguments)},{"./_stream_transform":221,dup:109,inherits:247}],220:[function(e,t,i){(function(i,n){(function(){"use strict";var r;t.exports=S,S.ReadableState=C;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),a=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,u=e("util");c=u&&u.debuglog?u.debuglog("stream"):function(){};var h,d,f,p=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(S,s);var k=m.errorOrDestroy,x=["error","close","destroy","pause","resume"];function C(t,i,n){r=r||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=i instanceof r),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function S(t){if(r=r||e("./_stream_duplex"),!(this instanceof S))return new S(t);var i=this instanceof r;this._readableState=new C(t,this,i),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(e,t,i,n,r){c("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,s);else if(r||(o=function(e,t){var i;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(i=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return i}(s,t)),o)k(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?k(e,new _):T(e,s,t,!0);else if(s.ended)k(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):D(e,s)):T(e,s,t,!1)}else n||(s.reading=!1,D(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(e,t,i,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",i)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&M(e)),D(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),i=!0),E(this,e,t,!1,i)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var i=new h(t);this._readableState.decoder=i,this._readableState.encoding=this._readableState.decoder.encoding;
vendor: 4,740 bytes, line 51
51for(var n=this._readableState.buffer.head,r="";null!==n;)r+=i.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var A=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function D(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var i=t.length;if(c("maybeReadMore read 0"),e.read(0),i===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){c("readable nexttick read 0"),e.read(0)}function B(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i}function F(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(z,t,e))}function z(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function V(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}S.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):M(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,r=t.needReadable;return c("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",r=!0),t.ended||t.reading?c("reading or ended",r=!1):r&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(i,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(e){k(this,new w("_read()"))},S.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,c("pipe count=%d opts=%j",r.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:g;function a(t,i){c("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",a),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",d),h=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){c("onend"),e.end()}r.endEmitted?i.nextTick(s):n.once("end",s),e.on("unpipe",a);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",u);var h=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==V(r.pipes,e))&&!h&&(c("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,i){if("function"==typeof e.prependListener)return e.prepe
vendor: 16,495 bytes, line 51
51ndListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",f),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(c("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=V(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this},S.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,c("on readable",r.length,r.reading),r.length?M(this):r.reading||i.nextTick(R,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),n},S.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,i=this._readableState,n=!1;for(var r in e.on("end",function(){if(c("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){(c("wrapped data"),i.decoder&&(r=i.decoder.write(r)),i.objectMode&&null==r)||(i.objectMode||r&&r.length)&&(t.push(r)||(n=!0,e.pause()))}),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<x.length;o++)e.on(x[o],this.emit.bind(this,x[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=j,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,i){return void 0===f&&(f=e("./internal/streams/from")),f(S,t,i)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":217,"./_stream_duplex":218,"./internal/streams/async_iterator":223,"./internal/streams/buffer_list":224,"./internal/streams/destroy":225,"./internal/streams/from":227,"./internal/streams/state":229,"./internal/streams/stream":230,_process:269,buffer:123,events:211,inherits:247,"string_decoder/":308,util:79}],221:[function(e,t,i){arguments[4][111][0].apply(i,arguments)},{"../errors":217,"./_stream_duplex":218,dup:111,inherits:247}],222:[function(e,t,i){(function(i,n){(function(){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var n=e.entry;e.entry=null;for(;n;){var r=n.callback;t.pendingcb--,r(i),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=S,S.WritableState=C;var s={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),l=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,h=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,f=e("../errors").codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,k=h.errorOrDestroy;function x(){}function C(t,n,s){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=n instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(P,e,t),e._writableState.errorEmitted=!0,k(e,r)):(o(r),e._writableState.errorEmitted=!0,k(e,r),P(e,t))}(e,n,r,t,o);else{var s=I(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||A(e,n),r?i.nextTick(T,e,n,s,o):T(e,n,s,o)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function S(t){var i=this instanceof(o=o||e("./_stream_duplex"));if(!i&&!u.call(S,this))return new S(t);this._writableState=new C(t,this,i),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function E(e,t,i,n,r,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):i?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function T(e,t,i,n){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function A(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=i;for(var a=0,l=!0;i;)o[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;o.allBuffers=l,E(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,u=i.encoding,h=i.callback;if(E(e,t,!1,t.objectMode?1:c.length,c,u,h),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final(function(i){t.pendingcb--,i&&k(e,i),t.prefinished=!0,e.emit("prefinish"),P(e,t)})}function P(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}e("inherits")(S,a),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(C.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===S&&(e&&e._writableState instanceof C)}})):u=function(e){return e instanceof this},S.prototype.pipe=function(){k(this,new v)},S.prototype.write=function(e,t,n){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=e,l.isBuffer(r)||r instanceof c);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=x),o.ending?function(e,t){var n=new w;k(e,n),i.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var o;return null===n?o=new y:"string"==typeof n||t.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(k(e,o),i.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,i,n,r,o){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,i));return t}(t,n,r);n!==s&&(i=!0,r="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:r,isBuf:i,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else E(e,t,!1,a,n,r,o);return c}(this,o,a,e,t,n)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,i){i(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,P(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=h.destroy,S.prototype._undestroy=h.undestroy,S.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":217,"./_stream_duplex":218,"./internal/streams/destroy":225,"./internal/streams/state":229,"./internal/streams/stream":230,_process:269,buffer:123,inherits:247,"util-deprecate":402}],223:[function(e,t,i){(function(i){(function(){"use strict";var n;function r(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var o=e("./end-of-stream"),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var i=e[d].read();null!==i&&(e[u]=null,e[s]=null,e[a]=null,t(f(i,!1)))}}function m(e){i.nextTick(p,e)}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((r(n={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){i.nextTick(function(){e[l]?n(e[l]):t(f(void 0,!0))})});var n,r=this[u];if(r)n=new Promise(function(e,t){return function(i,n){e.then(function(){t[c]?i(f(void 0,!0)):t[h](i,n)},n)}}(r,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));n=new Promise(this[h])}return this[u]=n,n}},Symbol.asyncIterator,function(){return this}),r(n,"return",function(){var e=this;return new Promise(function(t,i){e[d].destroy(null,function(e){e?i(e):t(f(void 0,!0))})})}),n),g);t.exports=function(e){var t,i=Object.create(v,(r(t={},d,{value:e,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,c,{value:e._readableState.endEmitted,writable:!0}),r(t,h,{value:function(e,t){var n=i[d].read();n?(i[u]=null,i[s]=null,i[a]=null,e(f(n,!1))):(i[s]=e,i[a]=t)},writable:!0}),t));return i[u]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[a];return null!==t&&(i[u]=null,i[s]=null,i[a]=null,t(e)),void(i[l]=e)}var n=i[s];null!==n&&(i[u]=null,i[s]=null,i[a]=null,n(f(void 0,!0))),i[c]=!0}),e.on("readable",m.bind(null,i)),i}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":226,_process:269}],224:[function(e,t,i){arguments[4][114][0].apply(i,arguments)},{buffer:123,dup:114,util:79}],225:[function(e,t,i){(function(e){(function(){"use strict";function i(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(r,this,t)):e.nextTick(r,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(i,s,t)):e.nextTick(i,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var i=e._readableState,n=e._writableState;i&&i.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:269}],226:[function(e,t,i){arguments[4][116][0].apply(i,arguments)},{"../../../errors":217,dup:116}],227:[function(e,t,i){arguments[4][117][0].apply(i,arguments)},{dup:117}],228:[function(e,t,i){arguments[4][118][0].apply(i,arguments)},{"../../../errors":217,"./end-of-stream":226,dup:118}],229:[function(e,t,i){arguments[4][119][0].apply(i,arguments)},{"../../../errors":217,dup:119}],230:[function(e,t,i){arguments[4][120][0].apply(i,arguments)},{dup:120,events:211}],231:[function(e,t,i){arguments[4][121][0].apply(i,arguments)},{"./lib/_stream_duplex.js":218,"./lib/_stream_passthrough.js":219,"./lib/_stream_readable.js":220,"./lib/_stream_transform.js":221,"./lib/_stream_writable.js":222,"./lib/internal/stream
vendor: 9,226 bytes, line 51
51s/end-of-stream.js":226,"./lib/internal/streams/pipeline.js":228,dup:121}],232:[function(e,t,i){var n=i;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":233,"./hash/hmac":234,"./hash/ripemd":235,"./hash/sha":236,"./hash/utils":243}],233:[function(e,t,i){"use strict";var n=e("./utils"),r=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}i.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-i,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),r(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,n=new Array(i+this.padLength);n[0]=128;for(var r=1;r<i;r++)n[r]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[r++]=0;n[r++]=0,n[r++]=0,n[r++]=0,n[r++]=0,n[r++]=e>>>24&255,n[r++]=e>>>16&255,n[r++]=e>>>8&255,n[r++]=255&e}else for(n[r++]=255&e,n[r++]=e>>>8&255,n[r++]=e>>>16&255,n[r++]=e>>>24&255,n[r++]=0,n[r++]=0,n[r++]=0,n[r++]=0,o=8;o<this.padLength;o++)n[r++]=0;return n}},{"./utils":243,"minimalistic-assert":255}],234:[function(e,t,i){"use strict";var n=e("./utils"),r=e("minimalistic-assert");function o(e,t,i){if(!(this instanceof o))return new o(e,t,i);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,i))}t.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),r(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":243,"minimalistic-assert":255}],235:[function(e,t,i){"use strict";var n=e("./utils"),r=e("./common"),o=n.rotl32,s=n.sum32,a=n.sum32_3,l=n.sum32_4,c=r.BlockHash;function u(){if(!(this instanceof u))return new u;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,i,n){return e<=15?t^i^n:e<=31?t&i|~t&n:e<=47?(t|~i)^n:e<=63?t&n|i&~n:t^(i|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,c),i.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var i=this.h[0],n=this.h[1],r=this.h[2],c=this.h[3],u=this.h[4],b=i,y=n,w=r,_=c,k=u,x=0;x<80;x++){var C=s(o(l(i,h(x,n,r,c),e[p[x]+t],d(x)),g[x]),u);i=u,u=c,c=o(r,10),r=n,n=C,C=s(o(l(b,h(79-x,y,w,_),e[m[x]+t],f(x)),v[x]),k),b=k,k=_,_=o(w,10),w=y,y=C}C=a(this.h[1],r,_),this.h[1]=a(this.h[2],c,k),this.h[2]=a(this.h[3],u,b),this.h[3]=a(this.h[4],i,y),this.h[4]=a(this.h[0],n,w),this.h[0]=C},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":233,"./utils":243}],236:[function(e,t,i){"use strict";i.sha1=e("./sha/1"),i.sha224=e("./sha/224"),i.sha256=e("./sha/256"),i.sha384=e("./sha/384"),i.sha512=e("./sha/512")},{"./sha/1":237,"./sha/224":238,"./sha/256":239,"./sha/384":240,"./sha/512":241}],237:[function(e,t,i){"use strict";var n=e("../utils"),r=e("../common"),o=e("./common"),s=n.rotl32,a=n.sum32,l=n.sum32_5,c=o.ft_1,u=r.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,u),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var i=this.W,n=0;n<16;n++)i[n]=e[t+n];for(;n<i.length;n++)i[n]=s(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var r=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],f=this.h[4];for(n=0;n<i.length;n++){var p=~~(n/20),m=l(s(r,5),c(p,o,u,d),f,i[n],h[p]);f=d,d=u,u=s(o,30),o=r,r=m}this.h[0]=a(this.h[0],r),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],f)},d.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":233,"../utils":243,"./common":242}],238:[function(e,t,i){"use strict";var n=e("../utils"),r=e("./256");function o(){if(!(this instanceof o))return new o;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,r),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":243,"./256":239}],239:[function(e,t,i){"use strict";var n=e("../utils"),r=e("../common"),o=e("./common"),s=e("minimalistic-assert"),a=n.sum32,l=n.sum32_4,c=n.sum32_5,u=o.ch32,h=o.maj32,d=o.s0_256,f=o.s1_256,p=o.g0_256,m=o.g1_256,g=r.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(b,g),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var i=this.W,n=0;n<16;n++)i[n]=e[t+n];for(;n<i.length;n++)i[n]=l(m(i[n-2]),i[n-7],p(i[n-15]),i[n-16]);var r=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],b=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===i.length),n=0;n<i.length;n++){var k=c(_,f(b),u(b,y,w),this.k[n],i[n]),x=a(d(r),h(r,o,g));_=w,w=y,y=b,b=a(v,k),v=g,g=o,o=r,r=a(k,x)}this.h[0]=a(this.h[0],r),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],y),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":233,"../utils":243,"./common":242,"minimalistic-assert":255}],240:[function(e,t,i){"use strict";var n=e("../utils"),r=e("./512");function o(){if(!(this instanceof o))return new o;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,r),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":243,"./512":241}],241:[function(e,t,i){"use strict";var n=e("../utils"),r=e("../common"),o=e("minimalistic-assert"),s=n.rotr64_hi,a=n.rotr64_lo,l=n.shr64_hi,c=n.shr64_lo,u=n.sum64,h=n.sum64_hi,d=n.sum64_lo,f=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=r.BlockH
51ash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
vendor: 5,262 bytes, line 51
511126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,i,n,r){var o=e&i^~e&r;return o<0&&(o+=4294967296),o}function _(e,t,i,n,r,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function k(e,t,i,n,r){var o=e&i^e&r^i&r;return o<0&&(o+=4294967296),o}function x(e,t,i,n,r,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function C(e,t){var i=s(e,t,28)^s(t,e,2)^s(t,e,7);return i<0&&(i+=4294967296),i}function S(e,t){var i=a(e,t,28)^a(t,e,2)^a(t,e,7);return i<0&&(i+=4294967296),i}function E(e,t){var i=s(e,t,14)^s(e,t,18)^s(t,e,9);return i<0&&(i+=4294967296),i}function T(e,t){var i=a(e,t,14)^a(e,t,18)^a(t,e,9);return i<0&&(i+=4294967296),i}function A(e,t){var i=s(e,t,1)^s(e,t,8)^l(e,t,7);return i<0&&(i+=4294967296),i}function I(e,t){var i=a(e,t,1)^a(e,t,8)^c(e,t,7);return i<0&&(i+=4294967296),i}function M(e,t){var i=s(e,t,19)^s(t,e,29)^l(e,t,6);return i<0&&(i+=4294967296),i}function P(e,t){var i=a(e,t,19)^a(t,e,29)^c(e,t,6);return i<0&&(i+=4294967296),i}n.inherits(y,v),t.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var i=this.W,n=0;n<32;n++)i[n]=e[t+n];for(;n<i.length;n+=2){var r=M(i[n-4],i[n-3]),o=P(i[n-4],i[n-3]),s=i[n-14],a=i[n-13],l=A(i[n-30],i[n-29]),c=I(i[n-30],i[n-29]),u=i[n-32],h=i[n-31];i[n]=f(r,o,s,a,l,c,u,h),i[n+1]=p(r,o,s,a,l,c,u,h)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var i=this.W,n=this.h[0],r=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4],c=this.h[5],f=this.h[6],p=this.h[7],v=this.h[8],b=this.h[9],y=this.h[10],A=this.h[11],I=this.h[12],M=this.h[13],P=this.h[14],D=this.h[15];o(this.k.length===i.length);for(var O=0;O<i.length;O+=2){var L=P,R=D,B=E(v,b),N=T(v,b),j=w(v,b,y,A,I),F=_(v,b,y,A,I,M),z=this.k[O],V=this.k[O+1],H=i[O],U=i[O+1],W=m(L,R,B,N,j,F,z,V,H,U),$=g(L,R,B,N,j,F,z,V,H,U);L=C(n,r),R=S(n,r),B=k(n,r,s,a,l),N=x(n,r,s,a,l,c);var G=h(L,R,B,N),q=d(L,R,B,N);P=I,D=M,I=y,M=A,y=v,A=b,v=h(f,p,W,$),b=d(p,p,W,$),f=l,p=c,l=s,c=a,s=n,a=r,n=h(W,$,G,q),r=d(W,$,G,q)}u(this.h,0,n,r),u(this.h,2,s,a),u(this.h,4,l,c),u(this.h,6,f,p),u(this.h,8,v,b),u(this.h,10,y,A),u(this.h,12,I,M),u(this.h,14,P,D)},y.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":233,"../utils":243,"minimalistic-assert":255}],242:[function(e,t,i){"use strict";var n=e("../utils").rotr32;function r(e,t,i){return e&t^~e&i}function o(e,t,i){return e&t^e&i^t&i}function s(e,t,i){return e^t^i}i.ft_1=function(e,t,i,n){return 0===e?r(t,i,n):1===e||3===e?s(t,i,n):2===e?o(t,i,n):void 0},i.ch32=r,i.maj32=o,i.p32=s,i.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},i.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},i.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},i.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":243}],243:[function(e,t,i){"use strict";var n=e("minimalistic-assert"),r=e("inherits");function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}i.inherits=r,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)i.push(parseInt(e[r]+e[r+1],16))}else for(var n=0,r=0;r<e.length;r++){var s=e.charCodeAt(r);s<128?i[n++]=s:s<2048?(i[n++]=s>>6|192,i[n++]=63&s|128):o(e,r)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++r)),i[n++]=s>>18|240,i[n++]=s>>12&63|128,i[n++]=s>>6&63|128,i[n++]=63&s|128):(i[n++]=s>>12|224,i[n++]=s>>6&63|128,i[n++]=63&s|128)}else for(r=0;r<e.length;r++)i[r]=0|e[r];return i},i.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=a(e[i].toString(16));return t},i.htonl=s,i.toHex32=function(e,t){for(var i="",n=0;n<e.length;n++){var r=e[n];"little"===t&&(r=s(r)),i+=l(r.toString(16))}return i},i.zero2=a,i.zero8=l,i.join32=function(e,t,i,r){var o=i-t;n(o%4==0);for(var s=new Array(o/4),a=0,l=t;a<s.length;a++,l+=4){var c;c="big"===r?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],s[a]=c>>>0}return s},i.split32=function(e,t){for(var i=new Array(4*e.length),n=0,r=0;n<e.length;n++,r+=4){var o=e[n];"big"===t?(i[r]=o>>>24,i[r+1]=o>>>16&255,i[r+2]=o>>>8&255,i[r+3]=255&o):(i[r+3]=o>>>24,i[r+2]=o>>>16&255,i[r+1]=o>>>8&255,i[r]=255&o)}return i},i.rotr32=function(e,t){return e>>>t|e<<32-t},i.rotl32=function(e,t){return e<<t|e>>>32-t},i.sum32=function(e,t){return e+t>>>0},i.sum32_3=function(e,t,i){return e+t+i>>>0},i.sum32_4=function(e,t,i,n){return e+t+i+n>>>0},i.sum32_5=function(e,t,i,n,r){return e+t+i+n+r>>>0},i.sum64=function(e,t,i,n){var r=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+i+r;e[t]=s>>>
510,e[t+1]=o},i.sum64_hi=function(e,t,i,n){return(t+n>>>0<t?1:0)+e+i>>>0},i.sum64_lo=function(e,t,i,n){return t+n>>>0},i.sum64_4_hi=function(e,t,i,n,r,o,s,a){var l=0,c=t;return l+=(c=c+n>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+i+r+s+(l+=(c=c+a>>>0)<a?1:0)>>>0},i.sum64_4_lo=function(e,t,i,n,r,o,s,a){return t+n+o+a>>>0},i.sum64_5_hi=function(e,t,i,n,r,o,s,a,l,c){var u=0,h=t;return u+=(h=h+n>>>0)<t?1:0,u+=(h=h+o>>>0)<o?1:0,u+=(h=h+a>>>0)<a?1:0,e+i+r+s+l+(u+=(h=h+c>>>0)<c?1:0)>>>0},i.sum64_5_lo=function(e,t,i,n,r,o,s,a,l,c){return t+n+o+a+c>>>0},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},i.shr64_hi=function(e,t,i){return e>>>i},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0}},{inherits:247,"minimalistic-assert":255}],244:[function(e,t,i){ 52/*! 53 * headroom.js v0.11.0 - Give your page some headroom. Hide your header until you need it 54 * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js 55 * License: MIT 56 */ 57!function(e,n){"object"==typeof i&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).Headroom=n()}(this,function(){"use strict";function e(){return"undefined"!=typeof window}function t(e){return(o=e)&&o.document&&function(e){return 9===e.nodeType}(o.document)?(i=(t=e).document,n=i.body,r=i.documentElement,{scrollHeight:function(){return Math.max(n.scrollHeight,r.scrollHeight,n.offsetHeight,r.offsetHeight,n.clientHeight,r.clientHeight)},height:function(){return t.innerHeight||r.clientHeight||n.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(r||n.parentNode||n).scrollTop}}):function(e){return{scrollHeight:function(){return Math.max(e.scrollHeight,e.offsetHeight,e.clientHeight)},height:function(){return Math.max(e.offsetHeight,e.clientHeight)},scrollY:function(){return e.scrollTop}}}(e);var t,i,n,r,o}function i(e,i,n){var r,o=function(){var e=!1;try{var t={get passive(){e=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}(),s=!1,a=t(e),l=a.scrollY(),c={};function u(){var e=Math.round(a.scrollY()),t=a.height(),r=a.scrollHeight();c.scrollY=e,c.lastScrollY=l,c.direction=e>l?"down":"up",c.distance=Math.abs(e-l),c.isOutOfBounds=e<0||e+t>r,c.top=e<=i.offset,c.bottom=e+t>=r,c.toleranceExceeded=c.distance>i.tolerance[c.direction],n(c),l=e,s=!1}function h(){s||(s=!0,r=requestAnimationFrame(u))}var d=!!o&&{passive:!0,capture:!1};return e.addEventListener("scroll",h,d),u(),{destroy:function(){cancelAnimationFrame(r),e.removeEventListener("scroll",h,d)}}}function n(e,t){var i;t=t||{},Object.assign(this,n.options,t),this.classes=Object.assign({},n.options.classes,t.classes),this.elem=e,this.tolerance=(i=this.tolerance)===Object(i)?i:{down:i,up:i},this.initialised=!1,this.frozen=!1}return n.prototype={constructor:n,init:function(){return n.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(e){e.scrollTracker=i(e.scroller,{offset:e.offset,tolerance:e.tolerance},e.update.bind(e))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(e){return"down"===e.direction&&!e.top&&e.toleranceExceeded},shouldPin:function(e){return"up"===e.direction&&e.toleranceExceeded||e.top},addClass:function(e){this.elem.classList.add.apply(this.elem.classList,this.classes[e].split(" "))},removeClass:function(e){this.elem.classList.remove.apply(this.elem.classList,this.classes[e].split(" "))},hasClass:function(e){return this.classes[e].split(" ").every(function(e){return this.classList.contains(e)},this.elem)},update:function(e){e.isOutOfBounds||!0!==this.frozen&&(e.top?this.top():this.notTop(),e.bottom?this.bottom():this.notBottom(),this.shouldUnpin(e)?this.unpin():this.shouldPin(e)&&this.pin())}},n.options={tolerance:{up:0,down:0},offset:0,scroller:e()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},n.cutsTheMustard=!!(e()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),n})},{}],245:[function(e,t,i){"use strict";var n=e("hash.js"),r=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;
vendor: 4,462 bytes, lines 57-59
57var t=r.toArray(e.entropy,e.entropyEnc||"hex"),i=r.toArray(e.nonce,e.nonceEnc||"hex"),n=r.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,n)}t.exports=s,s.prototype._init=function(e,t,i){var n=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r<this.V.length;r++)this.K[r]=0,this.V[r]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,i,n){"string"!=typeof t&&(n=i,i=t,t=null),e=r.toArray(e,t),i=r.toArray(i,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},s.prototype.generate=function(e,t,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=i,i=t,t=null),i&&(i=r.toArray(i,n||"hex"),this._update(i));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(i),this._reseed++,r.encode(s,t)}},{"hash.js":232,"minimalistic-assert":255,"minimalistic-crypto-utils":256}],246:[function(e,t,i){ 58/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ 59i.read=function(e,t,i,n,r){var o,s,a=8*r-n-1,l=(1<<a)-1,c=l>>1,u=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},i.write=function(e,t,i,n,r,o){var s,a,l,c=8*o-r-1,u=(1<<c)-1,h=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,r),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[i+f]=255&a,f+=p,a/=256,r-=8);for(s=s<<r|a,c+=r;c>0;e[i+f]=255&s,f+=p,s/=256,c-=8);e[i+f-p]|=128*m}},{}],247:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],248:[function(e,t,i){var n;n=function(e){"use strict";return function(){for(var t=[["Afghanistan (â«Ø§ÙØºØ§ÙØ³ØªØ§Ùâ¬â)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (â«Ø§Ùجزائرâ¬â)","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua and Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia (ÕÕ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria (Ãsterreich)","at","43"],["Azerbaijan (AzÉrbaycan)","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain (â«Ø§ÙØ¨ØØ±ÙÙâ¬â)","bh","973"],["Bangladesh (বাà¦à¦²à¦¾à¦¦à§à¦¶)","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus (ÐелаÑÑÑÑ)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan (འà½à¾²à½´à½)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (ÐоÑна и ХеÑÑеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria (ÐÑлгаÑиÑ)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (ááááá»áá¶)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742
vendor: 7,561 bytes, line 59
59","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (ä¸å½)","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros (â«Ø¬Ø²Ø± اÙÙÙ
رâ¬â)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte dâIvoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (ÎÏÏÏοÏ)","cy","357"],["Czech Republic (Äeská republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (â«Ù
صرâ¬â)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (á¡áá¥áá ááááá)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Îλλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (馿¸¯)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ãsland)","is","354"],["India (à¤à¤¾à¤°à¤¤)","in","91"],["Indonesia","id","62"],["Iran (â«Ø§ÛراÙâ¬â)","ir","98"],["Iraq (â«Ø§ÙعراÙâ¬â)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel (â«×שר××â¬â)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (æ¥æ¬)","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan (â«Ø§ÙأردÙâ¬â)","jo","962"],["Kazakhstan (ÐазаÑ
ÑÑан)","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (â«Ø§ÙÙÙÙØªâ¬â)","kw","965"],["Kyrgyzstan (ÐÑÑгÑзÑÑан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (â«ÙØ¨ÙØ§Ùâ¬â)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (â«ÙÙØ¨Ùاâ¬â)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (æ¾³é)","mo","853"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (â«Ù
ÙØ±ÙتاÙÙØ§â¬â)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Ðонгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco (â«Ø§ÙÙ
غربâ¬â)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (áá¼ááºáá¬)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नà¥à¤ªà¤¾à¤²)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (ì¡°ì 민주주ì ì¸ë¯¼ ê³µíêµ)","kp","850"],["North Macedonia (СевеÑна ÐакедониÑа)","mk","389"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway (Norge)","no","47",0],["Oman (â«Ø¹ÙÙ
اÙâ¬â)","om","968"],["Pakistan (â«Ù¾Ø§Ú©Ø³ØªØ§Ùâ¬â)","pk","92"],["Palau","pw","680"],["Palestine (â«ÙÙØ³Ø·ÙÙâ¬â)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (â«Ùطرâ¬â)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (РоÑÑиÑ)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1",18,["869"]],["Saint Lucia","lc","1",19,["758"]],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1",20,["784"]],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and PrÃncipe (São Tomé e PrÃncipe)","st","239"],["Saudi Arabia (â«Ø§ÙÙ
Ù
ÙÙØ© Ø§ÙØ¹Ø±Ø¨ÙØ© Ø§ÙØ³Ø¹ÙØ¯ÙØ©â¬â)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (СÑбиÑа)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (ëí민êµ)","kr","82"],["South Sudan (â«Ø¬ÙÙØ¨ Ø§ÙØ³ÙداÙâ¬â)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (à·à·âර෠ලà¶à¶à·à·)","lk","94"],["Sudan (â«Ø§ÙØ³ÙØ¯Ø§Ùâ¬â)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1,["79"]],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (â«Ø³ÙØ±ÙØ§â¬â)","sy","963"],["Taiwan (å°ç£)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (à¹à¸à¸¢)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1",22,["868"]],["Tunisia (â«ØªÙÙØ³â¬â)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1",24,["340"]],["Uganda","ug","256"],["Ukraine (УкÑаÑна)","ua","380"],["United Arab Emirates (â«Ø§ÙØ¥Ù
ارات Ø§ÙØ¹Ø±Ø¨ÙØ© اÙÙ
ØªØØ¯Ø©â¬â)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (OÊ»zbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam (Viá»t Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (â«Ø§ÙØµØØ±Ø§Ø¡ Ø§ÙØºØ±Ø¨ÙØ©â¬â)","eh","212",1,["5288","5289"]],["Yemen (â«Ø§ÙÙÙ
Ùâ¬â)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Ã
land Islands","ax","358",1,["18"]]],
59i=0;i<t.length;i++){var n=t[i];t[i]={name:n[0],iso2:n[1],dialCode:n[2],priority:n[3]||0,areaCodes:n[4]||null}}function r(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o={getInstance:function(e){var t=e.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[t]},instances:{},documentReady:function(){return"complete"===document.readyState}};"object"==typeof window&&(window.intlTelInputGlobals=o);var s=0,a={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customContainer:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",localizedCountries:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},l=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],c=function(e,t){for(var i=Object.keys(e),n=0;n<i.length;n++)t(i[n],e[i[n]])},u=function(e){c(window.intlTelInputGlobals.instances,function(t){window.intlTelInputGlobals.instances[t][e]()})},h=function(){function i(e,t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.id=s++,this.telInput=e,this.activeItem=null,this.highlightedItem=null;var r=t||{};this.options={},c(a,function(e,t){n.options[e]=r.hasOwnProperty(e)?r[e]:t}),this.hadInitialPlaceholder=Boolean(e.getAttribute("placeholder"))}var n,o,h;return n=i,o=[{key:"_init",value:function(){var e=this;if(this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(document.body.classList.add("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer=document.body)),"undefined"!=typeof Promise){var t=new Promise(function(t,i){e.resolveAutoCountryPromise=t,e.rejectAutoCountryPromise=i}),i=new Promise(function(t,i){e.resolveUtilsScriptPromise=t,e.rejectUtilsScriptPromise=i});this.promise=Promise.all([t,i])}else this.resolveAutoCountryPromise=this.rejectAutoCountryPromise=function(){},this.resolveUtilsScriptPromise=this.rejectUtilsScriptPromise=function(){};this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}},{key:"_processCountryData",value:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries(),this.options.localizedCountries&&this._translateCountriesByLocale(),(this.options.onlyCountries.length||this.options.localizedCountries)&&this.countries.sort(this._countryNameSort)}},{key:"_addCountryCode",value:function(t,i,n){i.length>this.countryCodeMaxLen&&(this.countryCodeMaxLen=i.length),this.countryCodes.hasOwnProperty(i)||(this.countryCodes[i]=[]);for(var r=0;r<this.countryCodes[i].length;r++)if(this.countryCodes[i][r]===t)return;var o=n!==e?n:this.countryCodes[i].length;this.countryCodes[i][o]=t}},{key:"_processAllCountries",value:function(){if(this.options.onlyCountries.length){var e=this.options.onlyCountries.map(function(e){return e.toLowerCase()});this.countries=t.filter(function(t){return e.indexOf(t.iso2)>-1})}else if(this.options.excludeCountries.length){var i=this.options.excludeCountries.map(function(e){return e.toLowerCase()});this.countries=t.filter(function(e){return-1===i.indexOf(e.iso2)})}else this.countries=t}},{key:"_translateCountriesByLocale",value:function(){for(var e=0;e<this.countries.length;e++){var t=this.countries[e].iso2.toLowerCase();this.options.localizedCountries.hasOwnProperty(t)&&(this.countries[e].name=this.options.localizedCountries[t])}}},{key:"_countryNameSort",value:function(e,t){return e.name.localeCompare(t.name)}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];this.dialCodes[t.dialCode]||(this.dialCodes[t.dialCode]=!0),this._addCountryCode(t.iso2,t.dialCode,t.priority)}for(var i=0;i<this.countries.length;i++){var n=this.countries[i];if(n.areaCodes)for(var r=this.countryCodes[n.dialCode][0],o=0;o<n.areaCodes.length;o++){for(var s=n.areaCodes[o],a=1;a<s.length;a++){var l=n.dialCode+s.substr(0,a);this._addCountryCode(r,l),this._addCountryCode(n.iso2,l)}this._addCountryCode(n.iso2,n.dialCode+s)}}}},{key:"_processPreferredCountries",value:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),i=this._getCountryData(t,!1,!0);i&&this.preferredCountries.push(i)}}},{key:"_createEl",value:function(e,t,i){var n=document.createElement(e);return t&&c(t,function(e,t){return n.setAttribute(e,t)}),i&&i.appendChild(n),n}},{key:"_generateMarkup",value:function(){this.telInput.hasAttribute("autocomplete")||this.telInput.form&&this.telInput.form.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off");var e="iti";this.options.allowDropdown&&(e+=" iti--allow-dropdown"),this.options.separateDialCode&&(e+=" iti--separate-dial-code"),this.options.customContainer&&(e+=" ",e+=this.options.customContainer);var t=this._createEl("div",{class:e});if(this.telInput.parentNode.insertBefore(t,this.telInput),this.flagsContainer=this._createEl("div",{class:"iti__flag-container"},t),t.appendChild(this.telInput),this.selectedFlag=this._createEl("div",{class:"iti__selected-flag",role:"combobox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-owns":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false"},this.flagsContainer),this.selectedFlagInner=this._createEl("div",{class:"iti__flag"},this.selectedFlag),this.options.separateDialCode&&(this.selectedDialCode=this._createEl("div",{class:"iti__selected-dial-code"},this.selectedFlag)),this.options.allowDropdown&&(this.selectedFlag.setAttribute("tabindex","0"),this.dropdownArrow=this._createEl("div",{class:"iti__arrow"},this.selectedFlag),this.countryList=this._createEl("ul",{class:"iti__country-list iti__hide",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":"List of countries"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"iti__preferred",!0),this._createEl("li",{class:"iti__divider",role:"separator","aria-disabled":"true"},this.countryList)),this._appendListItems(this.countries,"iti__standard"),this.options.dropdownContainer?(this.dropdown=this._createEl("div",{class:"iti iti--container"}),this.dropdown.appendChild(this.countryList)):this.flagsContainer.appendChild(this.countryList)),this.options.hiddenInput){var i=this.options.hiddenInput,n=this.telInput.getAttribute("name");if(n){var r=n.lastIndexOf("[");-1!==r&&(i="".concat(n.substr(0,r),"[").concat(i,"]"))}this.hiddenInput=this._createEl("input",{type:"hidden",name:i}),t.appendChild(this.hiddenInput)}}},{key:"_appendListItems",value:function(e,t,i){for(var n="",r=0;r<e.length;r++){var o=e[r],s=i?"-preferred":"";n+="<li class='iti__country ".concat(t,"' tabIndex='-1' id='iti-").concat(this.id,"__item-").concat(o.iso2).concat(s,"' role='option' data-dial-code='").concat(o.dialCode,"' data-country-code='").concat(o.iso2,"' aria-selected='false'>"),n+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(o.iso2,"'></div></div>"),n+="<span class='iti__country-name'>".concat(o.name,"</span>"),n+="<span class='iti__dial-code'>+".concat(o.dialCode,"</span>"),n+="</li>"}this.countryList.insertAdjacentHTML("beforeend",n)}},{key:"_setInitialState",value:function(){var e=this.telInput.getAttribute("value"),t=this.telInput.value,i=!e||"+"!==e.charAt(0)||t&&"+"===t.charAt(0)?t:e,n=this._getDialCode(i),r=this._isRegionlessNanp(i),o=this.options,s=o.initialCountry,a=o.nationalMode,l=o.autoHideDialCode,c=o.separateDialCode;n&&!r?this._updateFlagFromNumber(i):"auto"!==s&&(s?this._setFlag(s.toLowerCase()):n&&r?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,i||this._setFlag(this.defaultCountry)),i||a||l||c||
vendor: 5,525 bytes, line 59
59(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),i&&this._updateValFromNumber(i)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var e=this;this._handleHiddenInputSubmit=function(){e.hiddenInput.value=e.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var e=this.telInput;e&&"LABEL"!==e.tagName;)e=e.parentNode;return e}},{key:"_initDropdownListeners",value:function(){var e=this;this._handleLabelClick=function(t){e.countryList.classList.contains("iti__hide")?e.telInput.focus():t.preventDefault()};var t=this._getClosestLabel();t&&t.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!e.countryList.classList.contains("iti__hide")||e.telInput.disabled||e.telInput.readOnly||e._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(t){e.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(t.key)&&(t.preventDefault(),t.stopPropagation(),e._showDropdown()),"Tab"===t.key&&e._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var e=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",function(){window.intlTelInputGlobals.loadUtils(e.options.utilsScript)}):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){window.intlTelInputGlobals.autoCountry=e.toLowerCase(),setTimeout(function(){return u("handleAutoCountry")})},function(){return u("rejectAutoCountryPromise")}))}},{key:"_initKeyListeners",value:function(){var e=this;this._handleKeyupEvent=function(){e._updateFlagFromNumber(e.telInput.value)&&e._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(e._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(e){var t=this.telInput.getAttribute("maxlength");return t&&e.length>t?e.substr(0,t):e}},{key:"_initBlurListeners",value:function(){var e=this;this._handleSubmitOrBlurEvent=function(){e._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var e=this._getNumeric(this.telInput.value);e&&this.selectedCountryData.dialCode!==e||(this.telInput.value="")}}},{key:"_getNumeric",value:function(e){return e.replace(/\D/g,"")}},{key:"_trigger",value:function(e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(e,t,i){i&&!e.classList.contains(t)?e.classList.add(t):!i&&e.classList.contains(t)&&e.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var e=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.isMobile){var t=this.telInput.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,n=t.top+i,r=this.countryList.offsetHeight,o=n+this.telInput.offsetHeight+r<i+window.innerHeight,s=n-r>i;if(this._toggleClass(this.countryList,"iti__country-list--dropup",!o&&s),this.options.dropdownContainer){var a=!o&&s?0:this.telInput.offsetHeight;this.dropdown.style.top="".concat(n+a,"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return e._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll)}}}},{key:"_getClosestListItem",value:function(e){for(var t=e;t&&t!==this.countryList&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.countryList?null:t}},{key:"_bindDropdownListeners",value:function(){var e=this;this._handleMouseoverCountryList=function(t){var i=e._getClosestListItem(t.target);i&&e._highlightListItem(i,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(t){var i=e._getClosestListItem(t.target);i&&e._selectListItem(i)},this.countryList.addEventListener("click",this._handleClickCountryList);var t=!0;
59this._handleClickOffToClose=function(){t||e._closeDropdown(),t=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var i="",n=null;this._handleKeydownOnDropdown=function(t){t.preventDefault(),"ArrowUp"===t.key||"Up"===t.key||"ArrowDown"===t.key||"Down"===t.key?e._handleUpDownKey(t.key):"Enter"===t.key?e._handleEnterKey():"Escape"===t.key?e._closeDropdown():/^[a-zA-ZÃ-ÿа-ÑÐ-Я ]$/.test(t.key)&&(n&&clearTimeout(n),i+=t.key.toLowerCase(),e._searchForCountry(i),n=setTimeout(function(){i=""},1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown)}},{key:"_handleUpDownKey",value:function(e){var t="ArrowUp"===e||"Up"===e?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;t&&(t.classList.contains("iti__divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this._highlightListItem(t,!0))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var i=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(this.countries[t].iso2));this._highlightListItem(i,!1),this._scrollTo(i,!0);break}}},{key:"_startsWith",value:function(e,t){return e.substr(0,t.length).toLowerCase()===t}},{key:"_updateValFromNumber",value:function(e){var t=e;if(this.options.formatOnDisplay&&window.intlTelInputUtils&&this.selectedCountryData){var i=!this.options.separateDialCode&&(this.options.nationalMode||"+"!==t.charAt(0)),n=intlTelInputUtils.numberFormat,r=n.NATIONAL,o=n.INTERNATIONAL,s=i?r:o;t=intlTelInputUtils.formatNumber(t,this.selectedCountryData.iso2,s)}t=this._beforeSetNumber(t),this.telInput.value=t}},{key:"_updateFlagFromNumber",value:function(e){var t=e,i=this.selectedCountryData.dialCode,n="1"===i;t&&this.options.nationalMode&&n&&"+"!==t.charAt(0)&&("1"!==t.charAt(0)&&(t="1".concat(t)),t="+".concat(t)),this.options.separateDialCode&&i&&"+"!==t.charAt(0)&&(t="+".concat(i).concat(t));var r=this._getDialCode(t,!0),o=this._getNumeric(t),s=null;if(r){var a=this.countryCodes[this._getNumeric(r)],l=-1!==a.indexOf(this.selectedCountryData.iso2)&&o.length<=r.length-1;if(!("1"===i&&this._isRegionlessNanp(o)||l))for(var c=0;c<a.length;c++)if(a[c]){s=a[c];break}}else"+"===t.charAt(0)&&o.length?s="":t&&"+"!==t||(s=this.defaultCountry);return null!==s&&this._setFlag(s)}},{key:"_isRegionlessNanp",value:function(e){var t=this._getNumeric(e);if("1"===t.charAt(0)){var i=t.substr(1,3);return-1!==l.indexOf(i)}return!1}},{key:"_highlightListItem",value:function(e,t){var i=this.highlightedItem;i&&i.classList.remove("iti__highlight"),this.highlightedItem=e,this.highlightedItem.classList.add("iti__highlight"),t&&this.highlightedItem.focus()}},{key:"_getCountryData",value:function(e,i,n){for(var r=i?t:this.countries,o=0;o<r.length;o++)if(r[o].iso2===e)return r[o];if(n)return null;throw new Error("No country data for '".concat(e,"'"))}},{key:"_setFlag",value:function(e){var t=this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.setAttribute("class","iti__flag iti__".concat(e));var i=e?"".concat(this.selectedCountryData.name,": +").concat(this.selectedCountryData.dialCode):"Unknown";if(this.selectedFlag.setAttribute("title",i),this.options.separateDialCode){var n=this.selectedCountryData.dialCode?"+".concat(this.selectedCountryData.dialCode):"";this.selectedDialCode.innerHTML=n;var r=this.selectedFlag.offsetWidth||this._getHiddenSelectedFlagWidth();this.telInput.style.paddingLeft="".concat(r+6,"px")}if(this._updatePlaceholder(),this.options.allowDropdown){var o=this.activeItem;if(o&&(o.classList.remove("iti__active"),o.setAttribute("aria-selected","false")),e){var s=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(e,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(e));s.setAttribute("aria-selected","true"),s.classList.add("iti__active"),this.activeItem=s,this.selectedFlag.setAttribute("aria-activedescendant",s.getAttribute("id"))}}return t.iso2!==e}},{key:"_getHiddenSelectedFlagWidth",value:function(){var e=this.telInput.parentNode.cloneNode();e.style.visibility="hidden",document.body.appendChild(e);var t=this.flagsContainer.cloneNode();e.appendChild(t);var i=this.selectedFlag.cloneNode(!0);t.appendChild(i);var n=i.offsetWidth;return e.parentNode.removeChild(e),n}},{key:"_updatePlaceholder",value:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&"polite"===this.options.autoPlaceholder;if(window.intlTelInputUtils&&e){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],i=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";i=this._beforeSetNumber(i),"function"==typeof this.options.customPlaceholder&&(i=this.options.customPlaceholder(i,this.selectedCountryData)),this.telInput.setAttribute("placeholder",i)}}},{key:"_selectListItem",value:function(e){var t=this._setFlag(e.getAttribute("data-country-code"));this._closeDropdown(),this._updateDialCode(e.getAttribute("data-dial-code"),!0),this.telInput.focus();var i=this.telInput.value.length;this.telInput.setSelectionRange(i,i),t&&this._triggerCountryChange()}},{key:"_closeDropdown",value:function(){this.countryList.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","fal
59se"),this.dropdownArrow.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._handleKeydownOnDropdown),document.documentElement.removeEventListener("click",this._handleClickOffToClose),this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList),this.countryList.removeEventListener("click",this._handleClickCountryList),this.options.dropdownContainer&&(this.isMobile||window.removeEventListener("scroll",this._handleWindowScroll),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._trigger("close:countrydropdown")}},{key:"_scrollTo",value:function(e,t){var i=this.countryList,n=window.pageYOffset||document.documentElement.scrollTop,r=i.offsetHeight,o=i.getBoundingClientRect().top+n,s=o+r,a=e.offsetHeight,l=e.getBoundingClientRect().top+n,c=l+a,u=l-o+i.scrollTop,h=r/2-a/2;if(l<o)t&&(u-=h),i.scrollTop=u;else if(c>s){t&&(u+=h);var d=r-a;i.scrollTop=u-d}}},{key:"_updateDialCode",value:function(e,t){var i,n=this.telInput.value,r="+".concat(e);if("+"===n.charAt(0)){var o=this._getDialCode(n);i=o?n.replace(o,r):r}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(n)i=r+n;else{if(!t&&this.options.autoHideDialCode)return;i=r}}this.telInput.value=i}},{key:"_getDialCode",value:function(e,t){var i="";if("+"===e.charAt(0))for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if(!isNaN(parseInt(o,10))){if(n+=o,t)this.countryCodes[n]&&(i=e.substr(0,r+1));else if(this.dialCodes[n]){i=e.substr(0,r+1);break}if(n.length===this.countryCodeMaxLen)break}}return i}},{key:"_getFullNumber",value:function(){var e=this.telInput.value.trim(),t=this.selectedCountryData.dialCode,i=this._getNumeric(e);return(this.options.separateDialCode&&"+"!==e.charAt(0)&&t&&i?"+".concat(t):"")+e}},{key:"_beforeSetNumber",value:function(e){var t=e;if(this.options.separateDialCode){var i=this._getDialCode(t);if(i){var n=" "===t[(i="+".concat(this.selectedCountryData.dialCode)).length]||"-"===t[i.length]?i.length+1:i.length;t=t.substr(n)}}return this._cap(t)}},{key:"_triggerCountryChange",value:function(){this._trigger("countrychange")}},{key:"handleAutoCountry",value:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=window.intlTelInputGlobals.autoCountry,this.telInput.value||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this._updatePlaceholder()),this.resolveUtilsScriptPromise()}},{key:"destroy",value:function(){var e=this.telInput.form;if(this.options.allowDropdown){this._closeDropdown(),this.selectedFlag.removeEventListener("click",this._handleClickSelectedFlag),this.flagsContainer.removeEventListener("keydown",this._handleFlagsContainerKeydown);var t=this._getClosestLabel();t&&t.removeEventListener("click",this._handleLabelClick)}this.hiddenInput&&e&&e.removeEventListener("submit",this._handleHiddenInputSubmit),this.options.autoHideDialCode&&(e&&e.removeEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.removeEventListener("blur",this._handleSubmitOrBlurEvent)),this.telInput.removeEventListener("keyup",this._handleKeyupEvent),this.telInput.removeEventListener("cut",this._handleClipboardEvent),this.telInput.removeEventListener("paste",this._handleClipboardEvent),this.telInput.removeAttribute("data-intl-tel-input-id");var i=this.telInput.parentNode;i.parentNode.insertBefore(this.telInput,i),i.parentNode.removeChild(i),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}},{key:"getNumber",value:function(e){if(window.intlTelInputUtils){var t=this.selectedCountryData.iso2;return intlTelInputUtils.formatNumber(this._getFullNumber(),t,e)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.selectedCountryData}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var e=this.selectedCountryData.iso2;return intlTelInputUtils.getValidationError(this._getFullNumber(),e)}return-99}},{key:"isValidNumber",value:function(){var e=this._getFullNumber().trim(),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null}},{key:"setCountry",value:function(e){var t=e.toLowerCase();this.selectedFlagInner.classList.contains("iti__".concat(t))||(this._setFlag(t),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())}},{key:"setNumber",value:function(e){var t=this._updateFlagFromNumber(e);
vendor: 8,444 bytes, line 59
59this._updateValFromNumber(e),t&&this._triggerCountryChange()}},{key:"setPlaceholderNumberType",value:function(e){this.options.placeholderNumberType=e,this._updatePlaceholder()}}],o&&r(n.prototype,o),h&&r(n,h),i}();o.getCountryData=function(){return t};var d=function(e,t,i){var n=document.createElement("script");n.onload=function(){u("handleUtils"),t&&t()},n.onerror=function(){u("rejectUtilsScriptPromise"),i&&i()},n.className="iti-load-utils",n.async=!0,n.src=e,document.body.appendChild(n)};return o.loadUtils=function(e){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(t,i){return d(e,t,i)});d(e)}return null},o.defaults=a,o.version="17.0.21",function(e,t){var i=new h(e,t);return i._init(),e.setAttribute("data-intl-tel-input-id",i.id),window.intlTelInputGlobals.instances[i.id]=i,i}}()},"object"==typeof t&&t.exports?t.exports=n():window.intlTelInput=n()},{}],249:[function(e,t,i){t.exports=e("./build/js/intlTelInput")},{"./build/js/intlTelInput":248}],250:[function(e,t,i){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],251:[function(require,module,exports){"undefined"!=typeof navigator&&function(e,t){"object"==typeof exports&&void 0!==module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).lottie=t()}(this,function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var i,n,r=e.length;for(i=0;i<r;i+=1)for(var o in n=e[i].prototype)Object.prototype.hasOwnProperty.call(n,o)&&(t.prototype[o]=n[o])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,i=this.audios.length;for(t=0;t<i;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var i,n=0,r=[];switch(e){case"int16":case"uint8c":i=1;break;default:i=1.1}for(n=0;n<t;n+=1)r.push(i);return r}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,i){return"float32"===t?new Float32Array(i):"int16"===t?new Int16Array(i):"uint8c"===t?new Uint8ClampedArray(i):e(t,i)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],i=t.length;for(e=0;e<i;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,i=createSizedArray(e.length),n=e.length;for(t=0;t<n;t+=1)i[t]=Math.abs(e[t]);return i}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(e){_shouldRoundValues=!!e}function bmRnd(e){return _shouldRoundValues?Math.round(e):e}function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,i,n){this.type=e,this.currentTime=t,this.totalTime=i,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,i,n){this.type=e,this.currentLoop=i,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,i){this.type=e,this.firstFrame=t,this.totalFrames=i}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}function BMAnimationConfigErrorEvent(e,t){this.type=e,this.nativeError=t}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,i){var n,r,o,s,a,l,c,u;switch(l=i*(1-t),c=i*(1-(a=6*e-(s=Math.floor(6*e)))*t),u=i*(1-(1-a)*t),s%6){case 0:n=i,r=u,o=l;break;case 1:n=c,r=i,o=l;break;case 2:n=l,r=i,o=u;break;case 3:n=l,r=c,o=i;break;case 4:n=u,r=l,o=i;break;case 5:n=i,r=l,o=c}return[n,r,o]}function RGBtoHSV(e,t,i){var n,r=Math.max(e,t,i),o=Math.min(e,t,i),s=r-o,a=0===r?0:s/r,l=r/255;switch(r){case o:n=0;break;case e:n=t-i+s*(t<i?6:0),n/=6*s;break;case t:n=i-e+2*s,n/=6*s;break;case i:n=e-t+4*s,n/=6*s}return[n,a,l]}function addSaturationToRGB(e,t){var i=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return i[1]+=t,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(e,t){var i=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return i[2]+=t,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(e,t){var i=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return i[0]+=t/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var e,t,i=[];for(e=0;e<256;e+=1)t=e.toString(16),i[e]=1===t.length?"0"+t:t;return function(e,t,n){return e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),"#"+i[e]+i[t]+i[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$5(e)}var dataManager=function(){var e,t,i=1,n=[],r={onmessage:function(){},postMessage:function(t){e({data:t})}},o={postMessage:function(e){r.onmessage({data:e})}};function s(){t||(t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var i=new Blob(["var _workerSelf = self;
59 self.onmessage = ",t.toString()],{type:"text/javascript"}),n=URL.createObjectURL(i);return new Worker(n)}return e=t,r}(function(e){if(o.dataManager||(o.dataManager=function(){function e(r,o){var s,a,l,c,u,d,f=r.length;for(a=0;a<f;a+=1)if("ks"in(s=r[a])&&!s.completed){if(s.completed=!0,s.hasMask){var p=s.masksProperties;for(c=p.length,l=0;l<c;l+=1)if(p[l].pt.k.i)n(p[l].pt.k);else for(d=p[l].pt.k.length,u=0;u<d;u+=1)p[l].pt.k[u].s&&n(p[l].pt.k[u].s[0]),p[l].pt.k[u].e&&n(p[l].pt.k[u].e[0])}0===s.ty?(s.layers=t(s.refId,o),e(s.layers,o)):4===s.ty?i(s.shapes):5===s.ty&&h(s)}}function t(e,t){var i=function(e,t){for(var i=0,n=t.length;i<n;){if(t[i].id===e)return t[i];i+=1}return null}(e,t);return i?i.layers.__used?JSON.parse(JSON.stringify(i.layers)):(i.layers.__used=!0,i.layers):null}function i(e){var t,r,o;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)n(e[t].ks.k);else for(o=e[t].ks.k.length,r=0;r<o;r+=1)e[t].ks.k[r].s&&n(e[t].ks.k[r].s[0]),e[t].ks.k[r].e&&n(e[t].ks.k[r].e[0]);else"gr"===e[t].ty&&i(e[t].it)}function n(e){var t,i=e.i.length;for(t=0;t<i;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function r(e,t){var i=t?t.split("."):[100,100,100];return e[0]>i[0]||!(i[0]>e[0])&&(e[1]>i[1]||!(i[1]>e[1])&&(e[2]>i[2]||!(i[2]>e[2])&&null))}var o,s=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function i(e){var i,n=e.length;for(i=0;i<n;i+=1)5===e[i].ty&&t(e[i])}return function(t){if(r(e,t.v)&&(i(t.layers),t.assets)){var n,o=t.assets.length;for(n=0;n<o;n+=1)t.assets[n].layers&&i(t.assets[n].layers)}}}(),a=(o=[4,7,99],function(e){if(e.chars&&!r(o,e.v)){var t,n=e.chars.length;for(t=0;t<n;t+=1){var s=e.chars[t];s.data&&s.data.shapes&&(i(s.data.shapes),s.data.ip=0,s.data.op=99999,s.data.st=0,s.data.sr=1,s.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},e.chars[t].t||(s.data.shapes.push({ty:"no"}),s.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var e=[5,7,15];function t(e){var t=e.t.p;"number"==typeof t.a&&(t.a={a:0,k:t.a}),"number"==typeof t.p&&(t.p={a:0,k:t.p}),"number"==typeof t.r&&(t.r={a:0,k:t.r})}function i(e){var i,n=e.length;for(i=0;i<n;i+=1)5===e[i].ty&&t(e[i])}return function(t){if(r(e,t.v)&&(i(t.layers),t.assets)){var n,o=t.assets.length;for(n=0;n<o;n+=1)t.assets[n].layers&&i(t.assets[n].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var i,n,r,o=e.length;for(i=0;i<o;i+=1)if("gr"===e[i].ty)t(e[i].it);else if("fl"===e[i].ty||"st"===e[i].ty)if(e[i].c.k&&e[i].c.k[0].i)for(r=e[i].c.k.length,n=0;n<r;n+=1)e[i].c.k[n].s&&(e[i].c.k[n].s[0]/=255,e[i].c.k[n].s[1]/=255,e[i].c.k[n].s[2]/=255,e[i].c.k[n].s[3]/=255),e[i].c.k[n].e&&(e[i].c.k[n].e[0]/=255,e[i].c.k[n].e[1]/=255,e[i].c.k[n].e[2]/=255,e[i].c.k[n].e[3]/=255);else e[i].c.k[0]/=255,e[i].c.k[1]/=255,e[i].c.k[2]/=255,e[i].c.k[3]/=255}function i(e){var i,n=e.length;for(i=0;i<n;i+=1)4===e[i].ty&&t(e[i].shapes)}return function(t){if(r(e,t.v)&&(i(t.layers),t.assets)){var n,o=t.assets.length;for(n=0;n<o;n+=1)t.assets[n].layers&&i(t.assets[n].layers)}}}(),u=function(){var e=[4,4,18];function t(e){var i,n,r;for(i=e.length-1;i>=0;i-=1)if("sh"===e[i].ty)if(e[i].ks.k.i)e[i].ks.k.c=e[i].closed;else for(r=e[i].ks.k.length,n=0;n<r;n+=1)e[i].ks.k[n].s&&(e[i].ks.k[n].s[0].c=e[i].closed),e[i].ks.k[n].e&&(e[i].ks.k[n].e[0].c=e[i].closed);else"gr"===e[i].ty&&t(e[i].it)}function i(e){var i,n,r,o,s,a,l=e.length;for(n=0;n<l;n+=1){if((i=e[n]).hasMask){var c=i.masksProperties;for(o=c.length,r=0;r<o;r+=1)if(c[r].pt.k.i)c[r].pt.k.c=c[r].cl;else for(a=c[r].pt.k.length,s=0;s<a;s+=1)c[r].pt.k[s].s&&(c[r].pt.k[s].s[0].c=c[r].cl),c[r].pt.k[s].e&&(c[r].pt.k[s].e[0].c=c[r].cl)}4===i.ty&&t(i.shapes)}}return function(t){if(r(e,t.v)&&(i(t.layers),t.assets)){var n,o=t.assets.length;for(n=0;n<o;n+=1)t.assets[n].layers&&i(t.assets[n].layers)}}}();function h(e){0===e.t.a.length&&e.t.p}var d={completeData:function(i){i.__complete||(c(i),s(i),a(i),l(i),u(i),e(i.layers,i.assets),function(i,n){if(i){var r=0,o=i.length;for(r=0;r<o;r+=1)1===i[r].t&&(i[r].data.layers=t(i[r].data.refId,n),e(i[r].data.layers,n))}}(i.chars,i.assets),i.__complete=!0)}};return d.checkColors=c,d.checkChars=a,d.checkPathProperties=l,d.checkShapes=u,d.completeLayers=e,d}()),o.assetLoader||(o.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,i,n,r){var o,s=new XMLHttpRequest;try{s.responseType="json"}catch(e){}s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)o=e(s),n(o);else try{o=e(s),n(o)}catch(e){r&&r(e)}};try{s.open(["G","E","T"].join(""),t,!0)}catch(e){s.open(["G","E","T"].join(""),i+"/"+t,!0)}s.send()}}}()),"loadAnimation"===e.data.type)o.assetLoader.load(e.data.path,e.data.fullPath,function(t){o.dataManager.completeData(t),o.postMessage({id:e.data.id,payload:t,status:"success"})},function(){o.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;o.dataManager.completeData(t),o.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&o.assetLoader.load(e.data.path,e.data.fullPath,function(t){o.postMessage({id:e.data.id,payload:t,status:"success"})},function(){o.postMessage({id:e.data.id,status:"error"})})}),t.onmessage=function(e){var t=e.data,i=t.id,r=n[i];
vendor: 105,540 bytes, line 59
59n[i]=null,"success"===t.status?r.onComplete(t.payload):r.onError&&r.onError()})}function a(e,t){var r="processId_"+(i+=1);return n[r]={onComplete:e,onError:t},r}return{loadAnimation:function(e,i,n){s();var r=a(i,n);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:r})},loadData:function(e,i,n){s();var r=a(i,n);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:r})},completeAnimation:function(e,i,n){s();var r=a(i,n);t.postMessage({type:"complete",animation:e,id:r})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(e,t,i){var n="";if(e.e)n=e.p;else if(t){var r=e.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),n=t+r}else n=i,n+=e.u?e.u:"",n+=e.p;return n}function r(e){var t=0,i=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(i)),t+=1}.bind(this),50)}function o(e){var t={assetData:e},i=n(e,this.assetsPath,this.path);return dataManager.loadData(i,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=o.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(e,t){var i;this.imagesLoadedCb=t;var n=e.length;for(i=0;i<n;i+=1)e[i].layers||(e[i].t&&"seq"!==e[i].t?3===e[i].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[i]))):(this.totalImages+=1,this.images.push(this._createImageData(e[i]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,i=this.images.length;t<i;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var i=n(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){o.img=e,this._imageLoaded()}.bind(this),!1),r.src=i;var o={img:r,assetData:t};return o},createImageData:function(t){var i=n(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){o.img=e,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",i),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var o={img:r,assetData:t};return o},imageLoaded:t,footageLoaded:i,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},s}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var i=this._cbs[e],n=0;n<i.length;n+=1)i[n](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var i=0,n=this._cbs[e].length;i<n;)this._cbs[e][i]===t&&(this._cbs[e].splice(i,1),i-=1,n-=1),i+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,i=e.split("\r\n"),n={},r=0,o=0;o<i.length;o+=1)2===(t=i[o].split(":")).length&&(n[t[0]]=t[1].trim(),r+=1);if(0===r)throw new Error;return n}return function(t){for(var i=[],n=0;n<t.length;n+=1){var r=t[n],o={time:r.tm,duration:r.dr};try{o.payload=JSON.parse(t[n].cm)}catch(i){try{o.payload=e(t[n].cm)}catch(e){o.payload={name:t[n].cm}}}i.push(o)}return i}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,i=this.compositions.length;t<i;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var i=getRenderer(t);this.renderer=new i(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var i={wrapper:e,animationData:t},n=e.attributes;i.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",i.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var r=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===r?i.loop=!1:"true"===r?i.loop=!0:""!==r&&(i.loop=parseInt(r,10));var o=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:!n.getNamedItem("bm-autoplay")||n.getNamedItem("bm-autoplay").value;i.autoplay="false"!==o,i.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"","false"===(n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"")&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,i,n=this.animationData.layers,r=n.length,o=e.layers,s=o.length;for(i=0;i<s;i+=1)for(t=0;t<r;){if(n[t].id===o[i].id){n[t]=o[i];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(r=e.assets.length,t=0;t<r;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var i="number"==typeof e?e:void 0,n="number"==typeof t?t:void 0;this.renderer.updateContainerSize(i,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,i=0;i<this.markers.length;i+=1)if((t=this.markers[i]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,i){if(!i||this.name===i){var n=Number(e);if(isNaN(n)){var r=this.getMarkerData(e);r&&this.goToAndStop(r.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,i){if(!i||this.name===i){var n=Number(e);if(isNaN(n)){var r=this.getMarkerData(e);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0))}else this.goToAndStop(n,t,i);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,i=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(i=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),i&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?i=e:this.currentRawFrame+this.firstFrame>t&&(i=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var i,n=e.length;for(i=0;i<n;i+=1)this.segments.push(e[i])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var i=e.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),t=this.assetsPath+i}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,i=this.assets.length;t<i;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,i){try{this.renderer.getElementByPath(e).updateDocumentData(t,i)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],i=0,n=0,r=0,o=!0,s=!1;function a(e){for(var i=0,r=e.target;i<n;)t[i].animation===r&&(t.splice(i,1),i-=1,n-=1,r.isPaused||u()),i+=1}function l(e,i){if(!e)return null;for(var r=0;r<n;){if(t[r].elem===e&&null!==t[r].elem)return t[r].animation;r+=1}var o=new AnimationItem;return h(o,e),o.setData(e,i),o}function c(){r+=1,p()}function u(){r-=1}function h(e,i){e.addEventListener("destroy",a),e.addEventListener("_active",c),e.addEventListener("_idle",u),t.push({elem:i,animation:e}),n+=1}function d(e){var a,l=e-i;for(a=0;a<n;a+=1)t[a].animation.advanceTime(l);i=e,r&&!s?window.requestAnimationFrame(d):o=!0}function f(e){i=e,window.requestAnimationFrame(d)}function p(){!s&&r&&o&&(window.requestAnimationFrame(f),o=!1)}return e.registerAnimation=l,e.loadAnimation=function(e){var t=new AnimationItem;return h(t,null),t.setParams(e),t},e.setSpeed=function(e,i){var r;for(r=0;r<n;r+=1)t[r].animation.setSpeed(e,i)},e.setDirection=function(e,i){var r;for(r=0;r<n;r+=1)t[r].animation.setDirection(e,i)},e.play=function(e){var i;for(i=0;i<n;i+=1)t[i].animation.play(e)},e.pause=function(e){var i;for(i=0;i<n;i+=1)t[i].animation.pause(e)},e.stop=function(e){var i;for(i=0;i<n;i+=1)t[i].animation.stop(e)},e.togglePause=function(e){var i;for(i=0;i<n;i+=1)t[i].animation.togglePause(e)},e.searchAnimations=function(e,t,i){var n,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),o=r.length;for(n=0;n<o;n+=1)i&&r[n].setAttribute("data-bm-type",i),l(r[n],e);if(t&&0===o){i||(i="svg");var s=document.getElementsByTagName("body")[0];s.innerText="";var a=createTag("div");a.style.width="100%",a.style.height="100%",a.setAttribute("data-bm-type",i),s.appendChild(a),l(a,e)}},e.resize=function(){var e;for(e=0;e<n;e+=1)t[e].animation.resize()},e.goToAndStop=function(e,i,r){var o;for(o=0;o<n;o+=1)t[o].animation.goToAndStop(e,i,r)},e.destroy=function(e){var i;for(i=n-1;i>=0;i-=1)t[i].animation.destroy(e)},e.freeze=function(){s=!0},e.unfreeze=function(){s=!1,p()},e.setVolume=function(e,i){var r;for(r=0;r<n;r+=1)t[r].animation.setVolume(e,i)},e.mute=function(e){var i;for(i=0;i<n;i+=1)t[i].animation.mute(e)},e.unmute=function(e){var i;for(i=0;i<n;i+=1)t[i].animation.unmute(e)},e.getRegisteredAnimations=function(){var e,i=t.length,n=[];for(e=0;e<i;e+=1)n.push(t[e].animation);return n},e}(),BezierFactory=function(){var e={getBezierEasing:function(e,i,n,r,o){var s=o||("bez_"+e+"_"+i+"_"+n+"_"+r).replace(/\./g,"p");if(t[s])return t[s];var a=new u([e,i,n,r]);return t[s]=a,a}},t={};var i=11,n=1/(i-1),r="function"==typeof Float32Array;function o(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function a(e){return 3*e}function l(e,t,i){return((o(t,i)*e+s(t,i))*e+a(t))*e}function c(e,t,i){return 3*o(t,i)*e*e+2*s(t,i)*e+a(t)}function u(e){this._p=e,this._mSampleValues=r?new Float32Array(i):new Array(i),this._precomputed=!1,this.get=this.get.bind(this)}return u.prototype={get:function(e){var t=this._p[0],i=this._p[1],n=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),t===i&&n===r?e:0===e?0:1===e?1:l(this._getTForX(e),i,r)},_precompute:function(){var e=this._p[0],t=this._p[1],i=this._p[2],n=this._p[3];this._precomputed=!0,e===t&&i===n||this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],r=0;r<i;++r)this._mSampleValues[r]=l(r*n,e,t)},_getTForX:function(e){for(var t=this._p[0],r=this._p[2],o=this._mSampleValues,s=0,a=1,u=i-1;a!==u&&o[a]<=e;++a)s+=n;var h=s+(e-o[--a])/(o[a+1]-o[a])*n,d=c(h,t,r);return d>=.001?function(e,t,i,n){for(var r=0;r<4;++r){var o=c(t,i,n);if(0===o)return t;t-=(l(t,i,n)-e)/o}return t}(e,h,t,r):0===d?h:function(e,t,i,n,r){var o,s,a=0;do{(o=l(s=t+(i-t)/2,n,r)-e)>0?i=s:t=s}while(Math.abs(o)>1e-7&&++a<10);return s}(e,s,s+n,t,r)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,i){var n=0,r=e,o=createSizedArray(r);return{newElement:function(){return n?o[n-=1]:t()},release:function(e){n===r&&(o=pooling.double(o),r*=2),i&&i(e),o[n]=e,n+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,i=e.lengths.length;for(t=0;t<i;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0});function bezFunction(){var e=Math;function t(e,t,i,n,r,o){var s=e*n+t*r+i*o-r*n-o*e-i*t;return s>-.001&&s<.001}var i=function(e,t,i,n){var r,o,s,a,l,c,u=getDefaultCurveSegments(),h=0,d=[],f=[],p=bezierLengthPool.newElement();for(s=i.length,r=0;r<u;r+=1){for(l=r/(u-1),c=0,o=0;o<s;o+=1)a=bmPow(1-l,3)*e[o]+3*bmPow(1-l,2)*l*i[o]+3*(1-l)*bmPow(l,2)*n[o]+bmPow(l,3)*t[o],d[o]=a,null!==f[o]&&(c+=bmPow(d[o]-f[o],2)),f[o]=d[o];c&&(h+=c=bmSqrt(c)),p.percents[r]=l,p.lengths[r]=h}return p.addedLength=h,p};function n(e){this.segmentLength=0,this.points=new Array(e)}function r(e,t){this.partialLength=e,this.point=t}var o,s=(o={},function(e,i,s,a){var l=(e[0]+"_"+e[1]+"_"+i[0]+"_"+i[1]+"_"+s[0]+"_"+s[1]+"_"+a[0]+"_"+a[1]).replace(/\./g,"p");if(!o[l]){var c,u,h,d,f,p,m,g=getDefaultCurveSegments(),v=0,b=null;2===e.length&&(e[0]!==i[0]||e[1]!==i[1])&&t(e[0],e[1],i[0],i[1],e[0]+s[0],e[1]+s[1])&&t(e[0],e[1],i[0],i[1],i[0]+a[0],i[1]+a[1])&&(g=2);var y=new n(g);for(h=s.length,c=0;c<g;c+=1){for(m=createSizedArray(h),f=c/(g-1),p=0,u=0;u<h;u+=1)d=bmPow(1-f,3)*e[u]+3*bmPow(1-f,2)*f*(e[u]+s[u])+3*(1-f)*bmPow(f,2)*(i[u]+a[u])+bmPow(f,3)*i[u],m[u]=d,null!==b&&(p+=bmPow(m[u]-b[u],2));v+=p=bmSqrt(p),y.points[c]=new r(p,m),b=m}y.segmentLength=v,o[l]=y}return o[l]});function a(e,t){var i=t.percents,n=t.lengths,r=i.length,o=bmFloor((r-1)*e),s=e*t.addedLength,a=0;if(o===r-1||0===o||s===n[o])return i[o];for(var l=n[o]>s?-1:1,c=!0;c;)if(n[o]<=s&&n[o+1]>s?(a=(s-n[o])/(n[o+1]-n[o]),c=!1):o+=l,o<0||o>=r-1){if(o===r-1)return i[o];c=!1}return i[o]+(i[o+1]-i[o])*a}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,n=segmentsLengthPool.newElement(),r=e.c,o=e.v,s=e.o,a=e.i,l=e._length,c=n.lengths,u=0;for(t=0;t<l-1;t+=1)c[t]=i(o[t],o[t+1],s[t],a[t+1]),u+=c[t].addedLength;return r&&l&&(c[t]=i(o[t],o[0],s[t],a[0]),u+=c[t].addedLength),n.totalLength=u,n},getNewSegment:function(t,i,n,r,o,s,c){o<0?o=0:o>1&&(o=1);var u,h=a(o,c),d=a(s=s>1?1:s,c),f=t.length,p=1-h,m=1-d,g=p*p*p,v=h*p*p*3,b=h*h*p*3,y=h*h*h,w=p*p*m,_=h*p*m+p*h*m+p*p*d,k=h*h*m+p*h*d+h*p*d,x=h*h*d,C=p*m*m,S=h*m*m+p*d*m+p*m*d,E=h*d*m+p*d*d+h*m*d,T=h*d*d,A=m*m*m,I=d*m*m+m*d*m+m*m*d,M=d*d*m+m*d*d+d*m*d,P=d*d*d;for(u=0;u<f;u+=1)l[4*u]=e.round(1e3*(g*t[u]+v*n[u]+b*r[u]+y*i[u]))/1e3,l[4*u+1]=e.round(1e3*(w*t[u]+_*n[u]+k*r[u]+x*i[u]))/1e3,l[4*u+2]=e.round(1e3*(C*t[u]+S*n[u]+E*r[u]+T*i[u]))/1e3,l[4*u+3]=e.round(1e3*(A*t[u]+I*n[u]+M*r[u]+P*i[u]))/1e3;return l},getPointInSegment:function(t,i,n,r,o,s){var l=a(o,s),c=1-l;return[e.round(1e3*(c*c*c*t[0]+(l*c*c+c*l*c+c*c*l)*n[0]+(l*l*c+c*l*l+l*c*l)*r[0]+l*l*l*i[0]))/1e3,e.round(1e3*(c*c*c*t[1]+(l*c*c+c*l*c+c*c*l)*n[1]+(l*l*c+c*l*l+l*c*l)*r[1]+l*l*l*i[1]))/1e3]},buildBezierData:s,pointOnLine2D:t,pointOnLine3D:function(i,n,r,o,s,a,l,c,u){if(0===r&&0===a&&0===u)return t(i,n,o,s,l,c);var h,d=e.sqrt(e.pow(o-i,2)+e.pow(s-n,2)+e.pow(a-r,2)),f=e.sqrt(e.pow(l-i,2)+e.pow(c-n,2)+e.pow(u-r,2)),p=e.sqrt(e.pow(l-o,2)+e.pow(c-s,2)+e.pow(u-a,2));return(h=d>f?d>p?d-f-p:p-f-d:p>f?p-f-d:f-d-p)>-1e-4&&h<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var i,n=this.offsetTime;"multidimensional"===this.propType&&(i=createTypedArray("float32",this.pv.length));for(var r,o,s,a,l,c,u,h,d,f=t.lastIndex,p=f,m=this.keyframes.length-1,g=!0;g;){if(r=this.keyframes[p],o=this.keyframes[p+1],p===m-1&&e>=o.t-n){r.h&&(r=o),f=0;break}if(o.t-n>e){f=p;break}p<m-1?p+=1:(f=0,g=!1)}s=this.keyframesMetadata[p]||{};var v,b=o.t-n,y=r.t-n;if(r.to){s.bezierData||(s.bezierData=bez.buildBezierData(r.s,o.s||r.e,r.to,r.ti));var w=s.bezierData;if(e>=b||e<y){var _=e>=b?w.points.length-1:0;for(l=w.points[_].point.length,a=0;a<l;a+=1)i[a]=w.points[_].point[a]}else{s.__fnct?d=s.__fnct:(d=BezierFactory.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,s.__fnct=d),c=d((e-y)/(b-y));var k,x=w.segmentLength*c,C=t.lastFrame<e&&t._lastKeyframeIndex===p?t._lastAddedLength:0;for(h=t.lastFrame<e&&t._lastKeyframeIndex===p?t._lastPoint:0,g=!0,u=w.points.length;g;){if(C+=w.points[h].partialLength,0===x||0===c||h===w.points.length-1){for(l=w.points[h].point.length,a=0;a<l;a+=1)i[a]=w.points[h].point[a];break}if(x>=C&&x<C+w.points[h+1].partialLength){for(k=(x-C)/w.points[h+1].partialLength,l=w.points[h].point.length,a=0;a<l;a+=1)i[a]=w.points[h].point[a]+(w.points[h+1].point[a]-w.points[h].point[a])*k;break}h<u-1?h+=1:g=!1}t._lastPoint=h,t._lastAddedLength=C-w.points[h].partialLength,t._lastKeyframeIndex=p}}else{var S,E,T,A,I;if(m=r.s.length,v=o.s||r.e,this.sh&&1!==r.h)if(e>=b)i[0]=v[0],i[1]=v[1],i[2]=v[2];else if(e<=y)i[0]=r.s[0],i[1]=r.s[1],i[2]=r.s[2];else{quaternionToEuler(i,slerp(createQuaternion(r.s),createQuaternion(v),(e-y)/(b-y)))}else for(p=0;p<m;p+=1)1!==r.h&&(e>=b?c=1:e<y?c=0:(r.o.x.constructor===Array?(s.__fnct||(s.__fnct=[]),s.__fnct[p]?d=s.__fnct[p]:(S=void 0===r.o.x[p]?r.o.x[0]:r.o.x[p],E=void 0===r.o.y[p]?r.o.y[0]:r.o.y[p],T=void 0===r.i.x[p]?r.i.x[0]:r.i.x[p],A=void 0===r.i.y[p]?r.i.y[0]:r.i.y[p],d=BezierFactory.getBezierEasing(S,E,T,A).get,s.__fnct[p]=d)):s.__fnct?d=s.__fnct:(S=r.o.x,E=r.o.y,T=r.i.x,A=r.i.y,d=BezierFactory.getBezierEasing(S,E,T,A).get,r.keyframeMetadata=d),c=d((e-y)/(b-y)))),v=o.s||r.e,I=1===r.h?r.s[p]:r.s[p]+(v[p]-r.s[p])*c,"multidimensional"===this.propType?i[p]=I:i=I}return t.lastIndex=f,i}function slerp(e,t,i){var n,r,o,s,a,l=[],c=e[0],u=e[1],h=e[2],d=e[3],f=t[0],p=t[1],m=t[2],g=t[3];return(r=c*f+u*p+h*m+d*g)<0&&(r=-r,f=-f,p=-p,m=-m,g=-g),1-r>1e-6?(n=Math.acos(r),o=Math.sin(n),s=Math.sin((1-i)*n)/o,a=Math.sin(i*n)/o):(s=1-i,a=i),l[0]=s*c+a*f,l[1]=s*u+a*p,l[2]=s*h+a*m,l[3]=s*d+a*g,l}function quaternionToEuler(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],s=Math.atan2(2*n*o-2*i*r,1-2*n*n-2*r*r),a=Math.asin(2*i*n+2*r*o),l=Math.atan2(2*i*o-2*n*r,1-2*i*i-2*r*r);e[0]=s/degToRads,e[1]=a/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,i=e[1]*degToRads,n=e[2]*degToRads,r=Math.cos(t/2),o=Math.cos(i/2),s=Math.cos(n/2),a=Math.sin(t/2),l=Math.sin(i/2),c=Math.sin(n/2);return[a*l*s+r*o*c,a*o*s+r*l*c,r*l*s-a*o*c,r*o*s-a*l*c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if("unidimensional"===this.propType)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var i=0,n=this.v.length;i<n;)t=e[i]*this.mult,mathAbs(this.v[i]-t)>1e-5&&(this.v[i]=t,this._mdf=!0),i+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)i=this.effectsSequence[e](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,i,n){this.propType="unidimensional",this.mult=i||1,this.data=t,this.v=i?t.k*i:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,i,n){var r;this.propType="multidimensional",this.mult=i||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var o=t.k.length;for(this.v=createTypedArray("float32",o),this.pv=createTypedArray("float32",o),this.vel=createTypedArray("float32",o),r=0;r<o;r+=1)this.v[r]=t.k[r]*this.mult,this.pv[r]=t.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,i,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=i||1,this.elem=e,this.container=n,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,i,n){var r;this.propType="multidimensional";var o,s,a,l,c=t.k.length;for(r=0;r<c-1;r+=1)t.k[r].to&&t.k[r].s&&t.k[r+1]&&t.k[r+1].s&&(o=t.k[r].s,s=t.k[r+1].s,a=t.k[r].to,l=t.k[r].ti,(2===o.length&&(o[0]!==s[0]||o[1]!==s[1])&&bez.pointOnLine2D(o[0],o[1],s[0],s[1],o[0]+a[0],o[1]+a[1])&&bez.pointOnLine2D(o[0],o[1],s[0],s[1],s[0]+l[0],s[1]+l[1])||3===o.length&&(o[0]!==s[0]||o[1]!==s[1]||o[2]!==s[2])&&bez.pointOnLine3D(o[0],o[1],o[2],s[0],s[1],s[2],o[0]+a[0],o[1]+a[1],o[2]+a[2])&&bez.pointOnLine3D(o[0],o[1],o[2],s[0],s[1],s[2],s[0]+l[0],s[1]+l[1],s[2]+l[2]))&&(t.k[r].to=null,t.k[r].ti=null),o[0]===s[0]&&o[1]===s[1]&&0===a[0]&&0===a[1]&&0===l[0]&&0===l[1]&&(2===o.length||o[2]===s[2]&&0===a[2]&&0===l[2])&&(t.k[r].to=null,t.k[r].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var u=t.k[0].s.length;for(this.v=createTypedArray("float32",u),this.pv=createTypedArray("float32",u),r=0;r<u;r+=1)this.v[r]=initFrame,this.pv[r]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",u)},this.addEffect=addEffect}var PropertyFactory={getProp:function(e,t,i,n,r){var o;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if("number"==typeof t.k[0])o=new MultiDimensionalProperty(e,t,n,r);else switch(i){case 0:o=new KeyframedValueProperty(e,t,n,r);break;case 1:o=new KeyframedMultidimensionalProperty(e,t,n,r)}else o=new ValueProperty(e,t,n,r);return o.effectsSequence.length&&r.addDynamicProperty(o),o}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var i=0;i<t;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,i,n,r){var o;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":o=this.v;break;case"i":o=this.i;break;case"o":o=this.o;break;default:o=[]}(!o[n]||o[n]&&!r)&&(o[n]=pointPool.newElement()),o[n][0]=e,o[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,i,n,r,o,s,a){this.setXYAt(e,t,"v",s,a),this.setXYAt(i,n,"o",s,a),this.setXYAt(r,o,"i",s,a)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,i=this.o,n=this.i,r=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],i[0][0],i[0][1],0,!1),r=1);var o,s=this._length-1,a=this._length;for(o=r;o<a;o+=1)e.setTripleAt(t[s][0],t[s][1],n[s][0],n[s][1],i[s][0],i[s][1],o,!1),s-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(e){var t,i=e._length;for(t=0;t<i;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1}),factory.clone=function(e){var t,i=factory.newElement(),n=void 0===e._length?e.v.length:e._length;for(i.setLength(n),i.c=e.c,t=0;t<n;t+=1)i.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return i},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(e){var t,i=e._length;for(t=0;t<i;t+=1)shapePool.release(e.shapes[t]);e._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=e,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var e=-999999;function t(e,t,i){var n,r,o,s,a,l,c,u,h,d=i.lastIndex,f=this.keyframes;if(e<f[0].t-this.offsetTime)n=f[0].s[0],o=!0,d=0;else if(e>=f[f.length-1].t-this.offsetTime)n=f[f.length-1].s?f[f.length-1].s[0]:f[f.length-2].e[0],o=!0;else{for(var p,m,g,v=d,b=f.length-1,y=!0;y&&(p=f[v],!((m=f[v+1]).t-this.offsetTime>e));)v<b-1?v+=1:y=!1;if(g=this.keyframesMetadata[v]||{},d=v,!(o=1===p.h)){if(e>=m.t-this.offsetTime)u=1;else if(e<p.t-this.offsetTime)u=0;else{var w;g.__fnct?w=g.__fnct:(w=BezierFactory.getBezierEasing(p.o.x,p.o.y,p.i.x,p.i.y).get,g.__fnct=w),u=w((e-(p.t-this.offsetTime))/(m.t-this.offsetTime-(p.t-this.offsetTime)))}r=m.s?m.s[0]:p.e[0]}n=p.s[0]}for(l=t._length,c=n.i[0].length,i.lastIndex=d,s=0;s<l;s+=1)for(a=0;a<c;a+=1)h=o?n.i[s][a]:n.i[s][a]+(r.i[s][a]-n.i[s][a])*u,t.i[s][a]=h,h=o?n.o[s][a]:n.o[s][a]+(r.o[s][a]-n.o[s][a])*u,t.o[s][a]=h,h=o?n.v[s][a]:n.v[s][a]+(r.v[s][a]-n.v[s][a])*u,t.v[s][a]=h}function i(){var t=this.comp.renderedFrame-this.offsetTime,i=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==e&&(r<i&&t<i||r>n&&t>n)||(this._caching.lastIndex=r<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function n(){this.paths=this.localShapeCollection}function r(e){(function(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var i,n=e._length;for(i=0;i<n;i+=1)if(e.v[i][0]!==t.v[i][0]||e.v[i][1]!==t.v[i][1]||e.o[i][0]!==t.o[i][0]||e.o[i][1]!==t.o[i][1]||e.i[i][0]!==t.i[i][0]||e.i[i][1]!==t.i[i][1])return!1;return!0})(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e,t;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var i=this.effectsSequence.length;for(t=0;t<i;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function s(e,t,i){this.propType="shape",this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===i?t.pt.k:t.ks.k;this.v=shapePool.clone(r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function a(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function l(t,r,o){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===o?r.pt.k:r.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var s=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=n,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[i.bind(this)]}s.prototype.interpolateShape=t,s.prototype.getValue=o,s.prototype.setVValue=r,s.prototype.addEffect=a,l.prototype.getValue=o,l.prototype.interpolateShape=t,l.prototype.setVValue=r,l.prototype.addEffect=a;var c=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],i=this.p.v[1],n=this.s.v[0]/2,r=this.s.v[1]/2,o=3!==this.d,s=this.v;s.v[0][0]=t,s.v[0][1]=i-r,s.v[1][0]=o?t+n:t-n,s.v[1][1]=i,s.v[2][0]=t,s.v[2][1]=i+r,s.v[3][0]=o?t-n:t+n,s.v[3][1]=i,s.i[0][0]=o?t-n*e:t+n*e,s.i[0][1]=i-r,s.i[1][0]=o?t+n:t-n,s.i[1][1]=i-r*e,s.i[2][0]=o?t+n*e:t-n*e,s.i[2][1]=i+r,s.i[3][0]=o?t-n:t+n,s.i[3][1]=i+r*e,s.o[0][0]=o?t+n*e:t-n*e,s.o[0][1]=i-r,s.o[1][0]=o?t+n:t-n,s.o[1][1]=i+r*e,s.o[2][0]=o?t-n*e:t+n*e,s.o[2][1]=i+r,s.o[3][0]=o?t-n:t+n,s.o[3][1]=i-r*e}},extendPrototype([DynamicPropertyContainer],t),t}(),u=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),1===t.sy?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e,t,i,n,r=2*Math.floor(this.pt.v),o=2*Math.PI/r,s=!0,a=this.or.v,l=this.ir.v,c=this.os.v,u=this.is.v,h=2*Math.PI*a/(2*r),d=2*Math.PI*l/(2*r),f=-Math.PI/2;f+=this.r.v;var p=3===this.data.d?-1:1;for(this.v._length=0,e=0;e<r;e+=1){i=s?c:u,n=s?h:d;var m=(t=s?a:l)*Math.cos(f),g=t*Math.sin(f),v=0===m&&0===g?0:g/Math.sqrt(m*m+g*g),b=0===m&&0===g?0:-m/Math.sqrt(m*m+g*g);m+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(m,g,m-v*n*i*p,g-b*n*i*p,m+v*n*i*p,g+b*n*i*p,e,!0),s=!s,f+=o*p}},convertPolygonToPath:function(){var e,t=Math.floor(this.pt.v),i=2*Math.PI/t,n=this.or.v,r=this.os.v,o=2*Math.PI*n/(4*t),s=.5*-Math.PI,a=3===this.data.d?-1:1;for(s+=this.r.v,this.v._length=0,e=0;e<t;e+=1){var l=n*Math.cos(s),c=n*Math.sin(s),u=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),h=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-u*o*r*a,c-h*o*r*a,l+u*o*r*a,c+h*o*r*a,e,!0),s+=i*a}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),h=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],i=this.s.v[0]/2,n=this.s.v[1]/2,r=bmMin(i,n,this.r.v),o=r*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(e+i,t-n+r,e+i,t-n+r,e+i,t-n+o,0,!0),this.v.setTripleAt(e+i,t+n-r,e+i,t+n-o,e+i,t+n-r,1,!0),0!==r?(this.v.setTripleAt(e+i-r,t+n,e+i-r,t+n,e+i-o,t+n,2,!0),this.v.setTripleAt(e-i+r,t+n,e-i+o,t+n,e-i+r,t+n,3,!0),this.v.setTripleAt(e-i,t+n-r,e-i,t+n-r,e-i,t+n-o,4,!0),this.v.setTripleAt(e-i,t-n+r,e-i,t-n+o,e-i,t-n+r,5,!0),this.v.setTripleAt(e-i+r,t-n,e-i+r,t-n,e-i+o,t-n,6,!0),this.v.setTripleAt(e+i-r,t-n,e+i-o,t-n,e+i-r,t-n,7,!0)):(this.v.setTripleAt(e-i,t+n,e-i+o,t+n,e-i,t+n,2),this.v.setTripleAt(e-i,t-n,e-i,t-n+o,e-i,t-n,3))):(this.v.setTripleAt(e+i,t-n+r,e+i,t-n+o,e+i,t-n+r,0,!0),0!==r?(this.v.setTripleAt(e+i-r,t-n,e+i-r,t-n,e+i-o,t-n,1,!0),this.v.setTripleAt(e-i+r,t-n,e-i+o,t-n,e-i+r,t-n,2,!0),this.v.setTripleAt(e-i,t-n+r,e-i,t-n+r,e-i,t-n+o,3,!0),this.v.setTripleAt(e-i,t+n-r,e-i,t+n-o,e-i,t+n-r,4,!0),this.v.setTripleAt(e-i+r,t+n,e-i+r,t+n,e-i+o,t+n,5,!0),this.v.setTripleAt(e+i-r,t+n,e+i-o,t+n,e+i-r,t+n,6,!0),this.v.setTripleAt(e+i,t+n-r,e+i,t+n-r,e+i,t+n-o,7,!0)):(this.v.setTripleAt(e-i,t-n,e-i+o,t-n,e-i,t-n,1,!0),this.v.setTripleAt(e-i,t+n,e-i,t+n-o,e-i,t+n,2,!0),this.v.setTripleAt(e+i,t+n,e+i-o,t+n,e+i,t+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],e),e}();var d={getShapeProp:function(e,t,i){var n;return 3===i||4===i?n=(3===i?t.pt:t.ks).k.length?new l(e,t,i):new s(e,t,i):5===i?n=new h(e,t):6===i?n=new c(e,t):7===i&&(n=new u(e,t)),n.k&&e.addDynamicProperty(n),n},getConstructorFunction:function(){return s},getKeyframedConstructorFunction:function(){return l}};return d}(),Matrix=function(){var e=Math.cos,t=Math.sin,i=Math.tan,n=Math.round;function r(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function o(i){if(0===i)return this;var n=e(i),r=t(i);return this._t(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1)}function s(i){if(0===i)return this;var n=e(i),r=t(i);return this._t(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1)}function a(i){if(0===i)return this;var n=e(i),r=t(i);return this._t(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1)}function l(i){if(0===i)return this;var n=e(i),r=t(i);return this._t(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1)}function c(e,t){return this._t(1,t,e,1,0,0)}function u(e,t){return this.shear(i(e),i(t))}function h(n,r){var o=e(r),s=t(r);return this._t(o,s,0,0,-s,o,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(n),1,0,0,0,0,1,0,0,0,0,1)._t(o,-s,0,0,s,o,0,0,0,0,1,0,0,0,0,1)}function d(e,t,i){return i||0===i||(i=1),1===e&&1===t&&1===i?this:this._t(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1)}function f(e,t,i,n,r,o,s,a,l,c,u,h,d,f,p,m){return this.props[0]=e,this.props[1]=t,this.props[2]=i,this.props[3]=n,this.props[4]=r,this.props[5]=o,this.props[6]=s,this.props[7]=a,this.props[8]=l,this.props[9]=c,this.props[10]=u,this.props[11]=h,this.props[12]=d,this.props[13]=f,this.props[14]=p,this.props[15]=m,this}function p(e,t,i){return i=i||0,0!==e||0!==t||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,i,1):this}function m(e,t,i,n,r,o,s,a,l,c,u,h,d,f,p,m){var g=this.props;if(1===e&&0===t&&0===i&&0===n&&0===r&&1===o&&0===s&&0===a&&0===l&&0===c&&1===u&&0===h)return g[12]=g[12]*e+g[15]*d,g[13]=g[13]*o+g[15]*f,g[14]=g[14]*u+g[15]*p,g[15]*=m,this._identityCalculated=!1,this;var v=g[0],b=g[1],y=g[2],w=g[3],_=g[4],k=g[5],x=g[6],C=g[7],S=g[8],E=g[9],T=g[10],A=g[11],I=g[12],M=g[13],P=g[14],D=g[15];return g[0]=v*e+b*r+y*l+w*d,g[1]=v*t+b*o+y*c+w*f,g[2]=v*i+b*s+y*u+w*p,g[3]=v*n+b*a+y*h+w*m,g[4]=_*e+k*r+x*l+C*d,g[5]=_*t+k*o+x*c+C*f,g[6]=_*i+k*s+x*u+C*p,g[7]=_*n+k*a+x*h+C*m,g[8]=S*e+E*r+T*l+A*d,g[9]=S*t+E*o+T*c+A*f,g[10]=S*i+E*s+T*u+A*p,g[11]=S*n+E*a+T*h+A*m,g[12]=I*e+M*r+P*l+D*d,g[13]=I*t+M*o+P*c+D*f,g[14]=I*i+M*s+P*u+D*p,g[15]=I*n+M*a+P*h+D*m,this._identityCalculated=!1,this}function g(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function v(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function b(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function y(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function w(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function _(e,t,i){return{x:e*this.props[0]+t*this.props[4]+i*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+i*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+i*this.props[10]+this.props[14]}}function k(e,t,i){return e*this.props[0]+t*this.props[4]+i*this.props[8]+this.props[12]}function x(e,t,i){return e*this.props[1]+t*this.props[5]+i*this.props[9]+this.props[13]}function C(e,t,i){return e*this.props[2]+t*this.props[6]+i*this.props[10]+this.props[14]}function S(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,i=-this.props[1]/e,n=-this.props[4]/e,r=this.props[0]/e,o=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,s=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,a=new Matrix;return a.props[0]=t,a.props[1]=i,a.props[4]=n,a.props[5]=r,a.props[12]=o,a.props[13]=s,a}function E(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function T(e){var t,i=e.length,n=[];for(t=0;t<i;t+=1)n[t]=E(e[t]);return n}function A(e,t,i){var n=createTypedArray("float32",6);if(this.isIdentity())n[0]=e[0],n[1]=e[1],n[2]=t[0],n[3]=t[1],n[4]=i[0],n[5]=i[1];else{var r=this.props[0],o=this.props[1],s=this.props[4],a=this.props[5],l=this.props[12],c=this.props[13];n[0]=e[0]*r+e[1]*s+l,n[1]=e[0]*o+e[1]*a+c,n[2]=t[0]*r+t[1]*s+l,n[3]=t[0]*o+t[1]*a+c,n[4]=i[0]*r+i[1]*s+l,n[5]=i[0]*o+i[1]*a+c}return n}function I(e,t,i){return this.isIdentity()?[e,t,i]:[e*this.props[0]+t*this.props[4]+i*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+i*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+i*this.props[10]+this.props[14]]}function M(e,t){if(this.isIdentity())return e+","+t;var i=this.props;return Math.round(100*(e*i[0]+t*i[4]+i[12]))/100+","+Math.round(100*(e*i[1]+t*i[5]+i[13]))/100}function P(){for(var e=0,t=this.props,i="matrix3d(";e<16;)i+=n(1e4*t[e])/1e4,i+=15===e?")":",",e+=1;return i}function D(e){return e<1e-6&&e>0||e>-1e-6&&e<0?n(1e4*e)/1e4:e}function O(){var e=this.props;return"matrix("+D(e[0])+","+D(e[1])+","+D(e[4])+","+D(e[5])+","+D(e[12])+","+D(e[13])+")"}return function(){this.reset=r,this.rotate=o,this.rotateX=s,this.rotateY=a,this.rotateZ=l,this.skew=u,this.skewFromAxis=h,this.shear=c,this.scale=d,this.setTransform=f,this.translate=p,this.transform=m,this.multiply=g,this.applyToPoint=_,this.applyToX=k,this.applyToY=x,this.applyToZ=C,this.applyToPointArray=I,this.applyToTriplePoints=A,this.applyToPointStringified=M,this.toCSS=P,this.to2dCSS=O,this.clone=y,this.cloneFromProps=w,this.equals=b,this.inversePoints=T,this.inversePoint=E,this.getInverseMatrix=S,this._t=this.transform,this.isIdentity=v,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$3(e)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(e){setLocationHref(e)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return!0===standalone&&(e.animationData=JSON.parse(animationData)),animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),i=0;i<t.length;i+=1){var n=t[i].split("=");if(decodeURIComponent(n[0])==e)return decodeURIComponent(n[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===(void 0===exports?"undefined":_typeof$3(exports))&&void 0!==module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};return e.registerModifier=function(e,i){t[e]||(t[e]=i)},e.getModifier=function(e,i,n){return new t[e](i,n)},e}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,i,n,r){var o=[];t<=1?o.push({s:e,e:t}):e>=1?o.push({s:e-1,e:t-1}):(o.push({s:e,e:1}),o.push({s:0,e:t-1}));var s,a,l=[],c=o.length;for(s=0;s<c;s+=1){var u,h;if(!((a=o[s]).e*r<n||a.s*r>n+i))u=a.s*r<=n?0:(a.s*r-n)/i,h=a.e*r>=n+i?1:(a.e*r-n)/i,l.push([u,h])}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,i=e.length;for(t=0;t<i;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,i,n,r;if(this._mdf||e){var o=this.o.v%360/360;if(o<0&&(o+=1),(t=this.s.v>1?1+o:this.s.v<0?0+o:this.s.v+o)>(i=this.e.v>1?1+o:this.e.v<0?0+o:this.e.v+o)){var s=t;t=i,i=s}t=1e-4*Math.round(1e4*t),i=1e-4*Math.round(1e4*i),this.sValue=t,this.eValue=i}else t=this.sValue,i=this.eValue;var a,l,c,u,h,d=this.shapes.length,f=0;if(i===t)for(r=0;r<d;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape._mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection,this._mdf&&(this.shapes[r].pathsData.length=0);else if(1===i&&0===t||0===i&&1===t){if(this._mdf)for(r=0;r<d;r+=1)this.shapes[r].pathsData.length=0,this.shapes[r].shape._mdf=!0}else{var p,m,g=[];for(r=0;r<d;r+=1)if((p=this.shapes[r]).shape._mdf||this._mdf||e||2===this.m){if(l=(n=p.shape.paths)._length,h=0,!p.shape._mdf&&p.pathsData.length)h=p.totalShapeLength;else{for(c=this.releasePathsData(p.pathsData),a=0;a<l;a+=1)u=bez.getSegmentsLength(n.shapes[a]),c.push(u),h+=u.totalLength;p.totalShapeLength=h,p.pathsData=c}f+=h,p.shape._mdf=!0}else p.shape.paths=p.localShapeCollection;var v,b=t,y=i,w=0;for(r=d-1;r>=0;r-=1)if((p=this.shapes[r]).shape._mdf){for((m=p.localShapeCollection).releaseShapes(),2===this.m&&d>1?(v=this.calculateShapeEdges(t,i,p.totalShapeLength,w,f),w+=p.totalShapeLength):v=[[b,y]],l=v.length,a=0;a<l;a+=1){b=v[a][0],y=v[a][1],g.length=0,y<=1?g.push({s:p.totalShapeLength*b,e:p.totalShapeLength*y}):b>=1?g.push({s:p.totalShapeLength*(b-1),e:p.totalShapeLength*(y-1)}):(g.push({s:p.totalShapeLength*b,e:p.totalShapeLength}),g.push({s:0,e:p.totalShapeLength*(y-1)}));var _=this.addShapes(p,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(p.shape.paths.shapes[p.shape.paths._length-1].c){var k=_.pop();this.addPaths(_,m),_=this.addShapes(p,g[1],k)}else this.addPaths(_,m),_=this.addShapes(p,g[1]);this.addPaths(_,m)}}p.shape.paths=m}}},TrimModifier.prototype.addPaths=function(e,t){var i,n=e.length;for(i=0;i<n;i+=1)t.addShape(e[i])},TrimModifier.prototype.addSegment=function(e,t,i,n,r,o,s){r.setXYAt(t[0],t[1],"o",o),r.setXYAt(i[0],i[1],"i",o+1),s&&r.setXYAt(e[0],e[1],"v",o),r.setXYAt(n[0],n[1],"v",o+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,i,n){t.setXYAt(e[1],e[5],"o",i),t.setXYAt(e[2],e[6],"i",i+1),n&&t.setXYAt(e[0],e[4],"v",i),t.setXYAt(e[3],e[7],"v",i+1)},TrimModifier.prototype.addShapes=function(e,t,i){var n,r,o,s,a,l,c,u,h=e.pathsData,d=e.shape.paths.shapes,f=e.shape.paths._length,p=0,m=[],g=!0;for(i?(a=i._length,u=i._length):(i=shapePool.newElement(),a=0,u=0),m.push(i),n=0;n<f;n+=1){for(l=h[n].lengths,i.c=d[n].c,o=d[n].c?l.length:l.length+1,r=1;r<o;r+=1)if(p+(s=l[r-1]).addedLength<t.s)p+=s.addedLength,i.c=!1;else{if(p>t.e){i.c=!1;break}t.s<=p&&t.e>=p+s.addedLength?(this.addSegment(d[n].v[r-1],d[n].o[r-1],d[n].i[r],d[n].v[r],i,a,g),g=!1):(c=bez.getNewSegment(d[n].v[r-1],d[n].v[r],d[n].o[r-1],d[n].i[r],(t.s-p)/s.addedLength,(t.e-p)/s.addedLength,l[r-1]),this.addSegmentFromArray(c,i,a,g),g=!1,i.c=!1),p+=s.addedLength,a+=1}if(d[n].c&&l.length){if(s=l[r-1],p<=t.e){var v=l[r-1].addedLength;t.s<=p&&t.e>=p+v?(this.addSegment(d[n].v[r-1],d[n].o[r-1],d[n].i[0],d[n].v[0],i,a,g),g=!1):(c=bez.getNewSegment(d[n].v[r-1],d[n].v[0],d[n].o[r-1],d[n].i[0],(t.s-p)/v,(t.e-p)/v,l[r-1]),this.addSegmentFromArray(c,i,a,g),g=!1,i.c=!1)}else i.c=!1;p+=s.addedLength,a+=1}if(i._length&&(i.setXYAt(i.v[u][0],i.v[u][1],"i",u),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),p>t.e)break;n<f-1&&(i=shapePool.newElement(),g=!0,m.push(i),a=0)}return m},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var i=t/100,n=[0,0],r=e._length,o=0;for(o=0;o<r;o+=1)n[0]+=e.v[o][0],n[1]+=e.v[o][1];n[0]/=r,n[1]/=r;var s,a,l,c,u,h,d=shapePool.newElement();for(d.c=e.c,o=0;o<r;o+=1)s=e.v[o][0]+(n[0]-e.v[o][0])*i,a=e.v[o][1]+(n[1]-e.v[o][1])*i,l=e.o[o][0]+(n[0]-e.o[o][0])*-i,c=e.o[o][1]+(n[1]-e.o[o][1])*-i,u=e.i[o][0]+(n[0]-e.i[o][0])*-i,h=e.i[o][1]+(n[1]-e.i[o][1])*-i,d.setTripleAt(s,a,l,c,u,h,o);return d},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,i,n,r,o,s,a=this.shapes.length,l=this.amount.v;if(0!==l)for(i=0;i<a;i+=1){if(s=(o=this.shapes[i]).localShapeCollection,o.shape._mdf||this._mdf||e)for(s.releaseShapes(),o.shape._mdf=!0,t=o.shape.paths.shapes,r=o.shape.paths._length,n=0;n<r;n+=1)s.addShape(this.processPath(t[n],l));o.shape.paths=o.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e,t,i){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var n,r=t.or.k.length;for(n=0;n<r;n+=1)t.or.k[n].to=null,t.or.k[n].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var n,r;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),r=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(n=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],r=[];var o=this.px,s=this.py;o._caching.lastFrame+o.offsetTime<=o.keyframes[0].t?(n[0]=o.getValueAtTime((o.keyframes[0].t+.01)/i,0),n[1]=s.getValueAtTime((s.keyframes[0].t+.01)/i,0),r[0]=o.getValueAtTime(o.keyframes[0].t/i,0),r[1]=s.getValueAtTime(s.keyframes[0].t/i,0)):o._caching.lastFrame+o.offsetTime>=o.keyframes[o.keyframes.length-1].t?(n[0]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/i,0),n[1]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/i,0),r[0]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/i,0),r[1]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/i,0)):(n=[o.pv,s.pv],r[0]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/i,o.offsetTime),r[1]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/i,s.offsetTime))}else n=r=e;this.v.rotate(-Math.atan2(n[1]-r[1],n[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,i,n){return new t(e,i,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,i){return e*(1-i)+t*i}function lerpPoint(e,t,i){return[lerp(e[0],t[0],i),lerp(e[1],t[1],i)]}function quadRoots(e,t,i){if(0===e)return[];var n=t*t-4*e*i;if(n<0)return[];var r=-t/(2*e);if(0===n)return[r];var o=Math.sqrt(n)/(2*e);return[r-o,r+o]}function polynomialCoefficients(e,t,i,n){return[3*t-e-3*i+n,3*e-6*t+3*i,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,i,n,r){r&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),r&&pointEqual(i,n)&&(i=lerpPoint(e,n,2/3));var o=polynomialCoefficients(e[0],t[0],i[0],n[0]),s=polynomialCoefficients(e[1],t[1],i[1],n[1]);this.a=[o[0],s[0]],this.b=[o[1],s[1]],this.c=[o[2],s[2]],this.d=[o[3],s[3]],this.points=[e,t,i,n]}function extrema(e,t){var i=e.points[0][t],n=e.points[e.points.length-1][t];if(i>n){var r=n;n=i,i=r}for(var o=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),s=0;s<o.length;s+=1)if(o[s]>0&&o[s]<1){var a=e.point(o[s])[t];a<i?i=a:a>n&&(n=a)}return{min:i,max:n}}function intersectData(e,t,i){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+i)/2,t1:t,t2:i}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,i,n,r,o){if(boxIntersect(e,t))if(i>=o||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n)r.push([e.t,t.t]);else{var s=splitData(e),a=splitData(t);intersectsImpl(s[0],a[0],i+1,n,r,o),intersectsImpl(s[0],a[1],i+1,n,r,o),intersectsImpl(s[1],a[0],i+1,n,r,o),intersectsImpl(s[1],a[1],i+1,n,r,o)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,i,n){var r=[e[0],e[1],1],o=[t[0],t[1],1],s=[i[0],i[1],1],a=[n[0],n[1],1],l=crossProduct(crossProduct(r,o),crossProduct(s,a));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,i){return[e[0]+Math.cos(t)*i,e[1]-Math.sin(t)*i]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,i,n,r,o,s){var a=i-Math.PI/2,l=i+Math.PI/2,c=t[0]+Math.cos(i)*n*r,u=t[1]-Math.sin(i)*n*r;e.setTripleAt(c,u,c+Math.cos(a)*o,u-Math.sin(a)*o,c+Math.cos(l)*s,u-Math.sin(l)*s,e.length())}function getPerpendicularVector(e,t){var i=[t[0]-e[0],t[1]-e[1]],n=.5*-Math.PI;return[Math.cos(n)*i[0]-Math.sin(n)*i[1],Math.sin(n)*i[0]+Math.cos(n)*i[1]]}function getProjectingAngle(e,t){var i=0===t?e.length()-1:t-1,n=(t+1)%e.length(),r=getPerpendicularVector(e.v[i],e.v[n]);return Math.atan2(0,1)-Math.atan2(r[1],r[0])}function zigZagCorner(e,t,i,n,r,o,s){var a=getProjectingAngle(t,i),l=t.v[i%t._length],c=t.v[0===i?t._length-1:i-1],u=t.v[(i+1)%t._length],h=2===o?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0,d=2===o?Math.sqrt(Math.pow(l[0]-u[0],2)+Math.pow(l[1]-u[1],2)):0;setPoint(e,t.v[i%t._length],a,s,n,d/(2*(r+1)),h/(2*(r+1)),o)}function zigZagSegment(e,t,i,n,r,o){for(var s=0;s<n;s+=1){var a=(s+1)/(n+1),l=2===r?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,c=t.normalAngle(a);setPoint(e,t.point(a),c,o,i,l/(2*(n+1)),l/(2*(n+1)),r),o=-o}return o}function linearOffset(e,t,i){var n=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,n,i),polarOffset(t,n,i)]}function offsetSegment(e,t){var i,n,r,o,s,a,l;i=(l=linearOffset(e.points[0],e.points[1],t))[0],n=l[1],r=(l=linearOffset(e.points[1],e.points[2],t))[0],o=l[1],s=(l=linearOffset(e.points[2],e.points[3],t))[0],a=l[1];var c=lineIntersection(i,n,r,o);null===c&&(c=n);var u=lineIntersection(s,a,r,o);return null===u&&(u=s),new PolynomialBezier(i,c,u,a)}function joinLines(e,t,i,n,r){var o=t.points[3],s=i.points[0];if(3===n)return o;if(pointEqual(o,s))return o;if(2===n){var a=-t.tangentAngle(1),l=-i.tangentAngle(0)+Math.PI,c=lineIntersection(o,polarOffset(o,a+Math.PI/2,100),s,polarOffset(s,a+Math.PI/2,100)),u=c?pointDistance(c,o):pointDistance(o,s)/2,h=polarOffset(o,a,2*u*roundCorner);return e.setXYAt(h[0],h[1],"o",e.length()-1),h=polarOffset(s,l,2*u*roundCorner),e.setTripleAt(s[0],s[1],s[0],s[1],h[0],h[1],e.length()),s}var d=lineIntersection(pointEqual(o,t.points[2])?t.points[0]:t.points[2],o,s,pointEqual(s,i.points[1])?i.points[3]:i.points[1]);return d&&pointDistance(d,o)<r?(e.setTripleAt(d[0],d[1],d[0],d[1],d[0],d[1],e.length()),d):o}function getIntersection(e,t){var i=e.intersections(t);return i.length&&floatEqual(i[0][0],1)&&i.shift(),i.length?i[0]:null}function pruneSegmentIntersection(e,t){var i=e.slice(),n=t.slice(),r=getIntersection(e[e.length-1],t[0]);return r&&(i[e.length-1]=e[e.length-1].split(r[0])[0],n[0]=t[0].split(r[1])[1]),e.length>1&&t.length>1&&(r=getIntersection(e[0],t[t.length-1]))?[[e[0].split(r[0])[0]],[t[t.length-1].split(r[1])[1]]]:[i,n]}function pruneIntersections(e){for(var t,i=1;i<e.length;i+=1)t=pruneSegmentIntersection(e[i-1],e[i]),e[i-1]=t[0],e[i]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var i,n,r,o,s=e.inflectionPoints();if(0===s.length)return[offsetSegment(e,t)];if(1===s.length||floatEqual(s[1],1))return i=(r=e.split(s[0]))[0],n=r[1],[offsetSegment(i,t),offsetSegment(n,t)];i=(r=e.split(s[0]))[0];var a=(s[1]-s[0])/(1-s[0]);return o=(r=r[1].split(a))[0],n=r[1],[offsetSegment(i,t),offsetSegment(o,t),offsetSegment(n,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],i="normal",n="normal",r=t.length,o=0;o<r;o+=1)switch(t[o].toLowerCase()){case"italic":n="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200"}return{style:n,weight:e.fWeight||i}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,i,n,r,o){var s=o?-1:1,a=n.s.v[0]+(1-n.s.v[0])*(1-r),l=n.s.v[1]+(1-n.s.v[1])*(1-r);e.translate(n.p.v[0]*s*r,n.p.v[1]*s*r,n.p.v[2]),t.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),t.rotate(-n.r.v*s*r),t.translate(n.a.v[0],n.a.v[1],n.a.v[2]),i.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),i.scale(o?1/a:a,o?1/l:l),i.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(e,t,i,n){for(this.elem=e,this.arr=t,this.pos=i,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[i]);i>0;)i-=1,this._elements.unshift(t[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,i=e.length;for(t=0;t<i;t+=1)e[t]._processed=!1,"gr"===e[t].ty&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var i,n=e.length;for(i=0;i<n;i+=1)e[i]._render=t,"gr"===e[i].ty&&this.changeGroupRender(e[i].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,i,n,r,o,s=!1;if(this._mdf||e){var a,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),s=!0}for(o=0,n=0;n<=this._groups.length-1;n+=1){if(a=o<l,this._groups[n]._render=a,this.changeGroupRender(this._groups[n].it,a),!a){var u=this.elemsData[n].it,h=u[u.length-1];0!==h.transform.op.v?(h.transform.op._mdf=!0,h.transform.op.v=0):h.transform.op._mdf=!1}o+=1}this._currentCopies=l;var d=this.o.v,f=d%1,p=d>0?Math.floor(d):Math.ceil(d),m=this.pMatrix.props,g=this.rMatrix.props,v=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var b,y,w=0;if(d>0){for(;w<p;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),w+=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,f,!1),w+=f)}else if(d<0){for(;w>p;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),w-=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-f,!0),w-=f)}for(n=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,o=this._currentCopies;o;){if(y=(i=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==w){for((0!==n&&1===r||n!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),b=0;b<y;b+=1)i[b]=this.matrix.props[b];this.matrix.reset()}else for(this.matrix.reset(),b=0;b<y;b+=1)i[b]=this.matrix.props[b];w+=1,o-=1,n+=r}}else for(o=this._currentCopies,n=0,r=1;o;)i=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,o-=1,n+=r;return s},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var i,n=shapePool.newElement();n.c=e.c;var r,o,s,a,l,c,u,h,d,f,p,m,g=e._length,v=0;for(i=0;i<g;i+=1)r=e.v[i],s=e.o[i],o=e.i[i],r[0]===s[0]&&r[1]===s[1]&&r[0]===o[0]&&r[1]===o[1]?0!==i&&i!==g-1||e.c?(a=0===i?e.v[g-1]:e.v[i-1],c=(l=Math.sqrt(Math.pow(r[0]-a[0],2)+Math.pow(r[1]-a[1],2)))?Math.min(l/2,t)/l:0,u=p=r[0]+(a[0]-r[0])*c,h=m=r[1]-(r[1]-a[1])*c,d=u-(u-r[0])*roundCorner,f=h-(h-r[1])*roundCorner,n.setTripleAt(u,h,d,f,p,m,v),v+=1,a=i===g-1?e.v[0]:e.v[i+1],c=(l=Math.sqrt(Math.pow(r[0]-a[0],2)+Math.pow(r[1]-a[1],2)))?Math.min(l/2,t)/l:0,u=d=r[0]+(a[0]-r[0])*c,h=f=r[1]+(a[1]-r[1])*c,p=u-(u-r[0])*roundCorner,m=h-(h-r[1])*roundCorner,n.setTripleAt(u,h,d,f,p,m,v),v+=1):(n.setTripleAt(r[0],r[1],s[0],s[1],o[0],o[1],v),v+=1):(n.setTripleAt(e.v[i][0],e.v[i][1],e.o[i][0],e.o[i][1],e.i[i][0],e.i[i][1],v),v+=1);return n},RoundCornersModifier.prototype.processShapes=function(e){var t,i,n,r,o,s,a=this.shapes.length,l=this.rd.v;if(0!==l)for(i=0;i<a;i+=1){if(s=(o=this.shapes[i]).localShapeCollection,o.shape._mdf||this._mdf||e)for(s.releaseShapes(),o.shape._mdf=!0,t=o.shape.paths.shapes,r=o.shape.paths._length,n=0;n<r;n+=1)s.addShape(this.processPath(t[n],l));o.shape.paths=o.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,i=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(i<0)return[];var n=Math.sqrt(i);return floatZero(n)?n>0&&n<1?[t]:[]:[t-n,t+n].filter(function(e){return e>0&&e<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),i=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),r=lerpPoint(t,i,e),o=lerpPoint(i,n,e),s=lerpPoint(r,o,e);return[new PolynomialBezier(this.points[0],t,r,s,!0),new PolynomialBezier(s,o,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,i){void 0===t&&(t=2),void 0===i&&(i=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,i),n},PolynomialBezier.shapeSegment=function(e,t){var i=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[i],e.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var i=(t+1)%e.length();return new PolynomialBezier(e.v[i],e.i[i],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,i,n){var r=e._length,o=shapePool.newElement();if(o.c=e.c,e.c||(r-=1),0===r)return o;var s=-1,a=PolynomialBezier.shapeSegment(e,0);zigZagCorner(o,e,0,t,i,n,s);for(var l=0;l<r;l+=1)s=zigZagSegment(o,a,t,i,n,-s),a=l!==r-1||e.c?PolynomialBezier.shapeSegment(e,(l+1)%r):null,zigZagCorner(o,e,l+1,t,i,n,s);return o},ZigZagModifier.prototype.processShapes=function(e){var t,i,n,r,o,s,a=this.shapes.length,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),u=this.pointsType.v;if(0!==l)for(i=0;i<a;i+=1){if(s=(o=this.shapes[i]).localShapeCollection,o.shape._mdf||this._mdf||e)for(s.releaseShapes(),o.shape._mdf=!0,t=o.shape.paths.shapes,r=o.shape.paths._length,n=0;n<r;n+=1)s.addShape(this.processPath(t[n],l,c,u));o.shape.paths=o.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(e,t,i,n){var r=shapePool.newElement();r.c=e.c;var o,s,a,l=e.length();e.c||(l-=1);var c=[];for(o=0;o<l;o+=1)a=PolynomialBezier.shapeSegment(e,o),c.push(offsetSegmentSplit(a,t));if(!e.c)for(o=l-1;o>=0;o-=1)a=PolynomialBezier.shapeSegmentInverted(e,o),c.push(offsetSegmentSplit(a,t));c=pruneIntersections(c);var u=null,h=null;for(o=0;o<c.length;o+=1){var d=c[o];for(h&&(u=joinLines(r,h,d[0],i,n)),h=d[d.length-1],s=0;s<d.length;s+=1)a=d[s],u&&pointEqual(a.points[0],u)?r.setXYAt(a.points[1][0],a.points[1][1],"o",r.length()-1):r.setTripleAt(a.points[0][0],a.points[0][1],a.points[1][0],a.points[1][1],a.points[0][0],a.points[0][1],r.length()),r.setTripleAt(a.points[3][0],a.points[3][1],a.points[3][0],a.points[3][1],a.points[2][0],a.points[2][1],r.length()),u=a.points[3]}return c.length&&joinLines(r,h,c[0][0],i,n),r},OffsetPathModifier.prototype.processShapes=function(e){var t,i,n,r,o,s,a=this.shapes.length,l=this.amount.v,c=this.miterLimit.v,u=this.lineJoin;if(0!==l)for(i=0;i<a;i+=1){if(s=(o=this.shapes[i]).localShapeCollection,o.shape._mdf||this._mdf||e)for(s.releaseShapes(),o.shape._mdf=!0,t=o.shape.paths.shapes,r=o.shape.paths._length,n=0;n<r;n+=1)s.addShape(this.processPath(t[n],l,u,c));o.shape.paths=o.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=127988,n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function r(e,t){var i=createTag("span");i.setAttribute("aria-hidden",!0),i.style.fontFamily=t;var n=createTag("span");n.innerText="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(n),document.body.appendChild(i);var r=n.offsetWidth;return n.style.fontFamily=function(e){var t,i=e.split(","),n=i.length,r=[];for(t=0;t<n;t+=1)"sans-serif"!==i[t]&&"monospace"!==i[t]&&r.push(i[t]);return r.join(",")}(e)+", "+t,{node:n,w:r,parent:i}}function o(e,t){var i,n=document.body&&t?"svg":"canvas",r=getFontProperties(e);if("svg"===n){var o=createNS("text");o.style.fontSize="100px",o.setAttribute("font-family",e.fFamily),o.setAttribute("font-style",r.style),o.setAttribute("font-weight",r.weight),o.textContent="1",e.fClass?(o.style.fontFamily="inherit",o.setAttribute("class",e.fClass)):o.style.fontFamily=e.fFamily,t.appendChild(o),i=o}else{var s=new OffscreenCanvas(500,500).getContext("2d");s.font=r.style+" "+r.weight+" 100px "+e.fFamily,i=s}return{measureText:function(e){return"svg"===n?(i.textContent=e,i.getComputedTextLength()):i.measureText(e).width}}}function s(e){var t=0,i=e.charCodeAt(0);if(i>=55296&&i<=56319){var n=e.charCodeAt(1);n>=56320&&n<=57343&&(t=1024*(i-55296)+n-56320+65536)}return t}function a(e){var t=s(e);return t>=127462&&t<=127487}var l=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};l.isModifier=function(e,t){var i=e.toString(16)+t.toString(16);return-1!==n.indexOf(i)},l.isZeroWidthJoiner=function(e){return 8205===e},l.isFlagEmoji=function(e){return a(e.substr(0,2))&&a(e.substr(2,2))},l.isRegionalCode=a,l.isCombinedCharacter=function(e){return-1!==t.indexOf(e)},l.isRegionalFlag=function(e,t){var n=s(e.substr(t,2));if(n!==i)return!1;var r=0;for(t+=2;r<5;){if((n=s(e.substr(t,2)))<917601||n>917626)return!1;r+=1,t+=2}return 917631===s(e.substr(t,2))},l.isVariationSelector=function(e){return 65039===e},l.BLACK_FLAG_CODE_POINT=i;var c={addChars:function(e){if(e){var t;this.chars||(this.chars=[]);var i,n,r=e.length,o=this.chars.length;for(t=0;t<r;t+=1){for(i=0,n=!1;i<o;)this.chars[i].style===e[t].style&&this.chars[i].fFamily===e[t].fFamily&&this.chars[i].ch===e[t].ch&&(n=!0),i+=1;n||(this.chars.push(e[t]),o+=1)}}},addFonts:function(e,t){if(e){if(this.chars)return this.isLoaded=!0,void(this.fonts=e.list);if(!document.body)return this.isLoaded=!0,e.list.forEach(function(e){e.helper=o(e),e.cache={}}),void(this.fonts=e.list);var i,n=e.list,s=n.length,a=s;for(i=0;i<s;i+=1){var l,c,u=!0;if(n[i].loaded=!1,n[i].monoCase=r(n[i].fFamily,"monospace"),n[i].sansCase=r(n[i].fFamily,"sans-serif"),n[i].fPath){if("p"===n[i].fOrigin||3===n[i].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+n[i].fFamily+'"], style[f-origin="3"][f-family="'+n[i].fFamily+'"]')).length>0&&(u=!1),u){var h=createTag("style");h.setAttribute("f-forigin",n[i].fOrigin),h.setAttribute("f-origin",n[i].origin),h.setAttribute("f-family",n[i].fFamily),h.type="text/css",h.innerText="@font-face {font-family: "+n[i].fFamily+"; font-style: normal; src: url('"+n[i].fPath+"');}",t.appendChild(h)}}else if("g"===n[i].fOrigin||1===n[i].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(n[i].fPath)&&(u=!1);if(u){var d=createTag("link");d.setAttribute("f-forigin",n[i].fOrigin),d.setAttribute("f-origin",n[i].origin),d.type="text/css",d.rel="stylesheet",d.href=n[i].fPath,document.body.appendChild(d)}}else if("t"===n[i].fOrigin||2===n[i].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)n[i].fPath===l[c].src&&(u=!1);if(u){var f=createTag("link");f.setAttribute("f-forigin",n[i].fOrigin),f.setAttribute("f-origin",n[i].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",n[i].fPath),t.appendChild(f)}}}else n[i].loaded=!0,a-=1;n[i].helper=o(n[i],t),n[i].cache={},this.fonts.push(n[i])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,i,n){for(var r=0,o=this.chars.length;r<o;){if(this.chars[r].ch===t&&this.chars[r].style===i&&this.chars[r].fFamily===n)return this.chars[r];r+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,i,n)),e},getFontByName:function(e){for(var t=0,i=this.fonts.length;t<i;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]},measureText:function(e,t,i){var n=this.getFontByName(t),r=e;if(!n.cache[r]){var o=n.helper;if(" "===e){var s=o.measureText("|"+e+"|"),a=o.measureText("||");n.cache[r]=(s-a)/100}else n.cache[r]=o.measureText(e)/100}return n.cache[r]*i},checkLoadedFonts:function(){var e,t,i,n=this.fonts.length,r=n;for(e=0;e<n;e+=1)this.fonts[e].loaded?r-=1:"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(t=this.fonts[e].monoCase.node,i=this.fonts[e].monoCase.w,t.offsetWidth!==i?(r-=1,this.fonts[e].loaded=!0):(t=this.fonts[e].sansCase.node,i=this.fonts[e].sansCase.w,t.offsetWidth!==i&&(r-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==r&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return l.prototype=c,l}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){-1===this.renderableComponents.indexOf(e)&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){-1!==this.renderableComponents.indexOf(e)&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function AngleEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function ColorEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,1,0,i)}function PointEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,1,0,i)}function LayerIndexEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function MaskIndexEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function CheckboxEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var i,n=e.ef||[];this.effectElements=[];var r,o=n.length;for(i=0;i<o;i+=1)r=new GroupEffect(n[i],t),this.effectElements.push(r)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,i){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,i)}function AudioElement(e,t,i){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,i),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var i;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,r=this.data.ef.length,o=this.data.ef;for(i=0;i<r;i+=1){switch(n=null,o[i].ty){case 0:n=new SliderEffect(o[i],t,this);break;case 1:n=new AngleEffect(o[i],t,this);break;case 2:n=new ColorEffect(o[i],t,this);break;case 3:n=new PointEffect(o[i],t,this);break;case 4:case 7:n=new CheckboxEffect(o[i],t,this);break;case 10:n=new LayerIndexEffect(o[i],t,this);break;case 11:n=new MaskIndexEffect(o[i],t,this);break;case 5:n=new EffectsManager(o[i],t,this);break;default:n=new NoValueEffect(o[i],t,this)}n&&this.effectElements.push(n)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if("n"!==this.data.masksProperties[e].mode&&!1!==this.data.masksProperties[e].cl)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),i=e("effects"),n=e("shape"),r=e("text"),o=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var s=i.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(s),0===this.data.ty||this.data.xt?this.compInterface=o(this):4===this.data.ty?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=r(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,i){this.globalData=t,this.comp=i,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var i,n=this.dynamicProperties.length;for(i=0;i<n;i+=1)(t||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&this.dynamicProperties.push(e)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var i=this._volume*this._volumeMultiplier;this._previousVolume!==i&&(this._previousVolume=i,this.audio.volume(i))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,i,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)this.elements[t]||(i=this.layers[t]).ip-i.st<=e-this.layers[t].st&&i.op-i.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var i,n=e.length,r=this.layers.length;for(t=0;t<n;t+=1)for(i=0;i<r;){if(this.layers[i].id===e[t].id){this.layers[i]=e[t];break}i+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,i){for(var n=this.elements,r=this.layers,o=0,s=r.length;o<s;)r[o].ind==t&&(n[o]&&!0!==n[o]?(i.push(n[o]),n[o].setAsParent(),void 0!==r[o].parent?this.buildElementParenting(e,r[o].parent,i):e.setHierarchy(i)):(this.buildItem(o),this.addPendingElement(e))),o+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,i=e.length;for(t=0;t<i;t+=1)if(e[t].xt){var n=this.createComp(e[t]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(e){var t,i=this.elements.length;for(t=0;t<i;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,i=e.shift();if("number"==typeof i)t=this.elements[i];else{var n,r=this.elements.length;for(n=0;n<r;n+=1)if(this.elements[n].data.nm===i){t=this.elements[n];break}}return 0===e.length?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,i){this.data=e,this.element=t,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n,r,o=this.globalData.defs,s=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(s),this.solidPath="";var a,l,c,u,h,d,f=this.masksProperties,p=0,m=[],g=createElementID(),v="clipPath",b="clip-path";
vendor: 4,111 bytes, line 59
59for(n=0;n<s;n+=1)if(("a"!==f[n].mode&&"n"!==f[n].mode||f[n].inv||100!==f[n].o.k||f[n].o.x)&&(v="mask",b="mask"),"s"!==f[n].mode&&"i"!==f[n].mode||0!==p?c=null:((c=createNS("rect")).setAttribute("fill","#ffffff"),c.setAttribute("width",this.element.comp.data.w||0),c.setAttribute("height",this.element.comp.data.h||0),m.push(c)),r=createNS("path"),"n"===f[n].mode)this.viewData[n]={op:PropertyFactory.getProp(this.element,f[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[n],3),elem:r,lastPath:""},o.appendChild(r);else{var y;if(p+=1,r.setAttribute("fill","s"===f[n].mode?"#000000":"#ffffff"),r.setAttribute("clip-rule","nonzero"),0!==f[n].x.k?(v="mask",b="mask",d=PropertyFactory.getProp(this.element,f[n].x,0,null,this.element),y=createElementID(),(u=createNS("filter")).setAttribute("id",y),(h=createNS("feMorphology")).setAttribute("operator","erode"),h.setAttribute("in","SourceGraphic"),h.setAttribute("radius","0"),u.appendChild(h),o.appendChild(u),r.setAttribute("stroke","s"===f[n].mode?"#000000":"#ffffff")):(h=null,d=null),this.storedData[n]={elem:r,x:d,expan:h,lastPath:"",lastOperator:"",filterId:y,lastRadius:0},"i"===f[n].mode){l=m.length;var w=createNS("g");for(a=0;a<l;a+=1)w.appendChild(m[a]);var _=createNS("mask");_.setAttribute("mask-type","alpha"),_.setAttribute("id",g+"_"+p),_.appendChild(r),o.appendChild(_),w.setAttribute("mask","url("+getLocationHref()+"#"+g+"_"+p+")"),m.length=0,m.push(w)}else m.push(r);f[n].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[n]={elem:r,lastPath:"",op:PropertyFactory.getProp(this.element,f[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[n],3),invRect:c},this.viewData[n].prop.k||this.drawPath(f[n],this.viewData[n].prop.v,this.viewData[n])}for(this.maskElement=createNS(v),s=m.length,n=0;n<s;n+=1)this.maskElement.appendChild(m[n]);p>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(b,"url("+getLocationHref()+"#"+g+")"),o.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,i=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<n;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),i=0;i<n;i+=1)t.multiply(this.hierarchy[i].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var i=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(i),e=1;e<t;e+=1){var n=this.localTransforms[e].matrix;i.multiply(n)}i.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var r=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)r*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=r}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffe
vendor: 56,810 bytes, line 59
59ctsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,i=e.length;for(t=0;t<i;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var i,n=!0,r=this.comp;n;)r.finalTransform?(r.data.hasMask&&t.splice(0,0,r.finalTransform),r=r.comp):n=!1;var o,s=t.length;for(i=0;i<s;i+=1)o=t[i].mat.applyToPointArray(0,0,0),e=[e[0]-o[0],e[1]-o[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,i=this.element.finalTransform.mat,n=this.masksProperties.length;for(t=0;t<n;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),"n"!==this.masksProperties[t].mode&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var r=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),r.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,i){var n,r,o=" M"+t.v[0][0]+","+t.v[0][1];for(r=t._length,n=1;n<r;n+=1)o+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[n][0]+","+t.i[n][1]+" "+t.v[n][0]+","+t.v[n][1];if(t.c&&r>1&&(o+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),i.lastPath!==o){var s="";i.elem&&(t.c&&(s=e.inv?this.solidPath+o:o),i.elem.setAttribute("d",s)),i.lastPath=o}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};return e.createFilter=function(e,t){var i=createNS("filter");i.setAttribute("id",e),!0!==t&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},e.createAlphaToLuminanceFilter=function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e},e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,i,n="SourceGraphic",r=e.data.ef?e.data.ef.length:0,o=createElementID(),s=filtersFactory.createFilter(o,!0),a=0;for(this.filters=[],t=0;t<r;t+=1){i=null;var l=e.data.ef[t].ty;if(registeredEffects$1[l])i=new(0,registeredEffects$1[l].effect)(s,e.effectsManager.effectElements[t],e,idPrefix+a,n),n=idPrefix+a,registeredEffects$1[l].countsAsEffect&&(a+=1);i&&this.filters.push(i)}a&&(e.globalData.defs.appendChild(s),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+o+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,i){registeredEffects$1[e]={effect:t,countsAsEffect:i}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,i){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,i=this.filters.length;for(t=0;t<i;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,i=this.filters.length,n=[];for(t=0;t<i;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var i=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var r=createElementID();if(i.setAttribute("id",r),i.appendChild(n),this.globalData.defs.appendChild(i),this.checkMasks()){var o=createNS("g");o.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),o.appendChild(this.layerElement),this.transformedElement=o,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,i,n,r,o=this.layerId+"_"+e;if(1===e||3===e){var s=createNS("mask");s.setAttribute("id",o),s.setAttribute("mask-type",3===e?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),s.appendChild(n),this.globalData.defs.appendChild(s),featureSupport.maskType||1!==e||(s.setAttribute("mask-type","luminance"),t=createElementID(),i=filtersFactory.createFilter(t),this.globalData.defs.appendChild(i),i.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(n),s.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2===e){var a=createNS("mask");a.setAttribute("id",o),a.setAttribute("mask-type","alpha");var l=createNS("g");a.appendChild(l),t=createElementID(),i=filtersFactory.createFilter(t);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),i.appendChild(c);var u=createNS("feFuncA");u.setAttribute("type","table"),u.setAttribute("tableValues","1.0 0.0"),c.appendChild(u),this.globalData.defs.appendChild(i);var h=createNS("rect");h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),l.appendChild(h),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(n),featureSupport.maskType||(a.setAttribute("mask-type","luminance"),i.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),l.appendChild(h),r.appendChild(this.layerElement),l.appendChild(r)),this.globalData.defs.appendChild(a)}this.matteMasks[e]=o}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initTransform(e,t,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,i=this.shapeModifiers.length;for(t=0;t<i;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,i=0,n=t.length;i<n;){if(t[i].elem===e)return t[i].pos;i+=1}return 0},addProcessedElement:function(e,t){for(var i=this.processedElements,n=i.length;n;)if(i[n-=1].elem===e)return void(i[n].pos=t);i.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,i){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=i,this.lvl=t,this._isAnimated=!!i.k;for(var n=0,r=e.length;n<r;){if(e[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=!0===e.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,i,n){var r;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var o,s=t.length||0;for(r=0;r<s;r+=1)o=PropertyFactory.getProp(e,t[r].v,0,0,this),this.k=o.k||this.k,this.dataProps[r]={n:t[r].n,p:o};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=i}function SVGNoStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=i}function GradientProperty(e,t,i){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var n=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,i)}function SVGGradientStrokeStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,i),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,i){this.transform={mProps:e,op:t,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,i=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),t=0;t<i;t+=1)"o"!==this.dataProps[t].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var i=0,n=this.o.length/2;i<n;){if(Math.abs(e[4*i]-e[4*t+2*i])>.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,i,n,r=4*this.data.p;for(t=0;t<r;t+=1)i=t%4==0?100:255,n=Math.round(this.prop.v[t]*i),this.c[t]!==n&&(this.c[t]=n,this._cmdf=!e);if(this.o.length)for(r=this.prop.v.length,t=4*this.data.p;t<r;t+=1)i=t%2==0?100:1,n=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==n&&(this.o[t-4*this.data.p]=n,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,i){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,t),this.setGradientOpacity(t,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var i=createElementID(),n=createNS(1===t.t?"linearGradient":"radialGradient");n.setAttribute("id",i),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var r,o,s,a=[];for(s=4*t.g.p,o=0;o<s;o+=4)r=createNS("stop"),n.appendChild(r),a.push(r);e.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+i+")"),this.gf=n,this.cst=a},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var i,n,r,o=createNS("mask"),s=createNS("path");o.appendChild(s);var a=createElementID(),l=createElementID();o.setAttribute("id",l);var c=createNS(1===e.t?"linearGradient":"radialGradient");c.setAttribute("id",a),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),r=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var u=this.stops;for(n=4*e.g.p;n<r;n+=2)(i=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(i),u.push(i);s.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+a+")"),"gs"===e.ty&&(s.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),1===e.lj&&s.setAttribute("stroke-miterlimit",e.ml)),this.of=c,this.ms=o,this.ost=u,this.maskId=l,t.msElem=s}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,i,n){if(0===t)return"";var r,o=e.o,s=e.i,a=e.v,l=" M"+n.applyToPointStringified(a[0][0],a[0][1]);for(r=1;r<t;r+=1)l+=" C"+n.applyToPointStringified(o[r-1][0],o[r-1][1])+" "+n.applyToPointStringified(s[r][0],s[r][1])+" "+n.applyToPointStringified(a[r][0],a[r][1]);return i&&t&&(l+=" C"+n.applyToPointStringified(o[r-1][0],o[r-1][1])+" "+n.applyToPointStringified(s[0][0],s[0][1])+" "+n.applyToPointStringified(a[0][0],a[0][1]),l+="z"),l},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function i(e,t,i){(i||t.transform.op._mdf)&&t.transform.container.setAttribute("opacity",t.transform.op.v),(i||t.transform.mProps._mdf)&&t.transform.container.setAttribute("transform",t.transform.mProps.v.to2dCSS())}function n(){}function r(i,n,r){var o,s,a,l,c,u,h,d,f,p,m=n.styles.length,g=n.lvl;for(u=0;u<m;u+=1){if(l=n.sh._mdf||r,n.styles[u].lvl<g){for(d=t.reset(),f=g-n.styles[u].lvl,p=n.transformers.length-1;!l&&f>0;)l=n.transformers[p].mProps._mdf||l,f-=1,p-=1;if(l)for(f=g-n.styles[u].lvl,p=n.transformers.length-1;f>0;)d.multiply(n.transformers[p].mProps.v),f-=1,p-=1}else d=e;if(s=(h=n.sh.paths)._length,l){for(a="",o=0;o<s;o+=1)(c=h.shapes[o])&&c._length&&(a+=buildShapeString(c,c._length,c.c,d));n.caches[u]=a}else a=n.caches[u];n.styles[u].d+=!0===i.hd?"":a,n.styles[u]._mdf=l||n.styles[u]._mdf}}function o(e,t,i){var n=t.style;(t.c._mdf||i)&&n.pElem.setAttribute("fill","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||i)&&n.pElem.setAttribute("fill-opacity",t.o.v)}function s(e,t,i){a(e,t,i),l(e,t,i)}function a(e,t,i){var n,r,o,s,a,l=t.gf,c=t.g._hasOpacity,u=t.s.v,h=t.e.v;if(t.o._mdf||i){var d="gf"===e.ty?"fill-opacity":"stroke-opacity";t.style.pElem.setAttribute(d,t.o.v)}if(t.s._mdf||i){var f=1===e.t?"x1":"cx",p="x1"===f?"y1":"cy";l.setAttribute(f,u[0]),l.setAttribute(p,u[1]),c&&!t.g._collapsable&&(t.of.setAttribute(f,u[0]),t.of.setAttribute(p,u[1]))}if(t.g._cmdf||i){n=t.cst;var m=t.g.c;for(o=n.length,r=0;r<o;r+=1)(s=n[r]).setAttribute("offset",m[4*r]+"%"),s.setAttribute("stop-color","rgb("+m[4*r+1]+","+m[4*r+2]+","+m[4*r+3]+")")}if(c&&(t.g._omdf||i)){var g=t.g.o;for(o=(n=t.g._collapsable?t.cst:t.ost).length,r=0;r<o;r+=1)s=n[r],t.g._collapsable||s.setAttribute("offset",g[2*r]+"%"),s.setAttribute("stop-opacity",g[2*r+1])}if(1===e.t)(t.e._mdf||i)&&(l.setAttribute("x2",h[0]),l.setAttribute("y2",h[1]),c&&!t.g._collapsable&&(t.of.setAttribute("x2",h[0]),t.of.setAttribute("y2",h[1])));else if((t.s._mdf||t.e._mdf||i)&&(a=Math.sqrt(Math.pow(u[0]-h[0],2)+Math.pow(u[1]-h[1],2)),l.setAttribute("r",a),c&&!t.g._collapsable&&t.of.setAttribute("r",a)),t.e._mdf||t.h._mdf||t.a._mdf||i){a||(a=Math.sqrt(Math.pow(u[0]-h[0],2)+Math.pow(u[1]-h[1],2)));var v=Math.atan2(h[1]-u[1],h[0]-u[0]),b=t.h.v;b>=1?b=.99:b<=-1&&(b=-.99);var y=a*b,w=Math.cos(v+t.a.v)*y+u[0],_=Math.sin(v+t.a.v)*y+u[1];l.setAttribute("fx",w),l.setAttribute("fy",_),c&&!t.g._collapsable&&(t.of.setAttribute("fx",w),t.of.setAttribute("fy",_))}}function l(e,t,i){var n=t.style,r=t.d;r&&(r._mdf||i)&&r.dashStr&&(n.pElem.setAttribute("stroke-dasharray",r.dashStr),n.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),t.c&&(t.c._mdf||i)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||i)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||i)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return o;case"gf":return a;case"gs":return s;case"st":return l;case"sh":case"el":case"rc":case"sr":return r;case"tr":return i;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,i){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,i),this.prevViewData=[]}function LetterProps(e,t,i,n,r,o){this.o=e,this.sw=t,this.sc=i,this.fc=n,this.m=r,this.p=o,this._mdf={o:!0,sw:!!t,sc:!!i,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,i,n,r=this.shapes.length,o=this.stylesList.length,s=[],a=!1;for(i=0;i<o;i+=1){for(n=this.stylesList[i],a=!1,s.length=0,e=0;e<r;e+=1)-1!==(t=this.shapes[e]).styles.indexOf(n)&&(s.push(t),a=t._isAnimated||a);s.length>1&&a&&this.setShapesAsAnimated(s)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,i=e.length;for(t=0;t<i;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var i,n=new SVGStyleData(e,t),r=n.pElem;if("st"===e.ty)i=new SVGStrokeStyleData(this,e,n);else if("fl"===e.ty)i=new SVGFillStyleData(this,e,n);else if("gf"===e.ty||"gs"===e.ty){i=new("gf"===e.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,n),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),r.setAttribute("mask","url("+getLocationHref()+"#"+i.maskId+")"))}else"no"===e.ty&&(i=new SVGNoStyleData(this,e,n));return"st"!==e.ty&&"gs"!==e.ty||(r.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),r.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),r.setAttribute("fill-opacity","0"),1===e.lj&&r.setAttribute("stroke-miterlimit",e.ml)),2===e.r&&r.setAttribute("fill-rule","evenodd"),e.ln&&r.setAttribute("id",e.ln),e.cl&&r.setAttribute("class",e.cl),e.bm&&(r.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(n),this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var i=TransformPropertyFactory.getTransformProperty(this,e,this),n=new SVGTransformData(i,i.o,t);return this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createShapeElement=function(e,t,i){var n=4;"rc"===e.ty?n=5:"el"===e.ty?n=6:"sr"===e.ty&&(n=7);var r=new SVGShapeData(t,i,ShapePropertyFactory.getShapeProp(this,e,n,this));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var i=0,n=this.animatedContents.length;i<n;){if(this.animatedContents[i].element===t)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,i=e.styles,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||i.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,i,n,r,o,s){var a,l,c,u,h,d,f=[].concat(o),p=e.length-1,m=[],g=[];for(a=p;a>=0;a-=1){if((d=this.searchProcessedElement(e[a]))?t[a]=i[d-1]:e[a]._render=s,"fl"===e[a].ty||"st"===e[a].ty||"gf"===e[a].ty||"gs"===e[a].ty||"no"===e[a].ty)d?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],r),e[a]._render&&t[a].style.pElem.parentNode!==n&&n.appendChild(t[a].style.pElem),m.push(t[a].style);else if("gr"===e[a].ty){if(d)for(c=t[a].it.length,l=0;l<c;l+=1)t[a].prevViewData[l]=t[a].it[l];else t[a]=this.createGroupElement(e[a]);this.searchShapes(e[a].it,t[a].it,t[a].prevViewData,t[a].gr,r+1,f,s),e[a]._render&&t[a].gr.parentNode!==n&&n.appendChild(t[a].gr)}else"tr"===e[a].ty?(d||(t[a]=this.createTransformElement(e[a],n)),u=t[a].transform,f.push(u)):"sh"===e[a].ty||"rc"===e[a].ty||"el"===e[a].ty||"sr"===e[a].ty?(d||(t[a]=this.createShapeElement(e[a],f,r)),this.setElementStyles(t[a])):"tm"===e[a].ty||"rd"===e[a].ty||"ms"===e[a].ty||"pb"===e[a].ty||"zz"===e[a].ty||"op"===e[a].ty?(d?(h=t[a]).closed=!1:((h=ShapeModifiers.getModifier(e[a].ty)).init(this,e[a]),t[a]=h,this.shapeModifiers.push(h)),g.push(h)):"rp"===e[a].ty&&(d?(h=t[a]).closed=!0:(h=ShapeModifiers.getModifier(e[a].ty),t[a]=h,h.init(this,e,a,t),this.shapeModifiers.push(h),s=!1),g.push(h));this.addProcessedElement(e[a],a+1)}for(p=m.length,a=0;a<p;a+=1)m[a].closed=!0;for(p=g.length,a=0;a<p;a+=1)g[a].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,i=this.animatedContents.length;for(e=0;e<i;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&!0!==t.data&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,i,n,r,o){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var s=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,s=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,s=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,s=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,s=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,s=!0),!o.length||this.p[0]===o[0]&&this.p[1]===o[1]&&this.p[4]===o[4]&&this.p[5]===o[5]&&this.p[12]===o[12]&&this.p[13]===o[13]||(this.p=o,this._mdf.p=!0,s=!0),s},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,o=e||this.data.d.k[this.keysIndex].s;for(n=0;n<r;n+=1)o=i!==this.keysIndex?this.effectsSequence[n](o,o.t):this.effectsSequence[n](this.currentData,o.t);t!==o&&this.setCurrentData(o),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,i=0,n=e.length;i<=n-1&&!(i===n-1||e[i+1].t>t);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,i,n=[],r=0,o=e.length,s=!1,a=!1,l="";r<o;)s=a,a=!1,t=e.charCodeAt(r),l=e.charAt(r),FontManager.isCombinedCharacter(t)?s=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,r)?l=e.substr(r,14):(i=e.charCodeAt(r+1))>=56320&&i<=57343&&(FontManager.isModifier(t,i)?(l=e.substr(r,2),s=!0):l=FontManager.isFlagEmoji(e.substr(r,4))?e.substr(r,4):e.substr(r,2)):t>56319?(i=e.charCodeAt(r+1),FontManager.isVariationSelector(t)&&(s=!0)):FontManager.isZeroWidthJoiner(t)&&(s=!0,a=!0),s?(n[n.length-1]+=l,s=!1):n.push(l),r+=l.length;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,i,n,r,o,s,a,l=this.elem.globalData.fontManager,c=this.data,u=[],h=0,d=c.m.g,f=0,p=0,m=0,g=[],v=0,b=0,y=l.getFontByName(e.f),w=0,_=getFontProperties(y);e.fWeight=_.weight,e.fStyle=_.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),i=e.finalText.length,e.finalLineHeight=e.lh;var k,x=e.tr/1e3*e.finalSize;if(e.sz)for(var C,S,E=!0,T=e.sz[0],A=e.sz[1];E;){C=0,v=0,i=(S=this.buildFinalText(e.t)).length,x=e.tr/1e3*e.finalSize;var I=-1;for(t=0;t<i;t+=1)k=S[t].charCodeAt(0),n=!1," "===S[t]?I=t:13!==k&&3!==k||(v=0,n=!0,C+=e.finalLineHeight||1.2*e.finalSize),l.chars?(a=l.getCharData(S[t],y.fStyle,y.fFamily),w=n?0:a.w*e.finalSize/100):w=l.measureText(S[t],e.f,e.finalSize),v+w>T&&" "!==S[t]?(-1===I?i+=1:t=I,C+=e.finalLineHeight||1.2*e.finalSize,S.splice(t,I===t?1:0,"\r"),I=-1,v=0):(v+=w,v+=x);C+=y.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&A<C?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=S,i=e.finalText.length,E=!1)}v=-x,w=0;var M,P=0;for(t=0;t<i;t+=1)if(n=!1,13===(k=(M=e.finalText[t]).charCodeAt(0))||3===k?(P=0,g.push(v),b=v>b?v:b,v=-2*x,r="",n=!0,m+=1):r=M,l.chars?(a=l.getCharData(M,y.fStyle,l.getFontByName(e.f).fFamily),w=n?0:a.w*e.finalSize/100):w=l.measureText(r,e.f,e.finalSize)," "===M?P+=w+x:(v+=w+x+P,P=0),u.push({l:w,an:w,add:f,n:n,anIndexes:[],val:r,line:m,animatorJustifyOffset:0}),2==d){if(f+=w,""===r||" "===r||t===i-1){for(""!==r&&" "!==r||(f-=w);p<=t;)u[p].an=f,u[p].ind=h,u[p].extra=w,p+=1;h+=1,f=0}}else if(3==d){if(f+=w,""===r||t===i-1){for(""===r&&(f-=w);p<=t;)u[p].an=f,u[p].ind=h,u[p].extra=w,p+=1;f=0,h+=1}}else u[h].ind=h,u[h].extra=0,h+=1;if(e.l=u,b=v>b?v:b,g.push(v),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=b,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=g;var D,O,L,R,B=c.a;s=B.length;var N=[];for(o=0;o<s;o+=1){for((D=B[o]).a.sc&&(e.strokeColorAnim=!0),D.a.sw&&(e.strokeWidthAnim=!0),(D.a.fc||D.a.fh||D.a.fs||D.a.fb)&&(e.fillColorAnim=!0),R=0,L=D.s.b,t=0;t<i;t+=1)(O=u[t]).anIndexes[o]=R,(1==L&&""!==O.val||2==L&&""!==O.val&&" "!==O.val||3==L&&(O.n||" "==O.val||t==i-1)||4==L&&(O.n||t==i-1))&&(1===D.s.rn&&N.push(R),R+=1);c.a[o].s.totalChars=R;var j,F=-1;if(1===D.s.rn)for(t=0;t<i;t+=1)F!=(O=u[t]).anIndexes[o]&&(F=O.anIndexes[o],j=N.splice(Math.floor(Math.random()*N.length),1)[0]),O.anIndexes[o]=j}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=y.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=void 0===t?this.keysIndex:t;var i=this.copyData({},this.data.d.k[t].s);i=this.copyData(i,e),this.data.d.k[t].s=i,this.recalculate(t),this.setCurrentData(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,i=Math.floor;function n(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),this.e="e"in t?PropertyFactory.getProp(e,t.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return n.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var r=0,o=0,s=1,a=1;this.ne.v>0?r=this.ne.v/100:o=-this.ne.v/100,this.xe.v>0?s=1-this.xe.v/100:a=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(r,o,s,a).get,c=0,u=this.finalS,h=this.finalE,d=this.data.sh;if(2===d)c=l(c=h===u?n>=h?1:0:e(0,t(.5/(h-u)+(n-u)/(h-u),1)));else if(3===d)c=l(c=h===u?n>=h?0:1:1-e(0,t(.5/(h-u)+(n-u)/(h-u),1)));else if(4===d)h===u?c=0:(c=e(0,t(.5/(h-u)+(n-u)/(h-u),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===d){if(h===u)c=0;else{var f=h-u,p=-f/2+(n=t(e(0,n+.5-u),h-u)),m=f/2;c=Math.sqrt(1-p*p/(m*m))}c=l(c)}else 6===d?(h===u?c=0:(n=t(e(0,n+.5-u),h-u),c=(1+Math.cos(Math.PI+2*Math.PI*n/(h-u)))/2),c=l(c)):(n>=i(u)&&(c=e(0,t(n-u<0?t(h,1)-(u-n):h-n,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var v=.5-.5*g;c<v?c=0:(c=(c-v)/g)>1&&(c=1)}return c*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/t,n=this.s.v/t+i,r=this.e.v/t+i;if(n>r){var o=n;n=r,r=o}this.finalS=n,this.finalE=r}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,i){return new n(e,t,i)}}}();function TextAnimatorDataProperty(e,t,i){var n={propType:!1},r=PropertyFactory.getProp,o=t.a;this.a={r:o.r?r(e,o.r,0,degToRads,i):n,rx:o.rx?r(e,o.rx,0,degToRads,i):n,ry:o.ry?r(e,o.ry,0,degToRads,i):n,sk:o.sk?r(e,o.sk,0,degToRads,i):n,sa:o.sa?r(e,o.sa,0,degToRads,i):n,s:o.s?r(e,o.s,1,.01,i):n,a:o.a?r(e,o.a,1,0,i):n,o:o.o?r(e,o.o,0,.01,i):n,p:o.p?r(e,o.p,1,0,i):n,sw:o.sw?r(e,o.sw,0,0,i):n,sc:o.sc?r(e,o.sc,1,0,i):n,fc:o.fc?r(e,o.fc,1,0,i):n,fh:o.fh?r(e,o.fh,0,0,i):n,fs:o.fs?r(e,o.fs,0,.01,i):n,fb:o.fb?r(e,o.fb,0,.01,i):n,t:o.t?r(e,o.t,0,0,i):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,i),this.s.t=t.s.t}function TextAnimatorProperty(e,t,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,i=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e<i;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b,y,w,_=this._moreOptions.alignment.v,k=this._animatorsData,x=this._textData,C=this.mHelper,S=this._renderType,E=this.renderedLetters.length,T=e.l;if(this._hasMaskedPath){if(w=this._pathData.m,!this._pathData.n||this._pathData._mdf){var A,I=w.v;for(this._pathData.r.v&&(I=I.reverse()),s={tLength:0,segments:[]},o=I._length-1,v=0,r=0;r<o;r+=1)A=bez.buildBezierData(I.v[r],I.v[r+1],[I.o[r][0]-I.v[r][0],I.o[r][1]-I.v[r][1]],[I.i[r+1][0]-I.v[r+1][0],I.i[r+1][1]-I.v[r+1][1]]),s.tLength+=A.segmentLength,s.segments.push(A),v+=A.segmentLength;r=o,w.v.c&&(A=bez.buildBezierData(I.v[r],I.v[0],[I.o[r][0]-I.v[r][0],I.o[r][1]-I.v[r][1]],[I.i[0][0]-I.v[0][0],I.i[0][1]-I.v[0][1]]),s.tLength+=A.segmentLength,s.segments.push(A),v+=A.segmentLength),this._pathData.pi=s}if(s=this._pathData.pi,a=this._pathData.f.v,d=0,h=1,c=0,u=!0,m=s.segments,a<0&&w.v.c)for(s.tLength<Math.abs(a)&&(a=-Math.abs(a)%s.tLength),h=(p=m[d=m.length-1].points).length-1;a<0;)a+=p[h].partialLength,(h-=1)<0&&(h=(p=m[d-=1].points).length-1);f=(p=m[d].points)[h-1],g=(l=p[h]).partialLength}o=T.length,i=0,n=0;var M,P,D,O,L,R=1.2*e.finalSize*.714,B=!0;D=k.length;var N,j,F,z,V,H,U,W,$,G,q,Y,Z=-1,X=a,K=d,J=h,Q=-1,ee="",te=this.defaultPropsArray;if(2===e.j||1===e.j){var ie=0,ne=0,re=2===e.j?-.5:-1,oe=0,se=!0;for(r=0;r<o;r+=1)if(T[r].n){for(ie&&(ie+=ne);oe<r;)T[oe].animatorJustifyOffset=ie,oe+=1;ie=0,se=!0}else{for(P=0;P<D;P+=1)(M=k[P].a).t.propType&&(se&&2===e.j&&(ne+=M.t.v*re),(L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars)).length?ie+=M.t.v*L[0]*re:ie+=M.t.v*L*re);se=!1}for(ie&&(ie+=ne);oe<r;)T[oe].animatorJustifyOffset=ie,oe+=1}for(r=0;r<o;r+=1){if(C.reset(),z=1,T[r].n)i=0,n+=e.yOffset,n+=B?1:0,a=X,B=!1,this._hasMaskedPath&&(h=J,f=(p=m[d=K].points)[h-1],g=(l=p[h]).partialLength,c=0),ee="",q="",$="",Y="",te=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[r].line){switch(e.j){case 1:a+=v-e.lineWidths[T[r].line];break;case 2:a+=(v-e.lineWidths[T[r].line])/2}Q=T[r].line}Z!==T[r].ind&&(T[Z]&&(a+=T[Z].extra),a+=T[r].an/2,Z=T[r].ind),a+=_[0]*T[r].an*.005;var ae=0;for(P=0;P<D;P+=1)(M=k[P].a).p.propType&&((L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars)).length?ae+=M.p.v[0]*L[0]:ae+=M.p.v[0]*L),M.a.propType&&((L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars)).length?ae+=M.a.v[0]*L[0]:ae+=M.a.v[0]*L);for(u=!0,this._pathData.a.v&&(a=.5*T[0].an+(v-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*Z/(o-1),a+=this._pathData.f.v);u;)c+g>=a+ae||!p?(b=(a+ae-c)/l.partialLength,j=f.point[0]+(l.point[0]-f.point[0])*b,F=f.point[1]+(l.point[1]-f.point[1])*b,C.translate(-_[0]*T[r].an*.005,-_[1]*R*.01),u=!1):p&&(c+=l.partialLength,(h+=1)>=p.length&&(h=0,m[d+=1]?p=m[d].points:w.v.c?(h=0,p=m[d=0].points):(c-=l.partialLength,p=null)),p&&(f=l,g=(l=p[h]).partialLength));N=T[r].an/2-T[r].add,C.translate(-N,0,0)}else N=T[r].an/2-T[r].add,C.translate(-N,0,0),C.translate(-_[0]*T[r].an*.005,-_[1]*R*.01,0);for(P=0;P<D;P+=1)(M=k[P].a).t.propType&&(L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars),0===i&&0===e.j||(this._hasMaskedPath?L.length?a+=M.t.v*L[0]:a+=M.t.v*L:L.length?i+=M.t.v*L[0]:i+=M.t.v*L));for(e.strokeWidthAnim&&(H=e.sw||0),e.strokeColorAnim&&(V=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(U=[e.fc[0],e.fc[1],e.fc[2]]),P=0;P<D;P+=1)(M=k[P].a).a.propType&&((L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars)).length?C.translate(-M.a.v[0]*L[0],-M.a.v[1]*L[1],M.a.v[2]*L[2]):C.translate(-M.a.v[0]*L,-M.a.v[1]*L,M.a.v[2]*L));for(P=0;P<D;P+=1)(M=k[P].a).s.propType&&((L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars)).length?C.scale(1+(M.s.v[0]-1)*L[0],1+(M.s.v[1]-1)*L[1],1):C.scale(1+(M.s.v[0]-1)*L,1+(M.s.v[1]-1)*L,1));for(P=0;P<D;P+=1){if(M=k[P].a,L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars),M.sk.propType&&(L.length?C.skewFromAxis(-M.sk.v*L[0],M.sa.v*L[1]):C.skewFromAxis(-M.sk.v*L,M.sa.v*L)),M.r.propType&&(L.length?C.rotateZ(-M.r.v*L[2]):C.rotateZ(-M.r.v*L)),M.ry.propType&&(L.length?C.rotateY(M.ry.v*L[1]):C.rotateY(M.ry.v*L)),M.rx.propType&&(L.length?C.rotateX(M.rx.v*L[0]):C.rotateX(M.rx.v*L)),M.o.propType&&(L.length?z+=(M.o.v*L[0]-z)*L[0]:z+=(M.o.v*L-z)*L),e.strokeWidthAnim&&M.sw.propType&&(L.length?H+=M.sw.v*L[0]:H+=M.sw.v*L),e.strokeColorAnim&&M.sc.propType)for(W=0;W<3;W+=1)L.length?V[W]+=(M.sc.v[W]-V[W])*L[0]:V[W]+=(M.sc.v[W]-V[W])*L;if(e.fillColorAnim&&e.fc){if(M.fc.propType)for(W=0;W<3;W+=1)L.length?U[W]+=(M.fc.v[W]-U[W])*L[0]:U[W]+=(M.fc.v[W]-U[W])*L;M.fh.propType&&(U=L.length?addHueToRGB(U,M.fh.v*L[0]):addHueToRGB(U,M.fh.v*L)),M.fs.propType&&(U=L.length?addSaturationToRGB(U,M.fs.v*L[0]):addSaturationToRGB(U,M.fs.v*L)),M.fb.propType&&(U=L.length?addBrightnessToRGB(U,M.fb.v*L[0]):addBrightnessToRGB(U,M.fb.v*L))}}for(P=0;P<D;P+=1)(M=k[P].a).p.propType&&(L=k[P].s.getMult(T[r].anIndexes[P],x.a[P].s.totalChars),this._hasMaskedPath?L.length?C.translate(0,M.p.v[1]*L[0],-M.p.v[2]*L[1]):C.translate(0,M.p.v[1]*L,-M.p.v[2]*L):L.length?C.translate(M.p.v[0]*L[0],M.p.v[1]*L[1],-M.p.v[2]*L[2]):C.translate(M.p.v[0]*L,M.p.v[1]*L,-M.p.v[2]*L));if(e.strokeWidthAnim&&($=H<0?0:H),e.strokeColorAnim&&(G="rgb("+Math.round(255*V[0])+","+Math.round(255*V[1])+","+Math.round(255*V[2])+")"),e.fillColorAnim&&e.fc&&(q="rgb("+Math.round(255*U[0])+","+Math.round(255*U[1])+","+Math.round(255*U[2])+")"),this._hasMaskedPath){if(C.translate(0,-e.ls),C.translate(0,_[1]*R*.01+n,0),this._pathData.p.v){y=(l.point[1]-f.point[1])/(l.point[0]-f.point[0]);var le=180*Math.atan(y)/Math.PI;l.point[0]<f.point[0]&&(le+=180),C.rotate(-le*Math.PI/180)}C.translate(j,F,0),a-=_[0]*T[r].an*.005,T[r+1]&&Z!==T[r+1].ind&&(a+=T[r].an/2,a+=.001*e.tr*e.finalSize)}else{switch(C.translate(i,n,0),e.ps&&C.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:C.translate(T[r].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[T[r].line]),0,0);break;case 2:C.translate(T[r].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[T[r].line])/2,0,0)}C.translate(0,-e.ls),C.translate(N,0,0),C.translate(_[0]*T[r].an*.005,_[1]*R*.01,0),i+=T[r].l+.001*e.tr*e.finalSize}"html"===S?ee=C.toCSS():"svg"===S?ee=C.to2dCSS():te=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],Y=z}E<=r?(O=new LetterProps(Y,$,G,q,ee,te),this.renderedLetters.push(O),E+=1,this.lettersChangedFlag=!0):(O=this.renderedLetters[r],this.lettersChangedFlag=O.update(Y,$,G,q,ee,te)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(e,t,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,i),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var i,n,r=t.length,o="";for(i=0;i<r;i+=1)"sh"===t[i].ty&&(n=t[i].ks.k,o+=buildShapeString(n,n.i.length,!0,e));return o},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,i,n,r){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[i]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[i])/2,0,0)}t.translate(n,r,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,i){this.textSpans=[],this.renderType="svg",this.initElement(e,t,i)}function ISolidElement(e,t,i){this.initElement(e,t,i)}function NullElement(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initFrame(),this.initTransform(e,t,i),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,i){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,i),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(t&&t.title){var n=createNS("title"),r=createElementID();n.setAttribute("id",r),n.textContent=t.title,this.svgElement.appendChild(n),i+=r}if(t&&t.description){var o=createNS("desc"),s=createElementID();o.setAttribute("id",s),o.textContent=t.description,this.svgElement.appendChild(o),i+=" "+s}i&&this.svgElement.setAttribute("aria-labelledby",i);var a=createNS("defs");this.svgElement.appendChild(a);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&!1===t.hideOnTransparent),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:a,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,i=e.length,n=[],r="";t<i;)e[t]===String.fromCharCode(13)||e[t]===String.fromCharCode(3)?(n.push(r),r=""):r+=e[t],t+=1;return n.push(r),n},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var i=e.shapes[0];if(i.it){var n=i.it[i.it.length-1];n.s&&(n.s.k[0]=t,n.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var n=this.globalData.fontManager.getFontByName(i.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var r=i.fWeight,o=i.fStyle;this.layerElement.setAttribute("font-style",o),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",i.t);var s,a=i.l||[],l=!!this.globalData.fontManager.chars;t=a.length;var c=this.mHelper,u=this.data.singleShape,h=0,d=0,f=!0,p=.001*i.tr*i.finalSize;if(!u||l||i.sz){var m,g=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!l||!u||0===e){if(s=g>e?this.textSpans[e].span:createNS(l?"g":"text"),g<=e){if(s.setAttribute("stroke-linecap","butt"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=s,l){var v=createNS("g");s.appendChild(v),this.textSpans[e].childSpan=v}this.textSpans[e].span=s,this.layerElement.appendChild(s)}s.style.display="inherit"}if(c.reset(),u&&(a[e].n&&(h=-p,d+=i.yOffset,d+=f?1:0,f=!1),this.applyTextPropertiesToMatrix(i,c,a[e].line,h,d),h+=a[e].l||0,h+=p),l){var b;if(1===(m=this.globalData.fontManager.getCharData(i.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)b=new SVGCompElement(m.data,this.globalData,this);else{var y=emptyShapeData;m.data&&m.data.shapes&&(y=this.buildShapeData(m.data,i.finalSize)),b=new SVGShapeElement(y,this.globalData,this)}if(this.textSpans[e].glyph){var w=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(w.layerElement),w.destroy()}this.textSpans[e].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[e].childSpan.appendChild(b.layerElement),1===m.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else u&&s.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),s.textContent=a[e].val,s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}u&&s&&s.setAttribute("d","")}else{var _=this.textContainer,k="start";switch(i.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}_.setAttribute("text-anchor",k),_.setAttribute("letter-spacing",p);var x=this.buildTextContents(i.finalText);for(t=x.length,d=i.ps?i.ps[1]+i.ascent:0,e=0;e<t;e+=1)(s=this.textSpans[e].span||createNS("tspan")).textContent=x[e],s.setAttribute("x",0),s.setAttribute("y",d),s.style.display="inherit",_.appendChild(s),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=s,d+=i.finalLineHeight;this.layerElement.appendChild(_)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,i=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<i;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var e,t;this._sizeChanged=!0;var i,n,r,o=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;for(t=s.length,e=0;e<t;e+=1)s[e].n||(i=o[e],n=this.textSpans[e].span,(r=this.textSpans[e].glyph)&&r.renderFrame(),i._mdf.m&&n.setAttribute("transform",i.m),i._mdf.o&&n.setAttribute("opacity",i.o),i._mdf.sw&&n.setAttribute("stroke-width",i.sw),i._mdf.sc&&n.setAttribute("stroke",i.sc),i._mdf.fc&&n.setAttribute("fill",i.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,
590,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var i=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",e.w),n.setAttribute("height",e.h),n.setAttribute("x",0),n.setAttribute("y",0);var r=createElementID();i.setAttribute("id",r),i.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),t.appendChild(i),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,i=this.layers.length;for(t=0;t<i;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){t[e]=!0;var i=this.createItem(this.layers[e]);if(t[e]=i,getExpressionsPlugin()&&(0===this.layers[e].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,e),this.layers[e].tt){var n="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(-1===n)return;if(this.elements[n]&&!0!==this.elements[n]){var r=t[n].getMatte(this.layers[e].tt);i.setMatte(r)}else this.buildItem(n),this.addPendingElement(i)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,i=this.elements.length;t<i;){if(this.elements[t]===e){var n="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,r=this.elements[n].getMatte(this.layers[t].tt);e.setMatte(r);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;null===e?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var i=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=i-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<i;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var i=e.getBaseElement();if(i){for(var n,r=0;r<t;)this.elements[r]&&!0!==this.elements[r]&&this.elements[r].getBaseElement()&&(n=this.elements[r].getBaseElement()),r+=1;n?this.layerElement.insertBefore(i,n):this.layerElement.appendChild(i)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initTransform(e,t,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var i,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,i=e.length,n="_";for(t=0;t<i;t+=1)n+=e[t].transform.key+"_";var r=this.sequences[n];return r||(r={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=r,this.sequenceList.push(r)),r},processSequence:function(e,t){for(var i=0,n=e.transforms.length,r=t;i<n&&!t;){if(e.transforms[i].transform.mProps._mdf){r=!0;break}i+=1}if(r)for(e.finalTransform.reset(),i=n-1;i>=0;i-=1)e.finalTransform.multiply(e.transforms[i].transform.mProps.v);e._mdf=r},processSequences:function(e){var t,i=this.sequenceList.length;for(t=0;t<i;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,i=null,n=null;function r(){var r,o,s;t||(r=createNS("svg"),o=createNS("filter"),s=createNS("feColorMatrix"),o.setAttribute("id",e),s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),o.appendChild(s),r.appendChild(o),r.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(r.style.display="none"),n=r,document.body.appendChild(n),t=createTag("canvas"),(i=t.getContext("2d")).filter="url
59(#"+e+")",i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1))}return{load:r,get:function(n){return t||r(),t.width=n.width,t.height=n.height,i.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var i=createTag("canvas");return i.width=e,i.height=t,i}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas},registeredEffects={};function CVEffects(e){var t,i,n=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<n;t+=1){i=null;var r=e.data.ef[t].ty;if(registeredEffects[r])i=new(0,registeredEffects[r].effect)(e.effectsManager.effectElements[t],e);i&&this.filters.push(i)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var i;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n=this.masksProperties.length,r=!1;for(i=0;i<n;i+=1)"n"!==this.masksProperties[i].mode&&(r=!0),this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3);this.hasMasks=r,r&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,i=this.filters.length;for(t=0;t<i;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,i=this.filters.length,n=[];for(t=0;t<i;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,i,n,r=this.element.finalTransform.mat,o=this.element.canvasContext,s=this.masksProperties.length;for(o.beginPath(),e=0;e<s;e+=1)if("n"!==this.masksProperties[e].mode){var a;this.masksProperties[e].inv&&(o.moveTo(0,0),o.lineTo(this.element.globalData.compSize.w,0),o.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),o.lineTo(0,this.element.globalData.compSize.h),o.lineTo(0,0)),n=this.viewData[e].v,t=r.applyToPointArray(n.v[0][0],n.v[0][1],0),o.moveTo(t[0],t[1]);var l=n._length;for(a=1;a<l;a+=1)i=r.applyToTriplePoints(n.o[a-1],n.i[a],n.v[a]),o.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);i=r.applyToTriplePoints(n.o[a-1],n.i[0],n.v[0]),o.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5])}this.element.globalData.renderer.save(!0),o.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,i,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var r,o=4;"rc"===t.ty?o=5:"el"===t.ty?o=6:"sr"===t.ty&&(o=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,o,e);var s,a=i.length;for(r=0;r<a;r+=1)i[r].closed||(s={transforms:n.addTransformSequence(i[r].transforms),trNodes:[]},this.styledShapes.push(s),i[r].elements.push(s))}function CVShapeElement(e,t,i){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,i)}function CVTextElement(e,t,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,i)}function CVImageElement(e,t,i){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,i)}function CVSolidElement(e,t,i){this.initElement(e,t,i)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var e;this.stack=[],this.cArrPos=0,this.cTr=new Matrix;for(e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}
vendor: 110,949 bytes, line 59
59this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(e,t,i){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,i),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||void 0===t.clearCanvas||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(e,t,i){this.initElement(e,t,i)}function HShapeElement(e,t,i){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,i)}function HCameraElement(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,e.pe,0,0,this),e.ks.p.s?(this.px=n(this,e.ks.p.x,1,0,this),this.py=n(this,e.ks.p.y,1,0,this),this.pz=n(this,e.ks.p.z,1,0,this)):this.p=n(this,e.ks.p,1,0,this),e.ks.a&&(this.a=n(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var r,o=e.ks.or.k.length;for(r=0;r<o;r+=1)e.ks.or.k[r].to=null,e.ks.or.k[r].ti=null}this.or=n(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,e.ks.rx,0,degToRads,this),this.ry=n(this,e.ks.ry,0,degToRads,this),this.rz=n(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,i){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,i)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(e,t,i){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,i),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var i=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(i),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var i=assetLoader.getLumaCanvas(this.canvasContext.canvas);i.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(i,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var i={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},n={};if("fl"===e.ty||"st"===e.ty?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(i.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):"gf"!==e.ty&&"gs"!==e.ty||(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty){if(i.lc=lineCapEnum[e.lc||2],i.lj=lineJoinEnum[e.lj||2],1==e.lj&&(i.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(i.wi=n.w.v),e.d){var r=new DashProperty(this,e.d,"canvas",this);n.d=r,n.d.k||(i.da=n.d.dashArray,i.do=n.d.dashoffset[0])}}else i.r=2===e.r?"evenodd":"nonzero";return this.stylesList.push(i),n.style=i,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,i=this.stylesList.length;for(t=0;t<i;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,i=e.length;for(t=0;t<i;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,i,n,r){var o,s,a,l,c,u,h=e.length-1,d=[],f=[],p=[].concat(r);for(o=h;o>=0;o-=1){if((l=this.searchProcessedElement(e[o]))?t[o]=i[l-1]:e[o]._shouldRender=n,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty)l?t[o].style.closed=!1:t[o]=this.createStyleElement(e[o],p),d.push(t[o].style);else if("gr"===e[o].ty){if(l)for(a=t[o].it.length,s=0;s<a;s+=1)t[o].prevViewData[s]=t[o].it[s];else t[o]=this.createGroupElement(e[o]);this.searchShapes(e[o].it,t[o].it,t[o].prevViewData,n,p)}else"tr"===e[o].ty?(l||(u=this.createTransformElement(e[o]),t[o]=u),p.push(t[o]),this.addTransformToStyleList(t[o])):"sh"===e[o].ty||"rc"===e[o].ty||"el"===e[o].ty||"sr"===e[o].ty?l||(t[o]=this.createShapeElement(e[o])):"tm"===e[o].ty||"rd"===e[o].ty||"pb"===e[o].ty||"zz"===e[o].ty||"op"===e[o].ty?(l?(c=t[o]).closed=!1:((c=ShapeModifiers.getModifier(e[o].ty)).init(this,e[o]),t[o]=c,this.shapeModifiers.push(c)),f.push(c)):"rp"===e[o].ty&&(l?(c=t[o]).closed=!0:(c=ShapeModifiers.getModifier(e[o].ty),t[o]=c,c.init(this,e,o,t),this.shapeModifiers.push(c),n=!1),f.push(c));this.addProcessedElement(e[o],o+1)}for(this.removeTransformFromStyleList(),this.closeStyles(d),h=f.length,o=0;o<h;o+=1)f[o].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,i,n,r,o,s,a,l,c=this.stylesList.length,u=this.globalData.renderer,h=this.globalData.canvasContext;for(e=0;e<c;e+=1)if(("st"!==(a=(l=this.stylesList[e]).type)&&"gs"!==a||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(u.save(),o=l.elements,"st"===a||"gs"===a?(u.ctxStrokeStyle("st"===a?l.co:l.grd),u.ctxLineWidth(l.wi),u.ctxLineCap(l.lc),u.ctxLineJoin(l.lj),u.ctxMiterLimit(l.ml||0)):u.ctxFillStyle("fl"===a?l.co:l.grd),u.ctxOpacity(l.coOp),"st"!==a&&"gs"!==a&&h.beginPath(),u.ctxTransform(l.preTransforms.finalTransform.props),i=o.length,t=0;t<i;t+=1){for("st"!==a&&"gs"!==a||(h.beginPath(),l.da&&(h.setLineDash(l.da),h.lineDashOffset=l.do)),r=(s=o[t].trNodes).length,n=0;n<r;n+=1)"m"===s[n].t?h.moveTo(s[n].p[0],s[n].p[1]):"c"===s[n].t?h.bezierCurveTo(s[n].pts[0],s[n].pts[1],s[n].pts[2],s[n].pts[3],s[n].pts[4],s[n].pts[5]):h.closePath();"st"!==a&&"gs"!==a||(u.ctxStroke(),l.da&&h.setLineDash(this.dashResetter))}"st"!==a&&"gs"!==a&&this.globalData.renderer.ctxFill(l.r),u.restore()}},CVShapeElement.prototype.renderShape=function(e,t,i,n){var r,o;for(o=e,r=t.length-1;r>=0;r-=1)"tr"===t[r].ty?(o=i[r].transform,this.renderShapeTransform(e,o)):"sh"===t[r].ty||"el"===t[r].ty||"rc"===t[r].ty||"sr"===t[r].ty?this.renderPath(t[r],i[r]):"fl"===t[r].ty?this.renderFill(t[r],i[r],o):"st"===t[r].ty?this.renderStroke(t[r],i[r],o):"gf"===t[r].ty||"gs"===t[r].ty?this.renderGradientFill(t[r],i[r],o):"gr"===t[r].ty?this.renderShape(o,t[r].it,i[r].it):t[r].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var i,n,r,o=e.trNodes,s=t.paths,a=s._length;o.length=0;var l=e.transforms.finalTransform;for(r=0;r<a;r+=1){var c=s.shapes[r];if(c&&c.v){for(n=c._length,i=1;i<n;i+=1)1===i&&o.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),o.push({t:"c",pts:l.applyToTriplePoints(c.o[i-1],c.i[i],c.v[i])});1===n&&o.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&n&&(o.push({t:"c",pts:l.applyToTriplePoints(c.o[i-1],c.i[0],c.v[0])}),o.push({t:"z"}))}}e.trNodes=o}},CVShapeElement.prototype.renderPath=function(e,t){if(!0!==e.hd&&e._shouldRender){var i,n=t.styledShapes.length;for(i=0;i<n;i+=1)this.renderStyledShape(t.styledShapes[i],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,i){var n=t.style;(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||i._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*i.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,i){var n,r=t.style;if(!r.grd||t.g._mdf||t.s._mdf||t.e._mdf||1!==e.t&&(t.h._mdf||t.a._mdf)){var o,s=this.globalData.canvasContext,a=t.s.v,l=t.e.v;if(1===e.t)n=s.createLinearGradient(a[0],a[1],l[0],l[1]);else{var c=Math.sqrt(Math.pow(a[0]-l[0],2)+Math.pow(a[1]-l[1],2)),u=Math.atan2(l[1]-a[1],l[0]-a[0]),h=t.h.v;h>=1?h=.99:h<=-1&&(h=-.99);var d=c*h,f=Math.cos(u+t.a.v)*d+a[0],p=Math.sin(u+t.a.v)*d+a[1];n=s.createRadialGradient(f,p,0,a[0],a[1],c)}var m=e.g.p,g=t.g.c,v=1;for(o=0;o<m;o+=1)t.g._hasOpacity&&t.g._collapsable&&(v=t.g.o[2*o+1]),n.addColorStop(g[4*o]/100,"rgba("+g[4*o+1]+","+g[4*o+2]+","+g[4*o+3]+","+v+")");r.grd=n}r.coOp=t.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(e,t,i){var n=t.style,r=t.d;r&&(r._mdf||this._isFirstFrame)&&(n.da=r.dashArray,n.do=r.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||i._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*i.opacity),(t.w._mdf||this._isFirstFrame)&&(n.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var i=!1;e.sc&&(i=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var n,r,o,s,a,l,c,u,h,d,f,p,m=this.globalData.fontManager.getFontByName(e.f),g=e.l,v=this.mHelper;this.stroke=i,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,r=e.finalText.length;var b=this.data.singleShape,y=.001*e.tr*e.finalSize,w=0,_=0,k=!0,x=0;for(n=0;n<r;n+=1){s=(o=this.globalData.fontManager.getCharData(e.finalText[n],m.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&o.data||{},v.reset(),b&&g[n].n&&(w=-y,_+=e.yOffset,_+=k?1:0,k=!1),h=(c=s.shapes?s.shapes[0].it:[]).length,v.scale(e.finalSize/100,e.finalSize/100),b&&this.applyTextPropertiesToMatrix(e,v,g[n].line,w,_),f=createSizedArray(h-1);var C=0;for(u=0;u<h;u+=1)if("sh"===c[u].ty){for(l=c[u].ks.k.i.length,d=c[u].ks.k,p=[],a=1;a<l;a+=1)1===a&&p.push(v.applyToX(d.v[0][0],d.v[0][1],0),v.applyToY(d.v[0][0],d.v[0][1],0)),p.push(v.applyToX(d.o[a-1][0],d.o[a-1][1],0),v.applyToY(d.o[a-1][0],d.o[a-1][1],0),v.applyToX(d.i[a][0],d.i[a][1],0),v.applyToY(d.i[a][0],d.i[a][1],0),v.applyToX(d.v[a][0],d.v[a][1],0),v.applyToY(d.v[a][0],d.v[a][1],0));p.push(v.applyToX(d.o[a-1][0],d.o[a-1][1],0),v.applyToY(d.o[a-1][0],d.o[a-1][1],0),v.applyToX(d.i[0][0],d.i[0][1],0),v.applyToY(d.i[0][0],d.i[0][1],0),v.applyToX(d.v[0][0],d.v[0][1],0),v.applyToY(d.v[0][0],d.v[0][1],0)),f[C]=p,C+=1}b&&(w+=g[n].l,w+=y),this.textSpans[x]?this.textSpans[x].elem=f:this.textSpans[x]={elem:f},x+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,i,n,r,o;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var s,a=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;t=l.length;var c,u,h=null,d=null,f=null,p=this.globalData.renderer;for(e=0;e<t;e+=1)if(!l[e].n){if((s=a[e])&&(p.save(),p.ctxTransform(s.p),p.ctxOpacity(s.o)),this.fill){for(s&&s.fc?h!==s.fc&&(p.ctxFillStyle(s.fc),h=s.fc):h!==this.values.fill&&(h=this.values.fill,p.ctxFillStyle(this.values.fill)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<n;i+=1)for(o=(u=c[i]).length,this.globalData.canvasContext.moveTo(u[0],u[1]),r=2;r<o;r+=6)this.globalData.canvasContext.bezierCurveTo(u[r],u[r+1],u[r+2],u[r+3],u[r+4],u[r+5]);this.globalData.canvasContext.closePath(),p.ctxFill()}if(this.stroke){for(s&&s.sw?f!==s.sw&&(f=s.sw,p.ctxLineWidth(s.sw)):f!==this.values.sWidth&&(f=this.values.sWidth,p.ctxLineWidth(this.values.sWidth)),s&&s.sc?d!==s.sc&&(d=s.sc,p.ctxStrokeStyle(s.sc)):d!==this.values.stroke&&(d=this.values.stroke,p.ctxStrokeStyle(this.values.stroke)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<n;i+=1)for(o=(u=c[i]).length,this.globalData.canvasContext.moveTo(u[0],u[1]),r=2;r<o;r+=6)this.globalData.canvasContext.bezierCurveTo(u[r],u[r+1],u[r+2],u[r+3],u[r+4],u[r+5]);this.globalData.canvasContext.closePath(),p.ctxStroke()}s&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,i,n=e.getContext("2d"),r=this.img.width,o=this.img.height,s=r/o,a=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;s>a&&"xMidYMid slice"===l||s<a&&"xMidYMid slice"!==l?t=(i=o)*a:i=(t=r)/a,n.drawImage(this.img,(r-t)/2,(o-i)/2,t,i,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){1===e[0]&&0===e[1]&&0===e[4]&&1===e[5]&&0===e[12]&&0===e[13]||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,i,n){this.canvasContext.fillRect(e,t,i,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var i="0px 0px 0px";t.transformOrigin=i,t.mozTransformOrigin=i,t.webkitTransformOrigin=i,t["-webkit-transform"]=i,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var i,n,r,o;if(this.reset(),e?(i=e,n=t,this.canvasContext.canvas.width=i,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(i=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(i=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=i*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",l=s[0]||"xMidYMid",c=l.substr(0,4),u=l.substr(4);r=i/n,(o=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===a||o<r&&"slice"===a?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===c&&(o<r&&"meet"===a||o>r&&"slice"===a)?(i-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===c&&(o<r&&"meet"===a||o>r&&"slice"===a)?(i-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===u&&(o>r&&"meet"===a||o<r&&"slice"===a)?(n-this.transformCanvas.h*(i/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===u&&(o>r&&"meet"===a||o<r&&"slice"===a)?(n-this.transformCanvas.h*(i/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var i;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(e-this.layers[i].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var i=this.createItem(this.layers[e],this,this.globalData);t[e]=i,i.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,i=this.stack[this.cArrPos],n=i.transform,r=this.cTr.props;for(t=0;t<16;t+=1)r[t]=n[t];if(e){this.nativeContext.restore();var o=this.stack[this.cArrPos+1];this.appliedFillStyle=o.fillStyle,this.appliedStrokeStyle=o.strokeStyle,this.appliedLineWidth=o.lineWidth,this.appliedLineCap=o.lineCap,this.appliedLineJoin=o.lineJoin,this.appliedMiterLimit=o.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||-1!==i.opacity&&this.currentOpacity!==i.opacity)&&(this.nativeContext.globalAlpha=i.opacity,this.currentOpacity=i.opacity),this.currentFillStyle=i.fillStyle,this.currentStrokeStyle=i.strokeStyle,this.currentLineWidth=i.lineWidth,this.currentLineCap=i.lineCap,this.currentLineJoin=i.lineJoin,this.currentMiterLimit=i.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var i,n=this.stack[this.cArrPos];for(i=0;i<16;i+=1)n.transform[i]=t[i];this.cArrPos+=1;var r=this.stack[this.cArrPos];r.opacity=n.opacity,r.fillStyle=n.fillStyle,r.strokeStyle=n.strokeStyle,r.lineWidth=n.lineWidth,r.lineCap=n.lineCap,r.lineJoin=n.lineJoin,r.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var i=t.props;this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,i,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,i,n)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var i,n=e.length;for(i=0;i<n;i+=1)t=e[i].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var i,n,r,o,s,a=e.sh.v,l=e.transformers,c=a._length;if(!(c<=1)){for(i=0;i<c-1;i+=1)n=this.getTransformedPoint(l,a.v[i]),r=this.getTransformedPoint(l,a.o[i]),o=this.getTransformedPoint(l,a.i[i+1]),s=this.getTransformedPoint(l,a.v[i+1]),this.checkBounds(n,r,o,s,t);a.c&&(n=this.getTransformedPoint(l,a.v[i]),r=this.getTransformedPoint(l,a.o[i]),o=this.getTransformedPoint(l,a.i[0]),s=this.getTransformedPoint(l,a.v[0]),this.checkBounds(n,r,o,s,t))}},HShapeElement.prototype.checkBounds=function(e,t,i,n,r){this.getBoundsOfCurve(e,t,i,n);var o=this.shapeBoundingBox;r.x=bmMin(o.left,r.x),r.xMax=bmMax(o.right,r.xMax),r.y=bmMin(o.top,r.y),r.yMax=bmMax(o.bottom,r.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,i,n){for(var r,o,s,a,l,c,u,h=[[e[0],n[0]],[e[1],n[1]]],d=0;d<2;++d)o=6*e[d]-12*t[d]+6*i[d],r=-3*e[d]+9*t[d]-9*i[d]+3*n[d],s=3*t[d]-3*e[d],o|=0,s|=0,0===(r|=0)&&0===o||(0===r?(a=-s/o)>0&&a<1&&h[d].push(this.calculateF(a,e,t,i,n,d)):(l=o*o-4*s*r)>=0&&((c=(-o+bmSqrt(l))/(2*r))>0&&c<1&&h[d].push(this.calculateF(c,e,t,i,n,d)),(u=(-o-bmSqrt(l))/(2*r))>0&&u<1&&h[d].push(this.calculateF(u,e,t,i,n,d))));this.shapeBoundingBox.left=bmMin.apply(null,h[0]),this.shapeBoundingBox.top=bmMin.apply(null,h[1]),this.shapeBoundingBox.right=bmMax.apply(null,h[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,h[1])},HShapeElement.prototype.calculateF=function(e,t,i,n,r,o){return bmPow(1-e,3)*t[o]+3*bmPow(1-e,2)*e*i[o]+3*(1-e)*bmPow(e,2)*n[o]+bmPow(e,3)*r[o]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var i,n=e.length;for(i=0;i<n;i+=1)e[i]&&e[i].sh?this.calculateShapeBoundingBox(e[i],t):e[i]&&e[i].it?this.calculateBoundingBox(e[i].it,t):e[i]&&e[i].style&&e[i].w&&this.expandStrokeBoundingBox(e[i].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var i=0;if(e.keyframes){for(var n=0;n<e.keyframes.length;n+=1){var r=e.keyframes[n].s;r>i&&(i=r)}i*=e.mult}else i=e.v*e.mult;t.x-=i,t.xMax+=i,t.y-=i,t.yMax+=i},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var i=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),i=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),i=!0),i||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,r="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=r,n.webkitTransform=r}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,i=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=i,t.color=i,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var n,r,o=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",o.fClass)this.innerElem.className=o.fClass;else{t.fontFamily=o.fFamily;var s=e.fWeight,a=e.fStyle;t.fontStyle=a,t.fontWeight=s}var l,c,u,h=e.l;r=h.length;var d,f=this.mHelper,p="",m=0;for(n=0;n<r;n+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?l=this.textPaths[m]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?u=(c=this.textSpans[m]).children[0]:((c=createTag("div")).style.lineHeight=0,(u=createNS("svg")).appendChild(l),styleDiv(c)))):this.isMasked?l=this.textPaths[m]?this.textPaths[m]:createNS("text"):this.textSpans[m]?(c=this.textSpans[m],l=this.textPaths[m]):(styleDiv(c=createTag("span")),styleDiv(l=createTag("span")),c.appendChild(l)),this.globalData.fontManager.chars){var g,v=this.globalData.fontManager.getCharData(e.finalText[n],o.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(g=v?v.data:null,f.reset(),g&&g.shapes&&g.shapes.length&&(d=g.shapes[0].it,f.scale(e.finalSize/100,e.finalSize/100),p=this.createPathShape(f,d),l.setAttribute("d",p)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(u);var b=u.getBBox();u.setAttribute("width",b.width+2),u.setAttribute("height",b.height+2),u.setAttribute("viewBox",b.x-1+" "+(b.y-1)+" "+(b.width+2)+" "+(b.height+2));var y=u.style,w="translate("+(b.x-1)+"px,"+(b.y-1)+"px)";y.transform=w,y.webkitTransform=w,h[n].yOffset=b.y-1}else u.setAttribute("width",1),u.setAttribute("height",1);c.appendChild(u)}}else if(l.textContent=h[n].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(c);var _=l.style,k="translate3d(0,"+-e.finalSize/1.2+"px,0)";_.transform=k,_.webkitTransform=k}this.isMasked?this.textSpans[m]=l:this.textSpans[m]=c,this.textSpans[m].style.display="block",this.textPaths[m]=l,m+=1}for(;m<this.textSpans.length;)this.textSpans[m].style.display="none",m+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var i,n,r,o,s,a=0,l=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;for(n=c.length,i=0;i<n;i+=1)c[i].n?a+=1:(o=this.textSpans[i],s=this.textPaths[i],r=l[a],a+=1,r._mdf.m&&(this.isMasked?o.setAttribute("transform",r.m):(o.style.webkitTransform=r.m,o.style.transform=r.m)),o.style.opacity=r.o,r.sw&&r._mdf.sw&&s.setAttribute("stroke-width",r.sw),r.sc&&r._mdf.sc&&s.setAttribute("stroke",r.sc),r.fc&&r._mdf.fc&&(s.setAttribute("fill",r.fc),s.style.color=r.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var u=this.innerElem.getBBox();this.currentBBox.w!==u.width&&(this.currentBBox.w=u.width,this.svgElement.setAttribute("width",u.width)),this.currentBBox.h!==u.height&&(this.currentBBox.h=u.height,this.svgElement.setAttribute("height",u.height));if(this.currentBBox.w!==u.width+2||this.currentBBox.h!==u.height+2||this.currentBBox.x!==u.x-1||this.currentBBox.y!==u.y-1){this.currentBBox.w=u.width+2,this.currentBBox.h=u.height+2,this.currentBBox.x=u.x-1,this.currentBBox.y=u.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var h="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=h,e.webkitTransform=h}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,i,n,r=this.comp.threeDElements.length;for(e=0;e<r;e+=1)if("3d"===(t=this.comp.threeDElements[e]).type){i=t.perspectiveElem.style,n=t.container.style;var o=this.pe.v+"px",s="0px 0px 0px",a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";i.perspective=o,i.webkitPerspective=o,n.transformOrigin=s,n.mozTransformOrigin=s,n.webkitTransformOrigin=s,i.transform=a,i.webkitTransform=a}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,i=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)i=this.hierarchy[e].finalTransform.mProp._mdf||i;if(i||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(e=t=this.hierarchy.length-1;e>=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r;r=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var o=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)+Math.pow(r[2],2)),s=[r[0]/o,r[1]/o,r[2]/o],a=Math.sqrt(s[2]*s[2]+s[0]*s[0]),l=Math.atan2(s[1],a),c=Math.atan2(s[0],-s[2]);this.mat.rotateY(c).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var u=!this._prevMat.equals(this.mat);if((u||this.pe._mdf)&&this.comp.threeDElements){var h,d,f;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if("3d"===(h=this.comp.threeDElements[e]).type){if(u){var p=this.mat.toCSS();(f=h.container.style).transform=p,f.webkitTransform=p}this.pe._mdf&&((d=h.perspectiveElem.style).perspective=this.pe.v+"px",d.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(e,t){var i=e.getBaseElement();if(i){var n=this.layers[t];if(n.ddd&&this.supports3d)this.addTo3dContainer(i,t);else if(this.threeDElements)this.addTo3dContainer(i,t);else{for(var r,o,s=0;s<t;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement&&(o=this.elements[s],r=(this.layers[s].ddd?this.getThreeDContainerByPos(s):o.getBaseElement())||r),s+=1;r?n.ddd&&this.supports3d||this.layerElement.insertBefore(i,r):n.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,i=this.threeDElements.length;t<i;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var i,n,r=createTag("div");styleDiv(r);var o=createTag("div");if(styleDiv(o),"3d"===t){(i=r.style).width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var s="50% 50%";i.webkitTransformOrigin=s,i.mozTransformOrigin=s,i.transformOrigin=s;var a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=o.style).transform=a,n.webkitTransform=a}r.appendChild(o);var l={container:o,perspectiveElem:r,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t,i=this.layers.length,n="";for(e=0;e<i;e+=1)this.layers[e].ddd&&3!==this.layers[e].ty?("3d"!==n&&(n="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):("2d"!==n&&(n="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(i=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var i=0,n=this.threeDElements.length;i<n;){if(t<=this.threeDElements[i].endPos){for(var r,o=this.threeDElements[i].startPos;o<t;)this.elements[o]&&this.elements[o].getBaseElement&&(r=this.elements[o].getBaseElement()),o+=1;r?this.threeDElements[i].container.insertBefore(e,r):this.threeDElements[i].container.appendChild(e);break}i+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),i=this.animationItem.wrapper,n=t.style;n.width=e.w+"px",n.height=e.h+"px",this.resizerElem=t,styleDiv(t),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),i.appendChild(t),n.overflow="hidden";var r=createNS("svg");r.setAttribute("width","1"),r.setAttribute("height","1"),styleDiv(r),this.resizerElem.appendChild(r);var o=createNS("defs");r.appendChild(o),this.data=e,this.setupGlobalData(e,r),this.globalData.defs=o,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,i,n,r=this.animationItem.wrapper.offsetWidth,o=this.animationItem.wrapper.offsetHeight,s=r/o;this.globalData.compSize.w/this.globalData.compSize.h>s?(e=r/this.globalData.compSize.w,t=r/this.globalData.compSize.w,i=0,n=(o-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(e=o/this.globalData.compSize.h,t=o/this.globalData.compSize.h,i=(r-this.globalData.compSize.w*(o/this.globalData.compSize.h))/2,n=0);var a=this.resizerElem.style;a.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+i+","+n+",0,1)",a.transform=a.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,i=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e<n;e+=1){var r=this.threeDElements[e].perspectiveElem.style;r.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(i,2))+"px",r.perspective=r.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,i=e.length,n=createTag("div");for(t=0;t<i;t+=1)if(e[t].xt){var r=this.createComp(e[t],n,this.globalData.comp,null);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var i,n=0;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(i=this.elements[n].getBaseElement()),n+=1;i?this.layerElement.insertBefore(e,i):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(t){for(var i=0,n=e.layers.length;i<n;){if(e.layers[i].nm===t||e.layers[i].ind===t)return e.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$2(e)}function seedRandom(e,t){var i,n=this,r=256,o="random",s=t.pow(r,6),a=t.pow(2,52),l=2*a,c=255;function u(e){var t,i=e.length,n=this,o=0,s=n.i=n.j=0,a=n.S=[];for(i||(e=[i++]);o<r;)a[o]=o++;for(o=0;o<r;o++)a[o]=a[s=c&s+e[o%i]+(t=a[o])],a[s]=t;n.g=function(e){for(var t,i=0,o=n.i,s=n.j,a=n.S;e--;)t=a[o=c&o+1],i=i*r+a[c&(a[o]=a[s=c&s+t])+(a[s]=t)];return n.i=o,n.j=s,i}}function h(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function d(e,t){var i,n=[],r=_typeof$2(e);if(t&&"object"==r)for(i in e)try{n.push(d(e[i],t-1))}catch(e){}return n.length?n:"string"==r?e:e+"\0"}function f(e,t){for(var i,n=e+"",r=0;r<n.length;)t[c&r]=c&(i^=19*t[c&r])+n.charCodeAt(r++);return p(t)}function p(e){return String.fromCharCode.apply(0,e)}t["seed"+o]=function(c,m,g){var v=[],b=f(d((m=!0===m?{entropy:!0}:m||{}).entropy?[c,p(e)]:null===c?function(){try{i;var t=new Uint8Array(r);return(n.crypto||n.msCrypto).getRandomValues(t),p(t)}catch(t){var o=n.navigator,s=o&&o.plugins;return[+new Date,n,s,n.screen,p(e)]}}():c,3),v),y=new u(v),w=function(){for(var e=y.g(6),t=s,i=0;e<a;)e=(e+i)*r,t*=r,i=y.g(1);for(;e>=l;)e/=2,t/=2,i>>>=1;return(e+i)/t};return w.int32=function(){return 0|y.g(4)},w.quick=function(){return y.g(4)/4294967296},w.double=w,f(p(y.S),e),(m.pass||g||function(e,i,n,r){return r&&(r.S&&h(r,y),e.state=function(){return h(y,{})}),n?(t[o]=e,i):e})(w,b,"global"in m?m.global:this==t,m.state)},f(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var i,n=e.length,r=[];for(i=0;i<n;i+=1)r[i]=-e[i];return r}return e.propType?e.v:-e}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var i=_typeof$1(e),n=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(n,t)||"string"===i||"string"===n)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(i,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var r=0,o=e.length,s=t.length,a=[];r<o||r<s;)("number"==typeof e[r]||e[r]instanceof Number)&&("number"==typeof t[r]||t[r]instanceof Number)?a[r]=e[r]+t[r]:a[r]=void 0===t[r]?e[r]:e[r]||t[r],r+=1;return a}return 0}var add=sum;function sub(e,t){var i=_typeof$1(e),n=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(n,t))return"string"===i&&(e=parseInt(e,10)),"string"===n&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(i,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var r=0,o=e.length,s=t.length,a=[];r<o||r<s;)("number"==typeof e[r]||e[r]instanceof Number)&&("number"==typeof t[r]||t[r]instanceof Number)?a[r]=e[r]-t[r]:a[r]=void 0===t[r]?e[r]:e[r]||t[r],r+=1;return a}return 0}function mul(e,t){var i,n,r,o=_typeof$1(e),s=_typeof$1(t);if(isNumerable(o,e)&&isNumerable(s,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(r=e.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=e[n]*t;return i}if(isNumerable(o,e)&&$bm_isInstanceOfArray(t)){for(r=t.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=e*t[n];return i}return 0}function div(e,t){var i,n,r,o=_typeof$1(e),s=_typeof$1(t);if(isNumerable(o,e)&&isNumerable(s,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(r=e.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=e[n]/t;return i}if(isNumerable(o,e)&&$bm_isInstanceOfArray(t)){for(r=t.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=e/t[n];return i}return 0}function mod(e,t){return"string"==typeof e&&(e=parseInt(e,10)),"string"==typeof t&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,i){if(t>i){var n=i;i=t,t=n}return Math.min(Math.max(e,t),i)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var i;t||(t=helperLengthArray);var n=Math.min(e.length,t.length),r=0;for(i=0;i<n;i+=1)r+=Math.pow(t[i]-e[i],2);return Math.sqrt(r)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,i,n=e[0],r=e[1],o=e[2],s=Math.max(n,r,o),a=Math.min(n,r,o),l=(s+a)/2;if(s===a)t=0,i=0;else{var c=s-a;switch(i=l>.5?c/(2-s-a):c/(s+a),s){case n:t=(r-o)/c+(r<o?6:0);break;case r:t=(o-n)/c+2;break;case o:t=(n-r)/c+4}t/=6}return[t,i,l,e[3]]}function hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function hslToRgb(e){var t,i,n,r=e[0],o=e[1],s=e[2];if(0===o)t=s,n=s,i=s;else{var a=s<.5?s*(1+o):s+o-s*o,l=2*s-a;t=hue2rgb(l,a,r+1/3),i=hue2rgb(l,a,r),n=hue2rgb(l,a,r-1/3)}return[t,i,n,e[3]]}function linear(e,t,i,n,r){if(void 0!==n&&void 0!==r||(n=t,r=i,t=0,i=1),i<t){var o=i;i=t,t=o}if(e<=t)return n;if(e>=i)return r;var s,a=i===t?0:(e-t)/(i-t);if(!n.length)return n+(r-n)*a;var l=n.length,c=createTypedArray("float32",l);for(s=0;s<l;s+=1)c[s]=n[s]+(r[s]-n[s])*a;return c}function random(e,t){if(void 0===t&&(void 0===e?(e=0,t=1):(t=e,e=void 0)),t.length){var i,n=t.length;e||(e=createTypedArray("float32",n));var r=createTypedArray("float32",n),o=BMMath.random();for(i=0;i<n;i+=1)r[i]=e[i]+o*(t[i]-e[i]);return r}return void 0===e&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,i,n){var r,o=e.length,s=shapePool.newElement();s.setPathData(!!n,o);var a,l,c=[0,0];for(r=0;r<o;r+=1)a=t&&t[r]?t[r]:c,l=i&&i[r]?i[r]:c,s.setTripleAt(e[r][0],e[r][1],l[0]+e[r][0],l[1]+e[r][1],a[0]+e[r][0],a[1]+e[r][1],r,!0);return s}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(e,t){var i,n,r=this.pv.length?this.pv.length:1,o=createTypedArray("float32",r);var s=Math.floor(5*time);for(i=0,n=0;i<s;){for(n=0;n<r;n+=1)o[n]+=-t+2*t*BMMath.random();i+=1}var a=5*time,l=a-Math.floor(a),c=createTypedArray("float32",r);if(r>1){for(n=0;n<r;n+=1)c[n]=this.pv[n]+o[n]+(-t+2*t*BMMath.random())*l;return c}return this.pv+o[0]+(-t+2*t*BMMath.random())*l}.bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var i=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],n=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads;return[-Math.atan2(i[1],i[2])/degToRads,n,0]}function easeOut(e,t,i,n,r){return applyEase(easeOutBez,e,t,i,n,r)}function easeIn(e,t,i,n,r){return applyEase(easeInBez,e,t,i,n,r)}function ease(e,t,i,n,r){return applyEase(easeInOutBez,e,t,i,n,r)}function applyEase(e,t,i,n,r,o){void 0===r?(r=i,o=n):t=(t-i)/(n-i),t>1?t=1:t<0&&(t=0);var s=e(t);if($bm_isInstanceOfArray(r)){var a,l=r.length,c=createTypedArray("float32",l);for(a=0;a<l;a+=1)c[a]=(o[a]-r[a])*s+r[a];return c}return(o-r)*s+r}function nearestKey(e){var t,i,n,r=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(i=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)i=1,n=data.k[0].t;else{for(t=0;t<r-1;t+=1){if(e===data.k[t].t){i=t+1,n=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(i=t+2,n=data.k[t+1].t):(i=t+1,n=data.k[t].t);break}}-1===i&&(i=t+1,n=data.k[t].t)}else i=0,n=0;var o={};return o.index=i,o.time=n/elem.comp.globalData.frameRate,o}function key(e){var t,i,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var r=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=r.length,i=0;i<n;i+=1)t[i]=r[i],t.value[i]=r[i];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||0===e||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return"string"==typeof value?void 0===t?value.substring(e):value.substring(e,t):""}function substr(e,t){return"string"==typeof value?void 0===t?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=0===e?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};return e.initExpressions=function(e){var t=0,i=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){t+=1},e.renderer.globalData.popExpression=function(){0==(t-=1)&&function(){var e,t=i.length;for(e=0;e<t;e+=1)i[e].release();i.length=0}()},e.renderer.globalData.registerExpressionProperty=function(e){-1===i.indexOf(e)&&i.push(e)}},e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(t){var i,n=createSizedArray(t.viewData.length),r=t.viewData.length;for(i=0;i<r;i+=1)n[i]=new e(t.viewData[i],t.masksProperties[i]);return function(e){for(i=0;i<r;){if(t.masksProperties[i].nm===e)return n[i];i+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function i(e,t,i){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(n){if(!e.numKeys)return 0;var r="";r="s"in t.keyframes[n-1]?t.keyframes[n-1].s:"e"in t.keyframes[n-2]?t.keyframes[n-2].e:t.keyframes[n-2].s;var o="unidimensional"===i?new Number(r):Object.assign({},r);return o.time=t.keyframes[n-1].t/t.elem.comp.globalData.frameRate,o.value="unidimensional"===i?r[0]:r,o},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function n(){return e}return function(r){return r?"unidimensional"===r.propType?function(t){t&&"pv"in t||(t=e);var n=1/t.mult,r=t.pv*n,o=new Number(r);return o.value=r,i(o,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*n,o.value!==r&&((o=new Number(r)).value=r,i(o,t,"unidimensional")),o}}(r):function(e){e&&"pv"in e||(e=t);var n=1/e.mult,r=e.data&&e.data.l||e.pv.length,o=createTypedArray("float32",r),s=createTypedArray("float32",r);return o.value=s,i(o,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<r;t+=1)s[t]=e.v[t]*n,o[t]=s[t];return o}}(r):n}}(),TransformExpressionInterface=function(e){function t(e){switch(e){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var i,n,r,o;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?o=ExpressionPropertyInterface(e.p):(i=ExpressionPropertyInterface(e.px),n=ExpressionPropertyInterface(e.py),e.pz&&(r=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?o():[i(),n(),r?r():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(e){var t=new Matrix;void 0!==e?this._elem.finalTransform.mProp.getValueAtTime(e).clone(t):this._elem.finalTransform.mProp.applyToMatrix(t);return t}function t(e,t){var i=this.getMatrix(t);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.applyPoint(i,e)}function i(e,t){var i=this.getMatrix(t);return this.applyPoint(i,e)}function n(e,t){var i=this.getMatrix(t);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.invertPoint(i,e)}function r(e,t){var i=this.getMatrix(t);return this.invertPoint(i,e)}function o(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;i<n;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function s(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;i<n;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function a(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;i<n;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function l(){return[1,1,1,1]}return function(c){var u;function h(e){switch(e){case"ADBE Root Vectors Group":case"Contents":case 2:return h.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return u;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return h.effect;case"ADBE Text Properties":return h.textInterface;default:return null}}h.getMatrix=e,h.invertPoint=s,h.applyPoint=o,h.toWorld=i,h.toWorldVec=t,h.fromWorld=r,h.fromWorldVec=n,h.toComp=i,h.fromComp=a,h.sampleImage=l,h.sourceRectAtTime=c.sourceRectAtTime.bind(c),h._elem=c;var d=getDescriptor(u=TransformExpressionInterface(c.finalTransform.mProp),"anchorPoint");return Object.defineProperties(h,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(u,"rotation"),scale:getDescriptor(u,"scale"),position:getDescriptor(u,"position"),opacity:getDescriptor(u,"opacity"),anchorPoint:d,anchor_point:d,transform:{get:function(){return u}},active:{get:function(){return c.isInRange}}}),h.startTime=c.data.st,h.index=c.data.ind,h.source=c.data.refId,h.height=0===c.data.ty?c.data.h:100,h.width=0===c.data.ty?c.data.w:100,h.inPoint=c.data.ip/c.comp.globalData.frameRate,h.outPoint=c.data.op/c.comp.globalData.frameRate,h._name=c.data.nm,h.registerMaskInterface=function(e){h.mask=new MaskManagerInterface(e,c)},h.registerEffectsInterface=function(e){h.effect=e},h}}(),propertyGroupFactory=function(e,t){return function(i){return(i=void 0===i?1:i)<=0?e:t(i-1)}},PropertyInterface=function(e,t){var i={_name:e};return function(e){return(e=void 0===e?1:e)<=0?i:t(e-1)}},EffectsExpressionInterface=function(){function e(i,n,r,o){function s(e){for(var t=i.ef,n=0,r=t.length;n<r;){if(e===t[n].nm||e===t[n].mn||e===t[n].ix)return 5===t[n].ty?c[n]:c[n]();n+=1}throw new Error}var a,l=propertyGroupFactory(s,r),c=[],u=i.ef.length;for(a=0;a<u;a+=1)5===i.ef[a].ty?c.push(e(i.ef[a],n.effectElements[a],n.effectElements[a].propertyGroup,o)):c.push(t(n.effectElements[a],i.ef[a].ty,o,l));return"ADBE Color Control"===i.mn&&Object.defineProperty(s,"color",{get:function(){return c[0]()}}),Object.defineProperties(s,{numProperties:{get:function(){return i.np}},_name:{value:i.nm},propertyGroup:{value:l}}),s.enabled=0!==i.en,s.active=s.enabled,s}function t(e,t,i,n){var r=ExpressionPropertyInterface(e.p);return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface("",n)),function(){return 10===t?i.comp.compInterface(e.p.v):r()}}return{createEffectsInterface:function(t,i){if(t.effectsManager){var n,r=[],o=t.data.ef,s=t.effectsManager.effectElements.length;for(n=0;n<s;n+=1)r.push(e(o[n],t.effectsManager.effectElements[n],i,t));var a=t.data.ef||[],l=function(e){for(n=0,s=a.length;n<s;){if(e===a[n].nm||e===a[n].mn||e===a[n].ix)return r[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return a.length}}),l}return null}}}(),ShapePathInterface=function(e,t,i){var n=t.sh;function r(e){return"Shape"===e||"shape"===e||"Path"===e||"path"===e||"ADBE Vector Shape"===e||2===e?r.path:null}var o=propertyGroupFactory(r,i);return n.setGroupProperty(PropertyInterface("Path",o)),Object.defineProperties(r,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:i}}),r},ShapeExpressionInterface=function(){function e(e,a,f){var p,m=[],g=e?e.length:0;for(p=0;p<g;p+=1)"gr"===e[p].ty?m.push(t(e[p],a[p],f)):"fl"===e[p].ty?m.push(i(e[p],a[p],f)):"st"===e[p].ty?m.push(o(e[p],a[p],f)):"tm"===e[p].ty?m.push(s(e[p],a[p],f)):"tr"===e[p].ty||("el"===e[p].ty?m.push(l(e[p],a[p],f)):"sr"===e[p].ty?m.push(c(e[p],a[p],f)):"sh"===e[p].ty?m.push(ShapePathInterface(e[p],a[p],f)):"rc"===e[p].ty?m.push(u(e[p],a[p],f)):"rd"===e[p].ty?m.push(h(e[p],a[p],f)):"rp"===e[p].ty?m.push(d(e[p],a[p],f)):"gf"===e[p].ty?m.push(n(e[p],a[p],f)):m.push(r(e[p],a[p])));return m}function t(t,i,n){var r=function(e){switch(e){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=propertyGroupFactory(r,n);var o=function(t,i,n){var r,o=function(e){for(var t=0,i=r.length;t<i;){if(r[t]._name===e||r[t].mn===e||r[t].propertyIndex===e||r[t].ix===e||r[t].ind===e)return r[t];t+=1}return"number"==typeof e?r[e-1]:null};o.propertyGroup=propertyGroupFactory(o,n),r=e(t.it,i.it,o.propertyGroup),o.numProperties=r.length;var s=a(t.it[t.it.length-1],i.it[i.it.length-1],o.propertyGroup);return o.transform=s,o.propertyIndex=t.cix,o._name=t.nm,o}(t,i,r.propertyGroup),s=a(t.it[t.it.length-1],i.it[i.it.length-1],r.propertyGroup);return r.content=o,r.transform=s,Object.defineProperty(r,"_name",{get:function(){return t.nm}}),r.numProperties=t.np,r.propertyIndex=t.ix,r.nm=t.nm,r.mn=t.mn,r}function i(e,t,i){function n(e){return"Color"===e||"color"===e?n.color:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",i)),t.o.setGroupProperty(PropertyInterface("Opacity",i)),n}function n(e,t,i){function n(e){return"Start Point"===e||"start point"===e?n.startPoint:"End Point"===e||"end point"===e?n.endPoint:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return"a"}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface("Start Point",i)),t.e.setGroupProperty(PropertyInterface("End Point",i)),t.o.setGroupProperty(PropertyInterface("Opacity",i)),n}function r(){return function(){return null}}function o(e,t,i){var n,r=propertyGroupFactory(c,i),o=propertyGroupFactory(l,r);function s(i){Object.defineProperty(l,e.d[i].nm,{get:ExpressionPropertyInterface(t.d.dataProps[i].p)})}var a=e.d?e.d.length:0,l={};for(n=0;n<a;n+=1)s(n),t.d.dataProps[n].p.setGroupProperty(o);function c(e){return"Color"===e||"color"===e?c.color:"Opacity"===e||"opacity"===e?c.opacity:"Stroke Width"===e||"stroke width"===e?c.strokeWidth:null}return Object.defineProperties(c,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return l}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),t.w.setGroupProperty(PropertyInterface("Stroke Width",r)),c}function s(e,t,i){function n(t){return t===e.e.ix||"End"===t||"end"===t?n.end:t===e.s.ix?n.start:t===e.o.ix?n.offset:null}var r=propertyGroupFactory(n,i);return n.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",r)),t.e.setGroupProperty(PropertyInterface("End",r)),t.o.setGroupProperty(PropertyInterface("Offset",r)),n.propertyIndex=e.ix,n.propertyGroup=i,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),n.mn=e.mn,n}function a(e,t,i){function n(t){return e.a.ix===t||"Anchor Point"===t?n.anchorPoint:e.o.ix===t||"Opacity"===t?n.opacity:e.p.ix===t||"Position"===t?n.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?n.rotation:e.s.ix===t||"Scale"===t?n.scale:e.sk&&e.sk.ix===t||"Skew"===t?n.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?n.skewAxis:null}var r=propertyGroupFactory(n,i);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",r)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",r)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",r)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",r)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",r)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",r)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",r))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",r)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),n.ty="tr",n.mn=e.mn,n.propertyGroup=i,n}function l(e,t,i){function n(t){return e.p.ix===t?n.position:e.s.ix===t?n.size:null}var r=propertyGroupFactory(n,i);n.propertyIndex=e.ix;var o="tm"===t.sh.ty?t.sh.prop:t.sh;return o.s.setGroupProperty(PropertyInterface("Size",r)),o.p.setGroupProperty(PropertyInterface("Position",r)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(o.s)},position:{get:ExpressionPropertyInterface(o.p)},_name:{value:e.nm}}),n.mn=e.mn,n}function c(e,t,i){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.rotation:e.pt.ix===t?n.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?n.outerRadius:e.os.ix===t?n.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?n.innerRoundness:null:n.innerRadius}var r=propertyGroupFactory(n,i),o="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,o.or.setGroupProperty(PropertyInterface("Outer Radius",r)),o.os.setGroupProperty(PropertyInterface("Outer Roundness",r)),o.pt.setGroupProperty(PropertyInterface("Points",r)),o.p.setGroupProperty(PropertyInterface("Position",r)),o.r.setGroupProperty(PropertyInterface("Rotation",r)),e.ir&&(o.ir.setGroupProperty(PropertyInterface("Inner Radius",r)),o.is.setGroupProperty(PropertyInterface("Inner Roundness",r))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(o.p)},rotation:{get:ExpressionPropertyInterface(o.r)},points:{get:ExpressionPropertyInterface(o.pt)},outerRadius:{get:ExpressionPropertyInterface(o.or)},outerRoundness:{get:ExpressionPropertyInterface(o.os)},innerRadius:{get:ExpressionPropertyInterface(o.ir)},innerRoundness:{get:ExpressionPropertyInterface(o.is)},_name:{value:e.nm}}),n.mn=e.mn,n}function u(e,t,i){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?n.size:null}var r=propertyGroupFactory(n,i),o="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,o.p.setGroupProperty(PropertyInterface("Position",r)),o.s.setGroupProperty(PropertyInterface("Size",r)),o.r.setGroupProperty(PropertyInterface("Rotation",r)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(o.p)},roundness:{get:ExpressionPropertyInterface(o.r)},size:{get:ExpressionPropertyInterface(o.s)},_name:{value:e.nm}}),n.mn=e.mn,n}function h(e,t,i){function n(t){return e.r.ix===t||"Round Corners 1"===t?n.radius:null}var r=propertyGroupFactory(n,i),o=t;return n.propertyIndex=e.ix,o.rd.setGroupProperty(PropertyInterface("Radius",r)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(o.rd)},_name:{value:e.nm}}),n.mn=e.mn,n}function d(e,t,i){function n(t){return e.c.ix===t||"Copies"===t?n.copies:e.o.ix===t||"Offset"===t?n.offset:null}var r=propertyGroupFactory(n,i),o=t;return n.propertyIndex=e.ix,o.c.setGroupProperty(PropertyInterface("Copies",r)),o.o.setGroupProperty(PropertyInterface("Offset",r)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(o.c)},offset:{get:ExpressionPropertyInterface(o.o)},_name:{value:e.nm}}),n.mn=e.mn,n}return function(t,i,n){var r;function o(e){if("number"==typeof e)return 0===(e=void 0===e?1:e)?n:r[e-1];for(var t=0,i=r.length;t<i;){if(r[t]._name===e)return r[t];t+=1}return null}return o.propertyGroup=propertyGroupFactory(o,function(){return n}),r=e(t,i,o.propertyGroup),o.numProperties=r.length,o._name="Contents",o}}(),TextExpressionInterface=function(e){var t;function i(e){return"ADBE Text Document"===e?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var i=e.textProperty.currentData.t;return t&&i===t.value||((t=new String(i)).value=i||new String(i),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),i};function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(e){return"Outline"===e?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(e){var t="",i=e.getFootageData();function n(e){if(i[e])return t=e,"object"===_typeof(i=i[e])?n:i;var r=e.indexOf(t);if(-1!==r){var o=parseInt(e.substr(r+t.length),10);return"object"===_typeof(i=i[o])?n:i}return""}return function(){return t="",i=e.getFootageData(),n}}(e),t},function(e){function t(e){return"Data"===e?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,i){t.x&&(i.k=!0,i.x=!0,i.initiateExpression=ExpressionManager.initiateExpression,i.effectsSequence.push(i.initiateExpression(e,t,i).bind(i)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),i=this.getValueAtTime(e+-.01),n=0;if(t.length){var r;for(r=0;r<t.length;r+=1)n+=Math.pow(i[r]-t[r],2);n=100*Math.sqrt(n)}else n=0;return n},getVelocityAtTime:function(e){if(void 0!==this.vel)return this.vel;var t,i,n=-.001,r=this.getValueAtTime(e),o=this.getValueAtTime(e+n);if(r.length)for(t=createTypedArray("float32",r.length),i=0;i<r.length;i+=1)t[i]=(o[i]-r[i])/n;else t=(o-r)/n;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(e,t,i){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():"";var n,r,o,s,a,l=this.comp.renderedFrame,c=this.keyframes,u=c[c.length-1].t;if(l<=u)return this.pv;if(i?r=u-(n=t?Math.abs(u-this.elem.comp.globalData.frameRate*t):Math.max(0,u-this.elem.data.ip)):((!t||t>c.length-1)&&(t=c.length-1),n=u-(r=c[c.length-1-t].t)),"pingpong"===e){if(Math.floor((l-r)/n)%2!=0)return this.getValueAtTime((n-(l-r)%n+r)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var h=this.getValueAtTime(r/this.comp.globalData.frameRate,0),d=this.getValueAtTime(u/this.comp.globalData.frameRate,0),f=this.getValueAtTime(((l-r)%n+r)/this.comp.globalData.frameRate,0),p=Math.floor((l-r)/n);if(this.pv.length){for(s=(a=new Array(h.length)).length,o=0;o<s;o+=1)a[o]=(d[o]-h[o])*p+f[o];return a}return(d-h)*p+f}if("continue"===e){var m=this.getValueAtTime(u/this.comp.globalData.frameRate,0),g=this.getValueAtTime((u-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(s=(a=new Array(m.length)).length,o=0;o<s;o+=1)a[o]=m[o]+(m[o]-g[o])*((l-u)/this.comp.globalData.frameRate)/5e-4;return a}return m+(l-u)/.001*(m-g)}}return this.getValueAtTime(((l-r)%n+r)/this.comp.globalData.frameRate,0)}function t(e,t,i){if(!this.k)return this.pv;e=e?e.toLowerCase():"";var n,r,o,s,a,l=this.comp.renderedFrame,c=this.keyframes,u=c[0].t;if(l>=u)return this.pv;if(i?r=u+(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-u)):((!t||t>c.length-1)&&(t=c.length-1),n=(r=c[t].t)-u),"pingpong"===e){if(Math.floor((u-l)/n)%2==0)return this.getValueAtTime(((u-l)%n+u)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var h=this.getValueAtTime(u/this.comp.globalData.frameRate,0),d=this.getValueAtTime(r/this.comp.globalData.frameRate,0),f=this.getValueAtTime((n-(u-l)%n+u)/this.comp.globalData.frameRate,0),p=Math.floor((u-l)/n)+1;if(this.pv.length){for(s=(a=new Array(h.length)).length,o=0;o<s;o+=1)a[o]=f[o]-(d[o]-h[o])*p;return a}return f-(d-h)*p}if("continue"===e){var m=this.getValueAtTime(u/this.comp.globalData.frameRate,0),g=this.getValueAtTime((u+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(s=(a=new Array(m.length)).length,o=0;o<s;o+=1)a[o]=m[o]+(m[o]-g[o])*(u-l)/.001;return a}return m+(m-g)*(u-l)/.001}}return this.getValueAtTime((n-((u-l)%n+u))/this.comp.globalData.frameRate,0)}function i(e,t){if(!this.k)return this.pv;if(e=.5*(e||.4),(t=Math.floor(t||5))<=1)return this.pv;var i,n,r=this.comp.renderedFrame/this.comp.globalData.frameRate,o=r-e,s=t>1?(r+e-o)/(t-1):1,a=0,l=0;for(i=this.pv.length?createTypedArray("float32",this.pv.length):0;a<t;){if(n=this.getValueAtTime(o+a*s),this.pv.length)for(l=0;l<this.pv.length;l+=1)i[l]+=n[l];else i+=n;a+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)i[l]/=t;else i/=t;return i}function n(e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var i=this.a.getValueAtTime(e);t.translate(-i[0]*this.a.mult,-i[1]*this.a.mult,i[2]*this.a.mult)}if(this.appliedTransformations<2){var n=this.s.getValueAtTime(e);t.scale(n[0]*this.s.mult,n[1]*this.s.mult,n[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var r=this.sk.getValueAtTime(e),o=this.sa.getValueAtTime(e);t.skewFromAxis(-r*this.sk.mult,o*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var s=this.r.getValueAtTime(e);t.rotate(-s*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var a=this.rz.getValueAtTime(e),l=this.ry.getValueAtTime(e),c=this.rx.getValueAtTime(e),u=this.or.getValueAtTime(e);t.rotateZ(-a*this.rz.mult).rotateY(l*this.ry.mult).rotateX(c*this.rx.mult).rotateZ(-u[2]*this.or.mult).rotateY(u[1]*this.or.mult).rotateX(u[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var h=this.px.getValueAtTime(e),d=this.py.getValueAtTime(e);if(this.data.p.z){var f=this.pz.getValueAtTime(e);t.translate(h*this.px.mult,d*this.py.mult,-f*this.pz.mult)}else t.translate(h*this.px.mult,d*this.py.mult,0)}else{var p=this.p.getValueAtTime(e);t.translate(p[0]*this.p.mult,p[1]*this.p.mult,-p[2]*this.p.mult)}return t}function r(){return this.v.clone(new Matrix)}var o=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,i){var s=o(e,t,i);return s.dynamicProperties.length?s.getValueAtTime=n.bind(s):s.getValueAtTime=r.bind(s),s.setGroupProperty=expressionHelpers.setGroupProperty,s};var s=PropertyFactory.getProp;PropertyFactory.getProp=function(n,r,o,a,l){var c=s(n,r,o,a,l);c.kf?c.getValueAtTime=expressionHelpers.getValueAtTime.bind(c):c.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(c),c.setGroupProperty=expressionHelpers.setGroupProperty,c.loopOut=e,c.loopIn=t,c.smooth=i,c.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(c),c.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(c),c.numKeys=1===r.a?r.k.length:0,c.propertyIndex=r.ix;var u=0;return 0!==o&&(u=createTypedArray("float32",1===r.a?r.k[0].s.length:r.k.length)),c._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:u},expressionHelpers.searchExpressions(n,r,c),c.k&&l.addDynamicProperty(c),c};var a=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(e,t){this.k&&this.getValue();var i,n=this.v;void 0!==t&&(n=this.getValueAtTime(t,0));var r=n._length,o=n[e],s=n.v,a=createSizedArray(r);for(i=0;i<r;i+=1)a[i]="i"===e||"o"===e?[o[i][0]-s[i][0],o[i][1]-s[i][1]]:[o[i][0],o[i][1]];return a},points:function(e){return this.vertices("v",e)},inTangents:function(e){return this.vertices("i",e)},outTangents:function(e){return this.vertices("o",e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var i=this.v;void 0!==t&&(i=this.getValueAtTime(t,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(i));for(var n,r=this._segmentsLength,o=r.lengths,s=r.totalLength*e,a=0,l=o.length,c=0;a<l;){if(c+o[a].addedLength>s){var u=a,h=i.c&&a===l-1?0:a+1,d=(s-c)/o[a].addedLength;n=bez.getPointInSegment(i.v[u],i.v[h],i.o[u],i.i[h],d,o[a]);break}c+=o[a].addedLength,a+=1}return n||(n=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),n},vectorOnPath:function(e,t,i){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),r=this.pointOnPath(e+.001,t),o=r[0]-n[0],s=r[1]-n[1],a=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));return 0===a?[0,0]:"tangent"===i?[o/a,s/a]:[-s/a,o/a]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],a),extendPrototype([c],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var u=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,i,n,r){var o=u(e,t,i,n,r);return o.propertyIndex=t.ix,o.lock=!1,3===i?expressionHelpers.searchExpressions(e,t.pt,o):4===i&&expressionHelpers.searchExpressions(e,t.ks,o),o.k&&e.addDynamicProperty(o),o}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var i=this.calculateExpression(t);if(e.t!==i){var n={};return this.copyData(n,e),n.t=i.toString(),n.__complete=!1,n}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var i,n,r=createNS("feMerge");for(r.setAttribute("result",e),n=0;n<t.length;n+=1)(i=createNS("feMergeNode")).setAttribute("in",t[n]),r.appendChild(i),r.appendChild(i);return r}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,i,n,r){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","linearRGB"),o.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=o,o.setAttribute("result",n+"_tint_1"),e.appendChild(o),(o=createNS("feColorMatrix")).setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),o.setAttribute("result",n+"_tint_2"),e.appendChild(o),this.matrixFilter=o;var s=this.createMergeNode(n,[r,n+"_tint_1",n+"_tint_2"]);e.appendChild(s)}function SVGFillFilter(e,t,i,n){this.filterManager=t;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",n),e.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(e,t,i){this.initialized=!1,this.filterManager=t,this.elem=i,this.paths=[]}function SVGTritoneFilter(e,t,i,n){this.filterManager=t;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(r);var o=createNS("feComponentTransfer");o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("result",n),this.matrixFilter=o;var s=createNS("feFuncR");s.setAttribute("type","table"),o.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),o.appendChild(a),this.feFuncG=a;var l=createNS("feFuncB");l.setAttribute("type","table"),o.appendChild(l),this.feFuncB=l,e.appendChild(o)}function SVGProLevelsFilter(e,t,i,n){this.filterManager=t;var r=this.filterManager.effectElements,o=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",o)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",o)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",o)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",o)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(o.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(o)),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&((o=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("result",n),e.appendChild(o),this.feFuncRComposed=this.createFeFunc("feFuncR",o),this.feFuncGComposed=this.createFeFunc("feFuncG",o),this.feFuncBComposed=this.createFeFunc("feFuncB",o))}function SVGDropShadowEffect(e,t,i,n,r){var o=t.container.globalData.renderConfig.filterSize,s=t.data.fs||o;e.setAttribute("x",s.x||o.x),e.setAttribute("y",s.y||o.y),e.setAttribute("width",s.width||o.width),e.setAttribute("height",s.height||o.height),this.filterManager=t;var a=createNS("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("result",n+"_drop_shadow_1"),a.setAttribute("stdDeviation","0"),this.feGaussianBlur=a,e.appendChild(a);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=c,e.appendChild(c);var u=createNS("feComposite");u.setAttribute("in",n+"_drop_shadow_3"),u.setAttribute("in2",n+"_drop_shadow_2"),u.setAttribute("operator","in"),u.setAttribute("result",n+"_drop_shadow_4"),e.appendChild(u);var h=this.createMergeNode(n,[n+"_drop_shadow_4",r]);e.appendChild(h)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",i[0]-t[0]+" 0 0 0 "+t[0]+" "+(i[1]-t[1])+" 0 0 0 "+t[1]+" "+(i[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+i+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,i,n,r=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,i=0):n=(i=this.filterManager.effectElements[0].p.v-1)+1,(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);i<n;i+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:i});if(3===this.filterManager.effectElements[10].p.v){var o=createNS("mask"),s=createElementID();o.setAttribute("id",s),o.setAttribute("mask-type","alpha"),o.appendChild(t),this.elem.globalData.defs.appendChild(o);var a=createNS("g");for(a.setAttribute("mask","url("+getLocationHref()+"#"+s+")");r[0];)a.appendChild(r[0]);this.elem.layerElement.appendChild(a),this.masker=o,t.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(r=this.elem.layerElement.children||this.elem.layerElement.childNodes;r.length;)this.elem.layerElement.removeChild(r[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var i,n,r=this.paths.length;for(t=0;t<r;t+=1)if(-1!==this.paths[t].m&&(i=this.elem.maskManager.viewData[this.paths[t].m],n=this.paths[t].p,(e||this.filterManager._mdf||i.prop._mdf)&&n.setAttribute("d",i.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var o;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var s=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),a=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=n.getTotalLength();o="0 0 0 "+l*s+" ";var c,u=l*(a-s),h=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,d=Math.floor(u/h);for(c=0;c<d;c+=1)o+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";o+="0 "+10*l+" 0 0"}else o="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;n.setAttribute("stroke-dasharray",o)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(e||this.filterManager.effectElements[3].p._mdf)){var f=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*f[0])+","+bmFloor(255*f[1])+","+bmFloor(255*f[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,r=n[0]+" "+i[0]+" "+t[0],o=n[1]+" "+i[1]+" "+t[1],s=n[2]+" "+i[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",o),this.feFuncB.setAttribute("tableValues",s)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var i=createNS(e);return i.setAttribute("type","table"),t.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(e,t,i,n,r){for(var o,s,a=0,l=Math.min(e,t),c=Math.max(e,t),u=Array.call(null,{length:256}),h=0,d=r-n,f=t-e;a<=256;)s=(o=a/256)<=l?f<0?r:n:o>=c?f<0?n:r:n+d*Math.pow((o-e)/f,1/i),u[h]=s,h+=1,a+=256/255;return u.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,i=this.filterManager.effectElements;this.feFuncRComposed&&(e||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(t=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(t=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(t=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(t=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(t=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,
59n=(this.filterManager.effectElements[2].p.v-90)*degToRads,r=i*Math.cos(n),o=i*Math.sin(n);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",o)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,i){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGGaussianBlurEffect(e,t,i,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var r=createNS("feGaussianBlur");r.setAttribute("result",n),e.appendChild(r),this.feGaussianBlur=r}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,i=_svgMatteSymbols.length;t<i;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var i=e.layerElement.parentNode;if(i){for(var n,r=i.children,o=0,s=r.length;o<s&&r[o]!==e.layerElement;)o+=1;o<=s-2&&(n=r[o+1]);var a=createNS("use");a.setAttribute("href","#"+t),n?i.insertBefore(a,n):i.appendChild(a)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var i=createElementID(),n=createNS("mask");n.setAttribute("id",t.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var r=e.globalData.defs;r.appendChild(n);var o=createNS("symbol");o.setAttribute("id",i),this.replaceInParent(t,i),o.appendChild(t.layerElement),r.appendChild(o);var s=createNS("use");s.setAttribute("href","#"+i),n.appendChild(s),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,i=0,n=t.length;i<n;)t[i]&&t[i].data.ind===e&&this.setElementAsMask(this.elem,t[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=3==i?0:t,r=2==i?0:t;this.feGaussianBlur.setAttribute("stdDeviation",n+" "+r);var o=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",o)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,i=t[0].p.v,n=t[1].p.v,r=1===t[2].p.v,o=t[3].p.v,s=r?o:t[4].p.v,a=t[5].p.v,l=t[6].p.v,c=t[7].p.v;this.matrix.reset(),this.matrix.translate(-i[0],-i[1],i[2]),this.matrix.scale(.01*s,.01*o,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-a*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})},{}],252:[function(e,t,i){"use strict";var n=e("inherits"),r=e("hash-base"),o=e("safe-buffer").Buffer,s=new Array(16);function a(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<<t|e>>>32-t}function c(e,t,i,n,r,o,s){return l(e+(t&i|~t&n)+r+o|0,s)+t|0}function u(e,t,i,n,r,o,s){return l(e+(t&n|i&~n)+r+o|0,s)+t|0}function h(e,t,i,n,r,o,s){return l(e+(t^i^n)+r+o|0,s)+t|0}function d(e,t,i,n,r,o,s){return l(e+(i^(t|~n))+r+o|0,s)+t|0}n(a,r),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,n=this._b,r=this._c,o=this._d;i=c(i,n,r,o,e[0],3614090360,7),o=c(o,i,n,r,e[1],3905402710,12),r=c(r,o,i,n,e[2],606105819,17),n=c(n,r,o,i,e[3],3250441966,22),i=c(i,n,r,o,e[4],4118548399,7),o=c(o,i,n,r,e[5],1200080426,12),r=c(r,o,i,n,e[6],2821735955,17),n=c(n,r,o,i,e[7],4249261313,22),i=c(i,n,r,o,e[8],1770035416,7),o=c(o,i,n,r,e[9],2336552879,12),r=c(r,o,i,n,e[10],4294925233,17),n=c(n,r,o,i,e[11],2304563134,22),i=c(i,n,r,o,e[12],1804603682,7),o=c(o,i,n,r,e[13],4254626195,12),r=c(r,o,i,n,e[14],2792965006,17),i=u(i,n=c(n,r,o,i,e[15],1236535329,22),r,o,e[1],4129170786,5),o=u(o,i,n,r,e[6],3225465664,9),r=u(r,o,i,n,e[11],643717713,14),n=u(n,r,o,i,e[0],3921069994,20),i=u(i,n,r,o,e[5],3593408605,5),o=u(o,i,n,r,e[10],38016083,9),r=u(r,o,i,n,e[15],3634488961,14),n=u(n,r,o,i,e[4],3889429448,20),i=u(i,n,r,o,e[9],568446438,5),o=u(o,i,n,r,e[14],3275163606,9),r=u(r,o,i,n,e[3],4107603335,14),n=u(n,r,o,i,e[8],1163531501,20),i=u(i,n,r,o,e[13],2850285829,5),o=u(o,i,n,r,e[2],4243563512,9),r=u(r,o,i,n,e[7],1735328473,14),i=h(i,n=u(n,r,o,i,e[12],2368359562,20),r,o,e[5],4294588738,4),o=h(o,i,n,r,e[8],2272392833,11),r=h(r,o,i,n,e[11],1839030562,16),n=h(n,r,o,i,e[14],4259657740,23),i=h(i,n,r,o,e[1],2763975236,4),o=h(o,i,n,r,e[4],1272893353,11),r=h(r,o,i,n,e[7],4139469664,16),n=h(n,r,o,i,e[10],3200236656,23),i=h(i,n,r,o,e[13],681279174,4),o=h(o,i,n,r,e[0],3936430074,11),r=h(r,o,i,n,e[3],3572445317,16),n=h(n,r,o,i,e[6],76029189,23),i=h(i,n,r,o,e[9],3654602809,4),o=h(o,i,n,r,e[12],3873151461,11),r=h(r,o,i,n,e[15],530742520,16),i=d(i,n=h(n,r,o,i,e[2],3299628645,23),r,o,e[0],4096336452,6),o=d(o,i,n,r,e[7],1126891415,10),r=d(r,o,i,n,e[14],2878612391,15),n=d(n,r,o,i,e[5],4237533241,21),i=d(i,n,r,o,e[12],1700485571,6),o=d(o,i,n,r,e[3],2399980690,10),r=d(r,o,i,n,e[10],4293915773,15),n=d(n,r,o,i,e[1],2240044497,21),i=d(i,n,r,o,e[8],1873313359,6),o=d(o,i,n,r,e[15],4264355552,10),r=d(r,o,i,n,e[6],2734768916,15),n=d(n,r,o,i,e[13],1309151649,21),i=d(i,n,r,o,e[4],4149444226,6),o=d(o,i,n,r,e[11],3174756917,10),r=d(r,o,i,n,e[2],718787259,15),n=d(n,r,o,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+n|0,this._c=this._c+r|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=a},{"hash-base":216,inherits:247,"safe-buffer":295}],253:[function(e,t,i){var n=e("bn.js"),r=e("brorand");function o(e){this.rand=e||new r.Rand}t.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var r=new n(this.rand.generate(i))}while(r.cmp(e)>=0);return r},o.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i))},o.prototype.test=function(e,t,i){var r=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),l=0;!a.testn(l);l++);for(var c=e.shrn(l),u=a.toRed(o);t>0;t--){var h=this._randrange(new n(2),a);i&&i(h);var d=h.toRed(o).redPow(c);if(0!==d.cmp(s)&&0!==d.cmp(u)){for(var f=1;f<l;f++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(u))break}if(f===l)return!1}}return!0},o.prototype.getDivisor=function(e,t){var i=e.bitLength(),r=n.mont(e),o=new n(1).toRed(r);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),a=0;!s.testn(a);a++);for(var l=e.shrn(a),c=s.toRed(r);t>0;t--){var u=this._randrange(new n(2),s),h=e.gcd(u);if(0!==h.cmpn(1))return h;var d=u.toRed(r).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var f=1;f<a;f++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(c))break}if(f===a)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":254,brorand:78}],254:[function(e,t,i){arguments[4][75][0].apply(i,arguments)},{buffer:79,dup:75}],255:[function(e,t,i){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=n,n.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t)}},{}],256:[function(e,t,i){"use strict";var n=i;function r(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",i=0;i<e.length;i++)t+=r(e[i].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)i[n]=0|e[n];return i}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)i.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var r=e.charCodeAt(n),o=r>>8,s=255&r;o?i.push(o,s):i.push(s)}return i},n.zero2=r,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},{}],257:[function(e,t,i){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],258:[function(e,t,i){"use strict";var n=e("asn1.js");i.certificate=e("./certificate");var r=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});i.RSAPrivateKey=r;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});i.RSAPublicKey=o;var s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())});i.PublicKey=s;var a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),l=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())});i.PrivateKey=l;var c=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});i.EncryptedPrivateKey=c;var u=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});i.DSAPrivateKey=u,i.DSAparam=n.define("DSAparam",function(){this.int()});var h=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});i.ECPrivateKey=h;var d=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});i.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":259,"asn1.js":61}],259:[function(e,t,i){"use strict";var n=e("asn1.js"),r=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}),l=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(l)}),u=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))}),d=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),f=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}
vendor: 5,662 bytes, line 59
59),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":61}],260:[function(e,t,i){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=e("evp_bytestokey"),a=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,c=e.toString(),u=c.match(n);if(u){var h="aes"+u[1],d=l.from(u[2],"hex"),f=l.from(u[3].replace(/[\r\n]/g,""),"base64"),p=s(t,d.slice(0,8),parseInt(u[1],10)).key,m=[],g=a.createDecipheriv(h,p,d);m.push(g.update(f)),m.push(g.final()),i=l.concat(m)}else{var v=c.match(o);i=l.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(r)[1],data:i}}},{"browserify-aes":82,evp_bytestokey:212,"safe-buffer":295}],261:[function(e,t,i){var n=e("./asn1"),r=e("./aesid.json"),o=e("./fixProc"),s=e("browserify-aes"),a=e("pbkdf2"),l=e("safe-buffer").Buffer;function c(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,c,u=o(e,t),h=u.tag,d=u.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(d,"der")),i=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=r[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(o.split("-")[1],10)/8,d=a.pbkdf2Sync(t,i,n,h,"sha1"),f=s.createDecipheriv(o,d,c),p=[];return p.push(f.update(u)),p.push(f.final()),l.concat(p)}(d=n.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(i=(c=n.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=n.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=c,c.signature=n.signature},{"./aesid.json":257,"./asn1":258,"./fixProc":260,"browserify-aes":82,pbkdf2:262,"safe-buffer":295}],262:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync")},{"./lib/async":263,"./lib/sync":266}],263:[function(e,t,i){(function(i){(function(){var n,r,o=e("safe-buffer").Buffer,s=e("./precondition"),a=e("./default-encoding"),l=e("./sync"),c=e("./to-buffer"),u=i.crypto&&i.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function f(){return r||(r=i.process&&i.process.nextTick?i.process.nextTick:i.queueMicrotask?i.queueMicrotask:i.setImmediate?i.setImmediate:i.setTimeout)}function p(e,t,i,n,r){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:r}},e,n<<3)}).then(function(e){return o.from(e)})}t.exports=function(e,t,r,m,g,v){"function"==typeof g&&(v=g,g=void 0);var b=h[(g=g||"sha1").toLowerCase()];if(b&&"function"==typeof i.Promise){if(s(r,m),e=c(e,a,"Password"),t=c(t,a,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then(function(e){f()(function(){t(null,e)})},function(e){f()(function(){t(e)})})}(function(e){if(i.process&&!i.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(n=n||o.alloc(8),n,10,128,e).then(function(){return!0}).catch(function(){return!1});return d[e]=t,t}(b).then(function(i){return i?p(e,t,r,m,b):l(e,t,r,m,g)}),v)}else f()(function(){var i;try{i=l(e,t,r,m,g)}catch(e){return v(e)}v(null,i)})}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":264,"./precondition":265,"./sync":266,"./to-buffer":267,"safe-buffer":295}],264:[function(e,t,i){(function(e,i){(function(){var n;if(i.process&&i.process.browser)n="utf-8";else if(i.process&&i.process.version){n=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";t.exports=n}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:269}],265:[function(e,t,i){var n=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");
vendor: 1,067 bytes, line 59
59if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},{}],266:[function(e,t,i){var n=e("create-hash/md5"),r=e("ripemd160"),o=e("sha.js"),s=e("safe-buffer").Buffer,a=e("./precondition"),l=e("./default-encoding"),c=e("./to-buffer"),u=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,i){var a=function(e){function t(t){return o(e).update(t).digest()}function i(e){return(new r).update(e).digest()}return"rmd160"===e||"ripemd160"===e?i:"md5"===e?n:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=a(t):t.length<l&&(t=s.concat([t,u],l));for(var c=s.allocUnsafe(l+h[e]),d=s.allocUnsafe(l+h[e]),f=0;f<l;f++)c[f]=54^t[f],d[f]=92^t[f];var p=s.allocUnsafe(l+i+4);c.copy(p,0,0,l),this.ipad1=p,this.ipad2=c,this.opad=d,this.alg=e,this.blocksize=l,this.hash=a,this.size=h[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,i,n,r){a(i,n);
vendor: 18,096 bytes, line 59
59var o=new d(r=r||"sha1",e=c(e,l,"Password"),(t=c(t,l,"Salt")).length),u=s.allocUnsafe(n),f=s.allocUnsafe(t.length+4);t.copy(f,0,0,t.length);for(var p=0,m=h[r],g=Math.ceil(n/m),v=1;v<=g;v++){f.writeUInt32BE(v,t.length);for(var b=o.run(f,o.ipad1),y=b,w=1;w<i;w++){y=o.run(y,o.ipad2);for(var _=0;_<m;_++)b[_]^=y[_]}b.copy(u,p),p+=m}return u}},{"./default-encoding":264,"./precondition":265,"./to-buffer":267,"create-hash/md5":178,ripemd160:294,"safe-buffer":295,"sha.js":299}],267:[function(e,t,i){var n=e("safe-buffer").Buffer;t.exports=function(e,t,i){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":295}],268:[function(e,t,i){(function(e){(function(){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,i,n,r){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,i)});case 3:return e.nextTick(function(){t.call(null,i,n)});case 4:return e.nextTick(function(){t.call(null,i,n,r)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:269}],269:[function(e,t,i){var n,r,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var e=l(f);h=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];u.push(new m(e,t)),1!==u.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],270:[function(e,t,i){i.publicEncrypt=e("./publicEncrypt"),i.privateDecrypt=e("./privateDecrypt"),i.privateEncrypt=function(e,t){return i.publicEncrypt(e,t,!0)},i.publicDecrypt=function(e,t){return i.privateDecrypt(e,t,!0)}},{"./privateDecrypt":273,"./publicEncrypt":274}],271:[function(e,t,i){var n=e("create-hash"),r=e("safe-buffer").Buffer;function o(e){var t=r.allocUnsafe(4);return t.writeUInt32BE(e,0),t}t.exports=function(e,t){for(var i,s=r.alloc(0),a=0;s.length<t;)i=o(a++),s=r.concat([s,n("sha1").update(e).update(i).digest()]);return s.slice(0,t)}},{"create-hash":177,"safe-buffer":295}],272:[function(e,t,i){arguments[4][75][0].apply(i,arguments)},{buffer:79,dup:75}],273:[function(e,t,i){var n=e("parse-asn1"),r=e("./mgf"),o=e("./xor"),s=e("bn.js"),a=e("browserify-rsa"),l=e("create-hash"),c=e("./withPublic"),u=e("safe-buffer").Buffer;t.exports=function(e,t,i){var h;h=e.padding?e.padding:i?1:4;var d,f=n(e),p=f.modulus.byteLength();if(t.length>p||new s(t).cmp(f.modulus)>=0)throw new Error("decryption error");d=i?c(new s(t),f):a(t,f);var m=u.alloc(p-d.length);if(d=u.concat([m,d],p),4===h)return function(e,t){var i=e.modulus.byteLength(),n=l("sha1").update(u.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),c=t.slice(s+1),h=o(a,r(c,s)),d=o(c,r(h,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,n=e.length;e.length!==t.length&&(i++,n=Math.min(e.length,t.length));var r=-1;for(;++r<n;)i+=e[r]^t[r];return i}(n,d.slice(0,s)))throw new Error("decryption error");var f=s;for(;0===d[f];)f++;if(1!==d[f++])throw new Error("decryption error");return d.slice(f)}(f,d);if(1===h)return function(e,t,i){var n=t.slice(0,2),r=2,o=0;for(;0!==t[r++];)if(r>=t.length){o++;break}var s=t.slice(2,r-1);("0002"!==n.toString("hex")&&!i||"0001"!==n.toString("hex")&&i)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(r)}(0,d,i);if(3===h)return d;throw new Error("unknown padding")}},{"./mgf":271,"./withPublic":275,"./xor":276,"bn.js":272,"browserify-rsa":100,"create-hash":177,"parse-asn1":261,"safe-buffer":295}],274:[function(e,t,i){var n=e("parse-asn1"),r=e("randombytes"),o=e("create-hash"),s=e("./mgf"),a=e("./xor"),l=e("bn.js"),c=e("./withPublic"),u=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,i){var d;d=e.padding?e.padding:i?1:4;var f,p=n(e);if(4===d)f=function(e,t){var i=e.modulus.byteLength(),n=t.length,c=o("sha1").update(h.alloc(0)).digest(),u=c.length,d=2*u;if(n>i-d-2)throw new Error("message too long");var f=h.alloc(i-n-d-2),p=i-u-1,m=r(u),g=a(h.concat([c,f,h.alloc(1,1),t],p),s(m,p)),v=a(m,s(g,u));return new l(h.concat([h.alloc(1),v,g],i))}(p,t);else if(1===d)f=function(e,t,i){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");n=i?h.alloc(s-o-3,255):function(e){var t,i=h.allocUnsafe(e),n=0,o=r(2*e),s=0;for(;n<e;)s===o.length&&(o=r(2*e),s=0),(t=o[s++])&&(i[n++]=t);return i}(s-o-3);return new l(h.concat([h.from([0,i?1:2]),n,h.alloc(1),t],s))}(p,t,i);else{if(3!==d)throw new Error("unknown padding");if((f=new l(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return i?u(f,p):c(f,p)}},{"./mgf":271,"./withPublic":275,"./xor":276,"bn.js":272,"browserify-rsa":100,"create-hash":177,"parse-asn1":261,randombytes:277,"safe-buffer":295}],275:[function(e,t,i){var n=e("bn.js"),r=e("safe-buffer").Buffer;t.exports=function(e,t){return r.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},{"bn.js":272,"safe-buffer":295}],276:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,n=-1;++n<i;)e[n]^=t[n];return e}},{}],277:[function(e,t,i){(function(i,n){(function(){"use strict";var r=65536,o=4294967295;var s=e("safe-buffer").Buffer,a=n.crypto||n.msCrypto;a&&a.getRandomValues?t.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var n=s.allocUnsafe(e);if(e>0)if(e>r)for(var l=0;l<e;l+=r)a.getRandomValues(n.slice(l,l+r));else a.getRandomValues(n);if("function"==typeof t)return i.nextTick(function(){t(null,n)});return n}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:269,"safe-buffer":295}],278:[function(e,t,i){(function(t,n){(function(){"use strict";function r(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=e("safe-buffer"),s=e("randombytes"),a=o.Buffer,l=o.kMaxLength,c=n.crypto||n.msCrypto,u=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>u||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function d(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small")}function f(e,i,n,r){if(t.browser){var o=e.buffer,a=new Uint8Array(o,i,n);return c.getRandomValues(a),r?void t.nextTick(function(){r(null,e)}):e}if(!r)return s(n).copy(e,i),e;s(n,function(t,n){if(t)return r(t);n.copy(e,i),r(null,e)})}c&&c.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,r){if(!(a.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)r=t,t=0,i=e.length;else if("function"==typeof i)r=i,i=e.length-t;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return h(t,e.length),d(i,t,e.length),f(e,t,i,r)},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(a.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===i&&(i=e.length-t);return d(i,t,e.length),f(e,t,i)}):(i.randomFill=r,i.randomFillSync=r)}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:269,randombytes:277,"safe-buffer":295}],279:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":280}],280:[function(e,t,i){"use strict";var n=e("process-nextick-args"),r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=h;var o=Object.create(e("core-util-is"));o.inherits=e("inherits");var s=e("./_stream_readable"),a=e("./_stream_writable");o.inherits(h,s);for(var l=r(a.prototype),c=0;c<l.length;c++){var u=l[c];h.prototype[u]||(h.prototype[u]=a.prototype[u])}function h(e){if(!(this instanceof h))return new h(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},{"./_stream_readable":282,"./_stream_writable":284,"core-util-is":174,inherits:247,"process-nextick-args":268}],281:[function(e,t,i){"use strict";t.exports=o;var n=e("./_stream_transform"),r=Object.create(e("core-util-is"));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r.inherits=e("inherits"),r.inherits(o,n),o.prototype._transform=function(e,t,i){i(null,e)}},{"./_stream_transform":283,"core-util-is":174,inherits:247}],282:[function(e,t,i){(function(i,n){(function(){"use strict";var r=e("process-nextick-args");t.exports=y;var o,s=e("isarray");y.ReadableState=b;e("events").EventEmitter;var a=function(e,t){return e.listeners(t).length},l=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h=Object.create(e("core-util-is"));h.inherits=e("inherits");var d=e("util"),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=e("./internal/streams/BufferList"),g=e("./internal/streams/destroy");h.inherits(y,l);var v=["error","close","destroy","pause","resume"];function b(t,i){t=t||{};var n=i instanceof(o=o||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||e("./_stream_duplex"),!(this instanceof y))return new y(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this)}function w(e,t,i,n,r){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,C(e)}(e,s)):(r||(o=function(e,t){var i;n=t,c.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));var n;return i}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?_(e,s,t,!1):E(e,s)):_(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function _(e,t,i,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&C(e)),E(e,t)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.push(null),t(e)},y.prototype.push=function(e,t){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),i=!0),w(this,e,t,!1,i)},y.prototype.unshift=function(e){return w(this,e,null,!0,!1)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var k=8388608;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r.nextTick(S,e):S(e))}function S(e){f("emit readable"),e.emit("readable"),M(e)}function E(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(T,e,t))}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function A(e){f("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,n=1,r=i.data;e-=r.length;for(;i=i.next;){var o=i.data,s=e>o.length?o.length:e;if(s===o.length?r+=o:r+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(s));break}++n}return t.length-=n,r}(e,t):function(e,t){var i=c.allocUnsafe(e),n=t.head,r=1;n.data.copy(i),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(i,i.length-e,0,s),0===(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t);return n}(e,t.buffer,t.decoder),i);var i}function D(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,r.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}y.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):C(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,r=t.needReadable;return f("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",r=!0),t.ended||t.reading?f("reading or ended",r=!1):r&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(i,t))),null===(n=e>0?P(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&D(this)),null!==n&&this.emit
vendor: 1,598 bytes, line 59
59("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function c(t,i){f("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",h),e.removeListener("error",g),e.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",m),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){f("onend"),e.end()}o.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,M(e))}}(n);e.on("drain",h);var d=!1;var p=!1;function m(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==L(o.pipes,e))&&!d&&(f("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),n.pause())}function g(t){f("onerror",t),y(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),y()}function b(){f("onfinish"),e.removeListener("close",v),y()}function y(){f("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,i){if("function"==typeof e.prependListener)return e.prepe
vendor: 12,117 bytes, line 59
59ndListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",g),e.once("close",v),e.once("finish",b),e.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=L(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this},y.prototype.on=function(e,t){var i=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&C(this):r.nextTick(A,this))}return i},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(I,e,t))}(this,e)),this},y.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(e){var t=this,i=this._readableState,n=!1;for(var r in e.on("end",function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){(f("wrapped data"),i.decoder&&(r=i.decoder.write(r)),i.objectMode&&null==r)||(i.objectMode||r&&r.length)&&(t.push(r)||(n=!0,e.pause()))}),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<v.length;o++)e.on(v[o],this.emit.bind(this,v[o]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=P}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":280,"./internal/streams/BufferList":285,"./internal/streams/destroy":286,"./internal/streams/stream":287,_process:269,"core-util-is":174,events:211,inherits:247,isarray:250,"process-nextick-args":268,"safe-buffer":288,"string_decoder/":289,util:79}],283:[function(e,t,i){"use strict";t.exports=s;var n=e("./_stream_duplex"),r=Object.create(e("core-util-is"));function o(e,t){var i=this._transformState;i.transforming=!1;var n=i.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,null!=t&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,i){l(e,t,i)}):l(this,null,null)}function l(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}r.inherits=e("inherits"),r.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,i){var n=this._transformState;if(n.writecb=i,n.writechunk=e,n.writeencoding=t,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var i=this;n.prototype._destroy.call(this,e,function(e){t(e),i.emit("close")})}},{"./_stream_duplex":280,"core-util-is":174,inherits:247}],284:[function(e,t,i){(function(i,n,r){(function(){"use strict";var o=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var n=e.entry;e.entry=null;for(;n;){var r=n.callback;t.pendingcb--,r(i),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}t.exports=b;var a,l=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?r:o.nextTick;b.WritableState=v;var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var u={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,f=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,m=e("./internal/streams/destroy");function g(){}function v(t,i){a=a||e("./_stream_duplex"),t=t||{};var n=i instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,n=i.sync,r=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,n,r){--t.pendingcb,i?(o.nextTick(r,n),o.nextTick(C,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(r(n),e._writableState.errorEmitted=!0,e.emit("error",n),C(e,t))}(e,i,n,t,r);else{var s=k(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||_(e,i),n?l(w,e,i,s,r):w(e,i,s,r)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||e("./_stream_duplex"),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function y(e,t,i,n,r,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function w(e,t,i,n){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),C(e,t)}function _(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,r=new Array(n),o=t.corkedRequestsFree;o.entry=i;for(var a=0,l=!0;i;)r[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;r.allBuffers=l,y(e,t,!0,t.length,r,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,u=i.encoding,h=i.callback;if(y(e,t,!1,t.objectMode?1:c.length,c,u,h),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final(function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function C(e,t){var i=k(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(x,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}c.inherits(b,h),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,i){var n,r=this._writableState,s=!1,a=!r.objectMode&&(n=e,d.isBuffer(n)||n instanceof f);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(i=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=g),r.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),o.nextTick(t,i)}(this,i):(a||function(e,t,i,n){var r=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),r=!1),r}(this,r,e,i))&&(r.pendingcb++,s=function(e,t,i,n,r,o){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,i));return t}(t,n,r);n!==s&&(i=!0,r="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:r,isBuf:i,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else y(e,t,!1,a,n,r,o);return l}(this,r,a,e,t,i)),s},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||_(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,i){var n=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,i){t.ending=!0,C(e,t),i&&(t.finished?o.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,n,i)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)}
vendor: 12,299 bytes, lines 59-61
59,{"./_stream_duplex":280,"./internal/streams/destroy":286,"./internal/streams/stream":287,_process:269,"core-util-is":174,inherits:247,"process-nextick-args":268,"safe-buffer":288,timers:398,"util-deprecate":402}],285:[function(e,t,i){"use strict";var n=e("safe-buffer").Buffer,r=e("util");function o(e,t,i){e.copy(t,i)}t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t=n.allocUnsafe(e>>>0),i=this.head,r=0;i;)o(i.data,t,r),r+=i.data.length,i=i.next;return t},e}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":288,util:79}],286:[function(e,t,i){"use strict";var n=e("process-nextick-args");function r(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var i=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(r,this,e)):n.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,n.nextTick(r,i,e)):n.nextTick(r,i,e):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":268}],287:[function(e,t,i){arguments[4][120][0].apply(i,arguments)},{dup:120,events:211}],288:[function(e,t,i){var n=e("buffer"),r=n.Buffer;function o(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return r(e,t,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(o(n,i),i.Buffer=s),o(r,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=r(e);return void 0!==t?"string"==typeof i?n.fill(t,i):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:123}],289:[function(e,t,i){"use strict";var n=e("safe-buffer").Buffer,r=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,i=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==i?i:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var n=i.charCodeAt(i.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-i))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}i.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var i=function(e,t,i){var n=t.length-1;if(n<i)return 0;var r=s(t[n]);if(r>=0)return r>0&&(e.lastNeed=r-1),r;if(--n<i||-2===r)return 0;if(r=s(t[n]),r>=0)return r>0&&(e.lastNeed=r-2),r;if(--n<i||-2===r)return 0;if(r=s(t[n]),r>=0)return r>0&&(2===r?r=0:e.lastNeed=r-3),r;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var n=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":288}],290:[function(e,t,i){t.exports=e("./readable").PassThrough},{"./readable":291}],291:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":280,"./lib/_stream_passthrough.js":281,"./lib/_stream_readable.js":282,"./lib/_stream_transform.js":283,"./lib/_stream_writable.js":284}],292:[function(e,t,i){t.exports=e("./readable").Transform},{"./readable":291}],293:[function(e,t,i){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":284}],294:[function(e,t,i){"use strict";var n=e("buffer").Buffer,r=e("inherits"),o=e("hash-base"),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function f(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,i,n,r,o,s,a){return p(e+(t^i^n)+o+s|0,a)+r|0}function g(e,t,i,n,r,o,s,a){return p(e+(t&i|~t&n)+o+s|0,a)+r|0}function v(e,t,i,n,r,o,s,a){return p(e+((t|~i)^n)+o+s|0,a)+r|0}function b(e,t,i,n,r,o,s,a){return p(e+(t&n|i&~n)+o+s|0,a)+r|0}function y(e,t,i,n,r,o,s,a){return p(e+(t^(i|~n))+o+s|0,a)+r|0}r(f,o),f.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,n=0|this._b,r=0|this._c,o=0|this._d,f=0|this._e,w=0|this._a,_=0|this._b,k=0|this._c,x=0|this._d,C=0|this._e,S=0;S<80;S+=1){var E,T;S<16?(E=m(i,n,r,o,f,e[a[S]],h[0],c[S]),T=y(w,_,k,x,C,e[l[S]],d[0],u[S])):S<32?(E=g(i,n,r,o,f,e[a[S]],h[1],c[S]),T=b(w,_,k,x,C,e[l[S]],d[1],u[S])):S<48?(E=v(i,n,r,o,f,e[a[S]],h[2],c[S]),T=v(w,_,k,x,C,e[l[S]],d[2],u[S])):S<64?(E=b(i,n,r,o,f,e[a[S]],h[3],c[S]),T=g(w,_,k,x,C,e[l[S]],d[3],u[S])):(E=y(i,n,r,o,f,e[a[S]],h[4],c[S]),T=m(w,_,k,x,C,e[l[S]],d[4],u[S])),i=f,f=o,o=p(r,10),r=n,n=E,w=C,C=x,x=p(k,10),k=_,_=T}var A=this._b+r+x|0;this._b=this._c+o+C|0,this._c=this._d+f+w|0,this._d=this._e+i+_|0,this._e=this._a+n+k|0,this._a=A},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=f},{buffer:123,"hash-base":216,inherits:247}],295:[function(e,t,i){ 60/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ 61var n=e("buffer"),r=n.Buffer;function o(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return r(e,t,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(o(n,i),i.Buffer=s),s.prototype=Object.create(r.prototype),o(r,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=r(e);return void 0!==t?"string"==typeof i?n.fill(t,i):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:123}],296:[function(e,t,i){(function(i){(function(){"use strict";var n,r=e("buffer"),o=r.Buffer,s={};for(n in r)r.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=r[n]);var a=s.Buffer={};for(n in o)o.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(a[n]=o[n]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,i)}),a.alloc||(a.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>
61=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=o(e);return t&&0!==t.length?"string"==typeof i?n.fill(t,i):n.fill(t):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s}).call(this)}).call(this,e("_process"))},{_process:269,buffer:123}],297:[function(e,t,i){!function(){"use strict";var e="undefined"==typeof window,t=!e&&"scrollBehavior"in document.documentElement.style,i=function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function n(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,o=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function r(){return null!=document.scrollingElement?document.scrollingElement:document.documentElement}var o="scroll-behavior",s=new RegExp(o+":\\s*([^;]*)");function a(e,t){var i=o+":"+t,n=e.getAttribute("style");if(null!=n&&""!==n){var r=l(e);if(null!=r){var s=o+":"+r;n=(n=n.replace(s+";","")).replace(s,"")}e.setAttribute("style",n.endsWith(";")?""+n+i:";"+n+i)}else e.setAttribute("style",i)}function l(e){var t=e.getAttribute("style");if(null!=t&&t.includes(o)){var i=t.match(s);if(null!=i){var r=n(i,2)[1];if(null!=r&&""!==r)return r}}}function c(e,t){if(null!=t&&"smooth"===t.behavior)return"smooth";var i,n="style"in e?e:r();if("style"in n){var o=n.style.scrollBehavior;null!=o&&""!==o&&(i=o)}if(null==i){var s=n.getAttribute("scroll-behavior");null!=s&&""!==s&&(i=s)}if(null==i&&(i=l(n)),null==i){var a=getComputedStyle(n).getPropertyValue("scrollBehavior");null!=a&&""!==a&&(i=a)}return i}function u(e){return.5*(1-Math.cos(Math.PI*e))}var h={reset:function(){}},d="undefined"==typeof WeakMap?void 0:new WeakMap;function f(e){var i=e.startTime,n=e.startX,o=e.startY,s=e.endX,c=e.endY,f=e.method,p=e.scroller,m=0,g=s-n,v=c-o,b=Math.max(Math.abs(g/1e3*15e3),Math.abs(v/1e3*15e3)),y=function(e){if(t||null==d)return h;var i,n,o,s,c,u=r(),f=d.get(e);if(null!=f)i=f.cachedScrollSnapValue,n=f.cachedScrollBehaviorStyleAttributeValue,o=f.secondaryScroller,s=f.secondaryScrollerCachedScrollSnapValue,c=f.secondaryScrollerCachedScrollBehaviorStyleAttributeValue,f.release();else{i=""===e.style.scrollSnapType?null:e.style.scrollSnapType,n=l(e),o=e===u&&u!==document.body?document.body:void 0,s=null==o?void 0:""===o.style.scrollSnapType?null:o.style.scrollSnapType,c=null==o?void 0:l(o);var p=getComputedStyle(e).getPropertyValue("scroll-snap-type"),m=null==o?void 0:getComputedStyle(o).getPropertyValue("scroll-snap-type");if("none"===p&&"none"===m)return h}e.style.scrollSnapType="none",void 0!==o&&(o.style.scrollSnapType="none"),void 0!==n&&a(e,n),void 0!==o&&void 0!==c&&a(o,c);var g=!1,v=e===u?window:e;function b(){v.removeEventListener("scroll",y),null!=d&&d.delete(e),g=!0}function y(){e.style.scrollSnapType=i,null!=o&&void 0!==s&&(o.style.scrollSnapType=s),void 0!==n&&a(e,n),void 0!==o&&void 0!==c&&a(o,c),b()}return d.set(e,{release:b,cachedScrollSnapValue:i,cachedScrollBehaviorStyleAttributeValue:n,secondaryScroller:o,secondaryScrollerCachedScrollSnapValue:s,secondaryScrollerCachedScrollBehaviorStyleAttributeValue:c}),{reset:function(){setTimeout(function(){g||v.addEventListener("scroll",y)})}}}(p);requestAnimationFrame(function e(t){m+=t-i;var r=Math.max(0,Math.min(1,0===b?0:m/b)),a=Math.floor(n+g*u(r)),l=Math.floor(o+v*u(r));f(a,l),a!==s||l!==c?requestAnimationFrame(e):null!=y&&(y.reset(),y=void 0)})}var p=e?void 0:Element.prototype.scroll,m=e?void 0:window.scroll,g=e?void 0:Element.prototype.scrollBy,v=e?void 0:window.scrollBy,b=e?void 0:Element.prototype.scrollTo,y=e?void 0:window.scrollTo;function w(e,t){this.__adjustingScrollPosition=!0,this.scrollLeft=e,this.scrollTop=t,delete this.__adjustingScrollPosition}function _(e,t){return w.call(this,e,t)}function k(e,t){this.__adjustingScrollPosition=!0,this.scrollLeft+=e,this.scrollTop+=t,delete this.__adjustingScrollPosition}function x(e,t){switch(e){case"scroll":return t instanceof Element?null!=p?p:w:m;case"scrollBy":return t instanceof Element?null!=g?g:k:v;case"scrollTo":return t instanceof Element?null!=b?b:_:y}}function C(e,t,i,n){var o="performance"in window?performance.now():Date.now();if(e instanceof Element)return{startTime:o,startX:s=e.scrollLeft,startY:a=e.scrollTop,endX:Math.floor("scrollBy"===n?s+t:t),endY:Math.floor("scrollBy"===n?a+i:i),method:x("scrollTo",e).bind(e),scroller:e};var s,a,l=window.scrollX,c=window.pageXOffset,u=window.scrollY,h=window.pageYOffset;return{startTime:o,startX:s=null==l||0===l?c:l,startY:a=null==u||0===u?h:u,endX:Math.floor("scrollBy"===n?s+t:t),endY:Math.floor("scrollBy"===n?a+i:i),method:x("scrollTo",window).bind(window),scroller:r()}}function S(e){return null==e?0:"number"==typeof e?e:"string"==typeof e?parseFloat(e):0}function E(e){return null!=e&&"object"==typeof e}function T(e,t,n,r){!function(e,t,i){var n=c(t,e);null==n||"auto"===n?x(i,t).call(t,e.left,e.top):f(C(t,e.left,e.top,i))}(function(e,t){if(void 0===t&&!E(e))throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return E(e)?i(i({},A(e.left,e.top)),{behavior:null==e.behavior?"auto":e.behavior}):i(i({},A(e,t)),{behavior:"auto"})}(n,r),e,t)}function A(e,t){return{left:S(e),top:S(t)}}function I(e){return"nodeType"in e&&1===e.nodeType?e.parentNode:"ShadowRoot"in window&&e instanceof window.ShadowRoot?e.host:e===document?window:e instanceof Node?e.parentNode:null}function M(e){return"visible"!==e&&"clip"!==e}function P(e){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var t=getComputedStyle(e,null);return M(t.overflowY)||M(t.overflowX)}return!1}function D(e){for(var t=e,i=r();null!=t;){var n=c(t);if(null!=n&&(t===i||P(t)))return[t,n];t=I(t)}for(t=e;null!=t;){if(t===i||P(t))return[t,"auto"];t=I(t)}return[i,"auto"]}function O(e){if(void 0===e&&(e=location),"origin"in e&&null!=e.origin)return e.origin;var t=null!=e.port&&e.port.length>0?":"+e.port:"";return("http:"===e.protocol&&":80"===t||"https:"===e.protocol&&":443"===t)&&(t=""),e.protocol+"//"+e.hostname+t}var L=/^#\d/;function R(){window.addEventListener("click",function(e){if(e.isTrusted&&e.target instanceof HTMLAnchorElement){var t=e.target,i=t.pathname,r=t.search,o=t.hash;
61if(O(e.target)===O(location)&&i===location.pathname&&r===location.search&&null!=o&&!(o.length<1)){var s=function(e){for(var t=e;null!=t;){if("ShadowRoot"in window&&t instanceof window.ShadowRoot)return t;var i=I(t);if(i===t)return document;t=i}return document}(e.target),a=null!=o.match(L)?s.getElementById(o.slice(1)):s.querySelector(o);if(null!=a){var l=n(D(a),2)[1];"smooth"===l&&(e.preventDefault(),a.scrollIntoView({behavior:l}))}}}})}var B=e?void 0:Element.prototype.scrollIntoView;function N(e,t,i,n,r,o,s,a){return o<e&&s>t||o>e&&s<t?0:o<=e&&a<=i||s>=t&&a>=i?o-e-n:s>t&&a<i||o<e&&a>i?s-t+r:0}function j(e,t,i){var n=i.block,o=i.inline,s=r(),a=null!=window.visualViewport?visualViewport.width:innerWidth,l=null!=window.visualViewport?visualViewport.height:innerHeight,c=null!=window.scrollX?window.scrollX:window.pageXOffset,u=null!=window.scrollY?window.scrollY:window.pageYOffset,h=e.getBoundingClientRect(),d=h.height,f=h.width,p=h.top,m=h.right,g=h.bottom,v=h.left,b="start"===n||"nearest"===n?p:"end"===n?g:p+d/2,y="center"===o?v+f/2:"end"===o?m:v,w=t.getBoundingClientRect(),_=w.height,k=w.width,x=w.top,C=w.right,S=w.bottom,E=w.left,T=getComputedStyle(t),A=parseInt(T.borderLeftWidth,10),I=parseInt(T.borderTopWidth,10),M=parseInt(T.borderRightWidth,10),P=parseInt(T.borderBottomWidth,10),D=0,O=0,L="offsetWidth"in t?t.offsetWidth-t.clientWidth-A-M:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-I-P:0;if(s===t)D="start"===n?b:"end"===n?b-l:"nearest"===n?N(u,u+l,l,I,P,u+b,u+b+d,d):b-l/2,O="start"===o?y:"center"===o?y-a/2:"end"===o?y-a:N(c,c+a,a,A,M,c+y,c+y+f,f),D=Math.max(0,D+u),O=Math.max(0,O+c);else{D="start"===n?b-x-I:"end"===n?b-S+P+R:"nearest"===n?N(x,S,_,I,P+R,b,b+d,d):b-(x+_/2)+R/2,O="start"===o?y-E-A:"center"===o?y-(E+k/2)+L/2:"end"===o?y-C+M+L:N(E,C,k,A,M+L,y,y+f,f);var B=t.scrollLeft,j=t.scrollTop;D=Math.max(0,Math.min(j+D,t.scrollHeight-_+R)),O=Math.max(0,Math.min(B+O,t.scrollWidth-k+L))}return{top:D,left:O}}var F=e?void 0:Object.getOwnPropertyDescriptor(Element.prototype,"scrollTop").set;var z=e?void 0:Object.getOwnPropertyDescriptor(Element.prototype,"scrollLeft").set;var V=!e&&("scroll"in Element.prototype&&"scrollTo"in Element.prototype&&"scrollBy"in Element.prototype&&"scrollIntoView"in Element.prototype);e||t&&V||(Element.prototype.scroll=function(e,t){T(this,"scroll",e,t)},Element.prototype.scrollBy=function(e,t){T(this,"scrollBy",e,t)},Element.prototype.scrollTo=function(e,t){T(this,"scrollTo",e,t)},Element.prototype.scrollIntoView=function(e){var t=null==e||!0===e?{block:"start",inline:"nearest"}:!1===e?{block:"end",inline:"nearest"}:e,r=n(D(this),2),o=r[0],s=r[1],a=null!=t.behavior?t.behavior:s;if("smooth"===a)o.scrollTo(i({behavior:a},j(this,o,t)));else if(null!=B)B.call(this,t);else{var l=j(this,o,t),c=l.top,u=l.left;x("scrollTo",this).call(this,u,c)}},null!=HTMLElement.prototype.scrollIntoView&&HTMLElement.prototype.scrollIntoView!==Element.prototype.scrollIntoView&&(HTMLElement.prototype.scrollIntoView=Element.prototype.scrollIntoView),Object.defineProperty(Element.prototype,"scrollLeft",{set:function(e){return this.__adjustingScrollPosition?z.call(this,e):(T(this,"scrollTo",e,this.scrollTop),e)}}),Object.defineProperty(Element.prototype,"scrollTop",{set:function(e){return this.__adjustingScrollPosition?F.call(this,e):(T(this,"scrollTo",this.scrollLeft,e),e)}}),window.scroll=function(e,t){T(this,"scroll",e,t)},window.scrollBy=function(e,t){T(this,"scrollBy",e,t)},window.scrollTo=function(e,t){T(this,"scrollTo",e,t)},R())}()},{}],298:[function(e,t,i){var n=e("safe-buffer").Buffer;function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var i=this._block,r=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var l=s%r,c=Math.min(o-a,r-l),u=0;u<c;u++)i[l+u]=e[a+u];a+=c,(s+=c)%r===0&&this._update(i)}return this._len+=o,this},r.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var n=(4294967295&i)>>>0,r=(i-n)/4294967296;this._block.writeUInt32BE(r,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r},{"safe-buffer":295}],299:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512")},{"./sha":300,"./sha1":301,"./sha224":302,"./sha256":303,"./sha384":304,"./sha512":305}
vendor: 6,060 bytes, line 61
61],300:[function(e,t,i){var n=e("inherits"),r=e("./hash"),o=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,r.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,i,n){return 0===e?t&i|~t&n:2===e?t&i|t&n|i&n:t^i^n}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t=this._w,i=0|this._a,n=0|this._b,r=0|this._c,o=0|this._d,a=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var d=0;d<80;++d){var f=~~(d/20),p=c(i)+h(f,n,r,o)+a+t[d]+s[f]|0;a=o,o=r,r=u(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=l},{"./hash":298,inherits:247,"safe-buffer":295}],301:[function(e,t,i){var n=e("inherits"),r=e("./hash"),o=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,r.call(this,64,56)}function c(e){return e<<1|e>>>31}function u(e){return e<<5|e>>>27}function h(e){return e<<30|e>>>2}function d(e,t,i,n){return 0===e?t&i|~t&n:2===e?t&i|t&n|i&n:t^i^n}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t=this._w,i=0|this._a,n=0|this._b,r=0|this._c,o=0|this._d,a=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=c(t[l-3]^t[l-8]^t[l-14]^t[l-16]);for(var f=0;f<80;++f){var p=~~(f/20),m=u(i)+d(p,n,r,o)+a+t[f]+s[p]|0;a=o,o=r,r=h(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=l},{"./hash":298,inherits:247,"safe-buffer":295}],302:[function(e,t,i){var n=e("inherits"),r=e("./sha256"),o=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(64);function l(){this.init(),this._w=a,o.call(this,64,56)}n(l,r),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=l},{"./hash":298,"./sha256":303,inherits:247,"safe-buffer":295}],303:[function(e,t,i){var n=e("inherits"),r=e("./hash"),o=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function l(){this.init(),this._w=a,r.call(this,64,56)}function c(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(l,r),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t=this._w,i=0|this._a,n=0|this._b,r=0|this._c,o=0|this._d,a=0|this._e,l=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)t[v]=e.readInt32BE(4*v);for(;v<64;++v)t[v]=p(t[v-2])+t[v-7]+f(t[v-15])+t[v-16]|0;for(var b=0;b<64;++b){var y=g+d(a)+c(a,l,m)+s[b]+t[b]|0,w=h(i)+u(i,n,r)|0;g=m,m=l,l=a,a=o+y|0,o=r,r=n,n=i,i=y+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=l+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=l},{"./hash":298,inherits:247,"safe-buffer":295}],304:[function(e,t,i){var n=e("inherits"),r=e("./sha512"),o=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(160);function l(){this.init(),this._w=a,o.call(this,128,112)}n(l,r),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,n){e.writeInt32BE(t,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=l},{"./hash":298,"./sha512":305,inherits:247,"safe-buffer":295}
61],305:[function(e,t,i){var n=e("inherits"),r=e("./hash"),o=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
611126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function l(){this.init(),this._w=a,r.call(this,128,112)}function c(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0<t>>>0?1:0}n(l,r),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,n=0|this._bh,r=0|this._ch,o=0|this._dh,a=0|this._eh,l=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,x=0|this._dl,C=0|this._el,S=0|this._fl,E=0|this._gl,T=0|this._hl,A=0;A<32;A+=2)t[A]=e.readInt32BE(4*A),t[A+1]=e.readInt32BE(4*A+4);for(;A<160;A+=2){var I=t[A-30],M=t[A-30+1],P=f(I,M),D=p(M,I),O=m(I=t[A-4],M=t[A-4+1]),L=g(M,I),R=t[A-14],B=t[A-14+1],N=t[A-32],j=t[A-32+1],F=D+B|0,z=P+R+v(F,D)|0;z=(z=z+O+v(F=F+L|0,L)|0)+N+v(F=F+j|0,j)|0,t[A]=z,t[A+1]=F}for(var V=0;V<160;V+=2){z=t[V],F=t[V+1];var H=u(i,n,r),U=u(w,_,k),W=h(i,w),$=h(w,i),G=d(a,C),q=d(C,a),Y=s[V],Z=s[V+1],X=c(a,l,b),K=c(C,S,E),J=T+q|0,Q=y+G+v(J,T)|0;Q=(Q=(Q=Q+X+v(J=J+K|0,K)|0)+Y+v(J=J+Z|0,Z)|0)+z+v(J=J+F|0,F)|0;var ee=$+U|0,te=W+H+v(ee,$)|0;y=b,T=E,b=l,E=S,l=a,S=C,a=o+Q+v(C=x+J|0,x)|0,o=r,x=k,r=n,k=_,n=i,_=w,i=Q+te+v(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+x|0,this._el=this._el+C|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+T|0,this._ah=this._ah+i+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,_)|0,this._ch=this._ch+r+v(this._cl,k)|0,this._dh=this._dh+o+v(this._dl,x)|0,this._eh=this._eh+a+v(this._el,C)|0,this._fh=this._fh+l+v(this._fl,S)|0,this._gh=this._gh+b+v(this._gl,E)|0,this._hh=this._hh+y+v(this._hl,T)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,i,n){e.writeInt32BE(t,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=l},{"./hash":298,inherits:247,"safe-buffer":295}],306:[function(e,t,i){!function(e,n){"object"==typeof i&&void 0!==t?n(i):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).ssrWindow={})}(this,function(e){"use strict";function t(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e,n){void 0===e&&(e={}),void 0===n&&(n={}),Object.keys(n).forEach(function(r){void 0===e[r]?e[r]=n[r]:t(n[r])&&t(e[r])&&Object.keys(n[r]).length>0&&i(e[r],n[r])})}var n={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};var r={document:n,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};e.extend=i,e.getDocument=function(){var e="undefined"!=typeof document?document:{};return i(e,n),e},e.getWindow=function(){var e="undefined"!=typeof window?window:{};return i(e,r),e}
61,e.ssrDocument=n,e.ssrWindow=r,Object.defineProperty(e,"__esModule",{value:!0})})},{}],307:[function(e,t,i){t.exports=r;var n=e("events").EventEmitter;function r(){n.call(this)}e("inherits")(r,n),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){var i=this;function r(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function o(){i.readable&&i.resume&&i.resume()}i.on("data",r),e.on("drain",o),e._isStdio||t&&!1===t.end||(i.on("end",a),i.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",r),e.removeListener("drain",o),i.removeListener("end",a),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},{events:211,inherits:247,"readable-stream/duplex.js":279,"readable-stream/passthrough.js":290,"readable-stream/readable.js":291,"readable-stream/transform.js":292,"readable-stream/writable.js":293}],308:[function(e,t,i){arguments[4][289][0].apply(i,arguments)},{dup:289,"safe-buffer":295}],309:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={getRandomNumber:function(e){void 0===e&&(e=16);return"x".repeat(e).replace(/x/g,function(){return Math.round(16*Math.random()).toString(16)})},makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElRoleDescription:function(e,t){return e.attr("aria-roledescription",t),e},addElControls:function(e,t){return e.attr("aria-controls",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},addElId:function(e,t){return e.attr("id",t),e},addElLive:function(e,t){return e.attr("aria-live",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterOrSpaceKey:function(e){if(13===e.keyCode||32===e.keyCode){var t=this,i=t.params.a11y,n=(0,r.default)(e.target);t.navigation&&t.navigation.$nextEl&&n.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(i.lastSlideMessage):t.a11y.notify(i.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&n.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(i.firstSlideMessage):t.a11y.notify(i.prevSlideMessage)),t.pagination&&n.is((0,o.classesToSelector)(t.params.pagination.bulletClass))&&n[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop&&e.navigation){var t=e.navigation,i=t.$nextEl,n=t.$prevEl;n&&n.length>0&&(e.isBeginning?(e.a11y.disableEl(n),e.a11y.makeElNotFocusable(n)):(e.a11y.enableEl(n),e.a11y.makeElFocusable(n))),i&&i.length>0&&(e.isEnd?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each(function(i){var n=(0,r.default)(i);e.a11y.makeElFocusable(n),e.params.pagination.renderBullet||(e.a11y.addElRole(n,"button"),e.a11y.addElLabel(n,t.paginationBulletMessage.replace(/\{\{index\}\}/,n.index()+1)))})},init:function(){var e=this,t=e.params.a11y;e.$el.append(e.a11y.liveRegion);var i=e.$el;t.containerRoleDescriptionMessage&&e.a11y.addElRoleDescription(i,t.containerRoleDescriptionMessage),t.containerMessage&&e.a11y.addElLabel(i,t.containerMessage);var n=e.$wrapperEl,s=n.attr("id")||"swiper-wrapper-"+e.a11y.getRandomNumber(16),a=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";e.a11y.addElId(n,s),e.a11y.addElLive(n,a),t.itemRoleDescriptionMessage&&e.a11y.addElRoleDescription((0,r.default)(e.slides),t.itemRoleDescriptionMessage),e.a11y.addElRole((0,r.default)(e.slides),t.slideRole);var l,c,u=e.params.loop?e.slides.filter(function(t){return!t.classList.contains(e.params.slideDuplicateClass)}).length:e.slides.length;e.slides.each(function(i,n){var o=(0,r.default)(i),s=e.params.loop?parseInt(o.attr("data-swiper-slide-index"),10):n,a=t.slideLabelMessage.replace(/\{\{index\}\}/,s+1).replace(/\{\{slidesLength\}\}/,u);e.a11y.addElLabel(o,a)}),e.navigation&&e.navigation.$nextEl&&(l=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(c=e.navigation.$prevEl),l&&l.length&&(e.a11y.makeElFocusable(l),"BUTTON"!==l[0].tagName&&(e.a11y.addElRole(l,"button"),l.on("key
61down",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(l,t.nextSlideMessage),e.a11y.addElControls(l,s)),c&&c.length&&(e.a11y.makeElFocusable(c),"BUTTON"!==c[0].tagName&&(e.a11y.addElRole(c,"button"),c.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(c,t.prevSlideMessage),e.a11y.addElControls(c,s)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown",(0,o.classesToSelector)(e.params.pagination.bulletClass),e.a11y.onEnterOrSpaceKey)},destroy:function(){var e,t,i=this;i.a11y.liveRegion&&i.a11y.liveRegion.length>0&&i.a11y.liveRegion.remove(),i.navigation&&i.navigation.$nextEl&&(e=i.navigation.$nextEl),i.navigation&&i.navigation.$prevEl&&(t=i.navigation.$prevEl),e&&e.off("keydown",i.a11y.onEnterOrSpaceKey),t&&t.off("keydown",i.a11y.onEnterOrSpaceKey),i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.$el.off("keydown",(0,o.classesToSelector)(i.params.pagination.bulletClass),i.a11y.onEnterOrSpaceKey)}},l={name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group"}},create:function(){(0,o.bindModuleMethods)(this,{a11y:s({},a,{liveRegion:(0,r.default)('<span class="'+this.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')})})},on:{afterInit:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],310:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("ssr-window"),r=e("../../utils/utils");function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}var s={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=(0,r.nextTick)(function(){var t;e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),t=e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(t=e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(t=e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),t=e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(t=e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(t=e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),(e.params.cssMode&&e.autoplay.running||!1===t)&&e.autoplay.run()},i)},start:function(){var e=this;return void 0===e.autoplay.timeout&&(!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0))},stop:function(){var e=this;return!!e.autoplay.running&&(void 0!==e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause:function(e){var t=this;
61t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach(function(e){t.$wrapperEl[0].addEventListener(e,t.autoplay.onTransitionEnd)}):(t.autoplay.paused=!1,t.autoplay.run())))},onVisibilityChange:function(){var e=this,t=(0,n.getDocument)();"hidden"===t.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===t.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(e){var t=this;t&&!t.destroyed&&t.$wrapperEl&&e.target===t.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach(function(e){t.$wrapperEl[0].removeEventListener(e,t.autoplay.onTransitionEnd)}),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())},onMouseEnter:function(){var e=this;e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause(),["transitionend","webkitTransitionEnd"].forEach(function(t){e.$wrapperEl[0].removeEventListener(t,e.autoplay.onTransitionEnd)})},onMouseLeave:function(){var e=this;e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,e.autoplay.run())},attachMouseEvents:function(){var e=this;e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",e.auto
61play.onMouseEnter),e.$el.on("mouseleave",e.autoplay.onMouseLeave))},detachMouseEvents:function(){var e=this;e.$el.off("mouseenter",e.autoplay.onMouseEnter),e.$el.off("mouseleave",e.autoplay.onMouseLeave)}},a={name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}},create:function(){(0,r.bindModuleMethods)(this,{autoplay:o({},s,{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),(0,n.getDocument)().addEventListener("visibilitychange",e.autoplay.onVisibilityChange),e.autoplay.attachMouseEvents())},beforeTransitionStart:function(e,t,i){e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.detachMouseEvents(),e.autoplay.running&&e.autoplay.stop(),(0,n.getDocument)().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}};i.default=a},{"../../utils/utils":396,"ssr-window":306}],311:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("../../utils/utils");function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(this,arguments)}var o={LinearSpline:function(e,t){var i,n,r,o,s,a=function(e,t){for(n=-1,i=e.length;i-n>1;)e[r=i+n>>1]<=t?n=r:i=r;return i};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(s=a(this.x,e),o=s-1,(e-this.x[o])*(this.y[s]-this.y[o])/(this.x[s]-this.x[o])+this.y[o]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new o.LinearSpline(t.slidesGrid,e.slidesGrid):new o.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,n,r=this,o=r.controller.control,s=r.constructor;function a(e){var t=r.rtlTranslate?-r.translate:r.translate;"slide"===r.params.controller.by&&(r.controller.getInterpolateFunction(e),n=-r.controller.spline.interpolate(-t)),n&&"container"!==r.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(r.maxTranslate()-r.minTranslate()),n=(t-r.minTranslate())*i+e.minTranslate()),r.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,r),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(o))for(var l=0;l<o.length;l+=1)o[l]!==t&&o[l]instanceof s&&a(o[l]);else o instanceof s&&t!==o&&a(o)},setTransition:function(e,t){var i,r=this,o=r.constructor,s=r.controller.control;function a(t){t.setTransition(e,r),0!==e&&(t.transitionStart(),t.params.autoHeight&&(0,n.nextTick)(function(){t.updateAutoHeight()}),t.$wrapperEl.transitionEnd(function(){s&&(t.params.loop&&"slide"===r.params.controller.by&&t.loopFix(),t.transitionEnd())}))}if(Array.isArray(s))for(i=0;i<s.length;i+=1)s[i]!==t&&s[i]instanceof o&&a(s[i]);else s instanceof o&&t!==s&&a(s)}},s={name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){(0,n.bindModuleMethods)(this,{controller:r({control:this.params.controller.control},o)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,i){e.controller.control&&e.controller.setTranslate(t,i)},setTransition:function(e,t,i){e.controller.control&&e.controller.setTransition(t,i)}}};i.default=s},{"../../utils/utils":396}],312:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i){void 0===t&&(t="window");if(!e||"container"===t&&!i)return;var r=!1,o=(0,n.getWindow)(),s="window"===t?o.innerHeight:i.clientHeight,a=Object.keys(e).map(function(e){if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:s*t,point:e}}return{value:e,point:e}});
61a.sort(function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)});for(var l=0;l<a.length;l+=1){var c=a[l],u=c.point,h=c.value;"window"===t?o.matchMedia("(min-width: "+h+"px)").matches&&(r=u):h<=i.clientWidth&&(r=u)}return r||"max"};var n=e("ssr-window")},{"ssr-window":306}],313:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(e("./setBreakpoint")),r=o(e("./getBreakpoint"));function o(e){return e&&e.__esModule?e:{default:e}}var s={setBreakpoint:n.default,getBreakpoint:r.default};i.default=s},{"./getBreakpoint":312,"./setBreakpoint":314}],314:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this,t=e.activeIndex,i=e.initialized,r=e.loopedSlides,o=void 0===r?0:r,s=e.params,a=e.$el,l=s.breakpoints;if(!l||l&&0===Object.keys(l).length)return;var c=e.getBreakpoint(l,e.params.breakpointsBase,e.el);if(!c||e.currentBreakpoint===c)return;var u=c in l?l[c]:void 0;u&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach(function(e){var t=u[e];void 0!==t&&(u[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});var h=u||e.originalParams,d=s.slidesPerColumn>1,f=h.slidesPerColumn>1,p=s.enabled;d&&!f?(a.removeClass(s.containerModifierClass+"multirow "+s.containerModifierClass+"multirow-column"),e.emitContainerClasses()):!d&&f&&(a.addClass(s.containerModifierClass+"multirow"),(h.slidesPerColumnFill&&"column"===h.slidesPerColumnFill||!h.slidesPerColumnFill&&"column"===s.slidesPerColumnFill)&&a.addClass(s.containerModifierClass+"multirow-column"),e.emitContainerClasses());var m=h.direction&&h.direction!==s.direction,g=s.loop&&(h.slidesPerView!==s.slidesPerView||m);m&&i&&e.changeDirection();(0,n.extend)(e.params,h);var v=e.params.enabled;(0,n.extend)(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!v?e.disable():!p&&v&&e.enable();e.currentBreakpoint=c,e.emit("_beforeBreakpoint",h),g&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-o+e.loopedSlides,0,!1));e.emit("breakpoint",h)};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],315:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n={checkOverflow:function(){var e=this,t=e.params,i=e.isLocked,n=e.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&n?e.isLocked=n<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,i!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),i&&i!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}};i.default=n},{}],316:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this,t=e.classNames,i=e.params,n=e.rtl,r=e.$el,o=e.device,s=e.support,a=(l=["initialized",i.direction,{"pointer-events":s.pointerEvents&&!s.touch},{"free-mode":i.freeMode},{autoheight:i.autoHeight},{rtl:n},{multirow:i.slidesPerColumn>1},{"multirow-column":i.slidesPerColumn>1&&"column"===i.slidesPerColumnFill},{android:o.android},{ios:o.ios},{"css-mode":i.cssMode}],c=i.containerModifierClass,u=[],l.forEach(function(e){"object"==typeof e?Object.keys(e).forEach(function(t){e[t]&&u.push(c+t)}):"string"==typeof e&&u.push(c+e)}),u);var l,c,u;t.push.apply(t,a),r.addClass([].concat(t).join(" ")),e.emitContainerClasses()}},{}],317:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(e("./addClasses")),r=o(e("./removeClasses"));function o(e){return e&&e.__esModule?e:{default:e}}var s={addClasses:n.default,removeClasses:r.default};i.default=s},{"./addClasses":316,"./removeClasses":318}],318:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this,t=e.$el,i=e.classNames;t.removeClass(i.join(" ")),e.emitContainerClasses()}},{}],319:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("ssr-window"),r=E(e("../../utils/dom")),o=e("../../utils/utils"),s=e("../../utils/get-support"),a=e("../../utils/get-device"),l=e("../../utils/get-browser"),c=E(e("../../modules/resize/resize")),u=E(e("../../modules/observer/observer")),h=E(e("./modular")),d=E(e("./events-emitter")),f=E(e("./update/index")),p=E(e("./translate/index")),m=E(e("./transition/index")),g=E(e("./slide/index")),v=E(e("./loop/index")),b=E(e("./grab-cursor/index")),y=E(e("./manipulation/index")),w=E(e("./events/index")),_=E(e("./breakpoints/index")),k=E(e("./classes/index")),x=E(e("./images/index")),C=E(e("./check-overflow/index")),S=E(e("./defaults"));
vendor: 8,480 bytes, line 61
61function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var A={modular:h.default,eventsEmitter:d.default,update:f.default,translate:p.default,transition:m.default,slide:g.default,loop:v.default,grabCursor:b.default,manipulation:y.default,events:w.default,breakpoints:_.default,checkOverflow:C.default,classes:k.default,images:x.default},I={},M=function(){function e(){for(var t,i,n=arguments.length,c=new Array(n),u=0;u<n;u++)c[u]=arguments[u];if(1===c.length&&c[0].constructor&&"Object"===Object.prototype.toString.call(c[0]).slice(8,-1)?i=c[0]:(t=c[0],i=c[1]),i||(i={}),i=(0,o.extend)({},i),t&&!i.el&&(i.el=t),i.el&&(0,r.default)(i.el).length>1){var h=[];return(0,r.default)(i.el).each(function(t){var n=(0,o.extend)({},i,{el:t});h.push(new e(n))}),h}var d=this;d.__swiper__=!0,d.support=(0,s.getSupport)(),d.device=(0,a.getDevice)({userAgent:i.userAgent}),d.browser=(0,l.getBrowser)(),d.eventsListeners={},d.eventsAnyListeners=[],void 0===d.modules&&(d.modules={}),Object.keys(d.modules).forEach(function(e){var t=d.modules[e];if(t.params){var n=Object.keys(t.params)[0],r=t.params[n];if("object"!=typeof r||null===r)return;if(["navigation","pagination","scrollbar"].indexOf(n)>=0&&!0===i[n]&&(i[n]={auto:!0}),!(n in i)||!("enabled"in r))return;!0===i[n]&&(i[n]={enabled:!0}),"object"!=typeof i[n]||"enabled"in i[n]||(i[n].enabled=!0),i[n]||(i[n]={enabled:!1})}});var f,p,m=(0,o.extend)({},S.default);return d.useParams(m),d.params=(0,o.extend)({},m,I,i),d.originalParams=(0,o.extend)({},d.params),d.passedParams=(0,o.extend)({},i),d.params&&d.params.on&&Object.keys(d.params.on).forEach(function(e){d.on(e,d.params.on[e])}),d.params&&d.params.onAny&&d.onAny(d.params.onAny),d.$=r.default,(0,o.extend)(d,{enabled:d.params.enabled,el:t,classNames:[],slides:(0,r.default)(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===d.params.direction},isVertical:function(){return"vertical"===d.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:d.params.allowSlideNext,allowSlidePrev:d.params.allowSlidePrev,touchEvents:(f=["touchstart","touchmove","touchend","touchcancel"],p=["mousedown","mousemove","mouseup"],d.support.pointerEvents&&(p=["pointerdown","pointermove","pointerup"]),d.touchEventsTouch={start:f[0],move:f[1],end:f[2],cancel:f[3]},d.touchEventsDesktop={start:p[0],move:p[1],end:p[2]},d.support.touch||!d.params.simulateTouch?d.touchEventsTouch:d.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:d.params.focusableElements,lastClickTime:(0,o.now)(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:d.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),d.useModules(),d.emit("_swiper"),d.params.init&&d.init(),d}var t,i,c,u=e.prototype;return u.enable=function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))},u.disable=function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))},u.setProgress=function(e,t){var i=this;e=Math.min(Math.max(e,0),1);var n=i.minTranslate(),r=(i.maxTranslate()-n)*e+n;i.translateTo(r,void 0===t?0:t),i.updateActiveIndex(),i.updateSlidesClasses()},u.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter(function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)});e.emit("_containerClasses",t.join(" "))}},u.getSlideClasses=function(e){var t=this;return e.className.split(" ").filter(function(e){return 0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)}).join(" ")},u.emitSlidesClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.each(function(i){var n=e.getSlideClasses(i);t.push({slideEl:i,classNames:n}),e.emit("_slideClass",i,n)}),e.emit("_slideClasses",t)}},u.slidesPerViewDynamic=function(){var e=this,t=e.params,i=e.slides,n=e.slidesGrid,r=e.size,o=e.activeIndex,s=1;if(t.centeredSlides){for(var a,l=i[o].swiperSlideSize,c=o+1;c<i.length;c+=1)i[c]&&!a&&(s+=1,(l+=i[c].swiperSlideSize)>r&&(a=!0));for(var u=o-1;u>=0;u-=1)i[u]&&!a&&(s+=1,(l+=i[u].swiperSlideSize)>r&&(a=!0))}else for(var h=o+1;h<i.length;h+=1)n[h]-n[o]<r&&(s+=1);return s},u.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,i=e.params;i.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(n(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||n(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function n(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},u.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this,n=i.params.direction;return e||(e="horizontal"===n?"vertical":"horizontal"),e===n||"horizontal"!==e&&"vertical"!==e||(i.$el.removeClass(""+i.params.containerModifierClass+n).addClass(""+i.params.containerModifierClass+e),i.emitContainerClasses(),i.params.direction=e,i.slides.each(function(t){"vertical"===e?t.style.width="":t.style.height=""}),i.emit("changeDirection"),t&&i.update()),i},u.mount=function(e){var t=this;if(t.mounted)return!0;var i=(0,r.default)(e||t.params.el);if(!(e=i[0]))return!1;e.swiper=t;var s=function(){return"."+(t.params.wrapperClass||"").trim().split(" ").join(".")},a=function(){if(e&&e.shadowRoot&&e.shadowRoot.querySelector){var t=(0,r.default)(e.shadowRoot.querySelector(s()));return t.children=function(e){return i.children(e)},t}return i.children(s())}();if(0===a.length&&t.params.createElements){var l=(0,n.getDocument)().createElement("div");a=(0,r.default)(l),l.className=t.params.wrapperClass,i.append(l),i.children("."+t.params.slideClass).each(function(e){a.append(e)})}return(0,o.extend)(t,{$el:i,el:e,$wrapperEl:a,wrapperEl:a[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction")),wrongRTL:"-webkit-box"===a.css("display")}),!0},u.init=function(e){var t=this;return t.initialized||!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t},u.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,n=i.params,r=i.$el,s=i.$wrapperEl,a=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),n.loop&&i.loopDestroy(),t&&(i.removeClasses(),r.removeAttr("style"),s.removeAttr("style"),a&&a.length&&a.removeClass([n.slideVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach(function(e){i.off(e)}),!1!==e&&(i.$el[0].swiper=null,(0,o.deleteProps)(i)),i.destroyed=!0),null},e.extendDefaults=function(e){(0,o.extend)(I,e)},e.installModule=function(t){e.prototype.modules||(e.prototype.modules={});var i=t.name||Object.keys(e.prototype.modules).length+"_"+(0,o.now)();e.prototype.modules[i]=t},e.use=function(t){return Array.isArray(t)?(t.forEach(function(t){return e.installModule(t)}),e):(e.installModule(t),e)},t=e,c=[{key:"extendedDefaults",get:function(){return I}},{key:"defaults",get:function(){return S.default}}],(i=null)&&T(t.prototype,i),c&&T(t,c),e}();
61Object.keys(A).forEach(function(e){Object.keys(A[e]).forEach(function(t){M.prototype[t]=A[e][t]})}),M.use([c.default,u.default]);var P=M;i.default=P},{"../../modules/observer/observer":390,"../../modules/resize/resize":391,"../../utils/dom":392,"../../utils/get-browser":393,"../../utils/get-device":394,"../../utils/get-support":395,"../../utils/utils":396,"./breakpoints/index":313,"./check-overflow/index":315,"./classes/index":317,"./defaults":320,"./events-emitter":321,"./events/index":322,"./grab-cursor/index":329,"./images/index":332,"./loop/index":335,"./manipulation/index":341,"./modular":345,"./slide/index":346,"./transition/index":354,"./translate/index":359,"./update/index":364,"ssr-window":306}],320:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!1,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};i.default=n},{}],321:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n={on:function(e,t,i){var n=this;if("function"!=typeof t)return n;var r=i?"unshift":"push";return e.split(" ").forEach(function(e){n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][r](t)}),n},once:function(e,t,i){var n=this;if("function"!=typeof t)return n;function r(){n.off(e,r),r.__emitterProxy&&delete r.__emitterProxy;for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];t.apply(n,o)}return r.__emitterProxy=t,n.on(e,r,i)},onAny:function(e,t){var i=this;if("function"!=typeof e)return i;var n=t?"unshift":"push";return i.eventsAnyListeners.indexOf(e)<0&&i.eventsAnyListeners[n](e),i},offAny:function(e){var t=this;if(!t.eventsAnyListeners)return t;var i=t.eventsAnyListeners.indexOf(e);return i>=0&&t.eventsAnyListeners.splice(i,1),t},off:function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach(function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach(function(n,r){(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&i.eventsListeners[e].splice(r,1)})}),i):i},emit:function(){var e,t,i,n=this;if(!n.eventsListeners)return n;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return"string"==typeof o[0]||Array.isArray(o[0])?(e=o[0],t=o.slice(1,o.length),i=n):(e=o[0].events,t=o[0].data,i=o[0].context||n),t.unshift(i),(Array.isArray(e)?e:e.split(" ")).forEac
61h(function(e){n.eventsAnyListeners&&n.eventsAnyListeners.length&&n.eventsAnyListeners.forEach(function(n){n.apply(i,[e].concat(t))}),n.eventsListeners&&n.eventsListeners[e]&&n.eventsListeners[e].forEach(function(e){e.apply(i,t)})}),n}};i.default=n},{}],322:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("ssr-window"),r=u(e("./onTouchStart")),o=u(e("./onTouchMove")),s=u(e("./onTouchEnd")),a=u(e("./onResize")),l=u(e("./onClick")),c=u(e("./onScroll"));function u(e){return e&&e.__esModule?e:{default:e}}var h=!1;function d(){}var f={attachEvents:function(){var e=this,t=(0,n.getDocument)(),i=e.params,u=e.touchEvents,f=e.el,p=e.wrapperEl,m=e.device,g=e.support;e.onTouchStart=r.default.bind(e),e.onTouchMove=o.default.bind(e),e.onTouchEnd=s.default.bind(e),i.cssMode&&(e.onScroll=c.default.bind(e)),e.onClick=l.default.bind(e);var v=!!i.nested;if(!g.touch&&g.pointerEvents)f.addEventListener(u.start,e.onTouchStart,!1),t.addEventListener(u.move,e.onTouchMove,v),t.addEventListener(u.end,e.onTouchEnd,!1);else{if(g.touch){var b=!("touchstart"!==u.start||!g.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};f.addEventListener(u.start,e.onTouchStart,b),f.addEventListener(u.move,e.onTouchMove,g.passiveListener?{passive:!1,capture:v}:v),f.addEventListener(u.end,e.onTouchEnd,b),u.cancel&&f.addEventListener(u.cancel,e.onTouchEnd,b),h||(t.addEventListener("touchstart",d),h=!0)}(i.simulateTouch&&!m.ios&&!m.android||i.simulateTouch&&!g.touch&&m.ios)&&(f.addEventListener("mousedown",e.onTouchStart,!1),t.addEventListener("mousemove",e.onTouchMove,v),t.addEventListener("mouseup",e.onTouchEnd,!1))}(i.preventClicks||i.preventClicksPropagation)&&f.addEventListener("click",e.onClick,!0),i.cssMode&&p.addEventListener("scroll",e.onScroll),i.updateOnWindowResize?e.on(m.ios||m.android?"resize orientationchange observerUpdate":"resize observerUpdate",a.default,!0):e.on("observerUpdate",a.default,!0)},detachEvents:function(){var e=this,t=(0,n.getDocument)(),i=e.params,r=e.touchEvents,o=e.el,s=e.wrapperEl,l=e.device,c=e.support,u=!!i.nested;if(!c.touch&&c.pointerEvents)o.removeEventListener(r.start,e.onTouchStart,!1),t.removeEventListener(r.move,e.onTouchMove,u),t.removeEventListener(r.end,e.onTouchEnd,!1);else{if(c.touch){var h=!("onTouchStart"!==r.start||!c.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};o.removeEventListener(r.start,e.onTouchStart,h),o.removeEventListener(r.move,e.onTouchMove,u),o.removeEventListener(r.end,e.onTouchEnd,h),r.cancel&&o.removeEventListener(r.cancel,e.onTouchEnd,h)}(i.simulateTouch&&!l.ios&&!l.android||i.simulateTouch&&!c.touch&&l.ios)&&(o.removeEventListener("mousedown",e.onTouchStart,!1),t.removeEventListener("mousemove",e.onTouchMove,u),t.removeEventListener("mouseup",e.onTouchEnd,!1))}(i.preventClicks||i.preventClicksPropagation)&&o.removeEventListener("click",e.onClick,!0),i.cssMode&&s.removeEventListener("scroll",e.onScroll),e.off(l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",a.default)}};i.default=f},{"./onClick":323,"./onResize":324,"./onScroll":325,"./onTouchEnd":326,"./onTouchMove":327,"./onTouchStart":328,"ssr-window":306}],323:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this;if(!t.enabled)return;t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}},{}],324:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this,t=e.params,i=e.el;if(i&&0===i.offsetWidth)return;t.breakpoints&&e.setBreakpoint();var n=e.allowSlideNext,r=e.allowSlidePrev,o=e.snapGrid;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run();e.allowSlidePrev=r,e.allowSlideNext=n,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}},{}],325:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e,t=this,i=t.wrapperEl,n=t.rtlTranslate;if(!t.enabled)return;t.previousTranslate=t.translate,t.isHorizontal()?t.translate=n?i.scrollWidth-i.offsetWidth-i.scrollLeft:-i.scrollLeft:t.translate=-i.scrollTop;-0===t.translate&&(t.translate=0);t.updateActiveIndex(),t.updateSlidesClasses();var r=t.maxTranslate()-t.minTranslate();e=0===r?0:(t.translate-t.minTranslate())/r;e!==t.progress&&t.updateProgress(n?-t.translate:t.translate);t.emit("setTranslate",t.translate,!1)}},{}],326:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this,i=t.touchEventsData,r=t.params,o=t.touches,s=t.rtlTranslate,a=t.$wrapperEl,l=t.slidesGrid,c=t.snapGrid;if(!t.enabled)return;var u=e;u.originalEvent&&(u=u.originalEvent);i.allowTouchCallbacks&&t.emit("touchEnd",u);if(i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&r.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);r.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var h,d=(0,n.now)(),f=d-i.touchStartTime;t.allowClick&&(t.updateClickedSlide(u),t.emit("tap click",u),f<300&&d-i.lastClickTime<300&&t.emit("doubleTap doubleClick",u));if(i.lastClickTime=(0,n.now)(),(0,n.nextTick)(function(){t.destroyed||(t.allowClick=!0)}),!i.isTouched||!i.isMoved||!t.swipeDirection||0===o.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,h=r.followFinger?s?t.translate:-t.translate:-i.currentTranslate;if(r.cssMode)return;if(r.freeMode){if(h<-t.minTranslate())return void t.slideTo(t.activeIndex);if(h>-t.maxTranslate())return void(t.slides.length<c.length?t.slideTo(c.length-1):t.slideTo(t.slides.length-1));if(r.freeModeMomentum){if(i.velocities.length>1){var p=i.velocities.pop(),m=i.velocities.pop(),g=p.position-m.position,v=p.time-m.time;t.velocity=g/v,t.velocity/=2,Math.abs(t.velocity)<r.freeModeMinimumVelocity&&(t.velocity=0),(v>150||(0,n.now)()-p.time>300)&&(t.velocity=0)}else t.velocity=0;
61t.velocity*=r.freeModeMomentumVelocityRatio,i.velocities.length=0;var b=1e3*r.freeModeMomentumRatio,y=t.velocity*b,w=t.translate+y;s&&(w=-w);var _,k,x=!1,C=20*Math.abs(t.velocity)*r.freeModeMomentumBounceRatio;if(w<t.maxTranslate())r.freeModeMomentumBounce?(w+t.maxTranslate()<-C&&(w=t.maxTranslate()-C),_=t.maxTranslate(),x=!0,i.allowMomentumBounce=!0):w=t.maxTranslate(),r.loop&&r.centeredSlides&&(k=!0);else if(w>t.minTranslate())r.freeModeMomentumBounce?(w-t.minTranslate()>C&&(w=t.minTranslate()+C),_=t.minTranslate(),x=!0,i.allowMomentumBounce=!0):w=t.minTranslate(),r.loop&&r.centeredSlides&&(k=!0);else if(r.freeModeSticky){for(var S,E=0;E<c.length;E+=1)if(c[E]>-w){S=E;break}w=-(w=Math.abs(c[S]-w)<Math.abs(c[S-1]-w)||"next"===t.swipeDirection?c[S]:c[S-1])}if(k&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity){if(b=s?Math.abs((-w-t.translate)/t.velocity):Math.abs((w-t.translate)/t.velocity),r.freeModeSticky){var T=Math.abs((s?-w:w)-t.translate),A=t.slidesSizesGrid[t.activeIndex];b=T<A?r.speed:T<2*A?1.5*r.speed:2.5*r.speed}}else if(r.freeModeSticky)return void t.slideToClosest();r.freeModeMomentumBounce&&x?(t.updateProgress(_),t.setTransition(b),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating=!0,a.transitionEnd(function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(r.speed),setTimeout(function(){t.setTranslate(_),a.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()})},0))})):t.velocity?(t.updateProgress(w),t.setTransition(b),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,a.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):(t.emit("_freeModeNoMomentumRelease"),t.updateProgress(w)),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(r.freeModeSticky)return void t.slideToClosest();r.freeMode&&t.emit("_freeModeNoMomentumRelease")}return void((!r.freeModeMomentum||f>=r.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses()))}for(var I=0,M=t.slidesSizesGrid[0],P=0;P<l.length;P+=P<r.slidesPerGroupSkip?1:r.slidesPerGroup){var D=P<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==l[P+D]?h>=l[P]&&h<l[P+D]&&(I=P,M=l[P+D]-l[P]):h>=l[P]&&(I=P,M=l[l.length-1]-l[l.length-2])}var O=(h-l[I])/M,L=I<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(f>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(O>=r.longSwipesRatio?t.slideTo(I+L):t.slideTo(I)),"prev"===t.swipeDirection&&(O>1-r.longSwipesRatio?t.slideTo(I+L):t.slideTo(I))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(u.target===t.navigation.nextEl||u.target===t.navigation.prevEl)?u.target===t.navigation.nextEl?t.slideTo(I+L):t.slideTo(I):("next"===t.swipeDirection&&t.slideTo(I+L),"prev"===t.swipeDirection&&t.slideTo(I))}};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],327:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=(0,r.getDocument)(),i=this,n=i.touchEventsData,a=i.params,l=i.touches,c=i.rtlTranslate;if(!i.enabled)return;var u=e;u.originalEvent&&(u=u.originalEvent);if(!n.isTouched)return void(n.startMoving&&n.isScrolling&&i.emit("touchMoveOpposite",u));if(n.isTouchEvent&&"touchmove"!==u.type)return;var h="touchmove"===u.type&&u.targetTouches&&(u.targetTouches[0]||u.changedTouches[0]),d="touchmove"===u.type?h.pageX:u.pageX,f="touchmove"===u.type?h.pageY:u.pageY;if(u.preventedByNestedSwiper)return l.startX=d,void(l.startY=f);if(!i.allowTouchMove)return i.allowClick=!1,void(n.isTouched&&((0,s.extend)(l,{startX:d,startY:f,currentX:d,currentY:f}),n.touchStartTime=(0,s.now)()));if(n.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(i.isVertical()){if(f<l.startY&&i.translate<=i.maxTranslate()||f>l.startY&&i.translate>=i.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else if(d<l.startX&&i.translate<=i.maxTranslate()||d>l.startX&&i.translate>=i.minTranslate())return;if(n.isTouchEvent&&t.activeElement&&u.target===t.activeElement&&(0,o.default)(u.target).is(n.focusableElements))return n.isMoved=!0,void(i.allowClick=!1);n.allowTouchCallbacks&&i.emit("touchMove",u);if(u.targetTouches&&u.targetTouches.length>1)return;l.currentX=d,l.currentY=f;var p,m=l.currentX-l.startX,g=l.currentY-l.startY;if(i.params.threshold&&Math.sqrt(Math.pow(m,2)+Math.pow(g,2))<i.params.threshold)return;void 0===n.isScrolling&&(i.isHorizontal()&&l.currentY===l.startY||i.isVertical()&&l.currentX===l.startX?n.isScrolling=!1:m*m+g*g>=25&&(p=180*Math.atan2(Math.abs(g),Math.abs(m))/Math.PI,n.isScrolling=i.isHorizontal()?p>a.touchAngle:90-p>a.touchAngle));n.isScrolling&&i.emit("touchMoveOpposite",u);void 0===n.startMoving&&(l.currentX===l.startX&&l.currentY===l.startY||(n.startMoving=!0));if(n.isScrolling)return void(n.isTouched=!1);if(!n.startMoving)return;i.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault();a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();n.isMoved||(a.loop&&i.loopFix(),n.startTranslate=i.getTranslate(),i.setTransition(0),i.animating&&i.$wrapperEl.trigger("webkitTransitionEnd transitionend"),n.allowMomentumBounce
61=!1,!a.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",u));i.emit("sliderMove",u),n.isMoved=!0;var v=i.isHorizontal()?m:g;l.diff=v,v*=a.touchRatio,c&&(v=-v);i.swipeDirection=v>0?"prev":"next",n.currentTranslate=v+n.startTranslate;var b=!0,y=a.resistanceRatio;a.touchReleaseOnEdges&&(y=0);v>0&&n.currentTranslate>i.minTranslate()?(b=!1,a.resistance&&(n.currentTranslate=i.minTranslate()-1+Math.pow(-i.minTranslate()+n.startTranslate+v,y))):v<0&&n.currentTranslate<i.maxTranslate()&&(b=!1,a.resistance&&(n.currentTranslate=i.maxTranslate()+1-Math.pow(i.maxTranslate()-n.startTranslate-v,y)));b&&(u.preventedByNestedSwiper=!0);!i.allowSlideNext&&"next"===i.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate);!i.allowSlidePrev&&"prev"===i.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate);i.allowSlidePrev||i.allowSlideNext||(n.currentTranslate=n.startTranslate);if(a.threshold>0){if(!(Math.abs(v)>a.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);
61if(!n.allowThresholdMove)return n.allowThresholdMove=!0,l.startX=l.currentX,l.startY=l.currentY,n.currentTranslate=n.startTranslate,void(l.diff=i.isHorizontal()?l.currentX-l.startX:l.currentY-l.startY)}if(!a.followFinger||a.cssMode)return;(a.freeMode||a.watchSlidesProgress||a.watchSlidesVisibility)&&(i.updateActiveIndex(),i.updateSlidesClasses());a.freeMode&&(0===n.velocities.length&&n.velocities.push({position:l[i.isHorizontal()?"startX":"startY"],time:n.touchStartTime}),n.velocities.push({position:l[i.isHorizontal()?"currentX":"currentY"],time:(0,s.now)()}));i.updateProgress(n.currentTranslate),i.setTranslate(n.currentTranslate)};var n,r=e("ssr-window"),o=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../../utils/utils")},{"../../../utils/dom":392,"../../../utils/utils":396,"ssr-window":306}],328:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this,i=(0,r.getDocument)(),n=(0,r.getWindow)(),a=t.touchEventsData,l=t.params,c=t.touches;if(!t.enabled)return;if(t.animating&&l.preventInteractionOnTransition)return;var u=e;u.originalEvent&&(u=u.originalEvent);var h=(0,o.default)(u.target);if("wrapper"===l.touchEventsTarget&&!h.closest(t.wrapperEl).length)return;if(a.isTouchEvent="touchstart"===u.type,!a.isTouchEvent&&"which"in u&&3===u.which)return;if(!a.isTouchEvent&&"button"in u&&u.button>0)return;if(a.isTouched&&a.isMoved)return;l.noSwipingClass&&""!==l.noSwipingClass&&u.target&&u.target.shadowRoot&&e.path&&e.path[0]&&(h=(0,o.default)(e.path[0]));var d=l.noSwipingSelector?l.noSwipingSelector:"."+l.noSwipingClass,f=!(!u.target||!u.target.shadowRoot);if(l.noSwiping&&(f?function(e,t){void 0===t&&(t=this);function i(t){return t&&t!==(0,r.getDocument)()&&t!==(0,r.getWindow)()?(t.assignedSlot&&(t=t.assignedSlot),t.closest(e)||i(t.getRootNode().host)):null}return i(t)}(d,u.target):h.closest(d)[0]))return void(t.allowClick=!0);if(l.swipeHandler&&!h.closest(l.swipeHandler)[0])return;c.currentX="touchstart"===u.type?u.targetTouches[0].pageX:u.pageX,c.currentY="touchstart"===u.type?u.targetTouches[0].pageY:u.pageY;var p=c.currentX,m=c.currentY,g=l.edgeSwipeDetection||l.iOSEdgeSwipeDetection,v=l.edgeSwipeThreshold||l.iOSEdgeSwipeThreshold;if(g&&(p<=v||p>=n.innerWidth-v)){if("prevent"!==g)return;e.preventDefault()}(0,s.extend)(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),c.startX=p,c.startY=m,a.touchStartTime=(0,s.now)(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,l.threshold>0&&(a.allowThresholdMove=!1);if("touchstart"!==u.type){var b=!0;h.is(a.focusableElements)&&(b=!1),i.activeElement&&(0,o.default)(i.activeElement).is(a.focusableElements)&&i.activeElement!==h[0]&&i.activeElement.blur();var y=b&&t.allowTouchMove&&l.touchStartPreventDefault;!l.touchStartForcePreventDefault&&!y||h[0].isContentEditable||u.preventDefault()}t.emit("touchStart",u)};var n,r=e("ssr-window"),o=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../../utils/utils")},{"../../../utils/dom":392,"../../../utils/utils":396,"ssr-window":306}],329:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(e("./setGrabCursor")),r=o(e("./unsetGrabCursor"));function o(e){return e&&e.__esModule?e:{default:e}}var s={setGrabCursor:n.default,unsetGrabCursor:r.default};i.default=s},{"./setGrabCursor":330,"./unsetGrabCursor":331}],330:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;var i=t.el;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"}},{}],331:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this;if(e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;e.el.style.cursor=""}},{}],332:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(e("./loadImage")),r=o(e("./preloadImages"));function o(e){return e&&e.__esModule?e:{default:e}}var s={loadImage:n.default,preloadImages:r.default};i.default=s},{"./loadImage":333,"./preloadImages":334}],333:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i,n,s,a){var l,c=(0,r.getWindow)();function u(){a&&a()}(0,o.default)(e).parent("picture")[0]||e.complete&&s?u():t?((l=new c.Image).onload=u,l.onerror=u,n&&(l.sizes=n),i&&(l.srcset=i),t&&(l.src=t)):u()};var n,r=e("ssr-window"),o=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n}},{"../../../utils/dom":392,"ssr-window":306}],334:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(
61),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i<e.imagesToLoad.length;i+=1){var n=e.imagesToLoad[i];e.loadImage(n,n.currentSrc||n.getAttribute("src"),n.srcset||n.getAttribute("srcset"),n.sizes||n.getAttribute("sizes"),!0,t)}}},{}],335:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(e("./loopCreate")),r=s(e("./loopFix")),o=s(e("./loopDestroy"));function s(e){return e&&e.__esModule?e:{default:e}}var a={loopCreate:n.default,loopFix:r.default,loopDestroy:o.default};i.default=a},{"./loopCreate":336,"./loopDestroy":337,"./loopFix":338}],336:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this,t=(0,r.getDocument)(),i=e.params,n=e.$wrapperEl;n.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var s=n.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var a=i.slidesPerGroup-s.length%i.slidesPerGroup;if(a!==i.slidesPerGroup){for(var l=0;l<a;l+=1){var c=(0,o.default)(t.createElement("div")).addClass(i.slideClass+" "+i.slideBlankClass);n.append(c)}s=n.children("."+i.slideClass)}}"auto"!==i.slidesPerView||i.loopedSlides||(i.loopedSlides=s.length);e.loopedSlides=Math.ceil(parseFloat(i.loopedSlides||i.slidesPerView,10)),e.loopedSlides+=i.loopAdditionalSlides,e.loopedSlides>s.length&&(e.loopedSlides=s.length);var u=[],h=[];s.each(function(t,i){var n=(0,o.default)(t);i<e.loopedSlides&&h.push(t),i<s.length&&i>=s.length-e.loopedSlides&&u.push(t),n.attr("data-swiper-slide-index",i)});for(var d=0;d<h.length;d+=1)n.append((0,o.default)(h[d].cloneNode(!0)).addClass(i.slideDuplicateClass));for(var f=u.length-1;f>=0;f-=1)n.prepend((0,o.default)(u[f].cloneNode(!0)).addClass(i.slideDuplicateClass))};var n,r=e("ssr-window"),o=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n}},{"../../../utils/dom":392,"ssr-window":306}],337:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this,t=e.$wrapperEl,i=e.params,n=e.slides;t.children("."+i.slideClass+"."+i.slideDuplicateClass+",."+i.slideClass+"."+i.slideBlankClass).remove(),n.removeAttr("data-swiper-slide-index")}},{}],338:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this;e.emit("beforeLoopFix");var t,i=e.activeIndex,n=e.slides,r=e.loopedSlides,o=e.allowSlidePrev,s=e.allowSlideNext,a=e.snapGrid,l=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var c=-a[i]-e.getTranslate();if(i<r){t=n.length-3*r+i,t+=r,e.slideTo(t,0,!1,!0)&&0!==c&&e.setTranslate((l?-e.translate:e.translate)-c)}else if(i>=n.length-r){t=-n.length+i+r,t+=r,e.slideTo(t,0,!1,!0)&&0!==c&&e.setTranslate((l?-e.translate:e.translate)-c)}e.allowSlidePrev=o,e.allowSlideNext=s,e.emit("loopFix")}},{}],339:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t){var i=this,n=i.$wrapperEl,r=i.params,o=i.activeIndex;r.loop&&(o-=i.loopedSlides,i.loopDestroy(),i.slides=n.children("."+r.slideClass));var s=i.slides.length;if(e<=0)return void i.prependSlide(t);if(e>=s)return void i.appendSlide(t);for(var a=o>e?o+1:o,l=[],c=s-1;c>=e;c-=1){var u=i.slides.eq(c);u.remove(),l.unshift(u)}if("object"==typeof t&&"length"in t){for(var h=0;h<t.length;h+=1)t[h]&&n.append(t[h]);a=o>e?o+t.length:o}else n.append(t);for(var d=0;d<l.length;d+=1)n.append(l[d]);r.loop&&i.loopCreate();r.observer&&i.support.observer||i.update();r.loop?i.slideTo(a+i.loopedSlides,0,!1):i.slideTo(a,0,!1)}},{}],340:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this,i=t.$wrapperEl,n=t.params;n.loop&&t.loopDestroy();if("object"==typeof e&&"length"in e)for(var r=0;r<e.length;r+=1)e[r]&&i.append(e[r]);else i.append(e);n.loop&&t.loopCreate();n.observer&&t.support.observer||t.update()}},{}],341:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=l(e("./appendSlide")),r=l(e("./prependSlide")),o=l(e("./addSlide")),s=l(e("./removeSlide")),a=l(e("./removeAllSlides"));function l(e){return e&&e.__esModule?e:{default:e}}var c={appendSlide:n.default,prependSlide:r.default,addSlide:o.default,removeSlide:s.default,removeAllSlides:a.default};i.default=c},{"./addSlide":339,"./appendSlide":340,"./prependSlide":342,"./removeAllSlides":343,"./removeSlide":344}],342:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this,i=t.params,n=t.$wrapperEl,r=t.activeIndex;i.loop&&t.loopDestroy();var o=r+1;if("object"==typeof e&&"length"in e){for(var s=0;s<e.length;s+=1)e[s]&&n.prepend(e[s]);o=r+e.length}else n.prepend(e);i.loop&&t.loopCreate();
61i.observer&&t.support.observer||t.update();t.slideTo(o,0,!1)}},{}],343:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},{}],344:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this,i=t.params,n=t.$wrapperEl,r=t.activeIndex;i.loop&&(r-=t.loopedSlides,t.loopDestroy(),t.slides=n.children("."+i.slideClass));var o,s=r;if("object"==typeof e&&"length"in e){for(var a=0;a<e.length;a+=1)o=e[a],t.slides[o]&&t.slides.eq(o).remove(),o<s&&(s-=1);s=Math.max(s,0)}else o=e,t.slides[o]&&t.slides.eq(o).remove(),o<s&&(s-=1),s=Math.max(s,0);i.loop&&t.loopCreate();i.observer&&t.support.observer||t.update();i.loop?t.slideTo(s+t.loopedSlides,0,!1):t.slideTo(s,0,!1)}},{}],345:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("../../utils/utils"),r={useParams:function(e){var t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var r=t.modules[i];r.params&&(0,n.extend)(e,r.params)})},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var n=t.modules[i],r=e[i]||{};n.on&&t.on&&Object.keys(n.on).forEach(function(e){t.on(e,n.on[e])}),n.create&&n.create.bind(t)(r)})}};i.default=r},{"../../utils/utils":396}],346:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=u(e("./slideTo")),r=u(e("./slideToLoop")),o=u(e("./slideNext")),s=u(e("./slidePrev")),a=u(e("./slideReset")),l=u(e("./slideToClosest")),c=u(e("./slideToClickedSlide"));function u(e){return e&&e.__esModule?e:{default:e}}var h={slideTo:n.default,slideToLoop:r.default,slideNext:o.default,slidePrev:s.default,slideReset:a.default,slideToClosest:l.default,slideToClickedSlide:c.default};i.default=h},{"./slideNext":347,"./slidePrev":348,"./slideReset":349,"./slideTo":350,"./slideToClickedSlide":351,"./slideToClosest":352,"./slideToLoop":353}],347:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i){void 0===e&&(e=this.params.speed);void 0===t&&(t=!0);var n=this,r=n.params,o=n.animating;if(!n.enabled)return n;var s=n.activeIndex<r.slidesPerGroupSkip?1:r.slidesPerGroup;if(r.loop){if(o&&r.loopPreventsSlide)return!1;n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft}return n.slideTo(n.activeIndex+s,e,t,i)}},{}],348:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i){void 0===e&&(e=this.params.speed);void 0===t&&(t=!0);var n=this,r=n.params,o=n.animating,s=n.snapGrid,a=n.slidesGrid,l=n.rtlTranslate;if(!n.enabled)return n;if(r.loop){if(o&&r.loopPreventsSlide)return!1;n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var u,h=c(l?n.translate:-n.translate),d=s.map(function(e){return c(e)}),f=s[d.indexOf(h)-1];
61void 0===f&&r.cssMode&&s.forEach(function(e){!f&&h>=e&&(f=e)});void 0!==f&&(u=a.indexOf(f))<0&&(u=n.activeIndex-1);return n.slideTo(u,e,t,i)}},{}],349:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i){void 0===e&&(e=this.params.speed);void 0===t&&(t=!0);return this.slideTo(this.activeIndex,e,t,i)}},{}],350:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i,n,r){void 0===e&&(e=0);void 0===t&&(t=this.params.speed);void 0===i&&(i=!0);if("number"!=typeof e&&"string"!=typeof e)throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. ["+typeof e+"] given.");if("string"==typeof e){var o=parseInt(e,10);if(!isFinite(o))throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. ["+e+"] given.");e=o}var s=this,a=e;a<0&&(a=0);var l=s.params,c=s.snapGrid,u=s.slidesGrid,h=s.previousIndex,d=s.activeIndex,f=s.rtlTranslate,p=s.wrapperEl,m=s.enabled;if(s.animating&&l.preventInteractionOnTransition||!m&&!n&&!r)return!1;var g=Math.min(s.params.slidesPerGroupSkip,a),v=g+Math.floor((a-g)/s.params.slidesPerGroup);v>=c.length&&(v=c.length-1);(d||l.initialSlide||0)===(h||0)&&i&&s.emit("beforeSlideChangeStart");var b,y=-c[v];if(s.updateProgress(y),l.normalizeSlideIndex)for(var w=0;w<u.length;w+=1){var _=-Math.floor(100*y),k=Math.floor(100*u[w]),x=Math.floor(100*u[w+1]);void 0!==u[w+1]?_>=k&&_<x-(x-k)/2?a=w:_>=k&&_<x&&(a=w+1):_>=k&&(a=w)}if(s.initialized&&a!==d){if(!s.allowSlideNext&&y<s.translate&&y<s.minTranslate())return!1;if(!s.allowSlidePrev&&y>s.translate&&y>s.maxTranslate()&&(d||0)!==a)return!1}b=a>d?"next":a<d?"prev":"reset";if(f&&-y===s.translate||!f&&y===s.translate)return s.updateActiveIndex(a),l.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==l.effect&&s.setTranslate(y),"reset"!==b&&(s.transitionStart(i,b),s.transitionEnd(i,b)),!1;if(l.cssMode){var C,S=s.isHorizontal(),E=-y;if(f&&(E=p.scrollWidth-p.offsetWidth-E),0===t)p[S?"scrollLeft":"scrollTop"]=E;else if(p.scrollTo)p.scrollTo(((C={})[S?"left":"top"]=E,C.behavior="smooth",C));else p[S?"scrollLeft":"scrollTop"]=E;return!0}0===t?(s.setTransition(0),s.setTranslate(y),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,n),s.transitionStart(i,b),s.transitionEnd(i,b)):(s.setTransition(t),s.setTranslate(y),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,n),s.transitionStart(i,b),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(i,b))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd)));return!0}},{}],351:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e,t=this,i=t.params,n=t.$wrapperEl,s="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,a=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt((0,r.default)(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?a<t.loopedSlides-s/2||a>t.slides.length-t.loopedSlides+s/2?(t.loopFix(),a=n.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),(0,o.nextTick)(function(){t.slideTo(a)})):t.slideTo(a):a>t.slides.length-s?(t.loopFix(),a=n.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),(0,o.nextTick)(function(){t.slideTo(a)})):t.slideTo(a)}else t.slideTo(a)};var n,r=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../../utils/utils")},{"../../../utils/dom":392,"../../../utils/utils":396}],352:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i,n){void 0===e&&(e=this.params.speed);void 0===t&&(t=!0);void 0===n&&(n=.5);var r=this,o=r.activeIndex,s=Math.min(r.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/r.params.slidesPerGroup),l=r.rtlTranslate?r.translate:-r.translate;if(l>=r.snapGrid[a]){var c=r.snapGrid[a];l-c>(r.snapGrid[a+1]-c)*n&&(o+=r.params.slidesPerGroup)}else{var u=r.snapGrid[a-1];l-u<=(r.snapGrid[a]-u)*n&&(o-=r.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,r.slidesGrid.length-1),r.slideTo(o,e,t,i)}},{}],353:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i,n){void 0===e&&(e=0);void 0===t&&(t=this.params.speed);void 0===i&&(i=!0);var r=this,o=e;r.params.loop&&(o+=r.loopedSlides);return r.slideTo(o,t,i,n)}},{}],354:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(e("./setTransition")),r=s(e("./transitionStart")),o=s(e("./transitionEnd"));
61function s(e){return e&&e.__esModule?e:{default:e}}var a={setTransition:n.default,transitionStart:r.default,transitionEnd:o.default};i.default=a},{"./setTransition":355,"./transitionEnd":356,"./transitionStart":357}],355:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t){var i=this;i.params.cssMode||i.$wrapperEl.transition(e);i.emit("setTransition",e,t)}},{}],356:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t){void 0===e&&(e=!0);var i=this,n=i.activeIndex,r=i.previousIndex,o=i.params;if(i.animating=!1,o.cssMode)return;i.setTransition(0);var s=t;s||(s=n>r?"next":n<r?"prev":"reset");if(i.emit("transitionEnd"),e&&n!==r){if("reset"===s)return void i.emit("slideResetTransitionEnd");i.emit("slideChangeTransitionEnd"),"next"===s?i.emit("slideNextTransitionEnd"):i.emit("slidePrevTransitionEnd")}}},{}],357:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t){void 0===e&&(e=!0);var i=this,n=i.activeIndex,r=i.params,o=i.previousIndex;if(r.cssMode)return;r.autoHeight&&i.updateAutoHeight();var s=t;s||(s=n>o?"next":n<o?"prev":"reset");if(i.emit("transitionStart"),e&&n!==o){if("reset"===s)return void i.emit("slideResetTransitionStart");i.emit("slideChangeTransitionStart"),"next"===s?i.emit("slideNextTransitionStart"):i.emit("slidePrevTransitionStart")}}},{}],358:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this,i=t.params,r=t.rtlTranslate,o=t.translate,s=t.$wrapperEl;if(i.virtualTranslate)return r?-o:o;if(i.cssMode)return o;var a=(0,n.getTranslate)(s[0],e);r&&(a=-a);return a||0};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],359:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=l(e("./getTranslate")),r=l(e("./setTranslate")),o=l(e("./minTranslate")),s=l(e("./maxTranslate")),a=l(e("./translateTo"));function l(e){return e&&e.__esModule?e:{default:e}}var c={getTranslate:n.default,setTranslate:r.default,minTranslate:o.default,maxTranslate:s.default,translateTo:a.default};i.default=c},{"./getTranslate":358,"./maxTranslate":360,"./minTranslate":361,"./setTranslate":362,"./translateTo":363}],360:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){return-this.snapGrid[this.snapGrid.length-1]}},{}],361:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){return-this.snapGrid[0]}},{}],362:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t){var i,n=this,r=n.rtlTranslate,o=n.params,s=n.$wrapperEl,a=n.wrapperEl,l=n.progress,c=0,u=0;n.isHorizontal()?c=r?-e:e:u=e;o.roundLengths&&(c=Math.floor(c),u=Math.floor(u));o.cssMode?a[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-c:-u:o.virtualTranslate||s.transform("translate3d("+c+"px, "+u+"px, 0px)");n.previousTranslate=n.translate,n.translate=n.isHorizontal()?c:u;var h=n.maxTranslate()-n.minTranslate();i=0===h?0:(e-n.minTranslate())/h;i!==l&&n.updateProgress(e);n.emit("setTranslate",n.translate,t)}},{}],363:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e,t,i,n,r){void 0===e&&(e=0);void 0===t&&(t=this.params.speed);void 0===i&&(i=!0);void 0===n&&(n=!0);var o=this,s=o.params,a=o.wrapperEl;if(o.animating&&s.preventInteractionOnTransition)return!1;var l,c=o.minTranslate(),u=o.maxTranslate();l=n&&e>c?c:n&&e<u?u:e;if(o.updateProgress(l),s.cssMode){var h,d=o.isHorizontal();if(0===t)a[d?"scrollLeft":"scrollTop"]=-l;else if(a.scrollTo)a.scrollTo(((h={})[d?"left":"top"]=-l,h.behavior="smooth",h));else a[d?"scrollLeft":"scrollTop"]=-l;return!0}0===t?(o.setTransition(0),o.setTranslate(l),i&&(o.emit("beforeTransitionStart",t,r),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(l),i&&(o.emit("beforeTransitionStart",t,r),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,i&&o.emit("transitionEnd"))}),o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd)));return!0}},{}],364:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=d(e("./updateSize")),r=d(e("./updateSlides")),o=d(e("./updateAutoHeight")),s=d(e("./updateSlidesOffset")),a=d(e("./updateSlidesProgress")),l=d(e("./updateProgress")),c=d(e("./updateSlidesClasses")),u=d(e("./updateActiveIndex")),h=d(e("./updateClickedSlide"));
61function d(e){return e&&e.__esModule?e:{default:e}}var f={updateSize:n.default,updateSlides:r.default,updateAutoHeight:o.default,updateSlidesOffset:s.default,updateSlidesProgress:a.default,updateProgress:l.default,updateSlidesClasses:c.default,updateActiveIndex:u.default,updateClickedSlide:h.default};i.default=f},{"./updateActiveIndex":365,"./updateAutoHeight":366,"./updateClickedSlide":367,"./updateProgress":368,"./updateSize":369,"./updateSlides":370,"./updateSlidesClasses":371,"./updateSlidesOffset":372,"./updateSlidesProgress":373}],365:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t,i=this,r=i.rtlTranslate?i.translate:-i.translate,o=i.slidesGrid,s=i.snapGrid,a=i.params,l=i.activeIndex,c=i.realIndex,u=i.snapIndex,h=e;if(void 0===h){for(var d=0;d<o.length;d+=1)void 0!==o[d+1]?r>=o[d]&&r<o[d+1]-(o[d+1]-o[d])/2?h=d:r>=o[d]&&r<o[d+1]&&(h=d+1):r>=o[d]&&(h=d);a.normalizeSlideIndex&&(h<0||void 0===h)&&(h=0)}if(s.indexOf(r)>=0)t=s.indexOf(r);else{var f=Math.min(a.slidesPerGroupSkip,h);t=f+Math.floor((h-f)/a.slidesPerGroup)}t>=s.length&&(t=s.length-1);if(h===l)return void(t!==u&&(i.snapIndex=t,i.emit("snapIndexChange")));var p=parseInt(i.slides.eq(h).attr("data-swiper-slide-index")||h,10);(0,n.extend)(i,{snapIndex:t,realIndex:p,previousIndex:l,activeIndex:h}),i.emit("activeIndexChange"),i.emit("snapIndexChange"),c!==p&&i.emit("realIndexChange");(i.initialized||i.params.runCallbacksOnInit)&&i.emit("slideChange")};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],366:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t,i=this,n=[],r=i.virtual&&i.params.virtual.enabled,o=0;"number"==typeof e?i.setTransition(e):!0===e&&i.setTransition(i.params.speed);var s=function(e){return r?i.slides.filter(function(t){return parseInt(t.getAttribute("data-swiper-slide-index"),10)===e})[0]:i.slides.eq(e)[0]};if("auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)i.visibleSlides.each(function(e){n.push(e)});else for(t=0;t<Math.ceil(i.params.slidesPerView);t+=1){var a=i.activeIndex+t;if(a>i.slides.length&&!r)break;n.push(s(a))}else n.push(s(i.activeIndex));for(t=0;t<n.length;t+=1)if(void 0!==n[t]){var l=n[t].offsetHeight;o=l>o?l:o}o&&i.$wrapperEl.css("height",o+"px")}},{}],367:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t,i=this,n=i.params,o=(0,r.default)(e.target).closest("."+n.slideClass)[0],s=!1;if(o)for(var a=0;a<i.slides.length;a+=1)if(i.slides[a]===o){s=!0,t=a;break}if(!o||!s)return i.clickedSlide=void 0,void(i.clickedIndex=void 0);i.clickedSlide=o,i.virtual&&i.params.virtual.enabled?i.clickedIndex=parseInt((0,r.default)(o).attr("data-swiper-slide-index"),10):i.clickedIndex=t;n.slideToClickedSlide&&void 0!==i.clickedIndex&&i.clickedIndex!==i.activeIndex&&i.slideToClickedSlide()};var n,r=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n}},{"../../../utils/dom":392}],368:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){var t=this;if(void 0===e){var i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}var r=t.params,o=t.maxTranslate()-t.minTranslate(),s=t.progress,a=t.isBeginning,l=t.isEnd,c=a,u=l;0===o?(s=0,a=!0,l=!0):(a=(s=(e-t.minTranslate())/o)<=0,l=s>=1);(0,n.extend)(t,{progress:s,isBeginning:a,isEnd:l}),(r.watchSlidesProgress||r.watchSlidesVisibility||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e);a&&!c&&t.emit("reachBeginning toEdge");l&&!u&&t.emit("reachEnd toEdge");(c&&!a||u&&!l)&&t.emit("fromEdge");t.emit("progress",s)};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],369:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e,t,i=this,r=i.$el;e=void 0!==i.params.width&&null!==i.params.width?i.params.width:r[0].clientWidth;t=void 0!==i.params.height&&null!==i.params.height?i.params.height:r[0].clientHeight;if(0===e&&i.isHorizontal()||0===t&&i.isVertical())return;e=e-parseInt(r.css("padding-left")||0,10)-parseInt(r.css("padding-right")||0,10),t=t-parseInt(r.css("padding-top")||0,10)-parseInt(r.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0);Number.isNaN(t)&&(t=0);(0,n.extend)(i,{width:e,height:t,size:i.isHorizontal()?e:t})};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],370:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function i(e,i){return parseFloat(e.getPropertyValue(t(i))||0)}var r=e.params,o=e.$wrapperEl,s=e.size,a=e.rtlTranslate,l=e.wrongRTL,c=e.virtual&&r.virtual.enabled,u=c?e.virtual.slides.length:e.slides.length,h=o.children("."+e.params.slideClass),d=c?e.virtual.slides.length:h.length,f=[],p=[],m=[],g=r.slidesOffsetBefore;"function"==typeof g&&(g=r.slidesOffsetBefore.call(e));var v=r.slidesOffsetAfter;"function"==typeof v&&(v=r.slidesOffsetAfter.call(e));var b,y,w=e.snapGrid.length,_=e.slidesGrid.length,k=r.spaceBetween,x=-g,C=0,S=0;if(void 0===s)return;"string"==typeof k&&k.indexOf("%")>=0&&(k=parseFloat(k.replace("%",""))/100*s);e.virtualSize=-k,a?h.css({marginLeft:"",marginBottom:"",marginTop:""}):h.css({marginRight:"",marginBottom:"",marginTop:""});r.slidesPerColumn>1&&(b=Math.floor(d/r.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/r.slidesPerColumn)*r.slidesPerColumn,"auto"!==r.slidesPerView&&"row"===r.slidesPerColumnFill&&(b=Math.max(b,r.slidesPerView*r.slidesPerColumn)));for(var E,T,A=r.slidesPerColumn,I=b/A,M=Math.floor(d/r.slidesPerColumn),P=0;P<d;P+=1){y=0;var D=h.eq(P);if(r.slidesPerColumn>1){var O=void 0,L=void 0,R=void 0;if("row"===r.slidesPerColumnFill&&r.slidesPerGroup>1){var B=Math.floor(P/(r.slidesPerGroup*r.slidesPerColumn)),N=P-r.slidesPerColumn*r.slidesPerGroup*B,j=0===B?r.slidesPerGroup:Math.min(Math.ceil((d-B*A*r.slidesPerGroup)/A),r.slidesPerGroup);O=(L=N-(R=Math.floor(N/j))*j+B*r.slidesPerGroup)+R*b/A,D.css({"-webkit-box-ordinal-group":O,"-moz-box-ordinal-group":O,"-ms-flex-order":O,"-webkit-order":O,order:O})}else"column"===r.slidesPerColumnFill?(R=P-(L=Math.floor(P/A))*A,(L>M||L===M&&R===A-1)&&(R+=1)>=A&&(R=0,L+=1)):L=P-(R=Math.floor(P/I))*I;D.css(t("margin-top"),0!==R?r.spaceBetween&&r.spaceBetween+"px":"")}if("none"!==D.css("display")){if("auto"===r.slidesPerView){var F=getComputedStyle(D[0]),z=D[0].style.transform,V=D[0].style.webkitTransform;if(z&&(D[0].style.transform="none"),V&&(D[0].style.webkitTransform="none"),r.roundLengths)y=e.isHorizontal()?D.outerWidth(!0):D.outerHeight(!0);else{var H=i(F,"width"),U=i(F,"padding-left"),W=i(F,"padding-right"),$=i(F,"margin-left"),G=i(F,"margin-right"),q=F.getPropertyValue("box-sizing");if(q&&"border-box"===q)y=H+$+G;else{var Y=D[0],Z=Y.clientWidth;y=H+U+W+$+G+(Y.offsetWidth-Z)}}
61z&&(D[0].style.transform=z),V&&(D[0].style.webkitTransform=V),r.roundLengths&&(y=Math.floor(y))}else y=(s-(r.slidesPerView-1)*k)/r.slidesPerView,r.roundLengths&&(y=Math.floor(y)),h[P]&&(h[P].style[t("width")]=y+"px");h[P]&&(h[P].swiperSlideSize=y),m.push(y),r.centeredSlides?(x=x+y/2+C/2+k,0===C&&0!==P&&(x=x-s/2-k),0===P&&(x=x-s/2-k),Math.abs(x)<.001&&(x=0),r.roundLengths&&(x=Math.floor(x)),S%r.slidesPerGroup===0&&f.push(x),p.push(x)):(r.roundLengths&&(x=Math.floor(x)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&f.push(x),p.push(x),x=x+y+k),e.virtualSize+=y+k,C=y,S+=1}}e.virtualSize=Math.max(e.virtualSize,s)+v,a&&l&&("slide"===r.effect||"coverflow"===r.effect)&&o.css({width:e.virtualSize+r.spaceBetween+"px"});r.setWrapperSize&&o.css(((T={})[t("width")]=e.virtualSize+r.spaceBetween+"px",T));if(r.slidesPerColumn>1){var X;if(e.virtualSize=(y+r.spaceBetween)*b,e.virtualSize=Math.ceil(e.virtualSize/r.slidesPerColumn)-r.spaceBetween,o.css(((X={})[t("width")]=e.virtualSize+r.spaceBetween+"px",X)),r.centeredSlides){E=[];for(var K=0;K<f.length;K+=1){var J=f[K];r.roundLengths&&(J=Math.floor(J)),f[K]<e.virtualSize+f[0]&&E.push(J)}f=E}}if(!r.centeredSlides){E=[];for(var Q=0;Q<f.length;Q+=1){var ee=f[Q];r.roundLengths&&(ee=Math.floor(ee)),f[Q]<=e.virtualSize-s&&E.push(ee)}f=E,Math.floor(e.virtualSize-s)-Math.floor(f[f.length-1])>1&&f.push(e.virtualSize-s)}0===f.length&&(f=[0]);if(0!==r.spaceBetween){var te,ie=e.isHorizontal()&&a?"marginLeft":t("marginRight");h.filter(function(e,t){return!r.cssMode||t!==h.length-1}).css(((te={})[ie]=k+"px",te))}if(r.centeredSlides&&r.centeredSlidesBounds){var ne=0;m.forEach(function(e){ne+=e+(r.spaceBetween?r.spaceBetween:0)});var re=(ne-=r.spaceBetween)-s;f=f.map(function(e){return e<0?-g:e>re?re+v:e})}if(r.centerInsufficientSlides){var oe=0;if(m.forEach(function(e){oe+=e+(r.spaceBetween?r.spaceBetween:0)}),(oe-=r.spaceBetween)<s){var se=(s-oe)/2;f.forEach(function(e,t){f[t]=e-se}),p.forEach(function(e,t){p[t]=e+se})}}(0,n.extend)(e,{slides:h,snapGrid:f,slidesGrid:p,slidesSizesGrid:m}),d!==u&&e.emit("slidesLengthChange");f.length!==w&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange"));p.length!==_&&e.emit("slidesGridLengthChange");(r.watchSlidesProgress||r.watchSlidesVisibility)&&e.updateSlidesOffset()};var n=e("../../../utils/utils")},{"../../../utils/utils":396}],371:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){var e,t=this,i=t.slides,n=t.params,r=t.$wrapperEl,o=t.activeIndex,s=t.realIndex,a=t.virtual&&n.virtual.enabled;i.removeClass(n.slideActiveClass+" "+n.slideNextClass+" "+n.slidePrevClass+" "+n.slideDuplicateActiveClass+" "+n.slideDuplicateNextClass+" "+n.slideDuplicatePrevClass),e=a?t.$wrapperEl.find("."+n.slideClass+'[data-swiper-slide-index="'+o+'"]'):i.eq(o);e.addClass(n.slideActiveClass),n.loop&&(e.hasClass(n.slideDuplicateClass)?r.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+s+'"]').addClass(n.slideDuplicateActiveClass):r.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+s+'"]').addClass(n.slideDuplicateActiveClass));var l=e.nextAll("."+n.slideClass).eq(0).addClass(n.slideNextClass);n.loop&&0===l.length&&(l=i.eq(0)).addClass(n.slideNextClass);var c=e.prevAll("."+n.slideClass).eq(0).addClass(n.slidePrevClass);n.loop&&0===c.length&&(c=i.eq(-1)).addClass(n.slidePrevClass);n.loop&&(l.hasClass(n.slideDuplicateClass)?r.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicateNextClass):r.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicateNextClass),c.hasClass(n.slideDuplicateClass)?r.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicatePrevClass):r.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicatePrevClass));t.emitSlidesClasses()}},{}],372:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop}},{}],373:[function(e,t,i){"use strict";i.__esModule=!0,i.default=function(e){void 0===e&&(e=this&&this.translate||0);var t=this,i=t.params,n=t.slides,o=t.rtlTranslate;if(0===n.length)return;void 0===n[0].swiperSlideOffset&&t.updateSlidesOffset();var s=-e;o&&(s=e);n.removeClass(i.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var a=0;a<n.length;a+=1){var l=n[a],c=(s+(i.centeredSlides?t.minTranslate():0)-l.swiperSlideOffset)/(l.swiperSlideSize+i.spaceBetween);if(i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight){var u=-(s-l.swiperSlideOffset),h=u+t.
vendor: 8,663 bytes, line 61
61slidesSizesGrid[a];(u>=0&&u<t.size-1||h>1&&h<=t.size||u<=0&&h>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(a),n.eq(a).addClass(i.slideVisibleClass))}l.progress=o?-c:c}t.visibleSlides=(0,r.default)(t.visibleSlides)};var n,r=(n=e("../../../utils/dom"))&&n.__esModule?n:{default:n}},{"../../../utils/dom":392}],374:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={setTranslate:function(){for(var e=this,t=e.width,i=e.height,n=e.slides,o=e.slidesSizesGrid,s=e.params.coverflowEffect,a=e.isHorizontal(),l=e.translate,c=a?t/2-l:i/2-l,u=a?s.rotate:-s.rotate,h=s.depth,d=0,f=n.length;d<f;d+=1){var p=n.eq(d),m=o[d],g=(c-p[0].swiperSlideOffset-m/2)/m*s.modifier,v=a?u*g:0,b=a?0:u*g,y=-h*Math.abs(g),w=s.stretch;"string"==typeof w&&-1!==w.indexOf("%")&&(w=parseFloat(s.stretch)/100*m);var _=a?0:w*g,k=a?w*g:0,x=1-(1-s.scale)*Math.abs(g);Math.abs(k)<.001&&(k=0),Math.abs(_)<.001&&(_=0),Math.abs(y)<.001&&(y=0),Math.abs(v)<.001&&(v=0),Math.abs(b)<.001&&(b=0),Math.abs(x)<.001&&(x=0);var C="translate3d("+k+"px,"+_+"px,"+y+"px) rotateX("+b+"deg) rotateY("+v+"deg) scale("+x+")";if(p.transform(C),p[0].style.zIndex=1-Math.abs(Math.round(g)),s.slideShadows){var S=a?p.find(".swiper-slide-shadow-left"):p.find(".swiper-slide-shadow-top"),E=a?p.find(".swiper-slide-shadow-right"):p.find(".swiper-slide-shadow-bottom");0===S.length&&(S=(0,r.default)('<div class="swiper-slide-shadow-'+(a?"left":"top")+'"></div>'),p.append(S)),0===E.length&&(E=(0,r.default)('<div class="swiper-slide-shadow-'+(a?"right":"bottom")+'"></div>'),p.append(E)),S.length&&(S[0].style.opacity=g>0?g:0),E.length&&(E[0].style.opacity=-g>0?-g:0)}}},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},l={name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){(0,o.bindModuleMethods)(this,{coverflowEffect:s({},a)})},on:{beforeInit:function(e){"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(e){"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e,t){"coverflow"===e.params.effect&&e.coverflowEffect.setTransition(t)}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],375:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={setTranslate:function(){var e,t=this,i=t.$el,n=t.$wrapperEl,o=t.slides,s=t.width,a=t.height,l=t.rtlTranslate,c=t.size,u=t.browser,h=t.params.cubeEffect,d=t.isHorizontal(),f=t.virtual&&t.params.virtual.enabled,p=0;h.shadow&&(d?(0===(e=n.find(".swiper-cube-shadow")).length&&(e=(0,r.default)('<div class="swiper-cube-shadow"></div>'),n.append(e)),e.css({height:s+"px"})):0===(e=i.find(".swiper-cube-shadow")).length&&(e=(0,r.default)('<div class="swiper-cube-shadow"></div>'),i.append(e)));for(var m=0;m<o.length;m+=1){var g=o.eq(m),v=m;f&&(v=parseInt(g.attr("data-swiper-slide-index"),10));var b=90*v,y=Math.floor(b/360);l&&(b=-b,y=Math.floor(-b/360));var w=Math.max(Math.min(g[0].progress,1),-1),_=0,k=0,x=0;v%4==0?(_=4*-y*c,x=0):(v-1)%4==0?(_=0,x=4*-y*c):(v-2)%4==0?(_=c+4*y*c,x=c):(v-3)%4==0&&(_=-c,x=3*c+4*c*y),l&&(_=-_),d||(k=_,_=0);var C="rotateX("+(d?0:-b)+"deg) rotateY("+(d?b:0)+"deg) translate3d("+_+"px, "+k+"px, "+x+"px)";if(w<=1&&w>-1&&(p=90*v+90*w,l&&(p=90*-v-90*w)),g.transform(C),h.slideShadows){var S=d?g.find(".swiper-slide-shadow-left"):g.find(".swiper-slide-shadow-top"),E=d?g.find(".swiper-slide-shadow-right"):g.find(".swiper-slide-shadow-bottom");0===S.length&&(S=(0,r.default)('<div class="swiper-slide-shadow-'+(d?"left":"top")+'"></div>'),g.append(S)),0===E.length&&(E=(0,r.default)('<div class="swiper-slide-shadow-'+(d?"right":"bottom")+'"></div>'),g.append(E)),S.length&&(S[0].style.opacity=Math.max(-w,0)),E.length&&(E[0].style.opacity=Math.max(w,0))}}if(n.css({"-webkit-transform-origin":"50% 50% -"+c/2+"px","-moz-transform-origin":"50% 50% -"+c/2+"px","-ms-transform-origin":"50% 50% -"+c/2+"px","transform-origin":"50% 50% -"+c/2+"px"}),h.shadow)if(d)e.transform("translate3d(0px, "+(s/2+h.shadowOffset)+"px, "+-s/2+"px) rotateX(90deg) rotateZ(0deg) scale("+h.shadowScale+")");else{var T=Math.abs(p)-90*Math.floor(Math.abs(p)/90),A=1.5-(Math.sin(2*T*Math.PI/360)/2+Math.cos(2*T*Math.PI/360)/2),I=h.shadowScale,M=h.shadowScale/A,P=h.shadowOffset;e.transform("scale3d("+I+", 1, "+M+") translate3d(0px, "+(a/2+P)+"px, "+-a/2/M+"px) rotateX(-90deg)")}var D=u.isSafari||u.isWebView?-c/2:0;n.transform("translate3d(0px,0,"+D+"px) rotateX("+(t.isHorizontal()?0:p)+"deg) rotateY("+(t.isHorizontal()?-p:0)+"deg)")},setTransition:function(e){var t=this,i=t.$el;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&i.find(".swiper-cube-shadow").transition(e)}},l={name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){(0,o.bindModuleMethods)(this,{cubeEffect:s({},a)})},on:{beforeInit:function(e){if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};(0,o.extend)(e.params,t),(0,o.extend)(e.originalParams,t)}},setTranslate:function(e){"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e,t){"cube"===e.params.effect&&e.cubeEffect.setTransition(t)}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],376:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("../../utils/utils");function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(this,arguments)}var o={setTranslate:function(){for(var e=this,t=e.slides,i=0;i<t.length;i+=1){var n=e.slides.eq(i),r=-n[0].swiperSlideOffset;e.params.virtualTranslate||(r-=e.translate);var o=0;e.isHorizontal()||(o=r,r=0);var s=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(n[0].progress),0):1+Math.min(Math.max(n[0].progress,-1),0);n.css({opacity:s}).transform("translate3d("+r+"px, "+o+"px, 0px)")}},setTransition:function(e){var t=this,i=t.slides,n=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var r=!1;i.transitionEnd(function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)n.trigger(e[i])}})}}},s={name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){(0,n.bindModuleMethods)(this,{fadeEffect:r({},o)})},on:{beforeInit:function(e){if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};(0,n.extend)(e.params,t),(0,n.extend)(e.originalParams,t)}},setTranslate:function(e){"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e,t){"fade"===e.params.effect&&e.fadeEffect.setTransition(t)}}};i.default=s},{"../../utils/utils":396}],377:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={setTranslate:function(){for(var e=this,t=e.slides,i=e.rtlTranslate,n=0;n<t.length;n+=1){var o=t.eq(n),s=o[0].progress;e.params.flipEffect.limitRotation&&(s=Math.max(Math.min(o[0].progress,
611),-1));var a=-180*s,l=0,c=-o[0].swiperSlideOffset,u=0;if(e.isHorizontal()?i&&(a=-a):(u=c,c=0,l=-a,a=0),o[0].style.zIndex=-Math.abs(Math.round(s))+t.length,e.params.flipEffect.slideShadows){var h=e.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),d=e.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===h.length&&(h=(0,r.default)('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),o.append(h)),0===d.length&&(d=(0,r.default)('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),o.append(d)),h.length&&(h[0].style.opacity=Math.max(-s,0)),d.length&&(d[0].style.opacity=Math.max(s,0))}o.transform("translate3d("+c+"px, "+u+"px, 0px) rotateX("+l+"deg) rotateY("+a+"deg)")}},setTransition:function(e){var t=this,i=t.slides,n=t.activeIndex,r=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var o=!1;i.eq(n).transitionEnd(function(){if(!o&&t&&!t.destroyed){o=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)r.trigger(e[i])}})}}},l={name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){(0,o.bindModuleMethods)(this,{flipEffect:s({},a)})},on:{beforeInit:function(e){if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};(0,o.extend)(e.params,t),(0,o.extend)(e.originalParams,t)}},setTranslate:function(e){"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e,t){"flip"===e.params.effect&&e.flipEffect.setTransition(t)}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],378:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("ssr-window"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../utils/utils");function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(this,arguments)}var l={onHashChange:function(){var e=this,t=(0,r.getDocument)();e.emit("hashChange");var i=t.location.hash.replace("#","");if(i!==e.slides.eq(e.activeIndex).attr("data-hash")){var n=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+i+'"]').index();if(void 0===n)return;e.slideTo(n)}},setHash:function(){var e=this,t=(0,r.getWindow)(),i=(0,r.getDocument)();if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&t.history&&t.history.replaceState)t.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||""),e.emit("hashSet");else{var n=e.slides.eq(e.activeIndex),o=n.attr("data-hash")||n.attr("data-history");i.location.hash=o||"",e.emit("hashSet")}},init:function(){var e=this,t=(0,r.getDocument)(),i=(0,r.getWindow)();if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var n=t.location.hash.replace("#","");if(n)for(var s=0,a=e.slides.length;s<a;s+=1){var l=e.slides.eq(s);if((l.attr("data-hash")||l.attr("data-history"))===n&&!l.hasClass(e.params.slideDuplicateClass)){var c=l.index();e.slideTo(c,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&(0,o.default)(i).on("hashchange",e.hashNavigation.onHashChange)}},destroy:function(){var e=(0,r.getWindow)();this.params.hashNavigation.watchState&&(0,o.default)(e).off("hashchange",this.hashNavigation.onHashChange)}},c={name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){(0,s.bindModuleMethods)(this,{hashNavigation:a({initialized:!1},l)})},on:{init:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(e){e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}};i.default=c},{"../../utils/dom":392,"../../utils/utils":396,"ssr-window":306}],379:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("ssr-window"),r=e("../../utils/utils");function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}var s={init:function(){var e=this,t=(0,n.getWindow)();
61if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var i=e.history;i.initialized=!0,i.paths=s.getPathValues(e.params.url),(i.paths.key||i.paths.value)&&(i.scrollToSlide(0,i.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=(0,n.getWindow)();this.params.history.replaceState||e.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=s.getPathValues(e.params.url),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(e){var t=(0,n.getWindow)(),i=(e?new URL(e):t.location).pathname.slice(1).split("/").filter(function(e){return""!==e}),r=i.length;return{key:i[r-2],value:i[r-1]}},setHistory:function(e,t){var i=this,r=(0,n.getWindow)();if(i.history.initialized&&i.params.history.enabled){var o;o=i.params.url?new URL(i.params.url):r.location;var a=i.slides.eq(t),l=s.slugify(a.attr("data-history"));if(i.params.history.root.length>0){var c=i.params.history.root;"/"===c[c.length-1]&&(c=c.slice(0,c.length-1)),l=c+"/"+e+"/"+l}else o.pathname.includes(e)||(l=e+"/"+l);var u=r.history.state;u&&u.value===l||(i.params.history.replaceState?r.history.replaceState({value:l},null,l):r.history.pushState({value:l},null,l))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){var n=this;if(t)for(var r=0,o=n.slides.length;r<o;r+=1){var a=n.slides.eq(r);if(s.slugify(a.attr("data-history"))===t&&!a.hasClass(n.params.slideDuplicateClass)){var l=a.index();n.slideTo(l,e,i)}}else n.slideTo(0,e,i)}},a={name:"history",params:{history:{enabled:!1,root:"",replaceState:!1,key:"slides"}},create:function(){(0,r.bindModuleMethods)(this,{history:o({},s)})},on:{init:function(e){e.params.history.enabled&&e.history.init()},destroy:function(e){e.params.history.enabled&&e.history.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(e){e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}};i.default=a},{"../../utils/utils":396,"ssr-window":306}],380:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("ssr-window"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../utils/utils");function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(this,arguments)}var l={handle:function(e){var t=this;if(t.enabled){var i=(0,r.getWindow)(),n=(0,r.getDocument)(),o=t.rtlTranslate,s=e;s.originalEvent&&(s=s.originalEvent);var a=s.keyCode||s.charCode,l=t.params.keyboard.pageUpDown,c=l&&33===a,u=l&&34===a,h=37===a,d=39===a,f=38===a,p=40===a;if(!t.allowSlideNext&&(t.isHorizontal()&&d||t.isVertical()&&p||u))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&h||t.isVertical()&&f||c))return!1;if(!(s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||n.activeElement&&n.activeElement.nodeName&&("input"===n.activeElement.nodeName.toLowerCase()||"textarea"===n.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(c||u||h||d||f||p)){var m=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var g=t.$el,v=g[0].clientWidth,b=g[0].clientHeight,y=i.innerWidth,w=i.innerHeight,_=t.$el.offset();o&&(_.left-=t.$el[0].scrollLeft);for(var k=[[_.left,_.top],[_.left+v,_.top],[_.left,_.top+b],[_.left+v,_.top+b]],x=0;x<k.length;x+=1){var C=k[x];if(C[0]>=0&&C[0]<=y&&C[1]>=0&&C[1]<=w){if(0===C[0]&&0===C[1])continue;m=!0}}if(!m)return}t.isHorizontal()?((c||u||h||d)&&(s.preventDefault?s.preventDefault():s.returnValue=!1),((u||d)&&!o||(c||h)&&o)&&t.slideNext(),((c||h)&&!o||(u||d)&&o)&&t.slidePrev()):((c||u||f||p)&&(s.preventDefault?s.preventDefault():s.returnValue=!1),(u||p)&&t.slideNext(),(c||f)&&t.slidePrev()),t.emit("keyPress",a)}}},enable:function(){var e=this,t=(0,r.getDocument)();e.keyboard.enabled||((0,o.default)(t).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this,t=(0,r.getDocument)();e.keyboard.enabled&&((0,o.default)(t).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},c={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){(0,s.bindModuleMethods)(this,{keyboard:a({enabled:!1},l)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}};i.default=c},{"../../utils/dom":392,"../../utils/utils":396,"ssr-window":306}],381:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("ssr-window"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../utils/utils");function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(this,arguments)}var l={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,n=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var r=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),s=r.find("."+n.elementClass+":not(."+n.loadedClass+"):not(."+n.loadingClass+")");!r.hasClass(n.elementClass)||r.hasClass(n.loadedClass)||r.hasClass(n.loadingClass)||s.push(r[0]),0!==s.length&&s.each(function(e){var s=(0,o.default)(e);s.addClass(n.loadingClass);var a=s.attr("data-background"),l=s.attr("data-src"),c=s.attr("data-srcset"),u=s.attr("data-sizes"),h=s.parent("picture");i.loadImage(s[0],l||a,c,u,!1,function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){
61if(a?(s.css("background-image",'url("'+a+'")'),s.removeAttr("data-background")):(c&&(s.attr("srcset",c),s.removeAttr("data-srcset")),u&&(s.attr("sizes",u),s.removeAttr("data-sizes")),h.length&&h.children("source").each(function(e){var t=(0,o.default)(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))}),l&&(s.attr("src",l),s.removeAttr("data-src"))),s.addClass(n.loadedClass).removeClass(n.loadingClass),r.find("."+n.preloaderClass).remove(),i.params.loop&&t){var e=r.attr("data-swiper-slide-index");if(r.hasClass(i.params.slideDuplicateClass)){var d=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(d.index(),!1)}else{var f=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(f.index(),!1)}}i.emit("lazyImageReady",r[0],s[0]),i.params.autoHeight&&i.updateAutoHeight()}}),i.emit("lazyImageLoad",r[0],s[0])})}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,n=e.slides,r=e.activeIndex,s=e.virtual&&i.virtual.enabled,a=i.lazy,l=i.slidesPerView;function c(e){if(s){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(n[e])return!0;return!1}function u(e){return s?(0,o.default)(e).attr("data-swiper-slide-index"):(0,o.default)(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each(function(t){var i=s?(0,o.default)(t).attr("data-swiper-slide-index"):(0,o.default)(t).index();e.lazy.loadInSlide(i)});else if(l>1)for(var h=r;h<r+l;h+=1)c(h)&&e.lazy.loadInSlide(h);else e.lazy.loadInSlide(r);if(a.loadPrevNext)if(l>1||a.loadPrevNextAmount&&a.loadPrevNextAmount>1){for(var d=a.loadPrevNextAmount,f=l,p=Math.min(r+f+Math.max(d,f),n.length),m=Math.max(r-Math.max(f,d),0),g=r+l;g<p;g+=1)c(g)&&e.lazy.loadInSlide(g);for(var v=m;v<r;v+=1)c(v)&&e.lazy.loadInSlide(v)}else{var b=t.children("."+i.slideNextClass);b.length>0&&e.lazy.loadInSlide(u(b));var y=t.children("."+i.slidePrevClass);y.length>0&&e.lazy.loadInSlide(u(y))}},checkInViewOnLoad:function(){var e=(0,r.getWindow)(),t=this;if(t&&!t.destroyed){var i=t.params.lazy.scrollingElement?(0,o.default)(t.params.lazy.scrollingElement):(0,o.default)(e),n=i[0]===e,s=n?e.innerWidth:i[0].offsetWidth,a=n?e.innerHeight:i[0].offsetHeight,l=t.$el.offset(),c=!1;t.rtlTranslate&&(l.left-=t.$el[0].scrollLeft);for(var u=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]],h=0;h<u.length;h+=1){var d=u[h];if(d[0]>=0&&d[0]<=s&&d[1]>=0&&d[1]<=a){if(0===d[0]&&0===d[1])continue;c=!0}}
vendor: 10,039 bytes, line 61
61var f=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};c?(t.lazy.load(),i.off("scroll",t.lazy.checkInViewOnLoad,f)):t.lazy.scrollHandlerAttached||(t.lazy.scrollHandlerAttached=!0,i.on("scroll",t.lazy.checkInViewOnLoad,f))}}},c={name:"lazy",params:{lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){(0,s.bindModuleMethods)(this,{lazy:a({initialImageLoaded:!1},l)})},on:{beforeInit:function(e){e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(e){e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&(e.params.lazy.checkInView?e.lazy.checkInViewOnLoad():e.lazy.load())},scroll:function(e){e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},"scrollbarDragMove resize _freeModeNoMomentumRelease":function(e){e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(e){e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(e){e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(e){var t=e.params,i=t.lazy,n=t.cssMode,r=t.watchSlidesVisibility,o=t.watchSlidesProgress,s=t.touchReleaseOnEdges,a=t.resistanceRatio;i.enabled&&(n||(r||o)&&(s||0===a))&&e.lazy.load()}}};i.default=c},{"../../utils/dom":392,"../../utils/utils":396,"ssr-window":306}],382:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("ssr-window"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../utils/utils");var a={lastScrollTime:(0,s.now)(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return(0,r.getWindow)().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=(0,r.getDocument)(),t="onwheel",i=t in e;if(!i){var n=e.createElement("div");n.setAttribute(t,"return;"),i="function"==typeof n[t]}return!i&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(i=e.implementation.hasFeature("Events.wheel","3.0")),i}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,n=0,r=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),n=10*t,r=10*i,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(n=e.deltaX),e.shiftKey&&!n&&(n=r,r=0),(n||r)&&e.deltaMode&&(1===e.deltaMode?(n*=40,r*=40):(n*=800,r*=800)),n&&!t&&(t=n<1?-1:1),r&&!i&&(i=r<1?-1:1),{spinX:t,spinY:i,pixelX:n,pixelY:r}},handleMouseEnter:function(){this.enabled&&(this.mouseEntered=!0)},handleMouseLeave:function(){this.enabled&&(this.mouseEntered=!1)},handle:function(e){var t=e,i=this;if(i.enabled){var n=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var r=i.$el;if("container"!==i.params.mousewheel.eventsTarget&&(r=(0,o.default)(i.params.mousewheel.eventsTarget)),!i.mouseEntered&&!r[0].contains(t.target)&&!n.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var l=0,c=i.rtlTranslate?-1:1,u=a.normalize(t);if(n.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(u.pixelX)>Math.abs(u.pixelY)))return!0;l=-u.pixelX*c}else{if(!(Math.abs(u.pixelY)>Math.abs(u.pixelX)))return!0;l=-u.pixelY}else l=Math.abs(u.pixelX)>Math.abs(u.pixelY)?-u.pixelX*c:-u.pixelY;if(0===l)return!0;n.invert&&(l=-l);var h=i.getTranslate()+l*n.sensitivity;if(h>=i.minTranslate()&&(h=i.minTranslate()),h<=i.maxTranslate()&&(h=i.maxTranslate()),(!!i.params.loop||!(h===i.minTranslate()||h===i.maxTranslate()))&&i.params.nested&&t.stopPropagation(),i.params.freeMode){var d={time:(0,s.now)(),delta:Math.abs(l),direction:Math.sign(l)},f=i.mousewheel.lastEventBeforeSnap,p=f&&d.time<f.time+500&&d.delta<=f.delta&&d.direction===f.direction;if(!p){i.mousewheel.lastEventBeforeSnap=void 0,i.params.loop&&i.loopFix();var m=i.getTranslate()+l*n.sensitivity,g=i.isBeginning,v=i.isEnd;if(m>=i.minTranslate()&&(m=i.minTranslate()),m<=i.maxTranslate()&&(m=i.maxTranslate()),i.setTransition(0),i.setTranslate(m),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!g&&i.isBeginning||!v&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var b=i.mousewheel.recentWheelEvents;b.length>=15&&b.shift();var y=b.length?b[b.length-1]:void 0,w=b[0];if(b.push(d),y&&(d.delta>y.delta||d.direction!==y.direction))b.splice(0);else if(b.length>=15&&d.time-w.time<500&&w.delta-d.delta>=1&&d.delta<=6){var _=l>0?.8:.2;i.mousewheel.lastEventBeforeSnap=d,b.splice(0),i.mousewheel.timeout=(0,s.nextTick)(function(){i.slideToClosest(i.params.speed,!0,void 0,_)},0)}i.mousewheel.timeout||(i.mousewheel.timeout=(0,s.nextTick)(function(){i.mousewheel.lastEventBeforeSnap=d,b.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)},500))}if(p||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),m===i.minTranslate()||m===i.maxTranslate())return!0}}else{var k={time:(0,s.now)(),delta:Math.abs(l),direction:Math.sign(l),raw:e},x=i.mousewheel.recentWheelEvents;x.length>=2&&x.shift();var C=x.length?x[x.length-1]:void 0;if(x.push(k),C?(k.direction!==C.direction||k.delta>C.delta||k.time>C.time+150)&&i.mousewheel.animateSlider(k):i.mousewheel.animateSlider(k),i.mousewheel.releaseScroll(k))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1}},animateSlider:function(e){var t=this,i=(0,r.getWindow)();return!(this.params.mousewheel.thresholdDelta&&e.delta<this.params.mousewheel.thresholdDelta)&&(!(this.params.mousewheel.thresholdTime&&(0,s.now)()-t.mousewheel.lastScrollTime<this.params.mousewheel.thresholdTime)&&(e.delta>=6&&(0,s.now)()-t.mousewheel.lastScrollTime<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new i.Date).getTime(),!1)))},releaseScroll:function(e){var t=this,i=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&i.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&i.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=a.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(i=(0,o.default)(e.params.mousewheel.eventsTarget)),i.on("mouseenter",e.mousewheel.handleMouseEnter),i.on("mouseleave",e.mousewheel.handleMouseLeave),i.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=a.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(i=(0,o.default)(e.params.mousewheel.eventsTarget)),i.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},l={name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}},create:function(){(0,s.bindModuleMethods)(this,{mousewheel:{enabled:!1,lastScrollTime:(0,s.now)(),lastEventBeforeSnap:void 0,recentWheelEvents:[],enable:a.enable,disable:a.disable,handle:a.handle,handleMouseEnter:a.handleMouseEnter,handleMouseLeave:a.handleMouseLeave,animateSlider:a.animateSlider,releaseScroll:a.releaseScroll}})},on:{init:function(e){!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(e){e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.mousewheel.disable()}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396,"ssr-window":306}],383:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={toggleEl:function(e,t){e[t?"addClass":"removeClass"](this.params.navigation.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=t)},update:function(){var e=this,t=e.params.navigation,i=e.navigation.toggleEl;if(!e.params.loop){var n=e.navigation,r=n.$nextEl,o=n.$prevEl;o&&o.length>0&&(e.isBeginning?i(o,!0):i(o,!1),e.params.watchOverflow&&e.enabled&&o[e.isLocked?"addClass":"removeClass"](t.lockClass)),r&&r.length>0&&(e.isEnd?i(r,!0):i(r,!1),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,i=this,n=i.params.navigation;(i.params.navigation=(0,o.createElementIfNotDefined)(i.$el,i.params.navigation,i.params.createElements,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),n.nextEl||n.prevEl)&&(n.nextEl&&(e=(0,r.default)(n.nextEl),i.params.uniqueNavElements&&"string"==typeof n.nextEl&&e.length>1&&1===i.$el.find(n.nextEl).length&&(e=i.$el.find(n.nextEl))),n.prevEl&&(t=(0,r.default)(n.prevEl),i.params.uniqueNavElements&&"string"==typeof n.prevEl&&t.length>1&&1===i.$el.find(n.prevEl).length&&(t=i.$el.find(n.prevEl))),e&&e.length>0&&e.on("click",i.navigation.onNextClick),t&&t.length>0&&t.on("click",i.navigation.onPrevClick),(0,o.extend)(i.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}),i.enabled||(e&&e.addClass(n.lockClass),t&&t.addClass(n.lockClass)))},destroy:function(){var e=this,t=e.navigation,i=t.$nextEl,n=t.$prevEl;
vendor: 4,706 bytes, line 61
61i&&i.length&&(i.off("click",e.navigation.onNextClick),i.removeClass(e.params.navigation.disabledClass)),n&&n.length&&(n.off("click",e.navigation.onPrevClick),n.removeClass(e.params.navigation.disabledClass))}},l={name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){(0,o.bindModuleMethods)(this,{navigation:s({},a)})},on:{init:function(e){e.navigation.init(),e.navigation.update()},toEdge:function(e){e.navigation.update()},fromEdge:function(e){e.navigation.update()},destroy:function(e){e.navigation.destroy()},"enable disable":function(e){var t=e.navigation,i=t.$nextEl,n=t.$prevEl;i&&i[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),n&&n[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)},click:function(e,t){var i=e.navigation,n=i.$nextEl,o=i.$prevEl,s=t.target;if(e.params.navigation.hideOnClick&&!(0,r.default)(s).is(o)&&!(0,r.default)(s).is(n)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===s||e.pagination.el.contains(s)))return;var a;n?a=n.hasClass(e.params.navigation.hiddenClass):o&&(a=o.hasClass(e.params.navigation.hiddenClass)),!0===a?e.emit("navigationShow"):e.emit("navigationHide"),n&&n.toggleClass(e.params.navigation.hiddenClass),o&&o.toggleClass(e.params.navigation.hiddenClass)}}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],384:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={update:function(){var e=this,t=e.rtl,i=e.params.pagination;if(i.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var n,s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,a=e.pagination.$el,l=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((n=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>s-1-2*e.loopedSlides&&(n-=s-2*e.loopedSlides),n>l-1&&(n-=l),n<0&&"bullets"!==e.params.paginationType&&(n=l+n)):n=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var c,u,h,d=e.pagination.bullets;if(i.dynamicBullets&&(e.pagination.bulletSize=d.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(i.dynamicMainBullets+4)+"px"),i.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=n-e.previousIndex,e.pagination.dynamicBulletIndex>i.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=i.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),c=n-e.pagination.dynamicBulletIndex,h=((u=c+(Math.min(d.length,i.dynamicMainBullets)-1))+c)/2),d.removeClass(i.bulletActiveClass+" "+i.bulletActiveClass+"-next "+i.bulletActiveClass+"-next-next "+i.bulletActiveClass+"-prev "+i.bulletActiveClass+"-prev-prev "+i.bulletActiveClass+"-main"),a.length>1)d.each(function(e){var t=(0,r.default)(e),o=t.index();o===n&&t.addClass(i.bulletActiveClass),i.dynamicBullets&&(o>=c&&o<=u&&t.addClass(i.bulletActiveClass+"-main"),o===c&&t.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),o===u&&t.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next"))});else{var f=d.eq(n),p=f.index();if(f.addClass(i.bulletActiveClass),i.dynamicBullets){for(var m=d.eq(c),g=d.eq(u),v=c;v<=u;v+=1)d.eq(v).addClass(i.bulletActiveClass+"-main");if(e.params.loop)if(p>=d.length-i.dynamicMainBullets){for(var b=i.dynamicMainBullets;b>=0;b-=1)d.eq(d.length-b).addClass(i.bulletActiveClass+"-main");d.eq(d.length-i.dynamicMainBullets-1).addClass(i.bulletActiveClass+"-prev")}else m.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),g.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next");else m.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),g.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next")}}if(i.dynamicBullets){var y=Math.min(d.length,i.dynamicMainBullets+4),w=(e.pagination.bulletSize*y-e.pagination.bulletSize)/2-h*e.pagination.bulletSize,_=t?"right":"left";d.css(e.isHorizontal()?_:"top",w+"px")}}
61if("fraction"===i.type&&(a.find((0,o.classesToSelector)(i.currentClass)).text(i.formatFractionCurrent(n+1)),a.find((0,o.classesToSelector)(i.totalClass)).text(i.formatFractionTotal(l))),"progressbar"===i.type){var k;k=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var x=(n+1)/l,C=1,S=1;"horizontal"===k?C=x:S=x,a.find((0,o.classesToSelector)(i.progressbarFillClass)).transform("translate3d(0,0,0) scaleX("+C+") scaleY("+S+")").transition(e.params.speed)}"custom"===i.type&&i.renderCustom?(a.html(i.renderCustom(e,n+1,l)),e.emit("paginationRender",a[0])):e.emit("paginationUpdate",a[0]),e.params.watchOverflow&&e.enabled&&a[e.isLocked?"addClass":"removeClass"](i.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,n=e.pagination.$el,r="";if("bullets"===t.type){var s=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&!e.params.loop&&s>i&&(s=i);for(var a=0;a<s;a+=1)t.renderBullet?r+=t.renderBullet.call(e,a,t.bulletClass):r+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";n.html(r),e.pagination.bullets=n.find((0,o.classesToSelector)(t.bulletClass))}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',n.html(r)),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',n.html(r)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e=this;e.params.pagination=(0,o.createElementIfNotDefined)(e.$el,e.params.pagination,e.params.createElements,{el:"swiper-pagination"});var t=e.params.pagination;if(t.el){var i=(0,r.default)(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click",(0,o.classesToSelector)(t.bulletClass),function(t){t.preventDefault();var i=(0,r.default)(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)}),(0,o.extend)(e.pagination,{$el:i,el:i[0]}),e.enabled||i.addClass(t.lockClass))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i=e.pagination.$el;i.removeClass(t.hiddenClass),i.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&i.off("click",(0,o.classesToSelector)(t.bulletClass))}}},l={name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){(0,o.bindModuleMethods)(this,{pagination:s({dynamicBulletIndex:0},a)})},on:{init:function(e){e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(e){(e.params.loop||void 0===e.snapIndex)&&e.pagination.update()},snapIndexChange:function(e){e.params.loop||e.pagination.update()},slidesLengthChange:function(e){e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(e){e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(e){e.pagination.destroy()},"enable disable":function(e){var t=e.pagination.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)},click:function(e,t){var i=t.target;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&e.pagination.$el.length>0&&!(0,r.default)(i).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&i===e.navigation.nextEl||e.navigation.prevEl&&i===e.navigation.prevEl))return;!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.params.pagination.hiddenClass)}}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],385:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={setTransform:function(e,t){var i=this.rtl,n=(0,r.default)(e),o=i?-1:1,s=n.attr("data-swiper-parallax")||"0",a=n.attr("data-swiper-parallax-x"),l=n.attr("data-swiper-parallax-y"),c=n.attr("data-swiper-parallax-scale"),u=n.attr("data-swiper-parallax-opacity");if(a||l?(a=a||"0",l=l||"0"):this.isHorizontal()?(a=s,l="0"):(l=s,a="0"),a=a.indexOf("%")>=0?parseInt(a,10)*t*o+"%":a*t*o+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=u){var h=u-(u-1)*(1-Math.abs(t));n[0].style.opacity=h}if(null==c)n.transform("translate3d("+a+", "+l+", 0px)");else{var d=c-(c-1)*(1-Math.abs(t));n.transform("translate3d("+a+", "+l+", 0px) scale("+d+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,n=e.progress,o=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(t){e.parallax.setTransform(t,n)}),i.each(function(t,i){var s=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(s+=Math.ceil(i/2)-n*(o.length-1)),s=Math.min(Math.max(s,-1),1),(0,r.default)(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(t){e.parallax.setTransform(t,s)})})},setTransition:function(e){void 0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(t){var i=(0,r.default)(t),n=parseInt(i.attr("data-swiper-parallax-duration"),10)||e;0===e&&(n=0),i.transition(n)})}},l={name:"parallax",params:{parallax:{enabled:!1}},create:function(){(0,o.bindModuleMethods)(this,{parallax:s({},a)})},on:{beforeInit:function(e){e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e,t){e.params.parallax.enabled&&e.parallax.setTransition(t)}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],386:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("ssr-window"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../utils/utils");function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(this,arguments)}var l={setTranslate:function(){var e=this;
vendor: 4,257 bytes, line 61
61if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=e.rtlTranslate,n=e.progress,r=t.dragSize,o=t.trackSize,s=t.$dragEl,a=t.$el,l=e.params.scrollbar,c=r,u=(o-r)*n;i?(u=-u)>0?(c=r-u,u=0):-u+r>o&&(c=o+u):u<0?(c=r+u,u=0):u+r>o&&(c=o-u),e.isHorizontal()?(s.transform("translate3d("+u+"px, 0, 0)"),s[0].style.width=c+"px"):(s.transform("translate3d(0px, "+u+"px, 0)"),s[0].style.height=c+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),a[0].style.opacity=1,e.scrollbar.timeout=setTimeout(function(){a[0].style.opacity=0,a.transition(400)},1e3))}},setTransition:function(e){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=t.$dragEl,n=t.$el;i[0].style.width="",i[0].style.height="";var r,o=e.isHorizontal()?n[0].offsetWidth:n[0].offsetHeight,a=e.size/e.virtualSize,l=a*(o/e.size);r="auto"===e.params.scrollbar.dragSize?o*a:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?i[0].style.width=r+"px":i[0].style.height=r+"px",n[0].style.display=a>=1?"none":"",e.params.scrollbar.hide&&(n[0].style.opacity=0),(0,s.extend)(t,{trackSize:o,divider:a,moveDivider:l,dragSize:r}),e.params.watchOverflow&&e.enabled&&t.$el[e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this,n=i.scrollbar,r=i.rtlTranslate,o=n.$el,s=n.dragSize,a=n.trackSize,l=n.dragStartPos;t=(n.getPointerPosition(e)-o.offset()[i.isHorizontal()?"left":"top"]-(null!==l?l:s/2))/(a-s),t=Math.max(Math.min(t,1),0),r&&(t=1-t);var c=i.minTranslate()+(i.maxTranslate()-i.minTranslate())*t;i.updateProgress(c),i.setTranslate(c),i.updateActiveIndex(),i.updateSlidesClasses()},onDragStart:function(e){var t=this,i=t.params.scrollbar,n=t.scrollbar,r=t.$wrapperEl,o=n.$el,s=n.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===s[0]||e.target===s?n.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),r.transition(100),s.transition(100),n.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),o.transition(0),i.hide&&o.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,i=t.scrollbar,n=t.$wrapperEl,r=i.$el,o=i.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,i.setDragPosition(e),n.transition(0),r.transition(0),o.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,i=t.params.scrollbar,n=t.scrollbar,r=t.$wrapperEl,o=n.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),r.transition("")),i.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=(0,s.nextTick)(function(){o.css("opacity",0),o.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),i.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=(0,r.getDocument)(),i=e.scrollbar,n=e.touchEventsTouch,o=e.touchEventsDesktop,s=e.params,a=e.support,l=i.$el[0],c=!(!a.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},u=!(!a.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};l&&(a.touch?(l.addEventListener(n.start,e.scrollbar.onDragStart,c),l.addEventListener(n.move,e.scrollbar.onDragMove,c),l.addEventListener(n.end,e.scrollbar.onDragEnd,u)):(l.addEventListener(o.start,e.scrollbar.onDragStart,c),t.addEventListener(o.move,e.scrollbar.onDragMove,c),t.addEventListener(o.end,e.scrollbar.onDragEnd,u)))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=(0,r.getDocument)(),i=e.scrollbar,n=e.touchEventsTouch,o=e.touchEventsDesktop,s=e.params,a=e.support,l=i.$el[0],c=!(!a.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},u=!(!a.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};l&&(a.touch?(l.removeEventListener(n.start,e.scrollbar.onDragStart,c),l.removeEventListener(n.move,e.
61scrollbar.onDragMove,c),l.removeEventListener(n.end,e.scrollbar.onDragEnd,u)):(l.removeEventListener(o.start,e.scrollbar.onDragStart,c),t.removeEventListener(o.move,e.scrollbar.onDragMove,c),t.removeEventListener(o.end,e.scrollbar.onDragEnd,u)))}},init:function(){var e=this,t=e.scrollbar,i=e.$el;e.params.scrollbar=(0,s.createElementIfNotDefined)(i,e.params.scrollbar,e.params.createElements,{el:"swiper-scrollbar"});var n=e.params.scrollbar;if(n.el){var r=(0,o.default)(n.el);e.params.uniqueNavElements&&"string"==typeof n.el&&r.length>1&&1===i.find(n.el).length&&(r=i.find(n.el));var a=r.find("."+e.params.scrollbar.dragClass);0===a.length&&(a=(0,o.default)('<div class="'+e.params.scrollbar.dragClass+'"></div>'),r.append(a)),(0,s.extend)(t,{$el:r,el:r[0],$dragEl:a,dragEl:a[0]}),n.draggable&&t.enableDraggable(),r&&r[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}},destroy:function(){this.scrollbar.disableDraggable()}},c={name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){(0,s.bindModuleMethods)(this,{scrollbar:a({isTouched:!1,timeout:null,dragTimeout:null},l)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},"enable disable":function(e){var t=e.scrollbar.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)},destroy:function(e){e.scrollbar.destroy()}}};i.default=c},{"../../utils/dom":392,"../../utils/utils":396,"ssr-window":306}],387:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("../../utils/utils"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n};function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={init:function(){var e=this,t=e.params.thumbs;if(e.thumbs.initialized)return!1;e.thumbs.initialized=!0;var i=e.constructor;return t.swiper instanceof i?(e.thumbs.swiper=t.swiper,(0,r.extend)(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),(0,r.extend)(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):(0,r.isObject)(t.swiper)&&(e.thumbs.swiper=new i((0,r.extend)({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick),!0},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var i=t.clickedIndex,n=t.clickedSlide;if(!(n&&(0,o.default)(n).hasClass(e.params.thumbs.slideThumbActiveClass)||null==i)){var r;if(r=t.params.loop?parseInt((0,o.default)(t.clickedSlide).attr("data-swiper-slide-index"),10):i,e.params.loop){var s=e.activeIndex;e.slides.eq(s).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,s=e.activeIndex);var a=e.slides.eq(s).prevAll('[data-swiper-slide-index="'+r+'"]').eq(0).index(),l=e.slides.eq(s).nextAll('[data-swiper-slide-index="'+r+'"]').eq(0).index();r=void 0===a?l:void 0===l?a:l-s<s-a?l:a}e.slideTo(r)}}},update:function(e){var t=this,i=t.thumbs.swiper;if(i){var n="auto"===i.params.slidesPerView?i.slidesPerViewDynamic():i.params.slidesPerView,r=t.params.thumbs.autoScrollOffset,o=r&&!i.params.loop;if(t.realIndex!==i.realIndex||o){var s,a,l=i.activeIndex;if(i.params.loop){i.slides.eq(l).hasClass(i.params.slideDuplicateClass)&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,l=i.activeIndex);var c=i.slides.eq(l).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),u=i.slides.eq(l).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();s=void 0===c?u:void 0===u?c:u-l===l-c?i.params.slidesPerGroup>1?u:l:u-l<l-c?u:c,a=t.activeIndex>t.previousIndex?"next":"prev"}else a=(s=t.realIndex)>t.previousIndex?"next":"prev";o&&(s+="next"===a?r:-1*r),i.visibleSlidesIndexes&&i.visibleSlidesIndexes.indexOf(s)<0&&(i.params.centeredSlides?s=s>l?s-Math.floor(n/2)+1:s+Math.floor(n/2)-1:s>l&&i.params.slidesPerGroup,i.slideTo(s,e?0:void 0))}var h=1,d=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(h=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(h=1),h=Math.floor(h),i.slides.removeClass(d),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(var f=0;f<h;f+=1)i.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+f)+'"]').addClass(d);else for(var p=0;p<h;p+=1)i.slides.eq(t.realIndex+p).addClass(d)}}},l={name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){(0,r.bindModuleMethods)(this,{thumbs:s({swiper:null,initialized:!1},a)})},on:{beforeInit:function(e){var t=e.params.thumbs;t&&t.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(e){e.thumbs.swiper&&e.thumbs.update()},update:function(e){e.thumbs.swiper&&e.thumbs.update()},resize:function(e){e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(e){e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e,t){var i=e.thumbs.swiper;i&&i.setTransition(t)},beforeDestroy:function(e){var t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],388:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},o=e("../../utils/utils");function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(this,arguments)}var a={update:function(e){var t=this,i=t.params,n=i.slidesPerView,r=i.slidesPerGroup,s=i.centeredSlides,a=t.params.virtual,l=a.addSlidesBefore,c=a.addSlidesAfter,u=t.virtual,h=u.from,d=u.to,f=u.slides,p=u.slidesGrid,m=u.renderSlide,g=u.offset;t.updateActiveIndex();var v,b,y,w=t.activeIndex||0;v=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",s?(b=Math.floor(n/2)+r+c,y=Math.floor(n/2)+r+l):(b=n+(r-1)+c,y=r+l);var _=Math.max((w||0)-y,0),k=Math.min((w||0)+b,f.length-1),x=(t.slidesGrid[_]||
vendor: 9,361 bytes, line 61
610)-(t.slidesGrid[0]||0);function C(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if((0,o.extend)(t.virtual,{from:_,to:k,offset:x,slidesGrid:t.slidesGrid}),h===_&&d===k&&!e)return t.slidesGrid!==p&&x!==g&&t.slides.css(v,x+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:x,from:_,to:k,slides:function(){for(var e=[],t=_;t<=k;t+=1)e.push(f[t]);return e}()}),void(t.params.virtual.renderExternalUpdate&&C());var S=[],E=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var T=h;T<=d;T+=1)(T<_||T>k)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+T+'"]').remove();for(var A=0;A<f.length;A+=1)A>=_&&A<=k&&(void 0===d||e?E.push(A):(A>d&&E.push(A),A<h&&S.push(A)));E.forEach(function(e){t.$wrapperEl.append(m(f[e],e))}),S.sort(function(e,t){return t-e}).forEach(function(e){t.$wrapperEl.prepend(m(f[e],e))}),t.$wrapperEl.children(".swiper-slide").css(v,x+"px"),C()},renderSlide:function(e,t){var i=this,n=i.params.virtual;if(n.cache&&i.virtual.cache[t])return i.virtual.cache[t];var o=n.renderSlide?(0,r.default)(n.renderSlide.call(i,e,t)):(0,r.default)('<div class="'+i.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return o.attr("data-swiper-slide-index")||o.attr("data-swiper-slide-index",t),n.cache&&(i.virtual.cache[t]=o),o},appendSlide:function(e){var t=this;if("object"==typeof e&&"length"in e)for(var i=0;i<e.length;i+=1)e[i]&&t.virtual.slides.push(e[i]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide:function(e){var t=this,i=t.activeIndex,n=i+1,r=1;if(Array.isArray(e)){for(var o=0;o<e.length;o+=1)e[o]&&t.virtual.slides.unshift(e[o]);n=i+e.length,r=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var s=t.virtual.cache,a={};Object.keys(s).forEach(function(e){var t=s[e],i=t.attr("data-swiper-slide-index");i&&t.attr("data-swiper-slide-index",parseInt(i,10)+1),a[parseInt(e,10)+r]=t}),t.virtual.cache=a}t.virtual.update(!0),t.slideTo(n,0)},removeSlide:function(e){var t=this;if(null!=e){var i=t.activeIndex;if(Array.isArray(e))for(var n=e.length-1;n>=0;n-=1)t.virtual.slides.splice(e[n],1),t.params.virtual.cache&&delete t.virtual.cache[e[n]],e[n]<i&&(i-=1),i=Math.max(i,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<i&&(i-=1),i=Math.max(i,0);t.virtual.update(!0),t.slideTo(i,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},l={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}},create:function(){(0,o.bindModuleMethods)(this,{virtual:s({},a,{slides:this.params.virtual.slides,cache:{}})})},on:{beforeInit:function(e){if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};(0,o.extend)(e.params,t),(0,o.extend)(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(e){e.params.virtual.enabled&&e.virtual.update()}}};i.default=l},{"../../utils/dom":392,"../../utils/utils":396}],389:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=e("ssr-window"),o=(n=e("../../utils/dom"))&&n.__esModule?n:{default:n},s=e("../../utils/utils");function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(this,arguments)}var l={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,n=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(n-t,2)+Math.pow(r-i,2))},onGestureStart:function(e){var t=this,i=t.support,n=t.params.zoom,r=t.zoom,s=r.gesture;if(r.fakeGestureTouched=!1,r.fakeGestureMoved=!1,!i.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;r.fakeGestureTouched=!0,s.scaleStart=l.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=(0,o.default)(e.target).closest("."+t.params.slideClass),0===s.$slideEl.length&&(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),s.$imageWrapEl=s.$imageEl.parent("."+n.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||n.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl&&s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this,i=t.support,n=t.params.zoom,r=t.zoom,o=r.gesture;if(!i.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;r.fakeGestureMoved=!0,o.scaleMove=l.getDistanceBetweenTouches(e)}o.$imageEl&&0!==o.$imageEl.length?(i.gestures?r.scale=e.scale*r.currentScale:r.scale=o.scaleMove/o.scaleStart*r.currentScale,r.scale>o.maxRatio&&(r.scale=o.maxRatio-1+Math.pow(r.scale-o.maxRatio+1,.5)),r.scale<n.minRatio&&(r.scale=n.minRatio+1-Math.pow(n.minRatio-r.scale+1,.5)),o.$imageEl.transform("translate3d(0,0,0) scale("+r.scale+")")):"gesturechange"===e.type&&r.onGestureStart(e)},onGestureEnd:function(e){var t=this,i=t.device,n=t.support,r=t.params.zoom,o=t.zoom,s=o.gesture;if(!n.gestures){if(!o.fakeGestureTouched||!o.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!i.android)return;o.fakeGestureTouched=!1,o.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(o.scale=Math.max(Math.min(o.scale,s.maxRatio),r.minRatio),s.$imageEl.transition(t.params.speed).transform("translate3d(0,0,0) scale("+o.scale+")"),o.currentScale=o.scale,o.isScaling=!1,1===o.scale&&(s.$slideEl=void 0))},onTouchStart:function(e){var t=this.device,i=this.zoom,n=i.gesture,r=i.image;n.$imageEl&&0!==n.$imageEl.length&&(r.isTouched||(t.android&&e.cancelable&&e.preventDefault(),r.isTouched=!0,r.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,r.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,i=t.zoom,n=i.gesture,r=i.image,o=i.velocity;if(n.$imageEl&&0!==n.$imageEl.length&&(t.allowClick=!1,r.isTouched&&n.$slideEl)){r.isMoved||(r.width=n.$imageEl[0].offsetWidth,r.height=n.$imageEl[0].offsetHeight,r.startX=(0,s.getTranslate)(n.$imageWrapEl[0],"x")||0,r.startY=(0,s.getTranslate)(n.$imageWrapEl[0],"y")||0,n.slideWidth=n.$slideEl[0].offsetWidth,n.slideHeight=n.$slideEl[0].offsetHeight,n.$imageWrapEl.transition(0));var a=r.width*i.scale,l=r.height*i.scale;if(!(a<n.slideWidth&&l<n.slideHeight)){if(r.minX=Math.min(n.slideWidth/2-a/2,0),r.maxX=-r.minX,r.minY=Math.min(n.slideHeight/2-l/2,0),r.maxY=-r.minY,r.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,r.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!r.isMoved&&!i.isScaling){if(t.isHorizontal()&&(Math.floor(r.minX)===Math.floor(r.startX)&&r.touchesCurrent.x<r.touchesStart.x||Math.floor(r.maxX)===Math.floor(r.startX)&&r.touchesCurrent.x>r.touchesStart.x))return void(r.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(r.minY)===Math.floor(r.startY)&&r.touchesCurrent.y<r.touchesStart.y||Math.floor(r.maxY)===Math.floor(r.startY)&&r.touchesCurrent.y>r.touchesStart.y))return void(r.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),r.isMoved=!0,r.currentX=r.touchesCurrent.x-r.touchesStart.x+r.startX,r.currentY=r.touchesCurrent.y-r.touchesStart.y+r.startY,r.currentX<r.minX&&(r.currentX=r.minX+1-Math.pow(r.minX-r.currentX+1,.8)),r.currentX>r.maxX&&(r.currentX=r.maxX-1+Math.pow(r.currentX-r.maxX+1,.8)),r.currentY<r.minY&&(r.currentY=r.minY+1-Math.pow(r.minY-r.currentY+1,.8)),r.currentY>r.maxY&&(r.currentY=r.maxY-1+Math.pow(r.currentY-r.maxY+1,.8)),o.prevPositionX||(o.prevPositionX=r.touchesCurrent.x),o.prevPositionY||(o.prevPositionY=r.touchesCurrent.y),o.prevTime||(o.prevTime=Date.now()),o.x=(r.touchesCurrent.x-o.prevPositionX)/(Date.now()-o.prevTime)/2,o.y=(r.touchesCurrent.y-o.prevPositionY)/(Date.now()-o.prevTime)/2,Math.abs(r.touchesCurrent.x-o.prevPositionX)<2&&(o.x=0),Math.abs(r.touchesCurrent.y-o.prevPositionY)<2&&(o.y=0),o.prevPositionX=r.touchesCurrent.x,o.prevPositionY=r.touchesCurrent.y,o.prevTime=Date.now(),n.$imageWrapEl.transform("translate3d("+r.currentX+"px, "+r.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,i=e.image,n=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var r=300,o=300,s=n.x*r,a=i.currentX+s,l=n.y*o,c=i.currentY+l;0!==n.x&&(r=Math.abs((a-i.currentX)/n.x)),0!==n.y&&(o=Math.abs((c-i.currentY)/n.y));var u=Math.max(r,o);i.currentX=a,i.currentY=c;var h=i.width*e.scale,d=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-h/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-d/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(u).transform("translate3d("+i.currentX+"px, "+i.currentY+"px,0)")}},onTransitionEnd:function(){var e=this,t=e.zoom,i=t.gesture;i.$slideEl&&e.previousIndex!==e.activeIndex&&(i.$imageEl&&i.$imageEl.transform("translate3d(0,
610,0) scale(1)"),i.$imageWrapEl&&i.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,i.$slideEl=void 0,i.$imageEl=void 0,i.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,n,s,a,l,c,u,h,d,f,p,m,g,v,b,y=this,w=(0,r.getWindow)(),_=y.zoom,k=y.params.zoom,x=_.gesture,C=_.image;(x.$slideEl||(e&&e.target&&(x.$slideEl=(0,o.default)(e.target).closest("."+y.params.slideClass)),x.$slideEl||(y.params.virtual&&y.params.virtual.enabled&&y.virtual?x.$slideEl=y.$wrapperEl.children("."+y.params.slideActiveClass):x.$slideEl=y.slides.eq(y.activeIndex)),x.$imageEl=x.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),x.$imageWrapEl=x.$imageEl.parent("."+k.containerClass)),x.$imageEl&&0!==x.$imageEl.length&&x.$imageWrapEl&&0!==x.$imageWrapEl.length)&&(x.$slideEl.addClass(""+k.zoomedSlideClass),void 0===C.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=C.touchesStart.x,i=C.touchesStart.y),_.scale=x.$imageWrapEl.attr("data-swiper-zoom")||k.maxRatio,_.currentScale=x.$imageWrapEl.attr("data-swiper-zoom")||k.maxRatio,e?(v=x.$slideEl[0].offsetWidth,b=x.$slideEl[0].offsetHeight,n=x.$slideEl.offset().left+w.scrollX+v/2-t,s=x.$slideEl.offset().top+w.scrollY+b/2-i,c=x.$imageEl[0].offsetWidth,u=x.$imageEl[0].offsetHeight,h=c*_.scale,d=u*_.scale,m=-(f=Math.min(v/2-h/2,0)),g=-(p=Math.min(b/2-d/2,0)),(a=n*_.scale)<f&&(a=f),a>m&&(a=m),(l=s*_.scale)<p&&(l=p),l>g&&(l=g)):(a=0,l=0),x.$imageWrapEl.transition(300).transform("translate3d("+a+"px, "+l+"px,0)"),x.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+_.scale+")"))},out:function(){var e=this,t=e.zoom,i=e.params.zoom,n=t.gesture;n.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?n.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):n.$slideEl=e.slides.eq(e.activeIndex),n.$imageEl=n.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),n.$imageWrapEl=n.$imageEl.parent("."+i.containerClass)),n.$imageEl&&0!==n.$imageEl.length&&n.$imageWrapEl&&0!==n.$imageWrapEl.length&&(t.scale=1,t.currentScale=1,n.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),n.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),n.$slideEl.removeClass(""+i.zoomedSlideClass),n.$slideEl=void 0)},toggleGestures:function(e){var t=this,i=t.zoom,n=i.slideSelector,r=i.passiveListener;t.$wrapperEl[e]("gesturestart",n,i.onGestureStart,r),t.$wrapperEl[e]("gesturechange",n,i.onGestureChange,r),t.$wrapperEl[e]("gestureend",n,i.onGestureEnd,r)},enableGestures:function(){this.zoom.gesturesEnabled||(this.zoom.gesturesEnabled=!0,this.zoom.toggleGestures("on"))},disableGestures:function(){this.zoom.gesturesEnabled&&(this.zoom.gesturesEnabled=!1,this.zoom.toggleGestures("off"))},enable:function(){var e=this,t=e.support,i=e.zoom;if(!i.enabled){i.enabled=!0;var n=!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!t.passiveListener||{passive:!1,capture:!0},o="."+e.params.slideClass;e.zoom.passiveListener=n,e.zoom.slideSelector=o,t.gestures?(e.$wrapperEl.on(e.touchEvents.start,e.zoom.enableGestures,n),e.$wrapperEl.on(e.touchEvents.end,e.zoom.disableGestures,n)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,o,i.onGestureStart,n),e.$wrapperEl.on(e.touchEvents.move,o,i.onGestureChange,r),e.$wrapperEl.on(e.touchEvents.end,o,i.onGestureEnd,n),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,o,i.onGestureEnd,n)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,i.onTouchMove,r)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){var i=e.support;e.zoom.enabled=!1;var n=!("touchstart"!==e.touchEvents.start||!i.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!i.passiveListener||{passive:!1,capture:!0},o="."+e.params.slideClass;i.gestures?(e.$wrapperEl.off(e.touchEvents.start,e.zoom.enableGestures,n),e.$wrapperEl.off(e.touchEvents.end,e.zoom.disableGestures,n)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,o,t.onGestureStart,n),e.$wrapperEl.off(e.touchEvents.move,o,t.onGestureChange,r),e.$wrapperEl.off(e.touchEvents.end,o,t.onGestureEnd,n),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,o,t.onGestureEnd,n)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,r)}}},c={name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this;
61(0,s.bindModuleMethods)(e,{zoom:a({enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}},l)});var t=1;Object.defineProperty(e.zoom,"scale",{get:function(){return t},set:function(i){if(t!==i){var n=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,r=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",i,n,r)}t=i}})},on:{init:function(e){e.params.zoom.enabled&&e.zoom.enable()},destroy:function(e){e.zoom.disable()},touchStart:function(e,t){e.zoom.enabled&&e.zoom.onTouchStart(t)},touchEnd:function(e,t){e.zoom.enabled&&e.zoom.onTouchEnd(t)},doubleTap:function(e,t){!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&e.zoom.toggle(t)},transitionEnd:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}};i.default=c},{"../../utils/dom":392,"../../utils/utils":396,"ssr-window":306}],390:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("ssr-window"),r=e("../../utils/utils");function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}var s={attach:function(e,t){void 0===t&&(t={});var i=(0,n.getWindow)(),r=this,o=new(i.MutationObserver||i.WebkitMutationObserver)(function(e){if(1!==e.length){var t=function(){r.emit("observerUpdate",e[0])};i.requestAnimationFrame?i.requestAnimationFrame(t):i.setTimeout(t,0)}else r.emit("observerUpdate",e[0])});o.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),r.observer.observers.push(o)},init:function(){var e=this;if(e.support.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),i=0;i<t.length;i+=1)e.observer.attach(t[i]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},a={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){(0,r.bindModuleMethods)(this,{observer:o({},s,{observers:[]})})},on:{init:function(e){e.observer.init()},destroy:function(e){e.observer.destroy()}}};i.default=a},{"../../utils/utils":396,"ssr-window":306}],391:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("ssr-window"),r=e("../../utils/utils"),o={name:"resize",create:function(){var e=this;(0,r.extend)(e,{resize:{observer:null,createObserver:function(){e&&!e.destroyed&&e.initialized&&(e.resize.observer=new ResizeObserver(function(t){var i=e.width,n=e.height,r=i,o=n;t.forEach(function(t){var i=t.contentBoxSize,n=t.contentRect,s=t.target;s&&s!==e.el||(r=n?n.width:(i[0]||i).inlineSize,o=n?n.height:(i[0]||i).blockSize)}),r===i&&o===n||e.resize.resizeHandler()}),e.resize.observer.observe(e.el))},removeObserver:function(){e.resize.observer&&e.resize.observer.unobserve&&e.el&&(e.resize.observer.unobserve(e.el),e.resize.observer=null)},resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(e){var t=(0,n.getWindow)();e.params.resizeObserver&&void 0!==(0,n.getWindow)().ResizeObserver?e.resize.createObserver():(t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler))},destroy:function(e){var t=(0,n.getWindow)();e.resize.removeObserver(),t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}};i.default=o},{"../../utils/utils":396,"ssr-window":306}],392:[function(e,t,i){"use strict";i.__esModule=!0,i.default=void 0;var n=e("dom7"),r={addClass:n.addClass,removeClass:n.removeClass,hasClass:n.hasClass,toggleClass:n.toggleClass,attr:n.attr,removeAttr:n.removeAttr,transform:n.transform,transition:n.transition,on:n.on,off:n.off,trigger:n.trigger,transitionEnd:n.transitionEnd,outerWidth:n.outerWidth,outerHeight:n.outerHeight,styles:n.styles,offset:n.offset,css:n.css,each:n.each,html:n.html,text:n.text,is:n.is,index:n.index,eq:n.eq,append:n.append,prepend:n.prepend,next:n.next,nextAll:n.nextAll,prev:n.prev,prevAll:n.prevAll,parent:n.parent,parents:n.parents,closest:n.closest,find:n.find,children:n.children,filter:n.filter,remove:n.remove};Object.keys(r).forEach(function(e){Object.defineProperty(n.$.fn,e,{value:r[e],writable:!0})});var o=n.$;i.default=o},{dom7:193}],393:[function(e,t,i){"use strict";i.__esModule=!0,i.getBrowser=function(){n||(n=function(){var e=(0,r.getWindow)();function t(){var t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}return{isEdge:!!e.navigator.userAgent.match(/Edge/g),isSafari:t(),isWebView:/(iPhone|iPod|iPad).*AppleWeb
61Kit(?!.*Safari)/i.test(e.navigator.userAgent)}}());return n};var n,r=e("ssr-window")},{"ssr-window":306}],394:[function(e,t,i){"use strict";i.__esModule=!0,i.getDevice=function(e){void 0===e&&(e={});n||(n=function(e){var t=(void 0===e?{}:e).userAgent,i=(0,o.getSupport)(),n=(0,r.getWindow)(),s=n.navigator.platform,a=t||n.navigator.userAgent,l={ios:!1,android:!1},c=n.screen.width,u=n.screen.height,h=a.match(/(Android);?[\s\/]+([\d.]+)?/),d=a.match(/(iPad).*OS\s([\d_]+)/),f=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===s,g="MacIntel"===s,v=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];!d&&g&&i.touch&&v.indexOf(c+"x"+u)>=0&&((d=a.match(/(Version)\/([\d.]+)/))||(d=[0,1,"13_0_0"]),g=!1);h&&!m&&(l.os="android",l.android=!0);(d||p||f)&&(l.os="ios",l.ios=!0);return l}(e));return n};var n,r=e("ssr-window"),o=e("./get-support")},{"./get-support":395,"ssr-window":306}],395:[function(e,t,i){"use strict";i.__esModule=!0,i.getSupport=function(){n||(n=function(){var e=(0,r.getWindow)(),t=(0,r.getDocument)();return{touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),pointerEvents:!!e.PointerEvent&&"maxTouchPoints"in e.navigator&&e.navigator.maxTouchPoints>=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,i)}catch(e){}return t}(),gestures:"ongesturestart"in e}}());return n};var n,r=e("ssr-window")},{"ssr-window":306}],396:[function(e,t,i){"use strict";i.__esModule=!0,i.deleteProps=function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},i.nextTick=function(e,t){void 0===t&&(t=0);return setTimeout(e,t)},i.now=function(){return Date.now()},i.getTranslate=function(e,t){void 0===t&&(t="x");var i,o,s,a=(0,n.getWindow)(),l=r(e);a.WebKitCSSMatrix?((o=l.transform||l.webkitTransform).split(",").length>6&&(o=o.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),s=new a.WebKitCSSMatrix("none"===o?"":o)):i=(s=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(",");"x"===t&&(o=a.WebKitCSSMatrix?s.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4]));"y"===t&&(o=a.WebKitCSSMatrix?s.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5]));return o||0},i.isObject=o,i.extend=function e(){for(var t=Object(arguments.length<=0?void 0:arguments[0]),i=["__proto__","constructor","prototype"],n=1;n<arguments.length;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&!s(r))for(var a=Object.keys(Object(r)).filter(function(e){return i.indexOf(e)<0}),l=0,c=a.length;l<c;l+=1){var u=a[l],h=Object.getOwnPropertyDescriptor(r,u);void 0!==h&&h.enumerable&&(o(t[u])&&o(r[u])?r[u].__swiper__?t[u]=r[u]:e(t[u],r[u]):!o(t[u])&&o(r[u])?(t[u]={},r[u].__swiper__?t[u]=r[u]:e(t[u],r[u])):t[u]=r[u])}}return t},i.bindModuleMethods=function(e,t){Object.keys(t).forEach(function(i){o(t[i])&&Object.keys(t[i]).forEach(function(n){"function"==typeof t[i][n]&&(t[i][n]=t[i][n].bind(e))}),e[i]=t[i]})},i.getComputedStyle=r,i.classesToSelector=function(e){void 0===e&&(e="");return"."+e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")},i.createElementIfNotDefined=function(e,t,i,r){var o=(0,n.getDocument)();i&&Object.keys(r).forEach(function(i){if(!t[i]&&!0===t.auto){var n=o.createElement("div");n.className=r[i],e.append(n),t[i]=n}});return t};var n=e("ssr-window");function r(e){var t,i=(0,n.getWindow)();return i.getComputedStyle&&(t=i.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}function o(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function s(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}},{"ssr-window":306}],397:[function(e,t,i){"use strict";i.__esModule=!0,i.default=e("./cjs/components/core/core-class").default,i.Swiper=e("./cjs/components/core/core-class").default,i.Virtual=e("./cjs/components/virtual/virtual").default,i.Keyboard=e("./cjs/components/keyboard/keyboard").default,i.Mousewheel=e("./cjs/components/mousewheel/mousewheel").default,i.Navigation=e("./cjs/components/navigation/navigation").default,i.Pagination=e("./cjs/components/pagination/pagination").default,i.Scrollbar=e("./cjs/components/scrollbar/scrollbar").default,i.Parallax=e("./cjs/components/parallax/parallax").default,i.Zoom=e("./cjs/components/zoom/zoom").default,i.Lazy=e("./cjs/components/lazy/lazy").default,i.Controller=e("./cjs/components/controller/controller").default,i.A11y=e("./cjs/components/
61a11y/a11y").default,i.History=e("./cjs/components/history/history").default,i.HashNavigation=e("./cjs/components/hash-navigation/hash-navigation").default,i.Autoplay=e("./cjs/components/autoplay/autoplay").default,i.EffectFade=e("./cjs/components/effect-fade/effect-fade").default,i.EffectCube=e("./cjs/components/effect-cube/effect-cube").default,i.EffectFlip=e("./cjs/components/effect-flip/effect-flip").default,i.EffectCoverflow=e("./cjs/components/effect-coverflow/effect-coverflow").default,i.Thumbs=e("./cjs/components/thumbs/thumbs").default},{"./cjs/components/a11y/a11y":309,"./cjs/components/autoplay/autoplay":310,"./cjs/components/controller/controller":311,"./cjs/components/core/core-class":319,"./cjs/components/effect-coverflow/effect-coverflow":374,"./cjs/components/effect-cube/effect-cube":375,"./cjs/components/effect-fade/effect-fade":376,"./cjs/components/effect-flip/effect-flip":377,"./cjs/components/hash-navigation/hash-navigation":378,"./cjs/components/history/history":379,"./cjs/components/keyboard/keyboard":380,"./cjs/components/lazy/lazy":381,"./cjs/components/mousewheel/mousewheel":382,"./cjs/components/navigation/navigation":383,"./cjs/components/pagination/pagination":384,"./cjs/components/parallax/parallax":385,"./cjs/components/scrollbar/scrollbar":386,"./cjs/components/thumbs/thumbs":387,"./cjs/components/virtual/virtual":388,"./cjs/components/zoom/zoom":389}],398:[function(e,t,i){(function(t,n){(function(){var r=e("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,a={},l=0;function c(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i.setImmediate="function"==typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,r(function(){a[t]&&(n?e.apply(null,n):e.call(null),i.clearImmediate(t))}),t},i.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":269,timers:398}],399:[function(e,t,i){ 62/*! 63 * TOAST UI Color Picker 64 * @version 2.2.8 65 * @author NHN Cloud FE Development Team <[email protected]> 66 * @license MIT 67 */ 68var n,r;n=window,r=function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="dist",i(i.s=33)}([function(e,t,i){"use strict";e.exports=function(e,t){var i,n,r,o,s=Object.prototype.hasOwnProperty;for(r=1,o=arguments.length;r<o;r+=1)for(n in i=arguments[r])s.call(i,n)&&(e[n]=i[n]);return e}},function(e,t,i){"use strict";e.exports=function(e){return e instanceof Array}},function(e,t,i){"use strict";var n=i(1),r=i(6),o=i(7);e.exports=function(e,t,i){n(e)?r(e,t,i):o(e,t,i)}},function(e,t,i){"use strict";e.exports=function(e){return void 0===e}},function(e,t,i){"use strict";var n=i(22),r=i(2),o=i(6),s=i(7),a=i(37),l=0,c={getLength:function(e){var t=0;return s(e,function(){t+=1}),t},map:function(e,t,i){var n=[];return r(e,function(){n.push(t.apply(i||null,arguments))}),n},filter:function(e,t,i){var n=[];return o(e,function(e){t.apply(i||null,arguments)&&n.push(e)}),n},generateId:function(){return l+=1},isOldBrowser:n.msie&&n.version<9,sendHostName:function(){a("color-picker","UA-129987462-1")}};e.exports=c},function(e,t,i){"use strict";var n=i(1);e.exports=function(e,t,i){var r,o;
68if(i=i||0,!n(t))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,i);for(o=t.length,r=i;i>=0&&r<o;r+=1)if(t[r]===e)return r;return-1}},function(e,t,i){"use strict";e.exports=function(e,t,i){var n=0,r=e.length;for(i=i||null;n<r&&!1!==t.call(i,e[n],n,e);n+=1);}},function(e,t,i){"use strict";e.exports=function(e,t,i){var n;for(n in i=i||null,e)if(e.hasOwnProperty(n)&&!1===t.call(i,e[n],n,e))break}},function(e,t,i){"use strict";var n=i(39),r=i(13),o=i(41),s=i(3),a=i(9),l=i(19),c=i(4);function u(e,t){var i=c.generateId();e=e||{},s(t)&&(t=a.appendHTMLElement("div")),n(t,"tui-view-"+i),this.id=i,this.container=t,this.childs=new l(function(e){return e.id}),this.parent=null}u.prototype.addChild=function(e,t){t&&t.call(e,this),e.parent=this,this.childs.add(e)},u.prototype.removeChild=function(e,t){var i=o(e)?this.childs.items[e]:e;t&&t.call(i,this),this.childs.remove(i.id)},u.prototype.render=function(){this.childs.each(function(e){e.render()})},u.prototype.recursive=function(e,t){r(e)&&(t||e(this),this.childs.each(function(t){t.recursive(e)}))},u.prototype.resize=function(){for(var e=Array.prototype.slice.call(arguments),t=this.parent;t;)r(t._onResize)&&t._onResize.apply(t,e),t=t.parent},u.prototype._beforeDestroy=function(){},u.prototype._destroy=function(){this._beforeDestroy(),this.container.innerHTML="",this.id=this.parent=this.childs=this.container=null},u.prototype.destroy=function(e){this.childs&&(this.childs.each(function(e){e.destroy(!0),e._destroy()}),this.childs.clear()),e||this._destroy()},u.prototype.getViewBound=function(){var e=this.container.getBoundingClientRect();return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}},e.exports=u},function(e,t,i){"use strict";var n={appendHTMLElement:function(e,t,i){var n=document.createElement(e);return n.className=i||"",t?t.appendChild(n):document.body.appendChild(n),n}};e.exports=n},function(e,t,i){"use strict";var n=i(0),r=i(20),o=i(11),s=i(21),a=i(1),l=i(13),c=i(2),u=/\s+/g;function h(){this.events=null,this.contexts=null}h.mixin=function(e){n(e.prototype,h.prototype)},h.prototype._getHandlerItem=function(e,t){var i={handler:e};return t&&(i.context=t),i},h.prototype._safeEvent=function(e){var t,i=this.events;return i||(i=this.events={}),e&&((t=i[e])||(t=[],i[e]=t),i=t),i},h.prototype._safeContext=function(){var e=this.contexts;return e||(e=this.contexts=[]),e},h.prototype._indexOfContext=function(e){for(var t=this._safeContext(),i=0;t[i];){if(e===t[i][0])return i;i+=1}return-1},h.prototype._memorizeContext=function(e){var t,i;r(e)&&(t=this._safeContext(),(i=this._indexOfContext(e))>-1?t[i][1]+=1:t.push([e,1]))},h.prototype._forgetContext=function(e){var t,i;r(e)&&(t=this._safeContext(),(i=this._indexOfContext(e))>-1&&(t[i][1]-=1,t[i][1]<=0&&t.splice(i,1)))},h.prototype._bindEvent=function(e,t,i){var n=this._safeEvent(e);this._memorizeContext(i),n.push(this._getHandlerItem(t,i))},h.prototype.on=function(e,t,i){var n=this;o(e)?(e=e.split(u),c(e,function(e){n._bindEvent(e,t,i)})):s(e)&&(i=t,c(e,function(e,t){n.on(t,e,i)}))},h.prototype.once=function(e,t,i){var n=this;if(s(e))return i=t,void c(e,function(e,t){n.once(t,e,i)});this.on(e,function r(){t.apply(i,arguments),n.off(e,r,i)},i)},h.prototype._spliceMatches=function(e,t){var i,n=0;if(a(e))for(i=e.length;n<i;n+=1)!0===t(e[n])&&(e.splice(n,1),i-=1,n-=1)},h.prototype._matchHandler=function(e){var t=this;return function(i){var n=e===i.handler;return n&&t._forgetContext(i.context),n}},h.prototype._matchContext=function(e){var t=this;return function(i){var n=e===i.context;return n&&t._forgetContext(i.context),n}},h.prototype._matchHandlerAndContext=function(e,t){var i=this;return function(n){var r=e===n.handler,o=t===n.context,s=r&&o;return s&&i._forgetContext(n.context),s}},h.prototype._offByEventName=function(e,t){var i=this,n=l(t),r=i._matchHandler(t);e=e.split(u),c(e,function(e){var t=i._safeEvent(e);n?i._spliceMatches(t,r):(c(t,function(e){i._forgetContext(e.context)}),i.events[e]=[])})},h.prototype._offByHandler=function(e){var t=this,i=this._matchHandler(e);c(this._safeEvent(),function(e){t._spliceMatches(e,i)})},h.prototype._offByObject=function(e,t){var i,n=this;this._indexOfContext(e)<0?c(e,function(e,t){n.off(t,e)}):o(t)?(i=this._matchContext(e),n._spliceMatches(this._safeEvent(t),i)):l(t)?(i=this._matchHandlerAndContext(t,e),c(this._safeEvent(),function(e){n._spliceMatches(e,i)})):(i=this._matchContext(e),c(this._safeEvent(),function(e){n._spliceMatches(e,i)}))},h.prototype.off=function(e,t){o(e)?this._offByEventName(e,t):arguments.length?l(e)?this._offByHandler(e):s(e)&&this._offByObject(e,t):(this.events={},this.contexts=[])},h.prototype.fire=function(e){this.invoke.apply(this,arguments)},h.prototype.invoke=function(e){var t,i,n,r;if(!this.hasListener(e))return!0;for(t=this._safeEvent(e),i=Array.prototype.slice.call(arguments,1
68),n=0;t[n];){if(!1===(r=t[n]).handler.apply(r.context,i))return!1;n+=1}return!0},h.prototype.hasListener=function(e){return this.getListenerLength(e)>0},h.prototype.getListenerLength=function(e){return this._safeEvent(e).length},e.exports=h},function(e,t,i){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},function(e,t,i){"use strict";var n=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,r={leadingZero:function(e,t){var i="",n=0;if((e+"").length>t)return e+"";for(;n<t-1;n+=1)i+="0";return(i+e).slice(-1*t)},isValidRGB:function(e){return n.test(e)}, 69// @license RGB <-> HSV conversion utilities based off of http://www.cs.rit.edu/~ncs/color/t_convert.html 70hexToRGB:function(e){return!!r.isValidRGB(e)&&(e=e.substring(1),[parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16),parseInt(e.substr(4,2),16)])},rgbToHEX:function(e,t,i){var n="#"+r.leadingZero(e.toString(16),2)+r.leadingZero(t.toString(16),2)+r.leadingZero(i.toString(16),2);return!!r.isValidRGB(n)&&n},rgbToHSV:function(e,t,i){var n,r,o,s,a,l;if(e/=255,t/=255,i/=255,a=n=Math.max(e,t,i),l=n-(r=Math.min(e,t,i)),s=0===n?0:l/n,n===r)o=0;else{switch(n){case e:o=(t-i)/l+(t<i?6:0);break;case t:o=(i-e)/l+2;break;case i:o=(e-t)/l+4}o/=6}return[Math.round(360*o),Math.round(100*s),Math.round(100*a)]},hsvToRGB:function(e,t,i){var n,r,o,s,a,l,c,u;if(e=Math.max(0,Math.min(360,e)),t=Math.max(0,Math.min(100,t)),i=Math.max(0,Math.min(100,i)),i/=100,0==(t/=100))return n=r=o=i,[Math.round(255*n),Math.round(255*r),Math.round(255*o)];switch(l=i*(1-t),c=i*(1-t*(a=(e/=60)-(s=Math.floor(e)))),u=i*(1-t*(1-a)),s){case 0:n=i,r=u,o=l;break;case 1:n=c,r=i,o=l;break;case 2:n=l,r=i,o=u;break;case 3:n=l,r=c,o=i;break;case 4:n=u,r=l,o=i;break;default:n=i,r=l,o=c}return[Math.round(255*n),Math.round(255*r),Math.round(255*o)]}};e.exports=r},function(e,t,i){"use strict";e.exports=function(e){return e instanceof Function}},function(e,t,i){"use strict";var n=i(11),r=i(2),o=i(26);function s(e,t,i,n){function s(t){i.call(n||e,t||window.event)}"addEventListener"in e?e.addEventListener(t,s):"attachEvent"in e&&e.attachEvent("on"+t,s),function(e,t,i,n){var s=o(e,t),a=!1;r(s,function(e){return e.handler!==i||(a=!0,!1)}),a||s.push({handler:i,wrappedHandler:n})}(e,t,i,s)}e.exports=function(e,t,i,o){n(t)?r(t.split(/\s+/g),function(t){s(e,t,i,o)}):r(t,function(t,n){s(e,n,t,i)})}},function(e,t,i){"use strict";e.exports=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}},function(e,t,i){"use strict";e.exports=function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}},function(e,t,i){"use strict";var n=i(11),r=i(2),o=i(26);function s(e,t,i){var n,s=o(e,t);i?(r(s,function(r,o){return i!==r.handler||(a(e,t,r.wrappedHandler),n=o,!1)}),s.splice(n,1)):(r(s,function(i){a(e,t,i.wrappedHandler)}),s.splice(0,s.length))}function a(e,t,i){"removeEventListener"in e?e.removeEventListener(t,i):"detachEvent"in e&&e.detachEvent("on"+t,i)}e.exports=function(e,t,i){n(t)?r(t.split(/\s+/g),function(t){s(e,t,i)}):r(t,function(t,i){s(e,i,t)})}},function(e,t,i){"use strict";var n=i(50);e.exports=function(e,t){var i=n(t.prototype);i.constructor=e,e.prototype=i}},function(e,t,i){"use strict";var n=i(6),r=i(7),o=i(0),s=i(1),a=i(20),l=i(13),c=i(21),u=i(4),h=Array.prototype.slice;function d(e){this.items={},this.length=0,l(e)&&(this.getItemID=e)}d.and=function(e){var t;return e=h.call(arguments),t=e.length,function(i){for(var n=0;n<t;n+=1)if(!e[n].call(null,i))return!1;return!0}},d.or=function(e){var t;return e=h.call(arguments),t=e.length,function(i){for(var n=1,r=e[0].call(null,i);n<t;n+=1)r=r||e[n].call(null,i);return r}},d.merge=function(e){var t={},i=new d(e.getItemID);return n(arguments,function(e){o(t,e.items)}),i.items=t,i.length=u.getLength(i.items),i},d.prototype.getItemID=function(e){return e._id+""},d.prototype.add=function(e){var t,i;arguments.length>1?n(h.call(arguments),function(e){this.add(e)},this):(t=this.getItemID(e),(i=this.items)[t]||(this.length+=1),i[t]=e)},d.prototype.remove=function(e){var t,i,n=[];return this.length?arguments.length>1?(n=u.map(h.call(arguments),function(e){return this.remove(e)},this),n):(t=this.items,c(e)&&(e=this.getItemID(e)),t[e]?(this.length-=1,i=t[e],delete t[e],i):n):n},d.prototype.clear=function(){this.items={},this.length=0},d.prototype.has=function(e){var t,i;return!!this.length&&(t=l(e),i=!1,t?this.each(function(t){return!0!==e(t)||(i=!0,!1)}):(e=c(e)?this.getItemID(e):e,i=a(this.items[e])),i)},d.prototype.doWhenHas=function(e,t,i){var n=this.items[e];a(n)&&t.call(i||this,n)},d.prototype.find=function(e){var t=new d;return this.hasOwnProperty("getItemID")&&(t.getItemID=this.getItemID),this.each(function(i){!0===e(i)&&t.add(i)}),t},d.prototype.groupBy=function(e,t){var i,r,o={},a=l(e),c=this.getItemID;if(s(e)){if(n(e,function(e){o[e+""]=new d(c)}),!t)return o;e=t,a=!0}return this.each(function(t){a?r=e(t):(r=t[e],l(r)&&(r=r.apply(t))),(i=o[r])||(i=o[r]=new d(c)),i.add(t)}),o},d.prototype.single=function(){var e;return this.each(function(t){return e=t,!1},this),e},d.prototype.sort=function(e){var t=[];return this.each(function(e){t.push(e)}
70),l(e)&&(t=t.sort(e)),t},d.prototype.each=function(e,t){r(this.items,e,t||this)},d.prototype.toArray=function(){return this.length?u.map(this.items,function(e){return e}):[]},e.exports=d},function(e,t,i){"use strict";var n=i(3),r=i(36);e.exports=function(e){return!n(e)&&!r(e)}},function(e,t,i){"use strict";e.exports=function(e){return e===Object(e)}},function(e,t,i){"use strict";var n,r,o,s,a,l,c,u,h,d,f={chrome:!1,firefox:!1,safari:!1,msie:!1,edge:!1,others:!1,version:0};"undefined"!=typeof window&&window.navigator&&(o=window.navigator,s=o.appName.replace(/\s/g,"_"),a=o.userAgent,l=/MSIE\s([0-9]+[.0-9]*)/,c=/Trident.*rv:11\./,u=/Edge\/(\d+)\./,h={firefox:/Firefox\/(\d+)\./,chrome:/Chrome\/(\d+)\./,safari:/Version\/([\d.]+).*Safari\/(\d+)/},(d={Microsoft_Internet_Explorer:function(){var e=a.match(l);e?(f.msie=!0,f.version=parseFloat(e[1])):f.others=!0},Netscape:function(){var e=!1;if(c.exec(a))f.msie=!0,f.version=11,e=!0;else if(u.exec(a))f.edge=!0,f.version=a.match(u)[1],e=!0;else for(n in h)if(h.hasOwnProperty(n)&&(r=a.match(h[n]))&&r.length>1){f[n]=e=!0,f.version=parseFloat(r[1]||0);break}e||(f.others=!0)}})[s]&&d[s]()),e.exports=f},function(e,t,i){"use strict";var n=i(3);e.exports=function(e){return e&&e.className?n(e.className.baseVal)?e.className:e.className.baseVal:""}},function(e,t,i){"use strict";(function(t){var n=i(10),r=i(42),o=i(44),s=i(47),a=i(28),l=i(17),c=i(14),u=i(15),h=i(0);function d(e,t){c(t,"mousedown",this._onMouseDown,this),this.options=h({distance:10},e),this.container=t,this._isMoved=!1,this._distance=0,this._dragStartFired=!1,this._dragStartEventData=null}d.prototype.destroy=function(){l(this.container,"mousedown",this._onMouseDown),this.options=this.container=this._isMoved=this._distance=this._dragStartFired=this._dragStartEventData=null},d.prototype._toggleDragEvent=function(e){var i=this.container;e?(r(i),c(window,"dragstart",u),c(t.document,{mousemove:this._onMouseMove,mouseup:this._onMouseUp},this)):(o(i),l(window,"dragstart",u),l(t.document,{mousemove:this._onMouseMove,mouseup:this._onMouseUp}))},d.prototype._getEventData=function(e){return{target:a(e),originEvent:e}},d.prototype._onMouseDown=function(e){0===s(e)&&(this._distance=0,this._dragStartFired=!1,this._dragStartEventData=this._getEventData(e),this._toggleDragEvent(!0))},d.prototype._onMouseMove=function(e){var t=this.options.distance;u(e),this._isMoved=!0,this._distance<t?this._distance+=1:this._dragStartFired||(this._dragStartFired=!0,this.invoke("dragStart",this._dragStartEventData))?this.fire("drag",this._getEventData(e)):this._toggleDragEvent(!1)},d.prototype._onMouseUp=function(e){if(this._toggleDragEvent(!1),this._isMoved)return this._isMoved=!1,void this.fire("dragEnd",this._getEventData(e));this.fire("click",this._getEventData(e))},n.mixin(d),e.exports=d}).call(this,i(25))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";var n="_feEventKey";e.exports=function(e,t){var i,r=e[n];return r||(r=e[n]={}),(i=r[t])||(i=r[t]=[]),i}},function(e,t,i){"use strict";e.exports=function(e){var t,i,n=document.documentElement.style;for(t=0,i=e.length;t<i;t+=1)if(e[t]in n)return e[t];return!1}},function(e,t,i){"use strict";e.exports=function(e){return e.target||e.srcElement}},function(e,t,i){"use strict";var n=i(10),r=i(28),o=i(17),s=i(14),a=i(30),l=i(0),c=i(18),u=i(9),h=i(12),d=i(8),f=i(51);function p(e,t){this.options=l({cssPrefix:"tui-colorpicker-",preset:["#181818","#282828","#383838","#585858","#B8B8B8","#D8D8D8","#E8E8E8","#F8F8F8","#AB4642","#DC9656","#F7CA88","#A1B56C","#86C1B9","#7CAFC2","#BA8BAF","#A16946"],detailTxt:"Detail"},e),t=u.appendHTMLElement("div",t,this.options.cssPrefix+"palette-container"),d.call(this,e,t)}c(p,d),p.prototype._onClick=function(e){var t=this.options,i=r(e),n={};if(a(i,t.cssPrefix+"palette-button"))return n.color=i.value,void this.fire("_selectColor",n);a(i,t.cssPrefix+"palette-toggle-slider")&&this.fire("_toggleSlider")},p.prototype._onChange=function(e){var t=this.options,i=r(e),n={};a(i,t.cssPrefix+"palette-hex")&&(n.color=i.value,this.fire("_selectColor",n))},p.prototype._beforeDestroy=function(){this._toggleEvent(!1)},p.prototype._toggleEvent=function(e){var t,i=this.options,n=this.container,r=e?s:o;r(n,"click",this._onClick,this),(t=n.querySelector("."+i.cssPrefix+"palette-hex",n))&&r(t,"change",this._onChange,this)},p.prototype.render=function(e){var t,i=this.options;this._toggleEvent(!1),t=f({cssPrefix:i.cssPrefix,preset:i.preset,detailTxt:i.detailTxt,color:e,isValidRGB:h.isValidRGB,getItemClass:function(e){return e?"":" "+i.cssPrefix+"color-transparent"},isSelected:function(t){return t===e?" "+i.cssPrefix+"selected":""}}),this.container.innerHTML=t,this._toggleEvent(!0)},n.mixin(p),e.exports=p},function(e,t,i){"use strict";var n=i(5),r=i(23);e.exports=function(e,t){var i;return e.classList?e.classList.contains(t):(i=r(e).split(/\s+/),n(t,i)>-1)}},function(e,t,i){"use strict";var n=i(10),r=i(53),o=i(54),s=i(30),a=i(0),l=i(18),c=i(9),u=i(32),h=i(12),d=i(8),f=i(24),p=i(57),m=359.99;function g(e,t){(t=c.appendHTMLElement("div",t,e.cssPrefix+"slider-container")).style.display="none",d.call(this,e,t),this.options=a({color:"#f8f8f8",cssPrefix:"tui-colorpicker-"},e),this._dragDataCache={},this.sliderHandleElement=null,this.huebarHandleElement=null,this.baseColorElement=null,this.drag=new f({distance:0},t),this.colorSliderPosLimitRange=[-7,112],this.huebarPosLimitRange=[-3,115],this.drag.on({dragStart:this._onDragStart,drag:this._onDrag,dragEnd:this._onDragEnd,click:this._onClick},this)}l(g,d),g.prototype._beforeDestroy=function(){this.drag.off(),this.drag=this.options=this._dragDataCache=this.sliderHandleElement=this.huebarHandleElement=this.baseColorElement=null},g.prototype.toggle=function(e){this.container.style.display=e?"block":"none"},g.prototype.isVisible=function(){return"block"===this.container.style.display},g.prototype.render=function(e){var t,i,n=this.container,r=this.options,o=p.layout;h.isValidRGB(e)&&(o=(o=(o=(o=o.replace(/{{slider}}/,p.slider)).replace(/{{huebar}}/,p.huebar)).replace(/{{cssPrefix}}/g,r.cssPrefix)).replace(/{{id}}/g,r.id),this.container.innerHTML=o,this.sliderSvgElement=n.querySelector("."+r.cssPrefix+"svg-slider"),this.huebarSvgElement=n.querySelector("."+r.cssPrefix+"svg-huebar"),this.sliderHandleElement=n.querySelector("."+r.cssPrefix+"slider-handle"),this.huebarHandleElement=n.querySelector("."+r.cssPrefix+"huebar-handle"),this.baseColorElement=n.querySelector("."+r.cssPrefix+"slider-basecolor"),t=h.hexToRGB(e),i=h.rgbToHSV.apply(null,t),this.moveHue(i[0],!0),this.moveSaturationAndValue(i[1],i[2],!0))},g.prototype._setColorSliderPosMax=function(){var e=this.sliderSvgElement.getClientRects()[0];e&&(this.colorSliderPosLimitRange[1]=e.height-10)},g.prototype._moveColorSliderHandle=function(e,t,i){var n,r=this.sliderHandleElement;t=Math.max(this.colorSliderPosLimitRange[0],t),t=Math.min(this.colorSliderPosLimitRange[1],t),e=Math.max(this.colorSliderPosLimitRange[0],e),e=Math.min(this.colorSliderPosLimitRange[1],e),u.setTranslateXY(r,e,t),n=t>50?"white":"black",u.setStrokeColor(r,n),i||this.fire("_selectColor",{color:h.rgbToHEX.apply(null,this.getRGB())})},g.prototype.moveSaturationAndValue=function(e,t,i){var n,r,o,s;e=e||0,t=t||0,n=Math.abs(this.colorSliderPosLimitRange[0]),o=e*(r=this.colorSliderPosLimitRange[1])/100-n,s=r-t*r/100-n,this._moveColorSliderHandle(o,s,i)},g.prototype._moveColorSliderByPosition=function(e,t){var i=this.colorSliderPosLimitRange[0];this._moveColorSliderHandle(e+i,t+i)},g.prototype.getSaturationAndValue=function(){var e=Math.abs(this.colorSliderPosLimitRange[0]),t=e+this.colorSliderPosLimitRange[1],i=u.getTranslateXY(this.sliderHandleElement);return[(i[1]+e)/t*100,100-(i[0]+e)/t*100]},g.prototype._setHueBarPosMax=function(){var e=this.huebarSvgElement.getClientRects()[0];e&&(this.huebarPosLimitRange[1]=e.height-7)},g.prototype._moveHueHandle=function(e,t){var i,n,r=this.huebarHandleElement,o=this.baseColorElement;e=Math.max(this.huebarPosLimitRange[0],e),e=Math.min(this.huebarPosLimitRange[1],e),u.setTranslateY(r,e),i=h.hsvToRGB(this.getHue(),100,100),n=h.rgbToHEX.apply(null,i),u.setGradientColorStop(o,n),t||this.fire("_selectColor",{color:h.rgbToHEX.apply(null,this.getRGB())})},g.prototype.moveHue=function(e,t){var i,n;i=((n=Math.abs(this.huebarPosLimitRange[0]))+this.huebarPosLimitRange[1])*(e=e||0)/m-n,this._moveHueHandle(i,t)},g.prototype._moveHueByPosition=function(e){var t=this.huebarPosLimitRange[0];this._moveHueHandle(e+t)},g.prototype.getHue=function(){var e,t,i=this.huebarHandleElement,n=u.getTranslateXY(i);return t=(e=Math.abs(this.huebarPosLimitRange[0]))+this.huebarPosLimitRange[1],(n[0]+e)*m/t},g.prototype.getHSV=function(){var e=this.getSaturationAndValue();return[this.getHue()].concat(e)},g.prototype.getRGB=function(){return h.hsvToRGB.apply(null,this.getHSV())},g.prototype._prepareColorSliderForMouseEvent=function(e){var t=this.options,i=o(e.target,"."+t.cssPrefix+"slider-part");return this._dragDataCache={isColorSlider:s(i,t.cssPrefix+"slider-left"),parentElement:i}},g.prototype._onClick=function(e){var t=this._prepareColorSliderForMouseEvent(e),i=r(e.originEvent,t.parentElement);t.isColorSlider?this._moveColorSliderByPosition(i[0],i[1]):this._moveHueByPosition(i[1]),this._dragDataCache=null},g.prototype._onDragStart=function(e){this._setColorSliderPosMax(),this._setHueBarPosMax(),this._prepareColorSliderForMouseEvent(e)},g.prototype._onDrag=function(e){var t=this._dragDataCache,i=r(e.originEvent,t.parentElement);t.isColorSlider?this._moveColorSliderByPosition(i[0],i[1]):this._moveHueByPosition(i[1])},g.prototype._onDragEnd=function(){this._dragDataCache=null},n.mixin(g),e.exports=g},function(e,t,i){"use strict";var n=i(4).isOldBrowser,r=/[\.\-0-9]+/g,o={getTranslateXY:function(e){var t;return n?(t=e.style,[parseFloat(t.top),parseFloat(t.left)]):(t=e.getAttribute("transform"))?(t=t.match(r),[parseFloat(t[1]),parseFloat(t[0])]):[0,0]},setTranslateXY:function(e,t,i){n?(e.style.left=t+"px",e.style.top=i+"px"):e.setAttribute("transform","translate("+t+","+i+")")},setTranslateY:function(e,t){n?e.style.top=t+"px":e.setAttribute("transform","translate(-6,"+t+")")},setStrokeColor:function(e,t){n?e.strokecolor=t:e.setAttribute("stroke",t)},setGradientColorStop:function(e,t){n?e.color=t:e.setAttribute("stop-color",t)}};e.exports=o},function(e,t,i){i(34),e.exports=i(35)},function(e,t,i){},function(e,t,i){"use strict";var n={Collection:i(19),View:i(8),Drag:i(24),create:i(48),Palette:i(29),Slider:i(31),colorutil:i(12),svgvml:i(32)};e.exports=n},function(e,t,i){"use strict";e.exports=function(e){return null===e}},function(e,t,i){"use strict";var n=i(3),r=i(38);e.exports=function(e,t){var i=location.hostname,o="TOAST UI "+e+" for "+i+": Statistics",s=window.localStorage.getItem(o);(n(window.tui)||!1!==window.tui.usageStatistics)&&(s&&!function(e){return(new Date).getTime()-e>6048e5}(s)||(window.localStorage.setItem(o,(new Date).getTime()),setTimeout(function(){"interactive"!==document.readyState&&"complete"!==document.readyState||r("https://www.google-analytics.com/collect",{v:1,t:"event",tid:t,cid:i,dp:i,dh:e,el:e,ec:"use"})},1e3)))}},function(e,t,i){"use strict";var n=i(7);e.exports=function(e,t){var i=document.createElement("img"),r="";return n(t,function(e,t){r+="&"+t+"="+e}),r=r.substring(1),i.src=e+"?"+r,i.style.display="none",document.body.appendChild(i),document.body.removeChild(i),i}},function(e,t,i){"use strict";var n=i(2),r=i(5),o=i(23),s=i(40);e.exports=function(e){var t,i=Array.prototype.slice.call(arguments,1
70),a=e.classList,l=[];a?n(i,function(t){e.classList.add(t)}):((t=o(e))&&(i=[].concat(t.split(/\s+/),i)),n(i,function(e){r(e,l)<0&&l.push(e)}),s(e,l))}},function(e,t,i){"use strict";var n=i(1),r=i(3);e.exports=function(e,t){t=(t=n(t)?t.join(" "):t).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),r(e.className.baseVal)?e.className=t:e.className.baseVal=t}},function(e,t,i){"use strict";e.exports=function(e){return"number"==typeof e||e instanceof Number}},function(e,t,i){"use strict";var n=i(14),r=i(15),o=i(43),s=i(27),a="onselectstart"in document,l=s(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);e.exports=function(e){e||(e=document),a?n(e,"selectstart",r):(e=e===document?document.documentElement:e,o(e,"prevUserSelect",e.style[l]),e.style[l]="none")}},function(e,t,i){"use strict";var n=i(16);e.exports=function(e,t,i){e.dataset?e.dataset[t]=i:e.setAttribute("data-"+n(t),i)}},function(e,t,i){"use strict";var n=i(17),r=i(15),o=i(45),s=i(46),a=i(27),l="onselectstart"in document,c="prevUserSelect",u=a(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);e.exports=function(e){e||(e=document),l?n(e,"selectstart",r):((e=e===document?document.documentElement:e).style[u]=o(e,c)||"auto",s(e,c))}},function(e,t,i){"use strict";var n=i(16);e.exports=function(e,t){return e.dataset?e.dataset[t]:e.getAttribute("data-"+n(t))}},function(e,t,i){"use strict";var n=i(16);e.exports=function(e,t){e.dataset?delete e.dataset[t]:e.removeAttribute("data-"+n(t))}},function(e,t,i){"use strict";var n=i(22),r=i(5),o=["0","1","3","5","7"],s=["2","6"],a=["4"];e.exports=function(e){return n.msie&&n.version<=8?function(e){var t=String(e.button);return r(t,o)>-1?0:r(t,s)>-1?2:r(t,a)>-1?1:null}(e):e.button}},function(e,t,i){"use strict";var n=i(10),r=i(0),o=i(4),s=i(12),a=i(49),l=i(29),c=i(31),u=0;function h(e){var t;if(!(this instanceof h))return new h(e);if(!(e=this.options=r({container:null,color:"#f8f8f8",preset:["#181818","#282828","#383838","#585858","#b8b8b8","#d8d8d8","#e8e8e8","#f8f8f8","#ab4642","#dc9656","#f7ca88","#a1b56c","#86c1b9","#7cafc2","#ba8baf","#a16946"],cssPrefix:"tui-colorpicker-",detailTxt:"Detail",id:u+=1,usageStatistics:!0},e)).container)throw new Error("ColorPicker(): need container option.");t=this.layout=new a(e,e.container),this.palette=new l(e,t.container),this.palette.on({_selectColor:this._onSelectColorInPalette,_toggleSlider:this._onToggleSlider},this),this.slider=new c(e,t.container),this.slider.on("_selectColor",this._onSelectColorInSlider,this),t.addChild(this.palette),t.addChild(this.slider),this.render(e.color),e.usageStatistics&&o.sendHostName()}h.prototype._onSelectColorInPalette=function(e){var t=e.color,i=this.options;s.isValidRGB(t)||""===t?(this.fire("selectColor",{color:t,origin:"palette"}),i.color!==t&&(i.color=t,this.render(t))):this.render()},h.prototype._onToggleSlider=function(){this.slider.toggle(!this.slider.isVisible())},h.prototype._onSelectColorInSlider=function(e){var t=e.color,i=this.options;this.fire("selectColor",{color:t,origin:"slider"}),i.color!==t&&(i.color=t,this.palette.render(t))},h.prototype.setColor=function(e){if(!s.isValidRGB(e))throw new Error("ColorPicker#setColor(): need valid hex string color value");this.options.color=e,this.render(e)},h.prototype.getColor=function(){return this.options.color},h.prototype.toggle=function(e){this.layout.container.style.display=e?"block":"none"},h.prototype.render=function(e){this.layout.render(e||this.options.color)},h.prototype.destroy=function(){this.layout.destroy(),this.options.container.innerHTML="",this.layout=this.slider=this.palette=this.options=null},n.mixin(h),e.exports=h},function(e,t,i){"use strict";var n=i(0),r=i(18),o=i(9),s=i(8);function a(e,t){this.options=n({cssPrefix:"tui-colorpicker-"},e),t=o.appendHTMLElement("div",t,this.options.cssPrefix+"container"),s.call(this,e,t),this.render()}r(a,s),a.prototype.render=function(e){this.recursive(function(t){t.render(e)},!0)},e.exports=a},function(e,t,i){"use strict";e.exports=function(e){function t(){}return t.prototype=e,new t}},function(e,t,i){"use strict";var n=i(52);e.exports=function(e){var t=['<ul class="{{cssPrefix}}clearfix">',"{{each preset}}",['<li>
70<input class="{{cssPrefix}}palette-button{{isSelected @this}}{{getItemClass @this}}" type="button"',"{{if isValidRGB @this}}",' style="background-color:{{@this}};color:{{@this}}"',"{{/if}}",' title="{{@this}}" value="{{@this}}" /></li>'].join(""),"{{/each}}","</ul>",'<div class="{{cssPrefix}}clearfix" style="overflow:hidden">','<input type="button" class="{{cssPrefix}}palette-toggle-slider" value="{{detailTxt}}" />','<input type="text" class="{{cssPrefix}}palette-hex" value="{{color}}" maxlength="7" />','<span class="{{cssPrefix}}palette-preview" style="background-color:{{color}};color:{{color}}">{{color}}</span>',"</div>"].join("\n");return n(t,e)}},function(e,t,i){"use strict";var n=i(5),r=i(2),o=i(1),s=i(11),a=i(0),l=/{{\s?|\s?}}/g,c=/^[a-zA-Z0-9_@]+\[[a-zA-Z0-9_@"']+\]$/,u=/\[\s?|\s?\]/,h=/^[a-zA-Z_]+\.[a-zA-Z_]+$/,d=/\./,f=/^["']\w+["']$/,p=/"|'/g,m=/^-?\d+\.?\d*$/,g={if:function(e,t,i){var n=function(e,t){var i=[e],n=[],o=0,s=0;return r(t,function(e,r){0===e.indexOf("if")?o+=1:"/if"===e?o-=1:o||0!==e.indexOf("elseif")&&"else"!==e||(i.push("else"===e?["true"]:e.split(" ").slice(1)),n.push(t.slice(s,r)),s=r+1)}),n.push(t.slice(s)),{exps:i,sourcesInsideIf:n}}(e,t),o=!1,s="";return r(n.exps,function(e,t){return(o=w(e,i))&&(s=_(n.sourcesInsideIf[t],i)),!o}),s},each:function(e,t,i){var n=w(e,i),s=o(n)?"@index":"@key",l={},c="";return r(n,function(e,n){l[s]=n,l["@this"]=e,a(i,l),c+=_(t.slice(),i)}),c},with:function(e,t,i){var r=n("as",e),o=e[r+1],s=w(e.slice(0,r),i),l={};return l[o]=s,_(t,a(i,l))||""}},v=3==="a".split(/a/).length?function(e,t){return e.split(t)}:function(e,t){var i,n,r=[],o=0;for(t.global||(t=new RegExp(t,"g")),i=t.exec(e);null!==i;)n=i.index,r.push(e.slice(o,n)),o=n+i[0].length,i=t.exec(e);return r.push(e.slice(o)),r};function b(e,t){var i,n=t[e];return"true"===e?n=!0:"false"===e?n=!1:f.test(e)?n=e.replace(p,""):c.test(e)?n=b((i=e.split(u))[0],t)[b(i[1],t)]:h.test(e)?n=b((i=e.split(d))[0],t)[i[1]]:m.test(e)&&(n=parseFloat(e)),n}function y(e,t,i){for(var n,r,o,a,l=g[e],c=1,u=2,h=t[u];c&&s(h);)0===h.indexOf(e)?c+=1:0===h.indexOf("/"+e)&&(c-=1,n=u),h=t[u+=2];if(c)throw Error(e+" needs {{/"+e+"}} expression.");return t[0]=l(t[0].split(" ").slice(1),(r=0,o=n,(a=t.splice(r+1,o-r)).pop(),a),i),t}function w(e,t){var i=b(e[0],t);return i instanceof Function?function(e,t,i){var n=[];return r(t,function(e){n.push(b(e,i))}),e.apply(null,n)}(i,e.slice(1),t):i}function _(e,t){for(var i,n,r,o=1,a=e[o];s(a);)n=(i=a.split(" "))[0],g[n]?(r=y(n,e.splice(o,e.length-o),t),e=e.concat(r)):e[o]=w(i,t),a=e[o+=2];return e.join("")}e.exports=function(e,t){return _(v(e,l),t)}},function(e,t,i){"use strict";var n=i(1);e.exports=function(e,t){var i,r=n(e),o=r?e[0]:e.clientX,s=r?e[1]:e.clientY;return t?[o-(i=t.getBoundingClientRect()).left-t.clientLeft,s-i.top-t.clientTop]:[o,s]}},function(e,t,i){"use strict";var n=i(55);e.exports=function(e,t){var i=e.parentNode;if(n(e,t))return e;for(;i&&i!==document;){if(n(i,t))return i;i=i.parentNode}return null}},function(e,t,i){"use strict";var n=i(5),r=i(56),o=Element.prototype,s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||function(e){var t=this.document||this.ownerDocument;return n(this,r(t.querySelectorAll(e)))>-1};e.exports=function(e,t){return s.call(e,t)}},function(e,t,i){"use strict";var n=i(6);e.exports=function(e){var t;try{t=Array.prototype.slice.call(e)}catch(i){t=[],n(e,function(e){t.push(e)})}return t}},function(e,t,i){"use strict";(function(t){var n=i(4).isOldBrowser,r=['<div class="{{cssPrefix}}slider-left {{cssPrefix}}slider-part">{{slider}}</div>','<div class="{{cssPrefix}}slider-right {{cssPrefix}}slider-part">{{huebar}}</div>'].join("\n"),o=['<svg class="{{cssPrefix}}svg {{cssPrefix}}svg-slider">',"<defs>",'<linearGradient id="{{cssPrefix}}svg-fill-color-{{id}}" x1="0%" y1="0%" x2="100%" y2="0%">','<stop offset="0%" stop-color="rgb(255,255,255)" />','<stop class="{{cssPrefix}}slider-basecolor" offset="100%" stop-color="rgb(255,0,0)" />',"</linearGradient>",'<linearGradient id="{{cssPrefix}}svn-fill-black-{{id}}" x1="0%" y1="0%" x2="0%" y2="100%">','<stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:0" />','<stop offset="100%" style="stop-color:rgb(0,0,0);stop-opacity:1" />',"</linearGradient>","</defs>",'<rect width="100%" height="100%" fill="url(#{{cssPrefix}}svg-fill-color-{{id}})"></rect>','<rect width="100%" height="100%" fill="url(#{{cssPrefix}}svn-fill-black-{{id}})"></rect>','<path transform="translate(0,0)" class="{{cssPrefix}}slider-handle" d="M0 7.5 L15 7.5 M7.5 15 L7.5 0 M2 7 a5.5 5.5 0 1 1 0 1 Z" stroke="black" stroke-width="0.75" fill="none" />',"</svg>"].join("\n"),s=['<div class="{{cssPrefix}}
70vml-slider">','<v:rect strokecolor="none" class="{{cssPrefix}}vml {{cssPrefix}}vml-slider-bg">','<v:fill class="{{cssPrefix}}vml {{cssPrefix}}slider-basecolor" type="gradient" method="none" color="#ff0000" color2="#fff" angle="90" />',"</v:rect>",'<v:rect strokecolor="#ccc" class="{{cssPrefix}}vml {{cssPrefix}}vml-slider-bg">','<v:fill type="gradient" method="none" color="black" color2="white" o:opacity2="0%" class="{{cssPrefix}}vml" />',"</v:rect>",'<v:shape class="{{cssPrefix}}vml {{cssPrefix}}slider-handle" coordsize="1 1" style="width:1px;height:1px;"path="m 0,7 l 14,7 m 7,14 l 7,0 ar 12,12 2,2 z" filled="false" stroked="true" />',"</div>"].join("\n"),a=['<svg class="{{cssPrefix}}svg {{cssPrefix}}svg-huebar">',"<defs>",'<linearGradient id="g-{{id}}" x1="0%" y1="0%" x2="0%" y2="100%">','<stop offset="0%" stop-color="rgb(255,0,0)" />','<stop offset="16.666%" stop-color="rgb(255,255,0)" />','<stop offset="33.333%" stop-color="rgb(0,255,0)" />','<stop offset="50%" stop-color="rgb(0,255,255)" />','<stop offset="66.666%" stop-color="rgb(0,0,255)" />','<stop offset="83.333%" stop-color="rgb(255,0,255)" />','<stop offset="100%" stop-color="rgb(255,0,0)" />',"</linearGradient>","</defs>",'<rect width="18px" height="100%" fill="url(#g-{{id}})"></rect>','<path transform="translate(-6,-3)" class="{{cssPrefix}}huebar-handle" d="M0 0 L4 4 L0 8 L0 0 Z" fill="black" stroke="none" />',"</svg>"].join("\n"),l=['<div class="{{cssPrefix}}vml-huebar">','<v:rect strokecolor="#ccc" class="{{cssPrefix}}vml {{cssPrefix}}vml-huebar-bg">','<v:fill type="gradient" method="none" colors="0% rgb(255,0,0), 16.666% rgb(255,255,0), 33.333% rgb(0,255,0), 50% rgb(0,255,255), 66.666% rgb(0,0,255), 83.333% rgb(255,0,255), 100% rgb(255,0,0)" angle="180" class="{{cssPrefix}}vml" />',"</v:rect>",'<v:shape class="{{cssPrefix}}vml {{cssPrefix}}huebar-handle" coordsize="1 1" style="width:1px;height:1px;position:absolute;z-index:1;right:22px;top:-3px;"path="m 0,0 l 4,4 l 0,8 l 0,0 z" filled="true" fillcolor="black" stroked="false" />',"</div>"].join("\n");n&&t.document.namespaces.add("v","urn:schemas-microsoft-com:vml"),e.exports={layout:r,slider:n?s:o,huebar:n?l:a}}).call(this,i(25))}])},"object"==typeof i&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof i?i.colorPicker=r():(n.tui=n.tui||{},n.tui.colorPicker=r())},{}],400:[function(e,t,i){(function(n){(function(){ 71/*! 72 * TOAST UI ImageEditor 73 * @version 3.15.3 74 * @license MIT 75 */ 76var r,o;r=self,o=function(e){return function(){var t={2777:function(e,t,i){ 77/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ 78var r,o,s,a,l,c,u,h,d,f,p,m,g,v,b,y,w=w||{version:"4.6.0"};if(t.fabric=w,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?w.document=document:w.document=document.implementation.createHTMLDocument(""),w.window=window;else{var _=new(i(4960).JSDOM)(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;w.document=_.document,w.jsdomImplForWrapper=i(6759).implForWrapper,w.nodeCanvas=i(6272).Canvas,w.window=_,DOMParser=w.window.DOMParser}function k(e,t){var i=e.canvas,n=t.targetCanvas,r=n.getContext("2d");r.translate(0,n.height),r.scale(1,-1);var o=i.height-n.height;r.drawImage(i,0,o,n.width,n.height,0,0,n.width,n.height)}function x(e,t){var i=t.targetCanvas.getContext("2d"),n=t.destinationWidth,r=t.destinationHeight,o=n*r*4,s=new Uint8Array(this.imageBuffer,0,o),a=new Uint8ClampedArray(this.imageBuffer,0,o);e.readPixels(0,0,n,r,e.RGBA,e.UNSIGNED_BYTE,s);var l=new ImageData(a,n,r);i.putImageData(l,0,0)}w.isTouchSupported="ontouchstart"in w.window||"ontouchstart"in w.document||w.window&&w.window.navigator&&w.window.navigator.maxTouchPoints>0,w.isLikelyNode=void 0!==n&&"undefined"==typeof window,w.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","i
78d","paint-order","vector-effect","instantiated_by_use","clip-path"],w.DPI=96,w.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",w.commaWsp="(?:\\s+,?\\s*|,\\s*)",w.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,w.reNonWord=/[ \n\.,;!\?\-]/,w.fontPaths={},w.iMatrix=[1,0,0,1,0,0],w.svgNS="http://www.w3.org/2000/svg",w.perfLimitSizeTotal=2097152,w.maxCacheSideLimit=4096,w.minCacheSideLimit=256,w.charWidthsCache={},w.textureSize=2048,w.disableStyleCopyPaste=!1,w.enableGLFiltering=!0,w.devicePixelRatio=w.window.devicePixelRatio||w.window.webkitDevicePixelRatio||w.window.mozDevicePixelRatio||1,w.browserShadowBlurConstant=1,w.arcToSegmentsCache={},w.boundsOfCurveCache={},w.cachesBoundsOfCurve=!0,w.forceGLPutImageData=!1,w.initFilterBackend=function(){return w.enableGLFiltering&&w.isWebglSupported&&w.isWebglSupported(w.textureSize)?(console.log("max texture size: "+w.maxTextureSize),new w.WebglFilterBackend({tileSize:w.textureSize})):w.Canvas2dFilterBackend?new w.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=w),function(){function e(e,t){if(this.__eventListeners[e]){var i=this.__eventListeners[e];t?i[i.indexOf(t)]=!1:w.util.array.fill(i,!1)}}function t(e,t){var i=function(){t.apply(this,arguments),this.off(e,i)}.bind(this);this.on(e,i)}w.Observable={fire:function(e,t){if(!this.__eventListeners)return this;var i=this.__eventListeners[e];if(!i)return this;for(var n=0,r=i.length;n<r;n++)i[n]&&i[n].call(this,t||{});return this.__eventListeners[e]=i.filter(function(e){return!1!==e}),this},on:function(e,t){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in e)this.on(i,e[i]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(t);return this},once:function(e,i){if(1===arguments.length)for(var n in e)t.call(this,n,e[n]);else t.call(this,e,i);return this},off:function(t,i){if(!this.__eventListeners)return this;if(0===arguments.length)for(t in this.__eventListeners)e.call(this,t);else if(1===arguments.length&&"object"==typeof arguments[0])for(var n in t)e.call(this,n,t[n]);else e.call(this,t,i);return this}}}(),w.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var e=0,t=arguments.length;e<t;e++)this._onObjectAdded(arguments[e]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(e,t,i){var n=this._objects;return i?n[t]=e:n.splice(t,0,e),this._onObjectAdded&&this._onObjectAdded(e),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var e,t=this._objects,i=!1,n=0,r=arguments.length;n<r;n++)-1!==(e=t.indexOf(arguments[n]))&&(i=!0,t.splice(e,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[n]));return this.renderOnAddRemove&&i&&this.requestRenderAll(),this},forEachObject:function(e,t){for(var i=this.getObjects(),n=0,r=i.length;n<r;n++)e.call(t,i[n],n,i);return this},getObjects:function(e){return void 0===e?this._objects.concat():this._objects.filter(function(t){return t.type===e})},item:function(e){return this._objects[e]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(e,t){return this._objects.indexOf(e)>-1||!!t&&this._objects.some(function(t){return"function"==typeof t.contains&&t.contains(e,!0)})},complexity:function(){return this._objects.reduce(function(e,t){return e+=t.complexity?t.complexity():0},0)}},w.CommonMethods={_setOptions:function(e){for(var t in e)this.set(t,e[t])},_initGradient:function(e,t){!e||!e.colorStops||e instanceof w.Gradient||this.set(t,new w.Gradient(e))},_initPattern:function(e,t,i){!e||!e.source||e instanceof w.Pattern?i&&i():this.set(t,new w.Pattern(e,i))},_setObject:function(e){for(var t in e)this._set(t,e[t])},set:function(e,t){return"object"==typeof e?this._setObject(e):this._set(e,t),this},_set:function(e,t){this[e]=t},toggle:function(e){var t=this.get(e);return"boolean"==typeof t&&this.set(e,!t),this},get:function(e){return this[e]}},function(e){var t=Math.sqrt,i=Math.atan2,n=Math.pow,r=Math.PI/180,o=Math.PI/2;w.util={cos:function(e){if(0===e)return 1;switch(e<0&&(e=-e),e/o){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(0===e)return 0;var t=1;switch(e<0&&(t=-1),e/o){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(e)},removeFromArray:function(e,t){var i=e.indexOf(t);return-1!==i&&e.splice(i,1),e},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},degreesToRadians:function(e){return e*r},radiansToDegrees:function(e){return e/r},rotatePoint:function(e,t,i){var n=new w.Point(e.x-t.x,e.y-t.y),r=w.util.rotateVector(n,i);return new w.Point(r.x,r.y).addEquals(t)},rotateVector:function(e,t){var i=w.util.sin(t),n=w.util.cos(t);return{x:e.x*n-e.y*i,y:e.x*i+e.y*n}},transformPoint:function(e,t,i){return i?new w.Point(t[0]*e.x+t[2]*e.y,t[1]*e.x+t[3]*e.y):new w.Point(t[0]*e.x+t[2]*e.y+t[4],t[1]*e.x+t[3]*e.y+t[5])},makeBoundingBoxFromPoints:function(e,t){if(t)for(var i=0;i<e.length;i++)e[i]=w.util.transformPoint(e[i],t);var n=[e[0].x,e[1].x,e[2].x,e[3].x],r=w.util.array.min(n),o=w.util.array.max(n)-r,s=[e[0].y,e[1].y,e[2].y,e[3].y],a=w.util.array.min(s);return{left:r,top:a,width:o,height:w.util.array.max(s)-a}},invertTransform:function(e){var t=1/(e[0]*e[3]-e[1]*e[2]),i=[t*e[3],-t*e[1],-t*e[2],t*e[0]],n=w.util.transformPoint({x:e[4],y:e[5]},i,!0);return i[4]=-n.x,i[5]=-n.y,i},toFixed:function(e,t){return parseFloat(Number(e).toFixed(t))},parseUnit:function(e,t){var i=/\D{0,2}$/.exec(e),n=parseFloat(e);switch(t||(t=w.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return n*w.DPI/25.4;case"cm":return n*w.DPI/2.54;case"in":return n*w.DPI;case"pt":return n*w.DPI/72;case"pc":return n*w.DPI/72*12;case"em":return n*t;default:return n}},falseFunction:function(){return!1},getKlass:function(e,t){return e=w.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),w.util.resolveNamespace(t)[e]},getSvgAttributes:function(e){var t=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":t=t.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":t=t.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":t=t.concat(["offset","stop-color","stop-opacity"])}return t},resolveNamespace:function(t){if(!t)return w;var i,n=t.split("."),r=n.length,o=e||w.window;for(i=0;i<r;++i)o=o[n[i]];return o},loadImage:function(e,t,i,n){if(e){var r=w.util.createImage(),o=function(){t&&t.call(i,r,!1),r=r.onload=r.onerror=null};r.onload=o,r.onerror=function(){w.log("Error loading "+r.src),t&&t.call(i,null,!0),r=r.onload=r.onerror=null},0!==e.indexOf("data")&&null!=n&&(r.crossOrigin=n),"data:image/svg"===e.substring(0,14)&&(r.onload=null,w.util.loadImageInDom(r,o)),r.src=e}else t&&t.call(i,e)},loadImageInDom:function(e,t){var i=w.document.createElement("div");
vendor: 5,997 bytes, line 78
78i.style.width=i.style.height="1px",i.style.left=i.style.top="-100%",i.style.position="absolute",i.appendChild(e),w.document.querySelector("body").appendChild(i),e.onload=function(){t(),i.parentNode.removeChild(i),i=null}},enlivenObjects:function(e,t,i,n){var r=[],o=0,s=(e=e||[]).length;function a(){++o===s&&t&&t(r.filter(function(e){return e}))}s?e.forEach(function(e,t){e&&e.type?w.util.getKlass(e.type,i).fromObject(e,function(i,o){o||(r[t]=i),n&&n(e,i,o),a()}):a()}):t&&t(r)},enlivenPatterns:function(e,t){function i(){++r===o&&t&&t(n)}var n=[],r=0,o=(e=e||[]).length;o?e.forEach(function(e,t){e&&e.source?new w.Pattern(e,function(e){n[t]=e,i()}):(n[t]=e,i())}):t&&t(n)},groupSVGElements:function(e,t,i){var n;return e&&1===e.length?e[0]:(t&&(t.width&&t.height?t.centerPoint={x:t.width/2,y:t.height/2}:(delete t.width,delete t.height)),n=new w.Group(e,t),void 0!==i&&(n.sourcePath=i),n)},populateWithProperties:function(e,t,i){if(i&&"[object Array]"===Object.prototype.toString.call(i))for(var n=0,r=i.length;n<r;n++)i[n]in e&&(t[i[n]]=e[i[n]])},drawDashedLine:function(e,n,r,o,s,a){var l=o-n,c=s-r,u=t(l*l+c*c),h=i(c,l),d=a.length,f=0,p=!0;for(e.save(),e.translate(n,r),e.moveTo(0,0),e.rotate(h),n=0;u>n;)(n+=a[f++%d])>u&&(n=u),e[p?"lineTo":"moveTo"](n,0),p=!p;e.restore()},createCanvasElement:function(){return w.document.createElement("canvas")},copyCanvasElement:function(e){var t=w.util.createCanvasElement();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},toDataURL:function(e,t,i){return e.toDataURL("image/"+t,i)},createImage:function(){return w.document.createElement("img")},multiplyTransformMatrices:function(e,t,i){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],i?0:e[0]*t[4]+e[2]*t[5]+e[4],i?0:e[1]*t[4]+e[3]*t[5]+e[5]]},qrDecompose:function(e){var o=i(e[1],e[0]),s=n(e[0],2)+n(e[1],2),a=t(s),l=(e[0]*e[3]-e[2]*e[1])/a,c=i(e[0]*e[2]+e[1]*e[3],s);return{angle:o/r,scaleX:a,scaleY:l,skewX:c/r,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return w.iMatrix.concat();var t=w.util.degreesToRadians(e.angle),i=w.util.cos(t),n=w.util.sin(t);return[i,n,-n,i,0,0]},calcDimensionsMatrix:function(e){var t=void 0===e.scaleX?1:e.scaleX,i=void 0===e.scaleY?1:e.scaleY,n=[e.flipX?-t:t,0,0,e.flipY?-i:i,0,0],r=w.util.multiplyTransformMatrices,o=w.util.degreesToRadians;return e.skewX&&(n=r(n,[1,0,Math.tan(o(e.skewX)),1],!0)),e.skewY&&(n=r(n,[1,Math.tan(o(e.skewY)),0,1],!0)),n},composeMatrix:function(e){var t=[1,0,0,1,e.translateX||0,e.translateY||0],i=w.util.multiplyTransformMatrices;return e.angle&&(t=i(t,w.util.calcRotateMatrix(e))),(1!==e.scaleX||1!==e.scaleY||e.skewX||e.skewY||e.flipX||e.flipY)&&(t=i(t,w.util.calcDimensionsMatrix(e))),t},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,t,i,n){n>0&&(t>n?t-=n:t=0,i>n?i-=n:i=0);var r,o=!0,s=e.getImageData(t,i,2*n||1,2*n||1),a=s.data.length;for(r=3;r<a&&!1!=(o=s.data[r]<=0);r+=4);return s=null,o},parsePreserveAspectRatioAttribute:function(e){var t,i="meet",n=e.split(" ");return n&&n.length&&("meet"!==(i=n.pop())&&"slice"!==i?(t=i,i="meet"):n.length&&(t=n.pop())),{meetOrSlice:i,alignX:"none"!==t?t.slice(1,4):"none",alignY:"none"!==t?t.slice(5,8):"none"}},clearFabricFontCache:function(e){(e=(e||"").toLowerCase())?w.charWidthsCache[e]&&delete w.charWidthsCache[e]:w.charWidthsCache={}},limitDimsByArea:function(e,t){var i=Math.sqrt(t*e),n=Math.floor(t/i);return{x:Math.floor(i),y:n}},capValue:function(e,t,i){return Math.max(e,Math.min(t,i))},findScaleToFit:function(e,t){return Math.min(t.width/e.width,t.height/e.height)},findScaleToCover:function(e,t){return Math.max(t.width/e.width,t.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map(function(e){return w.util.toFixed(e,w.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(e,t){var i=w.util.invertTransform(t),n=w.util.multiplyTransformMatrices(i,e.calcOwnMatrix());w.util.applyTransformToObject(e,n)},addTransformToObject:function(e,t){w.util.applyTransformToObject(e,w.util.multiplyTransformMatrices(t,e.calcOwnMatrix()))},applyTransformToObject:function(e,t){var i=w.util.qrDecompose(t),n=new w.Point(i.translateX,i.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",i.scaleX),e.set("scaleY",i.scaleY),e.skewX=i.skewX,e.skewY=i.skewY,e.angle=i.angle,e.setPositionByOrigin(n,"center","center")},sizeAfterTransform:function(e,t,i){var n=e/2,r=t/2,o=[{x:-n,y:-r},{x:n,y:-r},{x:-n,y:r},{x:n,y:r}],s=w.util.calcDimensionsMatrix(i),a=w.util.makeBoundingBoxFromPoints(o,s);return{x:a.width,y:a.height}}}}(t),function(){var e=Array.prototype.join,t={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},i={m:"l",M:"L"};function n(e,t,i,n,r,o,s,a,l,c,u){var h=w.util.cos(e),d=w.util.sin(e),f=w.util.cos(t),p=w.util.sin(t),m=i*r*f-n*o*p+s,g=n*r*f+i*o*p+a;return["C",c+l*(-i*r*d-n*o*h),u+l*(-n*r*d+i*o*h),m+l*(i*r*p+n*o*f),g+l*(n*r*p-i*o*f),m,g]}function r(e,t,i,r,s,a,l){var c=Math.PI,u=l*c/180,h=w.util.sin(u),d=w.util.cos(u),f=0,p=0,m=-d*e*.5-h*t*.5,g=-d*t*.5+h*e*.5,v=(i=Math.abs(i))*i,b=(r=Math.abs(r))*r,y=g*g,_=m*m,k=v*b-v*y-b*_,x=0;if(k<0){var C=Math.sqrt(1-k/(v*b));i*=C,r*=C}else x=(s===a?-1:1)*Math.sqrt(k/(v*y+b*_));var S=x*i*g/r,E=-x*r*m/i,T=d*S-h*E+.5*e,A=h*S+d*E+.5*t,I=o(1,0,(m-S)/i,(g-E)/r),M=o((m-S)/i,(g-E)/r,(-m-S)/i,(-g-E)/r);0===a&&M>0?M-=2*c:1===a&&M<0&&(M+=2*c);for(var P=Math.ceil(Math.abs(M/c*2)),D=[],O=M/P,L=8/3*Math.sin(O/4)*Math.sin(O/4)/Math.sin(O/2),R=I+O,B=0;B<P;B++)D[B]=n(I,R,d,h,i,r,T,A,L,f,p),f=D[B][5],p=D[B][6],I=R,R+=O;return D}function o(e,t,i,n){var r=Math.atan2(t,e),o=Math.atan2(n,i);return o>=r?o-r:2*Math.PI-(r-o)}function s(t,i,n,r,o,s,a,l){var c;if(w.cachesBoundsOfCurve&&(c=e.call(arguments),w.boundsOfCurveCache[c]))return w.boundsOfCurveCache[c];
vendor: 18,749 bytes, line 78
78var u,h,d,f,p,m,g,v,b=Math.sqrt,y=Math.min,_=Math.max,k=Math.abs,x=[],C=[[],[]];h=6*t-12*n+6*o,u=-3*t+9*n-9*o+3*a,d=3*n-3*t;for(var S=0;S<2;++S)if(S>0&&(h=6*i-12*r+6*s,u=-3*i+9*r-9*s+3*l,d=3*r-3*i),k(u)<1e-12){if(k(h)<1e-12)continue;0<(f=-d/h)&&f<1&&x.push(f)}else(g=h*h-4*d*u)<0||(0<(p=(-h+(v=b(g)))/(2*u))&&p<1&&x.push(p),0<(m=(-h-v)/(2*u))&&m<1&&x.push(m));for(var E,T,A,I=x.length,M=I;I--;)E=(A=1-(f=x[I]))*A*A*t+3*A*A*f*n+3*A*f*f*o+f*f*f*a,C[0][I]=E,T=A*A*A*i+3*A*A*f*r+3*A*f*f*s+f*f*f*l,C[1][I]=T;C[0][M]=t,C[1][M]=i,C[0][M+1]=a,C[1][M+1]=l;var P=[{x:y.apply(null,C[0]),y:y.apply(null,C[1])},{x:_.apply(null,C[0]),y:_.apply(null,C[1])}];return w.cachesBoundsOfCurve&&(w.boundsOfCurveCache[c]=P),P}function a(e,t,i){for(var n=i[1],o=i[2],s=i[3],a=i[4],l=i[5],c=r(i[6]-e,i[7]-t,n,o,a,l,s),u=0,h=c.length;u<h;u++)c[u][1]+=e,c[u][2]+=t,c[u][3]+=e,c[u][4]+=t,c[u][5]+=e,c[u][6]+=t;return c}function l(e,t,i,n){return Math.sqrt((i-e)*(i-e)+(n-t)*(n-t))}function c(e,t,i,n,r,o,s,a){return function(l){var c,u=(c=l)*c*c,h=function(e){return 3*e*e*(1-e)}(l),d=function(e){return 3*e*(1-e)*(1-e)}(l),f=function(e){return(1-e)*(1-e)*(1-e)}(l);return{x:s*u+r*h+i*d+e*f,y:a*u+o*h+n*d+t*f}}}function u(e,t,i,n,r,o,s,a){return function(l){var c=1-l,u=3*c*c*(i-e)+6*c*l*(r-i)+3*l*l*(s-r),h=3*c*c*(n-t)+6*c*l*(o-n)+3*l*l*(a-o);return Math.atan2(h,u)}}function h(e,t,i,n,r,o){return function(s){var a,l=(a=s)*a,c=function(e){return 2*e*(1-e)}(s),u=function(e){return(1-e)*(1-e)}(s);return{x:r*l+i*c+e*u,y:o*l+n*c+t*u}}}function d(e,t,i,n,r,o){return function(s){var a=1-s,l=2*a*(i-e)+2*s*(r-i),c=2*a*(n-t)+2*s*(o-n);return Math.atan2(c,l)}}function f(e,t,i){var n,r,o={x:t,y:i},s=0;for(r=1;r<=100;r+=1)n=e(r/100),s+=l(o.x,o.y,n.x,n.y),o=n;return s}function p(e,t){for(var i,n,r,o=0,s=0,a=e.iterator,c={x:e.x,y:e.y},u=.01,h=e.angleFinder;s<t&&o<=1&&u>1e-4;)i=a(o),r=o,(n=l(c.x,c.y,i.x,i.y))+s>t?o-=u/=2:(c=i,o+=u,s+=n);return i.angle=h(r),i}function m(e){for(var t,i,n,r,o=0,s=e.length,a=0,p=0,m=0,g=0,v=[],b=0;b<s;b++){switch(n={x:a,y:p,command:(t=e[b])[0]},t[0]){case"M":n.length=0,m=a=t[1],g=p=t[2];break;case"L":n.length=l(a,p,t[1],t[2]),a=t[1],p=t[2];break;case"C":i=c(a,p,t[1],t[2],t[3],t[4],t[5],t[6]),r=u(a,p,t[1],t[2],t[3],t[4],t[5],t[6]),n.iterator=i,n.angleFinder=r,n.length=f(i,a,p),a=t[5],p=t[6];break;case"Q":i=h(a,p,t[1],t[2],t[3],t[4]),r=d(a,p,t[1],t[2],t[3],t[4]),n.iterator=i,n.angleFinder=r,n.length=f(i,a,p),a=t[3],p=t[4];break;case"Z":case"z":n.destX=m,n.destY=g,n.length=l(a,p,m,g),a=m,p=g}o+=n.length,v.push(n)}return v.push({length:o,x:a,y:p}),v}w.util.joinPath=function(e){return e.map(function(e){return e.join(" ")}).join(" ")},w.util.parsePath=function(e){var n,r,o,s,a,l=[],c=[],u=w.rePathCommand,h="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",d="("+h+")"+w.commaWsp,f="([01])"+w.commaWsp+"?",p=new RegExp(d+"?"+d+"?"+d+f+f+d+"?("+h+")","g");if(!e||!e.match)return l;for(var m,g=0,v=(a=e.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi)).length;g<v;g++){s=(n=a[g]).slice(1).trim(),c.length=0;var b=n.charAt(0);if(m=[b],"a"===b.toLowerCase())for(var y;y=p.exec(s);)for(var _=1;_<y.length;_++)c.push(y[_]);else for(;o=u.exec(s);)c.push(o[0]);_=0;for(var k=c.length;_<k;_++)r=parseFloat(c[_]),isNaN(r)||m.push(r);var x=t[b.toLowerCase()],C=i[b]||b;if(m.length-1>x)for(var S=1,E=m.length;S<E;S+=x)l.push([b].concat(m.slice(S,S+x))),b=C;else l.push(m)}return l},w.util.makePathSimpler=function(e){var t,i,n,r,o,s,l=0,c=0,u=e.length,h=0,d=0,f=[];for(i=0;i<u;++i){switch(n=!1,(t=e[i].slice(0))[0]){case"l":t[0]="L",t[1]+=l,t[2]+=c;case"L":l=t[1],c=t[2];break;case"h":t[1]+=l;case"H":t[0]="L",t[2]=c,l=t[1];break;case"v":t[1]+=c;case"V":t[0]="L",c=t[1],t[1]=l,t[2]=c;break;case"m":t[0]="M",t[1]+=l,t[2]+=c;case"M":l=t[1],c=t[2],h=t[1],d=t[2];break;case"c":t[0]="C",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c,t[5]+=l,t[6]+=c;case"C":o=t[3],s=t[4],l=t[5],c=t[6];break;case"s":t[0]="S",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"S":"C"===r?(o=2*l-o,s=2*c-s):(o=l,s=c),l=t[3],c=t[4],t[0]="C",t[5]=t[3],t[6]=t[4],t[3]=t[1],t[4]=t[2],t[1]=o,t[2]=s,o=t[3],s=t[4];break;case"q":t[0]="Q",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"Q":o=t[1],s=t[2],l=t[3],c=t[4];break;case"t":t[0]="T",t[1]+=l,t[2]+=c;case"T":"Q"===r?(o=2*l-o,s=2*c-s):(o=l,s=c),t[0]="Q",l=t[1],c=t[2],t[1]=o,t[2]=s,t[3]=l,t[4]=c;break;case"a":t[0]="A",t[6]+=l,t[7]+=c;case"A":n=!0,f=f.concat(a(l,c,t)),l=t[6],c=t[7];break;case"z":case"Z":l=h,c=d}n||f.push(t),r=t[0]}return f},w.util.getSmoothPathFromPoints=function(e,t){var i,n=[],r=new w.Point(e[0].x,e[0].y),o=new w.Point(e[1].x,e[1].y),s=e.length,a=1,l=0,c=s>2;for(t=t||0,c&&(a=e[2].x<o.x?-1:e[2].x===o.x?0:1,l=e[2].y<o.y?-1:e[2].y===o.y?0:1),n.push(["M",r.x-a*t,r.y-l*t]),i=1;i<s;i++){if(!r.eq(o)){var u=r.midPointFrom(o);n.push(["Q",r.x,r.y,u.x,u.y])}r=e[i],i+1<e.length&&(o=e[i+1])}return c&&(a=r.x>e[i-2].x?1:r.x===e[i-2].x?0:-1,l=r.y>e[i-2].y?1:r.y===e[i-2].y?0:-1),n.push(["L",r.x+a*t,r.y+l*t]),n},w.util.getPathSegmentsInfo=m,w.util.getBoundsOfCurve=s,w.util.getPointOnPath=function(e,t,i){i||(i=m(e));for(var n=0;t-i[n].length>0&&n<i.length-2;)t-=i[n].length,n++;var r,o=i[n],s=t/o.length,a=o.command,l=e[n];switch(a){case"M":return{x:o.x,y:o.y,angle:0};case"Z":case"z":return(r=new w.Point(o.x,o.y).lerp(new w.Point(o.destX,o.destY),s)).angle=Math.atan2(o.destY-o.y,o.destX-o.x),r;case"L":return(r=new w.Point(o.x,o.y).lerp(new w.Point(l[1],l[2]),s)).angle=Math.atan2(l[2]-o.y,l[1]-o.x),r;case"C":case"Q":return p(o,t)}},w.util.transformPath=function(e,t,i){return i&&(t=w.util.multiplyTransformMatrices(t,[1,0,0,1,-i.x,-i.y])),e.map(function(e){for(var i=e.slice(0),n={},r=1;r<e.length-1;r+=2)n.x=e[r],n.y=e[r+1],n=w.util.transformPoint(n,t),i[r]=n.x,i[r+1]=n.y;return i})},w.util.fromArcToBeizers=a,w.util.getBoundsOfArc=function(e,t,i,n,o,a,l,c,u){for(var h,d=0,f=0,p=[],m=r(c-e,u-t,i,n,a,l,o),g=0,v=m.length;g<v;g++)h=s(d,f,m[g][1],m[g][2],m[g][3],m[g][4],m[g][5],m[g][6]),p.push({x:h[0].x+e,y:h[0].y+t}),p.push({x:h[1].x+e,y:h[1].y+t}),d=m[g][5],f=m[g][6];return p},w.util.drawArc=function(e,t,i,n){a(t,i,n=n.slice(0).unshift("X")).forEach(function(t){e.bezierCurveTo.apply(e,t.slice(1))})}}(),function(){var e=Array.prototype.slice;function t(e,t,i){if(e&&0!==e.length){var n=e.length-1,r=t?e[n][t]:e[n];if(t)for(;n--;)i(e[n][t],r)&&(r=e[n][t]);else for(;n--;)i(e[n],r)&&(r=e[n]);return r}}w.util.array={fill:function(e,t){for(var i=e.length;i--;)e[i]=t;return e},invoke:function(t,i){for(var n=e.call(arguments,2),r=[],o=0,s=t.length;o<s;o++)r[o]=n.length?t[o][i].apply(t[o],n):t[o][i].call(t[o]);return r},min:function(e,i){return t(e,i,function(e,t){return e<t})},max:function(e,i){return t(e,i,function(e,t){return e>=t})}}}(),function(){function e(t,i,n){if(n)if(!w.isLikelyNode&&i instanceof Element)t=i;else if(i instanceof Array){t=[];for(var r=0,o=i.length;r<o;r++)t[r]=e({},i[r],n)}else if(i&&"object"==typeof i)for(var s in i)"canvas"===s||"group"===s?t[s]=null:i.hasOwnProperty(s)&&(t[s]=e({},i[s],n));else t=i;else for(var s in i)t[s]=i[s];return t}w.util.object={extend:e,clone:function(t,i){return e({},t,i)}},w.util.object.extend(w.util,w.Observable)}(),function(){function e(e,t){var i=e.charCodeAt(t);if(isNaN(i))return"";if(i<55296||i>57343)return e.charAt(t);if(55296<=i&&i<=56319){if(e.length<=t+1)throw"High surrogate without following low surrogate";var n=e.charCodeAt(t+1);if(56320>n||n>57343)throw"High surrogate without following low surrogate";return e.charAt(t)+e.charAt(t+1)}if(0===t)throw"Low surrogate without preceding high surrogate";var r=e.charCodeAt(t-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}w.util.string={camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},escapeXml:function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},graphemeSplit:function(t){var i,n=0,r=[];for(n=0;n<t.length;n++)!1!==(i=e(t,n))&&r.push(i);return r}}}(),function(){var e=Array.prototype.slice,t=function(){},i=function(){for(var e in{toString:1})if("toString"===e)return!1;return!0}(),n=function(e,t,n){for(var r in t)r in e.prototype&&"function"==typeof e.prototype[r]&&(t[r]+"").indexOf("callSuper")>-1?e.prototype[r]=function(e){return function(){var i=this.constructor.superclass;this.constructor.superclass=n;var r=t[e].apply(this,arguments);if(this.constructor.superclass=i,"initialize"!==e)return r}}(r):e.prototype[r]=t[r],i&&(t.toString!==Object.prototype.toString&&(e.prototype.toString=t.toString),t.valueOf!==Object.prototype.valueOf&&(e.prototype.valueOf=t.valueOf))};function r(){}function o(t){for(var i=null,n=this;n.constructor.superclass;){var r=n.constructor.superclass.prototype[t];if(n[t]!==r){i=r;break}n=n.constructor.superclass.prototype}return i?arguments.length>1?i.apply(this,e.call(arguments,1)):i.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}w.util.createClass=function(){var i=null,s=e.call(arguments,0);function a(){this.initialize.apply(this,arguments)}"function"==typeof s[0]&&(i=s.shift()),a.superclass=i,a.subclasses=[],i&&(r.prototype=i.prototype,a.prototype=new r,i.subclasses.push(a));for(var l=0,c=s.length;l<c;l++)n(a,s[l],i);return a.prototype.initialize||(a.prototype.initialize=t),a.prototype.constructor=a,a.prototype.callSuper=o,a}}(),r=!!w.document.createElement("div").attachEvent,o=["touchstart","touchmove","touchend"],w.util.addListener=function(e,t,i,n){e&&e.addEventListener(t,i,!r&&n)},w.util.removeListener=function(e,t,i,n){e&&e.removeEventListener(t,i,!r&&n)},w.util.getPointer=function(e){var t=e.target,i=w.util.getScrollLeftTop(t),n=function(e){var t=e.changedTouches;return t&&t[0]?t[0]:e}(e);return{x:n.clientX+i.left,y:n.clientY+i.top}},w.util.isTouchEvent=function(e){return o.indexOf(e.type)>-1||"touch"===e.pointerType},s=w.document.createElement("div"),a="string"==typeof s.style.opacity,l="string"==typeof s.style.filter,c=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,u=function(e){return e},a?u=function(e,t){return e.style.opacity=t,e}:l&&(u=function(e,t){var i=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(i.zoom=1),c.test(i.filter)?(t=t>=.9999?"":"alpha(opacity="+100*t+")",i.filter=i.filter.replace(c,t)):i.filter+=" alpha(opacity="+100*t+")",e}),w.util.setStyle=function(e,t){var i=e.style;if(!i)return e;if("string"==typeof t)return e.style.cssText+=";"+t,t.indexOf("opacity")>-1?u(e,t.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var n in t)"opacity"===n?u(e,t[n]):i["float"===n||"cssFloat"===n?void 0===i.styleFloat?"cssFloat":"styleFloat":n]=t[n];return e},function(){var e,t,i,n,r=Array.prototype.slice,o=function(e){return r.call(e,0)};try{e=o(w.document.childNodes)instanceof Array}catch(e){}function s(e,t){var i=w.document.createElement(e);for(var n in t)"class"===n?i.className=t[n]:"for"===n?i.htmlFor=t[n]:i.setAttribute(n,t[n]);return i}function a(e){for(var t=0,i=0,n=w.document.documentElement,r=w.document.body||{scrollLeft:0,scrollTop:0};e&&(e.parentNode||e.host)&&((e=e.parentNode||e.host)===w.document?(t=r.scrollLeft||n.scrollLeft||0,i=r.scrollTop||n.scrollTop||0):(t+=e.scrollLeft||0,i+=e.scrollTop||0),1!==e.nodeType||"fixed"!==e.style.position););return{left:t,top:i}}e||(o=function(e){for(var t=new Array(e.length),i=e.length;i--;)t[i]=e[i];return t}),t=w.document.defaultView&&w.document.defaultView.getComputedStyle?function(e,t){var i=w.document.defaultView.getComputedStyle(e,null);return i?i[t]:void 0}:function(e,t){var i=e.style[t];return!i&&e.currentStyle&&(i=e.currentStyle[t]),i},i=w.document.documentElement.style,n="userSelect"in i?"userSelect":"MozUserSelect"in i?"MozUserSelect":"WebkitUserSelect"in i?"WebkitUserSelect":"KhtmlUserSelect"in i?"KhtmlUserSelect":"",w.util.makeElementUnselectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=w.util.falseFunction),n?e.style[n]="none":"string"==typeof e.unselectable&&(e.unselectable="on"),e},w.util.makeElementSelectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=null),n?e.style[n]="":"string"==typeof e.unselectable&&(e.unselectable=""),e},w.util.setImageSmoothing=function(e,t){e.imageSmoothingEnabled=e.imageSmoothingEnabled||e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled||e.oImageSmoothingEnabled,e.imageSmoothingEnabled=t},w.util.getById=function(e){return"string"==typeof e?w.document.getElementById(e):e},w.util.toArray=o,w.util.addClass=function(e,t){e&&-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=(e.className?" ":"")+t)},w.util.makeElement=s,w.util.wrapElement=function(e,t,i){return"string"==typeof t&&(t=s(t,i)),e.parentNode&&e.parentNode.replaceChild(t,e),t.appendChild(e),t},w.util.getScrollLeftTop=a,w.util.getElementOffset=function(e){var i,n,r=e&&e.ownerDocument,o={left:0,top:0},s={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return s;for(var c in l)s[l[c]]+=parseInt(t(e,c),10)||0;return i=r.documentElement,void 0!==e.getBoundingClientRect&&(o=e.getBoundingClientRect()),n=a(e),{left:o.left+n.left-(i.clientLeft||0)+s.left,top:o.top+n.top-(i.clientTop||0)+s.top}},w.util.getNodeCanvas=function(e){var t=w.jsdomImplForWrapper(e);return t._canvas||t._image},w.util.cleanUpJsdomNode=function(e){if(w.isLikelyNode){var t=w.jsdomImplForWrapper(e);t&&(t._image=null,t._canvas=null,t._currentSrc=null,t._attributes=null,t._classList=null)}}}(),function(){function e(){}w.util.request=function(t,i){i||(i={});var n=i.method?i.method.toUpperCase():"GET",r=i.onComplete||function(){},o=new w.window.XMLHttpRequest,s=i.body||i.parameters;return o.onreadystatechange=function(){4===o.readyState&&(r(o),o.onreadystatechange=e)},"GET"===n&&(s=null,"string"==typeof i.parameters&&(t=function(e,t){return e+(/\?/.test(e)?"&":"?")+t}(t,i.parameters))),o.open(n,t,!0),"POST"!==n&&"PUT"!==n||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(s),o}}(),w.log=console.log,w.warn=console.warn,function(){function e(){return!1}function t(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t}var i=w.window.requestAnimationFrame||w.window.webkitRequestAnimationFrame||w.window.mozRequestAnimationFrame||w.window.oRequestAnimationFrame||w.window.msRequestAnimationFrame||function(e){return w.window.setTimeout(e,1e3/60)},n=w.window.cancelAnimationFrame||w.window.clearTimeout;function r(){return i.apply(w.window,arguments)}w.util.animate=function(i){var n=!1;return r(function(o){i||(i={});var s,a=o||+new Date,l=i.duration||500,c=a+l,u=i.onChange||e,h=i.abort||e,d=i.onComplete||e,f=i.easing||t,p="startValue"in i?i.startValue:0,m="endValue"in i?i.endValue:100,g=i.byValue||m-p;i.onStart&&i.onStart(),function e(t){var i=(s=t||+new Date)>c?l:s-a,o=i/l,v=f(i,p,g,l),b=Math.abs((v-p)/g);if(!n){if(!h(v,b,o))return s>c?(u(m,1,1),void d(m,1,1)):(u(v,b,o),void r(e));d(m,1,1)}}(a)}),function(){n=!0}},w.util.requestAnimFrame=r,w.util.cancelAnimFrame=function(){return n.apply(w.window,arguments)}}(),function(){function e(e,t,i){var n="rgba("+parseInt(e[0]+i*(t[0]-e[0]),10)+","+parseInt(e[1]+i*(t[1]-e[1]),10)+","+parseInt(e[2]+i*(t[2]-e[2]),10);return n+=","+(e&&t?parseFloat(e[3]+i*(t[3]-e[3])):1),n+=")"}w.util.animateColor=function(t,i,n,r){var o=new w.Color(t).getSource(),s=new w.Color(i).getSource(),a=r.onComplete,l=r.onChange;return r=r||{},w.util.animate(w.util.object.extend(r,{duration:n||500,startValue:o,endValue:s,byValue:s,easing:function(t,i,n,o){return e(i,n,r.colorEasing?r.colorEasing(t,o):1-Math.cos(t/o*(Math.PI/2)))},onComplete:function(t,i,n){if(a)return a(e(s,s,0),i,n)},onChange:function(t,i,n){if(l){if(Array.isArray(t))return l(e(t,t,0),i,n);l(t,i,n)}}}))}}(),function(){function e(e,t,i,n){return e<Math.abs(t)?(e=t,n=i/4):n=0===t&&0===e?i/(2*Math.PI)*Math.asin(1):i/(2*Math.PI)*Math.asin(t/e),{a:e,c:t,p:i,s:n}}function t(e,t,i){return e.a*Math.pow(2,10*(t-=1))*Math.sin((t*i-e.s)*(2*Math.PI)/e.p)}function i(e,t,i,r){return i-n(r-e,0,i,r)+t}function n(e,t,i,n){return(e/=n)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t}w.util.ease={easeInQuad:function(e,t,i,n){return i*(e/=n)*e+t},easeOutQuad:function(e,t,i,n){return-i*(e/=n)*(e-2)+t},easeInOutQuad:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,i,n){return i*(e/=n)*e*e+t},easeOutCubic:function(e,t,i,n){return i*((e=e/n-1)*e*e+1)+t},easeInOutCubic:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,i,n){return i*(e/=n)*e*e*e+t},easeOutQuart:function(e,t,i,n){return-i*((e=e/n-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e+t:-i/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,i,n){return i*(e/=n)*e*e*e*e+t},easeOutQuint:function(e,t,i,n){return i*((e=e/n-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t},easeOutSine:function(e,t,i,n){return i*Math.sin(e/n*(Math.PI/2))+t},easeInOutSine:function(e,t,i,n){return-i/2*(Math.cos(Math.PI*e/n)-1)+t},easeInExpo:function(e,t,i,n){return 0===e?t:i*Math.pow(2,10*(e/n-1))+t},easeOutExpo:function(e,t,i,n){return e===n?t+i:i*(1-Math.pow(2,-10*e/n))+t},easeInOutExpo:function(e,t,i,n){return 0===e?t:e===n?t+i:(e/=n/2)<1?i/2*Math.pow(2,10*(e-1))+t:i/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,i,n){return-i*(Math.sqrt(1-(e/=n)*e)-1)+t},easeOutCirc:function(e,t,i,n){return i*Math.sqrt(1-(e=e/n-1)*e)+t},easeInOutCirc:function(e,t,i,n){return(e/=n/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+t:i/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(i,n,r,o){var s=0;return 0===i?n:1===(i/=o)?n+r:(s||(s=.3*o),-t(e(r,r,s,1.70158),i,o)+n)},easeOutElastic:function(t,i,n,r){var o=0;if(0===t)return i;if(1===(t/=r))return i+n;o||(o=.3*r);var s=e(n,n,o,1.70158);return s.a*Math.pow(2,-10*t)*Math.sin((t*r-s.s)*(2*Math.PI)/s.p)+s.c+i},easeInOutElastic:function(i,n,r,o){var s=0;if(0===i)return n;if(2==(i/=o/2))return n+r;s||(s=o*(.3*1.5));var a=e(r,r,s,1.70158);return i<1?-.5*t(a,i,o)+n:a.a*Math.pow(2,-10*(i-=1))*Math.sin((i*o-a.s)*(2*Math.PI)/a.p)*.5+a.c+n},easeInBack:function(e,t,i,n,r){return void 0===r&&(r=1.70158),i*(e/=n)*e*((r+1)*e-r)+t},easeOutBack:function(e,t,i,n,r){return void 0===r&&(r=1.70158),i*((e=e/n-1)*e*((r+1)*e+r)+1)+t},easeInOutBack:function(e,t,i,n,r){return void 0===r&&(r=1.70158),(e/=n/2)<1?i/2*(e*e*((1+(r*=1.525))*e-r))+t:i/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+t},easeInBounce:i,easeOutBounce:n,easeInOutBounce:function(e,t,r,o){return e<o/2?.5*i(2*e,0,r,o)+t:.5*n(2*e-o,0,r,o)+.5*r
78+t}}}(),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.object.clone,r=t.util.toFixed,o=t.util.parseUnit,s=t.util.multiplyTransformMatrices,a={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},l={stroke:"strokeOpacity",fill:"fillOpacity"},c="font-size",u="clip-path";function h(e){return e in a?a[e]:e}function d(e,i,n,r){var a,l="[object Array]"===Object.prototype.toString.call(i);
vendor: 4,668 bytes, line 78
78if("fill"!==e&&"stroke"!==e||"none"!==i){if("strokeUniform"===e)return"non-scaling-stroke"===i;if("strokeDashArray"===e)i="none"===i?null:i.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===e)i=n&&n.transformMatrix?s(n.transformMatrix,t.parseTransformAttribute(i)):t.parseTransformAttribute(i);else if("visible"===e)i="none"!==i&&"hidden"!==i,n&&!1===n.visible&&(i=!1);else if("opacity"===e)i=parseFloat(i),n&&void 0!==n.opacity&&(i*=n.opacity);else if("textAnchor"===e)i="start"===i?"left":"end"===i?"right":"center";else if("charSpacing"===e)a=o(i,r)/r*1e3;else if("paintFirst"===e){var c=i.indexOf("fill"),u=i.indexOf("stroke");i="fill",(c>-1&&u>-1&&u<c||-1===c&&u>-1)&&(i="stroke")}else{if("href"===e||"xlink:href"===e||"font"===e)return i;if("imageSmoothing"===e)return"optimizeQuality"===i;a=l?i.map(o):o(i,r)}}else i="";return!l&&isNaN(a)?i:a}function f(e){return new RegExp("^("+e.join("|")+")\\b","i")}function p(e,t){var i,n,r,o,s=[];for(r=0,o=t.length;r<o;r++)i=t[r],n=e.getElementsByTagName(i),s=s.concat(Array.prototype.slice.call(n));return s}function m(e,t){var i,n=!0;return(i=g(e,t.pop()))&&t.length&&(n=function(e,t){for(var i,n=!0;e.parentNode&&1===e.parentNode.nodeType&&t.length;)n&&(i=t.pop()),n=g(e=e.parentNode,i);return 0===t.length}(e,t)),i&&n&&0===t.length}function g(e,t){var i,n,r=e.nodeName,o=e.getAttribute("class"),s=e.getAttribute("id");if(i=new RegExp("^"+r,"i"),t=t.replace(i,""),s&&t.length&&(i=new RegExp("#"+s+"(?![a-zA-Z\\-]+)","i"),t=t.replace(i,"")),o&&t.length)for(n=(o=o.split(" ")).length;n--;)i=new RegExp("\\."+o[n]+"(?![a-zA-Z\\-]+)","i"),t=t.replace(i,"");return 0===t.length}function v(e,t){var i;if(e.getElementById&&(i=e.getElementById(t)),i)return i;var n,r,o,s=e.getElementsByTagName("*");for(r=0,o=s.length;r<o;r++)if(t===(n=s[r]).getAttribute("id"))return n}t.svgValidTagNamesRegEx=f(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),t.svgViewBoxElementsRegEx=f(["symbol","image","marker","pattern","view","svg"]),t.svgInvalidAncestorsRegEx=f(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),t.svgValidParentsRegEx=f(["symbol","g","a","svg","clipPath","defs"]),t.cssRules={},t.gradientDefs={},t.clipPaths={},t.parseTransformAttribute=function(){function e(e,i,n){e[n]=Math.tan(t.util.degreesToRadians(i[0]))}var i=t.iMatrix,n=t.reNum,r=t.commaWsp,o="(?:(?:(matrix)\\s*\\(\\s*("+n+")"+r+"("+n+")"+r+"("+n+")"+r+"("+n+")"+r+"("+n+")"+r+"("+n+")\\s*\\))|(?:(translate)\\s*\\(\\s*("+n+")(?:"+r+"("+n+"))?\\s*\\))|(?:(scale)\\s*\\(\\s*("+n+")(?:"+r+"("+n+"))?\\s*\\))|(?:(rotate)\\s*\\(\\s*("+n+")(?:"+r+"("+n+")"+r+"("+n+"))?\\s*\\))|(?:(skewX)\\s*\\(\\s*("+n+")\\s*\\))|(?:(skewY)\\s*\\(\\s*("+n+")\\s*\\)))",s=new RegExp("^\\s*(?:(?:"+o+"(?:"+r+"*"+o+")*)?)\\s*$"),a=new RegExp(o,"g");return function(n){var r=i.concat(),l=[];if(!n||n&&!s.test(n))return r;n.replace(a,function(n){var s=new RegExp(o).exec(n).filter(function(e){return!!e}),a=s[1],c=s.slice(2).map(parseFloat);switch(a){case"translate":!function(e,t){e[4]=t[0],2===t.length&&(e[5]=t[1])}(r,c);break;case"rotate":c[0]=t.util.degreesToRadians(c[0]),function(e,i){var n=t.util.cos(i[0]),r=t.util.sin(i[0]),o=0,s=0;3===i.length&&(o=i[1],s=i[2]),e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e[4]=o-(n*o-r*s),e[5]=s-(r*o+n*s)}(r,c);break;case"scale":!function(e,t){var i=t[0],n=2===t.length?t[1]:t[0];e[0]=i,e[3]=n}(r,c);break;case"skewX":e(r,c,2);break;case"skewY":e(r,c,1);break;case"matrix":r=c}l.push(r.concat()),r=i.concat()});for(var c=l[0];l.length>1;)l.shift(),c=t.util.multiplyTransformMatrices(c,l[0]);return c}}();var b=new RegExp("^\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*$");function y(e){if(!t.svgViewBoxElementsRegEx.test(e.nodeName))return{};var i,n,r,s,a,l,c=e.getAttribute("viewBox"),u=1,h=1,d=e.getAttribute("width"),f=e.getAttribute("height"),p=e.getAttribute("x")||0,m=e.getAttribute("y")||0,g=e.getAttribute("preserveAspectRatio")||"",v=!c||!(c=c.match(b)),y=!d||!f||"100%"===d||"100%"===f,w=v&&y,_={},k="",x=0,C=0;if(_.width=0,_.height=0,_.toBeParsed=w,v&&(p||m)&&e.parentNode&&"#document"!==e.parentNode.nodeName&&(k=" translate("+o(p)+" "+o(m)+") ",a=(e.getAttribute("transform")||"")+k,e.setAttribute("transform",a),e.removeAttribute("x"),e.removeAttribute("y")),w)return _;if(v)return _.width=o(d),_.height=o(f),_;if(i=-parseFloat(c[1]),n=-parseFloat(c[2]),r=parseFloat(c[3]),s=parseFloat(c[4]),_.minX=i,_.minY=n,_.viewBoxWidth=r,_.viewBoxHeight=s,y?(_.width=r,_.height=s):(_.width=o(d),_.height=o(f),u=_.width/r,h=_.height/s),"none"!==(g=t.util.parsePreserveAspectRatioAttribute(g)).alignX&&("meet"===g.meetOrSlice&&(h=u
vendor: 9,351 bytes, line 78
78=u>h?h:u),"slice"===g.meetOrSlice&&(h=u=u>h?u:h),x=_.width-r*u,C=_.height-s*u,"Mid"===g.alignX&&(x/=2),"Mid"===g.alignY&&(C/=2),"Min"===g.alignX&&(x=0),"Min"===g.alignY&&(C=0)),1===u&&1===h&&0===i&&0===n&&0===p&&0===m)return _;if((p||m)&&"#document"!==e.parentNode.nodeName&&(k=" translate("+o(p)+" "+o(m)+") "),a=k+" matrix("+u+" 0 0 "+h+" "+(i*u+x)+" "+(n*h+C)+") ","svg"===e.nodeName){for(l=e.ownerDocument.createElementNS(t.svgNS,"g");e.firstChild;)l.appendChild(e.firstChild);e.appendChild(l)}else(l=e).removeAttribute("x"),l.removeAttribute("y"),a=l.getAttribute("transform")+a;return l.setAttribute("transform",a),_}function w(e,t){var i="xlink:href",n=v(e,t.getAttribute(i).substr(1));if(n&&n.getAttribute(i)&&w(e,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach(function(e){n&&!t.hasAttribute(e)&&n.hasAttribute(e)&&t.setAttribute(e,n.getAttribute(e))}),!t.children.length)for(var r=n.cloneNode(!0);r.firstChild;)t.appendChild(r.firstChild);t.removeAttribute(i)}t.parseSVGDocument=function(e,i,r,o){if(e){!function(e){for(var i=p(e,["use","svg:use"]),n=0;i.length&&n<i.length;){var r=i[n],o=r.getAttribute("xlink:href")||r.getAttribute("href");if(null===o)return;var s,a,l,c,u=o.substr(1),h=r.getAttribute("x")||0,d=r.getAttribute("y")||0,f=v(e,u).cloneNode(!0),m=(f.getAttribute("transform")||"")+" translate("+h+", "+d+")",g=i.length,b=t.svgNS;if(y(f),/^svg$/i.test(f.nodeName)){var w=f.ownerDocument.createElementNS(b,"g");for(a=0,c=(l=f.attributes).length;a<c;a++)s=l.item(a),w.setAttributeNS(b,s.nodeName,s.nodeValue);for(;f.firstChild;)w.appendChild(f.firstChild);f=w}for(a=0,c=(l=r.attributes).length;a<c;a++)"x"!==(s=l.item(a)).nodeName&&"y"!==s.nodeName&&"xlink:href"!==s.nodeName&&"href"!==s.nodeName&&("transform"===s.nodeName?m=s.nodeValue+" "+m:f.setAttribute(s.nodeName,s.nodeValue));f.setAttribute("transform",m),f.setAttribute("instantiated_by_use","1"),f.removeAttribute("id"),r.parentNode.replaceChild(f,r),i.length===g&&n++}}(e);var s,a,l=t.Object.__uid++,c=y(e),u=t.util.toArray(e.getElementsByTagName("*"));if(c.crossOrigin=o&&o.crossOrigin,c.svgUid=l,0===u.length&&t.isLikelyNode){var h=[];for(s=0,a=(u=e.selectNodes('//*[name(.)!="svg"]')).length;s<a;s++)h[s]=u[s];u=h}var d=u.filter(function(e){return y(e),t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))&&!function(e,t){for(;e&&(e=e.parentNode);)if(e.nodeName&&t.test(e.nodeName.replace("svg:",""))&&!e.getAttribute("instantiated_by_use"))return!0;return!1}(e,t.svgInvalidAncestorsRegEx)});if(!d||d&&!d.length)i&&i([],{});else{var f={};u.filter(function(e){return"clipPath"===e.nodeName.replace("svg:","")}).forEach(function(e){var i=e.getAttribute("id");f[i]=t.util.toArray(e.getElementsByTagName("*")).filter(function(e){return t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))})}),t.gradientDefs[l]=t.getGradientDefs(e),t.cssRules[l]=t.getCSSRules(e),t.clipPaths[l]=f,t.parseElements(d,function(e,n){i&&(i(e,c,n,u),delete t.gradientDefs[l],delete t.cssRules[l],delete t.clipPaths[l])},n(c),r,o)}}};var _=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+t.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+t.reNum+"))?\\s+(.*)");i(t,{parseFontDeclaration:function(e,t){var i=e.match(_);if(i){var n=i[1],r=i[3],s=i[4],a=i[5],l=i[6];n&&(t.fontStyle=n),r&&(t.fontWeight=isNaN(parseFloat(r))?r:parseFloat(r)),s&&(t.fontSize=o(s)),l&&(t.fontFamily=l),a&&(t.lineHeight="normal"===a?1:a)}},getGradientDefs:function(e){var t,i=p(e,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),n=0,r={};for(n=i.length;n--;)(t=i[n]).getAttribute("xlink:href")&&w(e,t),r[t.getAttribute("id")]=t;return r},parseAttributes:function(e,n,s){if(e){var a,f,p,g={};void 0===s&&(s=e.getAttribute("svgUid")),e.parentNode&&t.svgValidParentsRegEx.test(e.parentNode.nodeName)&&(g=t.parseAttributes(e.parentNode,n,s));var v=n.reduce(function(t,i){return(a=e.getAttribute(i))&&(t[i]=a),t},{}),b=i(function(e,i){var n={};for(var r in t.cssRules[i])if(m(e,r.split(" ")))for(var o in t.cssRules[i][r])n[o]=t.cssRules[i][r][o];return n}(e,s),t.parseStyleAttribute(e));v=i(v,b),b[u]&&e.setAttribute(u,b[u]),f=p=g.fontSize||t.Text.DEFAULT_SVG_FONT_SIZE,v[c]&&(v[c]=f=o(v[c],p));var y,w,_={};for(var k in v)w=d(y=h(k),v[k],g,f),_[y]=w;_&&_.font&&t.parseFontDeclaration(_.font,_);var x=i(g,_);return t.svgValidParentsRegEx.test(e.nodeName)?x:function(e){for(var i in l)if(void 0!==e[l[i]]&&""!==e[i]){if(void 0===e[i]){if(!t.Object.prototype[i])continue;e[i]=t.Object.prototype[i]}if(0!==e[i].indexOf("url(")){var n=new t.Color(e[i]);e[i]=n.setAlpha(r(n.getAlpha()*e[l[i]],2)).toRgba()}}return e}(x)}},parseElements:function(e,i,n,r,o){new t.ElementsParser(e,i,n,r,o).parse()},parseStyleAttribute:function(e){var t={},i=e.getAttribute("style");return i?("string"==typeof i?function(e,t){var i,n;e.replace(/;\s*$/,"").split(";").forEach(function(e){var r=e.split(":");i=r[0].trim().toLowerCase(),n=r[1].trim(),t[i]=n})}(i,t):function(e,t){var i,n;for(var r in e)void 0!==e[r]&&(i=r.toLowerCase(),n=e[r],t[i]=n)}(i,t),t):t},parsePointsAttribute:function(e){if(!e)return null;var t,i,n=[];for(t=0,i=(e=(e=e.replace(/,/g," ").trim()).split(/\s+/)).length;t<i;t+=2)n.push({x:parseFloat(e[t]),y:parseFloat(e[t+1])});return n},getCSSRules:function(e){var i,n,r=e.getElementsByTagName("style"),o={};for(i=0,n=r.length;i<n;i++){var s=r[i].textContent;""!==(s=s.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&s.match(/[^{]*\{[\s\S]*?\}/g).map(function(e){return e.trim()}).forEach(function(e){var r=e.match(/([\s\S]*?)\s*\{([^}]*)\}/),s={},a=r[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(i=0,n=a.length;i<n;i++){var l=a[i].split(/\s*:\s*/),c=l[0],u=l[1];s[c]=u}(e=r[1]).split(",").forEach(function(e){""!==(e=e.replace(/^svg/i,"").trim())&&(o[e]?t.util.object.extend(o[e],s):o[e]=t.util.object.clone(s))})})}return o},loadSVGFromURL:function(e,i,n,r){e=e.replace(/^\n\s*/,"").trim(),new t.util.request(e,{method:"get",onComplete:function(e){var o=e.responseXML;if(!o||!o.documentElement)return i&&i(null),!1;t.parseSVGDocument(o.documentElement,function(e,t,n,r){i&&i(e,t,n,r)},n,r)}})},loadSVGFromString:function(e,i,n,r){var o=(new t.window.DOMParser).parseFromString(e.trim(),"text/xml");t.parseSVGDocument(o.documentElement,function(e,t,n,r){i(e,t,n,r)},n,r)}})}(t),w.ElementsParser=function(e,t,i,n,r,o){this.elements=e,this.callback=t,this.options=i,this.reviver=n,this.svgUid=i&&i.svgUid||0,this.parsingOptions=r,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=o},(h=w.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},h.createObjects=function(){var e=this;this.elements.forEach(function(t,i){t.setAttribute("svgUid",e.svgUid),e.createObject(t,i)})},h.findTag=function(e){return w[w.util.string.capitalize(e.tagName.replace("svg:",""))]},h.createObject=function(e,t){var i=this.findTag(e);if(i&&i.fromElement)try{i.fromElement(e,this.createCallback(t,e),this.options)}catch(e){w.log(e)}else this.checkIfDone()},h.createCallback=function(e,t){var i=this;return function(n){var r;i.resolveGradient(n,t,"fill"),i.resolveGradient(n,t,"stroke"),n instanceof w.Image&&n._originalElement&&(r=n.parsePreserveAspectRatioAttribute(t)),n._removeTransformMatrix(r),i.resolveClipPath(n,t),i.reviver&&i.reviver(t,n),i.instances[e]=n,i.checkIfDone()}},h.extractPropertyDefinition=function(e,t,i){var n=e[t],r=this.regexUrl;if(r.test(n)){r.lastIndex=0;var o=r.exec(n)[1];return r.lastIndex=0,w[i][this.svgUid][o]}},h.resolveGradient=function(e,t,i){var n=this.extractPropertyDefinition(e,i,"gradientDefs");if(n){var r=t.getAttribute(i+"-opacity"),o=w.Gradient.fromElement(n,e,r,this.options);e.set(i,o)}},h.createClipPathCallback=function(e,t){return function(e){e._removeTransformMatrix(),e.fillRule=e.clipRule,t.push(e)}},h.resolveClipPath=function(e,t){var i,n,r,o,s=this.extractPropertyDefinition(e,"clipPath","clipPaths");if(s){r=[],n=w.util.invertTransform(e.calcTransformMatrix());for(var a=s[0].parentNode,l=t;l.parentNode&&l.getAttribute("clip-path")!==e.clipPath;)l=l.parentNode;l.parentNode.appendChild(a);for(var c=0;c<s.length;c++)i=s[c],this.findTag(i).fromElement(i,this.createClipPathCallback(e,r),this.options);s=1===r.length?r[0]:new w.Group(r),o=w.util.multiplyTransformMatrices(n,s.calcTransformMatrix()),s.clipPath&&this.resolveClipPath(s,l);var u=w.util.qrDecompose(o);s.flipX=!1,s.flipY=!1,s.set("scaleX",u.scaleX),s.set("scaleY",u.scaleY),s.angle=u.angle,s.skewX=u.skewX,s.skewY=0,s.setPositionByOrigin({x:u.translateX,y:u.translateY},"center","center"),e.clipPath=s}else delete e.clipPath},h.checkIfDone=function(){0===--this.numElements&&(this.instances=this.instances.filter(function(e){return null!=e}),this.callback(this.instances,this.elements))},function(e){"use strict";var t=e.fabric||(e.fabric={});function i(e,t){this.x=e,this.y=t}t.Point?t.warn("fabric.Point is already defined"):(t.Point=i,i.prototype={type:"point",constructor:i,add:function(e){return new i(this.x+e.x,this.y+e.y)},addEquals:function(e){return this.x+=e.x,this.y+=e.y,this},scalarAdd:function(e){return new i(this.x+e,this.y+e)},scalarAddEquals:function(e){return this.x+=e,this.y+=e,this},subtract:function(e){return new i(this.x-e.x,this.y-e.y)}
vendor: 4,274 bytes, line 78
78,subtractEquals:function(e){return this.x-=e.x,this.y-=e.y,this},scalarSubtract:function(e){return new i(this.x-e,this.y-e)},scalarSubtractEquals:function(e){return this.x-=e,this.y-=e,this},multiply:function(e){return new i(this.x*e,this.y*e)},multiplyEquals:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return new i(this.x/e,this.y/e)},divideEquals:function(e){return this.x/=e,this.y/=e,this},eq:function(e){return this.x===e.x&&this.y===e.y},lt:function(e){return this.x<e.x&&this.y<e.y},lte:function(e){return this.x<=e.x&&this.y<=e.y},gt:function(e){return this.x>e.x&&this.y>e.y},gte:function(e){return this.x>=e.x&&this.y>=e.y},lerp:function(e,t){return void 0===t&&(t=.5),t=Math.max(Math.min(1,t),0),new i(this.x+(e.x-this.x)*t,this.y+(e.y-this.y)*t)},distanceFrom:function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},midPointFrom:function(e){return this.lerp(e)},min:function(e){return new i(Math.min(this.x,e.x),Math.min(this.y,e.y))},max:function(e){return new i(Math.max(this.x,e.x),Math.max(this.y,e.y))},toString:function(){return this.x+","+this.y},setXY:function(e,t){return this.x=e,this.y=t,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setFromPoint:function(e){return this.x=e.x,this.y=e.y,this},swap:function(e){var t=this.x,i=this.y;this.x=e.x,this.y=e.y,e.x=t,e.y=i},clone:function(){return new i(this.x,this.y)}})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});function i(e){this.status=e,this.points=[]}t.Intersection?t.warn("fabric.Intersection is already defined"):(t.Intersection=i,t.Intersection.prototype={constructor:i,appendPoint:function(e){return this.points.push(e),this},appendPoints:function(e){return this.points=this.points.concat(e),this}},t.Intersection.intersectLineLine=function(e,n,r,o){var s,a=(o.x-r.x)*(e.y-r.y)-(o.y-r.y)*(e.x-r.x),l=(n.x-e.x)*(e.y-r.y)-(n.y-e.y)*(e.x-r.x),c=(o.y-r.y)*(n.x-e.x)-(o.x-r.x)*(n.y-e.y);if(0!==c){var u=a/c,h=l/c;0<=u&&u<=1&&0<=h&&h<=1?(s=new i("Intersection")).appendPoint(new t.Point(e.x+u*(n.x-e.x),e.y+u*(n.y-e.y))):s=new i}else s=new i(0===a||0===l?"Coincident":"Parallel");return s},t.Intersection.intersectLinePolygon=function(e,t,n){var r,o,s,a,l=new i,c=n.length;for(a=0;a<c;a++)r=n[a],o=n[(a+1)%c],s=i.intersectLineLine(e,t,r,o),l.appendPoints(s.points);return l.points.length>0&&(l.status="Intersection"),l},t.Intersection.intersectPolygonPolygon=function(e,t){var n,r=new i,o=e.length;for(n=0;n<o;n++){var s=e[n],a=e[(n+1)%o],l=i.intersectLinePolygon(s,a,t);r.appendPoints(l.points)}return r.points.length>0&&(r.status="Intersection"),r},t.Intersection.intersectPolygonRectangle=function(e,n,r){var o=n.min(r),s=n.max(r),a=new t.Point(s.x,o.y),l=new t.Point(o.x,s.y),c=i.intersectLinePolygon(o,a,e),u=i.intersectLinePolygon(a,s,e),h=i.intersectLinePolygon(s,l,e),d=i.intersectLinePolygon(l,o,e),f=new i;return f.appendPoints(c.points),f.appendPoints(u.points),f.appendPoints(h.points),f.appendPoints(d.points),f.points.length>0&&(f.status="Intersection"),f})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});function i(e){e?this._tryParsingColor(e):this.setSource([0,0,0,1])}function n(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}t.Color?t.warn("fabric.Color is already defined."):(t.Color=i,t.Color.prototype={_tryParsingColor:function(e){var t;e in i.colorNameMap&&(e=i.colorNameMap[e]),"transparent"===e&&(t=[255,255,255,0]),t||(t=i.sourceFromHex(e)),t||(t=i.sourceFromRgb(e)),t||(t=i.sourceFromHsl(e)),t||(t=[0,0,0,1]),t&&this.setSource(t)},_rgbToHsl:function(e,i,n){e/=255,i/=255,n/=255;var r,o,s,a=t.util.array.max([e,i,n]),l=t.util.array.min([e,i,n]);if(s=(a+l)/2,a===l)r=o=0;else{var c=a-l;switch(o=s>.5?c/(2-a-l):c/(a+l),a){case e:r=(i-n)/c+(i<n?6:0);break;case i:r=(n-e)/c+2;break;case n:r=(e-i)/c+4}r/=6}return[Math.round(360*r),Math.round(100*o),Math.round(100*s)]},getSource:function(){return this._source},setSource:function(e){this._source=e},toRgb:function(){var e=this.getSource();return"rgb("+e[0]+","+e[1]+","+e[2]+")"},toRgba:function(){var e=this.getSource();return"rgba("+e[0]+","+e[1]+","+e[2]+","+e[3]+")"},toHsl:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsl("+t[0]+","+t[1]+"%,"+t[2]+"%)"}
vendor: 8,724 bytes, line 78
78,toHsla:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsla("+t[0]+","+t[1]+"%,"+t[2]+"%,"+e[3]+")"},toHex:function(){var e,t,i,n=this.getSource();return e=1===(e=n[0].toString(16)).length?"0"+e:e,t=1===(t=n[1].toString(16)).length?"0"+t:t,i=1===(i=n[2].toString(16)).length?"0"+i:i,e.toUpperCase()+t.toUpperCase()+i.toUpperCase()},toHexa:function(){var e,t=this.getSource();return e=1===(e=(e=Math.round(255*t[3])).toString(16)).length?"0"+e:e,this.toHex()+e.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(e){var t=this.getSource();return t[3]=e,this.setSource(t),this},toGrayscale:function(){var e=this.getSource(),t=parseInt((.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),10),i=e[3];return this.setSource([t,t,t,i]),this},toBlackWhite:function(e){var t=this.getSource(),i=(.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),n=t[3];return e=e||127,i=Number(i)<Number(e)?0:255,this.setSource([i,i,i,n]),this},overlayWith:function(e){e instanceof i||(e=new i(e));var t,n=[],r=this.getAlpha(),o=this.getSource(),s=e.getSource();for(t=0;t<3;t++)n.push(Math.round(.5*o[t]+.5*s[t]));return n[3]=r,this.setSource(n),this}},t.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,t.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,t.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,t.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},t.Color.fromRgb=function(e){return i.fromSource(i.sourceFromRgb(e))},t.Color.sourceFromRgb=function(e){var t=e.match(i.reRGBa);if(t){var n=parseInt(t[1],10)/(/%$/.test(t[1])?100:1)*(/%$/.test(t[1])?255:1),r=parseInt(t[2],10)/(/%$/.test(t[2])?100:1)*(/%$/.test(t[2])?255:1),o=parseInt(t[3],10)/(/%$/.test(t[3])?100:1)*(/%$/.test(t[3])?255:1);return[parseInt(n,10),parseInt(r,10),parseInt(o,10),t[4]?parseFloat(t[4]):1]}},t.Color.fromRgba=i.fromRgb,t.Color.fromHsl=function(e){return i.fromSource(i.sourceFromHsl(e))},t.Color.sourceFromHsl=function(e){var t=e.match(i.reHSLa);if(t){var r,o,s,a=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),c=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===l)r=o=s=c;else{var u=c<=.5?c*(l+1):c+l-c*l,h=2*c-u;r=n(h,u,a+1/3),o=n(h,u,a),s=n(h,u,a-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*s),t[4]?parseFloat(t[4]):1]}},t.Color.fromHsla=i.fromHsl,t.Color.fromHex=function(e){return i.fromSource(i.sourceFromHex(e))},t.Color.sourceFromHex=function(e){if(e.match(i.reHex)){var t=e.slice(e.indexOf("#")+1),n=3===t.length||4===t.length,r=8===t.length||4===t.length,o=n?t.charAt(0)+t.charAt(0):t.substring(0,2),s=n?t.charAt(1)+t.charAt(1):t.substring(2,4),a=n?t.charAt(2)+t.charAt(2):t.substring(4,6),l=r?n?t.charAt(3)+t.charAt(3):t.substring(6,8):"FF";return[parseInt(o,16),parseInt(s,16),parseInt(a,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},t.Color.fromSource=function(e){var t=new i;return t.setSource(e),t})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=["e","se","s","sw","w","nw","n","ne","e"],n=["ns","nesw","ew","nwse"],r={},o="left",s="top",a="right",l="bottom",c="center",u={top:l,bottom:s,left:a,right:o,center:c},h=t.util.radiansToDegrees,d=Math.sign||function(e){return(e>0)-(e<0)||+e};function f(e,t){var i=e.angle+h(Math.atan2(t.y,t.x))+360;return Math.round(i%360/45)}function p(e,i){var n=i.transform.target,r=n.canvas,o=t.util.object.clone(i);o.target=n,r&&r.fire("object:"+e,o),n.fire(e,i)}function m(e,t){var i=t.canvas,n=e[i.uniScaleKey];return i.uniformScaling&&!n||!i.uniformScaling&&n}function g(e){return e.originX===c&&e.originY===c}function v(e,t,i){var n=e.lockScalingX,r=e.lockScalingY;return!((!n||!r)&&(t||!n&&!r||!i)&&(!n||"x"!==t)&&(!r||"y"!==t))}function b(e,t,i,n){return{e:e,transform:t,pointer:{x:i,y:n}}}function y(e){return function(t,i,n,r){var o=i.target,s=o.getCenterPoint(),a=o.translateToOriginPoint(s,i.originX,i.originY),l=e(t,i,n,r);return o.setPositionByOrigin(a,i.originX,i.originY),l}}function w(e,t){return function(i,n,r,o){var s=t(i,n,r,o);return s&&p(e,b(i,n,r,o)),s}}function _(e,i,n,r,o){var s=e.target,a=s.controls[e.corner],l=s.canvas.getZoom(),c=s.padding/l,u=s.toLocalPoint(new t.Point(r,o),i,n);return u.x>=c&&(u.x-=c),u.x<=-c&&(u.x+=c),u.y>=c&&(u.y-=c),u.y<=c&&(u.y+=c),u.x-=a.offsetX,u.y-=a.offsetY,u}function k(e){return e.flipX!==e.flipY}function x(e,t,i,n,r){if(0!==e[t]){var o=r/e._getTransformedDimensions()[n]*e[i];e.set(i,o)}}function C(e,t,i,n){var r,c=t.target,u=c._getTransformedDimensions(0,c.skewY),d=_(t,t.originX,t.originY,i,n),f=Math.abs(2*d.x)-u.x,p=c.skewX;f<2?r=0:(r=h(Math.atan2(f/c.scaleX,u.y/c.scaleY)),t.originX===o&&t.originY===l&&(r=-r),t.originX===a&&t.originY===s&&(r=-r),k(c)&&(r=-r));var m=p!==r;if(m){var g=c._getTransformedDimensions().y;c.set("skewX",r),x(c,"skewY","scaleY","y",g)}return m}function S(e,t,i,n){var r,c=t.target,u=c._getTransformedDimensions(c.skewX,0),d=_(t,t.originX,t.originY,i,n),f=Math.abs(2*d.y)-u.y,p=c.skewY;f<2?r=0:(r=h(Math.atan2(f/c.scaleY,u.x/c.scaleX)),t.originX===o&&t.originY===l&&(r=-r),t.originX===a&&t.originY===s&&(r=-r),k(c)&&(r=-r));var m=p!==r;if(m){var g=c._getTransformedDimensions().x;c.set("skewY",r),x(c,"skewX","scaleX","x",g)}return m}function E(e,t,i,n,r){r=r||{};var o,s,a,l,c,h,f=t.target,p=f.lockScalingX,b=f.lockScalingY,y=r.by,w=m(e,f),k=v(f,y,w),x=t.gestureScale;if(k)return!1;if(x)s=t.scaleX*x,a=t.scaleY*x;else{if(o=_(t,t.originX,t.originY,i,n),c="y"!==y?d(o.x):1,h="x"!==y?d(o.y):1,t.signX||(t.signX=c),t.signY||(t.signY=h),f.lockScalingFlip&&(t.signX!==c||t.signY!==h))return!1;if(l=f._getTransformedDimensions(),w&&!y){var C=Math.abs(o.x)+Math.abs(o.y),S=t.original,E=C/(Math.abs(l.x*S.scaleX/f.scaleX)+Math.abs(l.
vendor: 4,229 bytes, line 78
78y*S.scaleY/f.scaleY));s=S.scaleX*E,a=S.scaleY*E}else s=Math.abs(o.x*f.scaleX/l.x),a=Math.abs(o.y*f.scaleY/l.y);g(t)&&(s*=2,a*=2),t.signX!==c&&"y"!==y&&(t.originX=u[t.originX],s*=-1,t.signX=c),t.signY!==h&&"x"!==y&&(t.originY=u[t.originY],a*=-1,t.signY=h)}var T=f.scaleX,A=f.scaleY;return y?("x"===y&&f.set("scaleX",s),"y"===y&&f.set("scaleY",a)):(!p&&f.set("scaleX",s),!b&&f.set("scaleY",a)),T!==f.scaleX||A!==f.scaleY}r.scaleCursorStyleHandler=function(e,t,n){var r=m(e,n),o="";if(0!==t.x&&0===t.y?o="x":0===t.x&&0!==t.y&&(o="y"),v(n,o,r))return"not-allowed";var s=f(n,t);return i[s]+"-resize"},r.skewCursorStyleHandler=function(e,t,i){var r="not-allowed";if(0!==t.x&&i.lockSkewingY)return r;if(0!==t.y&&i.lockSkewingX)return r;var o=f(i,t)%4;return n[o]+"-resize"},r.scaleSkewCursorStyleHandler=function(e,t,i){return e[i.canvas.altActionKey]?r.skewCursorStyleHandler(e,t,i):r.scaleCursorStyleHandler(e,t,i)},r.rotationWithSnapping=w("rotating",y(function(e,t,i,n){var r=t,o=r.target,s=o.translateToOriginPoint(o.getCenterPoint(),r.originX,r.originY);if(o.lockRotation)return!1;var a,l=Math.atan2(r.ey-s.y,r.ex-s.x),c=Math.atan2(n-s.y,i-s.x),u=h(c-l+r.theta);if(o.snapAngle>0){var d=o.snapAngle,f=o.snapThreshold||d,p=Math.ceil(u/d)*d,m=Math.floor(u/d)*d;Math.abs(u-m)<f?u=m:Math.abs(u-p)<f&&(u=p)}return u<0&&(u=360+u),u%=360,a=o.angle!==u,o.angle=u,a})),r.scalingEqually=w("scaling",y(function(e,t,i,n){return E(e,t,i,n)})),r.scalingX=w("scaling",y(function(e,t,i,n){return E(e,t,i,n,{by:"x"})})),r.scalingY=w("scaling",y(function(e,t,i,n){return E(e,t,i,n,{by:"y"})})),r.scalingYOrSkewingX=function(e,t,i,n){return e[t.target.canvas.altActionKey]?r.skewHandlerX(e,t,i,n):r.scalingY(e,t,i,n)},r.scalingXOrSkewingY=function(e,t,i,n){return e[t.target.canvas.altActionKey]?r.skewHandlerY(e,t,i,n):r.scalingX(e,t,i,n)},r.changeWidth=w("resizing",y(function(e,t,i,n){var r=t.target,o=_(t,t.originX,t.originY,i,n),s=r.strokeWidth/(r.strokeUniform?r.scaleX:1),a=g(t)?2:1,l=r.width,c=Math.abs(o.x*a/r.scaleX)-s;return r.set("width",Math.max(c,0)),l!==c})),r.skewHandlerX=function(e,t,i,n){var r,l=t.target,u=l.skewX,h=t.originY;return!l.lockSkewingX&&(0===u?r=_(t,c,c,i,n).x>0?o:a:(u>0&&(r=h===s?o:a),u<0&&(r=h===s?a:o),k(l)&&(r=r===o?a:o)),t.originX=r,w("skewing",y(C))(e,t,i,n))},r.skewHandlerY=function(e,t,i,n){var r,a=t.target,u=a.skewY,h=t.originX;return!a.lockSkewingY&&(0===u?r=_(t,c,c,i,n).y>0?s:l:(u>0&&(r=h===o?s:l),u<0&&(r=h===o?l:s),k(a)&&(r=r===s?l:s)),t.originY=r,w("skewing",y(S))(e,t,i,n))},r.dragHandler=function(e,t,i,n){var r=t.target,o=i-t.offsetX,s=n-t.offsetY,a=!r.get("lockMovementX")&&r.left!==o,l=!r.get("lockMovementY")&&r.top!==s;return a&&r.set("left",o),l&&r.set("top",s),(a||l)&&p("moving",b(e,t,i,n)),a||l},r.scaleOrSkewActionName=function(e,t,i){var n=e[i.canvas.altActionKey];return 0===t.x?n?"skewX":"scaleY":0===t.y?n?"skewY":"scaleX":void 0},r.rotationStyleHandler=function(e,t,i){return i.lockRotation?"not-allowed":t.cursorStyle},r.fireEvent=p,r.wrapWithFixedAnchor=y,r.wrapWithFireEvent=w,r.getLocalPoint=_,t.controlsUtils=r}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.degreesToRadians,n=t.controlsUtils;n.renderCircleControl=function(e,t,i,n,r){n=n||{};var o,s=this.sizeX||n.cornerSize||r.cornerSize,a=this.sizeY||n.cornerSize||r.cornerSize,l=void 0!==n.transparentCorners?n.transparentCorners:r.transparentCorners,c=l?"stroke":"fill",u=!l&&(n.cornerStrokeColor||r.cornerStrokeColor),h=t,d=i;e.save(),e.fillStyle=n.cornerColor||r.cornerColor,e.strokeStyle=n.cornerStrokeColor||r.cornerStrokeColor,s>a?(o=s,e.scale(1,a/s),d=i*s/a):a>s?(o=a,e.scale(s/a,1),h=t*a/s):o=s,e.lineWidth=1,e.beginPath(),e.arc(h,d,o/2,0,2*Math.PI,!1),e[c](),u&&e.stroke(),e.restore()},n.renderSquareControl=function(e,t,n,r,o){r=r||{};var s=this.sizeX||r.cornerSize||o.cornerSize,a=this.sizeY||r.cornerSize||o.cornerSize,l=void 0!==r.transparentCorners?r.transparentCorners:o.transparentCorners,c=l?"stroke":"fill",u=!l&&(r.cornerStrokeColor||o.cornerStrokeColor),h=s/2,d=a/2;e.save(),e.fillStyle=r.cornerColor||o.cornerColor,e.strokeStyle=r.cornerStrokeColor||o.cornerStrokeColor,e.lineWidth=1,e.translate(t,n),e.rotate(i(o.angle)),e[c+"Rect"](-h,-d,s,a),u&&e.strokeRect(-h,-d,s,a),e.restore(
vendor: 4,624 bytes, line 78
78)}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Control=function(e){for(var t in e)this[t]=e[t]},t.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(e,t){return t.cursorStyle},getActionName:function(e,t){return t.actionName},getVisibility:function(e,t){var i=e._controlsVisibility;return i&&void 0!==i[t]?i[t]:this.visible},setVisibility:function(e){this.visible=e},positionHandler:function(e,i){return t.util.transformPoint({x:this.x*e.x+this.offsetX,y:this.y*e.y+this.offsetY},i)},calcCornerCoords:function(e,i,n,r,o){var s,a,l,c,u=o?this.touchSizeX:this.sizeX,h=o?this.touchSizeY:this.sizeY;if(u&&h&&u!==h){var d=Math.atan2(h,u),f=Math.sqrt(u*u+h*h)/2,p=d-t.util.degreesToRadians(e),m=Math.PI/2-d-t.util.degreesToRadians(e);s=f*t.util.cos(p),a=f*t.util.sin(p),l=f*t.util.cos(m),c=f*t.util.sin(m)}else f=.7071067812*(u&&h?u:i),p=t.util.degreesToRadians(45-e),s=l=f*t.util.cos(p),a=c=f*t.util.sin(p);return{tl:{x:n-c,y:r-l},tr:{x:n+s,y:r-a},bl:{x:n-s,y:r+a},br:{x:n+c,y:r+l}}},render:function(e,i,n,r,o){"circle"===((r=r||{}).cornerStyle||o.cornerStyle)?t.controlsUtils.renderCircleControl.call(this,e,i,n,r,o):t.controlsUtils.renderSquareControl.call(this,e,i,n,r,o)}}}(t),function(){function e(e,t){var i,n,r,o,s=e.getAttribute("style"),a=e.getAttribute("offset")||0;if(a=(a=parseFloat(a)/(/%$/.test(a)?100:1))<0?0:a>1?1:a,s){var l=s.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),o=l.length;o--;){var c=l[o].split(/\s*:\s*/),u=c[0].trim(),h=c[1].trim();"stop-color"===u?i=h:"stop-opacity"===u&&(r=h)}}return i||(i=e.getAttribute("stop-color")||"rgb(0,0,0)"),r||(r=e.getAttribute("stop-opacity")),n=(i=new w.Color(i)).getAlpha(),r=isNaN(parseFloat(r))?1:parseFloat(r),r*=n*t,{offset:a,color:i.toRgb(),opacity:r}}var t=w.util.object.clone;w.Gradient=w.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(e){e||(e={}),e.coords||(e.coords={});var t,i=this;Object.keys(e).forEach(function(t){i[t]=e[t]}),this.id?this.id+="_"+w.Object.__uid++:this.id=w.Object.__uid++,t={x1:e.coords.x1||0,y1:e.coords.y1||0,x2:e.coords.x2||0,y2:e.coords.y2||0},"radial"===this.type&&(t.r1=e.coords.r1||0,t.r2=e.coords.r2||0),this.coords=t,this.colorStops=e.colorStops.slice()},addColorStop:function(e){for(var t in e){var i=new w.Color(e[t]);this.colorStops.push({offset:parseFloat(t),color:i.toRgb(),opacity:i.getAlpha()})}return this},toObject:function(e){var t={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return w.util.populateWithProperties(this,t,e),t},toSVG:function(e,i){var n,r,o,s,a=t(this.coords,!0),l=(i=i||{},t(this.colorStops,!0)),c=a.r1>a.r2,u=this.gradientTransform?this.gradientTransform.concat():w.iMatrix.concat(),h=-this.offsetX,d=-this.offsetY,f=!!i.additionalTransform,p="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort(function(e,t){return e.offset-t.offset}),"objectBoundingBox"===p?(h/=e.width,d/=e.height):(h+=e.width/2,d+=e.height/2),"path"===e.type&&"percentage"!==this.gradientUnits&&(h-=e.pathOffset.x,d-=e.pathOffset.y),u[4]-=h,u[5]-=d,s='id="SVGID_'+this.id+'" gradientUnits="'+p+'"',s+=' gradientTransform="'+(f?i.additionalTransform+" ":"")+w.util.matrixToSVG(u)+'" ',"linear"===this.type?o=["<linearGradient ",s,' x1="',a.x1,'" y1="',a.y1,'" x2="',a.x2,'" y2="',a.y2,'">\n']:"radial"===this.type&&(o=["<radialGradient ",s,' cx="',c?a.x1:a.x2,'" cy="',c?a.y1:a.y2,'" r="',c?a.r1:a.r2,'" fx="',c?a.x2:a.x1,'" fy="',c?a.y2:a.y1,'">\n']),"radial"===this.type){if(c)for((l=l.concat()).reverse(),n=0,r=l.length;n<r;n++)l[n].offset=1-l[n].offset;var m=Math.min(a.r1,a.r2);if(m>0){var g=m/Math.max(a.r1,a.r2);for(n=0,r=l.length;n<r;n++)l[n].offset+=g*(1-l[n].offset)}}for(n=0,r=l.length;n<r;n++){var v=l[n];o.push("<stop ",'offset="',100*v.offset+"%",'" style="stop-color:',v.color,void 0!==v.opacity?";stop-opacity: "+v.opacity:";",'"/>\n')}return o.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),o.join("")},toLive:function(e){var t,i,n,r=w.util.object.clone(this.coords);
vendor: 4,814 bytes, line 78
78if(this.type){for("linear"===this.type?t=e.createLinearGradient(r.x1,r.y1,r.x2,r.y2):"radial"===this.type&&(t=e.createRadialGradient(r.x1,r.y1,r.r1,r.x2,r.y2,r.r2)),i=0,n=this.colorStops.length;i<n;i++){var o=this.colorStops[i].color,s=this.colorStops[i].opacity,a=this.colorStops[i].offset;void 0!==s&&(o=new w.Color(o).setAlpha(s).toRgba()),t.addColorStop(a,o)}return t}}}),w.util.object.extend(w.Gradient,{fromElement:function(t,i,n,r){var o=parseFloat(n)/(/%$/.test(n)?100:1);o=o<0?0:o>1?1:o,isNaN(o)&&(o=1);var s,a,l,c,u=t.getElementsByTagName("stop"),h="userSpaceOnUse"===t.getAttribute("gradientUnits")?"pixels":"percentage",d=t.getAttribute("gradientTransform")||"",f=[],p=0,m=0;for("linearGradient"===t.nodeName||"LINEARGRADIENT"===t.nodeName?(s="linear",a=function(e){return{x1:e.getAttribute("x1")||0,y1:e.getAttribute("y1")||0,x2:e.getAttribute("x2")||"100%",y2:e.getAttribute("y2")||0}}(t)):(s="radial",a=function(e){return{x1:e.getAttribute("fx")||e.getAttribute("cx")||"50%",y1:e.getAttribute("fy")||e.getAttribute("cy")||"50%",r1:0,x2:e.getAttribute("cx")||"50%",y2:e.getAttribute("cy")||"50%",r2:e.getAttribute("r")||"50%"}}(t)),l=u.length;l--;)f.push(e(u[l],o));return c=w.parseTransformAttribute(d),function(e,t,i,n){var r,o;Object.keys(t).forEach(function(e){"Infinity"===(r=t[e])?o=1:"-Infinity"===r?o=0:(o=parseFloat(t[e],10),"string"==typeof r&&/^(\d+\.\d+)%|(\d+)%$/.test(r)&&(o*=.01,"pixels"===n&&("x1"!==e&&"x2"!==e&&"r2"!==e||(o*=i.viewBoxWidth||i.width),"y1"!==e&&"y2"!==e||(o*=i.viewBoxHeight||i.height)))),t[e]=o})}(0,a,r,h),"pixels"===h&&(p=-i.left,m=-i.top),new w.Gradient({id:t.getAttribute("id"),type:s,coords:a,colorStops:f,gradientUnits:h,gradientTransform:c,offsetX:p,offsetY:m})}})}(),function(){"use strict";var e=w.util.toFixed;w.Pattern=w.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(e,t){if(e||(e={}),this.id=w.Object.__uid++,this.setOptions(e),!e.source||e.source&&"string"!=typeof e.source)t&&t(this);else{var i=this;this.source=w.util.createImage(),w.util.loadImage(e.source,function(e,n){i.source=e,t&&t(i,n)},null,this.crossOrigin)}},toObject:function(t){var i,n,r=w.Object.NUM_FRACTION_DIGITS;return"string"==typeof this.source.src?i=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(i=this.source.toDataURL()),n={type:"pattern",source:i,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:e(this.offsetX,r),offsetY:e(this.offsetY,r),patternTransform:this.patternTransform?this.patternTransform.concat():null},w.util.populateWithProperties(this,n,t),n},toSVG:function(e){var t="function"==typeof this.source?this.source():this.source,i=t.width/e.width,n=t.height/e.height,r=this.offsetX/e.width,o=this.offsetY/e.height,s="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,o&&(n+=Math.abs(o))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(i=1,r&&(i+=Math.abs(r))),t.src?s=t.src:t.toDataURL&&(s=t.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+r+'" y="'+o+'" width="'+i+'" height="'+n+'">\n<image x="0" y="0" width="'+t.width+'" height="'+t.height+'" xlink:href="'+s+'"></image>\n</pattern>\n'},setOptions:function(e){for(var t in e)this[t]=e[t]},toLive:function(e){var t=this.source;if(!t)return"";if(void 0!==t.src){if(!t.complete)return"";if(0===t.naturalWidth||0===t.naturalHeight)return""}return e.createPattern(t,this.repeat)}})}(),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.toFixed;t.Shadow?t.warn("fabric.Shadow is already defined."):(t.Shadow=t.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(e){for(var i in"string"==typeof e&&(e=this._parseShadow(e)),e)this[i]=e[i];this.id=t.Object.__uid++},_parseShadow:function(e){var i=e.trim(),n=t.Shadow.reOffsetsAndBlur.exec(i)||[];return{color:(i.replace(t.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseFloat(n[1],10)||0,offsetY:parseFloat(n[2],10)||0,blur:parseFloat(n[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(e){var n=40,r=40,o=t.Object.NUM_FRACTION_DIGITS,s=t.util.rotateVector({x:this.offsetX,y:this.offsetY},t.util.degreesToRadians(-e.angle)),a=new t.Color(this.color);return e.width&&e.height&&(n=100*i((Math.abs(s.x)+this.blur)/e.width,o)+20,r=100*i((Math.abs(s.y)+this.blur)/e.height,o)+20),e.flipX&&(s.x*=-1),e.flipY&&(s.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+r+'%" height="'+(100+2*r)+'%" x="-'+n+'%" width="'+(100+2*n)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+i(this.blur?this.blur/2:0,o)+'"></feGaussianBlur>\n\t<feOffset dx="'+i(s.x,o)+'" dy="'+i(s.y,o)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+a.toRgb()+'" flood-opacity="'+a.getAlpha()+'"/>
78\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var e={},i=t.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach(function(t){this[t]!==i[t]&&(e[t]=this[t])},this),e}}),t.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/)}(t),function(){"use strict";if(w.StaticCanvas)w.warn("fabric.StaticCanvas is already defined.");else{var e=w.util.object.extend,t=w.util.getElementOffset,i=w.util.removeFromArray,n=w.util.toFixed,r=w.util.transformPoint,o=w.util.invertTransform,s=w.util.getNodeCanvas,a=w.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");w.StaticCanvas=w.util.createClass(w.CommonMethods,{initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:w.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(e,t){var i=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(e),this._initOptions(t),this.interactive||this._initRetinaScaling(),t.overlayImage&&this.setOverlayImage(t.overlayImage,i),t.backgroundImage&&this.setBackgroundImage(t.backgroundImage,i),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor,i),t.overlayColor&&this.setOverlayColor(t.overlayColor,i),this.calcOffset()},_isRetinaScaling:function(){return 1!==w.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?w.devicePixelRatio:1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var e=w.devicePixelRatio;this.__initRetinaScaling(e,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(e,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(e,t,i){t.setAttribute("width",this.width*e),t.setAttribute("height",this.height*e),i.scale(e,e)},calcOffset:function(){return this._offset=t(this.lowerCanvasEl),this},setOverlayImage:function(e,t,i){return this.__setBgOverlayImage("overlayImage",e,t,i)},setBackgroundImage:function(e,t,i){return this.__setBgOverlayImage("backgroundImage",e,t,i)},setOverlayColor:function(e,t){return this.__setBgOverlayColor("overlayColor",e,t)},setBackgroundColor:function(e,t){return this.__setBgOverlayColor("backgroundColor",e,t)},__setBgOverlayImage:function(e,t,i,n){return"string"==typeof t?w.util.loadImage(t,function(t,r){if(t){var o=new w.Image(t,n);this[e]=o,o.canvas=this}i&&i(t,r)},this,n&&n.crossOrigin):(n&&t.setOptions(n),this[e]=t,t&&(t.canvas=this),i&&i(t,!1)),this},__setBgOverlayColor:function(e,t,i){return this[e]=t,this._initGradient(t,e),this._initPattern(t,e,i),this},_createCanvasElement:function(){var e=a();if(!e)throw l;if(e.style||(e.style={}),void 0===e.getContext)throw l;return e},_initOptions:function(e){var t=this.lowerCanvasEl;this._setOptions(e),this.width=this.width||parseInt(t.width,10)||0,this.height=this.height||parseInt(t.height,10)||0,this.lowerCanvasEl.style&&(t.width=this.width,t.height=this.height,t.style.width=this.width+"px",t.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(e){e&&e.getContext?this.lowerCanvasEl=e:this.lowerCanvasEl=w.util.getById(e)||this._createCanvasElement(),w.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(e,t){return this.setDimensions({width:e},t)},setHeight:function(e,t){return this.setDimensions({height:e},t)},setDimensions:function(e,t){var i;for(var n in t=t||{},e)i=e[n],t.cssOnly||(this._setBackstoreDimension(n,e[n]),i+="px",this.hasLostContext=!0),t.backstoreOnly||this._setCssDimension(n,i);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this.calcOffset(),t.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(e,t){return this.lowerCanvasEl[e]=t,this.up
vendor: 4,223 bytes, line 78
78perCanvasEl&&(this.upperCanvasEl[e]=t),this.cacheCanvasEl&&(this.cacheCanvasEl[e]=t),this[e]=t,this},_setCssDimension:function(e,t){return this.lowerCanvasEl.style[e]=t,this.upperCanvasEl&&(this.upperCanvasEl.style[e]=t),this.wrapperEl&&(this.wrapperEl.style[e]=t),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(e){var t,i,n,r=this._activeObject,o=this.backgroundImage,s=this.overlayImage;for(this.viewportTransform=e,i=0,n=this._objects.length;i<n;i++)(t=this._objects[i]).group||t.setCoords(!0);return r&&r.setCoords(),o&&o.setCoords(!0),s&&s.setCoords(!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(e,t){var i=e,n=this.viewportTransform.slice(0);e=r(e,o(this.viewportTransform)),n[0]=t,n[3]=t;var s=r(e,n);return n[4]+=i.x-s.x,n[5]+=i.y-s.y,this.setViewportTransform(n)},setZoom:function(e){return this.zoomToPoint(new w.Point(0,0),e),this},absolutePan:function(e){var t=this.viewportTransform.slice(0);return t[4]=-e.x,t[5]=-e.y,this.setViewportTransform(t)},relativePan:function(e){return this.absolutePan(new w.Point(-e.x-this.viewportTransform[4],-e.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(e){this.stateful&&e.setupState(),e._set("canvas",this),e.setCoords(),this.fire("object:added",{target:e}),e.fire("added")},_onObjectRemoved:function(e){this.fire("object:removed",{target:e}),e.fire("removed"),delete e.canvas},clearContext:function(e){return e.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this.remove.apply(this,this.getObjects()),this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){var e=this.contextContainer;return this.renderCanvas(e,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=w.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var e={},t=this.width,i=this.height,n=o(this.viewportTransform);return e.tl=r({x:0,y:0},n),e.br=r({x:t,y:i},n),e.tr=new w.Point(e.br.x,e.tl.y),e.bl=new w.Point(e.tl.x,e.br.y),this.vptCoords=e,e},cancelRequestedRender:function(){this.isRendering&&(w.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(e,t){var i=this.viewportTransform,n=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(e),w.util.setImageSmoothing(e,this.imageSmoothingEnabled),this.fire("before:render",{ctx:e}),this._renderBackground(e),e.save(),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this._renderObjects(e,t),e.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),n&&(n.canvas=this,n.shouldCache(),n._transformDone=!0,n.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(e)),this._renderOverlay(e),this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),this.fire("after:render",{ctx:e})},drawClipPathOnCanvas:function(e){var t=this.viewportTransform,i=this.clipPath;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e.globalCompositeOperation="destination-in",i.transform(e),e.scale(1/i.zoomX,1/i.zoomY),e.drawImage(i._cacheCanvas,-i.cacheTranslationX,-i.cacheTranslationY),e.restore()},_renderObjects:function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t[i]&&t[i].render(e)},_renderBackgroundOrOverlay:function(e,t){var i=this[t+"Color"],n=this[t+"Image"],r=this.viewportTransform,o=this[t+"Vpt"];if(i||n){if(i){e.save(),e.beginPath(),e.moveTo(0,0),e.lineTo(this.width,0),e.lineTo(this.width,this.height),e.lineTo(0,this.height),e.closePath(),e.fillStyle=i.toLive?i.toLive(e,this):i,o&&e.transform(r[0],r[1],r[2],r[3],r[4],r[5]),e.transform(1,0,0,1,i.offsetX||0,i.offsetY||0);var s=i.gradientTransform||i.patternTransform;s&&e.transform(s[0],s[1],s[2],s[3],s[4],s[5]),e.fill(),e.restore(
vendor: 3,280 bytes, line 78
78)}n&&(e.save(),o&&e.transform(r[0],r[1],r[2],r[3],r[4],r[5]),n.render(e),e.restore())}},_renderBackground:function(e){this._renderBackgroundOrOverlay(e,"background")},_renderOverlay:function(e){this._renderBackgroundOrOverlay(e,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},centerObjectH:function(e){return this._centerObject(e,new w.Point(this.getCenter().left,e.getCenterPoint().y))},centerObjectV:function(e){return this._centerObject(e,new w.Point(e.getCenterPoint().x,this.getCenter().top))},centerObject:function(e){var t=this.getCenter();return this._centerObject(e,new w.Point(t.left,t.top))},viewportCenterObject:function(e){var t=this.getVpCenter();return this._centerObject(e,t)},viewportCenterObjectH:function(e){var t=this.getVpCenter();return this._centerObject(e,new w.Point(t.x,e.getCenterPoint().y)),this},viewportCenterObjectV:function(e){var t=this.getVpCenter();return this._centerObject(e,new w.Point(e.getCenterPoint().x,t.y))},getVpCenter:function(){var e=this.getCenter(),t=o(this.viewportTransform);return r({x:e.left,y:e.top},t)},_centerObject:function(e,t){return e.setPositionByOrigin(t,"center","center"),e.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(e){return this.toDatalessObject(e)},toObject:function(e){return this._toObjectMethod("toObject",e)},toDatalessObject:function(e){return this._toObjectMethod("toDatalessObject",e)},_toObjectMethod:function(t,i){var n=this.clipPath,r={version:w.version,objects:this._toObjects(t,i)};return n&&!n.excludeFromExport&&(r.clipPath=this._toObject(this.clipPath,t,i)),e(r,this.__serializeBgOverlay(t,i)),w.util.populateWithProperties(this,r,i),r},_toObjects:function(e,t){return this._objects.filter(function(e){return!e.excludeFromExport}).map(function(i){return this._toObject(i,e,t)},this)},_toObject:function(e,t,i){var n;this.includeDefaultValues||(n=e.includeDefaultValues,e.includeDefaultValues=!1);var r=e[t](i);return this.includeDefaultValues||(e.includeDefaultValues=n),r},__serializeBgOverlay:function(e,t){var i={},n=this.backgroundImage,r=this.overlayImage,o=this.backgroundColor,s=this.overlayColor;return o&&o.toObject?o.excludeFromExport||(i.background=o.toObject(t)):o&&(i.background=o),s&&s.toObject?s.excludeFromExport||(i.overlay=s.toObject(t)):s&&(i.overlay=s),n&&!n.excludeFromExport&&(i.backgroundImage=this._toObject(n,e,t)),r&&!r.excludeFromExport&&(i.overlayImage=this._toObject(r,e,t)),i},svgViewportTransformation:!0,toSVG:function(e,t){e||(e={}),e.reviver=t;var i=[];return this._setSVGPreamble(i,e),this._setSVGHeader(i,e),this.clipPath&&i.push('<g clip-path="url(#'+this.clipPath.clipPathId+')" >\n'),this._setSVGBgOverlayColor(i,"background"),this._setSVGBgOverlayImage(i,"backgroundImage",t),this._setSVGObjects(i,t),this.clipPath&&i.push("</g>\n"),this._setSVGBgOverlayColor(i,"overlay"),this._setSVGBgOverlayImage(i,"overlayImage",t),i.push("</svg>"),i.join("")},_setSVGPreamble:function(e,t){t.suppressPreamble||e.push('<?xml version="1.0" encoding="',t.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(e,t){var i,r=t.width||this.width,o=t.height||this.height,s='viewB
78ox="0 0 '+this.width+" "+this.height+'" ',a=w.Object.NUM_FRACTION_DIGITS;t.viewBox?s='viewBox="'+t.viewBox.x+" "+t.viewBox.y+" "+t.viewBox.width+" "+t.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,s='viewBox="'+n(-i[4]/i[0],a)+" "+n(-i[5]/i[3],a)+" "+n(this.width/i[0],a)+" "+n(this.height/i[3],a)+'" '),e.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',r,'" ','height="',o,'" ',s,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",w.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(t),"</defs>\n")},createSVGClipPathMarkup:function(e){var t=this.clipPath;return t?(t.clipPathId="CLIPPATH_"+w.Object.__uid++,'<clipPath id="'+t.clipPathId+'" >\n'+this.clipPath.toClipPathSVG(e.reviver)+"</clipPath>\n"):""},createSVGRefElementsMarkup:function(){var e=this;return["background","overlay"].map(function(t){var i=e[t+"Color"];if(i&&i.toLive){var n=e[t+"Vpt"],r=e.viewportTransform,o={width:e.width/(n?r[0]:1),height:e.height/(n?r[3]:1)};return i.toSVG(o,{additionalTransform:n?w.util.matrixToSVG(r):""})}}).join("")},createSVGFontFacesMarkup:function(){var e,t,i,n,r,o,s,a,l="",c={},u=w.fontPaths,h=[];for(this._objects.forEach(function e(t){h.push(t),t._objects&&t._objects.forEach(e)}),s=0,a=h.length;s<a;s++)if(t=(e=h[s]).fontFamily,-1!==e.type.indexOf("text")&&!c[t]&&u[t]&&(c[t]=!0,e.styles))for(r in i=e.styles)for(o in n=i[r])!c[t=n[o].fontFamily]&&u[t]&&(c[t]=!0);for(var d in c)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",d,"';\n","\t\t\tsrc: url('",u[d],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},_setSVGObjects:function(e,t){var i,n,r,o=this._objects;for(n=0,r=o.length;n<r;n++)(i=o[n]).excludeFromExport||this._setSVGObject(e,i,t)},_setSVGObject:function(e,t,i){e.push(t.toSVG(i))},_setSVGBgOverlayImage:function(e,t,i){this[t]&&!this[t].excludeFromExport&&this[t].toSVG&&e.push(this[t].toSVG(i))},_setSVGBgOverlayColor:function(e,t){var i=this[t+"Color"],n=this.viewportTransform,r=this.width,o=this.height;if(i)if(i.toLive){var s=i.repeat,a=w.util.invertTransform(n),l=this[t+"Vpt"]?w.util.matrixToSVG(a):"";e.push('<rect transform="'+l+" translate(",r/2,",",o/2,')"',' x="',i.offsetX-r/2,'" y="',i.offsetY-o/2,'" ','width="',"repeat-y"===s||"no-repeat"===s?i.source.width:r,'" height="',"repeat-x"===s||"no-repeat"===s?i.source.height:o,'" fill="url(#SVGID_'+i.id+')"',"></rect>\n")}else e.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',i,'"',"></rect>\n")},sendToBack:function(e){if(!e)return this;var t,n,r,o=this._activeObject;if(e===o&&"activeSelection"===e.type)for(t=(r=o._objects).length;t--;)n=r[t],i(this._objects,n),this._objects.unshift(n);else i(this._objects,e),this._objects.unshift(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(e){if(!e)return this;var t,n,r,o=this._activeObject;if(e===o&&"activeSelection"===e.type)for(r=o._objects,t=0;t<r.length;t++)n=r[t],i(this._objects,n),this._objects.push(n);else i(this._objects,e),this._objects.push(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(e,t){if(!e)return this;var n,r,o,s,a,l=this._activeObject,c=0;if(e===l&&"activeSelection"===e.type)for(a=l._objects,n=0;n<a.length;n++)r=a[n],(o=this._objects.indexOf(r))>0+c&&(s=o-1,i(this._objects,r),this._objects.splice(s,0,r)),c++;else 0!==(o=this._objects.indexOf(e))&&(s=this._findNewLowerIndex(e,o,t),i(this._objects,e),this._objects.splice(s,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(e,t,i){var n,r;if(i){for(n=t,r=t-1;r>=0;--r)if(e.intersectsWithObject(this._objects[r])||e.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(e)){n=r;break}}else n=t-1;return n},bringForward:function(e,t){if(!e)return this;var n,r,o,s,a,l=this._activeObject,c=0;if(e===l&&"activeSelection"===e.type)for(n=(a=l._objects).length;n--;)r=a[n],(o=this._objects.indexOf(r))<this._objects.length-1-c&&(s=o+1,i(this._objects,r),this._objects.splice(s,0,r)),c++;else(o=this._objects.indexOf(e))!==this._objects.length-1&&(s=this._findNewUpperIndex(e,o,t),i(this._objects,e),this._objects.splice(s,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(e,t,i){var n,r,o;
vendor: 4,529 bytes, line 78
78if(i){for(n=t,r=t+1,o=this._objects.length;r<o;++r)if(e.intersectsWithObject(this._objects[r])||e.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(e)){n=r;break}}else n=t+1;return n},moveTo:function(e,t){return i(this._objects,e),this._objects.splice(t,0,e),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(w.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject(function(e){e.dispose&&e.dispose()}),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,this.lowerCanvasEl.classList.remove("lower-canvas"),this.lowerCanvasEl.style=this._originalCanvasStyle,delete this._originalCanvasStyle,this.lowerCanvasEl.setAttribute("width",this.width),this.lowerCanvasEl.setAttribute("height",this.height),w.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),e(w.StaticCanvas.prototype,w.Observable),e(w.StaticCanvas.prototype,w.Collection),e(w.StaticCanvas.prototype,w.DataURLExporter),e(w.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(e){var t=a();if(!t||!t.getContext)return null;var i=t.getContext("2d");return i&&"setLineDash"===e?void 0!==i.setLineDash:null}}),w.StaticCanvas.prototype.toJSON=w.StaticCanvas.prototype.toObject,w.isLikelyNode&&(w.StaticCanvas.prototype.createPNGStream=function(){var e=s(this.lowerCanvasEl);return e&&e.createPNGStream()},w.StaticCanvas.prototype.createJPEGStream=function(e){var t=s(this.lowerCanvasEl);return t&&t.createJPEGStream(e)})}}(),w.BaseBrush=w.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,limitedToCanvasSize:!1,_setBrushStyles:function(){var e=this.canvas.contextTop;e.strokeStyle=this.color,e.lineWidth=this.width,e.lineCap=this.strokeLineCap,e.miterLimit=this.strokeMiterLimit,e.lineJoin=this.strokeLineJoin,e.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(e){var t=this.canvas.viewportTransform;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5])},_setShadow:function(){if(this.shadow){var e=this.canvas,t=this.shadow,i=e.contextTop,n=e.getZoom();e&&e._isRetinaScaling()&&(n*=w.devicePixelRatio),i.shadowColor=t.color,i.shadowBlur=t.blur*n,i.shadowOffsetX=t.offsetX*n,i.shadowOffsetY=t.offsetY*n}},needsFullRender:function(){return new w.Color(this.color).getAlpha()<1||!!this.shadow},_resetShadow:function(){var e=this.canvas.contextTop;e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0},_isOutSideCanvas:function(e){return e.x<0||e.x>this.canvas.getWidth()||e.y<0||e.y>this.canvas.getHeight()}}),w.PencilBrush=w.util.createClass(w.BaseBrush,{decimate:.4,initialize:function(e){this.canvas=e,this._points=[]},_drawSegment:function(e,t,i){var n=t.midPointFrom(i);return e.quadraticCurveTo(t.x,t.y,n.x,n.y),n},onMouseDown:function(e,t){this.canvas._isMainEvent(t.e)&&(this._prepareForDrawing(e),this._captureDrawingPath(e),this._render())},onMouseMove:function(e,t){if(this.canvas._isMainEvent(t.e)&&(!0!==this.limitedToCanvasSize||!this._isOutSideCanvas(e))&&this._captureDrawingPath(e)&&this._points.length>1)if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var i=this._points,n=i.length,r=this.canvas.contextTop;this._saveAndTransform(r),this.oldEnd&&(r.beginPath(),r.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(r,i[n-2],i[n-1],!0),r.stroke(),r.restore()}},onMouseUp:function(e){return!this.canvas._isMainEvent(e.e)||(this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},_prepareForDrawing:function(e){var t=new w.Point(e.x,e.y);this._reset(),this._addPoint(t),this.canvas.contextTop.moveTo(t.x,t.y)},_addPoint:function(e){return!(this._points.length>1&&e.eq(this._points[this._points.length-1])||(this._points.push(e),0))},_reset:function(){this._points=[],this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(e){var t=new w.Point(e.x,e.y);return this._addPoint(t)},_render:function(){var e,t,i=this.canvas.contextTop,n=this._points[0],r=this._points[1];if(this._saveAndTransform(i),i.beginPath(),2===this._points.length&&n.x===r.x&&n.y===r.y){var o=this.width/1e3;
vendor: 4,746 bytes, line 78
78n=new w.Point(n.x,n.y),r=new w.Point(r.x,r.y),n.x-=o,r.x+=o}for(i.moveTo(n.x,n.y),e=1,t=this._points.length;e<t;e++)this._drawSegment(i,n,r),n=this._points[e],r=this._points[e+1];i.lineTo(n.x,n.y),i.stroke(),i.restore()},convertPointsToSVGPath:function(e){var t=this.width/1e3;return w.util.getSmoothPathFromPoints(e,t)},_isEmptySVGPath:function(e){return"M 0 0 Q 0 0 0 0 L 0 0"===w.util.joinPath(e)},createPath:function(e){var t=new w.Path(e,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,t.shadow=new w.Shadow(this.shadow)),t},decimatePoints:function(e,t){if(e.length<=2)return e;var i,n=this.canvas.getZoom(),r=Math.pow(t/n,2),o=e.length-1,s=e[0],a=[s];for(i=1;i<o-1;i++)Math.pow(s.x-e[i].x,2)+Math.pow(s.y-e[i].y,2)>=r&&(s=e[i],a.push(s));return a.push(e[o]),a},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var e=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(e))this.canvas.requestRenderAll();else{var t=this.createPath(e);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:t}),this.canvas.add(t),this.canvas.requestRenderAll(),t.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:t})}}}),w.CircleBrush=w.util.createClass(w.BaseBrush,{width:10,initialize:function(e){this.canvas=e,this.points=[]},drawDot:function(e){var t=this.addPoint(e),i=this.canvas.contextTop;this._saveAndTransform(i),this.dot(i,t),i.restore()},dot:function(e,t){e.fillStyle=t.fill,e.beginPath(),e.arc(t.x,t.y,t.radius,0,2*Math.PI,!1),e.closePath(),e.fill()},onMouseDown:function(e){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(e)},_render:function(){var e,t,i=this.canvas.contextTop,n=this.points;for(this._saveAndTransform(i),e=0,t=n.length;e<t;e++)this.dot(i,n[e]);i.restore()},onMouseMove:function(e){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(e)||(this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(e),this._render()):this.drawDot(e))},onMouseUp:function(){var e,t,i=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var n=[];for(e=0,t=this.points.length;e<t;e++){var r=this.points[e],o=new w.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&(o.shadow=new w.Shadow(this.shadow)),n.push(o)}var s=new w.Group(n);s.canvas=this.canvas,this.canvas.fire("before:path:created",{path:s}),this.canvas.add(s),this.canvas.fire("path:created",{path:s}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=i,this.canvas.requestRenderAll()},addPoint:function(e){var t=new w.Point(e.x,e.y),i=w.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,n=new w.Color(this.color).setAlpha(w.util.getRandomInt(0,100)/100).toRgba();return t.radius=i,t.fill=n,this.points.push(t),t}}),w.SprayBrush=w.util.createClass(w.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(e){this.canvas=e,this.sprayChunks=[]},onMouseDown:function(e){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(e),this.render(this.sprayChunkPoints)},onMouseMove:function(e){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(e)||(this.addSprayChunk(e),this.render(this.sprayChunkPoints))},onMouseUp:function(){var e=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var t=[],i=0,n=this.sprayChunks.length;i<n;i++)for(var r=this.sprayChunks[i],o=0,s=r.length;o<s;o++){var a=new w.Rect({width:r[o].width,height:r[o].width,left:r[o].x+1,top:r[o].y+1,originX:"center",originY:"center",fill:this.color});t.push(a)}this.optimizeOverlapping&&(t=this._getOptimizedRects(t));var l=new w.Group(t);this.shadow&&l.set("shadow",new w.Shadow(this.shadow)),this.canvas.fire("before:path:created",{path:l}),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=e,this.canvas.requestRenderAll()},_getOptimizedRects:function(e){var t,i,n,r={};for(i=0,n=e.length;i<n;i++)r[t=e[i].left+""+e[i].top]||(r[t]=e[i]);var o=[];for(t in r)o.push(r[t]);return o},render:function(e){var t,i,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),t=0,i=e.length;t<i;t++){var r=e[t];void 0!==r.opacity&&(n.globalAlpha=r.opacity),n.fillRect(r.x,r.y,r.width,r.width)}
vendor: 4,304 bytes, line 78
78n.restore()},_render:function(){var e,t,i=this.canvas.contextTop;for(i.fillStyle=this.color,this._saveAndTransform(i),e=0,t=this.sprayChunks.length;e<t;e++)this.render(this.sprayChunks[e]);i.restore()},addSprayChunk:function(e){this.sprayChunkPoints=[];var t,i,n,r,o=this.width/2;for(r=0;r<this.density;r++){t=w.util.getRandomInt(e.x-o,e.x+o),i=w.util.getRandomInt(e.y-o,e.y+o),n=this.dotWidthVariance?w.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var s=new w.Point(t,i);s.width=n,this.randomOpacity&&(s.opacity=w.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(s)}this.sprayChunks.push(this.sprayChunkPoints)}}),w.PatternBrush=w.util.createClass(w.PencilBrush,{getPatternSrc:function(){var e=w.util.createCanvasElement(),t=e.getContext("2d");return e.width=e.height=25,t.fillStyle=this.color,t.beginPath(),t.arc(10,10,10,0,2*Math.PI,!1),t.closePath(),t.fill(),e},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(e){var t=this.callSuper("createPath",e),i=t._getLeftTopCoords().scalarAdd(t.strokeWidth/2);return t.stroke=new w.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-i.x,offsetY:-i.y}),t}}),function(){var e=w.util.getPointer,t=w.util.degreesToRadians,i=w.util.isTouchEvent;for(var n in w.Canvas=w.util.createClass(w.StaticCanvas,{initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t),this._initInteractive(),this._createCacheCanvas()},uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,targets:[],_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=w.PencilBrush&&new w.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var e,t,i,n=this.getActiveObjects();if(n.length>0&&!this.preserveObjectStacking){t=[],i=[];for(var r=0,o=this._objects.length;r<o;r++)e=this._objects[r],-1===n.indexOf(e)?t.push(e):i.push(e);n.length>1&&(this._activeObject._objects=i),t.push.apply(t,i)}else t=this._objects;return t},renderAll:function(){!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop);var e=this.contextContainer;return this.renderCanvas(e,this._chooseObjectsToRender()),this},renderTopLayer:function(e){e.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(e),this.contextTopDirty=!0),e.restore()},renderTop:function(){var e=this.contextTop;return this.clearContext(e),this.renderTopLayer(e),this.fire("after:render"),this},_normalizePointer:function(e,t){var i=e.calcTransformMatrix(),n=w.util.invertTransform(i),r=this.restorePointerVpt(t);return w.util.transformPoint(r,n)},isTargetTransparent:function(e,t,i){if(e.shouldCache()&&e._cacheCanvas&&e!==this._activeObject){var n=this._normalizePointer(e,{x:t,y:i}),r=Math.max(e.cacheTranslationX+n.x*e.zoomX,0),o=Math.max(e.cacheTranslationY+n.y*e.zoomY,0);
vendor: 3,512 bytes, line 78
78return w.util.isTransparent(e._cacheContext,Math.round(r),Math.round(o),this.targetFindTolerance)}var s=this.contextCache,a=e.selectionBackgroundColor,l=this.viewportTransform;return e.selectionBackgroundColor="",this.clearContext(s),s.save(),s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),e.render(s),s.restore(),e.selectionBackgroundColor=a,w.util.isTransparent(s,t,i,this.targetFindTolerance)},_isSelectionKeyPressed:function(e){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find(function(t){return!0===e[t]}):e[this.selectionKey]},_shouldClearSelection:function(e,t){var i=this.getActiveObjects(),n=this._activeObject;return!t||t&&n&&i.length>1&&-1===i.indexOf(t)&&n!==t&&!this._isSelectionKeyPressed(e)||t&&!t.evented||t&&!t.selectable&&n&&n!==t},_shouldCenterTransform:function(e,t,i){var n;if(e)return"scale"===t||"scaleX"===t||"scaleY"===t||"resizing"===t?n=this.centeredScaling||e.centeredScaling:"rotate"===t&&(n=this.centeredRotation||e.centeredRotation),n?!i:i},_getOriginFromCorner:function(e,t){var i={x:e.originX,y:e.originY};return"ml"===t||"tl"===t||"bl"===t?i.x="right":"mr"!==t&&"tr"!==t&&"br"!==t||(i.x="left"),"tl"===t||"mt"===t||"tr"===t?i.y="bottom":"bl"!==t&&"mb"!==t&&"br"!==t||(i.y="top"),i},_getActionFromCorner:function(e,t,i,n){if(!t||!e)return"drag";var r=n.controls[t];return r.getActionName(i,r,n)},_setupCurrentTransform:function(e,i,n){if(i){var r=this.getPointer(e),o=i.__corner,s=i.controls[o],a=n&&o?s.getActionHandler(e,i,s):w.controlsUtils.dragHandler,l=this._getActionFromCorner(n,o,e,i),c=this._getOriginFromCorner(i,o),u=e[this.centeredKey],h={target:i,action:l,actionHandler:a,corner:o,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,offsetX:r.x-i.left,offsetY:r.y-i.top,originX:c.x,originY:c.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,theta:t(i.angle),width:i.width*i.scaleX,shiftKey:e.shiftKey,altKey:u,original:w.util.saveObjectTransform(i)};this._shouldCenterTransform(i,l,u)&&(h.originX="center",h.originY="center"),h.original.originX=c.x,h.original.originY=c.y,this._currentTransform=h,this._beforeTransform(e)}},setCursor:function(e){this.upperCanvasEl.style.cursor=e},_drawSelection:function(e){var t=this._groupSelector,i=new w.Point(t.ex,t.ey),n=w.util.transformPoint(i,this.viewportTransform),r=new w.Point(t.ex+t.left,t.ey+t.top),o=w.util.transformPoint(r,this.viewportTransform),s=Math.min(n.x,o.x),a=Math.min(n.y,o.y),l=Math.max(n.x,o.x),c=Math.max(n.y,o.y),u=this.selectionLineWidth/2;this.selectionColor&&(e.fillStyle=this.selectionColor,e.fillRect(s,a,l-s,c-a)),this.selectionLineWidth&&this.selectionBorderColor&&(e.lineWidth=this.selectionLineWidth,e.strokeStyle=this.selectionBorderColor,s+=u,a+=u,l-=u,c-=u,w.Object.prototype._setLineDash.call(this,e,this.selectionDashArray),e.strokeRect(s,a,l-s,c-a))},findTarget:function(e,t){if(!this.skipTargetFind){var n,r,o=this.getPointer(e,!0),s=this._activeObject,a=this.getActiveObjects(),l=i(e),c=a.length>1&&!t||1===a.length;if(this.targets=[],c&&s._findTargetCorner(o,l))return s;if(a.length>1&&!t&&s===this._searchPossibleTargets([s],o))return s;if(1===a.length&&s===this._searchPossibleTargets([s],o)){if(!this.preserveObjectStacking)return s;n=s,r=this.targets,this.targets=[]}var u=this._searchPossibleTargets(this._objects,o);return e[this.altSelectionKey]&&u&&n&&u!==n&&(u=n,this.targets=r),u}},_checkTarget:function(e,t,i){if(t&&t.visible&&t.evented&&t.containsPoint(e)){if(!this.perPixelTargetFind&&!t.perPixelTargetFind||t.isEditing)return!0;
vendor: 2,372 bytes, line 78
78if(!this.isTargetTransparent(t,i.x,i.y))return!0}},_searchPossibleTargets:function(e,t){for(var i,n,r=e.length;r--;){var o=e[r],s=o.group?this._normalizePointer(o.group,t):t;if(this._checkTarget(s,o,t)){(i=e[r]).subTargetCheck&&i instanceof w.Group&&(n=this._searchPossibleTargets(i._objects,t))&&this.targets.push(n);break}}return i},restorePointerVpt:function(e){return w.util.transformPoint(e,w.util.invertTransform(this.viewportTransform))},getPointer:function(t,i){if(this._absolutePointer&&!i)return this._absolutePointer;if(this._pointer&&i)return this._pointer;var n,r=e(t),o=this.upperCanvasEl,s=o.getBoundingClientRect(),a=s.width||0,l=s.height||0;a&&l||("top"in s&&"bottom"in s&&(l=Math.abs(s.top-s.bottom)),"right"in s&&"left"in s&&(a=Math.abs(s.right-s.left))),this.calcOffset(),r.x=r.x-this._offset.left,r.y=r.y-this._offset.top,i||(r=this.restorePointerVpt(r));var c=this.getRetinaScaling();return 1!==c&&(r.x/=c,r.y/=c),n=0===a||0===l?{width:1,height:1}:{width:o.width/a,height:o.height/l},{x:r.x*n.width,y:r.y*n.height}},_createUpperCanvas:function(){var e=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),t=this.lowerCanvasEl,i=this.upperCanvasEl;i?i.className="":(i=this._createCanvasElement(),this.upperCanvasEl=i),w.util.addClass(i,"upper-canvas "+e),this.wrapperEl.appendChild(i),this._copyCanvasStyle(t,i),this._applyCanvasStyle(i),this.contextTop=i.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=w.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),w.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),w.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(e){var t=this.width||e.width,i=this.height||e.height;w.util.setStyle(e,{position:"absolute",width:t+"px",height:i+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),e.width=t,e.height=i,w.util.makeElementUnselectable(e)},_copyCanvasStyle:function(e,t){t.style.cssText=e.style.cssText},getSelectionContext:function(){return this.contextTop}
vendor: 15,810 bytes, line 78
78,getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var e=this._activeObject;return e?"activeSelection"===e.type&&e._objects?e._objects.slice(0):[e]:[]},_onObjectRemoved:function(e){e===this._activeObject&&(this.fire("before:selection:cleared",{target:e}),this._discardActiveObject(),this.fire("selection:cleared",{target:e}),e.fire("deselected")),e===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",e)},_fireSelectionEvents:function(e,t){var i=!1,n=this.getActiveObjects(),r=[],o=[];e.forEach(function(e){-1===n.indexOf(e)&&(i=!0,e.fire("deselected",{e:t,target:e}),o.push(e))}),n.forEach(function(n){-1===e.indexOf(n)&&(i=!0,n.fire("selected",{e:t,target:n}),r.push(n))}),e.length>0&&n.length>0?i&&this.fire("selection:updated",{e:t,selected:r,deselected:o,updated:r[0]||o[0],target:this._activeObject}):n.length>0?this.fire("selection:created",{e:t,selected:r,target:this._activeObject}):e.length>0&&this.fire("selection:cleared",{e:t,deselected:o})},setActiveObject:function(e,t){var i=this.getActiveObjects();return this._setActiveObject(e,t),this._fireSelectionEvents(i,t),this},_setActiveObject:function(e,t){return this._activeObject!==e&&!!this._discardActiveObject(t,e)&&!e.onSelect({e:t})&&(this._activeObject=e,!0)},_discardActiveObject:function(e,t){var i=this._activeObject;if(i){if(i.onDeselect({e:e,object:t}))return!1;this._activeObject=null}return!0},discardActiveObject:function(e){var t=this.getActiveObjects(),i=this.getActiveObject();return t.length&&this.fire("before:selection:cleared",{target:i,e:e}),this._discardActiveObject(e),this._fireSelectionEvents(t,e),this},dispose:function(){var e=this.wrapperEl;return this.removeListeners(),e.removeChild(this.upperCanvasEl),e.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(e){w.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this)),e.parentNode&&e.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,w.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(e){var t=this._activeObject;t&&t._renderControls(e)},_toObject:function(e,t,i){var n=this._realizeGroupTransformOnObject(e),r=this.callSuper("_toObject",e,t,i);return this._unwindGroupTransformOnObject(e,n),r},_realizeGroupTransformOnObject:function(e){if(e.group&&"activeSelection"===e.group.type&&this._activeObject===e.group){var t={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach(function(i){t[i]=e[i]}),w.util.addTransformToObject(e,this._activeObject.calcOwnMatrix()),t}return null},_unwindGroupTransformOnObject:function(e,t){t&&e.set(t)},_setSVGObject:function(e,t,i){var n=this._realizeGroupTransformOnObject(t);this.callSuper("_setSVGObject",e,t,i),this._unwindGroupTransformOnObject(t,n)},setViewportTransform:function(e){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),w.StaticCanvas.prototype.setViewportTransform.call(this,e)}}),w.StaticCanvas)"prototype"!==n&&(w.Canvas[n]=w.StaticCanvas[n])}(),function(){var e=w.util.addListener,t=w.util.removeListener,i={passive:!1};function n(e,t){return e.button&&e.button===t-1}w.util.object.extend(w.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(e,t){var n=this.upperCanvasEl,r=this._getEventPrefix();e(w.window,"resize",this._onResize),e(n,r+"down",this._onMouseDown),e(n,r+"move",this._onMouseMove,i),e(n,r+"out",this._onMouseOut),e(n,r+"enter",this._onMouseEnter),e(n,"wheel",this._onMouseWheel),e(n,"contextmenu",this._onContextMenu),e(n,"dblclick",this._onDoubleClick),e(n,"dragover",this._onDragOver),e(n,"dragenter",this._onDragEnter),e(n,"dragleave",this._onDragLeave),e(n,"drop",this._onDrop),this.enablePointerEvents||e(n,"touchstart",this._onTouchStart,i),"undefined"!=typeof eventjs&&t in eventjs&&(eventjs[t](n,"gesture",this._onGesture),eventjs[t](n,"drag",this._onDrag),eventjs[t](n,"orientation",this._onOrientationChange),eventjs[t](n,"shake",this._onShake),eventjs[t](n,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(t,"remove");var e=this._getEventPrefix();t(w.document,e+"up",this._onMouseUp),t(w.document,"touchend",this._onTouchEnd,i),t(w.document,e+"move",this._onMouseMove,i),t(w.document,"touchmove",this._onMouseMove,i)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(e,t){this.__onTransformGesture&&this.__onTransformGesture(e,t)},_onDrag:function(e,t){this.__onDrag&&this.__onDrag(e,t)},_onMouseWheel:function(e){this.__onMouseWheel(e)},_onMouseOut:function(e){var t=this._hoveredTarget;this.fire("mouse:out",{target:t,e:e}),this._hoveredTarget=null,t&&t.fire("mouseout",{e:e});var i=this;this._hoveredTargets.forEach(function(n){i.fire("mouse:out",{target:t,e:e}),n&&t.fire("mouseout",{e:e})}),this._hoveredTargets=[],this._iTextInstances&&this._iTextInstances.forEach(function(e){e.isEditing&&e.hiddenTextarea.focus()})},_onMouseEnter:function(e){this._currentTransform||this.findTarget(e)||(this.fire("mouse:over",{target:null,e:e}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(e,t){this.__onOrientationChange&&this.__onOrientationChange(e,t)},_onShake:function(e,t){this.__onShake&&this.__onShake(e,t)},_onLongPress:function(e,t){this.__onLongPress&&this.__onLongPress(e,t)},_onDragOver:function(e){e.preventDefault();var t=this._simpleEventHandler("dragover",e);this._fireEnterLeaveEvents(t,e)},_onContextMenu:function(e){return this.stopContextMenu&&(e.stopPropagation(),e.preventDefault()),!1},_onDoubleClick:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"dblclick"),this._resetTransformEventData(e)},getPointerId:function(e){var t=e.changedTouches;return t?t[0]&&t[0].identifier:this.enablePointerEvents?e.pointerId:-1},_isMainEvent:function(e){return!0===e.isPrimary||!1!==e.isPrimary&&("touchend"===e.type&&0===e.touches.length||!e.changedTouches||e.changedTouches[0].identifier===this.mainTouchId)},_onTouchStart:function(n){n.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(n)),this.__onMouseDown(n),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();e(w.document,"touchend",this._onTouchEnd,i),e(w.document,"touchmove",this._onMouseMove,i),t(r,o+"down",this._onMouseDown)},_onMouseDown:function(n){this.__onMouseDown(n),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();t(r,o+"move",this._onMouseMove,i),e(w.document,o+"up",this._onMouseUp),e(w.document,o+"move",this._onMouseMove,i)},_onTouchEnd:function(n){if(!(n.touches.length>0)){this.__onMouseUp(n),this._resetTransformEventData(),this.mainTouchId=null;var r=this._getEventPrefix();t(w.document,"touchend",this._onTouchEnd,i),t(w.document,"touchmove",this._onMouseMove,i);var o=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(function(){e(o.upperCanvasEl,r+"down",o._onMouseDown),o._willAddMouseDown=0},400)}},_onMouseUp:function(n){this.__onMouseUp(n),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();this._isMainEvent(n)&&(t(w.document,o+"up",this._onMouseUp),t(w.document,o+"move",this._onMouseMove,i),e(r,o+"move",this._onMouseMove,i))},_onMouseMove:function(e){!this.allowTouchScrolling&&e.preventDefault&&e.preventDefault(),this.__onMouseMove(e)},_onResize:function(){this.calcOffset()},_shouldRender:function(e){var t=this._activeObject;return!!(!!t!=!!e||t&&e&&t!==e)||(t&&t.isEditing,!1)},__onMouseUp:function(e){var t,i=this._currentTransform,r=this._groupSelector,o=!1,s=!r||0===r.left&&0===r.top;if(this._cacheTransformEventData(e),t=this._target,this._handleEvent(e,"up:before"),n(e,3))this.fireRightClick&&this._handleEvent(e,"up",3,s);else{if(n(e,2))return this.fireMiddleClick&&this._handleEvent(e,"up",2,s),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(e);else if(this._isMainEvent(e)){if(i&&(this._finalizeCurrentTransform(e),o=i.actionPerformed),!s){var a=t===this._activeObject;this._maybeGroupObjects(e),o||(o=this._shouldRender(t)||!a&&t===this._activeObject)}if(t){if(t.selectable&&t!==this._activeObject&&"up"===t.activeOn)this.setActiveObject(t,e),o=!0;else{var l=t._findTargetCorner(this.getPointer(e,!0),w.util.isTouchEvent(e)),c=t.controls[l],u=c&&c.getMouseUpHandler(e,t,c);if(u){var h=this.getPointer(e);u(e,i,h.x,h.y)}}t.isMoving=!1}this._setCursorFromEvent(e,t),this._handleEvent(e,"up",1,s),this._groupSelector=null,this._currentTransform=null,t&&(t.__corner=0),o?this.requestRenderAll():s||this.renderTop()}}},_simpleEventHandler:function(e,t){var i=this.findTarget(t),n=this.targets,r={e:t,target:i,subTargets:n};if(this.fire(e,r),i&&i.fire(e,r),!n)return i;for(var o=0;o<n.length;o++)n[o].fire(e,r);return i},_handleEvent:function(e,t,i,n){var r=this._target,o=this.targets||[],s={e:e,target:r,subTargets:o,button:i||1,isClick:n||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};"up"===t&&(s.currentTarget=this.findTarget(e),s.currentSubTargets=this.targets),this.fire("mouse:"+t,s),r&&r.fire("mouse"+t,s);for(var a=0;a<o.length;a++)o[a].fire("mouse"+t,s)},_finalizeCurrentTransform:function(e){var t,i=this._currentTransform,n=i.target,r={e:e,target:n,transform:i,action:i.action};n._scaling&&(n._scaling=!1),n.setCoords(),(i.actionPerformed||this.stateful&&n.hasStateChanged())&&(i.actionPerformed&&(t=this._addEventOptions(r,i),this._fire(t,r)),this._fire("modified",r))},_addEventOptions:function(e,t){var i,n;switch(t.action){case"scaleX":i="scaled",n="x";break;case"scaleY":i="scaled",n="y";break;case"skewX":i="skewed",n="x";break;case"skewY":i="skewed",n="y";break;case"scale":i="scaled",n="equally";break;case"rotate":i="rotated";break;case"drag":i="moved"}return e.by=n,i},_onMouseDownInDrawingMode:function(e){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(e).requestRenderAll();var t=this.getPointer(e);this.freeDrawingBrush.onMouseDown(t,{e:e,pointer:t}),this._handleEvent(e,"down")},_onMouseMoveInDrawingMode:function(e){if(this._isCurrentlyDrawing){var t=this.getPointer(e);this.freeDrawingBrush.onMouseMove(t,{e:e,pointer:t})}this.setCursor(this.freeDrawingCursor),this._handleEvent(e,"move")},_onMouseUpInDrawingMode:function(e){var t=this.getPointer(e);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:e,pointer:t}),this._handleEvent(e,"up")},__onMouseDown:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"down:before");var t=this._target;if(n(e,3))this.fireRightClick&&this._handleEvent(e,"down",3);else if(n(e,2))this.fireMiddleClick&&this._handleEvent(e,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(e);else if(this._isMainEvent(e)&&!this._currentTransform){var i=this._pointer;this._previousPointer=i;var r=this._shouldRender(t),o=this._shouldGroup(e,t);if(this._shouldClearSelection(e,t)?this.discardActiveObject(e):o&&(this._handleGrouping(e,t),t=this._activeObject),!this.selection||t&&(t.selectable||t.isEditing||t===this._activeObject)||(this._groupSelector={ex:this._absolutePointer.x,ey:this._absolutePointer.y,top:0,left:0}),t){var s=t===this._activeObject;t.selectable&&"down"===t.activeOn&&this.setActiveObject(t,e);var a=t._findTargetCorner(this.getPointer(e,!0),w.util.isTouchEvent(e));if(t.__corner=a,t===this._activeObject&&(a||!o)){this._setupCurrentTransform(e,t,s);var l=t.controls[a],c=(i=this.getPointer(e),l&&l.getMouseDownHandler(e,t,l));c&&c(e,this._currentTransform,i.x,i.y)}}this._handleEvent(e,"down"),(r||o)&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(e){this._resetTransformEventData(),this._pointer=this.getPointer(e,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(e)||null},_beforeTransform:function(e){var t=this._currentTransform;this.stateful&&t.target.saveState(),this.fire("before:transform",{e:e,transform:t})},__onMouseMove:function(e){var t,i;if(this._handleEvent(e,"move:before"),this._cacheTransformEventData(e),this.isDrawingMode)this._onMouseMoveInDrawingMode(e);else if(this._isMainEvent(e)){var n=this._groupSelector;n?(i=this._absolutePointer,n.left=i.x-n.ex,n.top=i.y-n.ey,this.renderTop()):this._currentTransform?this._transformObject(e):(t=this.findTarget(e)||null,this._setCursorFromEvent(e,t),this._fireOverOutEvents(t,e)),this._handleEvent(e,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(e,t){var i=this._hoveredTarget,n=this._hoveredTargets,r=this.targets,o=Math.max(n.length,r.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:i,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var s=0;s<o;s++)this.fireSyntheticInOutEvents(r[s],t,{oldTarget:n[s],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=e,this._hoveredTargets=this.targets.concat()},_fireEnterLeaveEvents:function(e,t){var i=this._draggedoverTarget,n=this._hoveredTargets,r=this.targets,o=Math.max(n.length,r.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:i,evtOut:"dragleave",evtIn:"dragenter"});for(var s=0;s<o;s++)this.fireSyntheticInOutEvents(r[s],t,{oldTarget:n[s],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=e},fireSyntheticInOutEvents:function(e,t,i){var n,r,o,s=i.oldTarget,a=s!==e,l=i.canvasEvtIn,c=i.canvasEvtOut;a&&(n={e:t,target:e,previousTarget:s},r={e:t,target:s,nextTarget:e}),o=e&&a,s&&a&&(c&&this.fire(c,r),s.fire(i.evtOut,r)),o&&(l&&this.fire(l,n),e.fire(i.evtIn,n))},__onMouseWheel:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"wheel"),this._resetTransformEventData()},_transformObject:function(e){var t=this.getPointer(e),i=this._currentTransform;i.reset=!1,i.shiftKey=e.shiftKey,i.altKey=e[this.centeredKey],this._performTransformAction(e,i,t),i.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(e,t,i){var n=i.x,r=i.y,o=t.action,s=!1,a=t.actionHandler;a&&(s=a(e,t,n,r)),"drag"===o&&s&&(t.target.isMoving=!0,this.setCursor(t.target.moveCursor||this.moveCursor)),t.actionPerformed=t.actionPerformed||s},_fire:w.controlsUtils.fireEvent,_setCursorFromEvent:function(e,t){if(!t)return this.setCursor(this.defaultCursor),!1;
vendor: 10,269 bytes, line 78
78var i=t.hoverCursor||this.hoverCursor,n=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,r=(!n||!n.contains(t))&&t._findTargetCorner(this.getPointer(e,!0));r?this.setCursor(this.getCornerCursor(r,t,e)):(t.subTargetCheck&&this.targets.concat().reverse().map(function(e){i=e.hoverCursor||i}),this.setCursor(i))},getCornerCursor:function(e,t,i){var n=t.controls[e];return n.cursorStyleHandler(i,n,t)}})}(),d=Math.min,f=Math.max,w.util.object.extend(w.Canvas.prototype,{_shouldGroup:function(e,t){var i=this._activeObject;return i&&this._isSelectionKeyPressed(e)&&t&&t.selectable&&this.selection&&(i!==t||"activeSelection"===i.type)&&!t.onSelect({e:e})},_handleGrouping:function(e,t){var i=this._activeObject;i.__corner||(t!==i||(t=this.findTarget(e,!0))&&t.selectable)&&(i&&"activeSelection"===i.type?this._updateActiveSelection(t,e):this._createActiveSelection(t,e))},_updateActiveSelection:function(e,t){var i=this._activeObject,n=i._objects.slice(0);i.contains(e)?(i.removeWithUpdate(e),this._hoveredTarget=e,this._hoveredTargets=this.targets.concat(),1===i.size()&&this._setActiveObject(i.item(0),t)):(i.addWithUpdate(e),this._hoveredTarget=i,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(n,t)},_createActiveSelection:function(e,t){var i=this.getActiveObjects(),n=this._createGroup(e);this._hoveredTarget=n,this._setActiveObject(n,t),this._fireSelectionEvents(i,t)},_createGroup:function(e){var t=this._objects,i=t.indexOf(this._activeObject)<t.indexOf(e)?[this._activeObject,e]:[e,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new w.ActiveSelection(i,{canvas:this})},_groupSelectedObjects:function(e){var t,i=this._collectObjects(e);1===i.length?this.setActiveObject(i[0],e):i.length>1&&(t=new w.ActiveSelection(i.reverse(),{canvas:this}),this.setActiveObject(t,e))},_collectObjects:function(e){for(var t,i=[],n=this._groupSelector.ex,r=this._groupSelector.ey,o=n+this._groupSelector.left,s=r+this._groupSelector.top,a=new w.Point(d(n,o),d(r,s)),l=new w.Point(f(n,o),f(r,s)),c=!this.selectionFullyContained,u=n===o&&r===s,h=this._objects.length;h--&&!((t=this._objects[h])&&t.selectable&&t.visible&&(c&&t.intersectsWithRect(a,l,!0)||t.isContainedWithinRect(a,l,!0)||c&&t.containsPoint(a,null,!0)||c&&t.containsPoint(l,null,!0))&&(i.push(t),u)););return i.length>1&&(i=i.filter(function(t){return!t.onSelect({e:e})})),i},_maybeGroupObjects:function(e){this.selection&&this._groupSelector&&this._groupSelectedObjects(e),this.setCursor(this.defaultCursor),this._groupSelector=null}}),w.util.object.extend(w.StaticCanvas.prototype,{toDataURL:function(e){e||(e={});var t=e.format||"png",i=e.quality||1,n=(e.multiplier||1)*(e.enableRetinaScaling?this.getRetinaScaling():1),r=this.toCanvasElement(n,e);return w.util.toDataURL(r,t,i)},toCanvasElement:function(e,t){e=e||1;var i=((t=t||{}).width||this.width)*e,n=(t.height||this.height)*e,r=this.getZoom(),o=this.width,s=this.height,a=r*e,l=this.viewportTransform,c=(l[4]-(t.left||0))*e,u=(l[5]-(t.top||0))*e,h=this.interactive,d=[a,0,0,a,c,u],f=this.enableRetinaScaling,p=w.util.createCanvasElement(),m=this.contextTop;return p.width=i,p.height=n,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=d,this.width=i,this.height=n,this.calcViewportBoundaries(),this.renderCanvas(p.getContext("2d"),this._objects),this.viewportTransform=l,this.width=o,this.height=s,this.calcViewportBoundaries(),this.interactive=h,this.enableRetinaScaling=f,this.contextTop=m,p}}),w.util.object.extend(w.StaticCanvas.prototype,{loadFromJSON:function(e,t,i){if(e){var n="string"==typeof e?JSON.parse(e):w.util.object.clone(e),r=this,o=n.clipPath,s=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete n.clipPath,this._enlivenObjects(n.objects,function(e){r.clear(),r._setBgOverlay(n,function(){o?r._enlivenObjects([o],function(i){r.clipPath=i[0],r.__setupCanvas.call(r,n,e,s,t)}):r.__setupCanvas.call(r,n,e,s,t)})},i),this}},__setupCanvas:function(e,t,i,n){var r=this;t.forEach(function(e,t){r.insertAt(e,t)}),this.renderOnAddRemove=i,delete e.objects,delete e.backgroundImage,delete e.overlayImage,delete e.background,delete e.overlay,this._setOptions(e),this.renderAll(),n&&n()},_setBgOverlay:function(e,t){var i={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(e.backgroundImage||e.overlayImage||e.background||e.overlay){var n=function(){i.backgroundImage&&i.overlayImage&&i.backgroundColor&&i.overlayColor&&t&&t()};this.__setBgOverlay("backgroundImage",e.backgroundImage,i,n),this.__setBgOverlay("overlayImage",e.overlayImage,i,n),this.__setBgOverlay("backgroundColor",e.background,i,n),this.__setBgOverlay("overlayColor",e.overlay,i,n)}else t&&t()},__setBgOverlay:function(e,t,i,n){var r=this;if(!t)return i[e]=!0,void(n&&n());"backgroundImage"===e||"overlayImage"===e?w.util.enlivenObjects([t],function(t){r[e]=t[0],i[e]=!0,n&&n()}):this["set"+w.util.string.capitalize(e,!0)](t,function(){i[e]=!0,n&&n()})},_enlivenObjects:function(e,t,i){e&&0!==e.length?w.util.enlivenObjects(e,function(e){t&&t(e)},null,i):t&&t([])},_toDataURL:function(e,t){this.clone(function(i){t(i.toDataURL(e))})},_toDataURLWithMultiplier:function(e,t,i){this.clone(function(n){i(n.toDataURLWithMultiplier(e,t))})},clone:function(e,t){var i=JSON.stringify(this.toJSON(t));this.cloneWithoutData(function(t){t.loadFromJSON(i,function(){e&&e(t)})})},cloneWithoutData:function(e){var t=w.util.createCanvasElement();t.width=this.width,t.height=this.height;var i=new w.Canvas(t);this.backgroundImage?(i.setBackgroundImage(this.backgroundImage.src,function(){i.renderAll(),e&&e(i)}),i.backgroundImageOpacity=this.backgroundImageOpacity,i.backgroundImageStretch=this.backgroundImageStretch):e&&e(i)}}),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.object.clone,r=t.util.toFixed,o=t.util.string.capitalize,s=t.util.degreesToRadians,a=!t.isLikelyNode;t.Object||(t.Object=t.util.createClass(t.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:a,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",activeOn:"down",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),colorProperties:"fill stroke backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(e){e&&this.setOptions(e)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=t.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(e){var i=t.perfLimitSizeTotal,n=e.width,r=e.height,o=t.maxCacheSideLimit,s=t.minCacheSideLimit;if(n<=o&&r<=o&&n*r<=i)return n<s&&(e.width=s),r<s&&(e.height=s),e;var a=n/r,l=t.util.limitDimsByArea(a,i),c=t.util.capValue,u=c(s,l.x,o),h=c(s,l.y,o);return n>u&&(e.zoomX/=n/u,e.width=u,e.capped=!0),r>h&&(e.zoomY/=r/h,e.height=h,e.capped=!0),e},_getCacheCanvasDimensions:function(){var e=this.getTotalObjectScaling(),t=this._getTransformedDimensions(0,0),i=t.x*e.scaleX/this.scaleX,n=t.y*e.scaleY/this.scaleY;return{width:i+2,height:n+2,zoomX:e.scaleX,zoomY:e.scaleY,x:i,y:n}},_updateCacheCanvas:function(){var e=this.canvas;if(this.noScaleCache&&e&&e._currentTransform){var i=e._currentTransform.target,n=e._currentTransform.action;if(this===i&&n.slice&&"scale"===n.slice(0,5))return!1}var r,o,s=this._cacheCanvas,a=this._limitCacheSize(this._getCacheCanvasDimensions()),l=t.minCacheSideLimit,c=a.width,u=a.height,h=a.zoomX,d=a.zoomY,f=c!==this.cacheWidth||u!==this.cacheHeight,p=this.zoomX!==h||this.zoomY!==d,m=f||p,g=0,v=0,b=!1;if(f){var y=this._cacheCanvas.width,w=this._cacheCanvas.height,_=c>y||u>w;b=_||(c<.9*y||u<.9*w)&&y>l&&w>l,_&&!a.capped&&(c>l||u>l)&&(g=.1*c,v=.1*u)}return this instanceof t.Text&&this.path&&(m=!0,b=!0,g+=this.getHeightOfLine(0)*this.zoomX,v+=this.getHeightOfLine(0)*this.zoomY),!!m&&(b?(s.width=Math.ceil(c+g),s.height=Math.ceil(u+v)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,s.width,s.height)),r=a.x/2,o=a.y/2,this.cacheTranslationX=Math.round(s.width/2-r)+r,this.cacheTranslationY=Math.round(s.height/2-o)+o,this.cacheWidth=c,this.cacheHeight=u,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(h,d),this.zoomX=h,this.zoomY=d,!0)},setOptions:function(e){this._setOptions(e),this._initGradient(e.fill,"fill"),this._initGradient(e.stroke,"stroke"),this._initPattern(e.fill,"fill"),this._initPattern(e.stroke,"stroke")},transform:function(e){var t=this.group&&!this.group._transformDone||this.group&&this.canvas&&e===this.canvas.contextTop,i=this.calcTransformMatrix(!t);e.transform(i[0],i[1],i[2],i[3],i[4],i[5])},toObject:function(e){var i=t.Object.NUM_FRACTION_DIGITS,n={type:this.t
vendor: 9,037 bytes, line 78
78ype,version:t.version,originX:this.originX,originY:this.originY,left:r(this.left,i),top:r(this.top,i),width:r(this.width,i),height:r(this.height,i),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:r(this.strokeWidth,i),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeUniform:this.strokeUniform,strokeMiterLimit:r(this.strokeMiterLimit,i),scaleX:r(this.scaleX,i),scaleY:r(this.scaleY,i),angle:r(this.angle,i),flipX:this.flipX,flipY:this.flipY,opacity:r(this.opacity,i),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:r(this.skewX,i),skewY:r(this.skewY,i)};return this.clipPath&&!this.clipPath.excludeFromExport&&(n.clipPath=this.clipPath.toObject(e),n.clipPath.inverted=this.clipPath.inverted,n.clipPath.absolutePositioned=this.clipPath.absolutePositioned),t.util.populateWithProperties(this,n,e),this.includeDefaultValues||(n=this._removeDefaultValues(n)),n},toDatalessObject:function(e){return this.toObject(e)},_removeDefaultValues:function(e){var i=t.util.getKlass(e.type).prototype;return i.stateProperties.forEach(function(t){"left"!==t&&"top"!==t&&(e[t]===i[t]&&delete e[t],"[object Array]"===Object.prototype.toString.call(e[t])&&"[object Array]"===Object.prototype.toString.call(i[t])&&0===e[t].length&&0===i[t].length&&delete e[t])}),e},toString:function(){return"#<fabric."+o(this.type)+">"},getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};var e=t.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(e.scaleX),scaleY:Math.abs(e.scaleY)}},getTotalObjectScaling:function(){var e=this.getObjectScaling(),t=e.scaleX,i=e.scaleY;if(this.canvas){var n=this.canvas.getZoom(),r=this.canvas.getRetinaScaling();t*=n*r,i*=n*r}return{scaleX:t,scaleY:i}},getObjectOpacity:function(){var e=this.opacity;return this.group&&(e*=this.group.getObjectOpacity()),e},_set:function(e,i){var n="scaleX"===e||"scaleY"===e,r=this[e]!==i,o=!1;return n&&(i=this._constrainScale(i)),"scaleX"===e&&i<0?(this.flipX=!this.flipX,i*=-1):"scaleY"===e&&i<0?(this.flipY=!this.flipY,i*=-1):"shadow"!==e||!i||i instanceof t.Shadow?"dirty"===e&&this.group&&this.group.set("dirty",i):i=new t.Shadow(i),this[e]=i,r&&(o=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(e)>-1?(this.dirty=!0,o&&this.group.set("dirty",!0)):o&&this.stateProperties.indexOf(e)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:t.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||!this.width&&!this.height&&0===this.strokeWidth||!this.visible},render:function(e){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(e.save(),this._setupCompositeOperation(e),this.drawSelectionBackground(e),this.transform(e),this._setOpacity(e),this._setShadow(e,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(e)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(e),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),e.restore())},renderCache:function(e){e=e||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,e.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&"transparent"!==this.stroke&&0!==this.strokeWidth},hasFill:function(){return this.fill&&"transparent"!==this.fill},needsItsOwnCache:function(){return!("stroke"!==this.paintFirst||!this.hasFill()||!this.hasStroke()||"object"!=typeof this.shadow)||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(e){var i=this.clipPath;if(e.save(),i.inverted?e.globalCompositeOperation="destination-out":e.globalCompositeOperation="destination-in",i.absolutePositioned){var n=t.util.invertTransform(this.calcTransformMatrix());e.transform(n[0],n[1],n[2],n[3],n[4],n[5])}i.transform(e),e.scale(1/i.zoomX,1/i.zoomY),e.drawImage(i._cacheCanvas,-i.cacheTranslationX,-i.cacheTranslationY),e.restore()},drawObject:function(e,t){var i=this.fill,n=this.stroke;t?(this.fill="black",this.stroke="",this._setClippingProperties(e)):this._renderBackground(e),this._render(e),this._drawClipPath(e),this.fill=i,this.stroke=n},_drawClipPath:function(e){var t=this.clipPath;t&&(t.canvas=this.canvas,t.shouldCache(),t._transformDone=!0,t.renderCache({forClipping:!0}),this.drawClipPathOnCache(e))},drawCacheOnCanvas:function(e){e.scale(1/this.zoomX,1/this.zoomY),e.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(e){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!e&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!e){var t=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-t/2,-i/2,t,i)}return!0}return!1},_renderBackground:function(e){if(this.backgroundColor){var t=this._getNonTransformedDimensions();e.fillStyle=this.backgroundColor,e.fillRect(-t.x/2,-t.y/2,t.x,t.y),this._removeShadow(e)}},_setOpacity:function(e){this.group&&!this.group._transformDone?e.globalAlpha=this.getObjectOpacity():e.globalAlpha*=this.opacity},_setStrokeStyles:function(e,t){var i=t.stroke;i&&(e.lineWidth=t.strokeWidth,e.lineCap=t.strokeLineCap,e.lineDashOffset=t.strokeDashOffset,e.lineJoin=t.strokeLineJoin,e.miterLimit=t.strokeMiterLimit,i.toLive?"percentage"===i.gradientUnits||i.gradientTransform||i.patternTransform?this._applyPatternForTransformedGradient(e,i):(e.strokeStyle=i.toLive(e,this),this._applyPatternGradientTransform(e,i)):e.strokeStyle=t.stroke)},_setFillStyles:function(e,t){var i=t.fill;i&&(i.toLive?(e.fillStyle=i.toLive(e,this),this._applyPatternGradientTransform(e,t.fill)):e.fillStyle=i)},_setClippingProperties:function(e){e.globalAlpha=1,e.strokeStyle="transparent",e.fillStyle="#000000"},_setLineDash:function(e,t){t&&0!==t.length&&(1&t.length&&t.push.apply(t,t),e.setLineDash(t))},_renderControls:function(e,i){var n,r,o,a=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(i=i||{}).hasBorders?i.hasBorders:this.hasBorders,o=void 0!==i.hasControls?i.hasControls:this.hasControls,l=t.util.multiplyTransformMatrices(a,l),n=t.util.qrDecompose(l),e.save(),e.translate(n.translateX,n.translateY),e.lineWidth=1*this.borderScaleFactor,this.group||(e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),e.rotate(s(n.angle)),i.forActiveSelection||this.group?r&&this.drawBordersInGroup(e,n,i):r&&this.drawBorders(e,i),o&&this.drawControls(e,i),e.restore()},_setShadow:function(e){if(this.shadow){var i,n=this.shadow,r=this.canvas,o=r&&r.viewportTransform[0]||1,s=r&&r.viewportTransform[3]||1;i=n.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),r&&r._isRetinaScaling()&&(o*=t.devicePixelRatio,s*=t.devicePixelRatio),e.shadowColor=n.color,e.shadowBlur=n.blur*t.browserShadowBlurConstant*(o+s)*(i.scaleX+i.scaleY)/4,e.shadowOffsetX=n.offsetX*o*i.scaleX,e.shadowOffsetY=n.offsetY*s*i.scaleY}},_removeShadow:function(e){this.shadow&&(e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0)},_applyPatternGradientTransform:function(e,t){if(!t||!t.toLive)return{offsetX:0,offsetY:0};var i=t.gradientTransform||t.patternTransform,n=-this.width/2+t.offsetX||0,r=-this.height/2+t.offsetY||0;return"percentage"===t.gradientUnits?e.transform(this.width,0,0,this.height,n,r):e.transform(1,0,0,1,n,r),i&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),{offsetX:n,offsetY:r}},_renderPaintInOrder:function(e){"stroke"===this.paintFirst?(this._renderStroke(e),this._renderFill(e)):(this._renderFill(e),this._renderStroke(e))},_render:function(){},_renderFill:function(e){this.fill&&(e.save(),this._setFillStyles(e,this),"evenodd"===this.fillRule?e.fill("evenodd"):e.fill(),e.restore())},_renderStroke:function(e){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this.strokeUniform&&this.group){var t=this.getObjectScaling();e.scale(1/t.scaleX,1/t.scaleY)}else this.strokeUniform&&e.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(e,this.strokeDashArray),this._setStrokeStyles(e,this),e.stroke(),e.restore(
vendor: 10,010 bytes, line 78
78)}},_applyPatternForTransformedGradient:function(e,i){var n,r=this._limitCacheSize(this._getCacheCanvasDimensions()),o=t.util.createCanvasElement(),s=this.canvas.getRetinaScaling(),a=r.x/this.scaleX/s,l=r.y/this.scaleY/s;o.width=a,o.height=l,(n=o.getContext("2d")).beginPath(),n.moveTo(0,0),n.lineTo(a,0),n.lineTo(a,l),n.lineTo(0,l),n.closePath(),n.translate(a/2,l/2),n.scale(r.zoomX/this.scaleX/s,r.zoomY/this.scaleY/s),this._applyPatternGradientTransform(n,i),n.fillStyle=i.toLive(e),n.fill(),e.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),e.scale(s*this.scaleX/r.zoomX,s*this.scaleY/r.zoomY),e.strokeStyle=n.createPattern(o,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var e=t.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",e.scaleX),this.set("scaleY",e.scaleY),this.angle=e.angle,this.skewX=e.skewX,this.skewY=0}},_removeTransformMatrix:function(e){var i=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),i=t.util.transformPoint(i,this.transformMatrix)),this.transformMatrix=null,e&&(this.scaleX*=e.scaleX,this.scaleY*=e.scaleY,this.cropX=e.cropX,this.cropY=e.cropY,i.x+=e.offsetLeft,i.y+=e.offsetTop,this.width=e.width,this.height=e.height),this.setPositionByOrigin(i,"center","center")},clone:function(e,i){var n=this.toObject(i);this.constructor.fromObject?this.constructor.fromObject(n,e):t.Object._fromObject("Object",n,e)},cloneAsImage:function(e,i){var n=this.toCanvasElement(i);return e&&e(new t.Image(n)),this},toCanvasElement:function(e){e||(e={});var i=t.util,n=i.saveObjectTransform(this),r=this.group,o=this.shadow,s=Math.abs,a=(e.multiplier||1)*(e.enableRetinaScaling?t.devicePixelRatio:1);delete this.group,e.withoutTransform&&i.resetObjectTransform(this),e.withoutShadow&&(this.shadow=null);var l,c,u,h,d=t.util.createCanvasElement(),f=this.getBoundingRect(!0,!0),p=this.shadow,m={x:0,y:0};p&&(c=p.blur,l=p.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),m.x=2*Math.round(s(p.offsetX)+c)*s(l.scaleX),m.y=2*Math.round(s(p.offsetY)+c)*s(l.scaleY)),u=f.width+m.x,h=f.height+m.y,d.width=Math.ceil(u),d.height=Math.ceil(h);var g=new t.StaticCanvas(d,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===e.format&&(g.backgroundColor="#fff"),this.setPositionByOrigin(new t.Point(g.width/2,g.height/2),"center","center");var v=this.canvas;g.add(this);var b=g.toCanvasElement(a||1,e);return this.shadow=o,this.set("canvas",v),r&&(this.group=r),this.set(n).setCoords(),g._objects=[],g.dispose(),g=null,b},toDataURL:function(e){return e||(e={}),t.util.toDataURL(this.toCanvasElement(e),e.format||"png",e.quality||1)},isType:function(e){return this.type===e},complexity:function(){return 1},toJSON:function(e){return this.toObject(e)},rotate:function(e){var t=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return t&&this._setOriginToCenter(),this.set("angle",e),t&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(e,i){i=i||this.canvas.getPointer(e);var n=new t.Point(i.x,i.y),r=this._getLeftTopCoords();return this.angle&&(n=t.util.rotatePoint(n,r,s(-this.angle))),{x:n.x-r.x,y:n.y-r.y}},_setupCompositeOperation:function(e){this.globalCompositeOperation&&(e.globalCompositeOperation=this.globalCompositeOperation)}}),t.util.createAccessors&&t.util.createAccessors(t.Object),i(t.Object.prototype,t.Observable),t.Object.NUM_FRACTION_DIGITS=2,t.Object._fromObject=function(e,i,r,o){var s=t[e];i=n(i,!0),t.util.enlivenPatterns([i.fill,i.stroke],function(e){void 0!==e[0]&&(i.fill=e[0]),void 0!==e[1]&&(i.stroke=e[1]),t.util.enlivenObjects([i.clipPath],function(e){i.clipPath=e[0];var t=o?new s(i[o],i):new s(i);r&&r(t)})})},t.Object.__uid=0)}(t),p=w.util.degreesToRadians,m={left:-.5,center:0,right:.5},g={top:-.5,center:0,bottom:.5},w.util.object.extend(w.Object.prototype,{translateToGivenOrigin:function(e,t,i,n,r){var o,s,a,l=e.x,c=e.y;return"string"==typeof t?t=m[t]:t-=.5,"string"==typeof n?n=m[n]:n-=.5,"string"==typeof i?i=g[i]:i-=.5,"string"==typeof r?r=g[r]:r-=.5,s=r-i,((o=n-t)||s)&&(a=this._getTransformedDimensions(),l=e.x+o*a.x,c=e.y+s*a.y),new w.Point(l,c)},translateToCenterPoint:function(e,t,i){var n=this.translateToGivenOrigin(e,t,i,"center","center");return this.angle?w.util.rotatePoint(n,e,p(this.angle)):n},translateToOriginPoint:function(e,t,i){var n=this.translateToGivenOrigin(e,"center","center",t,i);return this.angle?w.util.rotatePoint(n,e,p(this.angle)):n},getCenterPoint:function(){var e=new w.Point(this.left,this.top);return this.translateToCenterPoint(e,this.originX,this.originY)},getPointByOrigin:function(e,t){var i=this.getCenterPoint();return this.translateToOriginPoint(i,e,t)},toLocalPoint:function(e,t,i){var n,r,o=this.getCenterPoint();return n=void 0!==t&&void 0!==i?this.translateToGivenOrigin(o,"center","center",t,i):new w.Point(this.left,this.top),r=new w.Point(e.x,e.y),this.angle&&(r=w.util.rotatePoint(r,o,-p(this.angle))),r.subtractEquals(n)},setPositionByOrigin:function(e,t,i){var n=this.translateToCenterPoint(e,t,i),r=this.translateToOriginPoint(n,this.originX,this.originY);this.set("left",r.x),this.set("top",r.y)},adjustPosition:function(e){var t,i,n=p(this.angle),r=this.getScaledWidth(),o=w.util.cos(n)*r,s=w.util.sin(n)*r;t="string"==typeof this.originX?m[this.originX]:this.originX-.5,i="string"==typeof e?m[e]:e-.5,this.left+=o*(i-t),this.top+=s*(i-t),this.setCoords(),this.originX=e},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var e=this.getCenterPoint();this.originX="center",this.originY="center",this.left=e.x,this.top=e.y},_resetOrigin:function(){var e=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=e.x,this.top=e.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var e=w.util,t=e.degreesToRadians,i=e.multiplyTransformMatrices,n=e.transformPoint;e.object.extend(w.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(e,t){return t?e?this.calcACoords():this.calcLineCoords():(this.aCoords&&this.lineCoords||this.setCoords(!0),e?this.aCoords:this.lineCoords)},getCoords:function(e,t){return i=this._getCoords(e,t),[new w.Point(i.tl.x,i.tl.y),new w.Point(i.tr.x,i.tr.y),new w.Point(i.br.x,i.br.y),new w.Point(i.bl.x,i.bl.y)];var i},intersectsWithRect:function(e,t,i,n){var r=this.getCoords(i,n);return"Intersection"===w.Intersection.intersectPolygonRectangle(r,e,t).status},intersectsWithObject:function(e,t,i){return"Intersection"===w.Intersection.intersectPolygonPolygon(this.getCoords(t,i),e.getCoords(t,i)).status||e.isContainedWithinObject(this,t,i)||this.isContainedWithinObject(e,t,i)},isContainedWithinObject:function(e,t,i){for(var n=this.getCoords(t,i),r=t?e.aCoords:e.lineCoords,o=0,s=e._getImageLines(r);o<4;o++)if(!e.containsPoint(n[o],s))return!1;return!0},isContainedWithinRect:function(e,t,i,n){var r=this.getBoundingRect(i,n);return r.left>=e.x&&r.left+r.width<=t.x&&r.top>=e.y&&r.top+r.height<=t.y},containsPoint:function(e,t,i,n){var r=this._getCoords(i,n),o=(t=t||this._getImageLines(r),this._findCrossPoints(e,t));return 0!==o&&o%2==1},isOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br;return!!this.getCoords(!0,e).some(function(e){return e.x<=i.x&&e.x>=t.x&&e.y<=i.y&&e.y>=t.y})||!!this.intersectsWithRect(t,i,!0,e)||this._containsCenterOfCanvas(t,i,e)},_containsCenterOfCanvas:function(e,t,i){var n={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return!!this.containsPoint(n,null,!0,i)},isPartiallyOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br;return!!this.intersectsWithRect(t,i,!0,e)||this.getCoords(!0,e).every(function(e){return(e.x>=i.x||e.x<=t.x)&&(e.y>=i.y||e.y<=t.y)})&&this._containsCenterOfCanvas(t,i,e)},_getImageLines:function(e){return{topline:{o:e.tl,d:e.tr},rightline:{o:e.tr,d:e.br},bottomline:{o:e.br,d:e.bl},leftline:{o:e.bl,d:e.tl}}},_findCrossPoints:function(e,t){var i,n,r,o=0;for(var s in t)if(!((r=t[s]).o.y<e.y&&r.d.y<e.y||r.o.y>=e.y&&r.d.y>=e.y||(r.o.x===r.d.x&&r.o.x>=e.x?n=r.o.x:(i=(r.d.y-r.o.y)/(r.d.x-r.o.x),n=-(e.y-0*e.x-(r.o.y-i*r.o.x))/(0-i)),n>=e.x&&(o+=1),2!==o)))break;return o},getBoundingRect:function(t,i){var n=this.getCoords(t,i);return e.makeBoundingBoxFromPoints(n)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(e){return Math.abs(e)<this.minScaleLimit?e<0?-this.minScaleLimit:this.minScaleLimit:0===e?1e-4:e},scale:function(e){return this._set("scaleX",e),this._set("scaleY",e),this.setCoords()},scaleToWidth:function(e,t){var i=this.getBoundingRect(t).width/this.getScaledWidth();return this.scale(e/this.width/i)},scaleToHeight:function(e,t){var i=this.getBoundingRect(t).height/this.getScaledHeight();return this.scale(e/this.height/i)},calcCoords:function(e){return e?this.calcACoords():this.calcOCoords()},calcLineCoords:function(){var i=this.getViewportTransform(),r=this.padding,o=t(this.angle),s=e.cos(o)*r,a=e.sin(o)*r,l=s+a,c=s-a,u=this.calcACoords(),h={tl:n(u.tl,
vendor: 4,742 bytes, line 78
78i),tr:n(u.tr,i),bl:n(u.bl,i),br:n(u.br,i)};return r&&(h.tl.x-=c,h.tl.y-=l,h.tr.x+=l,h.tr.y-=c,h.bl.x-=l,h.bl.y+=c,h.br.x+=c,h.br.y+=l),h},calcOCoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),n=this.getViewportTransform(),r=i(n,t),o=i(r,e),s=(o=i(o,[1/n[0],0,0,1/n[3],0,0]),this._calculateCurrentDimensions()),a={};return this.forEachControl(function(e,t,i){a[t]=e.positionHandler(s,o,i)}),a},calcACoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),r=i(t,e),o=this._getTransformedDimensions(),s=o.x/2,a=o.y/2;return{tl:n({x:-s,y:-a},r),tr:n({x:s,y:-a},r),bl:n({x:-s,y:a},r),br:n({x:s,y:a},r)}},setCoords:function(e){return this.aCoords=this.calcACoords(),this.lineCoords=this.group?this.aCoords:this.calcLineCoords(),e||(this.oCoords=this.calcOCoords(),this._setCornerCoords&&this._setCornerCoords()),this},_calcRotateMatrix:function(){return e.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var e=this.getCenterPoint();return[1,0,0,1,e.x,e.y]},transformMatrixKey:function(e){var t="_",i="";return!e&&this.group&&(i=this.group.transformMatrixKey(e)+t),i+this.top+t+this.left+t+this.scaleX+t+this.scaleY+t+this.skewX+t+this.skewY+t+this.angle+t+this.originX+t+this.originY+t+this.width+t+this.height+t+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(e){var t=this.calcOwnMatrix();if(e||!this.group)return t;var n=this.transformMatrixKey(e),r=this.matrixCache||(this.matrixCache={});return r.key===n?r.value:(this.group&&(t=i(this.group.calcTransformMatrix(!1),t)),r.key=n,r.value=t,t)},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),i=this.ownMatrixCache||(this.ownMatrixCache={});if(i.key===t)return i.value;var n=this._calcTranslateMatrix(),r={angle:this.angle,translateX:n[4],translateY:n[5],scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY};return i.key=t,i.value=e.composeMatrix(r),i.value},_calcDimensionsTransformMatrix:function(t,i,n){return e.calcDimensionsMatrix({skewX:t,skewY:i,scaleX:this.scaleX*(n&&this.flipX?-1:1),scaleY:this.scaleY*(n&&this.flipY?-1:1)})},_getNonTransformedDimensions:function(){var e=this.strokeWidth;return{x:this.width+e,y:this.height+e}},_getTransformedDimensions:function(t,i){void 0===t&&(t=this.skewX),void 0===i&&(i=this.skewY);var n,r,o,s=0===t&&0===i;if(this.strokeUniform?(r=this.width,o=this.height):(r=(n=this._getNonTransformedDimensions()).x,o=n.y),s)return this._finalizeDimensions(r*this.scaleX,o*this.scaleY);var a=e.sizeAfterTransform(r,o,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:t,skewY:i});return this._finalizeDimensions(a.x,a.y)},_finalizeDimensions:function(e,t){return this.strokeUniform?{x:e+this.strokeWidth,y:t+this.strokeWidth}:{x:e,y:t}},_calculateCurrentDimensions:function(){var e=this.getViewportTransform(),t=this._getTransformedDimensions();return n(t,e,!0).scalarAdd(2*this.padding)}})}(),w.util.object.extend(w.Object.prototype,{sendToBack:function(){return this.group?w.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?w.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(e){return this.group?w.StaticCanvas.prototype.sendBackwards.call(this.group,this,e):this.canvas&&this.canvas.sendBackwards(this,e),this},bringForward:function(e){return this.group?w.StaticCanvas.prototype.bringForward.call(this.group,this,e):this.canvas&&this.canvas.bringForward(this,e),this},moveTo:function(e){return this.group&&"activeSelection"!==this.group.type?w.StaticCanvas.prototype.moveTo.call(this.group,this,e):this.canvas&&this.canvas.moveTo(this,e),this}}),function(){function e(e,t){if(t){if(t.toLive)return e+": url(#SVGID_"+t.id+"); ";var i=new w.Color(t),n=e+": "+i.toRgb()+"; ",r=i.getAlpha();return 1!==r&&(n+=e+"-opacity: "+r.toString()+"; "),n}return e+": none; "}var t=w.util.toFixed;w.util.object.extend(w.Object.prototype,{getSvgStyles:function(t){var i=this.fillRule?this.fillRule:"nonzero",n=this.strokeWidth?this.strokeWidth:"0",r=this.strokeDashArray?this.strokeDashArray.join(" "):"none",o=this.strokeDashOffset?this.strokeDashOffset:"0",s=this.strokeLineCap?this.strokeLineCap:"butt",a=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=void 0!==this.opacity?this.opacity:"1",u=this.visible?"":" visibility: hidden;",h=t?"":this.getSvgFilter(),d=e("fill",this.fill);return[e("stroke",this.stroke),"stroke-width: ",n,"; ","stroke-dasharray: ",r,"; ","stroke-linecap: ",s,"; ","stroke-dashoffset: ",o,"; ","stroke-linejoin: ",a,"; ","stroke-miterlimit: ",l,"; ",d,"fill-rule: ",i,";
78 ","opacity: ",c,";",h,u].join("")},getSvgSpanStyles:function(t,i){var n="; ",r=t.fontFamily?"font-family: "+(-1===t.fontFamily.indexOf("'")&&-1===t.fontFamily.indexOf('"')?"'"+t.fontFamily+"'":t.fontFamily)+n:"",o=t.strokeWidth?"stroke-width: "+t.strokeWidth+n:"",s=t.fontSize?"font-size: "+t.fontSize+"px"+n:"",a=t.fontStyle?"font-style: "+t.fontStyle+n:"",l=t.fontWeight?"font-weight: "+t.fontWeight+n:"",c=t.fill?e("fill",t.fill):"",u=t.stroke?e("stroke",t.stroke):"",h=this.getSvgTextDecoration(t);return h&&(h="text-decoration: "+h+n),[u,o,r,s,a,l,h,c,t.deltaY?"baseline-shift: "+-t.deltaY+"; ":"",i?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(e){return["overline","underline","line-through"].filter(function(t){return e[t.replace("-","")]}).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(e,t){var i=e?this.calcTransformMatrix():this.calcOwnMatrix();return'transform="'+w.util.matrixToSVG(i)+(t||"")+'" '},_setSVGBg:function(e){if(this.backgroundColor){var i=w.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',t(-this.width/2,i),'" y="',t(-this.height/2,i),'" width="',t(this.width,i),'" height="',t(this.height,i),'"></rect>\n')}},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(e),{reviver:e})},toClipPathSVG:function(e){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(e),{reviver:e})},_createBaseClipPathSVGMarkup:function(e,t){var i=(t=t||{}).reviver,n=t.additionalTransform||"",r=[this.getSvgTransform(!0,n),this.getSvgCommons()].join(""),o=e.indexOf("COMMON_PARTS");return e[o]=r,i?i(e.join("")):e.join("")},_createBaseSVGMarkup:function(e,t){var i,n,r=(t=t||{}).noStyle,o=t.reviver,s=r?"":'style="'+this.getSvgStyles()+'" ',a=t.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",u=l&&l.absolutePositioned,h=this.stroke,d=this.fill,f=this.shadow,p=[],m=e.indexOf("COMMON_PARTS"),g=t.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+w.Object.__uid++,n='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(o)+"</clipPath>\n"),u&&p.push("<g ",a,this.getSvgCommons()," >\n"),p.push("<g ",this.getSvgTransform(!1),u?"":a+this.getSvgCommons()," >\n"),i=[s,c,r?"":this.addPaintOrder()," ",g?'transform="'+g+'" ':""].join(""),e[m]=i,d&&d.toLive&&p.push(d.toSVG(this)),h&&h.toLive&&p.push(h.toSVG(this)),f&&p.push(f.toSVG(this)),l&&p.push(n),p.push(e.join("")),p.push("</g>\n"),u&&p.push("</g>\n"),o?o(p.join("")):p.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var e=w.util.object.extend,t="stateProperties";function i(t,i,n){var r={};n.forEach(function(e){r[e]=t[e]}),e(t[i],r,!0)}function n(e,t,i){if(e===t)return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r++)if(!n(e[r],t[r]))return!1;return!0}if(e&&"object"==typeof e){var s,a=Object.keys(e);if(!t||"object"!=typeof t||!i&&a.length!==Object.keys(t).length)return!1;for(r=0,o=a.length;r<o;r++)if("canvas"!==(s=a[r])&&"group"!==s&&!n(e[s],t[s]))return!1;return!0}}w.util.object.extend(w.Object.prototype,{hasStateChanged:function(e){var i="_"+(e=e||t);return Object.keys(this[i]).length<this[e].length||!n(this[i],this,!0)},saveState:function(e){var n=e&&e.propertySet||t,r="_"+n;return this[r]?(i(this,r,this[n]),e&&e.stateProperties&&i(this,r,e.stateProperties),this):this.setupState(e)},setupState:function(e){var i=(e=e||{}).propertySet||t;return e.propertySet=i,this["_"+i]={},this.saveState(e),this}})}(),function(){var e=w.util.degreesToRadians;w.util.object.extend(w.Object.prototype,{_findTargetCorner:function(e,t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var i,n,r,o=e.x,s=e.y,a=Object.keys(this.oCoords),l=a.length-1;for(this.__corner=0;l>=0;l--)if(r=a[l],this.isControlVisible(r)&&(n=this._getImageLines(t?this.oCoords[r].touchCorner:this.oCoords[r].corner),0!==(i=this._findCrossPoints({x:o,y:s},n))&&i%2==1))return this.__corner=r,r;return!1}
vendor: 13,953 bytes, line 78
78,forEachControl:function(e){for(var t in this.controls)e(this.controls[t],t,this)},_setCornerCoords:function(){var e=this.oCoords;for(var t in e){var i=this.controls[t];e[t].corner=i.calcCornerCoords(this.angle,this.cornerSize,e[t].x,e[t].y,!1),e[t].touchCorner=i.calcCornerCoords(this.angle,this.touchCornerSize,e[t].x,e[t].y,!0)}},drawSelectionBackground:function(t){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;t.save();var i=this.getCenterPoint(),n=this._calculateCurrentDimensions(),r=this.canvas.viewportTransform;return t.translate(i.x,i.y),t.scale(1/r[0],1/r[3]),t.rotate(e(this.angle)),t.fillStyle=this.selectionBackgroundColor,t.fillRect(-n.x/2,-n.y/2,n.x,n.y),t.restore(),this},drawBorders:function(e,t){t=t||{};var i=this._calculateCurrentDimensions(),n=this.borderScaleFactor,r=i.x+n,o=i.y+n,s=void 0!==t.hasControls?t.hasControls:this.hasControls,a=!1;return e.save(),e.strokeStyle=t.borderColor||this.borderColor,this._setLineDash(e,t.borderDashArray||this.borderDashArray),e.strokeRect(-r/2,-o/2,r,o),s&&(e.beginPath(),this.forEachControl(function(t,i,n){t.withConnection&&t.getVisibility(n,i)&&(a=!0,e.moveTo(t.x*r,t.y*o),e.lineTo(t.x*r+t.offsetX,t.y*o+t.offsetY))}),a&&e.stroke()),e.restore(),this},drawBordersInGroup:function(e,t,i){i=i||{};var n=w.util.sizeAfterTransform(this.width,this.height,t),r=this.strokeWidth,o=this.strokeUniform,s=this.borderScaleFactor,a=n.x+r*(o?this.canvas.getZoom():t.scaleX)+s,l=n.y+r*(o?this.canvas.getZoom():t.scaleY)+s;return e.save(),this._setLineDash(e,i.borderDashArray||this.borderDashArray),e.strokeStyle=i.borderColor||this.borderColor,e.strokeRect(-a/2,-l/2,a,l),e.restore(),this},drawControls:function(e,t){t=t||{},e.save();var i,n,r=this.canvas.getRetinaScaling();return e.setTransform(r,0,0,r,0,0),e.strokeStyle=e.fillStyle=t.cornerColor||this.cornerColor,this.transparentCorners||(e.strokeStyle=t.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(e,t.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(i=this.group.calcTransformMatrix()),this.forEachControl(function(r,o,s){n=s.oCoords[o],r.getVisibility(s,o)&&(i&&(n=w.util.transformPoint(n,i)),r.render(e,n.x,n.y,t,s))}),e.restore(),this},isControlVisible:function(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)},setControlVisible:function(e,t){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=t,this},setControlsVisibility:function(e){for(var t in e||(e={}),e)this.setControlVisible(t,e[t]);return this},onDeselect:function(){},onSelect:function(){}})}(),w.util.object.extend(w.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(e,t){var i=function(){},n=(t=t||{}).onComplete||i,r=t.onChange||i,o=this;return w.util.animate({startValue:e.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(t){e.set("left",t),o.requestRenderAll(),r()},onComplete:function(){e.setCoords(),n()}}),this},fxCenterObjectV:function(e,t){var i=function(){},n=(t=t||{}).onComplete||i,r=t.onChange||i,o=this;return w.util.animate({startValue:e.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(t){e.set("top",t),o.requestRenderAll(),r()},onComplete:function(){e.setCoords(),n()}}),this},fxRemove:function(e,t){var i=function(){},n=(t=t||{}).onComplete||i,r=t.onChange||i,o=this;return w.util.animate({startValue:e.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(t){e.set("opacity",t),o.requestRenderAll(),r()},onComplete:function(){o.remove(e),n()}}),this}}),w.util.object.extend(w.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var e,t,i=[];for(e in arguments[0])i.push(e);for(var n=0,r=i.length;n<r;n++)e=i[n],t=n!==r-1,this._animate(e,arguments[0][e],arguments[1],t)}else this._animate.apply(this,arguments);return this},_animate:function(e,t,i,n){var r,o=this;t=t.toString(),i=i?w.util.object.clone(i):{},~e.indexOf(".")&&(r=e.split("."));var s=o.colorProperties.indexOf(e)>-1||r&&o.colorProperties.indexOf(r[1])>-1,a=r?this.get(r[0])[r[1]]:this.get(e);"from"in i||(i.from=a),s||(t=~t.indexOf("=")?a+parseFloat(t.replace("=","")):parseFloat(t));var l={startValue:i.from,endValue:t,byValue:i.by,easing:i.easing,duration:i.duration,abort:i.abort&&function(e,t,n){return i.abort.call(o,e,t,n)},onChange:function(t,s,a){r?o[r[0]][r[1]]=t:o.set(e,t),n||i.onChange&&i.onChange(t,s,a)},onComplete:function(e,t,r){n||(o.setCoords(),i.onComplete&&i.onComplete(e,t,r))}};return s?w.util.animateColor(l.startValue,l.endValue,l.duration,l):w.util.animate(l)}}),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.object.clone,r={x1:1,x2:1,y1:1,y2:1};function o(e,t){var i=e.origin,n=e.axis1,r=e.axis2,o=e.dimension,s=t.nearest,a=t.center,l=t.farthest;return function(){switch(this.get(i)){case s:return Math.min(this.get(n),this.get(r));case a:return Math.min(this.get(n),this.get(r))+.5*this.get(o);case l:return Math.max(this.get(n),this.get(r))}}}t.Line?t.warn("fabric.Line is already defined"):(t.Line=t.util.createClass(t.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:t.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(e,t){e||(e=[0,0,0,0]),this.callSuper("initialize",t),this.set("x1",e[0]),this.set("y1",e[1]),this.set("x2",e[2]),this.set("y2",e[3]),this._setWidthHeight(t)},_setWidthHeight:function(e){e||(e={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in e?e.left:this._getLeftToOriginX(),this.top="top"in e?e.top:this._getTopToOriginY()},_set:function(e,t){return this.callSuper("_set",e,t),void 0!==r[e]&&this._setWidthHeight(),this},_getLeftToOriginX:o({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:o({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(e){e.beginPath();var t=this.calcLinePoints();e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineWidth=this.strokeWidth;var i=e.strokeStyle;e.strokeStyle=this.stroke||e.fillStyle,this.stroke&&this._renderStroke(e),e.strokeStyle=i},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(e){return i(this.callSuper("toObject",e),this.calcLinePoints())},_getNonTransformedDimensions:function(){var e=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(e.y-=this.strokeWidth),0===this.height&&(e.x-=this.strokeWidth)),e},calcLinePoints:function(){var e=this.x1<=this.x2?-1:1,t=this.y1<=this.y2?-1:1,i=e*this.width*.5,n=t*this.height*.5;return{x1:i,x2:e*this.width*-.5,y1:n,y2:t*this.height*-.5}},_toSVG:function(){var e=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',e.x1,'" y1="',e.y1,'" x2="',e.x2,'" y2="',e.y2,'" />\n']}}),t.Line.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),t.Line.fromElement=function(e,n,r){r=r||{};var o=t.parseAttributes(e,t.Line.ATTRIBUTE_NAMES),s=[o.x1||0,o.y1||0,o.x2||0,o.y2||0];n(new t.Line(s,i(o,r)))},t.Line.fromObject=function(e,i){var r=n(e,!0);r.points=[e.x1,e.y1,e.x2,e.y2],t.Object._fromObject("Line",r,function(e){delete e.points,i&&i(e)},"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=Math.PI;t.Circle?t.warn("fabric.Circle is already defined."):(t.Circle=t.util.createClass(t.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*i,cacheProperties:t.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(e,t){return this.callSuper("_set",e,t),"radius"===e&&this.setRadius(t),this},toObject:function(e){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(e))},_toSVG:function(){var e,n=(this.endAngle-this.startAngle)%(2*i);if(0===n)e=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var r=t.util.cos(this.startAngle)*this.radius,o=t.util.sin(this.startAngle)*this.radius,s=t.util.cos(this.endAngle)*this.radius,a=t.util.sin(this.endAngle)*this.radius,l=n>i?"1":"0";e=['<path d="M '+r+" "+o," A "+this.radius+" "+this.radius," 0 ",+l+" 1"," "+s+" "+a,'" ',"COMMON_PARTS"," />\n"]}return e},_render:function(e){e.beginPath(),e.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(e)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(e){return this.radius=e,this.set("width",2*e).set("height",2*e)}}),t.Circle.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),t.Circle.fromElement=function(e,i){var n,r=t.parseAttributes(e,t.Circle.ATTRIBUTE_NAMES);if(!("radius"in(n=r)&&n.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");r.left=(r.left||0)-r.radius,r.top=(r.top||0)-r.radius,i(new t.Circle(r))},t.Circle.fromObject=function(e,i){t.Object._fromObject("Circle",e,i)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Triangle?t.warn("fabric.Triangle is already defined"):(t.Triangle=t.util.createClass(t.Object,{type:"triangle",width:100,height:100,_render:function(e){var t=this.width/2,i=this.height/2;e.beginPath(),e.moveTo(-t,i),e.lineTo(0,-i),e.lineTo(t,i),e.closePath(),this._renderPaintInOrder(e)},_toSVG:function(){var e=this.width/2,t=this.height/2;return["<polygon ","COMMON_PARTS",'points="',[-e+" "+t,"0 "+-t,e+" "+t].join(","),'" />']}}),t.Triangle.fromObject=function(e,i){return t.Object._fromObject("Triangle",e,i)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=2*Math.PI;t.Ellipse?t.warn("fabric.Ellipse is already defined."):(t.Ellipse=t.util.createClass(t.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(e){this.callSuper("initialize",e),this.set("rx",e&&e.rx||0),this.set("ry",e&&e.ry||0)},_set:function(e,t){switch(this.callSuper("_set",e,t),e){case"rx":this.rx=t,this.set("width",2*t);break;case"ry":this.ry=t,this.set("height",2*t)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" />\n']},_render:function(e){e.beginPath(),e.save(),e.transform(1,0,0,this.ry/this.rx,0,0),e.arc(0,0,this.rx,0,i,!1),e.restore(),this._renderPaintInOrder(e)}}),t.Ellipse.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),t.Ellipse.fromElement=function(e,i){var n=t.parseAttributes(e,t.Ellipse.ATTRIBUTE_NAMES);n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,i(new t.Ellipse(n))},t.Ellipse.fromObject=function(e,i){t.Object._fromObject("Ellipse",e,i)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend;t.Rect?t.warn("fabric.Rect is already defined"):(t.Rect=t.util.createClass(t.Object,{stateProperties:t.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(e){this.callSuper("initialize",e),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(e){var t=this.rx?Math.min(this.rx,this.width/2):0,i=this.ry?Math.min(this.ry,this.height/2):0,n=this.width,r=this.height,o=-this.width/2,s=-this.height/2,a=0!==t||0!==i,l=.4477152502;e.beginPath(),e.moveTo(o+t,s),e.lineTo(o+n-t,s),a&&e.bezierCurveTo(o+n-l*t,s,o+n,s+l*i,o+n,s+i),e.lineTo(o+n,s+r-i),a&&e.bezierCurveTo(o+n,s+r-l*i,o+n-l*t,s+r,o+n-t,s+r),e.lineTo(o+t,s+r),a&&e.bezierCurveTo(o+l*t,s+r,o,s+r-l*i,o,s+r-i),e.lineTo(o,s+i),a&&e.bezierCurveTo(o,s+l*i,o+l*t,s,o+t,s),e.closePath(),this._renderPaintInOrder(e)},toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},_toSVG:function(){return["<rect ","COMMON_PARTS",'x="',-this.width/2,'" y="',-this.height/2,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,'" />\n']}}),t.Rect.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),t.Rect.fromElement=function(e,n,r){if(!e)return n(null);r=r||{};var o=t.parseAttributes(e,t.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0,o.height=o.height||0,o.width=o.width||0;var s=new t.Rect(i(r?t.util.object.clone(r):{},o));s.visible=s.visible&&s.width>0&&s.height>0,n(s)},t.Rect.fromObject=function(e,i){return t.Object._fromObject("Rect",e,i)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.array.min,r=t.util.array.max,o=t.util.toFixed;t.Polyline?t.warn("fabric.Polyline is already defined"):(t.Polyline=t.util.createClass(t.Object,{type:"polyline",points:null,cacheProperties:t.Object.prototype.cacheProperties.concat("points"),initialize:function(e,t){t=t||{},this.points=e||[],this.callSuper("initialize",t),this._setPositionDimensions(t)},_setPositionDimensions:function(e){var t,i=this._calcDimensions(e);this.width=i.width,this.height=i.height,e.fromSVG||(t=this.translateToGivenOrigin({x:i.left-this.strokeWidth/2,y:i.top-this.strokeWidth/2},"left","top",this.originX,this.originY)),void 0===e.left&&(this.left=e.fromSVG?i.left:t.x),void 0===e.top&&(this.top=e.fromSVG?i.top:t.y),this.pathOffset={x:i.left+this.width/2,y:i.top+this.height/2}},_calcDimensions:function(){var e=this.points,t=n(e,"x")||0,i=n(e,"y")||0;return{left:t,top:i,width:(r(e,"x")||0)-t,height:(r(e,"y")||0)-i}},toObject:function(e){return i(this.callSuper("toObject",e),{points:this.points.concat()})},_toSVG:function(){for(var e=[],i=this.pathOffset.x,n=this.pathOffset.y,r=t.Object.NUM_FRACTION_DIGITS,s=0,a=this.points.length;s<a;s++)e.push(o(this.points[s].x-i,r),",",o(this.points[s].y-n,r)," ");
vendor: 27,545 bytes, line 78
78return["<"+this.type+" ","COMMON_PARTS",'points="',e.join(""),'" />\n']},commonRender:function(e){var t,i=this.points.length,n=this.pathOffset.x,r=this.pathOffset.y;if(!i||isNaN(this.points[i-1].y))return!1;e.beginPath(),e.moveTo(this.points[0].x-n,this.points[0].y-r);for(var o=0;o<i;o++)t=this.points[o],e.lineTo(t.x-n,t.y-r);return!0},_render:function(e){this.commonRender(e)&&this._renderPaintInOrder(e)},complexity:function(){return this.get("points").length}}),t.Polyline.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polyline.fromElementGenerator=function(e){return function(n,r,o){if(!n)return r(null);o||(o={});var s=t.parsePointsAttribute(n.getAttribute("points")),a=t.parseAttributes(n,t[e].ATTRIBUTE_NAMES);a.fromSVG=!0,r(new t[e](s,i(a,o)))}},t.Polyline.fromElement=t.Polyline.fromElementGenerator("Polyline"),t.Polyline.fromObject=function(e,i){return t.Object._fromObject("Polyline",e,i,"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Polygon?t.warn("fabric.Polygon is already defined"):(t.Polygon=t.util.createClass(t.Polyline,{type:"polygon",_render:function(e){this.commonRender(e)&&(e.closePath(),this._renderPaintInOrder(e))}}),t.Polygon.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polygon.fromElement=t.Polyline.fromElementGenerator("Polygon"),t.Polygon.fromObject=function(e,i){t.Object._fromObject("Polygon",e,i,"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.array.min,n=t.util.array.max,r=t.util.object.extend,o=Object.prototype.toString,s=t.util.toFixed;t.Path?t.warn("fabric.Path is already defined"):(t.Path=t.util.createClass(t.Object,{type:"path",path:null,cacheProperties:t.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:t.Object.prototype.stateProperties.concat("path"),initialize:function(e,i){i=i||{},this.callSuper("initialize",i),e||(e=[]);var n="[object Array]"===o.call(e);this.path=t.util.makePathSimpler(n?e:t.util.parsePath(e)),this.path&&t.Polyline.prototype._setPositionDimensions.call(this,i)},_renderPathCommands:function(e){var t,i=0,n=0,r=0,o=0,s=0,a=0,l=-this.pathOffset.x,c=-this.pathOffset.y;e.beginPath();for(var u=0,h=this.path.length;u<h;++u)switch((t=this.path[u])[0]){case"L":r=t[1],o=t[2],e.lineTo(r+l,o+c);break;case"M":i=r=t[1],n=o=t[2],e.moveTo(r+l,o+c);break;case"C":r=t[5],o=t[6],s=t[3],a=t[4],e.bezierCurveTo(t[1]+l,t[2]+c,s+l,a+c,r+l,o+c);break;case"Q":e.quadraticCurveTo(t[1]+l,t[2]+c,t[3]+l,t[4]+c),r=t[3],o=t[4],s=t[1],a=t[2];break;case"z":case"Z":r=i,o=n,e.closePath()}},_render:function(e){this._renderPathCommands(e),this._renderPaintInOrder(e)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(e){return r(this.callSuper("toObject",e),{path:this.path.map(function(e){return e.slice()})})},toDatalessObject:function(e){var t=this.toObject(["sourcePath"].concat(e));return t.sourcePath&&delete t.path,t},_toSVG:function(){return["<path ","COMMON_PARTS",'d="',t.util.joinPath(this.path),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var e=t.Object.NUM_FRACTION_DIGITS;return" translate("+s(-this.pathOffset.x,e)+", "+s(-this.pathOffset.y,e)+")"},toClipPathSVG:function(e){var t=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},toSVG:function(e){var t=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},complexity:function(){return this.path.length},_calcDimensions:function(){for(var e,r,o=[],s=[],a=0,l=0,c=0,u=0,h=0,d=this.path.length;h<d;++h){switch((e=this.path[h])[0]){case"L":c=e[1],u=e[2],r=[];break;case"M":a=c=e[1],l=u=e[2],r=[];break;case"C":r=t.util.getBoundsOfCurve(c,u,e[1],e[2],e[3],e[4],e[5],e[6]),c=e[5],u=e[6];break;case"Q":r=t.util.getBoundsOfCurve(c,u,e[1],e[2],e[1],e[2],e[3],e[4]),c=e[3],u=e[4];break;case"z":case"Z":c=a,u=l}r.forEach(function(e){o.push(e.x),s.push(e.y)}),o.push(c),s.push(u)}var f=i(o)||0,p=i(s)||0;return{left:f,top:p,width:(n(o)||0)-f,height:(n(s)||0)-p}}}),t.Path.fromObject=function(e,i){if("string"==typeof e.sourcePath){var n=e.sourcePath;t.loadSVGFromURL(n,function(t){var n=t[0];n.setOptions(e),i&&i(n)})}else t.Object._fromObject("Path",e,i,"path")},t.Path.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(["d"]),t.Path.fromElement=function(e,i,n){var o=t.parseAttributes(e,t.Path.ATTRIBUTE_NAMES);o.fromSVG=!0,i(new t.Path(o.d,r(o,n)))})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.array.min,n=t.util.array.max;t.Group||(t.Group=t.util.createClass(t.Object,t.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(e,t,i){t=t||{},this._objects=[],i&&this.callSuper("initialize",t),this._objects=e||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;if(i)this._updateObjectsACoords();else{var r=t&&t.centerPoint;void 0!==t.originX&&(this.originX=t.originX),void 0!==t.originY&&(this.originY=t.originY),r||this._calcBounds(),this._updateObjectsCoords(r),delete t.centerPoint,this.callSuper("initialize",t)}this.setCoords()},_updateObjectsACoords:function(){for(var e=this._objects.length;e--;)this._objects[e].setCoords(!0)},_updateObjectsCoords:function(e){e=e||this.getCenterPoint();for(var t=this._objects.length;t--;)this._updateObjectCoords(this._objects[t],e)},_updateObjectCoords:function(e,t){var i=e.left,n=e.top;e.set({left:i-t.x,top:n-t.y}),e.group=this,e.setCoords(!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(e){var i=!!this.group;return this._restoreObjectsState(),t.util.resetObjectTransform(this),e&&(i&&t.util.removeTransformFromObject(e,this.group.calcTransformMatrix()),this._objects.push(e),e.group=this,e._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,i?this.group.addWithUpdate():this.setCoords(),this},removeWithUpdate:function(e){return this._restoreObjectsState(),t.util.resetObjectTransform(this),this.remove(e),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(e){this.dirty=!0,e.group=this,e._set("canvas",this.canvas)},_onObjectRemoved:function(e){this.dirty=!0,delete e.group},_set:function(e,i){var n=this._objects.length;if(this.useSetOnGroup)for(;n--;)this._objects[n].setOnGroup(e,i);if("canvas"===e)for(;n--;)this._objects[n]._set(e,i);t.Object.prototype._set.call(this,e,i)},toObject:function(e){var i=this.includeDefaultValues,n=this._objects.filter(function(e){return!e.excludeFromExport}).map(function(t){var n=t.includeDefaultValues;t.includeDefaultValues=i;var r=t.toObject(e);return t.includeDefaultValues=n,r}),r=t.Object.prototype.toObject.call(this,e);return r.objects=n,r},toDatalessObject:function(e){var i,n=this.sourcePath;if(n)i=n;else{var r=this.includeDefaultValues;i=this._objects.map(function(t){var i=t.includeDefaultValues;t.includeDefaultValues=r;var n=t.toDatalessObject(e);return t.includeDefaultValues=i,n})}var o=t.Object.prototype.toDatalessObject.call(this,e);return o.objects=i,o},render:function(e){this._transformDone=!0,this.callSuper("render",e),this._transformDone=!1},shouldCache:function(){var e=t.Object.prototype.shouldCache.call(this);if(e)for(var i=0,n=this._objects.length;i<n;i++)if(this._objects[i].willDrawShadow())return this.ownCaching=!1,!1;return e},willDrawShadow:function(){if(t.Object.prototype.willDrawShadow.call(this))return!0;for(var e=0,i=this._objects.length;e<i;e++)if(this._objects[e].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(e){for(var t=0,i=this._objects.length;t<i;t++)this._objects[t].render(e);this._drawClipPath(e)},isCacheDirty:function(e){if(this.callSuper("isCacheDirty",e))return!0;if(!this.statefullCache)return!1;for(var t=0,i=this._objects.length;t<i;t++)if(this._objects[t].isCacheDirty(!0)){if(this._cacheCanvas){var n=this.cacheWidth/this.zoomX,r=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-n/2,-r/2,n,r)}return!0}return!1},_restoreObjectsState:function(){var e=this.calcOwnMatrix();return this._objects.forEach(function(i){t.util.addTransformToObject(i,e),delete i.group,i.setCoords()}),this},realizeTransform:function(e,i){return t.util.addTransformToObject(e,i),e},destroy:function(){return this._objects.forEach(function(e){e.set("dirty",!0)}),this._restoreObjectsState()},toActiveSelection:function(){if(this.canvas){var e=this._objects,i=this.canvas;this._objects=[];var n=this.toObject();delete n.objects;var r=new t.ActiveSelection([]);return r.set(n),r.type="activeSelection",i.remove(this),e.forEach(function(e){e.group=r,e.dirty=!0,i.add(e)}),r.canvas=i,r._objects=e,i._activeObject=r,r.setCoords(),r}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){return this.forEachObject(function(e){e.setCoords(!0)}),this},_calcBounds:function(e){for(var t,i,n,r,o=[],s=[],a=["tr","br","bl","tl"],l=0,c=this._objects.length,u=a.length;l<c;++l){for(n=(t=this._objects[l]).calcACoords(),r=0;r<u;r++)i=a[r],o.push(n[i].x),s.push(n[i].y);t.aCoords=n}this._getBounds(o,s,e)},_getBounds:function(e,r,o){var s=new t.Point(i(e),i(r)),a=new t.Point(n(e),n(r)),l=s.y||0,c=s.x||0,u=a.x-s.x||0,h=a.y-s.y||0;this.width=u,this.height=h,o||this.setPositionByOrigin({x:c,y:l},"left","top")},_toSVG:function(e){for(var t=["<g ","COMMON_PARTS"," >\n"],i=0,n=this._objects.length;i<n;i++)t.push("\t\t",this._objects[i].toSVG(e));return t.push("</g>\n"),t},getSvgStyles:function(){var e=void 0!==this.opacity&&1!==this.opacity?"opacity: "+this.opacity+";":"",t=this.visible?"":" visibility: hidden;";return[e,this.getSvgFilter(),t].join("")},toClipPathSVG:function(e){for(var t=[],i=0,n=this._objects.length;i<n;i++)t.push("\t",this._objects[i].toClipPathSVG(e));return this._createBaseClipPathSVGMarkup(t,{reviver:e})}}),t.Group.fromObject=function(e,i){var n=e.objects,r=t.util.object.clone(e,!0);delete r.objects,"string"!=typeof n?t.util.enlivenObjects(n,function(n){t.util.enlivenObjects([e.clipPath],function(r){var o=t.util.object.clone(e,!0);o.clipPath=r[0],delete o.objects,i&&i(new t.Group(n,o,!0))})}):t.loadSVGFromURL(n,function(o){var s=t.util.groupSVGElements(o,e,n);s.set(r),i&&i(s)})})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.ActiveSelection||(t.ActiveSelection=t.util.createClass(t.Group,{type:"activeSelection",initialize:function(e,i){i=i||{},this._objects=e||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;i.originX&&(this.originX=i.originX),i.originY&&(this.originY=i.originY),this._calcBounds(),this._updateObjectsCoords(),t.Object.prototype.initialize.call(this,i),this.setCoords()},toGroup:function(){var e=this._objects.concat();this._objects=[];var i=t.Object.prototype.toObject.call(this),n=new t.Group([]);if(delete i.type,n.set(i),e.forEach(function(e){e.canvas.remove(e),e.group=n}),n._objects=e,!this.canvas)return n;var r=this.canvas;return r.add(n),r._activeObject=n,n.setCoords(),n},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(e,t,i){e.save(),e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",e,t),void 0===(i=i||{}).hasControls&&(i.hasControls=!1),i.forActiveSelection=!0;for(var n=0,r=this._objects.length;n<r;n++)this._objects[n]._renderControls(e,i);e.restore()}}),t.ActiveSelection.fromObject=function(e,i){t.util.enlivenObjects(e.objects,function(n){delete e.objects,i&&i(new t.ActiveSelection(n,e,!0))})})}(t),function(e){"use strict";var t=w.util.object.extend;e.fabric||(e.fabric={}),e.fabric.Image?w.warn("fabric.Image is already defined."):(w.Image=w.util.createClass(w.Object,{type:"image",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:w.Object.prototype.stateProperties.concat("cropX","cropY"),cacheProperties:w.Object.prototype.cacheProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,imageSmoothing:!0,initialize:function(e,t){t||(t={}),this.filters=[],this.cacheKey="texture"+w.Object.__uid++,this.callSuper("initialize",t),this._initElement(e,t)},getElement:function(){return this._element||{}},setElement:function(e,t){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=e,this._originalElement=e,this._initConfig(t),0!==this.filters.length&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},removeTexture:function(e){var t=w.filterBackend;t&&t.evictCachesForKey&&t.evictCachesForKey(e)},dispose:function(){this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(function(e){w.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this))},getCrossOrigin:function(){return this._originalElement&&(this._originalElement.crossOrigin||null)},getOriginalSize:function(){var e=this.getElement();return{width:e.naturalWidth||e.width,height:e.naturalHeight||e.height}},_stroke:function(e){if(this.stroke&&0!==this.strokeWidth){var t=this.width/2,i=this.height/2;e.beginPath(),e.moveTo(-t,-i),e.lineTo(t,-i),e.lineTo(t,i),e.lineTo(-t,i),e.lineTo(-t,-i),e.closePath()}},toObject:function(e){var i=[];this.filters.forEach(function(e){e&&i.push(e.toObject())});var n=t(this.callSuper("toObject",["cropX","cropY"].concat(e)),{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:i});return this.resizeFilter&&(n.resizeFilter=this.resizeFilter.toObject()),n},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},_toSVG:function(){var e,t=[],i=[],n=this._element,r=-this.width/2,o=-this.height/2,s="",a="";if(!n)return[];if(this.hasCrop()){var l=w.Object.__uid++;t.push('<clipPath id="imageCrop_'+l+'">\n','\t<rect x="'+r+'" y="'+o+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),s=' clip-path="url(#imageCrop_'+l+')" '}if(this.imageSmoothing||(a='" image-rendering="optimizeSpeed'),i.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',r-this.cropX,'" y="',o-this.cropY,'" width="',n.width||n.naturalWidth,'" height="',n.height||n.height,a,'"',s,"></image>\n"),this.stroke||this.strokeDashArray){var c=this.fill;this.fill=null,e=["\t<rect ",'x="',r,'" y="',o,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=c}return t="fill"!==this.paintFirst?t.concat(e,i):t.concat(i,e)},getSrc:function(e){var t=e?this._element:this._originalElement;return t?t.toDataURL?t.toDataURL():this.srcFromAttribute?t.getAttribute("src"):t.src:this.src||""},setSrc:function(e,t,i){return w.util.loadImage(e,function(e,n){this.setElement(e,i),this._setWidthHeight(),t&&t(this,n)},this,i&&i.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var e=this.resizeFilter,t=this.minimumScaleTrigger,i=this.getTotalObjectScaling(),n=i.scaleX,r=i.scaleY,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!e||n>t&&r>t)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=n,void(this._lastScaleY=r);w.filterBackend||(w.filterBackend=w.initFilterBackend());var s=w.util.createCanvasElement(),a=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=o.width,c=o.height;s.width=l,s.height=c,this._element=s,this._lastScaleX=e.scaleX=n,this._lastScaleY=e.scaleY=r,w.filterBackend.applyFilters([e],o,l,c,this._element,a),this._filterScalingX=s.width/this._originalElement.width,this._filterScalingY=s.height/this._originalElement.height},applyFilters:function(e){if(e=(e=e||this.filters||[]).filter(function(e){return e&&!e.isNeutralState()}),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===e.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var t=this._originalElement,i=t.naturalWidth||t.width,n=t.naturalHeight||t.height;if(this._element===this._originalElement){var r=w.util.createCanvasElement();r.width=i,r.height=n,this._element=r,this._filteredEl=r}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,i,n),this._lastScaleX=1,this._lastScaleY=1;return w.filterBackend||(w.filterBackend=w.initFilterBackend()),w.filterBackend.applyFilters(e,this._originalElement,i,n,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(e){w.util.setImageSmoothing(e,this.imageSmoothing),!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(e),this._renderPaintInOrder(e)},drawCacheOnCanvas:function(e){w.util.setImageSmoothing(e,this.imageSmoothing),w.Object.prototype.drawCacheOnCanvas.call(this,e)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(e){var t=this._element;if(t){var i=this._filterScalingX,n=this._filterScalingY,r=this.width,o=this.height,s=Math.min,a=Math.max,l=a(this.cropX,0),c=a(this.cropY,0),u=t.naturalWidth||t.width,h=t.naturalHeight||t.height,d=l*i,f=c*n,p=s(r*i,u-d),m=s(o*n,h-f),g=-r/2,v=-o/2,b=s(r,u/i-l),y=s(o,h/n-c);t&&e.drawImage(t,d,f,p,m,g,v,b,y)}},_needsResize:function(){var e=this.getTotalObjectScaling();return e.scaleX!==this._lastScaleX||e.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(e,t){this.setElement(w.util.getById(e),t),w.util.addClass(this.getElement(),w.Image.CSS_CANVAS)},_initConfig:function(e){e||(e={}),this.setOptions(e),this._setWidthHeight(e)},_initFilters:function(e,t){e&&e.length?w.util.enlivenObjects(e,function(e){t&&t(e)},"fabric.Image.filters"):t&&t()},_setWidthHeight:function(e){e||(e={});var t=this.getElement();this.width=e.width||t.naturalWidth||t.width||0,this.height=e.height||t.naturalHeight||t.height||0},parsePreserveAspectRatioAttribute:function(){var e,t=w.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),i=this._element.width,n=this._element.height,r=1,o=1,s=0,a=0,l=0,c=0,u=this.width,h=this.height,d={width:u,height:h};return!t||"none"===t.alignX&&"none"===t.alignY?(r=u/i,o=h/n):("meet"===t.meetOrSlice&&(e=(u-i*(r=o=w.util.findScaleToFit(this._element,d)))/2,"Min"===t.alignX&&(s=-e),"Max"===t.alignX&&(s=e),e=(h-n*o)/2,"Min"===t.alignY&&(a=-e),"Max"===t.alignY&&(a=e)),"slice"===t.meetOrSlice&&(e=i-u/(r=o=w.util.findScaleToCover(this._element,d)),"Mid"===t.alignX&&(l=e/2),"Max"===t.alignX&&(l=e),e=n-h/o,"Mid"===t.alignY&&(c=e/2),"Max"===t.alignY&&(c=e),i=u/r,n=h/o)),{width:i,height:n,scaleX:r,scaleY:o,offsetLeft:s,offsetTop:a,cropX:l,cropY:c}}}),w.Image.CSS_CANVAS="canvas-img",w.Image.prototype.getSvgSrc=w.Image.prototype.getSrc,w.Image.fromObject=function(e,t){var i=w.util.object.clone(e);w.util.loadImage(i.src,function(e,n){n?t&&t(null,!0):w.Image.prototype._initFilters.call(i,i.filters,function(n){i.filters=n||[],w.Image.prototype._initFilters.call(i,[i.resizeFilter],function(n){i.resizeFilter=n[0],w.util.enlivenObjects([i.clipPath],function(n){i.clipPath=n[0];var r=new w.Image(e,i);t(r,!1)})})})},null,i.crossOrigin)},w.Image.fromURL=function(e,t,i){w.util.loadImage(e,function(e,n){t&&t(new w.Image(e,i),n)},null,i&&i.crossOrigin)},w.Image.ATTRIBUTE_NAMES=w.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),w.Image.fromElement=function(e,i,n){var r=w.parseAttributes(e,w.Image.ATTRIBUTE_NAMES);w.Image.fromURL(r["xlink:href"],i,t(n?w.util.object.clone(n):{},r))})}(t),w.util.object.extend(w.Object.prototype,{_getAngleValueForStraighten:function(){var e=this.angle%360;return e>0?90*Math.round((e-1)/90):90*Math.round(e/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(e){var t=function(){},i=(e=e||{}).onComplete||t,n=e.onChange||t,r=this;return w.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(e){r.rotate(e),n()},onComplete:function(){r.setCoords(),i()}}),this}}),w.util.object.extend(w.StaticCanvas.prototype,{straightenObject:function(e){return e.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(e){return e.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function e(e,t){var i="precision "+t+" float;\nvoid main(){}",n=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,i),e.compileShader(n),!!e.getShaderParameter(n,e.COMPILE_STATUS)}function t(e){e&&e.tileSize&&(this.tileSize=e.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}w.isWebglSupported=function(t){if(w.isLikelyNode)return!1;t=t||w.WebglFilterBackend.prototype.tileSize;var i=document.createElement("canvas"),n=i.getContext("webgl")||i.getContext("experimental-webgl"),r=!1;if(n){w.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),r=w.maxTextureSize>=t;for(var o=["highp","mediump","lowp"],s=0;s<3;s++)if(e(n,o[s])){w.webGlPrecision=o[s];break}}return this.isSupported=r,r},w.WebglFilterBackend=t,t.prototype={tileSize:2048,resources:{},setupGLContext:function(e,t){this.dispose(),this.createWebGLCanvas(e,t),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(e,t)},chooseFastestCopyGLTo2DMethod:function(e,t){var i,n=void 0!==window.performance;try{new ImageData(1,1),i=!0}catch(e){i=!1}var r="undefined"!=typeof ArrayBuffer,o="undefined"!=typeof Uint8ClampedArray;if(n&&i&&r&&o){var s=w.util.createCanvasElement(),a=new ArrayBuffer(e*t*4);if(w.forceGLPutImageData)return this.imageBuffer=a,void(this.copyGLTo2D=x);var l,c,u={imageBuffer:a,destinationWidth:e,destinationHeight:t,targetCanvas:s};s.width=e,s.height=t,l=window.performance.now(),k.call(u,this.gl,u),c=window.performance.now()-l,l=window.performance.now(),x.call(u,this.gl,u),c>window.performance.now()-l?(this.imageBuffer=a,this.copyGLTo2D=x):this.copyGLTo2D=k}},createWebGLCanvas:function(e,t){var i=w.util.createCanvasElement();i.width=e,i.height=t;var n={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},r=i.getContext("webgl",n);r||(r=i.getContext("experimental-webgl",n)),r&&(r.clearColor(0,0,0,0),this.canvas=i,this.gl=r)},applyFilters:function(e,t,i,n,r,o){var s,a=this.gl;o&&(s=this.getCachedTexture(o,t));var l={originalWidth:t.width||t.originalWidth,originalHeight:t.height||t.originalHeight,sourceWidth:i,sourceHeight:n,destinationWidth:i,destinationHeight:n,context:a,sourceTexture:this.createTexture(a,i,n,!s&&t),targetTexture:this.createTexture(a,i,n),originalTexture:s||this.createTexture(a,i,n,!s&&t),passes:e.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},c=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,c),e.forEach(function(e){e&&e.applyTo(l)}),function(e){var t=e.targetCanvas,i=t.width,n=t.height,r=e.destinationWidth,o=e.destinationHeight;i===r&&n===o||(t.width=r,t.height=o)}(l),this.copyGLTo2D(a,l),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(l.sourceTexture),a.deleteTexture(l.targetTexture),a.deleteFramebuffer(c),r.getContext("2d").setTransform(1,0,0,1,0,0),l},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(e,t,i,n){var r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,i,0,e.RGBA,e.UNSIGNED_BYTE,null),r},getCachedTexture:function(e,t){if(this.textureCache[e])return this.textureCache[e];var i=this.createTexture(this.gl,t.width,t.height,t);return this.textureCache[e]=i,i},evictCachesForKey:function(e){this.textureCache[e]&&(this.gl.deleteTexture(this.textureCache[e]),delete this.textureCache[e])},copyGLTo2D:k,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var e=this.gl,t={renderer:"",vendor:""};if(!e)return t;var i=e.getExtension("WEBGL_debug_renderer_info");if(i){var n=e.getParameter(i.UNMASKED_RENDERER_WEBGL),r=e.getParameter(i.UNMASKED_VENDOR_WEBGL);n&&(t.renderer=n.toLowerCase()),r&&(t.vendor=r.toLowerCase())}return this.gpuInfo=t,t}}}(),function(){"use strict";var e=function(){};function t(){}w.Canvas2dFilterBackend=t,t.prototype={evictCachesForKey:e,dispose:e,clearWebGLCaches:e,resources:{},applyFilters:function(e,t,i,n,r){var o=r.getContext("2d");o.drawImage(t,0,0,i,n);var s={sourceWidth:i,sourceHeight:n,imageData:o.getImageData(0,0,i,n),originalEl:t,originalImageData:o.getImageData(0,0,i,n),canvasEl:r,ctx:o,filterBackend:this};return e.forEach(function(e){e.applyTo(s)}),s.imageData.width===i&&s.imageData.height===n||(r.width=s.imageData.width,r.height=s.imageData.height),o.putImageData(s.imageData,0,0),s}}}(),w.Image=w.Image||{},w.Image.filters=w.Image.filters||{},w.Image.filters.BaseFilter=w.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(e){e&&this.setOptions(e)},setOptions:function(e){for(var t in e)this[t]=e[t]},createProgram:function(e,t,i){t=t||this.fragmentSource,i=i||this.vertexSource,"highp"!==w.webGlPrecision&&(t=t.replace(/precision highp float/g,"precision "+w.webGlPrecision+" float"));var n=e.createShader(e.VERTEX_SHADER);if(e.shaderSource(n,i),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+e.getShaderInfoLog(n));var r=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+e.getShaderInfoLog(r));var o=e.createProgram();if(e.attachShader(o,n),e.attachShader(o,r),e.linkProgram(o),!e.getProgramParameter(o,e.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+e.getProgramInfoLog(o));var s=this.getAttributeLocations(e,o),a=this.getUniformLocations(e,o)||{};return a.uStepW=e.getUniformLocation(o,"uStepW"),a.uStepH=e.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:s,uniformLocations:a}},getAttributeLocations:function(e,t){return{aPosition:e.getAttribLocation(t,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(e,t,i){var n=t.aPosition,r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.enableVertexAttribArray(n),e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW)},_setupFrameBuffer:function(e){var t,i,n=e.context;e.passes>
vendor: 4,694 bytes, line 78
781?(t=e.destinationWidth,i=e.destinationHeight,e.sourceWidth===t&&e.sourceHeight===i||(n.deleteTexture(e.targetTexture),e.targetTexture=e.filterBackend.createTexture(n,t,i)),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.targetTexture,0)):(n.bindFramebuffer(n.FRAMEBUFFER,null),n.finish())},_swapTextures:function(e){e.passes--,e.pass++;var t=e.targetTexture;e.targetTexture=e.sourceTexture,e.sourceTexture=t},isNeutralState:function(){var e=this.mainParameter,t=w.Image.filters[this.type].prototype;if(e){if(Array.isArray(t[e])){for(var i=t[e].length;i--;)if(this[e][i]!==t[e][i])return!1;return!0}return t[e]===this[e]}return!1},applyTo:function(e){e.webgl?(this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},retrieveShader:function(e){return e.programCache.hasOwnProperty(this.type)||(e.programCache[this.type]=this.createProgram(e.context)),e.programCache[this.type]},applyToWebGL:function(e){var t=e.context,i=this.retrieveShader(e);0===e.pass&&e.originalTexture?t.bindTexture(t.TEXTURE_2D,e.originalTexture):t.bindTexture(t.TEXTURE_2D,e.sourceTexture),t.useProgram(i.program),this.sendAttributeData(t,i.attributeLocations,e.aPosition),t.uniform1f(i.uniformLocations.uStepW,1/e.sourceWidth),t.uniform1f(i.uniformLocations.uStepH,1/e.sourceHeight),this.sendUniformData(t,i.uniformLocations),t.viewport(0,0,e.destinationWidth,e.destinationHeight),t.drawArrays(t.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(e,t,i){e.activeTexture(i),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE0)},unbindAdditionalTexture:function(e,t){e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(e){this[this.mainParameter]=e},sendUniformData:function(){},createHelpLayer:function(e){if(!e.helpLayer){var t=document.createElement("canvas");t.width=e.sourceWidth,t.height=e.sourceHeight,e.helpLayer=t}},toObject:function(){var e={type:this.type},t=this.mainParameter;return t&&(e[t]=this[t]),e},toJSON:function(){return this.toObject()}}),w.Image.filters.BaseFilter.fromObject=function(e,t){var i=new w.Image.filters[e.type](e);return t&&t(i),i},function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.ColorMatrix=n(i.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(e){this.callSuper("initialize",e),this.matrix=this.matrix.slice(0)},applyTo2d:function(e){var t,i,n,r,o,s=e.imageData.data,a=s.length,l=this.matrix,c=this.colorsOnly;for(o=0;o<a;o+=4)t=s[o],i=s[o+1],n=s[o+2],c?(s[o]=t*l[0]+i*l[1]+n*l[2]+255*l[4],s[o+1]=t*l[5]+i*l[6]+n*l[7]+255*l[9],s[o+2]=t*l[10]+i*l[11]+n*l[12]+255*l[14]):(r=s[o+3],s[o]=t*l[0]+i*l[1]+n*l[2]+r*l[3]+255*l[4],s[o+1]=t*l[5]+i*l[6]+n*l[7]+r*l[8]+255*l[9],s[o+2]=t*l[10]+i*l[11]+n*l[12]+r*l[13]+255*l[14],s[o+3]=t*l[15]+i*l[16]+n*l[17]+r*l[18]+255*l[19])},getUniformLocations:function(e,t){return{uColorMatrix:e.getUniformLocation(t,"uColorMatrix"),uConstants:e.getUniformLocation(t,"uConstants")}},sendUniformData:function(e,t){var i=this.matrix,n=[i[0],i[1],i[2],i[3],i[5],i[6],i[7],i[8],i[10],i[11],i[12],i[13],i[15],i[16],i[17],i[18]],r=[i[4],i[9],i[14],i[19]];e.uniformMatrix4fv(t.uColorMatrix,!1,n),e.uniform4fv(t.uConstants,r)}}),t.Image.filters.ColorMatrix.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Brightness=n(i.BaseFilter,{type:"Brightness",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",brightness:0,mainParameter:"brightness",applyTo2d:function(e){if(0!==this.brightness){var t,i=e.imageData.data,n=i.length,r=Math.round(255*this.brightness);for(t=0;t<n;t+=4)i[t]=i[t]+r,i[t+1]=i[t+1]+r,i[t+2]=i[t+2]+r}},getUniformLocations:function(e,t){return{uBrightness:e.getUniformLocation(t,"uBrightness")}},sendUniformData:function(e,t){e.uniform1f(t.uBrightness,this.brightness)}}),t.Image.filters.Brightness.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.Image.filters,r=t.util.createClass;
vendor: 4,679 bytes, line 78
78n.Convolute=r(n.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},retrieveShader:function(e){var t=Math.sqrt(this.matrix.length),i=this.type+"_"+t+"_"+(this.opaque?1:0),n=this.fragmentSource[i];return e.programCache.hasOwnProperty(i)||(e.programCache[i]=this.createProgram(e.context,n)),e.programCache[i]},applyTo2d:function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p=e.imageData,m=p.data,g=this.matrix,v=Math.round(Math.sqrt(g.length)),b=Math.floor(v/2),y=p.width,w=p.height,_=e.ctx.createImageData(y,w),k=_.data,x=this.opaque?1:0;for(h=0;h<w;h++)for(u=0;
vendor: 11,298 bytes, line 78
78u<y;u++){for(o=4*(h*y+u),t=0,i=0,n=0,r=0,f=0;f<v;f++)for(d=0;d<v;d++)s=u+d-b,(a=h+f-b)<0||a>=w||s<0||s>=y||(l=4*(a*y+s),c=g[f*v+d],t+=m[l]*c,i+=m[l+1]*c,n+=m[l+2]*c,x||(r+=m[l+3]*c));k[o]=t,k[o+1]=i,k[o+2]=n,k[o+3]=x?m[o+3]:r}e.imageData=_},getUniformLocations:function(e,t){return{uMatrix:e.getUniformLocation(t,"uMatrix"),uOpaque:e.getUniformLocation(t,"uOpaque"),uHalfSize:e.getUniformLocation(t,"uHalfSize"),uSize:e.getUniformLocation(t,"uSize")}},sendUniformData:function(e,t){e.uniform1fv(t.uMatrix,this.matrix)},toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),t.Image.filters.Convolute.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Grayscale=n(i.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(e){var t,i,n=e.imageData.data,r=n.length,o=this.mode;for(t=0;t<r;t+=4)"average"===o?i=(n[t]+n[t+1]+n[t+2])/3:"lightness"===o?i=(Math.min(n[t],n[t+1],n[t+2])+Math.max(n[t],n[t+1],n[t+2]))/2:"luminosity"===o&&(i=.21*n[t]+.72*n[t+1]+.07*n[t+2]),n[t]=i,n[t+1]=i,n[t+2]=i},retrieveShader:function(e){var t=this.type+"_"+this.mode;if(!e.programCache.hasOwnProperty(t)){var i=this.fragmentSource[this.mode];e.programCache[t]=this.createProgram(e.context,i)}return e.programCache[t]},getUniformLocations:function(e,t){return{uMode:e.getUniformLocation(t,"uMode")}},sendUniformData:function(e,t){e.uniform1i(t.uMode,1)},isNeutralState:function(){return!1}}),t.Image.filters.Grayscale.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Invert=n(i.BaseFilter,{type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",invert:!0,mainParameter:"invert",applyTo2d:function(e){var t,i=e.imageData.data,n=i.length;for(t=0;t<n;t+=4)i[t]=255-i[t],i[t+1]=255-i[t+1],i[t+2]=255-i[t+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(e,t){return{uInvert:e.getUniformLocation(t,"uInvert")}},sendUniformData:function(e,t){e.uniform1i(t.uInvert,this.invert)}}),t.Image.filters.Invert.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.Image.filters,r=t.util.createClass;n.Noise=r(n.BaseFilter,{type:"Noise",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",mainParameter:"noise",noise:0,applyTo2d:function(e){if(0!==this.noise){var t,i,n=e.imageData.data,r=n.length,o=this.noise;for(t=0,r=n.length;t<r;t+=4)i=(.5-Math.random())*o,n[t]+=i,n[t+1]+=i,n[t+2]+=i}},getUniformLocations:function(e,t){return{uNoise:e.getUniformLocation(t,"uNoise"),uSeed:e.getUniformLocation(t,"uSeed")}},sendUniformData:function(e,t){e.uniform1f(t.uNoise,this.noise/255),e.uniform1f(t.uSeed,Math.random())},toObject:function(){return i(this.callSuper("toObject"),{noise:this.noise})}}),t.Image.filters.Noise.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Pixelate=n(i.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",applyTo2d:function(e){var t,i,n,r,o,s,a,l,c,u,h,d=e.imageData,f=d.data,p=d.height,m=d.width;for(i=0;i<p;i+=this.blocksize)for(n=0;n<m;n+=this.blocksize)for(r=f[t=4*i*m+4*n],o=f[t+1],s=f[t+2],a=f[t+3],u=Math.min(i+this.blocksize,p),h=Math.min(n+this.blocksize,m),l=i;l<u;l++)for(c=n;c<h;c++)f[t=4*l*m+4*c]=r,f[t+1]=o,f[t+2]=s,f[t+3]=a},isNeutralState:function(){return 1===this.blocksize},getUniformLocations:function(e,t){return{uBlocksize:e.getUniformLocation(t,"uBlocksize"),uStepW:e.getUniformLocation(t,"uStepW"),uStepH:e.getUniformLocation(t,"uStepH")}},sendUniformData:function(e,t){e.uniform1f(t.uBlocksize,this.blocksize)}}),t.Image.filters.Pixelate.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.Image.filters,r=t.util.createClass;n.RemoveColor=r(n.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",distance:.02,useAlpha:!1,applyTo2d:function(e){var i,n,r,o,s=e.imageData.data,a=255*this.distance,l=new t.Color(this.color).getSource(),c=[l[0]-a,l[1]-a,l[2]-a],u=[l[0]+a,l[1]+a,l[2]+a];for(i=0;i<s.length;i+=4)n=s[i],r=s[i+1],o=s[i+2],n>c[0]&&r>c[1]&&o>c[2]&&n<u[0]&&r<u[1]&&o<u[2]&&(s[i+3]=0)},getUniformLocations:function(e,t){return{uLow:e.getUniformLocation(t,"uLow"),uHigh:e.getUniformLocation(t,"uHigh")}},sendUniformData:function(e,i){var n=new t.Color(this.color).getSource(),r=parseFloat(this.distance),o=[0+n[0]/255-r,0+n[1]/255-r,0+n[2]/255-r,1],s=[n[0]/255+r,n[1]/255+r,n[2]/255+r,1];e.uniform4fv(i.uLow,o),e.uniform4fv(i.uHigh,s)},toObject:function(){return i(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),t.Image.filters.RemoveColor.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass,r={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var o in r)i[o]=n(i.ColorMatrix,{type:o,matrix:r[o],mainParameter:!1,colorsOnly:!0}),t.Image.filters[o].fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric,i=t.Image.filters,n=t.util.createClass;i.BlendColor=n(i.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},buildSource:function(e){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[e]+"}\n}"},retrieveShader:function(e){var t,i=this.type+"_"+this.mode;return e.programCache.hasOwnProperty(i)||(t=this.buildSource(this.mode),e.programCache[i]=this.createProgram(e.context,t)),e.programCache[i]},applyTo2d:function(e){var i,n,r,o,s,a,l,c=e.imageData.data,u=c.length,h=1-this.alpha;i=(l=new t.Color(this.color).getSource())[0]*this.alpha,n=l[1]*this.alpha,r=l[2]*this.alpha;for(var d=0;d<u;d+=4)switch(o=c[d],s=c[d+1],a=c[d+2],this.mode){case"multiply":c[d]=o*i/255,c[d+1]=s*n/255,c[d+2]=a*r/255;break;case"screen":c[d]=255-(255-o)*(255-i)/255,c[d+1]=255-(255-s)*(255-n)/255,c[d+2]=255-(255-a)*(255-r)/255;break;case"add":c[d]=o+i,c[d+1]=s+n,c[d+2]=a+r;break;case"diff":case"difference":c[d]=Math.abs(o-i),c[d+1]=Math.abs(s-n),c[d+2]=Math.abs(a-r);break;case"subtract":c[d]=o-i,c[d+1]=s-n,c[d+2]=a-r;break;case"darken":c[d]=Math.min(o,i),c[d+1]=Math.min(s,n),c[d+2]=Math.min(a,r);break;case"lighten":c[d]=Math.max(o,i),c[d+1]=Math.max(s,n),c[d+2]=Math.max(a,r);break;case"overlay":c[d]=i<128?2*o*i/255:255-2*(255-o)*(255-i)/255,c[d+1]=n<128?2*s*n/255:255-2*(255-s)*(255-n)/255,c[d+2]=r<128?2*a*r/255:255-2*(255-a)*(255-r)/255;break;case"exclusion":c[d]=i+o-2*i*o/255,c[d+1]=n+s-2*n*s/255,c[d+2]=r+a-2*r*a/255;break;case"tint":c[d]=i+o*h,c[d+1]=n+s*h,c[d+2]=r+a*h}},getUniformLocations:function(e,t){return{uColor:e.getUniformLocation(t,"uColor")}},sendUniformData:function(e,i){var n=new t.Color(this.color).getSource();n[0]=this.alpha*n[0]/255,n[1]=this.alpha*n[1]/255,n[2]=this.alpha*n[2]/255,n[3]=this.alpha,e.uniform4fv(i.uColor,n)}
vendor: 4,778 bytes, line 78
78,toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendColor.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric,i=t.Image.filters,n=t.util.createClass;i.BlendImage=n(i.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},retrieveShader:function(e){var t=this.type+"_"+this.mode,i=this.fragmentSource[this.mode];return e.programCache.hasOwnProperty(t)||(e.programCache[t]=this.createProgram(e.context,i)),e.programCache[t]},applyToWebGL:function(e){var t=e.context,i=this.createTexture(e.filterBackend,this.image);this.bindAdditionalTexture(t,i,t.TEXTURE1),this.callSuper("applyToWebGL",e),this.unbindAdditionalTexture(t,t.TEXTURE1)},createTexture:function(e,t){return e.getCachedTexture(t.cacheKey,t._element)},calculateMatrix:function(){var e=this.image,t=e._element.width,i=e._element.height;return[1/e.scaleX,0,0,0,1/e.scaleY,0,-e.left/t,-e.top/i,1]},applyTo2d:function(e){var i,n,r,o,s,a,l,c,u,h,d,f=e.imageData,p=e.filterBackend.resources,m=f.data,g=m.length,v=f.width,b=f.height,y=this.image;p.blendImage||(p.blendImage=t.util.createCanvasElement()),h=(u=p.blendImage).getContext("2d"),u.width!==v||u.height!==b?(u.width=v,u.height=b):h.clearRect(0,0,v,b),h.setTransform(y.scaleX,0,0,y.scaleY,y.left,y.top),h.drawImage(y._element,0,0,v,b),d=h.getImageData(0,0,v,b).data;for(var w=0;w<g;w+=4)switch(s=m[w],a=m[w+1],l=m[w+2],c=m[w+3],i=d[w],n=d[w+1],r=d[w+2],o=d[w+3],this.mode){case"multiply":m[w]=s*i/255,m[w+1]=a*n/255,m[w+2]=l*r/255,m[w+3]=c*o/255;break;case"mask":m[w+3]=o}},getUniformLocations:function(e,t){return{uTransformMatrix:e.getUniformLocation(t,"uTransformMatrix"),uImage:e.getUniformLocation(t,"uImage")}},sendUniformData:function(e,t){var i=this.calculateMatrix();e.uniform1i(t.uImage,1),e.uniformMatrix3fv(t.uTransformMatrix,!1,i)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendImage.fromObject=function(e,i){t.Image.fromObject(e.image,function(n){var r=t.util.object.clone(e);r.image=n,i(new t.Image.filters.BlendImage(r))})}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=Math.pow,n=Math.floor,r=Math.sqrt,o=Math.abs,s=Math.round,a=Math.sin,l=Math.ceil,c=t.Image.filters,u=t.util.createClass;c.Resize=u(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(e,t){return{uDelta:e.getUniformLocation(t,"uDelta"),uTaps:e.getUniformLocation(t,"uTaps")}},sendUniformData:function(e,t){e.uniform2fv(t.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),e.uniform1fv(t.uTaps,this.taps)},retrieveShader:function(e){var t=this.getFilterWindow(),i=this.type+"_"+t;if(!e.programCache.hasOwnProperty(i)){var n=this.generateShader(t);e.programCache[i]=this.createProgram(e.context,n)}return e.programCache[i]},getFilterWindow:function(){var e=this.tempScale;return Math.ceil(this.lanczosLobes/e)},getTaps:function(){for(var e=this.lanczosCreate(this.lanczosLobes),t=this.tempScale,i=this.getFilterWindow(),n=new Array(i),r=1;r<=i;r++)n[r-1]=e(r*t);return n},generateShader:function(e){for(var t=new Array(e),i=this.fragmentSourceTOP,n=1;n<=e;n++)t[n-1]=n+".0 * uDelta";return i+="uniform float uTaps["+e+"];\n",i+="void main() {\n",i+=" vec4 color = texture2D(uTexture, vTexCoord);\n",i+=" float sum = 1.0;\n",t.forEach(function(e,t){i+=" color += texture2D(uTexture, vTexCoord + "+e+") * uTaps["+t+"];\n",i+=" color += texture2D(uTexture, vTexCoord - "+e+") * uTaps["+t+"];\n",i+=" sum += 2.0 * uTaps["+t+"];\n"}),i+=" gl_FragColor = color / sum;\n",i+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(e){e.webgl?(e.passes++,this.width=e.sourceW
vendor: 4,207 bytes, line 78
78idth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=e.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),e.destinationWidth=this.dW,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceWidth=e.destinationWidth,this.height=e.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),e.destinationHeight=this.dH,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceHeight=e.destinationHeight):this.applyTo2d(e)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(e){return function(t){if(t>=e||t<=-e)return 0;if(t<1.1920929e-7&&t>-1.1920929e-7)return 1;var i=(t*=Math.PI)/e;return a(t)/t*a(i)/i}},applyTo2d:function(e){var t=e.imageData,i=this.scaleX,n=this.scaleY;this.rcpScaleX=1/i,this.rcpScaleY=1/n;var r,o=t.width,a=t.height,l=s(o*i),c=s(a*n);"sliceHack"===this.resizeType?r=this.sliceByTwo(e,o,a,l,c):"hermite"===this.resizeType?r=this.hermiteFastResize(e,o,a,l,c):"bilinear"===this.resizeType?r=this.bilinearFiltering(e,o,a,l,c):"lanczos"===this.resizeType&&(r=this.lanczosResize(e,o,a,l,c)),e.imageData=r},sliceByTwo:function(e,i,r,o,s){var a,l,c=e.imageData,u=.5,h=!1,d=!1,f=i*u,p=r*u,m=t.filterBackend.resources,g=0,v=0,b=i,y=0;for(m.sliceByTwo||(m.sliceByTwo=document.createElement("canvas")),((a=m.sliceByTwo).width<1.5*i||a.height<r)&&(a.width=1.5*i,a.height=r),(l=a.getContext("2d")).clearRect(0,0,1.5*i,r),l.putImageData(c,0,0),o=n(o),s=n(s);!h||!d;)i=f,r=p,o<n(f*u)?f=n(f*u):(f=o,h=!0),s<n(p*u)?p=n(p*u):(p=s,d=!0),l.drawImage(a,g,v,i,r,b,y,f,p),g=b,v=y,y+=p;return l.getImageData(g,v,o,s)},lanczosResize:function(e,t,s,a,c){var u=e.imageData.data,h=e.ctx.createImageData(a,c),d=h.data,f=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,m=this.rcpScaleY,g=2/this.rcpScaleX,v=2/this.rcpScaleY,b=l(p*this.lanczosLobes/2),y=l(m*this.lanczosLobes/2),w={},_={},k={};return function e(l){var x,C,S,E,T,A,I,M,P,D,O;for(_.x=(l+.5)*p,k.x=n(_.x),x=0;x<c;x++){for(_.y=(x+.5)*m,k.y=n(_.y),T=0,A=0,I=0,M=0,P=0,C=k.x-b;C<=k.x+b;C++)if(!(C<0||C>=t)){D=n(1e3*o(C-_.x)),w[D]||(w[D]={});for(var L=k.y-y;L<=k.y+y;L++)L<0||L>=s||(O=n(1e3*o(L-_.y)),w[D][O]||(w[D][O]=f(r(i(D*g,2)+i(O*v,2))/1e3)),(S=w[D][O])>0&&(T+=S,A+=S*u[E=4*(L*t+C)],I+=S*u[E+1],M+=S*u[E+2],P+=S*u[E+3]))}d[E=4*(x*a+l)]=A/T,d[E+1]=I/T,d[E+2]=M/T,d[E+3]=P/T}return++l<a?e(l):h}(0)},bilinearFiltering:function(e,t,i,r,o){var s,a,l,c,u,h,d,f,p,m=0,g=this.rcpScaleX,v=this.rcpScaleY,b=4*(t-1),y=e.imageData.data,w=e.ctx.createImageData(r,o),_=w.data;for(l=0;l<o;l++)for(c=0;c<r;c++)for(u=g*c-(s=n(g*c)),h=v*l-(a=n(v*l)),p=4*(a*t+s),d=0;d<4;d++)f=y[p+d]*(1-u)*(1-h)+y[p+4+d]*u*(1-h)+y[p+b+d]*h*(1-u)+y[p+b+4+d]*u*h,_[m++]=f;return w},hermiteFastResize:function(e,t,i,s,a){for(var c=this.rcpScaleX,u=this.rcpScaleY,h=l(c/2),d=l(u/2),f=e.imageData.data,p=e.ctx.createImageData(s,a),m=p.data,g=0;g<a;g++)for(var v=0;v<s;v++){for(var b=4*(v+g*s),y=0,w=0,_=0,k=0,x=0,C=0,S=0,E=(g+.5)*u,T=n(g*u);T<(g+1)*u;T++)for(var A=o(E-(T+.5))/d,I=(v+.5)*c,M=A*A,P=n(v*c);P<(v+1)*c;P++){var D=o(I-(P+.5))/h,O=r(M+D*D);O>1&&O<-1||(y=2*O*O*O-3*O*O+1)>0&&(S+=y*f[3+(D=4*(P+T*t))],_+=y,f[D+3]<255&&(y=y*f[D+3]/250),k+=y*f[D],x+=y*f[D+1],C+=y*f[D+2],w+=y)}m[b]=k/w,m[b+1]=x/w,m[b+2]=C/w,m[b+3]=S/_}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),t.Image.filters.Resize.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Contrast=n(i.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(e){if(0!==this.contrast){var t,i=e.imageData.data,n=i.length,r=Math.floor(255*this.contrast),o=259*(r+255)
78/(255*(259-r));for(t=0;t<n;t+=4)i[t]=o*(i[t]-128)+128,i[t+1]=o*(i[t+1]-128)+128,i[t+2]=o*(i[t+2]-128)+128}},getUniformLocations:function(e,t){return{uContrast:e.getUniformLocation(t,"uContrast")}},sendUniformData:function(e,t){e.uniform1f(t.uContrast,this.contrast)}}),t.Image.filters.Contrast.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Saturation=n(i.BaseFilter,{type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",saturation:0,mainParameter:"saturation",applyTo2d:function(e){if(0!==this.saturation){var t,i,n=e.imageData.data,r=n.length,o=-this.saturation;for(t=0;t<r;t+=4)i=Math.max(n[t],n[t+1],n[t+2]),n[t]+=i!==n[t]?(i-n[t])*o:0,n[t+1]+=i!==n[t+1]?(i-n[t+1])*o:0,n[t+2]+=i!==n[t+2]?(i-n[t+2])*o:0}},getUniformLocations:function(e,t){return{uSaturation:e.getUniformLocation(t,"uSaturation")}},sendUniformData:function(e,t){e.uniform1f(t.uSaturation,-this.saturation)}}),t.Image.filters.Saturation.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Vibrance=n(i.BaseFilter,{type:"Vibrance",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uVibrance;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat max = max(color.r, max(color.g, color.b));\nfloat avg = (color.r + color.g + color.b) / 3.0;\nfloat amt = (abs(max - avg) * 2.0) * uVibrance;\ncolor.r += max != color.r ? (max - color.r) * amt : 0.00;\ncolor.g += max != color.g ? (max - color.g) * amt : 0.00;\ncolor.b += max != color.b ? (max - color.b) * amt : 0.00;\ngl_FragColor = color;\n}",vibrance:0,mainParameter:"vibrance",applyTo2d:function(e){if(0!==this.vibrance){var t,i,n,r,o=e.imageData.data,s=o.length,a=-this.vibrance;for(t=0;t<s;t+=4)i=Math.max(o[t],o[t+1],o[t+2]),n=(o[t]+o[t+1]+o[t+2])/3,r=2*Math.abs(i-n)/255*a,o[t]+=i!==o[t]?(i-o[t])*r:0,o[t+1]+=i!==o[t+1]?(i-o[t+1])*r:0,o[t+2]+=i!==o[t+2]?(i-o[t+2])*r:0}},getUniformLocations:function(e,t){return{uVibrance:e.getUniformLocation(t,"uVibrance")}},sendUniformData:function(e,t){e.uniform1f(t.uVibrance,-this.vibrance)}}),t.Image.filters.Vibrance.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Blur=n(i.BaseFilter,{type:"Blur",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",blur:0,mainParameter:"blur",applyTo:function(e){e.webgl?(this.aspectRatio=e.sourceWidth/e.sourceHeight,e.passes++,this._setupFrameBuffer(e),this.horizontal=!0,this.applyToWebGL(e),this._swapTextures(e),this._setupFrameBuffer(e),this.horizontal=!1,this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},applyTo2d:function(e){e.imageData=this.simpleBlur(e)},simpleBlur:function(e){var i,n,r=e.filterBackend.resources,o=e.imageData.width,s=e.imageData.height;r.blurLayer1||(r.blurLayer1=t.util.createCanvasElement(),r.blurLayer2=t.util.createCanvasElement()),i=r.blurLayer1,n=r.blurLayer2,i.width===o&&i.height===s||(n.width=i.width=o,n.height=i.height=s);
vendor: 4,216 bytes, line 78
78var a,l,c,u,h=i.getContext("2d"),d=n.getContext("2d"),f=15,p=.06*this.blur*.5;for(h.putImageData(e.imageData,0,0),d.clearRect(0,0,o,s),u=-15;u<=f;u++)c=p*(l=u/f)*o+(a=(Math.random()-.5)/4),d.globalAlpha=1-Math.abs(l),d.drawImage(i,c,a),h.drawImage(n,0,0),d.globalAlpha=1,d.clearRect(0,0,n.width,n.height);for(u=-15;u<=f;u++)c=p*(l=u/f)*s+(a=(Math.random()-.5)/4),d.globalAlpha=1-Math.abs(l),d.drawImage(i,a,c),h.drawImage(n,0,0),d.globalAlpha=1,d.clearRect(0,0,n.width,n.height);e.ctx.drawImage(i,0,0);var m=e.ctx.getImageData(0,0,i.width,i.height);return h.globalAlpha=1,h.clearRect(0,0,i.width,i.height),m},getUniformLocations:function(e,t){return{delta:e.getUniformLocation(t,"uDelta")}},sendUniformData:function(e,t){var i=this.chooseRightDelta();e.uniform2fv(t.delta,i)},chooseRightDelta:function(){var e,t=1,i=[0,0];return this.horizontal?this.aspectRatio>1&&(t=1/this.aspectRatio):this.aspectRatio<1&&(t=this.aspectRatio),e=t*this.blur*.12,this.horizontal?i[0]=e:i[1]=e,i}}),i.Blur.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Gamma=n(i.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(e){this.gamma=[1,1,1],i.BaseFilter.prototype.initialize.call(this,e)},applyTo2d:function(e){var t,i=e.imageData.data,n=this.gamma,r=i.length,o=1/n[0],s=1/n[1],a=1/n[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),t=0,r=256;t<r;t++)this.rVals[t]=255*Math.pow(t/255,o),this.gVals[t]=255*Math.pow(t/255,s),this.bVals[t]=255*Math.pow(t/255,a);for(t=0,r=i.length;t<r;t+=4)i[t]=this.rVals[i[t]],i[t+1]=this.gVals[i[t+1]],i[t+2]=this.bVals[i[t+2]]},getUniformLocations:function(e,t){return{uGamma:e.getUniformLocation(t,"uGamma")}},sendUniformData:function(e,t){e.uniform3fv(t.uGamma,this.gamma)}}),t.Image.filters.Gamma.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Composed=n(i.BaseFilter,{type:"Composed",subFilters:[],initialize:function(e){this.callSuper("initialize",e),this.subFilters=this.subFilters.slice(0)},applyTo:function(e){e.passes+=this.subFilters.length-1,this.subFilters.forEach(function(t){t.applyTo(e)})},toObject:function(){return t.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map(function(e){return e.toObject()})})},isNeutralState:function(){return!this.subFilters.some(function(e){return!e.isNeutralState()})}}),t.Image.filters.Composed.fromObject=function(e,i){var n=(e.subFilters||[]).map(function(e){return new t.Image.filters[e.type](e)}),r=new t.Image.filters.Composed({subFilters:n});return i&&i(r),r}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.HueRotation=n(i.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var e=this.rotation*Math.PI,i=t.util.cos(e),n=t.util.sin(e),r=1/3,o=Math.sqrt(r)*n,s=1-i;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=i+s/3,this.matrix[1]=r*s-o,this.matrix[2]=r*s+o,this.matrix[5]=r*s+o,this.matrix[6]=i+r*s,this.matrix[7]=r*s-o,this.matrix[10]=r*s-o,this.matrix[11]=r*s+o,this.matrix[12]=i+r*s},isNeutralState:function(e){return this.calculateMatrix(),i.BaseFilter.prototype.isNeutralState.call(this,e)},applyTo:function(e){this.calculateMatrix(),i.BaseFilter.prototype.applyTo.call(this,e)}}),t.Image.filters.HueRotation.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),i=t.util.object.clone;if(t.Text)t.warn("fabric.Text is already defined");else{var n="fontFamily fontWeight fontSize text underline overline linethrough textAlign fontStyle lineHeight textBackgroun
78dColor charSpacing styles direction path pathStartOffset pathSide".split(" ");t.Text=t.util.createClass(t.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles","path","pathStartOffset","pathSide"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:t.Object.prototype.stateProperties.concat(n),cacheProperties:t.Object.prototype.cacheProperties.concat(n),stroke:null,shadow:null,path:null,pathStartOffset:0,pathSide:"left",_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,direction:"ltr",_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(e,t){this.styles=t&&t.styles||{},this.text=e,this.__skipDimension=!0,this.callSuper("initialize",t),this.path&&this.setPathInfo(),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},setPathInfo:function(){var e=this.path;e&&(e.segmentsInfo=t.util.getPathSegmentsInfo(e.path))},getMeasuringContext:function(){return t._measuringContext||(t._measuringContext=this.canvas&&this.canvas.contextCache||t.util.createCanvasElement().getContext("2d")),t._measuringContext},_splitText:function(){var e=this._splitTextIntoLines(this.text);return this.textLines=e.lines,this._textLines=e.graphemeLines,this._unwrappedTextLines=e._unwrappedLines,this._text=e.graphemeText,e},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var e,t,i,n,r,o,s,a=0,l=this._textLines.length;a<l;a++)if(("justify"===this.textAlign||a!==l-1&&!this.isEndOfWrapping(a))&&(n=0,r=this._textLines[a],(t=this.getLineWidth(a))<this.width&&(s=this.textLines[a].match(this._reSpacesAndTabs)))){i=s.length,e=(this.width-t)/i;for(var c=0,u=r.length;c<=u;c++)o=this.__charBounds[a][c],this._reSpaceAndTab.test(r[c])?(o.width+=e,o.kernedWidth+=e,o.left+=n,n+=e):o.left+=n}},isEndOfWrapping:function(e){return e===this._textLines.length-1},missingNewlineOffset:function(){return 1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var e=this.callSuper("_getCacheCanvasDimensions"),t=this.fontSize;return e.width+=t*e.zoomX,e.height+=t*e.zoomY,e},_render:function(e){var t=this.path;t&&!t.isNotVisible()&&t._render(e),this._setTextStyles(e),this._renderTextLinesBackground(e),this._renderTextDecoration(e,"underline"),this._renderText(e),this._renderTextDecoration(e,"overline"),this._renderTextDecoration(e,"linethrough")},_renderText:function(e){"stroke"===this.paintFirst?(this._renderTextStroke(e),this._renderTextFill(e)):(this._renderTextFill(e),this._renderTextStroke(e))},_setTextStyles:function(e,t,i){e.textBaseline="alphabetic",e.font=this._getFontDeclaration(t,i)},calcTextWidth:function(){for(var e=this.getLineWidth(0),t=1,i=this._textLines.length;t<i;t++){var n=this.getLineWidth(t);n>e&&(e=n)}return e},_renderTextLine:function(e,t,i,n,r,o){this._renderChars(e,t,i,n,r,o)},_renderTextLinesBackground:function(e){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var t,i,n,r,o,s,a,l=e.fillStyle,c=this._getLeftOffset(),u=this._getTopOffset(),h=0,d=0,f=this.path,p=0,m=this._textLines.length;p<m;
vendor: 4,428 bytes, line 78
78p++)if(t=this.getHeightOfLine(p),this.textBackgroundColor||this.styleHas("textBackgroundColor",p)){n=this._textLines[p],i=this._getLineLeftOffset(p),d=0,h=0,r=this.getValueOfPropertyAt(p,0,"textBackgroundColor");for(var g=0,v=n.length;g<v;g++)o=this.__charBounds[p][g],s=this.getValueOfPropertyAt(p,g,"textBackgroundColor"),f?(e.save(),e.translate(o.renderLeft,o.renderTop),e.rotate(o.angle),e.fillStyle=s,s&&e.fillRect(-o.width/2,-t/this.lineHeight*(1-this._fontSizeFraction),o.width,t/this.lineHeight),e.restore()):s!==r?(a=c+i+h,"rtl"===this.direction&&(a=this.width-a-d),e.fillStyle=r,r&&e.fillRect(a,u,d,t/this.lineHeight),h=o.left,d=o.width,r=s):d+=o.kernedWidth;s&&!f&&(a=c+i+h,"rtl"===this.direction&&(a=this.width-a-d),e.fillStyle=s,e.fillRect(a,u,d,t/this.lineHeight)),u+=t}else u+=t;e.fillStyle=l,this._removeShadow(e)}},getFontCache:function(e){var i=e.fontFamily.toLowerCase();t.charWidthsCache[i]||(t.charWidthsCache[i]={});var n=t.charWidthsCache[i],r=e.fontStyle.toLowerCase()+"_"+(e.fontWeight+"").toLowerCase();return n[r]||(n[r]={}),n[r]},_measureChar:function(e,t,i,n){var r,o,s,a,l=this.getFontCache(t),c=i+e,u=this._getFontDeclaration(t)===this._getFontDeclaration(n),h=t.fontSize/this.CACHE_FONT_SIZE;if(i&&void 0!==l[i]&&(s=l[i]),void 0!==l[e]&&(a=r=l[e]),u&&void 0!==l[c]&&(a=(o=l[c])-s),void 0===r||void 0===s||void 0===o){var d=this.getMeasuringContext();this._setTextStyles(d,t,!0)}return void 0===r&&(a=r=d.measureText(e).width,l[e]=r),void 0===s&&u&&i&&(s=d.measureText(i).width,l[i]=s),u&&void 0===o&&(o=d.measureText(c).width,l[c]=o,a=o-s),{width:r*h,kernedWidth:a*h}},getHeightOfChar:function(e,t){return this.getValueOfPropertyAt(e,t,"fontSize")},measureLine:function(e){var t=this._measureLine(e);return 0!==this.charSpacing&&(t.width-=this._getWidthOfCharSpacing()),t.width<0&&(t.width=0),t},_measureLine:function(e){var i,n,r,o,s,a,l=0,c=this._textLines[e],u=new Array(c.length),h=0,d=this.path,f="right"===this.pathSide;for(this.__charBounds[e]=u,i=0;i<c.length;i++)n=c[i],o=this._getGraphemeBox(n,e,i,r),u[i]=o,l+=o.kernedWidth,r=n;if(u[i]={left:o?o.left+o.width:0,width:0,kernedWidth:0,height:this.fontSize},d){switch(a=d.segmentsInfo[d.segmentsInfo.length-1].length,(s=t.util.getPointOnPath(d.path,0,d.segmentsInfo)).x+=d.pathOffset.x,s.y+=d.pathOffset.y,this.textAlign){case"left":h=f?a-l:0;break;case"center":h=(a-l)/2;break;case"right":h=f?0:a-l}for(h+=this.pathStartOffset*(f?-1:1),i=f?c.length-1:0;f?i>=0:i<c.length;f?i--:i++)o=u[i],h>a?h%=a:h<0&&(h+=a),this._setGraphemeOnPath(h,o,s),h+=o.kernedWidth}return{width:l,numOfSpaces:0}},_setGraphemeOnPath:function(e,i,n){var r=e+i.kernedWidth/2,o=this.path,s=t.util.getPointOnPath(o.path,r,o.segmentsInfo);i.renderLeft=s.x-n.x,i.renderTop=s.y-n.y,i.angle=s.angle+("right"===this.pathSide?Math.PI:0)},_getGraphemeBox:function(e,t,i,n,r){var o,s=this.getCompleteStyleDeclaration(t,i),a=n?this.getCompleteStyleDeclaration(t,i-1):{},l=this._measureChar(e,s,n,a),c=l.kernedWidth,u=l.width;0!==this.charSpacing&&(u+=o=this._getWidthOfCharSpacing(),c+=o);var h={width:u,left:0,height:s.fontSize,kernedWidth:c,deltaY:s.deltaY};if(i>0&&!r){var d=this.__charBounds[t][i-1];h.left=d.left+d.width+l.kernedWidth-l.width}return h},getHeightOfLine:function(e){if(this.__lineHeights[e])return this.__lineHeights[e];for(var t=this._textLines[e],i=this.getHeightOfChar(e,0),n=1,r=t.length;n<r;n++)i=Math.max(this.getHeightOfChar(e,n),i);return this.__lineHeights[e]=i*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var e,t=0,i=0,n=this._textLines.length;i<n;i++)e=this.getHeightOfLine(i),t+=i===n-1?e/this.lineHeight:e;return t},_getLeftOffset:function(){return"ltr"===this.direction?-this.width/2:this.width/2},_getTopOffset:function(){return-this.height/2},_renderTextCommon:function(e,t){e.save();for(var i=0,n=this._getLeftOffset(),r=this._getTopOffset(),o=0,s=this._textLines.length;o<s;o++){var a=this.getHeightOfLine(o),l=a/this.lineHeight,c=this._getLineLeftOffset(o);this._renderTextLine(t,e,this._textLines[o],n+c,r+i+l,o),i+=a}e.restore()},_renderTextFill:function(e){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(e,"fillText")},_renderTextStroke:function(e){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this._setLineDash(e,this.strokeDashArray),e.beginPath(),this._renderTextCommon(e,"strokeText"),e.closePath(),e.restore(
vendor: 4,867 bytes, line 78
78))},_renderChars:function(e,t,i,n,r,o){var s,a,l,c,u,h=this.getHeightOfLine(o),d=-1!==this.textAlign.indexOf("justify"),f="",p=0,m=this.path,g=!d&&0===this.charSpacing&&this.isEmptyStyles(o)&&!m,v="ltr"===this.direction,b="ltr"===this.direction?1:-1;if(t.save(),r-=h*this._fontSizeFraction/this.lineHeight,g)return t.canvas.setAttribute("dir",v?"ltr":"rtl"),t.direction=v?"ltr":"rtl",t.textAlign=v?"left":"right",this._renderChar(e,t,o,0,i.join(""),n,r,h),void t.restore();for(var y=0,w=i.length-1;y<=w;y++)c=y===w||this.charSpacing||m,f+=i[y],l=this.__charBounds[o][y],0===p?(n+=b*(l.kernedWidth-l.width),p+=l.width):p+=l.kernedWidth,d&&!c&&this._reSpaceAndTab.test(i[y])&&(c=!0),c||(s=s||this.getCompleteStyleDeclaration(o,y),a=this.getCompleteStyleDeclaration(o,y+1),c=this._hasStyleChanged(s,a)),c&&(m?(t.save(),t.translate(l.renderLeft,l.renderTop),t.rotate(l.angle),this._renderChar(e,t,o,y,f,-p/2,0,h),t.restore()):(u=n,t.canvas.setAttribute("dir",v?"ltr":"rtl"),t.direction=v?"ltr":"rtl",t.textAlign=v?"left":"right",this._renderChar(e,t,o,y,f,u,r,h)),f="",s=a,n+=b*p,p=0);t.restore()},_applyPatternGradientTransformText:function(e){var i,n=t.util.createCanvasElement(),r=this.width+this.strokeWidth,o=this.height+this.strokeWidth;return n.width=r,n.height=o,(i=n.getContext("2d")).beginPath(),i.moveTo(0,0),i.lineTo(r,0),i.lineTo(r,o),i.lineTo(0,o),i.closePath(),i.translate(r/2,o/2),i.fillStyle=e.toLive(i),this._applyPatternGradientTransform(i,e),i.fill(),i.createPattern(n,"no-repeat")},handleFiller:function(e,t,i){var n,r;return i.toLive?"percentage"===i.gradientUnits||i.gradientTransform||i.patternTransform?(n=-this.width/2,r=-this.height/2,e.translate(n,r),e[t]=this._applyPatternGradientTransformText(i),{offsetX:n,offsetY:r}):(e[t]=i.toLive(e,this),this._applyPatternGradientTransform(e,i)):(e[t]=i,{offsetX:0,offsetY:0})},_setStrokeStyles:function(e,t){return e.lineWidth=t.strokeWidth,e.lineCap=this.strokeLineCap,e.lineDashOffset=this.strokeDashOffset,e.lineJoin=this.strokeLineJoin,e.miterLimit=this.strokeMiterLimit,this.handleFiller(e,"strokeStyle",t.stroke)},_setFillStyles:function(e,t){return this.handleFiller(e,"fillStyle",t.fill)},_renderChar:function(e,t,i,n,r,o,s){var a,l,c=this._getStyleDeclaration(i,n),u=this.getCompleteStyleDeclaration(i,n),h="fillText"===e&&u.fill,d="strokeText"===e&&u.stroke&&u.strokeWidth;(d||h)&&(t.save(),h&&(a=this._setFillStyles(t,u)),d&&(l=this._setStrokeStyles(t,u)),t.font=this._getFontDeclaration(u),c&&c.textBackgroundColor&&this._removeShadow(t),c&&c.deltaY&&(s+=c.deltaY),h&&t.fillText(r,o-a.offsetX,s-a.offsetY),d&&t.strokeText(r,o-l.offsetX,s-l.offsetY),t.restore())},setSuperscript:function(e,t){return this._setScript(e,t,this.superscript)},setSubscript:function(e,t){return this._setScript(e,t,this.subscript)},_setScript:function(e,t,i){var n=this.get2DCursorLocation(e,!0),r=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize"),o=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"deltaY"),s={fontSize:r*i.size,deltaY:o+r*i.baseline};return this.setSelectionStyles(s,e,t),this},_hasStyleChanged:function(e,t){return e.fill!==t.fill||e.stroke!==t.stroke||e.strokeWidth!==t.strokeWidth||e.fontSize!==t.fontSize||e.fontFamily!==t.fontFamily||e.fontWeight!==t.fontWeight||e.fontStyle!==t.fontStyle||e.deltaY!==t.deltaY},_hasStyleChangedForSvg:function(e,t){return this._hasStyleChanged(e,t)||e.overline!==t.overline||e.underline!==t.underline||e.linethrough!==t.linethrough},_getLineLeftOffset:function(e){var t=this.getLineWidth(e),i=this.width-t,n=this.textAlign,r=this.direction,o=0,s=this.isEndOfWrapping(e);return"justify"===n||"justify-center"===n&&!s||"justify-right"===n&&!s||"justify-left"===n&&!s?0:("center"===n&&(o=i/2),"right"===n&&(o=i),"justify-center"===n&&(o=i/2),"justify-right"===n&&(o=i),"rtl"===r&&(o-=i),o)},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var e=this._forceClearCache;return e||(e=this.hasStateChanged("_dimensionAffectingProps")),e&&(this.dirty=!0,this._forceClearCache=!1),e},getLineWidth:function(e){return this.__lineWidths[e]?this.__lineWidths[e]:(t=""===this._textLines[e]?0:this.measureLine(e).width,this.__lineWidths[e]=t,t);var t},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(e,t,i){var n=this._getStyleDeclaration(e,t);return n&&void 0!==n[i]?n[i]:this[i]},_renderTextDecoration:function(e,t){if(this[t]||this.styleHas(t)){for(var i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b=this._getLeftOffset(),y=this._getTopOffset(),w=this.path,_=this._getWidthOfCharSpacing(),k=this.offsets[t],x=0,C=this._textLines.length;x<C;x++)if(i=this.getHeightOfLine(x),this[t]||this.styleHas(t,x)){l=this._textLines[x],m=i/this.lineHeight,o=this._getLineLeftOffset(x),h=0,d=0,c=this.getValueOfPropertyAt(
vendor: 16,895 bytes, line 78
78x,0,t),v=this.getValueOfPropertyAt(x,0,"fill"),u=y+m*(1-this._fontSizeFraction),n=this.getHeightOfChar(x,0),s=this.getValueOfPropertyAt(x,0,"deltaY");for(var S=0,E=l.length;S<E;S++)if(f=this.__charBounds[x][S],p=this.getValueOfPropertyAt(x,S,t),g=this.getValueOfPropertyAt(x,S,"fill"),r=this.getHeightOfChar(x,S),a=this.getValueOfPropertyAt(x,S,"deltaY"),w&&p&&g)e.save(),e.fillStyle=v,e.translate(f.renderLeft,f.renderTop),e.rotate(f.angle),e.fillRect(-f.kernedWidth/2,k*r+a,f.kernedWidth,this.fontSize/15),e.restore();else if((p!==c||g!==v||r!==n||a!==s)&&d>0){var T=b+o+h;"rtl"===this.direction&&(T=this.width-T-d),c&&v&&(e.fillStyle=v,e.fillRect(T,u+k*n+s,d,this.fontSize/15)),h=f.left,d=f.width,c=p,v=g,n=r,s=a}else d+=f.kernedWidth;T=b+o+h,"rtl"===this.direction&&(T=this.width-T-d),e.fillStyle=g,p&&g&&e.fillRect(T,u+k*n+s,d-_,this.fontSize/15),y+=i}else y+=i;this._removeShadow(e)}},_getFontDeclaration:function(e,i){var n=e||this,r=this.fontFamily,o=t.Text.genericFonts.indexOf(r.toLowerCase())>-1,s=void 0===r||r.indexOf("'")>-1||r.indexOf(",")>-1||r.indexOf('"')>-1||o?n.fontFamily:'"'+n.fontFamily+'"';return[t.isLikelyNode?n.fontWeight:n.fontStyle,t.isLikelyNode?n.fontStyle:n.fontWeight,i?this.CACHE_FONT_SIZE+"px":n.fontSize+"px",s].join(" ")},render:function(e){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",e)))},_splitTextIntoLines:function(e){for(var i=e.split(this._reNewline),n=new Array(i.length),r=["\n"],o=[],s=0;s<i.length;s++)n[s]=t.util.string.graphemeSplit(i[s]),o=o.concat(n[s],r);return o.pop(),{_unwrappedLines:n,lines:i,graphemeText:o,graphemeLines:n}},toObject:function(e){var t=n.concat(e),r=this.callSuper("toObject",t);return r.styles=i(this.styles,!0),r.path&&(r.path=this.path.toObject()),r},set:function(e,t){this.callSuper("set",e,t);var i=!1,n=!1;if("object"==typeof e)for(var r in e)"path"===r&&this.setPathInfo(),i=i||-1!==this._dimensionAffectingProps.indexOf(r),n=n||"path"===r;else i=-1!==this._dimensionAffectingProps.indexOf(e),n="path"===e;return n&&this.setPathInfo(),i&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),t.Text.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),t.Text.DEFAULT_SVG_FONT_SIZE=16,t.Text.fromElement=function(e,n,r){if(!e)return n(null);var o=t.parseAttributes(e,t.Text.ATTRIBUTE_NAMES),s=o.textAnchor||"left";if((r=t.util.object.extend(r?i(r):{},o)).top=r.top||0,r.left=r.left||0,o.textDecoration){var a=o.textDecoration;-1!==a.indexOf("underline")&&(r.underline=!0),-1!==a.indexOf("overline")&&(r.overline=!0),-1!==a.indexOf("line-through")&&(r.linethrough=!0),delete r.textDecoration}"dx"in o&&(r.left+=o.dx),"dy"in o&&(r.top+=o.dy),"fontSize"in r||(r.fontSize=t.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in e?l=e.textContent:"firstChild"in e&&null!==e.firstChild&&"data"in e.firstChild&&null!==e.firstChild.data&&(l=e.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var c=r.strokeWidth;r.strokeWidth=0;var u=new t.Text(l,r),h=u.getScaledHeight()/u.height,d=((u.height+u.strokeWidth)*u.lineHeight-u.height)*h,f=u.getScaledHeight()+d,p=0;"center"===s&&(p=u.getScaledWidth()/2),"right"===s&&(p=u.getScaledWidth()),u.set({left:u.left-p,top:u.top-(f-u.fontSize*(.07+u._fontSizeFraction))/u.lineHeight,strokeWidth:void 0!==c?c:1}),n(u)},t.Text.fromObject=function(e,n){var r=i(e),o=e.path;return delete r.path,t.Object._fromObject("Text",r,function(e){o?t.Object._fromObject("Path",o,function(t){e.set("path",t),n(e)},"path"):n(e)},"text")},t.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],t.util.createAccessors&&t.util.createAccessors(t.Text)}}(t),w.util.object.extend(w.Text.prototype,{isEmptyStyles:function(e){if(!this.styles)return!0;if(void 0!==e&&!this.styles[e])return!0;var t=void 0===e?this.styles:{line:this.styles[e]};for(var i in t)for(var n in t[i])for(var r in t[i][n])return!1;return!0},styleHas:function(e,t){if(!this.styles||!e||""===e)return!1;if(void 0!==t&&!this.styles[t])return!1;var i=void 0===t?this.styles:{0:this.styles[t]};for(var n in i)for(var r in i[n])if(void 0!==i[n][r][e])return!0;return!1},cleanStyle:function(e){if(!this.styles||!e||""===e)return!1;var t,i,n=this.styles,r=0,o=!0,s=0;for(var a in n){for(var l in t=0,n[a]){var c;r++,(c=n[a][l]).hasOwnProperty(e)?(i?c[e]!==i&&(o=!1):i=c[e],c[e]===this[e]&&delete c[e]):o=!1,0!==Object.keys(c).length?t++:delete n[a][l]}0===t&&delete n[a]}for(var u=0;u<this._textLines.length;u++)s+=this._textLines[u].length;o&&r===s&&(this[e]=i,this.removeStyle(e))},removeStyle:function(e){if(this.styles&&e&&""!==e){var t,i,n,r=this.styles;for(i in r){for(n in t=r[i])delete t[n][e],0===Object.keys(t[n]).length&&delete t[n];0===Object.keys(t).length&&delete r[i]}}},_extendStyles:function(e,t){var i=this.get2DCursorLocation(e);this._getLineStyle(i.lineIndex)||this._setLineStyle(i.lineIndex),this._getStyleDeclaration(i.lineIndex,i.charIndex)||this._setStyleDeclaration(i.lineIndex,i.charIndex,{}),w.util.object.extend(this._getStyleDeclaration(i.lineIndex,i.charIndex),t)},get2DCursorLocation:function(e,t){void 0===e&&(e=this.selectionStart);for(var i=t?this._unwrappedTextLines:this._textLines,n=i.length,r=0;r<n;r++){if(e<=i[r].length)return{lineIndex:r,charIndex:e};e-=i[r].length+this.missingNewlineOffset(r)}return{lineIndex:r-1,charIndex:i[r-1].length<e?i[r-1].length:e}},getSelectionStyles:function(e,t,i){void 0===e&&(e=this.selectionStart||0),void 0===t&&(t=this.selectionEnd||e);for(var n=[],r=e;r<t;r++)n.push(this.getStyleAtPosition(r,i));return n},getStyleAtPosition:function(e,t){var i=this.get2DCursorLocation(e);return(t?this.getCompleteStyleDeclaration(i.lineIndex,i.charIndex):this._getStyleDeclaration(i.lineIndex,i.charIndex))||{}},setSelectionStyles:function(e,t,i){void 0===t&&(t=this.selectionStart||0),void 0===i&&(i=this.selectionEnd||t);for(var n=t;n<i;n++)this._extendStyles(n,e);return this._forceClearCache=!0,this},_getStyleDeclaration:function(e,t){var i=this.styles&&this.styles[e];return i?i[t]:null},getCompleteStyleDeclaration:function(e,t){for(var i,n=this._getStyleDeclaration(e,t)||{},r={},o=0;o<this._styleProperties.length;o++)r[i=this._styleProperties[o]]=void 0===n[i]?this[i]:n[i];return r},_setStyleDeclaration:function(e,t,i){this.styles[e][t]=i},_deleteStyleDeclaration:function(e,t){delete this.styles[e][t]},_getLineStyle:function(e){return!!this.styles[e]},_setLineStyle:function(e){this.styles[e]={}},_deleteLineStyle:function(e){delete this.styles[e]}}),function(){function e(e){e.textDecoration&&(e.textDecoration.indexOf("underline")>-1&&(e.underline=!0),e.textDecoration.indexOf("line-through")>-1&&(e.linethrough=!0),e.textDecoration.indexOf("overline")>-1&&(e.overline=!0),delete e.textDecoration)}w.IText=w.util.createClass(w.Text,w.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(e,t){this.callSuper("initialize",e,t),this.initBehavior()},setSelectionStart:function(e){e=Math.max(e,0),this._updateAndFire("selectionStart",e)},setSelectionEnd:function(e){e=Math.min(e,this.text.length),this._updateAndFire("selectionEnd",e)},_updateAndFire:function(e,t){this[e]!==t&&(this._fireSelectionChanged(),this[e]=t),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(e){this.clearContextTop(),this.callSuper("render",e),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(e){this.callSuper("_render",e)},clearContextTop:function(e){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var t=this.canvas.contextTop,i=this.canvas.viewportTransform;t.save(),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this.transform(t),this._clearTextArea(t),e||t.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this._getCursorBoundaries(),t=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),t.restore()}},_clearTextArea:function(e){var t=this.width+4,i=this.height+4;e.clearRect(-t/2,-i/2,t,i)},_getCursorBoundaries:function(e){void 0===e&&(e=this.selectionStart);var t=this._getLeftOffset(),i=this._getTopOffset(),n=this._getCursorBoundariesOffsets(e);return{left:t,top:i,leftOffset:n.left,topOffset:n.top}},_getCursorBoundariesOffsets:function(e){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var t,i,n,r,o=0,s=0,a=this.get2DCursorLocation(e);n=a.charIndex,i=a.lineIndex;for(var l=0;l<i;l++)o+=this.getHeightOfLine(l);t=this._getLineLeftOffset(i);var c=this.__charBounds[i][n];return c&&(s=c.left),0!==this.charSpacing&&n===this._textLines[i].length&&(s-=this._getWidthOfCharSpacing()),r={top:o,left:t+(s>0?s:0)},"rtl"===this.direction&&(r.left*=-1),this.cursorOffsetCache=r,this.cursorOffsetCache},renderCursor:function(e,t){var i=this.get2DCursorLocation(),n=i.lineIndex,r=i.charIndex>0?i.charIndex-1:0,o=this.getValueOfPropertyAt(n,r,"fontSize"),s=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/s,l=e.topOffset,c=this.getValueOfPropertyAt(n,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(n)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(e,t),t.fillStyle=this.cursorColor||this.getValueOfPropertyAt(n,r,"fill"),t.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,t.fillRect(e.left+e.leftOffset-a/2,l+e.top+c,a,o)},renderSelection:function(e,t){for(var i=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,n=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,r=-1!==this.textAlign.indexOf("justify"),o=this.get2DCursorLocation(i),s=this.get2DCursorLocation(n),a=o.lineIndex,l=s.lineIndex,c=o.charIndex<0?0:o.charIndex,u=s.charIndex<0?0:s.charIndex,h=a;h<=l;h++){var d,f=this._getLineLeftOffset(h)||0,p=this.getHeightOfLine(h),m=0,g=0;if(h===a&&(m=this.__charBounds[a][c].left),h>=a&&h<l)g=r&&!this.isEndOfWrapping(h)?this.width:this.getLineWidth(h)||5;else if(h===l)if(0===u)g=this.__charBounds[l][u].left;else{var v=this._getWidthOfCharSpacing();g=this.__charBounds[l][u-1].left+this.__charBounds[l][u-1].width-v}d=p,(this.lineHeight<1||h===l&&this.lineHeight>1)&&(p/=this.lineHeight);var b=e.left+f+m,y=g-m,w=p,_=0;this.inCompositionMode?(t.fillStyle=this.compositionColor||"black",w=1,_=p):t.fillStyle=this.selectionColor,"rtl"===this.direction&&(b=this.width-b-y),t.fillRect(b,e.top+e.topOffset+_,y,w),e.topOffset+=d}},getCurrentCharFontSize:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")},getCurrentCharColor:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fill")},_getCurrentCharIndex:function(){var e=this.get2DCursorLocation(this.selectionStart,!0),t=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:t}}}),w.IText.fromObject=function(t,i){if(e(t),t.styles)for(var n in t.styles)for(var r in t.styles[n])e(t.styles[n][r]);w.Object._fromObject("IText",t,i,"text")}}(),v=w.util.object.clone,w.util.object.extend(w.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var e=this;this.on("added",function(){var t=e.canvas;t&&(t._hasITextHandlers||(t._hasITextHandlers=!0,e._initCanvasHandlers(t)),t._iTextInstances=t._iTextInstances||[],t._iTextInstances.push(e))})},initRemovedHandler:function(){var e=this;this.on("removed",function(){var t=e.canvas;t&&(t._iTextInstances=t._iTextInstances||[],w.util.removeFromArray(t._iTextInstances,e),0===t._iTextInstances.length&&(t._hasITextHandlers=!1,e._removeCanvasHandlers(t)))})},_initCanvasHandlers:function(e){e._mouseUpITextHandler=function(){e._iTextInstances&&e._iTextInstances.forEach(function(e){e.__isMousedown=!1})},e.on("mouse:up",e._mouseUpITextHandler)},_removeCanvasHandlers:function(e){e.off("mouse:up",e._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(e,t,i,n){var r;return r={isAborted:!1,abort:function(){this.isAborted=!0}},e.animate("_currentCursorOpacity",t,{duration:i,onComplete:function(){r.isAborted||e[n]()},onChange:function(){e.canvas&&e.selectionStart===e.selectionEnd&&e.renderCursorOrSelection()},abort:function(){return r.isAborted}}),r},_onTickComplete:function(){var e=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){e._currentTickCompleteState=e._animateCursor(e,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(e){var t=this,i=e?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){t._tick()},i)},abortCursorAnimation:function(){var e=this._currentTickState||this._currentTickCompleteState,t=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,e&&t&&t.clearContext(t.contextTop||t.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(e){var t=0,i=e-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)t++,i--;for(;/\S/.test(this._text[i])&&i>-1;)t++,i--;return e-t},findWordBoundaryRight:function(e){var t=0,i=e;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)t++,i++;for(;/\S/.test(this._text[i])&&i<this._text.length;)t++,i++;return e+t},findLineBoundaryLeft:function(e){for(var t=0,i=e-1;!/\n/.test(this._text[i])&&i>-1;)t++,i--;return e-t},findLineBoundaryRight:function(e){for(var t=0,i=e;!/\n/.test(this._text[i])&&i<this._text.length;)t++,i++;return e+t},searchWordBoundary:function(e,t){for(var i=this._text,n=this._reSpace.test(i[e])?e-1:e,r=i[n],o=w.reNonWord;!o.test(r)&&n>0&&n<i.length;)r=i[n+=t];return o.test(r)&&(n+=1===t?0:1),n},selectWord:function(e){e=e||this.selectionStart;var t=this.searchWordBoundary(e,-1),i=this.searchWordBoundary(e,1);this.selectionStart=t,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(e){e=e||this.selectionStart;var t=this.findLineBoundaryLeft(e),i=this.findLineBoundaryRight(e);return this.selectionStart=t,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(e){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(e),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(e){e._iTextInstances&&e._iTextInstances.forEach(function(e){e.selected=!1,e.isEditing&&e.exitEditing()})},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(e){if(this.__isMousedown&&this.isEditing){var t=this.getSelectionStartFromPointer(e.e),i=this.selectionStart,n=this.selectionEnd;(t===this.__selectionStartOnMouseDown&&i!==n||i!==t&&n!==t)&&(t>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=t):(this.selectionStart=t,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===n||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}}
vendor: 10,767 bytes, line 78
78,_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(e,t,i){var n=i.slice(0,e),r=w.util.string.graphemeSplit(n).length;if(e===t)return{selectionStart:r,selectionEnd:r};var o=i.slice(e,t);return{selectionStart:r,selectionEnd:r+w.util.string.graphemeSplit(o).length}},fromGraphemeToStringSelection:function(e,t,i){var n=i.slice(0,e).join("").length;return e===t?{selectionStart:n,selectionEnd:n}:{selectionStart:n,selectionEnd:n+i.slice(e,t).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var e=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=e.selectionEnd,this.inCompositionMode||(this.selectionStart=e.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var e=this.inCompositionMode?this.compositionStart:this.selectionStart,t=this._getCursorBoundaries(e),i=this.get2DCursorLocation(e),n=i.lineIndex,r=i.charIndex,o=this.getValueOfPropertyAt(n,r,"fontSize")*this.lineHeight,s=t.leftOffset,a=this.calcTransformMatrix(),l={x:t.left+s,y:t.top+t.topOffset+o},c=this.canvas.getRetinaScaling(),u=this.canvas.upperCanvasEl,h=u.width/c,d=u.height/c,f=h-o,p=d-o,m=u.clientWidth/h,g=u.clientHeight/d;return l=w.util.transformPoint(l,a),(l=w.util.transformPoint(l,this.canvas.viewportTransform)).x*=m,l.y*=g,l.x<0&&(l.x=0),l.x>f&&(l.x=f),l.y<0&&(l.y=0),l.y>p&&(l.y=p),l.x+=this.canvas._offset.left,l.y+=this.canvas._offset.top,{left:l.x+"px",top:l.y+"px",fontSize:o+"px",charHeight:o}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var e=this._textBeforeEdit!==this.text,t=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,t&&(t.blur&&t.blur(),t.parentNode&&t.parentNode.removeChild(t)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var e in this.styles)this._textLines[e]||delete this.styles[e]},removeStyleFromTo:function(e,t){var i,n,r=this.get2DCursorLocation(e,!0),o=this.get2DCursorLocation(t,!0),s=r.lineIndex,a=r.charIndex,l=o.lineIndex,c=o.charIndex;if(s!==l){if(this.styles[s])for(i=a;i<this._unwrappedTextLines[s].length;i++)delete this.styles[s][i];if(this.styles[l])for(i=c;i<this._unwrappedTextLines[l].length;i++)(n=this.styles[l][i])&&(this.styles[s]||(this.styles[s]={}),this.styles[s][a+i-c]=n);for(i=s+1;i<=l;i++)delete this.styles[i];this.shiftLineStyles(l,s-l)}else if(this.styles[s]){n=this.styles[s];var u,h,d=c-a;for(i=a;i<c;i++)delete n[i];for(h in this.styles[s])(u=parseInt(h,10))>=c&&(n[u-d]=n[h],delete n[h])}},shiftLineStyles:function(e,t){var i=v(this.styles);for(var n in this.styles){var r=parseInt(n,10);r>e&&(this.styles[r+t]=i[r],i[r-t]||delete this.styles[r])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(e,t,i,n){var r,o={},s=!1,a=this._unwrappedTextLines[e].length===t;for(var l in i||(i=1),this.shiftLineStyles(e,i),this.styles[e]&&(r=this.styles[e][0===t?t:t-1]),this.styles[e]){var c=parseInt(l,10);c>=t&&(s=!0,o[c-t]=this.styles[e][l],a&&0===t||delete this.styles[e][l])}var u=!1;for(s&&!a&&(this.styles[e+i]=o,u=!0),u&&i--;i>0;)n&&n[i-1]?this.styles[e+i]={0:v(n[i-1])}:r?this.styles[e+i]={0:v(r)}:delete this.styles[e+i],i--;this._forceClearCache=!0},insertCharStyleObject:function(e,t,i,n){this.styles||(this.styles={});var r=this.styles[e],o=r?v(r):{};for(var s in i||(i=1),o){var a=parseInt(s,10);a>=t&&(r[a+i]=o[a],o[a-i]||delete r[a])}if(this._forceClearCache=!0,n)for(;i--;)Object.keys(n[i]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][t+i]=v(n[i]));else if(r)for(var l=r[t?t-1:1];l&&i--;)this.styles[e][t+i]=v(l)},insertNewStyleBlock:function(e,t,i){for(var n=this.get2DCursorLocation(t,!0),r=[0],o=0,s=0;s<e.length;s++)"\n"===e[s]?r[++o]=0:r[o]++;for(r[0]>0&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,r[0],i),i=i&&i.slice(r[0]+1)),o&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+r[0],o),s=1;s<o;s++)r[s]>0?this.insertCharStyleObject(n.lineIndex+s,0,r[s],i):i&&(this.styles[n.lineIndex+s][0]=i[0]),i=i&&i.slice(r[s]+1);r[s]>0&&this.insertCharStyleObject(n.lineIndex+s,0,r[s],i)},setSelectionStartEndWithShift:function(e,t,i){i<=e?(t===e?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=e),this.selectionStart=i):i>e&&i<t?"right"===this._selectionDirection?this.selectionEnd=i:this.selectionStart=i:(t===e?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=t),this.selectionEnd=i)},setSelectionInBoundaries:function(){var e=this.text.length;this.selectionStart>e?this.selectionStart=e:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>e?this.selectionEnd=e:this.selectionEnd<0&&(this.selectionEnd=0)}}),w.util.object.extend(w.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(e){if(this.canvas){this.__newClickTime=+new Date;var t=e.pointer;this.isTripleClick(t)&&(this.fire("tripleclick",e),this._stopEvent(e.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=t,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(e){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===e.x&&this.__lastPointer.y===e.y},_stopEvent:function(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(e){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(e.e))},tripleClickHandler:function(e){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(e.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(e.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(e){if(this.__isMousedown=!1,!(!this.editable||this.group||e.transform&&e.transform.actionPerformed||e.e.button&&1!==e.e.button)){if(this.canvas){var t=this.canvas._activeObject;if(t&&t!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(e.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(e){var t=this.getSelectionStartFromPointer(e),i=this.selectionStart,n=this.selectionEnd;e.shiftKey?this.setSelectionStartEndWithShift(i,n,t):(this.selectionStart=t,this.selectionEnd=t),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(e){for(var t,i=this.getLocalPointer(e),n=0,r=0,o=0,s=0,a=0,l=0,c=this._textLines.length;l<c&&o<=i.y;l++)o+=this.getHeightOfLine(l)*this.scaleY,a=l,l>0&&(s+=this._textLines[l-1].length+this.missingNewlineOffset(l-1));r=this._getLineLeftOffset(a)*this.scaleX,t=this._textLines[a],"rtl"===this.direction&&(i.x=this.width*this.scaleX-i.x+r);for(var u=0,h=t.length;u<h&&(n=r,(r+=this.__charBounds[a][u].kernedWidth*this.scaleX)<=i.x);u++)s++;return this._getNewSelectionStartFromOffset(i,n,r,s,h)},_getNewSelectionStartFromOffset:function(e,t,i,n,r){var o=e.x-t,s=i-e.x,a=n+(s>o||s<0?0:1);return this.flipX&&(a=r-a),a>this._text.length&&(a=this._text.length),a}}),w.util.object.extend(w.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=w.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","fal
78se"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var e=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+e.top+"; left: "+e.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; paddingï½°top: "+e.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):w.document.body.appendChild(this.hiddenTextarea),w.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),w.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),w.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),w.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),w.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),w.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),w.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),w.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),w.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(w.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(e){if(this.isEditing){var t="rtl"===this.direction?this.keysMapRtl:this.keysMap;if(e.keyCode in t)this[t[e.keyCode]](e);else{if(!(e.keyCode in this.ctrlKeysMapDown)||!e.ctrlKey&&!e.metaKey)return;this[this.ctrlKeysMapDown[e.keyCode]](e)}e.stopImmediatePropagation(),e.preventDefault(),e.keyCode>=33&&e.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(e){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:e.keyCode in this.ctrlKeysMapUp&&(e.ctrlKey||e.metaKey)&&(this[this.ctrlKeysMapUp[e.keyCode]](e),e.stopImmediatePropagation(),e.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(e){var t=this.fromPaste;if(this.fromPaste=!1,e&&e.stopPropagation(),this.isEditing){var i,n,r,o,s,a=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,l=this._text.length,c=a.length,u=c-l,h=this.selectionStart,d=this.selectionEnd,f=h!==d;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var p=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),m=h>p.selectionStart;f?(i=this._text.slice(h,d),u+=d-h):c<l&&(i=m?this._text.slice(d+u,d):this._text.slice(h,h-u)),n=a.slice(p.selectionEnd-u,p.selectionEnd),i&&i.length&&(n.length&&(r=this.getSelectionStyles(h,h+1,!1),r=n.map(function(){return r[0]})),f?(o=h,s=d):m?(o=d-i.length,s=d):(o=d,s=d+i.length),this.removeStyleFromTo(o,s)),n.length&&(t&&n.join("")===w.copiedText&&!w.disableStyleCopyPaste&&(r=w.copiedTextStyle),this.insertNewStyleBlock(n,h,r)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(e){this.compositionStart=e.target.selectionStart,this.compositionEnd=e.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(w.copiedText=this.getSelectedText(),w.disableStyleCopyPaste?w.copiedTextStyle=null:w.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(e){return e&&e.clipboardData||w.window.clipboardData},_getWidthBeforeCursor:function(e,t){var i,n=this._getLineLeftOffset(e);return t>0&&(n+=(i=this.__charBounds[e][t-1]).left+i.width),n},getDownCursorOffset:function(e,t){var i=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(i),r=n.lineIndex;if(r===this._textLines.length-1||e.metaKey||34===e.keyCode)return this._text.length-i;var o=n.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r+1,s);return this._textLines[r].slice(o).length+a+1+this.missingNewlineOffset(r)},_getSelectionForOffset:function(e,t){return e.shiftKey&&this.selectionStart!==this.selectionEnd&&t?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(e,t){var i=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(i),r=n.lineIndex;if(0===r||e.metaKey||33===e.keyCode)return-i;var o=n.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r-1,s),l=this._textLines[r].slice(0,o),c=this.missingNewlineOffset(r-1);return-this._textLines[r-1].length+a-l.length+(1-c)},_getIndexOnLine:function(e,t){for(var i,n,r=this._textLines[e],o=this._getLineLeftOffset(e),s=0,a=0,l=r.length;a<l;a++)if((o+=i=this.__charBounds[e][a].width)>t){n=!0;var c=o-i,u=o,h=Math.abs(c-t);s=Math.abs(u-t)<h?a:a-1;break}return n||(s=r.length-1),s},moveCursorDown:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",e)},moveCursorUp:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",e)},_moveCursorUpOrDown:function(e,t){var i=this["get"+e+"CursorOffset"](t,"right"===this._selectionDirection);t.shiftKey?this.moveCursorWithShift(i):this.moveCursorWithoutShift(i),0!==i&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(e){var t="left"===this._selectionDirection?this.selectionStart+e:this.selectionEnd+e;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,t),0!==e},moveCursorWithoutShift:function(e){return e<0?(this.selectionStart+=e,this.selectionEnd=this.selectionStart):(this.selectionEnd+=e,this.selectionStart=this.selectionEnd),0!==e},moveCursorLeft:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",e)},_move:function(e,t,i){var n;
vendor: 4,928 bytes, line 78
78if(e.altKey)n=this["findWordBoundary"+i](this[t]);else{if(!e.metaKey&&35!==e.keyCode&&36!==e.keyCode)return this[t]+="Left"===i?-1:1,!0;n=this["findLineBoundary"+i](this[t])}if(void 0!==typeof n&&this[t]!==n)return this[t]=n,!0},_moveLeft:function(e,t){return this._move(e,t,"Left")},_moveRight:function(e,t){return this._move(e,t,"Right")},moveCursorLeftWithoutShift:function(e){var t=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(t=this._moveLeft(e,"selectionStart")),this.selectionEnd=this.selectionStart,t},moveCursorLeftWithShift:function(e){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(e,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(e,"selectionStart")):void 0},moveCursorRight:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",e)},_moveCursorLeftOrRight:function(e,t){var i="moveCursor"+e+"With";this._currentCursorOpacity=1,t.shiftKey?i+="Shift":i+="outShift",this[i](t)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(e){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(e,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(e,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(e){var t=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(t=this._moveRight(e,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,t},removeChars:function(e,t){void 0===t&&(t=e+1),this.removeStyleFromTo(e,t),this._text.splice(e,t-e),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(e,t,i,n){void 0===n&&(n=i),n>i&&this.removeStyleFromTo(i,n);var r=w.util.string.graphemeSplit(e);this.insertNewStyleBlock(r,i,t),this._text=[].concat(this._text.slice(0,i),r,this._text.slice(n)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),b=w.util.toFixed,y=/ +/g,w.util.object.extend(w.Text.prototype,{_toSVG:function(){var e=this._getSVGLeftTopOffsets(),t=this._getSVGTextAndBg(e.textTop,e.textLeft);return this._wrapSVGTextAndBg(t)},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(e){var t=this.getSvgTextDecoration(this);return[e.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",t?'text-decoration="'+t+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",e.textSpans.join(""),"</text>\n"]},_getSVGTextAndBg:function(e,t){var i,n=[],r=[],o=e;this._setSVGBg(r);for(var s=0,a=this._textLines.length;s<a;s++)i=this._getLineLeftOffset(s),(this.textBackgroundColor||this.styleHas("textBackgroundColor",s))&&this._setSVGTextLineBg(r,s,t+i,o),this._setSVGTextLineText(n,s,t+i,o),o+=this.getHeightOfLine(s);return{textSpans:n,textBgRects:r}},_createTextCharSpan:function(e,t,i,n){var r=e!==e.trim()||e.match(y),o=this.getSvgSpanStyles(t,r),s=o?'style="'+o+'"':"",a=t.deltaY,l="",c=w.Object.NUM_FRACTION_DIGITS;return a&&(l=' dy="'+b(a,c)+'" '),['<tspan x="',b(i,c),'" y="',b(n,c),'" ',l,s,">",w.util.string.escapeXml(e),"</tspan>"].join("")},_setSVGTextLineText:function(e,t,i,n){var r,o,s,a,l,c=this.getHeightOfLine(t),u=-1!==this.textAlign.indexOf("justify"),h="",d=0,f=this._textLines[t];n+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,m=f.length-1;p<=m;p++)l=p===m||this.charSpacing,h+=f[p],s=this.__charBounds[t][p],0===d?(i+=s.kernedWidth-s.width,d+=s.width):d+=s.kernedWidth,u&&!l&&this._reSpaceAndTab.test(f[p])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(t,p),o=this.getCompleteStyleDeclaration(t,p+1),l=this._hasStyleChangedForSvg(r,o)),l&&(a=this._getStyleDeclaration(t,p)||{},e.push(this._createTextCharSpan(h,a,i,n)),h="",r=o,i+=d,d=0)},_pushTextBgRect:function(e,t,i,n,r,o){var s=w.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(t),' x="',b(i,s),'" y="',b(n,s),'" width="',b(r,s),'" height="',b(o,s),'"></rect>\n')},_setSVGTextLineBg:function(e,t,i,n){for(var r,o,s=this._textLines[t],a=this.getHeightOfLine(t)/this.lineHeight,l=0,c=0,u=this.getValueOfPropertyAt(t,0,"textBackgroun
78dColor"),h=0,d=s.length;h<d;h++)r=this.__charBounds[t][h],(o=this.getValueOfPropertyAt(t,h,"textBackgroundColor"))!==u?(u&&this._pushTextBgRect(e,u,i+c,n,l,a),c=r.left,l=r.width,u=o):l+=r.kernedWidth;o&&this._pushTextBgRect(e,o,i+c,n,l,a)},_getFillAttributes:function(e){var t=e&&"string"==typeof e?new w.Color(e):"";return t&&t.getSource()&&1!==t.getAlpha()?'opacity="'+t.getAlpha()+'" fill="'+t.setAlpha(1).toRgb()+'"':'fill="'+e+'"'},_getSVGLineTopOffset:function(e){for(var t,i=0,n=0;n<e;n++)i+=this.getHeightOfLine(n);return t=this.getHeightOfLine(n),{lineTop:i,offset:(this._fontSizeMult-this._fontSizeFraction)*t/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(e){return w.Object.prototype.getSvgStyles.call(this,e)+" white-space: pre;"}}),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Textbox=t.util.createClass(t.IText,t.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:t.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(e){for(var t=0,i=0,n=0,r={},o=0;o<e.graphemeLines.length;o++)"\n"===e.graphemeText[n]&&o>0?(i=0,n++,t++):!this.splitByGrapheme&&this._reSpaceAndTab.test(e.graphemeText[n])&&o>0&&(i++,n++),r[o]={line:t,offset:i},n+=e.graphemeLines[o].length,i+=e.graphemeLines[o].length;return r},styleHas:function(e,i){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[i];n&&(i=n.line)}return t.Text.prototype.styleHas.call(this,e,i)},isEmptyStyles:function(e){if(!this.styles)return!0;var t,i,n=0,r=!1,o=this._styleMap[e],s=this._styleMap[e+1];for(var a in o&&(e=o.line,n=o.offset),s&&(r=s.line===e,t=s.offset),i=void 0===e?this.styles:{line:this.styles[e]})for(var l in i[a])if(l>=n&&(!r||l<t))for(var c in i[a][l])return!1;return!0},_getStyleDeclaration:function(e,t){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[e];if(!i)return null;e=i.line,t=i.offset+t}return this.callSuper("_getStyleDeclaration",e,t)},_setStyleDeclaration:function(e,t,i){var n=this._styleMap[e];e=n.line,t=n.offset+t,this.styles[e][t]=i},_deleteStyleDeclaration:function(e,t){var i=this._styleMap[e];e=i.line,t=i.offset+t,delete this.styles[e][t]},_getLineStyle:function(e){var t=this._styleMap[e];return!!this.styles[t.line]},_setLineStyle:function(e){var t=this._styleMap[e];this.styles[t.line]={}},_wrapText:function(e,t){var i,n=[];for(this.isWrapping=!0,i=0;i<e.length;i++)n=n.concat(this._wrapLine(e[i],i,t));return this.isWrapping=!1,n},_measureWord:function(e,t,i){var n,r=0;i=i||0;for(var o=0,s=e.length;o<s;o++)r+=this._getGraphemeBox(e[o],t,o+i,n,!0).kernedWidth,n=e[o];return r},_wrapLine:function(e,i,n,r){var o=0,s=this.splitByGrapheme,a=[],l=[],c=s?t.util.string.graphemeSplit(e):e.split(this._wordJoiners),u="",h=0,d=s?"":" ",f=0,p=0,m=0,g=!0,v=this._getWidthOfCharSpacing();r=r||0,0===c.length&&c.push([]),n-=r;for(var b=0;b<c.length;b++)u=s?c[b]:t.util.string.graphemeSplit(c[b]),f=this._measureWord(u,i,h),h+=u.length,(o+=p+f-v)>n&&!g?(a.push(l),l=[],o=f,g=!0):o+=v,g||s||l.push(d),l=l.concat(u),p=s?0:this._measureWord([d],i,h),h++,g=!1,f>m&&(m=f);return b&&a.push(l),m+r>this.dynamicMinWidth&&(this.dynamicMinWidth=m-v+r),a},isEndOfWrapping:function(e){return!this._styleMap[e+1]||this._styleMap[e+1].line!==this._styleMap[e].line},missingNewlineOffset:function(e){return this.splitByGrapheme?this.isEndOfWrapping(e)?1:0:1},_splitTextIntoLines:function(e){for(var i=t.Text.prototype._splitTextIntoLines.call(this,e),n=this._wrapText(i.lines,this.width),r=new Array(n.length),o=0;o<n.length;o++)r[o]=n[o].join("");return i.lines=r,i.graphemeLines=n,i},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var e={};for(var t in this._styleMap)this._textLines[t]&&(e[this._styleMap[t].line]=1);for(var t in this.styles)e[t]||delete this.styles[t]},toObject:function(e){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(e))}}),t.Textbox.fromObject=function(e,i){return t.Object._fromObject("Textbox",e,i,"text")}}(t),function(){var e=w.controlsUtils,t=e.scaleSkewCursorStyleHandler,i=e.scaleCursorStyleHandler,n=e.scalingEqually,r=e.scalingYOrSkewingX,o=e.scalingXOrSkewingY,s=e.scaleOrSkewActionName,a=w.Object.prototype.controls;if(a.ml=new w.Control({x:-.5,y:0,cursorStyleHandler:t,actionHandler:o,getActionName:s}),a.mr=new w.Control({x:.5,y:0,cursorStyleHandler:t,actionHandler:o,getActionName:s}),a.mb=new w.Control({x:0,y:.5,cursorStyleHandler:t,actionHandler:r,getActionName:s}),a.mt=new w.Control({x:0,y:-.5,cursorStyleHandler:t,actionHandler:r,getActionName:s}),a.tl=new w.Control({x:-.5,y:-.5,cursorStyleHandler:i,actionHandler:n}),a.tr=new w.Control({x:.5,y:-.5,cursorStyleHandler:i,actionHandler:n}),a.bl=new w.Control({x:-.5,y:.5,cursorStyleHandler:i,actionHandler:n}),a.br=new w.Control({x:.5,y:.5,cursorStyleHandler:i,actionHandler:n}),a.mtr=new w.Control({x:0,y:-.5,actionHandler:e.rotationWithSnapping,cursorStyleHandler:e.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),w.Textbox){var l=w.Textbox.prototype.controls={};l.mtr=a.mtr,l.tr=a.tr,l.br=a.br,l.tl=a.tl,l.bl=a.bl,l.mt=a.mt,l.mb=a.mb,l.mr=new w.Control({x:.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"}),l.ml=new w.Control({x:-.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"})}}()},3053:function(e,t,i){"use strict";var n=i(602);e.exports=function(e,t,i){var r,o;
vendor: 17,666 bytes, line 78
78if(i=i||0,!n(t))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,i);for(o=t.length,r=i;i>=0&&r<o;r+=1)if(t[r]===e)return r;return-1}},8592:function(e,t,i){"use strict";var n=i(602),r=i(6092),o=i(5573);e.exports=function(e,t,i){n(e)?r(e,t,i):o(e,t,i)}},6092:function(e){"use strict";e.exports=function(e,t,i){var n=0,r=e.length;for(i=i||null;n<r&&!1!==t.call(i,e[n],n,e);n+=1);}},5573:function(e){"use strict";e.exports=function(e,t,i){var n;for(n in i=i||null,e)if(e.hasOwnProperty(n)&&!1===t.call(i,e[n],n,e))break}},9052:function(e,t,i){"use strict";var n=i(961),r=i(9886),o=i(2560),s=i(5393),a=i(602),l=i(5183),c=i(8592),u=/\s+/g;function h(){this.events=null,this.contexts=null}h.mixin=function(e){n(e.prototype,h.prototype)},h.prototype._getHandlerItem=function(e,t){var i={handler:e};return t&&(i.context=t),i},h.prototype._safeEvent=function(e){var t,i=this.events;return i||(i=this.events={}),e&&((t=i[e])||(t=[],i[e]=t),i=t),i},h.prototype._safeContext=function(){var e=this.contexts;return e||(e=this.contexts=[]),e},h.prototype._indexOfContext=function(e){for(var t=this._safeContext(),i=0;t[i];){if(e===t[i][0])return i;i+=1}return-1},h.prototype._memorizeContext=function(e){var t,i;r(e)&&(t=this._safeContext(),(i=this._indexOfContext(e))>-1?t[i][1]+=1:t.push([e,1]))},h.prototype._forgetContext=function(e){var t,i;r(e)&&(t=this._safeContext(),(i=this._indexOfContext(e))>-1&&(t[i][1]-=1,t[i][1]<=0&&t.splice(i,1)))},h.prototype._bindEvent=function(e,t,i){var n=this._safeEvent(e);this._memorizeContext(i),n.push(this._getHandlerItem(t,i))},h.prototype.on=function(e,t,i){var n=this;o(e)?(e=e.split(u),c(e,function(e){n._bindEvent(e,t,i)})):s(e)&&(i=t,c(e,function(e,t){n.on(t,e,i)}))},h.prototype.once=function(e,t,i){var n=this;if(s(e))return i=t,void c(e,function(e,t){n.once(t,e,i)});this.on(e,function r(){t.apply(i,arguments),n.off(e,r,i)},i)},h.prototype._spliceMatches=function(e,t){var i,n=0;if(a(e))for(i=e.length;n<i;n+=1)!0===t(e[n])&&(e.splice(n,1),i-=1,n-=1)},h.prototype._matchHandler=function(e){var t=this;return function(i){var n=e===i.handler;return n&&t._forgetContext(i.context),n}},h.prototype._matchContext=function(e){var t=this;return function(i){var n=e===i.context;return n&&t._forgetContext(i.context),n}},h.prototype._matchHandlerAndContext=function(e,t){var i=this;return function(n){var r=e===n.handler,o=t===n.context,s=r&&o;return s&&i._forgetContext(n.context),s}},h.prototype._offByEventName=function(e,t){var i=this,n=l(t),r=i._matchHandler(t);e=e.split(u),c(e,function(e){var t=i._safeEvent(e);n?i._spliceMatches(t,r):(c(t,function(e){i._forgetContext(e.context)}),i.events[e]=[])})},h.prototype._offByHandler=function(e){var t=this,i=this._matchHandler(e);c(this._safeEvent(),function(e){t._spliceMatches(e,i)})},h.prototype._offByObject=function(e,t){var i,n=this;this._indexOfContext(e)<0?c(e,function(e,t){n.off(t,e)}):o(t)?(i=this._matchContext(e),n._spliceMatches(this._safeEvent(t),i)):l(t)?(i=this._matchHandlerAndContext(t,e),c(this._safeEvent(),function(e){n._spliceMatches(e,i)})):(i=this._matchContext(e),c(this._safeEvent(),function(e){n._spliceMatches(e,i)}))},h.prototype.off=function(e,t){o(e)?this._offByEventName(e,t):arguments.length?l(e)?this._offByHandler(e):s(e)&&this._offByObject(e,t):(this.events={},this.contexts=[])},h.prototype.fire=function(e){this.invoke.apply(this,arguments)},h.prototype.invoke=function(e){var t,i,n,r;if(!this.hasListener(e))return!0;for(t=this._safeEvent(e),i=Array.prototype.slice.call(arguments,1),n=0;t[n];){if(!1===(r=t[n]).handler.apply(r.context,i))return!1;n+=1}return!0},h.prototype.hasListener=function(e){return this.getListenerLength(e)>0},h.prototype.getListenerLength=function(e){return this._safeEvent(e).length},e.exports=h},961:function(e){"use strict";e.exports=function(e,t){var i,n,r,o,s=Object.prototype.hasOwnProperty;for(r=1,o=arguments.length;r<o;r+=1)for(n in i=arguments[r])s.call(i,n)&&(e[n]=i[n]);return e}},1610:function(e,t,i){"use strict";var n=i(5695),r=i(3778);e.exports=function(e,t){for(var i=arguments,o=i[0],s=1,a=i.length;s<a;s+=1){if(n(o)||r(o))return;o=o[i[s]]}return o}},4564:function(e,t,i){"use strict";var n=i(5573);e.exports=function(e,t){var i=document.createElement("img"),r="";return n(t,function(e,t){r+="&"+t+"="+e}),r=r.substring(1),i.src=e+"?"+r,i.style.display="none",document.body.appendChild(i),document.body.removeChild(i),i}},4729:function(e,t,i){"use strict";var n=i(5695),r=i(4564);e.exports=function(e,t){var i=location.hostname,o="TOAST UI "+e+" for "+i+": Statistics",s=window.localStorage.getItem(o);(n(window.tui)||!1!==window.tui.usageStatistics)&&(s&&!function(e){return(new Date).getTime()-e>6048e5}(s)||(window.localStorage.setItem(o,(new Date).getTime()),setTimeout(function(){"interactive"!==document.readyState&&"complete"!==document.readyState||r("https://www.google-analytics.com/collect",{v:1,t:"event",tid:t,cid:i,dp:i,dh:e,el:e,ec:"use"})},1e3)))}},602:function(e){"use strict";e.exports=function(e){return e instanceof Array}},9886:function(e,t,i){"use strict";var n=i(5695),r=i(3778);e.exports=function(e){return!n(e)&&!r(e)}},5183:function(e){"use strict";e.exports=function(e){return e instanceof Function}},3778:function(e){"use strict";e.exports=function(e){return null===e}},5393:function(e){"use strict";e.exports=function(e){return e===Object(e)}},2560:function(e){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},5695:function(e){"use strict";e.exports=function(e){return void 0===e}},4426:function(e,t,i){e.exports=i(4486)},9406:function(e,t,i){e.exports=i(4877)},789:function(e,t,i){e.exports=i(7178)},381:function(e,t,i){e.exports=i(5603)},7636:function(e,t,i){e.exports=i(1206)},1899:function(e,t,i){e.exports=i(6174)},899:function(e,t,i){e.exports=i(57)},8005:function(e,t,i){e.exports=i(4741)},6562:function(e,t,i){e.exports=i(8368)},9131:function(e,t,i){e.exports=i(3739)},4383:function(e,t,i){e.exports=i(172)},6065:function(e,t,i){e.exports=i(4963)},1734:function(e,t,i){e.exports=i(7820)},2461:function(e,t,i){e.exports=i(5636)},5214:function(e,t,i){e.exports=i(5059)},6397:function(e,t,i){e.exports=i(3969)},8189:function(e,t,i){e.exports=i(6618)},9146:function(e,t,i){e.exports=i(5279)},4496:function(e,t,i){e.exports=i(9562)},3972:function(e,t,i){e.exports=i(652)},7172:function(e,t,i){e.exports=i(2813)},1845:function(e,t,i){e.exports=i(8664)},662:function(e,t,i){e.exports=i(1457)},711:function(e,t,i){e.exports=i(2937)},6623:function(e,t,i){e.exports=i(9297)},7077:function(e,t,i){e.exports=i(8026)},9856:function(e,t,i){e.exports=i(2044)},4230:function(e,t,i){e.exports=i(2214)},184:function(e,t,i){e.exports=i(9256)},3742:function(e,t,i){e.exports=i(5659)},1801:function(e){var t={rect:1,circle:2,triangle:1},i={rect:{w:"width",h:"height"},circle:{w:"rx",h:"ry"},triangle:{w:"width",h:"height"}};function n(e,t,i){var n=e.x,r=e.y,o=t.x,s=t.y,a=i*Math.PI/180;return{originX:n>(o-n)*Math.cos(a)-(s-r)*Math.sin(a)+n?"right":"left",originY:r>(o-n)*Math.sin(a)+(s-r)*Math.cos(a)+r?"bottom":"top"}}e.exports={setOrigins:function(e){var t=e.getPointByOrigin("left","top"),i=e.getPointByOrigin("right","top"),n=e.getPointByOrigin("right","bottom"),r=e.getPointByOrigin("left","bottom");e.origins={lt:t,rt:i,rb:n,lb:r}},resize:function(e,r,o){(function(e){return"center"===e.originX&&"center"===e.originY})(e)&&(function(e,t){var i=t.getPointByOrigin("center","center"),r=n(i,e,-t.angle),o=r.originX,s=r.originY,a=t.getPointByOrigin(o,s),l=t.left-(i.x-a.x),c=t.top-(i.y-a.y);t.set({originX:o,originY:s,left:l,top:c}),t.setCoords()}(r,e),function(e){var t=e.originX,i=e.originY,n=t.substring(0,1)+i.substring(0,1);e.startPoint=e.origins[n]}(e)),o?function(e){var t=e.type,n=e.scaleX,r=e.scaleY,o=i[t],s=e[o.w]*n,a=e[o.h]*r;if(e.isRegular){var l=Math.max(n,r);s=e[o.w]*l,a=e[o.h]*l}var c={hasControls:!1,hasBorders:!1,scaleX:1,scaleY:1};c[o.w]=s,c[o.h]=a,e.set(c)}(e):function(e,n){var r=n.type,o=n.strokeWidth,s=n.startPoint,a=t[r],l=i[r],c=!("triangle"!==n.type),u={},h=Math.abs(s.x-e.x)/a,d=Math.abs(s.y-e.y)/a;h>o&&(h-=o/a),d>o&&(d-=o/a),n.isRegular&&(h=d=Math.max(h,d),c&&(d=Math.sqrt(3)/2*h)),u[l.w]=h,u[l.h]=d,n.set(u)}(r,e),function(e,t){var i=t.startPoint,r=n(i,e,-t.angle),o=r.originX,s=r.originY;t.setPositionByOrigin(i,o,s),t.setCoords()}(r,e)},adjustOriginToCenter:function(e){var t=e.getPointByOrigin("center","center"),i=e.originX,n=e.originY,r=e.getPointByOrigin(i,n),o=e.left+(t.x-r.x),s=e.top+(t.y-r.y);e.set({hasControls:!0,hasBorders:!0,originX:"center",originY:"center",left:o,top:s}),e.setCoords()}}},2221:function(e,t,i){i(5454),i(9173);var n=i(7545);e.exports=n.Array.from},5078:function(e,t,i){i(8118);var n=i(7545);e.exports=n.Array.isArray},6135:function(e,t,i){i(9106);var n=i(5607);e.exports=n("Array").concat},9510:function(e,t,i){i(1710);var n=i(5607);e.exports=n("Array").fill},3971:function(e,t,i){i(3436);var n=i(5607);e.exports=n("Array").filter},98:function(e,t,i){i(9823);var n=i(5607);e.exports=n("Array").forEach},2089:function(e,t,i){i(2276);var n=i(5607);e.exports=n("Array").indexOf},6209:function(e,t,i){i(3838);var n=i(5607);e.exports=n("Array").map},2671:function(e,t,i){i(5818);var n=i(5607);e.exports=n("Array").slice},1375:function(e,t,i){i(2178);var n=i(5607);e.exports=n("Array").splice},3528:function(e,t,i){i(665);var n=i(5607);e.exports=n("Function").bind},5739:function(e,t,i){i(8939),i(5454);var n=i(8703);e.exports=n},278:function(e,t,i){var n=i(3528),r=Function.prototype;e.exports=function(e){var t=e.bind;return e===r||e instanceof Function&&t===r.bind?n:t}},1484:function(e,t,i){var n=i(6135),r=Array.prototype;e.exports=function(e){var t=e.concat;return e===r||e instanceof Array&&t===r.concat?n:t}},7731:function(e,t,i){var n=i(9510),r=Array.prototype;e.exports=function(e){var t=e.fill;return e===r||e instanceof Array&&t===r.fill?n:t}},3669:function(e,t,i){var n=i(3971),r=Array.prototype;e.exports=function(e){var t=e.filter;return e===r||e instanceof Array&&t===r.filter?n:t}},2604:function(e,t,i){var n=i(2089),r=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===r||e instanceof Array&&t===r.indexOf?n:t}},263:function(e,t,i){var n=i(6209),r=Array.prototype;e.exports=function(e){var t=e.map;return e===r||e instanceof Array&&t===r.map?n:t}},7663:function(e,t,i){var n=i(2671),r=Array.prototype;e.exports=function(e){var t=e.slice;return e===r||e instanceof Array&&t===r.slice?n:t}},5063:function(e,t,i){var n=i(1375),r=Array.prototype;e.exports=function(e){var t=e.splice;return e===r||e instanceof Array&&t===r.splice?n:t}},6813:function(e,t,i){var n=i(3842),r=String.prototype;e.exports=function(e){var t=e.trim;return"string"==typeof e||e===r||e instanceof String&&t===r.trim?n:t}},6285:function(e,t,i){i(2666);var n=i(7545);e.exports=n.Number.parseInt},3213:function(e,t,i){i(3113);var n=i(7545).Object;e.exports=function(e,t){return n.create(e,t)}},3512:function(e,t,i){i(297);var n=i(7545).Object,r=e.exports=function(e,t,i){return n.defineProperty(e,t,i)};n.defineProperty.sham&&(r.sham=!0)},8168:function(e,t,i){i(9234);var n=i(7545);e.exports=n.Object.getPrototypeOf},8651:function(e,t,i){i(2647);var n=i(7545);e.exports=n.Object.keys},3083:function(e,t,i){i(3222);var n=i(7545);e.exports=n.Object.setPrototypeOf},2987:function(e,t,i){i(4859);var n=i(7545);e.exports=n.parseFloat},2239:function(e,t,i){i(5706);var n=i(7545);e.exports=n.parseInt},3154:function(e,t,i){i(4242),i(8939),i(6663),i(9021),i(7884),i(8885),i(1868),i(5454);var n=i(7545);e.exports=n.Promise},6577:function(e,t,i){i(5397);var n=i(7545);e.exports=n.Reflect.construct},3842:function(e,t,i){i(957);var n=i(5607);e.exports=n("String").trim},5008:function(e,t,i){i(9106),i(6663),i(6187),i(9781),i(492),i(6681),i(9594),i(3665),i(9017),i(1250),i(9786),i(503),i(6565),i(9322),i(3610),i(6886),i(3514),i(8671),i(8556),i(1367);var n=i(7545);e.exports=n.Symbol},994:function(e,t,i){i(8939),i(6663),i(5454),i(3665);var n=i(9207);e.exports=n.f("iterator")},2813:function(e,t,i){var n=i(3822);e.exports=n},8664:function(e,t,i){var n=i(1434);e.exports=n},1457:function(e,t,i){var n=i(7710);e.exports=n},2937:function(e,t,i){var n=i(4741);e.exports=n},9297:function(e,t,i){var n=i(4963);e.exports=n},8026:function(e,t,i){var n=i(7820);e.exports=n},2044:function(e,t,i){var n=i(8980);e.exports=n},2214:function(e,t,i){var n=i(6672);e.exports=n},9256:function(e,t,i){var n=i(2285);i(177),i(9031),i(6658),i(1875),i(8658),i(4592),i(6680),e.exports=n},5659:function(e,t,i){var n=i(8535);e.exports=n},6235:function(e,t,i){var n=i(6447),r=i(9288);e.exports=function(e){if(n(e))return e;throw TypeError(r(e)+" is not a function")}},1404:function(e,t,i){var n=i(2091),r=i(9288);e.exports=function(e){if(n(e))return e;throw TypeError(r(e)+" is not a constructor")}},7757:function(e,t,i){var n=i(6447);e.exports=function(e){if("object"==typeof e||n(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},7423:function(e){e.exports=function(){}},6961:function(e){e.exports=function(e,t,i){if(e instanceof t)return e;throw TypeError("Incorrect "+(i?i+" ":"")+"invocation")}},1138:function(e,t,i){var n=i(5744);e.exports=function(e){if(n(e))return e;throw TypeError(String(e)+" is not an object")}},2724:function(e,t,i){"use strict";var n=i(1795),r=i(7739),o=i(4104);e.exports=function(e){for(var t=n(this),i=o(t),s=arguments.length,a=r(s>1?arguments[1]:void 0,i),l=s>2?arguments[2]:void 0,c=void 0===l?i:r(l,i);c>a;)t[a++]=e;return t}},7397:function(e,t,i){"use strict";var n=i(454).forEach,r=i(424)("forEach");e.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},841:function(e,t,i){"use strict";var n=i(8043),r=i(1795),o=i(1635),s=i(6109),a=i(2091),l=i(4104),c=i(9361),u=i(1669),h=i(8703);e.exports=function(e){var t=r(e),i=a(this),d=arguments.length,f=d>1?arguments[1]:void 0,p=void 0!==f;p&&(f=n(f,d>2?arguments[2]:void 0,2));var m,g,v,b,y,w,_=h(t),k=0;if(!_||this==Array&&s(_))for(m=l(t),g=i?new this(m):Array(m);m>k;k++)w=p?f(t[k],k):t[k],c(g,k,w);else for(y=(b=u(t,_)).next,g=i?new this:[];!(v=y.call(b)).done;k++)w=p?o(b,f,[v.value,k],!0):v.value,c(g,k,w);return g.length=k,g}},8180:function(e,t,i){var n=i(101),r=i(7739),o=i(4104),s=function(e){return function(t,i,s){var a,l=n(t),c=o(l),u=r(s,c);if(e&&i!=i){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},454:function(e,t,i){var n=i(8043),r=i(2202),o=i(1795),s=i(4104),a=i(1321),l=[].push,c=function(e){var t=1==e,i=2==e,c=3==e,u=4==e,h=6==e,d=7==e,f=5==e||h;return function(p,m,g,v){for(var b,y,w=o(p),_=r(w),k=n(m,g,3),x=s(_),C=0,S=v||a,E=t?S(p,x):i||d?S(p,0):void 0;x>C;C++)if((f||C in _)&&(y=k(b=_[C],C,w),e))if(t)E[C]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return C;case 2:l.call(E,b)}else switch(e){case 4:return!1;case 7:l.call(E,b)}return h?-1:c||u?u:E}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},242:function(e,t,i){var n=i(6192),r=i(8182),o=i(4218),s=r("species");e.exports=function(e){return o>=51||!n(function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},424:function(e,t,i){"use strict";var n=i(6192);e.exports=function(e,t){var i=[][e];return!!i&&n(function(){i.call(null,t||function(){throw 1},1)})}},3712:function(e,t,i){var n=i(4770),r=i(2091),o=i(5744),s=i(8182)("species");e.exports=function(e){var t;return n(e)&&(t=e.constructor,(r(t)&&(t===Array||n(t.prototype))||o(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?Array:t}},1321:function(e,t,i){var n=i(3712);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},1635:function(e,t,i){var n=i(1138),r=i(6639);e.exports=function(e,t,i,o){try{return o?t(n(i)[0],i[1]):t(i)}catch(t){r(e,"throw",t)}}},9770:function(e,t,i){var n=i(8182)("iterator"),r=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){r=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var i=!1;try{var o={};o[n]=function(){return{next:function(){return{done:i=!0}}}},e(o)}catch(e){}return i}},9272:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},4696:function(e,t,i){var n=i(3471),r=i(6447),o=i(9272),s=i(8182)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=n?o:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),s))?i:a?o(t):"Object"==(n=o(t))&&r(t.callee)?"Arguments":n}},4635:function(e,t,i){var n=i(6192);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},5148:function(e,t,i){"use strict";var n=i(4413).IteratorPrototype,r=i(2853),o=i(774),s=i(1284),a=i(7771),l=function(){return this};e.exports=function(e,t,i){var c=t+" Iterator";return e.prototype=r(n,{next:o(1,i)}),s(e,c,!1,!0),a[c]=l,e}},8711:function(e,t,i){var n=i(69),r=i(2760),o=i(774);e.exports=n?function(e,t,i){return r.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},774:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},9361:function(e,t,i){"use strict";var n=i(77),r=i(2760),o=i(774);e.exports=function(e,t,i){var s=n(t);s in e?r.f(e,s,o(0,i)):e[s]=i}},7218:function(e,t,i){"use strict";var n=i(3085),r=i(5546),o=i(2282),s=i(6447),a=i(5148),l=i(9341),c=i(4469),u=i(1284),h=i(8711),d=i(9482),f=i(8182),p=i(7771),m=i(4413),g=o.PROPER,v=o.CONFIGURABLE,b=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,w=f("iterator"),_="keys",k="values",x="entr
78ies",C=function(){return this};e.exports=function(e,t,i,o,f,m,S){a(i,t,o);var E,T,A,I=function(e){if(e===f&&L)return L;if(!y&&e in D)return D[e];switch(e){case _:case k:case x:return function(){return new i(this,e)}}return function(){return new i(this)}},M=t+" Iterator",P=!1,D=e.prototype,O=D[w]||D["@@iterator"]||f&&D[f],L=!y&&O||I(f),R="Array"==t&&D.entries||O;if(R&&(E=l(R.call(new e)))!==Object.prototype&&E.next&&(r||l(E)===b||(c?c(E,b):s(E[w])||d(E,w,C)),u(E,M,!0,!0),r&&(p[M]=C)),g&&f==k&&O&&O.name!==k&&(!r&&v?h(D,"name",k):(P=!0,L=function(){return O.call(this)})),f)if(T={values:I(k),keys:m?L:I(_),entries:I(x)},S)for(A in T)(y||P||!(A in D))&&d(D,A,T[A]);else n({target:t,proto:!0,forced:y||P},T);return r&&!S||D[w]===L||d(D,w,L,{name:f}),p[t]=L,T}},1488:function(e,t,i){var n=i(7545),r=i(4500),o=i(9207),s=i(2760).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||s(t,e,{value:o.f(e)})}},69:function(e,t,i){var n=i(6192);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},7449:function(e,t,i){var n=i(8576),r=i(5744),o=n.document,s=r(o)&&r(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},7365:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},2957:function(e){e.exports="object"==typeof window},9347:function(e,t,i){var n=i(8989),r=i(8576);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==r.Pebble},9536:function(e,t,i){var n=i(8989);
vendor: 10,799 bytes, line 78
78e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},224:function(e,t,i){var n=i(9272),r=i(8576);e.exports="process"==n(r.process)},5914:function(e,t,i){var n=i(8989);e.exports=/web0s(?!.*chrome)/i.test(n)},8989:function(e,t,i){var n=i(150);e.exports=n("navigator","userAgent")||""},4218:function(e,t,i){var n,r,o=i(8576),s=i(8989),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u?r=(n=u.split("."))[0]<4?1:n[0]+n[1]:s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(r=n[1]),e.exports=r&&+r},5607:function(e,t,i){var n=i(7545);e.exports=function(e){return n[e+"Prototype"]}},2952:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3085:function(e,t,i){"use strict";var n=i(8576),r=i(6447),o=i(5141).f,s=i(9245),a=i(7545),l=i(8043),c=i(8711),u=i(4500),h=function(e){var t=function(t,i,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,i)}return new e(t,i,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var i,d,f,p,m,g,v,b,y=e.target,w=e.global,_=e.stat,k=e.proto,x=w?n:_?n[y]:(n[y]||{}).prototype,C=w?a:a[y]||c(a,y,{})[y],S=C.prototype;for(f in t)i=!s(w?f:y+(_?".":"#")+f,e.forced)&&x&&u(x,f),m=C[f],i&&(g=e.noTargetGet?(b=o(x,f))&&b.value:x[f]),p=i&&g?g:t[f],i&&typeof m==typeof p||(v=e.bind&&i?l(p,n):e.wrap&&i?h(p):k&&r(p)?l(Function.call,p):p,(e.sham||p&&p.sham||m&&m.sham)&&c(v,"sham",!0),c(C,f,v),k&&(u(a,d=y+"Prototype")||c(a,d,{}),c(a[d],f,p),e.real&&S&&!S[f]&&c(S,f,p)))}},6192:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},8043:function(e,t,i){var n=i(6235);e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,r){return e.call(t,i,n,r)}}return function(){return e.apply(t,arguments)}}},6782:function(e,t,i){"use strict";var n=i(6235),r=i(5744),o=[].slice,s={};e.exports=Function.bind||function(e){var t=n(this),i=o.call(arguments,1),a=function(){var n=i.concat(o.call(arguments));return this instanceof a?function(e,t,i){if(!(t in s)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";s[t]=Function("C,a","return new C("+n.join(",")+")")}return s[t](e,i)}(t,n.length,n):t.apply(e,n)};return r(t.prototype)&&(a.prototype=t.prototype),a}},2282:function(e,t,i){var n=i(69),r=i(4500),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=r(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},150:function(e,t,i){var n=i(7545),r=i(8576),o=i(6447),s=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(n[e])||s(r[e]):n[e]&&n[e][t]||r[e]&&r[e][t]}},8703:function(e,t,i){var n=i(4696),r=i(5037),o=i(7771),s=i(8182)("iterator");e.exports=function(e){if(null!=e)return r(e,s)||r(e,"@@iterator")||o[n(e)]}},1669:function(e,t,i){var n=i(6235),r=i(1138),o=i(8703);e.exports=function(e,t){var i=arguments.length<2?o(e):t;if(n(i))return r(i.call(e));throw TypeError(String(e)+" is not iterable")}},5037:function(e,t,i){var n=i(6235);e.exports=function(e,t){var i=e[t];return null==i?void 0:n(i)}},8576:function(e,t,i){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||function(){return this}()||Function("return this")()},4500:function(e,t,i){var n=i(1795),r={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return r.call(n(e),t)}},4535:function(e){e.exports={}},3681:function(e,t,i){var n=i(8576);e.exports=function(e,t){var i=n.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}},7403:function(e,t,i){var n=i(150);e.exports=n("document","documentElement")},188:function(e,t,i){var n=i(69),r=i(6192),o=i(7449);e.exports=!n&&!r(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},2202:function(e,t,i){var n=i(6192),r=i(9272),o="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},9516:function(e,t,i){var n=i(6447),r=i(6434),o=Function.toString;n(r.inspectSource)||(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},273:function(e,t,i){var n=i(5744),r=i(8711);e.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",e.cause)}},3326:function(e,t,i){var n,r,o,s=i(8921),a=i(8576),l=i(5744),c=i(8711),u=i(4500),h=i(6434),d=i(9766),f=i(4535),p="Object already initialized",m=a.WeakMap;if(s||h.state){var g=h.state||(h.state=new m),v=g.get,b=g.has,y=g.set;n=function(e,t){if(b.call(g,e))throw new TypeError(p);return t.facade=e,y.call(g,e,t),t},r=function(e){return v.call(g,e)||{}},o=function(e){return b.call(g,e)}}else{var w=d("state");f[w]=!0,n=function(e,t){if(u(e,w))throw new TypeError(p);return t.facade=e,c(e,w,t),t},r=function(e){return u(e,w)?e[w]:{}},o=function(e){return u(e,w)}}e.exports={set:n,get:r,has:o,enforce:function(e){return o(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!l(t)||(i=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}}},6109:function(e,t,i){var n=i(8182),r=i(7771),o=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||s[o]===e)}},4770:function(e,t,i){var n=i(9272);e.exports=Array.isArray||function(e){return"Array"==n(e)}},6447:function(e){e.exports=function(e){return"function"==typeof e}},2091:function(e,t,i){var n=i(6192),r=i(6447),o=i(4696),s=i(150),a=i(9516),l=[],c=s("Reflect","construct"),u=/^\s*(?:class|function)\b/,h=u.exec,d=!u.exec(function(){}),f=function(e){if(!r(e))return!1;try{return c(Object,l,e),!0}catch(e){return!1}};e.exports=!c||n(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?function(e){if(!r(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!h.call(u,a(e))}:f},9245:function(e,t,i){var n=i(6192),r=i(6447),o=/#|\.prototype\./,s=function(e,t){var i=l[a(e)];return i==u||i!=c&&(r(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},5744:function(e,t,i){var n=i(6447);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},5546:function(e){e.exports=!0},3236:function(e,t,i){var n=i(6447),r=i(150),o=i(615);e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return n(t)&&Object(e)instanceof t}},3442:function(e,t,i){var n=i(1138),r=i(6109),o=i(4104),s=i(8043),a=i(1669),l=i(8703),c=i(6639),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,i){var h,d,f,p,m,g,v,b=i&&i.that,y=!(!i||!i.AS_ENTRIES),w=!(!i||!i.IS_ITERATOR),_=!(!i||!i.INTERRUPTED),k=s(t,b,1+y+_),x=function(e){return h&&c(h,"normal",e),new u(!0,e)},C=function(e){return y?(n(e),_?k(e[0],e[1],x):k(e[0],e[1])):_?k(e,x):k(e)};if(w)h=e;else{if(!(d=l(e)))throw TypeError(String(e)+" is not iterable");if(r(d)){for(f=0,p=o(e);p>f;f++)if((m=C(e[f]))&&m instanceof u)return m;return new u(!1)}h=a(e,d)}for(g=h.next;!(v=g.call(h)).done;){try{m=C(v.value)}catch(e){c(h,"throw",e)}if("object"==typeof m&&m&&m instanceof u)return m}return new u(!1)}},6639:function(e,t,i){var n=i(1138),r=i(5037);e.exports=function(e,t,i){var o,s;n(e);try{if(!(o=r(e,"return"))){if("throw"===t)throw i;return i}o=o.call(e)}catch(e){s=!0,o=e}if("throw"===t)throw i;if(s)throw o;return n(o),i}},4413:function(e,t,i){"use strict";var n,r,o,s=i(6192),a=i(6447),l=i(2853),c=i(9341),u=i(9482),h=i(8182),d=i(5546),f=h("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(r=c(c(o)))!==Object.prototype&&(n=r):p=!0),null==n||s(function(){var e={};return n[f].call(e)!==e})?n={}:d&&(n=l(n)),a(n[f])||u(n,f,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},7771:function(e){e.exports={}},4104:function(e,t,i){var n=i(8445);e.exports=function(e){return n(e.length)}},2950:function(e,t,i){var n,r,o,s,a,l,c,u,h=i(8576),d=i(5141).f,f=i(7160).set,p=i(9536),m=i(9347),g=i(5914),v=i(224),b=h.MutationObserver||h.WebKitMutationObserver,y=h.document,w=h.process,_=h.Promise,k=d(h,"queueMicrotask"),x=k&&k.value;x||(n=function(){var e,t;for(v&&(e=w.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?s():o=void 0,e}}o=void 0,e&&e.enter()},p||v||g||!b||!y?!m&&_&&_.resolve?((c=_.resolve(void 0)).constructor=_,u=c.then,s=function(){u.call(c,n)}):s=v?function(){w.nextTick(n)}:function(){f.call(h,n)}:(a=!0,l=y.createTextNode(""),new b(n).observe(l,{characterData:!0}),s=function(){l.data=a=!a})),e.exports=x||function(e){var t={fn:e,next:void 0};o&&(o.next=t),r||(r=t,s()),o=t}},4471:function(e,t,i){var n=i(8576);e.exports=n.Promise},3045:function(e,t,i){var n=i(4218),r=i(6192);e.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4551:function(e,t,i){var n=i(6192),r=i(8182),o=i(5546),s=r("iterator");e.exports=!n(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,i="";return e.pathname="c%20d",t.forEach(function(e,n){t.delete("b"),i+=n+e}),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://ÑеÑÑ").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host})},8921:function(e,t,i){var n=i(8576),r=i(6447),o=i(9516),s=n.WeakMap;e.exports=r(s)&&/native code/.test(o(s))},9438:function(e,t,i){"use strict";var n=i(6235),r=function(e){var t,i;this.promise=new e(function(e,n){if(void 0!==t||void 0!==i)throw TypeError("Bad Promise constructor");t=e,i=n}),this.resolve=n(t),this.reject=n(i)};e.exports.f=function(e){return new r(e)}},15:function(e,t,i){var n=i(8576),r=i(6192),o=i(4845),s=i(4277).trim,a=i(1450),l=n.parseFloat,c=n.Symbol,u=c&&c.iterator,h=1/l(a+"-0")!=-1/0||u&&!r(function(){l(Object(u))});e.exports=h?function(e){var t=s(o(e)),i=l(t);return 0===i&&"-"==t.charAt(0)?-0:i}:l},2558:function(e,t,i){var n=i(8576),r=i(6192),o=i(4845),s=i(4277).trim,a=i(1450),l=n.parseInt,c=n.Symbol,u=c&&c.iterator,h=/^[+-]?0[Xx]/,d=8!==l(a+"08")||22!==l(a+"0x16")||u&&!r(function(){l(Object(u))});e.exports=d?function(e,t){var i=s(o(e));return l(i,t>>>0||(h.test(i)?16:10))}:l},2503:function(e,t,i){"use strict";var n=i(69),r=i(6192),o=i(7653),s=i(4750),a=i(6007),l=i(1795),c=i(2202),u=Object.assign,h=Object.defineProperty;
vendor: 3,236 bytes, line 78
78e.exports=!u||r(function(){if(n&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[i]||o(u({},t)).join("")!=r})?function(e,t){for(var i=l(e),r=arguments.length,u=1,h=s.f,d=a.f;r>u;)for(var f,p=c(arguments[u++]),m=h?o(p).concat(h(p)):o(p),g=m.length,v=0;g>v;)f=m[v++],n&&!d.call(p,f)||(i[f]=p[f]);return i}:u},2853:function(e,t,i){var n,r=i(1138),o=i(1187),s=i(2952),a=i(4535),l=i(7403),c=i(7449),u=i(9766),h="prototype",d="script",f=u("IE_PROTO"),p=function(){},m=function(e){return"<"+d+">"+e+"</"+d+">"},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,i;v="undefined"!=typeof document?document.domain&&n?g(n):(t=c("iframe"),i="java"+d+":",t.style.display="none",l.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):g(n);for(var r=s.length;r--;)delete v[h][s[r]];return v()};a[f]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(p[h]=r(e),i=new p,p[h]=null,i[f]=e):i=v(),void 0===t?i:o(i,t)}},1187:function(e,t,i){var n=i(69),r=i(2760),o=i(1138),s=i(7653);e.exports=n?Object.defineProperties:function(e,t){o(e);for(var i,n=s(t),a=n.length,l=0;a>l;)r.f(e,i=n[l++],t[i]);return e}},2760:function(e,t,i){var n=i(69),r=i(188),o=i(1138),s=i(77),a=Object.defineProperty;t.f=n?a:function(e,t,i){if(o(e),t=s(t),o(i),r)try{return a(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},5141:function(e,t,i){var n=i(69),r=i(6007),o=i(774),s=i(101),a=i(77),l=i(4500),c=i(188),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=s(e),t=a(t),c)try{return u(e,t)}catch(e){}if(l(e,t))return o(!r.f.call(e,t),e[t])}},4052:function(e,t,i){var n=i(101),r=i(2092).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?function(e){try{return r(e)}catch(e){return s.slice()}}(e):r(n(e))}},2092:function(e,t,i){var n=i(7934),r=i(2952).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},4750:function(e,t){t.f=Object.getOwnPropertySymbols},9341:function(e,t,i){var n=i(4500),r=i(6447),o=i(1795),s=i(9766),a=i(4635),l=s("IE_PROTO"),c=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){var t=o(e);if(n(t,l))return t[l];var i=t.constructor;return r(i)&&t instanceof i?i.prototype:t instanceof Object?c:null}},7934:function(e,t,i){var n=i(4500),r=i(101),o=i(8180).indexOf,s=i(4535);e.exports=function(e,t){var i,a=r(e),l=0,c=[];for(i in a)!n(s,i)&&n(a,i)&&c.push(i);for(;t.length>l;)n(a,i=t[l++])&&(~o(c,i)||c.push(i));return c}},7653:function(e,t,i){var n=i(7934),r=i(2952);e.exports=Object.keys||function(e){return n(e,r)}},6007:function(e,t){"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!i.call({1:2},1);t.f=r?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},4469:function(e,t,i){var n=i(1138),r=i(7757);
vendor: 10,636 bytes, line 78
78e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),t=i instanceof Array}catch(e){}return function(i,o){return n(i),r(o),t?e.call(i,o):i.__proto__=o,i}}():void 0)},158:function(e,t,i){"use strict";var n=i(3471),r=i(4696);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},380:function(e,t,i){var n=i(6447),r=i(5744);e.exports=function(e,t){var i,o;if("string"===t&&n(i=e.toString)&&!r(o=i.call(e)))return o;if(n(i=e.valueOf)&&!r(o=i.call(e)))return o;if("string"!==t&&n(i=e.toString)&&!r(o=i.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},7545:function(e){e.exports={}},892:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9126:function(e,t,i){var n=i(1138),r=i(5744),o=i(9438);e.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var i=o.f(e);return(0,i.resolve)(t),i.promise}},533:function(e,t,i){var n=i(9482);e.exports=function(e,t,i){for(var r in t)i&&i.unsafe&&e[r]?e[r]=t[r]:n(e,r,t[r],i);return e}},9482:function(e,t,i){var n=i(8711);e.exports=function(e,t,i,r){r&&r.enumerable?e[t]=i:n(e,t,i)}},3209:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},7613:function(e,t,i){var n=i(8576);e.exports=function(e,t){try{Object.defineProperty(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},3656:function(e,t,i){"use strict";var n=i(150),r=i(2760),o=i(8182),s=i(69),a=o("species");e.exports=function(e){var t=n(e),i=r.f;s&&t&&!t[a]&&i(t,a,{configurable:!0,get:function(){return this}})}},1284:function(e,t,i){var n=i(3471),r=i(2760).f,o=i(8711),s=i(4500),a=i(158),l=i(8182)("toStringTag");e.exports=function(e,t,i,c){if(e){var u=i?e:e.prototype;s(u,l)||r(u,l,{configurable:!0,value:t}),c&&!n&&o(u,"toString",a)}}},9766:function(e,t,i){var n=i(8717),r=i(2759),o=n("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},6434:function(e,t,i){var n=i(8576),r=i(7613),o="__core-js_shared__",s=n[o]||r(o,{});e.exports=s},8717:function(e,t,i){var n=i(5546),r=i(6434);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.18.2",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},4743:function(e,t,i){var n=i(1138),r=i(1404),o=i(8182)("species");e.exports=function(e,t){var i,s=n(e).constructor;return void 0===s||null==(i=n(s)[o])?t:r(i)}},863:function(e,t,i){var n=i(1941),r=i(4845),o=i(3209),s=function(e){return function(t,i){var s,a,l=r(o(t)),c=n(i),u=l.length;return c<0||c>=u?e?"":void 0:(s=l.charCodeAt(c))<55296||s>56319||c+1===u||(a=l.charCodeAt(c+1))<56320||a>57343?e?l.charAt(c):s:e?l.slice(c,c+2):a-56320+(s-55296<<10)+65536}};e.exports={codeAt:s(!1),charAt:s(!0)}},7977:function(e){"use strict";var t=2147483647,i=/[^\0-\u007E]/,n=/[.\u3002\uFF0E\uFF61]/g,r="Overflow: input needs wider integers to process",o=Math.floor,s=String.fromCharCode,a=function(e){return e+22+75*(e<26)},l=function(e,t,i){var n=0;for(e=i?o(e/700):e>>1,e+=o(e/t);e>455;n+=36)e=o(e/35);return o(n+36*e/(e+38))},c=function(e){var i=[];e=function(e){for(var t=[],i=0,n=e.length;i<n;){var r=e.charCodeAt(i++);if(r>=55296&&r<=56319&&i<n){var o=e.charCodeAt(i++);56320==(64512&o)?t.push(((1023&r)<<10)+(1023&o)+65536):(t.push(r),i--)}else t.push(r)}return t}(e);var n,c,u=e.length,h=128,d=0,f=72;for(n=0;n<e.length;n++)(c=e[n])<128&&i.push(s(c));var p=i.length,m=p;for(p&&i.push("-");m<u;){var g=t;for(n=0;n<e.length;n++)(c=e[n])>=h&&c<g&&(g=c);var v=m+1;if(g-h>o((t-d)/v))throw RangeError(r);for(d+=(g-h)*v,h=g,n=0;n<e.length;n++){if((c=e[n])<h&&++d>t)throw RangeError(r);if(c==h){for(var b=d,y=36;;y+=36){var w=y<=f?1:y>=f+26?26:y-f;if(b<w)break;var _=b-w,k=36-w;i.push(s(a(w+_%k))),b=o(_/k)}i.push(s(a(b))),f=l(d,v,m==p),d=0,++m}}++d,++h}return i.join("")};e.exports=function(e){var t,r,o=[],s=e.toLowerCase().replace(n,".").split(".");for(t=0;t<s.length;t++)r=s[t],o.push(i.test(r)?"xn--"+c(r):r);return o.join(".")}},6815:function(e,t,i){var n=i(2282).PROPER,r=i(6192),o=i(1450);e.exports=function(e){return r(function(){return!!o[e]()||"âÂ
á "!=="âÂ
á "[e]()||n&&o[e].name!==e})}},4277:function(e,t,i){var n=i(3209),r=i(4845),o="["+i(1450)+"]",s=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),l=function(e){return function(t){var i=r(n(t));return 1&e&&(i=i.replace(s,"")),2&e&&(i=i.replace(a,"")),i}};e.exports={start:l(1),end:l(2),trim:l(3)}},7160:function(e,t,i){var n,r,o,s,a=i(8576),l=i(6447),c=i(6192),u=i(8043),h=i(7403),d=i(7449),f=i(9536),p=i(224),m=a.setImmediate,g=a.clearImmediate,v=a.process,b=a.MessageChannel,y=a.Dispatch,w=0,_={},k="onreadystatechange";try{n=a.location}catch(e){}var x=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},C=function(e){return function(){x(e)}},S=function(e){x(e.data)},E=function(e){a.postMessage(String(e),n.protocol+"//"+n.host)};m&&g||(m=function(e){for(var t=[],i=arguments.length,n=1;i>n;)t.push(arguments[n++]);return _[++w]=function(){(l(e)?e:Function(e)).apply(void 0,t)},r(w),w},g=function(e){delete _[e]},p?r=function(e){v.nextTick(C(e))}:y&&y.now?r=function(e){y.now(C(e))}:b&&!f?(s=(o=new b).port2,o.port1.onmessage=S,r=u(s.postMessage,s,1)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!c(E)?(r=E,a.addEventListener("message",S,!1)):r=k in d("script")?function(e){h.appendChild(d("script"))[k]=function(){h.removeChild(this),x(e)}}:function(e){setTimeout(C(e),0)}),e.exports={set:m,clear:g}},7739:function(e,t,i){var n=i(1941),r=Math.max,o=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):o(i,t)}},101:function(e,t,i){var n=i(2202),r=i(3209);e.exports=function(e){return n(r(e))}},1941:function(e){var t=Math.ceil,i=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?i:t)(n)}},8445:function(e,t,i){var n=i(1941),r=Math.min;e.exports=function(e){return e>0?r(n(e),9007199254740991):0}},1795:function(e,t,i){var n=i(3209);e.exports=function(e){return Object(n(e))}},7888:function(e,t,i){var n=i(5744),r=i(3236),o=i(5037),s=i(380),a=i(8182)("toPrimitive");e.exports=function(e,t){if(!n(e)||r(e))return e;var i,l=o(e,a);if(l){if(void 0===t&&(t="default"),i=l.call(e,t),!n(i)||r(i))return i;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},77:function(e,t,i){var n=i(7888),r=i(3236);e.exports=function(e){var t=n(e,"string");return r(t)?t:String(t)}},3471:function(e,t,i){var n={};n[i(8182)("toStringTag")]="z",e.exports="[object z]"===String(n)},4845:function(e,t,i){var n=i(4696);e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},9288:function(e){e.exports=function(e){try{return String(e)}catch(e){return"Object"}}},2759:function(e){var t=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+i).toString(36)}},615:function(e,t,i){var n=i(3045);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9207:function(e,t,i){var n=i(8182);t.f=n},8182:function(e,t,i){var n=i(8576),r=i(8717),o=i(4500),s=i(2759),a=i(3045),l=i(615),c=r("wks"),u=n.Symbol,h=l?u:u&&u.withoutSetter||s;e.exports=function(e){return o(c,e)&&(a||"string"==typeof c[e])||(a&&o(u,e)?c[e]=u[e]:c[e]=h("Symbol."+e)),c[e]}},1450:function(e){e.exports="\t\n\v\f\r  áââââââ
ââââââ¯âã\u2028\u2029\ufeff"},4242:function(e,t,i){"use strict";var n=i(3085),r=i(9341),o=i(4469),s=i(2853),a=i(8711),l=i(774),c=i(273),u=i(3442),h=i(4845),d=function(e,t){var i=this,n=arguments.length>2?arguments[2]:void 0;if(!(i instanceof d))return new d(e,t,n);o&&(i=o(new Error(void 0),r(i))),void 0!==t&&a(i,"message",h(t)),c(i,n);var s=[];return u(e,s.push,{that:s}),a(i,"errors",s),i};d.prototype=s(Error.prototype,{constructor:l(5,d),message:l(5,""),name:l(5,"AggregateError")}),n({global:!0},{AggregateError:d})},9106:function(e,t,i){"use strict";var n=i(3085),r=i(6192),o=i(4770),s=i(5744),a=i(1795),l=i(4104),c=i(9361),u=i(1321),h=i(242),d=i(8182),f=i(4218),p=d("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",v=f>=51||!r(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),b=h("concat"),y=function(e){if(!s(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,forced:!v||!b},{concat:function(e){var t,i,n,r,o,s=a(this),h=u(s,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(y(o=-1===t?s:arguments[t])){if(d+(r=l(o))>m)throw TypeError(g);for(i=0;i<r;i++,d++)i in o&&c(h,d,o[i])}else{if(d>=m)throw TypeError(g);c(h,d++,o)}return h.length=d,h}})},1710:function(e,t,i){var n=i(3085),r=i(2724),o=i(7423);n({target:"Array",proto:!0},{fill:r}),o("fill")},3436:function(e,t,i){"use strict";var n=i(3085),r=i(454).filter;n({target:"Array",proto:!0,forced:!i(242)("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},9823:function(e,t,i){"use strict";var n=i(3085),r=i(7397);n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},9173:function(e,t,i){var n=i(3085),r=i(841);n({target:"Array",stat:!0,forced:!i(9770)(function(e){Array.from(e)})},{from:r})},2276:function(e,t,i){"use strict";var n=i(3085),r=i(8180).indexOf,o=i(424),s=[].indexOf,a=!!s&&1/[1].indexOf(1,-0)<0,l=o("indexOf");n({target:"Array",proto:!0,forced:a||!l},{indexOf:function(e){return a?s.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:void 0)}})},8118:function(e,t,i){i(3085)({target:"Array",stat:!0},{isArray:i(4770)})},8939:function(e,t,i){"use strict";var n=i(101),r=i(7423),o=i(7771),s=i(3326),a=i(7218),l="Array Iterator",c=s.set,u=s.getterFor(l);e.exports=a(Array,"Array",function(e,t){c(this,{type:l,target:n(e),index:0,kind:t})},function(){var e=u(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},3838:function(e,t,i){"use strict";var n=i(3085),r=i(454).map;n({target:"Array",proto:!0,forced:!i(242)("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},5818:function(e,t,i){"use strict";var n=i(3085),r=i(4770),o=i(2091),s=i(5744),a=i(7739),l=i(4104),c=i(101),u=i(9361),h=i(8182),d=i(242)("slice"),f=h("species"),p=[].slice,m=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(e,t){var i,n,h,d=c(this),g=l(d),v=a(e,g),b=a(void 0===t?g:t,g);if(r(d)&&(i=d.constructor,(o(i)&&(i===Array||r(i.prototype))||s(i)&&null===(i=i[f]))&&(i=void 0),i===Array||void 0===i))return p.call(
vendor: 9,199 bytes, line 78
78d,v,b);for(n=new(void 0===i?Array:i)(m(b-v,0)),h=0;v<b;v++,h++)v in d&&u(n,h,d[v]);return n.length=h,n}})},2178:function(e,t,i){"use strict";var n=i(3085),r=i(7739),o=i(1941),s=i(4104),a=i(1795),l=i(1321),c=i(9361),u=i(242)("splice"),h=Math.max,d=Math.min;n({target:"Array",proto:!0,forced:!u},{splice:function(e,t){var i,n,u,f,p,m,g=a(this),v=s(g),b=r(e,v),y=arguments.length;if(0===y?i=n=0:1===y?(i=0,n=v-b):(i=y-2,n=d(h(o(t),0),v-b)),v+i-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(g,n),f=0;f<n;f++)(p=b+f)in g&&c(u,f,g[p]);if(u.length=n,i<n){for(f=b;f<v-n;f++)m=f+i,(p=f+n)in g?g[m]=g[p]:delete g[m];for(f=v;f>v-n+i;f--)delete g[f-1]}else if(i>n)for(f=v-n;f>b;f--)m=f+i-1,(p=f+n-1)in g?g[m]=g[p]:delete g[m];for(f=0;f<i;f++)g[f+b]=arguments[f+2];return g.length=v-n+i,u}})},665:function(e,t,i){i(3085)({target:"Function",proto:!0},{bind:i(6782)})},8671:function(e,t,i){var n=i(8576);i(1284)(n.JSON,"JSON",!0)},8556:function(){},2666:function(e,t,i){var n=i(3085),r=i(2558);n({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},3113:function(e,t,i){i(3085)({target:"Object",stat:!0,sham:!i(69)},{create:i(2853)})},297:function(e,t,i){var n=i(3085),r=i(69);n({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:i(2760).f})},9234:function(e,t,i){var n=i(3085),r=i(6192),o=i(1795),s=i(9341),a=i(4635);n({target:"Object",stat:!0,forced:r(function(){s(1)}),sham:!a},{getPrototypeOf:function(e){return s(o(e))}})},2647:function(e,t,i){var n=i(3085),r=i(1795),o=i(7653);n({target:"Object",stat:!0,forced:i(6192)(function(){o(1)})},{keys:function(e){return o(r(e))}})},3222:function(e,t,i){i(3085)({target:"Object",stat:!0},{setPrototypeOf:i(4469)})},6663:function(){},4859:function(e,t,i){var n=i(3085),r=i(15);n({global:!0,forced:parseFloat!=r},{parseFloat:r})},5706:function(e,t,i){var n=i(3085),r=i(2558);n({global:!0,forced:parseInt!=r},{parseInt:r})},7884:function(e,t,i){"use strict";var n=i(3085),r=i(6235),o=i(9438),s=i(892),a=i(3442);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,i=o.f(t),n=i.resolve,l=i.reject,c=s(function(){var i=r(t.resolve),o=[],s=0,l=1;a(e,function(e){var r=s++,a=!1;o.push(void 0),l++,i.call(t,e).then(function(e){a||(a=!0,o[r]={status:"fulfilled",value:e},--l||n(o))},function(e){a||(a=!0,o[r]={status:"rejected",reason:e},--l||n(o))})}),--l||n(o)});return c.error&&l(c.value),i.promise}})},8885:function(e,t,i){"use strict";var n=i(3085),r=i(6235),o=i(150),s=i(9438),a=i(892),l=i(3442),c="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var t=this,i=s.f(t),n=i.resolve,u=i.reject,h=a(function(){var i=r(t.resolve),s=[],a=0,h=1,d=!1;l(e,function(e){var r=a++,l=!1;s.push(void 0),h++,i.call(t,e).then(function(e){l||d||(d=!0,n(e))},function(e){l||d||(l=!0,s[r]=e,--h||u(new(o("AggregateError"))(s,c)))})}),--h||u(new(o("AggregateError"))(s,c))});return h.error&&u(h.value),i.promise}})},1868:function(e,t,i){"use strict";var n=i(3085),r=i(5546),o=i(4471),s=i(6192),a=i(150),l=i(6447),c=i(4743),u=i(9126),h=i(9482);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s(function(){o.prototype.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=c(this,a("Promise")),i=l(e);return this.then(i?function(i){return u(t,e()).then(function(){return i})}:e,i?function(i){return u(t,e()).then(function(){throw i})}:e)}}),!r&&l(o)){var d=a("Promise").prototype.finally;o.prototype.finally!==d&&h(o.prototype,"finally",d,{unsafe:!0})}},9021:function(e,t,i){"use strict";var n,r,o,s,a=i(3085),l=i(5546),c=i(8576),u=i(150),h=i(4471),d=i(9482),f=i(533),p=i(4469),m=i(1284),g=i(3656),v=i(6235),b=i(6447),y=i(5744),w=i(6961),_=i(9516),k=i(3442),x=i(9770),C=i(4743),S=i(7160).set,E=i(2950),T=i(9126),A=i(3681),I=i(9438),M=i(892),P=i(3326),D=i(9245),O=i(8182),L=i(2957),R=i(224),B=i(4218),N=O("species"),j="Promise",F=P.get,z=P.set,V=P.getterFor(j),H=h&&h.prototype,U=h,W=H,$=c.TypeError,G=c.document,q=c.process,Y=I.f,Z=Y,X=!!(G&&G.createEvent&&c.dispatchEvent),K=b(c.PromiseRejectionEvent),J="unhandledrejection",Q=!1,ee=D(j,function(){var e=_(U),t=e!==String(U);if(!t&&66===B)return!0;if(l&&!W.finally)return!0;if(B>=51&&/native code/.test(e))return!1;var i=new U(function(e){e(1)}),n=function(e){e(function(){},function(){})};return(i.constructor={})[N]=n,!(Q=i.then(function(){})instanceof n)||!t&&L&&!K}),te=ee||!x(function(e){U.all(e).catch(function(){})}),ie=function(e){var t;return!(!y(e)||!b(t=e.then))&&t},ne=function(e,t){if(!e.notified){e.notified=!0;var i=e.reactions;E(function(){for(var n=e.value,r=1==e.state,o=0;i.length>o;){var s,a,l,c=i[o++],u=r?c.ok:c.fail,h=c.resolve,d=c.reject,f=c.domain;try{u?(r||(2===e.rejection&&ae(e),e.rejection=1),!0===u?s=n:(f&&f.enter(),s=u(n),f&&(f.exit(),l=!0)),s===c.promise?d($("Promise-chain cycle")):(a=ie(s))?a.call(s,h,d):h(s)):d(n)}catch(e){f&&!l&&f.exit(),d(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&oe(e)})}},re=function(e,t,i){var n,r;X?((n=G.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:i},!K&&(r=c["on"+e])?r(n):e===J&&A("Unhandled promise rejection",i)},oe=function(e){S.call(c,function(){var t,i=e.facade,n=e.value;if(se(e)&&(t=M(function(){R?q.emit("unhandledRejection",n,i):re(J,i,n)}),e.rejection=R||se(e)?2:1,t.error))throw t.value})},se=function(e){return 1!==e.rejection&&!e.parent},ae=function(e){S.call(c,function(){var t=e.facade;R?q.emit("rejectionHandled",t):re("rejectionhandled",t,e.value)})},le=function(e,t,i){return function(n){e(t,n,i)}},ce=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,ne(e,!0))},ue=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw $("Promise can't be resolved itself");var n=ie(t);n?E(function(){var i={done:!1};try{n.call(t,le(ue,i,e),le(ce,i,e))}catch(t){ce(i,t,e)}}):(e.value=t,e.state=1,ne(e,!1))}catch(t){ce({done:!1},t,e)}}};if(ee&&(W=(U=function(e){w(this,U,j),v(e),n.call(this);var t=F(this);try{e(le(ue,t),le(ce,t))}catch(e){ce(t,e)}}).prototype,(n=function(e){z(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=f(W,{then:function(e,t){var i=V(this),n=Y(C(this,U));return n.ok=!b(e)||e,n.fail=b(t)&&t,n.domain=R?q.domain:void 0,i.parent=!0,i.reactions.push(n),0!=i.state&&ne(i,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new n,t=F(e);this.promise=e,this.resolve=le(ue,t),this.reject=le(ce,t)},I.f=Y=function(e){return e===U||e===o?new r(e):Z(e)},!l&&b(h)&&H!==Object.prototype)){s=H.then,Q||(d(H,"then",function(e,t){var i=this;return new U(function(e,t){s.call(i,e,t)}).then(e,t)},{unsafe:!0}),d(H,"catch",W.catch,{unsafe:!0}));try{delete H.constructor}catch(e){}p&&p(H,W)}a({global:!0,wrap:!0,forced:ee},{Promise:U}),m(U,j,!1,!0),g(j),o=u(j),a({target:j,stat:!0,forced:ee},{reject:function(e){var t=Y(this);return t.reject.call(void 0,e),t.promise}}),a({target:j,stat:!0,forced:l||ee},{resolve:function(e){return T(l&&this===o?U:this,e)}}),a({target:j,stat:!0,forced:te},{all:function(e){var t=this,i=Y(t),n=i.resolve,r=i.reject,o=M(function(){var i=v(t.resolve),o=[],s=0,a=1;k(e,function(e){var l=s++,c=!1;o.push(void 0),a++,i.call(t,e).then(function(e){c||(c=!0,o[l]=e,--a||n(o))},r)}),--a||n(o)});return o.error&&r(o.value),i.promise},race:function(e){var t=this,i=Y(t),n=i.reject,r=M(function(){var r=v(t.resolve);k(e,function(e){r.call(t,e).then(i.resolve,n)})});return r.error&&n(r.value),i.promise}})},5397:function(e,t,i){var n=i(3085),r=i(150),o=i(1404),s=i(1138),a=i(5744),l=i(2853),c=i(6782),u=i(6192),h=r("Reflect","construct"),d=u(function(){function e(){}return!(h(function(){},[],e)instanceof e)}),f=!u(function(){h(function(){})}),p=d||f;n({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(e,t){o(e),s(t);var i=arguments.length<3?e:o(arguments[2]);if(f&&!d)return h(e,t,i);if(e==i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return n.push.apply(n,t),new(c.apply(e,n))}var r=i.prototype,u=l(a(r)?r:Object.prototype),p=Function.apply.call(e,u,t);return a(p)?p:u}})},1367:function(){},5454:function(e,t,i){"use strict";var n=i(863).charAt,r=i(4845),o=i(3326),s=i(7218),a="String Iterator",l=o.set,c=o.getterFor(a);s(String,"String",function(e){l(this,{type:a,string:r(e),index:0})},function(){var e,t=c(this),i=t.string,r=t.index;return r>=i.length?{value:void 0,done:!0}:(e=n(i,r),t.index+=e.length,{value:e,done:!1})})},957:function(e,t,i){"use strict";var n=i(3085),r=i(4277).trim;n({target:"String",proto:!0,forced:i(6815)("trim")},{trim:function(){return r(this)}})},9781:function(e,t,i){i(1488)("asyncIterator")},492:function(){},6681:function(e,t,i){i(1488)("hasInstance")},9594:function(e,t,i){i(1488)("isConcatSpreadable")},3665:function(e,t,i){i(1488)("iterator")},6187:function(e,t,i){"use strict";var n=i(3085),r=i(8576),o=i(150),s=i(5546),a=i(69),l=i(3045),c=i(6192),u=i(4500),h=i(4770),d=i(6447),f=i(5744),p=i(3236),m=i(1138),g=i(1795),v=i(101),b=i(77),y=i(4845),w=i(774),_=i(2853),k=i(7653),x=i(2092),C=i(4052),S=i(4750),E=i(5141),T=i(2760),A=i(6007),I=i(9482),M=i(8717
78),P=i(9766),D=i(4535),O=i(2759),L=i(8182),R=i(9207),B=i(1488),N=i(1284),j=i(3326),F=i(454).forEach,z=P("hidden"),V="Symbol",H="prototype",U=L("toPrimitive"),W=j.set,$=j.getterFor(V),G=Object[H],q=r.Symbol,Y=o("JSON","stringify"),Z=E.f,X=T.f,K=C.f,J=A.f,Q=M("symbols"),ee=M("op-symbols"),te=M("string-to-symbol-registry"),ie=M("symbol-to-string-registry"),ne=M("wks"),re=r.QObject,oe=!re||!re[H]||!re[H].findChild,se=a&&c(function(){return 7!=_(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=Z(G,t);n&&delete G[t],X(e,t,i),n&&e!==G&&X(G,t,n)}:X,ae=function(e,t){var i=Q[e]=_(q[H]);return W(i,{type:V,tag:e,description:t}),a||(i.description=t),i},le=function(e,t,i){e===G&&le(ee,t,i),m(e);var n=b(t);return m(i),u(Q,n)?(i.enumerable?(u(e,z)&&e[z][n]&&(e[z][n]=!1),i=_(i,{enumerable:w(0,!1)})):(u(e,z)||X(e,z,w(1,{})),e[z][n]=!0),se(e,n,i)):X(e,n,i)},ce=function(e,t){m(e);var i=v(t),n=k(i).concat(fe(i));return F(n,function(t){a&&!ue.call(i,t)||le(e,t,i[t])}),e},ue=function(e){var t=b(e),i=J.call(this,t);return!(this===G&&u(Q,t)&&!u(ee,t))&&(!(i||!u(this,t)||!u(Q,t)||u(this,z)&&this[z][t])||i)},he=function(e,t){var i=v(e),n=b(t);if(i!==G||!u(Q,n)||u(ee,n)){var r=Z(i,n);return!r||!u(Q,n)||u(i,z)&&i[z][n]||(r.enumerable=!0),r}},de=function(e){var t=K(v(e)),i=[];return F(t,function(e){u(Q,e)||u(D,e)||i.push(e)}),i},fe=function(e){var t=e===G,i=K(t?ee:v(e)),n=[];return F(i,function(e){!u(Q,e)||t&&!u(G,e)||n.push(Q[e])}),n};if(l||(q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=O(e),i=function(e){this===G&&i.call(ee,e),u(this,z)&&u(this[z],t)&&(this[z][t]=!1),se(this,t,w(1,e))};return a&&oe&&se(G,t,{configurable:!0,set:i}),ae(t,e)},I(q[H],"toString",function(){return $(this).tag}),I(q,"withoutSetter",function(e){return ae(O(e),e)}),A.f=ue,T.f=le,E.f=he,x.f=C.f=de,S.f=fe,R.f=function(e){return ae(L(e),e)},a&&(X(q[H],"description",{configurable:!0,get:function(){return $(this).description}}),s||I(G,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:q}),F(k(ne),function(e){B(e)}),n({target:V,stat:!0,forced:!l},{for:function(e){var t=y(e);if(u(te,t))return te[t];var i=q(t);return te[t]=i,ie[i]=t,i},keyFor:function(e){if(!p(e))throw TypeError(e+" is not a symbol");if(u(ie,e))return ie[e]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!a},{create:function(e,t){return void 0===t?_(e):ce(_(e),t)},defineProperty:le,defineProperties:ce,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:de,getOwnPropertySymbols:fe}),n({target:"Object",stat:!0,forced:c(function(){S.f(1)})},{getOwnPropertySymbols:function(e){return S.f(g(e))}}),Y&&n({target:"JSON",stat:!0,forced:!l||c(function(){var e=q();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))})},{stringify:function(e,t,i){for(var n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t,(f(t)||void 0!==e)&&!p(e))return h(t)||(t=function(e,t){if(d(n)&&(t=n.call(this,e,t)),!p(t))return t}),r[1]=t,Y.apply(null,r)}}),!q[H][U]){var pe=q[H].valueOf;I(q[H],U,function(){return pe.apply(this,arguments)})}N(q,V),D[z]=!0},1250:function(e,t,i){i(1488)("matchAll")},9017:function(e,t,i){i(1488)("match")},9786:function(e,t,i){i(1488)("replace")},503:function(e,t,i){i(1488)("search")},6565:function(e,t,i){i(1488)("species")},9322:function(e,t,i){i(1488)("split")},3610:function(e,t,i){i(1488)("toPrimitive")},6886:function(e,t,i){i(1488)("toStringTag")},3514:function(e,t,i){i(1488)("unscopables")},177:function(e,t,i){i(1488)("asyncDispose")},9031:function(e,t,i){i(1488)("dispose")},6658:function(e,t,i){i(1488)("matcher")},1875:function(e,t,i){i(1488)("metadata")},8658:function(e,t,i){i(1488)("observable")},4592:function(e,t,i){i(1488)("patternMatch")},6680:function(e,t,i){i(1488)("replaceAll")},162:function(e,t,i){i(8939);var n=i(7365),r=i(8576),o=i(4696),s=i(8711),a=i(7771),l=i(8182)("toStringTag");for(var c in n){var u=r[c],h=u&&u.prototype;h&&o(h)!==l&&s(h,l,c),a[c]=a.Array}},2906:function(e,t,i){var n=i(3085),r=i(8576),o=i(6447),s=i(8989),a=[].slice,l=function(e){return function(t,i){var n=arguments.length>2,r=n?a.call(arguments,2):void 0;return e(n?function(){(o(t)?t:Function(t)).apply(this,r)}:t,i)}};n({global:!0,bind:!0,forced:/MSIE .\./.test(s)},{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},9336:function(e,t,i){"use strict";i(8939);var n=i(3085),r=i(150),o=i(4551),s=i(9482),a=i(533),l=i(1284),c=i(5148),u=i(3326),h=i(6961),d=i(6447),f=i(4500),p=i(8043),m=i(4
vendor: 4,605 bytes, line 78
78696),g=i(1138),v=i(5744),b=i(4845),y=i(2853),w=i(774),_=i(1669),k=i(8703),x=i(8182),C=r("fetch"),S=r("Request"),E=S&&S.prototype,T=r("Headers"),A=x("iterator"),I="URLSearchParams",M=I+"Iterator",P=u.set,D=u.getterFor(I),O=u.getterFor(M),L=/\+/g,R=Array(4),B=function(e){return R[e-1]||(R[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},N=function(e){try{return decodeURIComponent(e)}catch(t){return e}},j=function(e){var t=e.replace(L," "),i=4;try{return decodeURIComponent(t)}catch(e){for(;i;)t=t.replace(B(i--),N);return t}},F=/[!'()~]|%20/g,z={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},V=function(e){return z[e]},H=function(e){return encodeURIComponent(e).replace(F,V)},U=function(e,t){if(t)for(var i,n,r=t.split("&"),o=0;o<r.length;)(i=r[o++]).length&&(n=i.split("="),e.push({key:j(n.shift()),value:j(n.join("="))}))},W=function(e){this.entries.length=0,U(this.entries,e)},$=function(e,t){if(e<t)throw TypeError("Not enough arguments")},G=c(function(e,t){P(this,{type:M,iterator:_(D(e).entries),kind:t})},"Iterator",function(){var e=O(this),t=e.kind,i=e.iterator.next(),n=i.value;return i.done||(i.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),i}),q=function(){h(this,q,I);var e,t,i,n,r,o,s,a,l,c=arguments.length>0?arguments[0]:void 0,u=[];if(P(this,{type:I,entries:u,updateURL:function(){},updateSearchParams:W}),void 0!==c)if(v(c))if(e=k(c))for(i=(t=_(c,e)).next;!(n=i.call(t)).done;){if((s=(o=(r=_(g(n.value))).next).call(r)).done||(a=o.call(r)).done||!o.call(r).done)throw TypeError("Expected sequence with length 2");u.push({key:b(s.value),value:b(a.value)})}else for(l in c)f(c,l)&&u.push({key:l,value:b(c[l])});else U(u,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:b(c))},Y=q.prototype;if(a(Y,{append:function(e,t){$(arguments.length,2);var i=D(this);i.entries.push({key:b(e),value:b(t)}),i.updateURL()},delete:function(e){$(arguments.length,1);for(var t=D(this),i=t.entries,n=b(e),r=0;r<i.length;)i[r].key===n?i.splice(r,1):r++;t.updateURL()},get:function(e){$(arguments.length,1);for(var t=D(this).entries,i=b(e),n=0;n<t.length;n++)if(t[n].key===i)return t[n].value;return null},getAll:function(e){$(arguments.length,1);for(var t=D(this).entries,i=b(e),n=[],r=0;r<t.length;r++)t[r].key===i&&n.push(t[r].value);return n},has:function(e){$(arguments.length,1);for(var t=D(this).entries,i=b(e),n=0;n<t.length;)if(t[n++].key===i)return!0;return!1},set:function(e,t){$(arguments.length,1);for(var i,n=D(this),r=n.entries,o=!1,s=b(e),a=b(t),l=0;l<r.length;l++)(i=r[l]).key===s&&(o?r.splice(l--,1):(o=!0,i.value=a));o||r.push({key:s,value:a}),n.updateURL()},sort:function(){var e,t,i,n=D(this),r=n.entries,o=r.slice();for(r.length=0,i=0;i<o.length;i++){for(e=o[i],t=0;t<i;t++)if(r[t].key>e.key){r.splice(t,0,e);break}t===i&&r.push(e)}n.updateURL()},forEach:function(e){for(var t,i=D(this).entries,n=p(e,arguments.length>1?arguments[1]:void 0,3),r=0;r<i.length;)n((t=i[r++]).value,t.key,this)},keys:function(){return new G(this,"keys")},values:function(){return new G(this,"values")},entries:function(){return new G(this,"entries")}},{enumerable:!0}),s(Y,A,Y.entries,{name:"entries"}),s(Y,"toString",function(){for(var e,t=D(this).entries,i=[],n=0;n<t.length;)e=t[n++],i.push(H(e.key)+"="+H(e.value));return i.join("&")},{enumerable:!0}),l(q,I),n({global:!0,forced:!o},{URLSearchParams:q}),!o&&d(T)){var Z=function(e){if(v(e)){var t,i=e.body;if(m(i)===I)return(t=e.headers?new T(e.headers):new T).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),y(e,{body:w(0,String(i)),headers:w(0,t)})}return e};if(d(C)&&n({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(e,arguments.length>1?Z(arguments[1]):{})}}),d(S)){var X=function(e){return h(this,X,"Request"),new S(e,arguments.length>1?Z(arguments[1]):{})};E.constructor=X,X.prototype=E,n({global:!0,forced:!0},{Request:X})}}e.exports={URLSearchParams:q,getState:D}},4948:function(e,t,i){"use strict";i(5454);var n,r=i(3085),o=i(69),s=i(4551),a=i(8576),l=i(1187),c=i(9482),u=i(6961),h=i(4500),d=i(2503),f=i(841),p=i(863).codeAt,m=i(7977),g=i(4845),v=i(1284),b=i(9336),y=i(3326),w=a.URL,_=b.URLSearchParams,k=b.getState,x=y.set,C=y.getterFor("URL"),S=Math.floor,E=Math.pow,T="Invalid scheme",A="Invalid host",I="Invalid port",M=/[A-Za-z]/,P=/[\d+-.A-Za-z]/,D=/\d/,O=/^0x/i,L=/^[0-7]+$/,R=/^\d+$/,B=/^[\dA-Fa-f]+$/,N=/[\0\t\n\r #%/:<>?@[\\\]^|]/,j=/[\0\t\n\r #/:<>?@[\\\]^|]/,F=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,z=/[\t\n\r]/g,V=function(e,t){var i,n,r;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return A;if(!(i=U(t.slice(1,-1))))return A;e.host=i}
vendor: 5,393 bytes, line 78
78else if(K(e)){if(t=m(t),N.test(t))return A;if(null===(i=H(t)))return A;e.host=i}else{if(j.test(t))return A;for(i="",n=f(t),r=0;r<n.length;r++)i+=Z(n[r],$);e.host=i}},H=function(e){var t,i,n,r,o,s,a,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(t=l.length)>4)return e;for(i=[],n=0;n<t;n++){if(""==(r=l[n]))return e;if(o=10,r.length>1&&"0"==r.charAt(0)&&(o=O.test(r)?16:8,r=r.slice(8==o?1:2)),""===r)s=0;else{if(!(10==o?R:8==o?L:B).test(r))return e;s=parseInt(r,o)}i.push(s)}for(n=0;n<t;n++)if(s=i[n],n==t-1){if(s>=E(256,5-t))return null}else if(s>255)return null;for(a=i.pop(),n=0;n<i.length;n++)a+=i[n]*E(256,3-n);return a},U=function(e){var t,i,n,r,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,d=function(){return e.charAt(h)};if(":"==d()){if(":"!=e.charAt(1))return;h+=2,u=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=i=0;i<4&&B.test(d());)t=16*t+parseInt(d(),16),h++,i++;if("."==d()){if(0==i)return;if(h-=i,c>6)return;for(n=0;d();){if(r=null,n>0){if(!("."==d()&&n<4))return;h++}if(!D.test(d()))return;for(;D.test(d());){if(o=parseInt(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}l[c]=256*l[c]+r,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==d()){if(h++,!d())return}else if(d())return;l[c++]=t}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(s=c-u,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a;else if(8!=c)return;return l},W=function(e){var t,i,n,r;if("number"==typeof e){for(t=[],i=0;i<4;i++)t.unshift(e%256),e=S(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,i=1,n=null,r=0,o=0;o<8;o++)0!==e[o]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=o),++r);return r>i&&(t=n,i=r),t}(e),i=0;i<8;i++)r&&0===e[i]||(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=e[i].toString(16),i<7&&(t+=":")));return"["+t+"]"}return e},$={},G=d({},$,{" ":1,'"':1,"<":1,">":1,"`":1}),q=d({},G,{"#":1,"?":1,"{":1,"}":1}),Y=d({},q,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Z=function(e,t){var i=p(e,0);return i>32&&i<127&&!h(t,e)?e:encodeURIComponent(e)},X={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(e){return h(X,e.scheme)},J=function(e){return""!=e.username||""!=e.password},Q=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},ee=function(e,t){var i;return 2==e.length&&M.test(e.charAt(0))&&(":"==(i=e.charAt(1))||!t&&"|"==i)},te=function(e){var t;return e.length>1&&ee(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},ie=function(e){var t=e.path,i=t.length;!i||"file"==e.scheme&&1==i&&ee(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},oe={},se={},ae={},le={},ce={},ue={},he={},de={},fe={},pe={},me={},ge={},ve={},be={},ye={},we={},_e={},ke={},xe={},Ce={},Se={},Ee=function(e,t,i,r){var o,s,a,l,c=i||oe,u=0,d="",p=!1,m=!1,g=!1;for(i||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(F,"")),t=t.replace(z,""),o=f(t);u<=o.length;){switch(s=o[u],c){case oe:if(!s||!M.test(s)){if(i)return T;c=ae;continue}d+=s.toLowerCase(),c=se;break;case se:if(s&&(P.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(i)return T;d="",c=ae,u=0;continue}if(i&&(K(e)!=h(X,d)||"file"==d&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,i)return void(K(e)&&X[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?c=be:K(e)&&r&&r.scheme==e.scheme?c=le:K(e)?c=de:"/"==o[u+1]?(c=ce,u++):(e.cannotBeABaseURL=!0,e.path.push(""),c=xe)}break;case ae:if(!r||r.cannotBeABaseURL&&"#"!=s)return T;if(r.cannotBeABaseURL&&"#"==s){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,c=Se;break}c="file"==r.scheme?be:ue;continue;case le:if("/"!=s||"/"!=o[u+1]){c=ue;continue}c=fe,u++;break;case ce:if("/"==s){c=pe;break}c=ke;continue;case ue:if(e.scheme=r.scheme,s==n)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==s||"\\"==s&&K(e))c=he;else if("?"==s)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",c=Ce;else{if("#"!=s){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),c=ke;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",c=Se}break;case he:if(!K(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,c=ke;continue}c=pe}else c=fe;break;case de:if(c=fe,"/"!=s||"/"!=d.charAt(u+1))continue;u++;break;case fe:if("/"!=s&&"\\"!=s){c=pe;continue}break;case pe:if("@"==s){p&&(d="%40"+d),p=!0,a=f(d);for(var v=0;v<a.length;v++){var b=a[v];if(":"!=b||g){var y=Z(b,Y);g?e.password+=y:e.username+=y}else g=!0}d=""}else if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&K(e)){if(p&&""==d)return"Invalid authority";u-=f(d).length+1,d="",c=me}else d+=s;break;case me:case ge:if(i&&"file"==e.scheme){c=we;continue}if(":"!=s||m){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&K(e)){if(K(e)&&""==d)return A;if(i&&""==d&&(J(e)||null!==e.port))return;if(l=V(e,d))return l;if(d="",c=_e,i)return;continue}"["==s?m=!0:"]"==s&&(m=!1),d+=s}else{if(""==d)return A;if(l=V(e,d))return l;if(d="",c=ve,i==ge)return}break;
vendor: 5,626 bytes, line 78
78case ve:if(!D.test(s)){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&K(e)||i){if(""!=d){var w=parseInt(d,10);if(w>65535)return I;e.port=K(e)&&w===X[e.scheme]?null:w,d=""}if(i)return;c=_e;continue}return I}d+=s;break;case be:if(e.scheme="file","/"==s||"\\"==s)c=ye;else{if(!r||"file"!=r.scheme){c=ke;continue}if(s==n)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==s)e.host=r.host,e.path=r.path.slice(),e.query="",c=Ce;else{if("#"!=s){te(o.slice(u).join(""))||(e.host=r.host,e.path=r.path.slice(),ie(e)),c=ke;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",c=Se}}break;case ye:if("/"==s||"\\"==s){c=we;break}r&&"file"==r.scheme&&!te(o.slice(u).join(""))&&(ee(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),c=ke;continue;case we:if(s==n||"/"==s||"\\"==s||"?"==s||"#"==s){if(!i&&ee(d))c=ke;else if(""==d){if(e.host="",i)return;c=_e}else{if(l=V(e,d))return l;if("localhost"==e.host&&(e.host=""),i)return;d="",c=_e}continue}d+=s;break;case _e:if(K(e)){if(c=ke,"/"!=s&&"\\"!=s)continue}else if(i||"?"!=s)if(i||"#"!=s){if(s!=n&&(c=ke,"/"!=s))continue}else e.fragment="",c=Se;else e.query="",c=Ce;break;case ke:if(s==n||"/"==s||"\\"==s&&K(e)||!i&&("?"==s||"#"==s)){if(re(d)?(ie(e),"/"==s||"\\"==s&&K(e)||e.path.push("")):ne(d)?"/"==s||"\\"==s&&K(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&ee(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(s==n||"?"==s||"#"==s))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",c=Ce):"#"==s&&(e.fragment="",c=Se)}else d+=Z(s,q);break;case xe:"?"==s?(e.query="",c=Ce):"#"==s?(e.fragment="",c=Se):s!=n&&(e.path[0]+=Z(s,$));break;case Ce:i||"#"!=s?s!=n&&("'"==s&&K(e)?e.query+="%27":e.query+="#"==s?"%23":Z(s,$)):(e.fragment="",c=Se);break;case Se:s!=n&&(e.fragment+=Z(s,G))}u++}},Te=function(e){var t,i,n=u(this,Te,"URL"),r=arguments.length>1?arguments[1]:void 0,s=g(e),a=x(n,{type:"URL"});if(void 0!==r)if(r instanceof Te)t=C(r);else if(i=Ee(t={},g(r)))throw TypeError(i);if(i=Ee(a,s,null,t))throw TypeError(i);var l=a.searchParams=new _,c=k(l);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(l)||null},o||(n.href=Ie.call(n),n.origin=Me.call(n),n.protocol=Pe.call(n),n.username=De.call(n),n.password=Oe.call(n),n.host=Le.call(n),n.hostname=Re.call(n),n.port=Be.call(n),n.pathname=Ne.call(n),n.search=je.call(n),n.searchParams=Fe.call(n),n.hash=ze.call(n))},Ae=Te.prototype,Ie=function(){var e=C(this),t=e.scheme,i=e.username,n=e.password,r=e.host,o=e.port,s=e.path,a=e.query,l=e.fragment,c=t+":";return null!==r?(c+="//",J(e)&&(c+=i+(n?":"+n:"")+"@"),c+=W(r),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},Me=function(){var e=C(this),t=e.scheme,i=e.port;if("blob"==t)try{return new Te(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&K(e)?t+"://"+W(e.host)+(null!==i?":"+i:""):"null"},Pe=function(){return C(this).scheme+":"},De=function(){return C(this).username},Oe=function(){return C(this).password},Le=function(){var e=C(this),t=e.host,i=e.port;return null===t?"":null===i?W(t):W(t)+":"+i},Re=function(){var e=C(this).host;return null===e?"":W(e)},Be=function(){var e=C(this).port;return null===e?"":String(e)},Ne=function(){var e=C(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},je=function(){var e=C(this).query;return e?"?"+e:""},Fe=function(){return C(this).searchParams},ze=function(){var e=C(this).fragment;return e?"#"+e:""},Ve=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&l(Ae,{href:Ve(Ie,function(e){var t=C(this),i=g(e),n=Ee(t,i);if(n)throw TypeError(n);k(t.searchParams).updateSearchParams(t.query)}),origin:Ve(Me),protocol:Ve(Pe,function(e){var t=C(this);Ee(t,g(e)+":",oe)}),username:Ve(De,function(e){var t=C(this),i=f(g(e));if(!Q(t)){t.username="";for(var n=0;n<i.length;n++)t.username+=Z(i[n],Y)}}),password:Ve(Oe,function(e){var t=C(this),i=f(g(e));if(!Q(t)){t.password="";for(var n=0;n<i.length;n++)t.password+=Z(i[n],Y)}}),host:Ve(Le,function(e){var t=C(this);t.cannotBeABaseURL||Ee(t,g(e),me)}),hostname:Ve(Re,function(e){var t=C(this);t.cannotBeABaseURL||Ee(t,g(e),ge)}),port:Ve(Be,function(e){var t=C(this);Q(t)||(""==(e=g(e))?t.port=null:Ee(t,e,ve))}),pathname:Ve(Ne,function(e){var t=C(this);t.cannotBeABaseURL||(t.path=[],Ee(t,g(e),_e))}),search:Ve(je,function(e){var t=C(this);""==(e=g(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Ee(t,e,Ce)),k(t.searchParams).updateSearchParams(t.query)}),searchParams:Ve(Fe),hash:Ve(ze,function(e){var t=C(this);""!=(e=g(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Ee(t,e,Se)):t.fragment=null})}),c(Ae,"toJSON",function(){return Ie.call(this)},{enumerable:!0}),c(Ae,"toString",function(){return Ie.call(this)},{enumerable:!0}),w){var He=w.createObjectURL,Ue=w.revokeObjectURL;He&&c(Te,"createObjectURL",function(e){return He.apply(w,arguments)}),Ue&&c(Te,"revokeObjectURL",function(e){return Ue.apply(w,arguments)})}v(Te,"URL"),r({global:!0,forced:!s,sham:!o},{URL:Te})},9801:function(){},3822:function(e,t,i){var n=i(2221);e.exports=n},1434:function(e,t,i){var n=i(5078);e.exports=n},6899:function(e,t,i){var n=i(98);e.exports=n},7710:function(e,t,i){var n=i(5739);i(162),e.exports=n},4486:function(e,t,i){var n=i(278);e.exports=n},4877:function(e,t,i){var n=i(1484);e.exports=n},7178:function(e,t,i){var n=i(7731);e.exports=n},5603:function(e,t,i){var n=i(3669);e.exports=n},1206:function(e,t,i){i(162);var n=i(6899),r=i(4696),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;
vendor: 1,140 bytes, line 78
78return e===o||e instanceof Array&&t===o.forEach||s.hasOwnProperty(r(e))?n:t}},6174:function(e,t,i){var n=i(2604);e.exports=n},57:function(e,t,i){var n=i(263);e.exports=n},4741:function(e,t,i){var n=i(7663);e.exports=n},8368:function(e,t,i){var n=i(5063);e.exports=n},3739:function(e,t,i){var n=i(6813);e.exports=n},172:function(e,t,i){var n=i(6285);e.exports=n},4963:function(e,t,i){var n=i(3213);e.exports=n},7820:function(e,t,i){var n=i(3512);e.exports=n},8980:function(e,t,i){var n=i(8168);e.exports=n},5636:function(e,t,i){var n=i(8651);e.exports=n},6672:function(e,t,i){var n=i(3083);e.exports=n},5059:function(e,t,i){var n=i(2987);e.exports=n},3969:function(e,t,i){var n=i(2239);e.exports=n},6618:function(e,t,i){var n=i(3154);i(162),e.exports=n},5279:function(e,t,i){var n=i(6577);e.exports=n},9562:function(e,t,i){i(2906);var n=i(7545);e.exports=n.setTimeout},2285:function(e,t,i){var n=i(5008);i(162),e.exports=n},8535:function(e,t,i){var n=i(994);i(162),e.exports=n},652:function(e,t,i){var n=i(5668);e.exports=n},5668:function(e,t,i){i(4948),i(9801),i(9336);var n=i(7545);e.exports=n.URL},2534:function(e){"use strict";e.exports=
vendor: 40,136 bytes, line 78
78"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyBkaXNwbGF5PSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KPGRlZnMgaWQ9InR1aS1pbWFnZS1lZGl0b3Itc3ZnLWRlZmF1bHQtaWNvbnMiPgo8c3ltYm9sIGlkPSJpYy1hcHBseSIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIHN0cm9rZT0ibm9uZSIgZmlsbD0ibm9uZSIvPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBkPSJNNCAxMi4wMTFsNSA1TDIwLjAxMSA2Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1jYW5jZWwiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiLz4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgZD0iTTYgNmwxMiAxMk0xOCA2TDYgMTgiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWNyb3AiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBzdHJva2U9Im5vbmUiIGZpbGw9Im5vbmUiIC8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik00IDBoMXYyMGExIDEgMCAwIDEtMS0xVjB6TTIwIDE3aC0xVjVoMXYxMnptMCAydjVoLTF2LTVoMXoiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTUgMTloMTl2MUg1ek00Ljc2MiA0djFIMFY0aDQuNzYyek03IDRoMTJhMSAxIDAgMCAxIDEgMUg3VjR6Ii8+Cjwvc3ltYm9sPgo8IS0tIFRoaXMgaWNvbiBtYWRlIGJ5IFBpeGVsIHBlcmZlY3QgZnJvbSB3d3cuZmxhdGljb24uY29tIC0tPgo8c3ltYm9sIGlkPSJpYy1yZXNpemUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgc3Ryb2tlPSJub25lIiBmaWxsPSJub25lIi8+CiAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNIDE4Ljk4ODI4MSAzLjAxMTcxOSBDIDE4LjgwMDc4MSAyLjgyNDIxOSAxOC41IDIuODI0MjE5IDE4LjMxMjUgMy4wMTE3MTkgTCAxMS42MjEwOTQgOS43MDcwMzEgQyAxMS40Mjk2ODggOS44OTQ1MzEgMTEuNDI5Njg4IDEwLjE5NTMxMiAxMS42MjEwOTQgMTAuMzc4OTA2IEMgMTEuNzEwOTM4IDEwLjQ3MjY1NiAxMS44MzU5MzggMTAuNTE5NTMxIDExLjk1NzAzMSAxMC41MTk1MzEgQyAxMi4wNzgxMjUgMTAuNTE5NTMxIDEyLjIwMzEyNSAxMC40NzI2NTYgMTIuMjkyOTY5IDEwLjM3ODkwNiBMIDE4Ljk4ODI4MSAzLjY4NzUgQyAxOS4xNzU3ODEgMy41IDE5LjE3NTc4MSAzLjE5OTIxOSAxOC45ODgyODEgMy4wMTE3MTkgWiBNIDE4Ljk4ODI4MSAzLjAxMTcxOSAiLz4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0gMTguNjUyMzQ0IDIuODY3MTg4IEMgMTguMzg2NzE5IDIuODY3MTg4IDE4LjE3MTg3NSAzLjA4MjAzMSAxOC4xNzE4NzUgMy4zNDc2NTYgTCAxOC4xNzE4NzUgOS4wODU5MzggQyAxOC4xNzE4NzUgOS4zNDc2NTYgMTguMzg2NzE5IDkuNTYyNSAxOC42NTIzNDQgOS41NjI1IEMgMTguOTE3OTY5IDkuNTYyNSAxOS4xMzI4MTIgOS4zNDc2NTYgMTkuMTMyODEyIDkuMDg1OTM4IEwgMTkuMTMyODEyIDMuMzQ3NjU2IEMgMTkuMTMyODEyIDMuMDgyMDMxIDE4LjkxNzk2OSAyLjg2NzE4OCAxOC42NTIzNDQgMi44NjcxODggWiBNIDE4LjY1MjM0NCAyLjg2NzE4OCAiLz4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0gMTguNjUyMzQ0IDIuODY3MTg4IEwgMTIuOTE0MDYyIDIuODY3MTg4IEMgMTIuNjUyMzQ0IDIuODY3MTg4IDEyLjQzNzUgMy4wODIwMzEgMTIuNDM3NSAzLjM0NzY1NiBDIDEyLjQzNzUgMy42MTMyODEgMTIuNjUyMzQ0IDMuODI4MTI1IDEyLjkxNDA2MiAzLjgyODEyNSBMIDE4LjY1MjM0NCAzLjgyODEyNSBDIDE4LjkxNzk2OSAzLjgyODEyNSAxOS4xMzI4MTIgMy42MTMyODEgMTkuMTMyODEyIDMuMzQ3NjU2IEMgMTkuMTMyODEyIDMuMDgyMDMxIDE4LjkxNzk2OSAyLjg2NzE4OCAxOC42NTIzNDQgMi44NjcxODggWiBNIDE4LjY1MjM0NCAyLjg2NzE4OCAiLz4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0gMTAuMzc4OTA2IDExLjYyMTA5NCBDIDEwLjE5NTMxMiAxMS40MzM1OTQgOS44OTA2MjUgMTEuNDMzNTk0IDkuNzAzMTI1IDExLjYyMTA5NCBMIDMuMDA3ODEyIDE4LjMxNjQwNiBDIDIuODIwMzEyIDE4LjUgMi44MjAzMTIgMTguODA0Njg4IDMuMDA3ODEyIDE4Ljk5MjE4OCBDIDMuMTA1NDY5IDE5LjA4NTkzOCAzLjIyNjU2MiAxOS4xMzI4MTIgMy4zNDc2NTYgMTkuMTMyODEyIEMgMy40Njg3NSAxOS4xMzI4MTIgMy41ODk4NDQgMTkuMDg1OTM4IDMuNjgzNTk0IDE4Ljk5MjE4OCBMIDEwLjM3ODkwNiAxMi4yOTY4NzUgQyAxMC41NjY0MDYgMTIuMTA5Mzc1IDEwLjU2NjQwNiAxMS44MDQ2ODggMTAuMzc4OTA2IDExLjYyMTA5NCBaIE0gMTAuMzc4OTA2IDExLjYyMTA5NCAiLz4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0gMy4zNDc2NTYgMTIuNDM3NSBDIDMuMDgyMDMxIDEyLjQzNzUgMi44NjcxODggMTIuNjUyMzQ0IDIuODY3MTg4IDEyLjkxNDA2MiBMIDIuODY3MTg4IDE4LjY1MjM0NCBDIDIuODY3MTg4IDE4LjkxNzk2OSAzLjA4MjAzMSAxOS4xMzI4MTIgMy4zNDc2NTYgMTkuMTMyODEyIEMgMy42MTMyODEgMTkuMTMyODEyIDMuODI4MTI1IDE4LjkxNzk2OSAzLjgyODEyNSAxOC42NTIzNDQgTCAzLjgyODEyNSAxMi45MTQwNjIgQyAzLjgyODEyNSAxMi42NTIzNDQgMy42MTMyODEgMTIuNDM3NSAzLjM0NzY1NiAxMi40Mzc1IFogTSAzLjM0NzY1NiAxMi40Mzc1ICIvPgogIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTSA5LjA4NTkzOCAxOC4xNzE4NzUgTCAzLjM0NzY1NiAxOC4xNzE4NzUgQyAzLjA4MjAzMSAxOC4xNzE4NzUgMi44NjcxODggMTguMzg2NzE5IDIuODY3MTg4IDE4LjY1MjM0NCBDIDIuODY3MTg4IDE4LjkxNzk2OSAzLjA4MjAzMSAxOS4xMzI4MTIgMy4zNDc2NTYgMTkuMTMyODEyIEwgOS4wODU5MzggMTkuMTMyODEyIEMgOS4zNDc2NTYgMTkuMTMyODEyIDkuNTYyNSAxOC45MTc5NjkgOS41NjI1IDE4LjY1MjM0NCBDIDkuNTYyNSAxOC4zODY3MTkgOS4zNDc2NTYgMTguMTcxODc1IDkuMDg1OTM4IDE4LjE3MTg3NSBaIE0gOS4wODU5MzggMTguMTcxODc1ICIvPgogIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTSAyMC41NjI1IDAgTCAxLjQzNzUgMCBDIDAuNjQ0NTMxIDAgMCAwLjY0NDUzMSAwIDEuNDM3NSBMIDAgMjAuNTYyNSBDIDAgMjEuMzU1NDY5IDAuNjQ0NTMxIDIyIDEuNDM3NSAyMiBMIDIwLjU2MjUgMjIgQyAyMS4zNTU0NjkgMjIgMjIgMjEuMzU1NDY5IDIyIDIwLjU2MjUgTCAyMiAxLjQzNzUgQyAyMiAwLjY0NDUzMSAyMS4zNTU0NjkgMCAyMC41NjI1IDAgWiBNIDIxLjA0Mjk2OSAyMC41NjI1IEMgMjEuMDQyOTY5IDIwLjgyODEyNSAyMC44MjgxMjUgMjEuMDQyOTY5IDIwLjU2MjUgMjEuMDQyOTY5IEwgMS40Mzc1IDIxLjA0Mjk2OSBDIDEuMTcxODc1IDIxLjA0Mjk2OSAwLjk1NzAzMSAyMC44MjgxMjUgMC45NTcwMzEgMjAuNTYyNSBMIDAuOTU3MDMxIDEuNDM3NSBDIDAuOTU3MDMxIDEuMTcxODc1IDEuMTcxODc1IDAuOTU3MDMxIDEuNDM3NSAwLjk1NzAzMSBMIDIwLjU2MjUgMC45NTcwMzEgQyAyMC44MjgxMjUgMC45NTcwMzEgMjEuMDQyOTY5IDEuMTcxODc1IDIxLjA0Mjk2OSAxLjQzNzUgWiBNIDIxLjA0Mjk2OSAyMC41NjI1ICIvPgo8L3N5bWJvbD4KPCEtLSAgLS0+CjxzeW1ib2wgaWQ9ImljLWRlbGV0ZS1hbGwiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik01IDIzSDNhMSAxIDAgMCAxLTEtMVY2aDF2MTZoMnYxem0xNi0xMGgtMVY2aDF2N3pNOSAxM0g4di0zaDF2M3ptMyAwaC0xdi0zaDF2M3ptMyAwaC0xdi0zaDF2M3pNMTQuNzk0IDMuNzk0TDEzIDJoLTNMOC4yMDYgMy43OTRBLjk2My45NjMgMCAwIDEgOCAyLjVsLjcwMy0xLjA1NUExIDEgMCAwIDEgOS41MzUgMWgzLjkzYTEgMSAwIDAgMSAuODMyLjQ0NUwxNSAyLjVhLjk2NS45NjUgMCAwIDEtLjIwNiAxLjI5NHpNMTQuMTk3IDRIOC44MDNoNS4zOTR6Ii8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0wIDNoMjN2MUgwek0xMS4yODYgMjFIOC43MTRMOCAyM0g3bDEtMi44VjIwaC4wNzFMOS41IDE2aDFsMS40MjkgNEgxMnYuMmwxIDIuOGgtMWwtLjcxNC0yem0tLjM1Ny0xTDEwIDE3LjQgOS4wNzEgMjBoMS44NTh6TTIwIDIyaDN2MWgtNHYtN2gxdjZ6bS01IDBoM3YxaC00di03aDF2NnoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWRlbGV0ZSIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTMgNnYxNmgxN1Y2aDF2MTZhMSAxIDAgMCAxLTEgMUgzYTEgMSAwIDAgMS0xLTFWNmgxek0xNC43OTQgMy43OTRMMTMgMmgtM0w4LjIwNiAzLjc5NEEuOTYzLjk2MyAwIDAgMSA4IDIuNWwuNzAzLTEuMDU1QTEgMSAwIDAgMSA5LjUzNSAxaDMuOTNhMSAxIDAgMCAxIC44MzIuNDQ1TDE1IDIuNWEuOTY1Ljk2NSAwIDAgMS0uMjA2IDEuMjk0ek0xNC4xOTcgNEg4LjgwM2g1LjM5NHoiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTAgM2gyM3YxSDB6TTggMTBoMXY2SDh2LTZ6bTMgMGgxdjZoLTF2LTZ6bTMgMGgxdjZoLTF2LTZ6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1kcmF3LWZyZWUiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIGQ9Ik0yLjUgMjAuOTI5QzIuNTk0IDEwLjk3NiA0LjMyMyA2IDcuNjg2IDZjNS44NzIgMCAyLjUyNCAxOSA3LjY5NyAxOXMxLjg5LTE0LjkyOSA2LjQxNC0xNC45MjkgMS4zNTcgMTAuODU4IDUuMTMgMTAuODU4YzEuODAyIDAgMi42NTctMi4yNjIgMi41NjYtNi43ODYiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWRyYXctbGluZSIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgZD0iTTIgMTUuNWgyOCIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtZHJhdyIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgZD0iTTIuNSAyMS41SDVjLjI0NSAwIC40OC0uMDU4LjY5MS0uMTY4bC4xMjQtLjA2NS4xNC4wMWMuNDI5LjAyOC44NS0uMTI3IDEuMTYtLjQzN0wyMi41NSA1LjQwNWEuNS41IDAgMCAwIDAtLjcwN2wtMy4yNDYtMy4yNDVhLjUuNSAwIDAgMC0uNzA3IDBMMy4xNjIgMTYuODg4YTEuNDk1IDEuNDk1IDAgMCAwLS40MzcgMS4xNTVsLjAxLjE0LS4wNjUuMTIzYy0uMTExLjIxMi0uMTcuNDQ4LS4xNy42OTR2Mi41eiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMTYuNDE0IDMuNzA3bDMuODkgMy44OS0uNzA4LjcwNi0zLjg4OS0zLjg4OXoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWZpbHRlciIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTEyIDd2MUgyVjdoMTB6bTYgMGg0djFoLTRWN3pNMTIgMTZ2MWgxMHYtMUgxMnptLTYgMEgydjFoNHYtMXoiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTguNSAyMGEzLjUgMy41IDAgMSAxIDAtNyAzLjUgMy41IDAgMCAxIDAgN3ptMC0xYTIuNSAyLjUgMCAxIDAgMC01IDIuNSAyLjUgMCAwIDAgMCA1ek0xNS41IDExYTMuNSAzLjUgMCAxIDEgMC03IDMuNSAzLjUgMCAwIDEgMCA3em0wLTFhMi41IDIuNSAwIDEgMCAwLTUgMi41IDIuNSAwIDAgMCAwIDV6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1mbGlwLXJlc2V0IiB2aWV3Qm94PSIwIDAgMzEgMzIiPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBkPSJNMzEgMEgwdjMyaDMxeiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMjggMTZhOCA4IDAgMCAxLTggOEgzdi0xaDF2LTdIM2E4IDggMCAwIDEgOC04aDE3djFoLTF2N2gxek0xMSA5YTcgNyAwIDAgMC03IDd2N2gxNmE3IDcgMCAwIDAgNy03VjlIMTF6Ii8+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIGQ9Ik0yNCA1bDMuNSAzLjVMMjQgMTJNNyAyMGwtMy41IDMuNUw3IDI3Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1mbGlwLXgiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGQ9Ik0zMiAzMkgwVjBoMzJ6Ii8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0xNyAzMmgtMVYwaDF6TTI3LjE2NyAxMWwuNSAzaC0xLjAzbC0uNTQ2LTNoMS4wNzZ6bS0uNS0zaC0xLjEyMkwyNSA1aC01VjRoNS4xNTNhMSAxIDAgMCAxIC45ODYuODM2TDI2LjY2NyA4em0xLjUgOWwuNSAzaC0uOTRsLS41NDUtM2guOTg1em0xIDZsLjYzOSAzLjgzNkExIDEgMCAwIDEgMjguODE5IDI4SDI2di0xaDNsLS43MjYtNGguODk0ek0yMyAyOGgtM3YtMWgzdjF6TTEzIDR2MUg3TDMgMjdoMTB2MUgzLjE4YTEgMSAwIDAgMS0uOTg2LTEuMTY0bDMuNjY2LTIyQTEgMSAwIDAgMSA2Ljg0NyA0SDEzeiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtZmxpcC15IiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBkPSJNMCAwdjMyaDMyVjB6Ii8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0wIDE2djFoMzJ2LTF6TTExIDI3LjE2N2wzIC41di0xLjAzbC0zLS41NDZ2MS4wNzZ6bS0zLS41di0xLjEyMkw1IDI1di01SDR2NS4xNTNhMSAxIDAgMCAwIC44MzYuOTg2TDggMjYuNjY3em05IDEuNWwzIC41di0uOTRsLTMtLjU0NXYuOTg1em02IDFsMy44MzYuNjM5QTEgMSAwIDAgMCAyOCAyOC44MlYyNmgtMXYzbC00LS43Mjd2Ljg5NHpNMjggMjN2LTNoLTF2M2gxek00IDEzaDFWN2wyMi00djEwaDFWMy4xOGExIDEgMCAwIDAtMS4xNjQtLjk4NmwtMjIgMy42NjdBMSAxIDAgMCAwIDQgNi44NDdWMTN6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1mbGlwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiAvPgogICAgPHBhdGggZmlsbD0iaW5oZXJpdCIgc3Ryb2tlPSJub25lIiBkPSJNMTEgMGgxdjI0aC0xek0xOSAyMXYtMWgydi0yaDF2MmExIDEgMCAwIDEtMSAxaC0yem0tMiAwaC0zdi0xaDN2MXptNS01aC0xdi0zaDF2M3ptMC01aC0xVjhoMXYzem0wLTVoLTFWNGgtMlYzaDJhMSAxIDAgMCAxIDEgMXYyem0tNS0zdjFoLTNWM2gzek05IDN2MUgydjE2aDd2MUgyYTEgMSAwIDAgMS0xLTFWNGExIDEgMCAwIDEgMS0xaDd6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5IiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBkPSJNMCAwSDI0VjI0SDB6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNzQwIC0xNikgdHJhbnNsYXRlKDU0NyA4KSB0cmFuc2xhdGUoMTkzIDgpIi8+CiAgICA8cGF0aCBmaWxsPSJpbmhlcml0IiBzdHJva2U9Im5vbmUiIGQ9Ik0xMi41IDFDMTguMjk5IDEgMjMgNS43MDEgMjMgMTEuNVMxOC4yOTkgMjIgMTIuNSAyMmMtNS4yOSAwLTkuNjY1LTMuOTExLTEwLjM5NC04Ljk5OWgxLjAxMkMzLjgzOCAxNy41MzQgNy43NjQgMjEgMTIuNSAyMWM1LjI0NyAwIDkuNS00LjI1MyA5LjUtOS41UzE3Ljc0NyAyIDEyLjUgMkM4LjQ5IDIgNS4wNiA0LjQ4NSAzLjY2NiA4SDNoNHYxSDJWNGgxdjMuMDIyQzQuNjggMy40NjIgOC4zMDMgMSAxMi41IDF6bS41IDVsLS4wMDEgNS4yOTEgMi41MzcgMi41MzctLjcwOC43MDhMMTIuMjkyIDEySDEyVjZoMXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC03NDAgLTE2KSB0cmFuc2xhdGUoNTQ3IDgpIHRyYW5zbGF0ZSgxOTMgOCkiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWhpc3RvcnktY2hlY2siIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiID4KICAgICAgICA8cGF0aCBzdHJva2U9IiM1NTU1NTUiIGQ9Ik00LjUgLTFMMS41IDIgNi41IDciIHRyYW5zZm9ybT0idHJhbnNsYXRlKC02MCAtODA0KSB0cmFuc2xhdGUoNjAgODA0KSB0cmFuc2xhdGUoMiAzKSByb3RhdGUoLTkwIDQgMykiIC8+CiAgICA8L2c+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5LWNyb3AiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgICAgIDxwYXRoIGQ9Ik0wIDBIMTJWMTJIMHoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC04NCAtODA0KSB0cmFuc2xhdGUoODQgODA0KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0yIDBoMXYxMGMtLjU1MiAwLTEtLjQ0OC0xLTFWMHpNMTAgOXYzSDlWOWgxek05IDJoMXY2SDlWMnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC04NCAtODA0KSB0cmFuc2xhdGUoODQgODA0KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0yIDlIMTJWMTBIMnpNOSAyYy41MTMgMCAuOTM2LjM4Ni45OTMuODgzTDEwIDNIM1YyaDZ6TTIgM0gwVjJoMnYxeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTg0IC04MDQpIHRyYW5zbGF0ZSg4NCA4MDQpIi8+CiAgICA8L2c+Cjwvc3ltYm9sPgo8IS0tIFRoaXMgaWNvbiBtYWRlIGJ5IFBpeGVsIHBlcmZlY3QgZnJvbSB3d3cuZmxhdGljb24uY29tIC0tPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5LXJlc2l6ZSIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTSA5LjQ5MjE4OCAxLjUwNzgxMiBDIDkuMzk4NDM4IDEuNDE0MDYyIDkuMjUgMS40MTQwNjIgOS4xNTYyNSAxLjUwNzgxMiBMIDUuODEyNSA0Ljg1MTU2MiBDIDUuNzE0ODQ0IDQuOTQ1MzEyIDUuNzE0ODQ0IDUuMDk3NjU2IDUuODEyNSA1LjE4NzUgQyA1Ljg1NTQ2OSA1LjIzNDM3NSA1LjkxNzk2OSA1LjI1NzgxMiA1Ljk3NjU2MiA1LjI1NzgxMiBDIDYuMDM5MDYyIDUuMjU3ODEyIDYuMTAxNTYyIDUuMjM0Mzc1IDYuMTQ4NDM4IDUuMTg3NSBMIDkuNDkyMTg4IDEuODQzNzUgQyA5LjU4NTkzOCAxLjc1IDkuNTg1OTM4IDEuNjAxNTYyIDkuNDkyMTg4IDEuNTA3ODEyIFogTSA5LjQ5MjE4OCAxLjUwNzgxMiAiLz4KICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0gOS4zMjgxMjUgMS40MzM1OTQgQyA5LjE5NTMxMiAxLjQzMzU5NCA5LjA4NTkzOCAxLjUzOTA2MiA5LjA4NTkzOCAxLjY3MTg3NSBMIDkuMDg1OTM4IDQuNTQyOTY5IEMgOS4wODU5MzggNC42NzE4NzUgOS4xOTUzMTIgNC43ODEyNSA5LjMyODEyNSA0Ljc4MTI1IEMgOS40NjA5MzggNC43ODEyNSA5LjU2NjQwNiA0LjY3MTg3NSA5LjU2NjQwNiA0LjU0Mjk2OSBMIDkuNTY2NDA2IDEuNjcxODc1IEMgOS41NjY0MDYgMS41MzkwNjIgOS40NjA5MzggMS40MzM1OTQgOS4zMjgxMjUgMS40MzM1OTQgWiBNIDkuMzI4MTI1IDEuNDMzNTk0ICIvPgogICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTSA5LjMyODEyNSAxLjQzMzU5NCBMIDYuNDU3MDMxIDEuNDMzNTk0IEMgNi4zMjgxMjUgMS40MzM1OTQgNi4yMTg3NSAxLjUzOTA2MiA2LjIxODc1IDEuNjcxODc1IEMgNi4yMTg3NSAxLjgwNDY4OCA2LjMyODEyNSAxLjkxNDA2MiA2LjQ1NzAzMSAxLjkxNDA2MiBMIDkuMzI4MTI1IDEuOTE0MDYyIEMgOS40NjA5MzggMS45MTQwNjIgOS41NjY0MDYgMS44MDQ2ODggOS41NjY0MDYgMS42NzE4NzUgQyA5LjU2NjQwNiAxLjUzOTA2MiA5LjQ2MDkzOCAxLjQzMzU5NCA5LjMyODEyNSAxLjQzMzU5NCBaIE0gOS4zMjgxMjUgMS40MzM1OTQgIi8+CiAgICA8cGF0aCBmaWxsPSIjNDM0MzQzIiBkPSJNIDUuMTg3NSA1LjgxMjUgQyA1LjA5NzY1NiA1LjcxODc1IDQuOTQ1MzEyIDUuNzE4NzUgNC44NTE1NjIgNS44MTI1IEwgMS41MDM5MDYgOS4xNTYyNSBDIDEuNDEwMTU2IDkuMjUgMS40MTAxNTYgOS40MDIzNDQgMS41MDM5MDYgOS40OTYwOTQgQyAxLjU1NDY4OCA5LjU0Mjk2OSAxLjYxMzI4MSA5LjU2NjQwNiAxLjY3MTg3NSA5LjU2NjQwNiBDIDEuNzM0Mzc1IDkuNTY2NDA2IDEuNzk2ODc1IDkuNTQyOTY5IDEuODQzNzUgOS40OTYwOTQgTCA1LjE4NzUgNi4xNDg0MzggQyA1LjI4MTI1IDYuMDU0Njg4IDUuMjgxMjUgNS45MDIzNDQgNS4xODc1IDUuODEyNSBaIE0gNS4xODc1IDUuODEyNSAiLz4KICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0gMS42NzE4NzUgNi4yMTg3NSBDIDEuNTM5MDYyIDYuMjE4NzUgMS40MzM1OTQgNi4zMjgxMjUgMS40MzM1OTQgNi40NTcwMzEgTCAxLjQzMzU5NCA5LjMyODEyNSBDIDEuNDMzNTk0IDkuNDYwOTM4IDEuNTM5MDYyIDkuNTY2NDA2IDEuNjcxODc1IDkuNTY2NDA2IEMgMS44MDQ2ODggOS41NjY0MDYgMS45MTQwNjIgOS40NjA5MzggMS45MTQwNjIgOS4zMjgxMjUgTCAxLjkxNDA2MiA2LjQ1NzAzMSBDIDEuOTE0MDYyIDYuMzI4MTI1IDEuODA0Njg4IDYuMjE4NzUgMS42NzE4NzUgNi4yMTg3NSBaIE0gMS42NzE4NzUgNi4yMTg3NSAiLz4KICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0gNC41NDI5NjkgOS4wODU5MzggTCAxLjY3MTg3NSA5LjA4NTkzOCBDIDEuNTM5MDYyIDkuMDg1OTM4IDEuNDMzNTk0IDkuMTk1MzEyIDEuNDMzNTk0IDkuMzI4MTI1IEMgMS40MzM1OTQgOS40NjA5MzggMS41MzkwNjIgOS41NjY0MDYgMS42NzE4NzUgOS41NjY0MDYgTCA0LjU0Mjk2OSA5LjU2NjQwNiBDIDQuNjcxODc1IDkuNTY2NDA2IDQuNzgxMjUgOS40NjA5MzggNC43ODEyNSA5LjMyODEyNSBDIDQuNzgxMjUgOS4xOTUzMTIgNC42NzE4NzUgOS4wODU5MzggNC41NDI5NjkgOS4wODU5MzggWiBNIDQuNTQyOTY5IDkuMDg1OTM4ICIvPgogICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTSAxMC4yODEyNSAwIEwgMC43MTg3NSAwIEMgMC4zMjAzMTIgMCAwIDAuMzIwMzEyIDAgMC43MTg3NSBMIDAgMTAuMjgxMjUgQyAwIDEwLjY3OTY4OCAwLjMyMDMxMiAxMSAwLjcxODc1IDExIEwgMTAuMjgxMjUgMTEgQyAxMC42Nzk2ODggMTEgMTEgMTAuNjc5Njg4IDExIDEwLjI4MTI1IEwgMTEgMC43MTg3NSBDIDExIDAuMzIwMzEyIDEwLjY3OTY4OCAwIDEwLjI4MTI1IDAgWiBNIDEwLjUyMzQzOCAxMC4yODEyNSBDIDEwLjUyMzQzOCAxMC40MTQwNjIgMTAuNDE0MDYyIDEwLjUyMzQzOCAxMC4yODEyNSAxMC41MjM0MzggTCAwLjcxODc1IDEwLjUyMzQzOCBDIDAuNTg1OTM4IDEwLjUyMzQzOCAwLjQ3NjU2MiAxMC40MTQwNjIgMC40NzY1NjIgMTAuMjgxMjUgTCAwLjQ3NjU2MiAwLjcxODc1IEMgMC40NzY1NjIgMC41ODU5MzggMC41ODU5MzggMC40NzY1NjIgMC43MTg3NSAwLjQ3NjU2MiBMIDEwLjI4MTI1IDAuNDc2NTYyIEMgMTAuNDE0MDYyIDAuNDc2NTYyIDEwLjUyMzQzOCAwLjU4NTkzOCAxMC41MjM0MzggMC43MTg3NSBaIE0gMTAuNTIzNDM4IDEwLjI4MTI1ICIvPgogIDwvZz4KPC9zeW1ib2w+CjwhLS0gIC0tPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5LWRyYXciIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgICAgIDxwYXRoIGQ9Ik0wIDFIMTJWMTNIMHoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNTYgLTgwNCkgdHJhbnNsYXRlKDE1NiA4MDMpIi8+CiAgICAgICAgPHBhdGggc3Ryb2tlPSIjNDM0MzQzIiBkPSJNOS42MjIgMS41ODRsMS44MzUgMS42NTgtOC4zMSA4LjQwN0wuNSAxMi41VjExbDkuMTIyLTkuNDE2eiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE1NiAtODA0KSB0cmFuc2xhdGUoMTU2IDgwMykiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjNDM0MzQzIiBkPSJNNy42MjggMy43NTNMMTAuMzc4IDMuNzUzIDEwLjM3OCA0LjI1MyA3LjYyOCA0LjI1M3oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNTYgLTgwNCkgdHJhbnNsYXRlKDE1NiA4MDMpIHJvdGF0ZSg0NSA5LjAwMyA0LjAwMykiLz4KICAgIDwvZz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWhpc3RvcnktZmlsdGVyIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiID4KICAgICAgICA8cGF0aCBkPSJNMCAwSDEyVjEySDB6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjc2IC04MDQpIHRyYW5zbGF0ZSgyNzYgODA0KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0xMiAzdjFIOVYzaDN6TTcgNEgwVjNoN3YxeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI3NiAtODA0KSB0cmFuc2xhdGUoMjc2IDgwNCkiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjNDM0MzQzIiBkPSJNMTIgOHYxSDlWOGgzek03IDlIMFY4aDd2MXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yNzYgLTgwNCkgdHJhbnNsYXRlKDI3NiA4MDQpIG1hdHJpeCgtMSAwIDAgMSAxMiAwKSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik04IDFjMS4xMDUgMCAyIC44OTUgMiAycy0uODk1IDItMiAyLTItLjg5NS0yLTIgLjg5NS0yIDItMnptMCAxYy0uNTUyIDAtMSAuNDQ4LTEgMXMuNDQ4IDEgMSAxIDEtLjQ0OCAxLTEtLjQ0OC0xLTEtMXpNNCA3YzEuMTA1IDAgMiAuODk1IDIgMnMtLjg5NSAyLTIgMi0yLS44OTUtMi0yIC44OTUtMiAyLTJ6bTAgMWMtLjU1MiAwLTEgLjQ0OC0xIDFzLjQ0OCAxIDEgMSAxLS40NDggMS0xLS40NDgtMS0xLTF6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjc2IC04MDQpIHRyYW5zbGF0ZSgyNzYgODA0KSIvPgogICAgPC9nPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaGlzdG9yeS1mbGlwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiID4KICAgICAgICA8cGF0aCBkPSJNMCAwSDEyVjEySDB6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTA4IC04MDQpIHRyYW5zbGF0ZSgxMDggODA0KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik02IDBMNyAwIDcgMTIgNiAxMnpNMTEgMTBWOWgxdjEuNWMwIC4yNzYtLjIyNC41LS41LjVIMTB2LTFoMXpNNSAxdjFIMXY4aDR2MUguNWMtLjI3NiAwLS41LS4yMjQtLjUtLjV2LTljMC0uMjc2LjIyNC0uNS41LS41SDV6bTcgNXYyaC0xVjZoMXptMC0zdjJoLTFWM2gxek05IDF2MUg3VjFoMnptMi41IDBjLjI3NiAwIC41LjIyNC41LjVWMmgtMlYxaDEuNXpNOSAxMUg3di0xaDJ2MXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDggLTgwNCkgdHJhbnNsYXRlKDEwOCA4MDQpIi8+CiAgICA8L2c+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5LWljb24iIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgICAgIDxwYXRoIGQ9Ik0wIDBIMTJWMTJIMHoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMDQgLTgwNCkgdHJhbnNsYXRlKDIwNCA4MDQpIi8+CiAgICAgICAgPHBhdGggc3Ryb2tlPSIjNDM0MzQzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS4xIiBkPSJNNiA5LjU2OEwyLjYwMSAxMSAyLjk3NSA3LjQ2NyAwLjUgNC44MiA0LjEzIDQuMDY4IDYgMSA3Ljg3IDQuMDY4IDExLjUgNC44MiA5LjAyNSA3LjQ2NyA5LjM5OSAxMXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMDQgLTgwNCkgdHJhbnNsYXRlKDIwNCA4MDQpIi8+CiAgICA8L2c+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5LW1hc2siIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yNTIgLTgwNCkgdHJhbnNsYXRlKDI1MiA4MDQpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTAgMEgxMlYxMkgweiIvPgogICAgICAgICAgICA8Y2lyY2xlIGN4PSI2IiBjeT0iNiIgcj0iMi41IiBzdHJva2U9IiM0NDQiLz4KICAgICAgICAgICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTTExLjUgMGMuMjc2IDAgLjUuMjI0LjUuNXYxMWMwIC4yNzYtLjIyNC41LS41LjVILjVjLS4yNzYgMC0uNS0uMjI0LS41LS41Vi41QzAgLjIyNC4yMjQgMCAuNSAwaDExek0xMSAxSDF2MTBoMTBWMXoiLz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1oaXN0b3J5LXJvdGF0ZSIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxkZWZzPgogICAgICAgIDxwYXRoIGlkPSJyZm40cnlsZmZhIiBkPSJNNyAxMmMtLjMzNSAwLS42NjMtLjAyNS0uOTgzLS4wNzRDMy4xNzEgMTEuNDkyIDEgOS4yMDUgMSA2LjQ0NGMwLTEuMzYzLjUzNC0yLjYxMyAxLjQxNS0zLjU4Ii8+CiAgICAgICAgPG1hc2sgaWQ9IjZmOWduMmR5c2IiIHdpZHRoPSI2IiBoZWlnaHQ9IjkuMTM2IiB4PSIwIiB5PSIwIiBtYXNrVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94Ij4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjcmZuNHJ5bGZmYSIgc3Ryb2tlPSI0MzQzNDMiLz4KICAgICAgICA8L21hc2s+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzIgLTgwNCkgdHJhbnNsYXRlKDEzMiA4MDQpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTAgMC41SDEyVjEyLjVIMHoiLz4KICAgICAgICAgICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTTYuNSAxQzkuNTM4IDEgMTIgMy40NjIgMTIgNi41YzAgMi4zNy0xLjUgNC4zOS0zLjYgNS4xNjNsLS40MDctLjkxNkM5Ljc0NCAxMC4xMyAxMSA4LjQ2MiAxMSA2LjUgMTEgNC4wMTUgOC45ODUgMiA2LjUgMmMtLjc3NyAwLTEuNTA5LjE5Ny0yLjE0Ny41NDRMNCAxLjc1bC0uMjA1LS4wNEM0LjU5NCAxLjI1OCA1LjUxNyAxIDYuNSAxeiIvPgogICAgICAgICAgICA8dXNlIHN0cm9rZT0iIzQzNDM0MyIgc3Ryb2tlLWRhc2hhcnJheT0iMiAxLjI1IiBzdHJva2Utd2lkdGg9IjEiIG1hc2s9InVybCgjNmY5Z24yZHlzYikiIHhsaW5rOmhyZWY9IiNyZm40cnlsZmZhIi8+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik00LjI3OSAwTDYgMS43NSA0LjI1IDMuNTcxIDMuNTQzIDIuODY0IDQuNTg2IDEuNzUgMy41NzIgMC43MDd6IiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgMSA5LjU0MyAwKSIvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWhpc3Rvcnktc2hhcGUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgPgogICAgICAgIDxwYXRoIGQ9Ik0wIDBIMTJWMTJIMHoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xODAgLTgwNCkgdHJhbnNsYXRlKDE4MCA4MDQpIi8+CiAgICAgICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTTExLjUgNGMuMjc2IDAgLjUuMjI0LjUuNXY3YzAgLjI3Ni0uMjI0LjUtLjUuNWgtN2MtLjI3NiAwLS41LS4yMjQtLjUtLjVWOC44aDFWMTFoNlY1SDguMzQxbC0uNTY4LTFIMTEuNXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xODAgLTgwNCkgdHJhbnNsYXRlKDE4MCA4MDQpIi8+CiAgICAgICAgPHBhdGggc3Ryb2tlPSIjNDM0MzQzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik00LjUgMC41TDguNSA3LjYxMSAwLjUgNy42MTF6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTgwIC04MDQpIHRyYW5zbGF0ZSgxODAgODA0KSIvPgogICAgPC9nPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaGlzdG9yeS10ZXh0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiID4KICAgICAgICA8cGF0aCBkPSJNMCAwSDEyVjEySDB6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjI4IC04MDQpIHRyYW5zbGF0ZSgyMjggODA0KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0yIDFoOGMuNTUyIDAgMSAuNDQ4IDEgMUgxYzAtLjU1Mi40NDgtMSAxLTF6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjI4IC04MDQpIHRyYW5zbGF0ZSgyMjggODA0KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik0xIDFIMlYzSDF6TTEwIDFIMTFWM0gxMHpNNS41IDFMNi41IDEgNi41IDExIDUuNSAxMXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMjggLTgwNCkgdHJhbnNsYXRlKDIyOCA4MDQpIi8+CiAgICAgICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTTQgMTBIOFYxMUg0eiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyOCAtODA0KSB0cmFuc2xhdGUoMjI4IDgwNCkiLz4KICAgIDwvZz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWhpc3RvcnktbG9hZCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxnIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8cGF0aCBkPSJNMCAwSDEyVjEySDB6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzI0IC04MDUpIHRyYW5zbGF0ZSgzMjQgODA1KSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiM0MzQzNDMiIGQ9Ik01IDBjLjU1MiAwIDEgLjQ0OCAxIDF2MWg1LjVjLjI3NiAwIC41LjIyNC41LjV2OGMwIC4yNzYtLjIyNC41LS41LjVILjVjLS4yNzYgMC0uNS0uMjI0LS41LS41VjFjMC0uNTUyLjQ0OC0xIDEtMWg0em0wIDFIMXY5aDEwVjNINVYxeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMyNCAtODA1KSB0cmFuc2xhdGUoMzI0IDgwNSkiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjNDM0MzQzIiBkPSJNMSAyTDUgMiA1IDMgMSAzeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMyNCAtODA1KSB0cmFuc2xhdGUoMzI0IDgwNSkiLz4KICAgIDwvZz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWhpc3RvcnktZGVsZXRlIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGZpbGw9IiM0MzQzNDMiPgogICAgICAgICAgICA8cGF0aCBkPSJNMiA5aDhWMWgxdjguNWMwIC4yNzYtLjIyNC41LS41LjVoLTljLS4yNzYgMC0uNS0uMjI0LS41LS41VjFoMXY4ek0wIDBIMTJWMUgweiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMwMCAtODA0KSB0cmFuc2xhdGUoMzAwIDgwNCkgdHJhbnNsYXRlKDAgMikiLz4KICAgICAgICAgICAgPHBhdGggZD0iTTQgM0g1VjdINHpNNyAzSDhWN0g3eiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMwMCAtODA0KSB0cmFuc2xhdGUoMzAwIDgwNCkgdHJhbnNsYXRlKDAgMikiLz4KICAgICAgICAgICAgPHBhdGggZD0iTTQgMWg0VjBoMXYxLjVjMCAuMjc2LS4yMjQuNS0uNS41aC01Yy0uMjc2IDAtLjUtLjIyNC0uNS0uNVYwaDF2MXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zMDAgLTgwNCkgdHJhbnNsYXRlKDMwMCA4MDQpIG1hdHJpeCgxIDAgMCAtMSAwIDIpIi8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaGlzdG9yeS1ncm91cCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxnIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzQ4IC04MDQpIHRyYW5zbGF0ZSgzNDggODA0KSI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wIDBIMTJWMTJIMHoiLz4KICAgICAgICAgICAgPHBhdGggZmlsbD0iIzQzNDM0MyIgZD0iTTEgOXYyaDF2MUguNWMtLjI3NiAwLS41LS4yMjQtLjUtLjVWOWgxem0xMSAxdjEuNWMwIC4yNzYtLjIyNC41LS41LjVIOXYtMWgydi0xaDF6bS00IDF2MUg2di0xaDJ6bS0zIDB2MUgzdi0xaDJ6bTctNHYyaC0xVjdoMXpNMSA2djJIMFY2aDF6bTExLTJ2MmgtMVY0aDF6TTEgM3YySDBWM2gxem0xMC41LTNjLjI3NiAwIC41LjIyNC41LjVWM2gtMVYxaC0xVjBoMS41ek02IDB2MUg0VjBoMnptMyAwdjFIN1YwaDJ6TTAgLjVDMCAuMjI0LjIyNCAwIC41IDBIM3YxSDF2MUgwVi41ek05LjUgNGMuMjc2IDAgLjUuMjI0LjUuNXY1YzAgLjI3Ni0uMjI0LjUtLjUuNWgtNWMtLjI3NiAwLS41LS4yMjQtLjUtLjVWOC4zNTVjLjMxNy4wOTQuNjUyLjE0NSAxIC4xNDVWOWg0VjVoLS41YzAtLjM0OC0uMDUtLjY4My0uMTQ1LTFIOS41eiIvPgogICAgICAgICAgICA8Y2lyY2xlIGN4PSI1IiBjeT0iNSIgcj0iMi41IiBzdHJva2U9IiM0MzQzNDMiLz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1pY29uLWFycm93LTIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTIxLjc5MyAxOC41SDIuNXYtNWgxOC45MzVsLTcuNi04aDUuODcybDEwLjUgMTAuNS0xMC41IDEwLjVoLTUuOTE0bDgtOHoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWljb24tYXJyb3ctMyIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMjUuMjg4IDE2LjQyTDE0LjIwOCAyNy41SDYuNzkybDExLjI5MS0xMS4yOTFMNi44MjYgNC41aDcuMzgxbDExLjY2MSAxMS42NjEtLjU4LjI1OHoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWljb24tYXJyb3ciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIGQ9Ik0yLjUgMTEuNXY5aDE4djUuMjkzTDMwLjI5MyAxNiAyMC41IDYuMjA3VjExLjVoLTE4eiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaWNvbi1idWJibGUiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTIyLjIwNyAyNC41TDE2LjUgMzAuMjA3VjI0LjVIOEE2LjUgNi41IDAgMCAxIDEuNSAxOFY5QTYuNSA2LjUgMCAwIDEgOCAyLjVoMTZBNi41IDYuNSAwIDAgMSAzMC41IDl2OWE2LjUgNi41IDAgMCAxLTYuNSA2LjVoLTEuNzkzeiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaWNvbi1oZWFydCIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBkPSJNMTUuOTk2IDMwLjY3NWwxLjk4MS0xLjc5YzcuODk4LTcuMTc3IDEwLjM2NS05LjcxOCAxMi4xMzUtMTMuMDEyLjkyMi0xLjcxNiAxLjM3Ny0zLjM3IDEuMzc3LTUuMDc2IDAtNC42NS0zLjY0Ny04LjI5Ny04LjI5Ny04LjI5Ny0yLjMzIDAtNC44NiAxLjUyNy02LjgxNyAzLjgyNGwtLjM4LjQ0Ny0uMzgxLS40NDdDMTMuNjU4IDQuMDI3IDExLjEyNiAyLjUgOC43OTcgMi41IDQuMTQ3IDIuNS41IDYuMTQ3LjUgMTAuNzk3YzAgMS43MTQuNDYgMy4zNzUgMS4zODkgNS4wOTggMS43NzUgMy4yODggNC4yNiA1Ljg0MyAxMi4xMjMgMTIuOTc0bDEuOTg0IDEuODA2eiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaWNvbi1sb2FkIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xNy4zMTQgMTguODY3bDEuOTUxLTIuNTMgNCA1LjE4NGgtMTdsNi41LTguODQgNC41NDkgNi4xODZ6Ii8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0xOC4wMSA0YTExLjc5OCAxMS43OTggMCAwIDAgMCAxSDN2MjRoMjRWMTQuOTg2YTguNzM4IDguNzM4IDAgMCAwIDEgMFYyOWExIDEgMCAwIDEtMSAxSDNhMSAxIDAgMCAxLTEtMVY1YTEgMSAwIDAgMSAxLTFoMTUuMDF6Ii8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0yNSAzaDF2OWgtMXoiLz4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgZD0iTTIyIDZsMy41LTMuNUwyOSA2Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1pY29uLWxvY2F0aW9uIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBkPSJNMTYgMzEuMjhDMjMuNjc1IDIzLjMwMiAyNy41IDE3LjE4MSAyNy41IDEzYzAtNi4zNTEtNS4xNDktMTEuNS0xMS41LTExLjVTNC41IDYuNjQ5IDQuNSAxM2MwIDQuMTgxIDMuODI1IDEwLjMwMiAxMS41IDE4LjI4eiIvPgogICAgPGNpcmNsZSBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIGN4PSIxNiIgY3k9IjEzIiByPSI0LjUiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLWljb24tcG9seWdvbiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgZD0iTS41NzYgMTZMOC4yOSAyOS41aDE1LjQyTDMxLjQyNCAxNiAyMy43MSAyLjVIOC4yOUwuNTc2IDE2eiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaWNvbi1zdGFyLTIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIGQ9Ik0xOS40NDYgMzEuNTkybDIuMjY1LTMuMjcyIDMuOTQ2LjI1LjYzNi0zLjk0IDMuNjY1LTEuNTA1LTEuMTItMy44MzIgMi42NTUtMi45NjItMi42NTYtMi45NjIgMS4xMi0zLjgzMi0zLjY2NC0xLjUwNS0uNjM2LTMuOTQxLTMuOTQ2LjI1LTIuMjY1LTMuMjcxTDE2IDMuMDI0IDEyLjU1NCAxLjA3IDEwLjI4OSA0LjM0bC0zLjk0Ni0uMjUtLjYzNiAzLjk0MS0zLjY2NSAxLjUwNSAxLjEyIDMuODMyTC41MDggMTYuMzNsMi42NTYgMi45NjItMS4xMiAzLjgzMiAzLjY2NCAxLjUwNC42MzYgMy45NDIgMy45NDYtLjI1IDIuMjY1IDMuMjdMMTYgMjkuNjM4bDMuNDQ2IDEuOTU1eiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaWNvbi1zdGFyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBkPSJNMjUuMjkyIDI5Ljg3OGwtMS43NzUtMTAuMzQ2IDcuNTE3LTcuMzI3LTEwLjM4OC0xLjUxTDE2IDEuMjgybC00LjY0NiA5LjQxMy0xMC4zODggMS41MSA3LjUxNyA3LjMyNy0xLjc3NSAxMC4zNDZMMTYgMjQuOTkzbDkuMjkyIDQuODg1eiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtaWNvbiIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTEuOTIzIDE5LjEzNkw1LjQyNCAyMmwuNzE1LTcuMDY1LTQuNzMxLTUuMjk2IDYuOTQtMS41MDNMMTEuOTIzIDJsMy41NzQgNi4xMzYgNi45NCAxLjUwMy00LjczMSA1LjI5NkwxOC40MiAyMnoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLW1hc2stbG9hZCIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0ibm9uZSIgZD0iTTAgMGgzMnYzMkgweiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMTguMDEgNGExMS43OTggMTEuNzk4IDAgMCAwIDAgMUgzdjI0aDI0VjE0Ljk4NmE4LjczOCA4LjczOCAwIDAgMCAxIDBWMjlhMSAxIDAgMCAxLTEgMUgzYTEgMSAwIDAgMS0xLTFWNWExIDEgMCAwIDEgMS0xaDE1LjAxek0xNSAyM2E2IDYgMCAxIDEgMC0xMiA2IDYgMCAwIDEgMCAxMnptMC0xYTUgNSAwIDEgMCAwLTEwIDUgNSAwIDAgMCAwIDEweiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMjUgM2gxdjloLTF6Ii8+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIGQ9Ik0yMiA2bDMuNS0zLjVMMjkgNiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtbWFzayIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjQuNSIgc3Ryb2tlPSJpbmhlcml0IiBmaWxsPSJub25lIi8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0yIDFoMjBhMSAxIDAgMCAxIDEgMXYyMGExIDEgMCAwIDEtMSAxSDJhMSAxIDAgMCAxLTEtMVYyYTEgMSAwIDAgMSAxLTF6bTAgMXYyMGgyMFYySDJ6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1yZWRvIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgb3BhY2l0eT0iLjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTIxIDZIOWE2IDYgMCAxIDAgMCAxMmgxMnYxSDlBNyA3IDAgMCAxIDkgNWgxMnYxeiIvPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBkPSJNMTkgM2wyLjUgMi41TDE5IDgiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLXJlc2V0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgb3BhY2l0eT0iLjUiIHN0cm9rZT0ibm9uZSIgZmlsbD0ibm9uZSIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMiAxM3YtMWE3IDcgMCAwIDEgNy03aDEzdjFoLTF2NWgxdjFhNyA3IDAgMCAxLTcgN0gydi0xaDF2LTVIMnptNy03YTYgNiAwIDAgMC02IDZ2NmgxMmE2IDYgMCAwIDAgNi02VjZIOXoiLz4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iaW5oZXJpdCIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgZD0iTTE5IDNsMi41IDIuNUwxOSA4TTUgMTZsLTIuNSAyLjVMNSAyMSIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtcm90YXRlLWNsb2Nrd2lzZSIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTI5IDE3aC0uOTI0YzAgNi42MjctNS4zNzMgMTItMTIgMTItNi42MjggMC0xMi01LjM3My0xMi0xMkM0LjA3NiAxMC4zOTggOS40MDcgNS4wNDEgMTYgNVY0QzguODIgNCAzIDkuODIgMyAxN3M1LjgyIDEzIDEzIDEzIDEzLTUuODIgMTMtMTN6Ii8+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIGQ9Ik0xNiAxLjVsNCAzLTQgMyIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0xNiA0aDR2MWgtNHoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLXJvdGF0ZS1jb3VudGVyY2xvY2t3aXNlIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBkPSJNMyAxN2guOTI0YzAgNi42MjcgNS4zNzMgMTIgMTIgMTIgNi42MjggMCAxMi01LjM3MyAxMi0xMiAwLTYuNjAyLTUuMzMxLTExLjk2LTExLjkyNC0xMlY0YzcuMTggMCAxMyA1LjgyIDEzIDEzcy01LjgyIDEzLTEzIDEzUzMgMjQuMTggMyAxN3oiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTIgNGg0djFoLTR6Ii8+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIGQ9Ik0xNiAxLjVsLTQgMyA0IDMiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLXJvdGF0ZSIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgLz4KICAgIDxwYXRoIGZpbGw9ImluaGVyaXQiIHN0cm9rZT0ibm9uZSIgZD0iTTguMzQ5IDIyLjI1NGExMC4wMDIgMTAuMDAyIDAgMCAxLTIuNzc4LTEuNzE5bC42NS0uNzZhOS4wMDIgOS4wMDIgMCAwIDAgMi40OTUgMS41NDhsLS4zNjcuOTMxem0yLjg3My43MDRsLjA3OC0uOTk3YTkgOSAwIDEgMC0uNTU3LTE3Ljg1MmwtLjE0LS45OUExMC4wNzYgMTAuMDc2IDAgMCAxIDEyLjE0NSAzYzUuNTIzIDAgMTAgNC40NzcgMTAgMTBzLTQuNDc3IDEwLTEwIDEwYy0uMzEyIDAtLjYyLS4wMTQtLjkyNC0uMDQyem0tNy41NTYtNC42NTVhOS45NDIgOS45NDIgMCAwIDEtMS4yNTMtMi45OTZsLjk3My0uMjM0YTguOTQ4IDguOTQ4IDAgMCAwIDEuMTI0IDIuNjkzbC0uODQ0LjUzN3ptLTEuNTAyLTUuOTFBOS45NDkgOS45NDkgMCAwIDEgMi44OCA5LjIzbC45MjUuMzgyYTguOTU0IDguOTU0IDAgMCAwLS42NDQgMi44NDRsLS45OTgtLjA2MnptMi4yMS01LjY4NmMuNjg3LS44NDggMS41MS0xLjU4IDIuNDM2LTIuMTY2bC41MjMuODUyYTkuMDQ4IDkuMDQ4IDAgMCAwLTIuMTg4IDEuOTVsLS43NzEtLjYzNnoiLz4KICAgIDxwYXRoIHN0cm9rZT0iaW5oZXJpdCIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgZD0iTTEzIDFsLTIuNSAyLjVMMTMgNiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtc2hhcGUtY2lyY2xlIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTQuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1zaGFwZS1yZWN0YW5nbGUiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cmVjdCB3aWR0aD0iMjciIGhlaWdodD0iMjciIHg9IjIuNSIgeT0iMi41IiBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHJ4PSIxIi8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1zaGFwZS10cmlhbmdsZSIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTE2IDIuNWwxNS41IDI3SC41eiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtc2hhcGUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0xNC43MDYgOEgyMWExIDEgMCAwIDEgMSAxdjEyYTEgMSAwIDAgMS0xIDFIOWExIDEgMCAwIDEtMS0xdi00aDF2NGgxMlY5aC01LjcwNmwtLjU4OC0xeiIvPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik04LjUgMS41bDcuNSAxM0gxeiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtdGV4dC1hbGlnbi1jZW50ZXIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9Im5vbmUiIGQ9Ik0wIDBoMzJ2MzJIMHoiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTIgNWgyOHYxSDJ6TTggMTJoMTZ2MUg4ek0yIDE5aDI4djFIMnpNOCAyNmgxNnYxSDh6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy10ZXh0LWFsaWduLWxlZnQiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9Im5vbmUiIGQ9Ik0wIDBoMzJ2MzJIMHoiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTIgNWgyOHYxSDJ6TTIgMTJoMTZ2MUgyek0yIDE5aDI4djFIMnpNMiAyNmgxNnYxSDJ6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy10ZXh0LWFsaWduLXJpZ2h0IiB2aWV3Qm94PSIwIDAgMzIgMzIiPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJub25lIiBkPSJNMCAwaDMydjMySDB6Ii8+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9ImluaGVyaXQiIGQ9Ik0yIDVoMjh2MUgyek0xNCAxMmgxNnYxSDE0ek0yIDE5aDI4djFIMnpNMTQgMjZoMTZ2MUgxNHoiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLXRleHQtYm9sZCIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgZD0iTTAgMGgzMnYzMkgweiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNNyAyaDJ2Mkg3ek03IDI4aDJ2Mkg3eiIvPgogICAgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJpbmhlcml0IiBzdHJva2Utd2lkdGg9IjIiIGQ9Ik05IDN2MTJoOWE2IDYgMCAxIDAgMC0xMkg5ek05IDE1djE0aDEwYTcgNyAwIDAgMCAwLTE0SDl6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy10ZXh0LWl0YWxpYyIgdmlld0JveD0iMCAwIDMyIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgZD0iTTAgMGgzMnYzMkgweiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMTUgMmg1djFoLTV6TTExIDI5aDV2MWgtNXpNMTcgM2gxbC00IDI2aC0xeiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtdGV4dC11bmRlcmxpbmUiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8cGF0aCBzdHJva2U9Im5vbmUiIGZpbGw9Im5vbmUiIGQ9Ik0wIDBoMzJ2MzJIMHoiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTggMnYxNGE4IDggMCAxIDAgMTYgMFYyaDF2MTRhOSA5IDAgMCAxLTE4IDBWMmgxek0zIDI5aDI2djFIM3oiLz4KICAgIDxwYXRoIHN0cm9rZT0ibm9uZSIgZmlsbD0iaW5oZXJpdCIgZD0iTTUgMmg1djFINXpNMjIgMmg1djFoLTV6Ii8+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy10ZXh0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNNCAzaDE1YTEgMSAwIDAgMSAxIDFIM2ExIDEgMCAwIDEgMS0xek0zIDRoMXYxSDN6TTE5IDRoMXYxaC0xeiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMTEgM2gxdjE4aC0xeiIvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMTAgMjBoM3YxaC0zeiIvPgo8L3N5bWJvbD4KPHN5bWJvbCBpZD0iaWMtdW5kbyIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGQ9Ik0yNCAwSDB2MjRoMjR6IiBvcGFjaXR5PSIuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiAvPgogICAgPHBhdGggc3Ryb2tlPSJub25lIiBmaWxsPSJpbmhlcml0IiBkPSJNMyA2aDEyYTYgNiAwIDEgMSAwIDEySDN2MWgxMmE3IDcgMCAwIDAgMC0xNEgzdjF6Ii8+CiAgICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImluaGVyaXQiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIGQ9Ik01IDNMMi41IDUuNSA1IDgiLz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLXpvb20taW4iIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjI5IC0yOTApIHRyYW5zbGF0ZSgyMjkgMjkwKSI+CiAgICAgICAgPGNpcmNsZSBjeD0iMTAuNSIgY3k9IjEwLjUiIHI9IjkiIHN0cm9rZT0iaW5oZXJpdCIgZmlsbD0ibm9uZSIvPgogICAgICAgIDxwYXRoIGZpbGw9ImluaGVyaXQiIGQ9Ik0xOC44MjggMTUuODI4SDE5LjgyOFYyMi44MjhIMTguODI4eiIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDE5LjMyOCAxOS4zMjgpIi8+CiAgICAgICAgPHBhdGggZmlsbD0iaW5oZXJpdCIgZD0iTTcgMTBIMTRWMTFIN3oiLz4KICAgICAgICA8cGF0aCBmaWxsPSJpbmhlcml0IiBkPSJNMTAgN0gxMVYxNEgxMHoiLz4KICAgIDwvZz4KPC9zeW1ib2w+CjxzeW1ib2wgaWQ9ImljLXpvb20tb3V0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI2MyAtMjkwKSB0cmFuc2xhdGUoMjYzIDI5MCkiPgogICAgICAgIDxjaXJjbGUgY3g9IjEwLjUiIGN5PSIxMC41IiByPSI5IiBzdHJva2U9ImluaGVyaXQiIGZpbGw9Im5vbmUiLz4KICAgICAgICA8cGF0aCBmaWxsPSJpbmhlcml0IiBkPSJNMTguODI4IDE1LjgyOEgxOS44MjhWMjIuODI4SDE4LjgyOHoiIHRyYW5zZm9ybT0icm90YXRlKC00NSAxOS4zMjggMTkuMzI4KSIvPgogICAgICAgIDxwYXRoIGZpbGw9ImluaGVyaXQiIGQ9Ik03IDEwSDE0VjExSDd6Ii8+CiAgICA8L2c+Cjwvc3ltYm9sPgo8c3ltYm9sIGlkPSJpYy1oYW5kIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgICAgICA8cGF0aCBmaWxsPSJpbmhlcml0IiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik04LjY3MiAzLjM2YzEuMzI4IDAgMi4xMTQuNzggMi4yOSAxLjg2OWwuMDE0LjEwMS4wMjMuMDA2djEuMDQybC0uNjM4LS4xODVjLS4xODctLjA1NS0uMzIzLS4yMTEtLjM1NC0uMzk5TDEwIDUuNzEzYzAtLjgyNS0uNDItMS4zNTMtMS4zMjgtMS4zNTNDNy42OTUgNC4zNiA3IDUuMDQxIDcgNS43MTN2Ny45NDFjMCAuNDM5LS41MjQuNjY1LS44NDMuMzY0bC0xLjg2OC0xLjc2MWMtLjU5NS0uNTI4LTEuMzE2LS42MTctMS45MTgtLjIxNi0uNTIyLjM0OC0uNTYyIDEuMjAzLS4xOCAxLjhMNy43MzggMjJoMTEuMDEzbC4yODUtLjUxOGMxLjI0Ny0yLjMyNiAxLjg5Ny00LjI1OSAxLjk2LTUuNzg1bC4wMDQtLjIzOVY4LjAzNWMwLS42NTYtLjUtMS4xNy0xLTEuMTctLjUwMyAwLTEgLjQ1Ni0xIDEuMTcgMCAuMzMzLS4zMi41NzMtLjY0LjQ4TDE4IDguNDFWNy4zNjhsLjA4Ni4wMjYuMDQyLS4xMzZjLjI3OS0uODA1Ljk3OC0xLjMzMiAxLjczOC0xLjM4OEwyMCA1Ljg2NWMxLjA1NyAwIDIgLjk2NyAyIDIuMTd2Ny40MjNjMCAxLjkyOS0uODQ1IDQuMzUyLTIuNTIxIDcuMjktLjA5LjE1Ni0uMjU1LjI1Mi0uNDM1LjI1Mkg3LjQ3NGMtLjE2NiAwLS4zMjEtLjA4Mi0uNDE0LS4yMTlsLTUuNzA0LTguMzljLS42NTMtMS4wMTktLjU4NC0yLjQ4Ni40Ni0zLjE4MiAxLS42NjYgMi4yMTYtLjUxNiAzLjE0OC4zMUw2IDEyLjQ5NVY1LjcxM2MwLTEuMTggMS4wNTgtMi4yNjMgMi40OS0yLjM0OHoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yOTcgLTI5MCkgdHJhbnNsYXRlKDI5NyAyOTApIi8+CiAgICAgICAgPHBhdGggZmlsbD0iaW5oZXJpdCIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTIuNSAxLjVjMS4zMjUgMCAyLjQxIDEuMDMyIDIuNDk1IDIuMzM2TDE1IDR2Ny4yMmgtMVY0YzAtLjgyOC0uNjcyLTEuNS0xLjUtMS41LS43OCAwLTEuNDIuNTk1LTEuNDkzIDEuMzU2TDExIDR2Ny4yMmgtMVY0YzAtMS4zOCAxLjEyLTIuNSAyLjUtMi41eiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI5NyAtMjkwKSB0cmFuc2xhdGUoMjk3IDI5MCkiLz4KICAgICAgICA8cGF0aCBmaWxsPSJpbmhlcml0IiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0xNi41IDMuNWMxLjMyNSAwIDIuNDEgMS4wMzIgMi40OTUgMi4zMzZMMTkgNnY2LjNoLTFWNmMwLS44MjgtLjY3Mi0xLjUtMS41LTEuNS0uNzggMC0xLjQyLjU5NS0xLjQ5MyAxLjM1NkwxNSA2djIuNDRoLTFWNmMwLTEuMzggMS4xMi0yLjUgMi41LTIuNXoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yOTcgLTI5MCkgdHJhbnNsYXRlKDI5NyAyOTApIi8+CiAgICA8L2c+Cjwvc3ltYm9sPgo8L2RlZnM+Cjwvc3ZnPgo="
vendor: 23,345 bytes, lines 78-85
78},4858:function(t){"use strict";t.exports=e},4960:function(){},6759:function(){},6272:function(){}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){"use strict";r.d(o,{default:function(){return Al}});var e=r(9131),t=r.n(e),i=r(1899),n=r.n(i),s=r(6562),a=r.n(s),l=r(1734),c=r.n(l),u=r(8005),h=r.n(u),d=r(6065),f=r.n(d),p=r(4496),m=r.n(p);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}) 79/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */,"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(e){if("Element"in e){var i="classList",r="prototype",o=e.Element[r],s=Object,l=t()(String[r])||function(){return this.replace(/^\s+|\s+$/g,"")},u=n()(Array[r])||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},h=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},d=function(e,t){if(""===t)throw new h("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(t))throw new h("INVALID_CHARACTER_ERR","The token must not contain space characters.");return u.call(e,t)},f=function(e){for(var t=l.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],n=0,r=i.length;n<r;n++)this.push(i[n]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},p=f[r]=[],m=function(){return new f(this)};if(h[r]=Error[r],p.item=function(e){return this[e]||null},p.contains=function(e){return~d(this,e+"")},p.add=function(){var e,t=arguments,i=0,n=t.length,r=!1;do{~d(this,e=t[i]+"")||(this.push(e),r=!0)}while(++i<n);r&&this._updateClassName()},p.remove=function(){var e,t,i=arguments,n=0,r=i.length,o=!1;do{for(t=d(this,e=i[n]+"");~t;)a()(this).call(this,t,1),o=!0,t=d(this,e)}while(++n<r);o&&this._updateClassName()},p.toggle=function(e,t){var i=this.contains(e),n=i?!0!==t&&"remove":!1!==t&&"add";return n&&this[n](e),!0===t||!1===t?t:!i},p.replace=function(e,t){var i=d(e+"");~i&&(a()(this).call(this,i,1,t),this._updateClassName())},p.toString=function(){return this.join(" ")},c()){var g={get:m,enumerable:!0,configurable:!0};try{c()(o,i,g)}catch(e){void 0!==e.number&&-2146823252!==e.number||(g.enumerable=!1,c()(o,i,g))}}else s[r].__defineGetter__&&o.__defineGetter__(i,m)}}(self),function(){var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var i,n=arguments.length;for(i=0;i<n;i++)e=arguments[i],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:i.call(this,e)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(e,t){var i=this.toString().split(" "),r=n()(i).call(i,e+"");~r&&(i=h()(i).call(i,r),this.remove.apply(this,i),this.add(t),this.add.apply(this,h()(i).call(i,1)))}),e=null}()) 80/*! 81 * @copyright Copyright (c) 2017 IcoMoon.io 82 * @license Licensed under MIT license 83 * See https://github.com/Keyamoon/svgxuse 84 * @version 1.2.6 85 */,function(){if("undefined"!=typeof window&&window.addEventListener){var e,t,i,n=f()(null),r=function(){clearTimeout(t),t=m()(e,100)},o=function(){},s=function(e){function t(e){var t;return void 0!==e.protocol?t=e:(t=document.createElement("a")).href=e,t.protocol.replace(/:/g,"")+t.host}var i,n,r;return window.XMLHttpRequest&&(i=new XMLHttpRequest,n=t(location),r=t(e),i=void 0===i.withCredentials&&""!==r&&r!==n?XDomainRequest||void 0:XMLHttpRequest),i},a="http://www.w3.org/1999/xlink";e=function(){var e,t,i,l,c,u,h,d,f,p,g=0;function v(){var e;0==(g-=1)&&(o(),window.addEventListener("resize",r,!1),window.addEventListener("orientationchange",r,!1),window.MutationObserver?((e=new MutationObserver(r)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),o=function(){try{e.disconnect(),window.removeEventListener("resize",r,!1),window.removeEventListener("orientationchange",r,!1)}catch(e){}}):(document.documentElement.addEventListener("DOMSubtreeModified",r,!1),o=function(){document.documentElement.removeEventListener("DOMSubtreeModified",r,!1),window.removeEventListener("resize",r,!1),window.removeEventListener("orientationchange",r,!1)}))}function b(e){return function(){!0!==n[e.base]&&(e.useEl.setAttributeNS(a,"xlink:href","#"+e.hash),e.useEl.hasAttribute("href")&&e.useEl.setAttribute("href","#"+e.hash))}}function y(e){return function(){var t,i=document.body,n=document.createElement("x");e.onload=null,n.innerHTML=e.responseText,(t=n.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",i.insertBefore(t,i.firstChild)),v()}}function w(e){return function(){e.onerror=null,e.ontimeout=null,v()}}for(o(),f=document.getElementsByTagName("use"),c=0;c<f.length;c+=1){try{t=f[c].getBoundingClientRect()}catch(e){t=!1}e=(d=(l=f[c].getAttribute("href")||f[c].getAttributeNS(a,"href")||f[c].getAttribute("xlink:href"))&&l.split?l.split("#"):["",""])[0],i=d[1],u=t&&0===t.left&&0===t.right&&0===t.top&&0===t.bottom,t&&0===t.width&&0===t.height&&!u?(f[c].hasAttribute("href")&&f[c].setAttributeNS(a,"xlink:href",l),e.length&&(!0!==(p=n[e])&&m()(b({useEl:f[c],base:e,hash:i}),0),void 0===p&&void 0!==(h=s(e))&&(p=new h,n[e]=p,p.onload=y(p),p.onerror=w(p),p.ontimeout=w(p),p.open("GET",e),p.send(),g+=1))):u?e.length&&n[e]&&m()(b({useEl:f[c],base:e,hash:i}),0):void 0===n[e]?n[e]=!0:n[e].onload&&(n[e].abort(),delete n[e].onload,n[e]=!0)}f="",g+=1,v()},i=function(){window.removeEventListener("load",i,!1),t=m()(e,0)},"complete"!==document.readyState?window.addEventListener("load",i,!1):i()}}();var g=r(1845);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var b=r(184),y=r(662),w=r(7172),_=r(711);function k(e,t){var i;if(e){if("string"==typeof e)return v(e,t);var n=_(i=Object.prototype.toString.call(e)).call(i,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?w(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function x(e){return function(e){if(g(e))return v(e)}(e)||function(e){if(void 0!==b&&null!=y(e)||null!=e["@@iterator"])return w(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var C=r(7077);function S(e,t,i){return t in e?C(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),C(e,n.key,n)}}function A(e,t,i){return t&&T(e.prototype,t),i&&T(e,i),e}var I=r(4426),M=r.n(I),P=r(9406),D=r.n(P),O=r(8189),L=r.n(O),R=r(3972),B=r.n(R),N=r(2777),j=r(961),F=r.n(j),z=r(5695),V=r.n(z),H=r(8592),U=r.n(H),W=r(9052),$=r.n(W),G=r(2560),q=r.n(G),Y=r(2461),Z=r.n(Y);function X(e,t){return function(e){if(g(e))return e}(e)||function(e,t){var i=null==e?null:void 0!==b&&y(e)||e["@@iterator"];if(null!=i){var n,r,o=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K,J=r(6397),Q=r.n(J),ee=r(7636),te=r.n(ee),ie=r(789),ne=r.n(ie),re=r(4729),oe=r.n(re),se=r(1610),ae=r.n(se),le=r(3053),ce=r.n(le),ue=["zoomIn","zoomOut","hand"],he=["history","undo","redo","reset"],de=["delete","deleteAll"],fe=D()(K=[]).call(K,ue,he,de),pe="filter",me="color",ge=["rect","circle","triangle"],ve="cropzone",be="vintage",ye="sepia2",we="removeColor",_e="colorFilter",ke="removeWhite",xe="blendColor",Ce="blend",Se=Bi("IMAGE_LOADER","CROPPER","FLIP","ROTATION","FREE_DRAWING","LINE","TEXT","ICON","FILTER","SHAPE","ZOOM","RESIZE"),Ee={hasRotatingPoint:!1,hasBorders:!1,lockScalingFlip:!0,lockRotation:!0,lockSkewingX:!0,lockSkewingY:!0},Te="clearObjects",Ae="loadImage",Ie="flip",Me="rotate",Pe="addObject",De="removeObject",Oe="applyFilter",Le="removeFilter",Re="addIcon",Be="changeIconColor",Ne="addShape",je="changeShape",Fe="addText",ze="changeText",Ve="changeTextStyle",He="addImageObject",Ue="resizeCanvasDimension",We="setObjectProperties",$e="setObjectPosition",Ge="changeSelection",qe="resize",Ye="objectActivated",Ze="objectMoved",Xe="objectScaled",Ke="objectRotated",Je="objectAdded",Qe="objectModified",et="textEditing",tt="textChanged",it="iconCreateResize",nt="iconCreateEnd",rt="addText",ot="addObject",st="addObjectAfter",at="mousedown",lt="redoStackChanged",ct="undoStackChanged",ut="selectionCleared",ht="selectionCreated",dt="executeCommand",ft="afterUndo",pt="afterRedo",mt="zoomChanged",gt="handStarted",vt="handStopped",bt="keydown",yt="keyup",wt="inputBoxEditingStarted",_t="inputBoxEditingStopped",kt="focus",xt="blur",Ct=".tui-colorpicker-palette-hex",St="Load",Et="Mask",Tt="Mask",At="Crop",It="Resize",Mt="Filter",Pt="Filter",Dt="Shape",Ot="Icon",Lt="Text",Rt="Text",Bt="Delete",Nt="Delete",jt=Bi("NORMAL","CROPPER","FREE_DRAWING","LINE_DRAWING","TEXT","SHAPE","ICON","ZOOM","RESIZE"),Ft="text",zt="crop",Vt="resize",Ht="shape",Ut="zoom",Wt="normal",$t="zoom",Gt="hand",qt=90,Yt=89,Zt=67,Xt=86,Kt=16,Jt=8,Qt=46,ei=40,ti=38,ii=32,ni=48,ri=57,oi={borderColor:"red",cornerColor:"green",cornerSize:10,originX:"center",originY:"center",transparentCorners:!1},si="The object is already added.",ai="The flipX and flipY setting values are not changed.",li="Invalid parameters.",ci="The executing command state is locked.",ui="The background image is empty.",hi="Invalid image loaded.",di="The object is not in canvas.",fi="The promise of redo command is reject.",pi="The promise of undo command is reject.",mi="Unsupported operation.",gi="Unsupported object type.",vi={"icon-arrow":"M40 12V0l24 24-24 24V36H0V12h40z","icon-arrow-2":"M49,32 H3 V22 h46 l-18,-18 h12 l23,23 L43,50 h-12 l18,-18 z ","icon-arrow-3":"M43.349998,27 L17.354,53 H1.949999 l25.996,-26 L1.949999,1 h15.404 L43.349998,27 z ","icon-star":"M35,54.557999 l-19.912001,10.468 l3.804,-22.172001 l-16.108,-15.7 l22.26,-3.236 L35,3.746 l9.956,20.172001 l22.26,3.236 l-16.108,15.7 l3.804,22.172001 z ","icon-star-2":"M17,31.212 l-7.194,4.08 l-4.728,-6.83 l-8.234,0.524 l-1.328,-8.226 l-7.644,-3.14 l2.338,-7.992 l-5.54,-6.18 l5.54,-6.176 l-2.338,-7.994 l7.644,-3.138 l1.328,-8.226 l8.234,0.522 l4.728,-6.83 L17,-24.312 l7.194,-4.08 l4.728,6.83 l8.234,-0.522 l1.328,8.226 l7.644,3.14 l-2.338,7.992 l5.54,6.178 l-5.54,6.178 l2.338,7.992 l-7.644,3.14 l-1.328,8.226 l-8.234,-0.524 l-4.728,6.83 z ","icon-polygon":"M3,31 L19,3 h32 l16,28 l-16,28 H19 z ","icon-location":"M24 62C8 45.503 0 32.837 0 24 0 10.745 10.745 0 24 0s24 10.745 24 24c0 8.837-8 21.503-24 38zm0-28c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10z","icon-heart":"M49.994999,91.349998 l-6.96,-6.333 C18.324001,62.606995 2.01,47.829002 2.01,29.690998 C2.01,14.912998 13.619999,3.299999 28.401001,3.299999 c8.349,0 16.362,5.859 21.594,12 c5.229,-6.141 13.242001,-12 21.591,-12 c14.778,0 26.390999,11.61 26.390999,26.390999 c0,18.138 -16.314001,32.916 -41.025002,55.374001 l-6.96,6.285 z ","icon-bubble":"M44 48L34 58V48H12C5.373 48 0 42.627 0 36V12C0 5.373 5.373 0 12 0h40c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12h-8z"},bi={realTimeEvent:!0,min:-360,max:360,value:0},yi={min:5,max:30,value:12},wi={realTimeEvent:!0,min:2,max:300,value:3},_i={realTimeEvent:!0,min:10,max:100,value:50},ki={tintOpacityRange:{realTimeEvent:!0,min:0,max:1,value:.7,useDecimal:!0},removewhiteDistanceRange:{realTimeEvent:!0,min:0,max:1,value:.2,useDecimal:!0},brightnessRange:{realTimeEvent:!0,min:-1,max:1,value:0,useDecimal:!0},noiseRange:{realTimeEvent:!0,min:0,max:1e3,value:100},pixelateRange:{realTimeEvent:!0,min:2,max:20,value:4},colorfilterThresholdRange:{realTimeEvent:!0,min:0,max:1,value:.2,useDecimal:!0},blurFilterRange:{value:.1}},xi=0,Ci=0,Si=.5,Ei=.5,Ti={realTimeEvent:!0,min:32,max:4088,value:800},Ai="tui-image-editor-",Ii=Math.min,Mi=Math.max,Pi=!1,Di=0;function Oi(e){return e.__fe_id||(Di+=1,e.__fe_id=Di),e.__fe_id}function Li(e){return"function"==typeof e}function Ri(e,t,i){if(t>i){var n=[i,t];t=n[0],i=n[1]}return Mi(t,Ii(e,i))}function Bi(){for(var e={},t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return U()(i,function(t){e[t]=t}),e}function Ni(e,t){var i,n={},r=t.length,o=0;for(o=0;o<r;o+=1)n[i=t[o]]=e[i];return n}function ji(e){return Q()(e,10)}function Fi(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}function zi(){return!!(window.File&&window.FileList&&window.FileReader)}function Vi(e,t){var i,n,r,o;4===e.length&&(e=D()(o="".concat(e)).call(o,h()(e).call(e,1,4)));var s=Q()(h()(e).call(e,1,3),16),a=Q()(h()(e).call(e,3,5),16),l=Q()(h()(e).call(e,5,7),16),c=t||1;return D()(i=D()(n=D()(r="rgba(".concat(s,", ")).call(r,a,", ")).call(n,l,", ")).call(i,c,")")}function Hi(e){U()(e,function(t,i){e[i]=null})}function Ui(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"."===i.charAt(0)?D()(t=".".concat(Ai).concat(n)).call(t,h()(i).call(i,1)):D()(e="".concat(Ai).concat(n)).call(e,i)}function Wi(e,t){e.customProps=e.customProps||{},F()(e.customProps,t)}function $i(e,t){var i={};return q()(t)&&(t=[t]),U()(t,function(t){i[t]=e.customProps[t]}),i}function Gi(e,t){return n()(e).call(e,t)>=0}function qi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ae()(e,"type")||me}function Yi(e){var t=ne()(e);return(void 0===t?{}:t).source?pe:me}function Zi(e){return ce()(e.get("type"),ge)>=0}function Xi(e){if(Gi(ge,e))return"Shape";switch(e){case"i-text":return"Text";case"path":case"line":return"Draw";case"activeSelection":return"Group";default:return Ji(e)}}function Ki(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.useAlpha,r=void 0===n||n,o=i.mode,s=ye,a=_e,l=ke,c=Ce;switch(e){case be:t=s;break;case we:t=r?a:l;break;case xe:t="add"===o?c:o;break;default:t=e}return Ji(t)}function Ji(e){return e.replace(/[a-z]/,function(e){return e.toUpperCase()})}var Qi=Bi("UN_IMPLEMENTATION","NO_COMPONENT_NAME"),en="Should implement a method: ",tn="Should set a component name",nn={UN_IMPLEMENTATION:function(e){return en+e},NO_COMPONENT_NAME:function(){return tn}},rn={types:F()({},Qi),create:function(e){e=e.toLowerCase();for(var t=nn[e],i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}},on=rn.create,sn=rn.types,an=function(){function e(t,i){E(this,e),this.name=t.name,this.args=i,this.execute=t.execute,this.undo=t.undo,this.executeCallback=t.executeCallback||null,this.undoCallback=t.undoCallback||null,this.undoData={}}return A(e,[{key:"execute",value:function(){throw new Error(on(sn.UN_IMPLEMENTATION,"execute"))}},{key:"undo",value:function(){throw new Error(on(sn.UN_IMPLEMENTATION,"undo"))}},{key:"isRedo",get:function(){return Z()(this.undoData).length>0}},{key:"setUndoData",value:function(e,t,i){return t&&(e=t),i?t||(t=e):(F()(this.undoData,e),t=null),t}},{key:"setExecuteCallback",value:function(e){return this.executeCallback=e,this}},{key:"setUndoCallback",value:function(e){return this.undoCallback=e,this}}]),e}(),ln=an,cn={},un={create:function(e){var t=cn[e];if(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];return new ln(t,n)}return null},register:function(e){cn[e.name]=e}},hn=function(){function e(){E(this,e),this._undoStack=[],this._redoStack=[],this._isLocked=!1,this._isSilent=!1}return A(e,[{key:"_invokeExecution",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.lock();var n=e.args;return n||(n=[]),e.execute.apply(e,x(n)).then(function(n){return t._isSilent||(t.pushUndoStack(e),t.fire(i?pt:dt,e)),t.unlock(),Li(e.executeCallback)&&e.executeCallback(n),n}).catch(function(e){return t.unlock(),L().reject(e)})}},{key:"_invokeUndo",value:function(e){var t=this;this.lock();var i=e.args;return i||(i=[]),e.undo.apply(e,x(i)).then(function(i){return t.pushRedoStack(e),t.fire(ft,e),t.unlock(),Li(e.undoCallback)&&e.undoCallback(i),i}).catch(function(e){return t.unlock(),L().reject(e)})}},{key:"_fireRedoStackChanged",value:function(){this.fire(lt,this._redoStack.length)}},{key:"_fireUndoStackChanged",value:function(){this.fire(ct,this._undoStack.length)}},{key:"lock",value:function(){this._isLocked=!0}},{key:"unlock",value:function(){this._isLocked=!1}},{key:"executeSilent",value:function(){var e=this;this._isSilent=!0;for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return this.execute.apply(this,D()(i).call(i,[this._isSilent])).then(function(){e._isSilent=!1})}},{key:"execute",value:function(){var e=this;if(this._isLocked)return L().reject(ci);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=i[0];return q()(r)&&(r=un.create.apply(un,i)),this._invokeExecution(r).then(function(t){return e.clearRedoStack(),t})}},{key:"undo",value:function(){var e,t,i=this._undoStack.pop(),n="";(i&&this._isLocked&&(this.pushUndoStack(i,!0),i=null),i)?(this.isEmptyUndoStack()&&this._fireUndoStackChanged(),e=this._invokeUndo(i)):(n=pi,this._isLocked&&(n=D()(t="".concat(n," Because ")).call(t,ci)),e=L().reject(n));return e}},{key:"redo",value:function(){var e,t,i=this._redoStack.pop(),n="";(i&&this._isLocked&&(this.pushRedoStack(i,!0),i=null),i)?(this.isEmptyRedoStack()&&this._fireRedoStackChanged(),e=this._invokeExecution(i,!0)):(n=fi,this._isLocked&&(n=D()(t="".concat(n," Because ")).call(t,ci)),e=L().reject(n));return e}},{key:"pushUndoStack",value:function(e,t){this._undoStack.push(e),t||this._fireUndoStackChanged()}},{key:"pushRedoStack",value:function(e,t){this._redoStack.push(e),t||this._fireRedoStackChanged()}},{key:"isEmptyRedoStack",value:function(){return 0===this._redoStack.length}},{key:"isEmptyUndoStack",value:function(){return 0===this._undoStack.length}},{key:"clearUndoStack",value:function(){this.isEmptyUndoStack()||(this._undoStack=[],this._fireUndoStackChanged())}},{key:"clearRedoStack",value:function(){this.isEmptyRedoStack()||(this._redoStack=[],this._fireRedoStackChanged())}}]),e}();$().mixin(hn);var dn=hn,fn=r(5214),pn=r.n(fn),mn=r(899),gn=r.n(mn),vn={"common.bi.image":"https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png","common.bisize.width":"251px","common.bisize.height":"21px","common.backgroundImage":"none","common.backgroundColor":"#1e1e1e","common.border":"0px","header.backgroundImage":"none","header.backgroundColor":"transparent","header.border":"0px","loadButton.backgroundColor":"#fff","loadButton.border":"1px solid #ddd","loadButton.color":"#222","loadButton.fontFamily":"'Noto Sans', sans-serif","loadButton.fontSize":"12px","downloadButton.backgroundColor":"#fdba3b","downloadButton.border":"1px solid #fdba3b","downloadButton.color":"#fff","downloadButton.fontFamily":"'Noto Sans', sans-serif","downloadButton.fontSize":"12px","menu.normalIcon.color":"#8a8a8a","menu.activeIcon.color":"#555555","menu.disabledIcon.color":"#434343","menu.hoverIcon.color":"#e9e9e9","submenu.normalIcon.color":"#8a8a8a","submenu.activeIcon.color":"#e9e9e9","menu.iconSize.width":"24px","menu.iconSize.height":"24px","submenu.iconSize.width":"32px","submenu.iconSize.height":"32px","submenu.backgroundColor":"#1e1e1e","submenu.partition.color":"#3c3c3c","submenu.normalLabel.color":"#8a8a8a","submenu.normalLabel.fontWeight":"lighter","submenu.activeLabel.color":"#fff","submenu.activeLabel.fontWeight":"lighter","checkbox.border":"0px","checkbox.backgroundColor":"#fff","range.pointer.color":"#fff","range.bar.color":"#666","range.subbar.color":"#d1d1d1","range.disabledPointer.color":"#414141","range.disabledBar.color":"#282828","range.disabledSubbar.color":"#414141","range.value.color":"#fff","range.value.fontWeight":"lighter","range.value.fontSize":"11px","range.value.border":"1px solid #353535","range.value.backgroundColor":"#151515","range.title.color":"#fff","range.title.fontWeight":"lighter","colorpicker.button.border":"1px solid #1e1e1e","colorpicker.title.color":"#fff"},bn=r(2534),yn=function(){function e(t){var i,n,r,o,s;E(this,e),this.styles=this._changeToObject(F()({},vn,t)),i=this._styleMaker(),r=X(document.getElementsByTagName("head"),1)[0],o=document.createElement("link"),s=encodeURIComponent(i),n&&(o.id=n),o.setAttribute("rel","stylesheet"),o.setAttribute("type","text/css"),o.setAttribute("href","data:text/css;charset=UTF-8,".concat(s)),r.appendChild(o),this._loadDefaultSvgIcon()}return A(e,[{key:"getStyle",value:function(e){var t=null,i=e.replace(/\..+$/,""),n=this.styles[e];switch(e){case"common.bi":t=this.styles[e].image;break;case"menu.icon":t={active:this.styles["".concat(i,".activeIcon")],normal:this.styles["".concat(i,".normalIcon")],hover:this.styles["".concat(i,".hoverIcon")],disabled:this.styles["".concat(i,".disabledIcon")]};break;case"submenu.icon":t={active:this.styles["".concat(i,".activeIcon")],normal:this.styles["".concat(i,".normalIcon")]};break;case"submenu.label":t={active:this._makeCssText(this.styles["".concat(i,".activeLabel")]),normal:this._makeCssText(this.styles["".concat(i,".normalLabel")])};break;case"submenu.partition":t={vertical:this._makeCssText(F()({},n,{borderLeft:"1px solid ".concat(n.color)})),horizontal:this._makeCssText(F()({},n,{borderBottom:"1px solid ".concat(n.color)}))};break;case"range.disabledPointer":case"range.disabledBar":case"range.disabledSubbar":case"range.pointer":case"range.bar":case"range.subbar":n.backgroundColor=n.color,t=this._makeCssText(n);break;default:t=this._makeCssText(n)}return t}},{key:"_styleMaker",value:function(){var e=this.getStyle("submenu.label"),t=this.getStyle("submenu.partition");return function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b,y,w,_,k,x,C,S,E,T,A,I,M=e.subMenuLabelActive,P=e.subMenuLabelNormal,O=e.subMenuRangeTitle,L=e.submenuPartitionVertical,R=e.submenuPartitionHorizontal,B=e.submenuCheckbox,N=e.submenuRangePointer,j=e.submenuRangeValue,F=e.submenuColorpickerTitle,z
85=e.submenuColorpickerButton,V=e.submenuRangeBar,H=e.submenuRangeSubbar,U=e.submenuDisabledRangePointer,W=e.submenuDisabledRangeBar,$=e.submenuDisabledRangeSubbar,G=e.submenuIconSize,q=e.menuIconSize,Y=e.biSize,Z=e.menuIconStyle,X=e.submenuIconStyle;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l=D()(c=D()(u=D()(h=D()(d=D()(f=D()(p=D()(m=D()(g=D()(v=D()(b=D()(y=D()(w=D()(_=D()(k=D()(x=D()(C=D()(S=D()(E=D()(T=D()(A=D()(I='\n .tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n .tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype="icon-heart"] label,\n .tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype="icon-location"] label,\n .tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype="icon-polygon"] label,\n .tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype="icon-star"] label,\n .tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype="icon-star-2"] label,\
85n .tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype="icon-arrow-3"] label,\n .tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype="icon-arrow-2"] label,\n .tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype="icon-arrow"] label,\n .tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n .tie-draw-line-select-button.line .tui-image-editor-button.line label,\n .tie-draw-line-select-button.free .tui-image-editor-button.free label,\n .tie-flip-button.flipX .tui-image-editor-button.flipX label,\n .tie-flip-button.flipY .tui-image-editor-button.flipY label,\n .tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\n .tie-crop-button .tui-image-editor-button.apply.active label,\n .tie-crop-preset-button .tui-image-editor-button.preset.active label,\n .tie-resize-button .tui-image-editor-button.apply.active label,\n .tie-resize-preset-button .tui-image-editor-button.preset.active label,\n .tie-shape-button.rect .tui-image-editor-button.rect label,\n .tie-shape-button.circle .tui-image-editor-button.circle label,\n .tie-shape-button.triangle .tui-image-editor-button.triangle label,\n .tie-text-effect-button .tui-image-editor-button.active label,\n .tie-text-align-button.tie-text-align-left .tui-image-editor-button.left label,\n .tie-text-align-button.tie-text-align-center .tui-image-editor-button.center label,\n .tie-text-align-button.tie-text-align-right .tui-image-editor-button.right label,\n .tie-mask-apply.apply.active .tui-image-editor-button.apply label,\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\n .tui-image-editor-container .tui-image-editor-checkbox label > span {\n '.concat(M,"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label > span {\n ")).call(I,P,"\n }\n .tui-image-editor-container .tui-image-editor-range-wrap label > span {\n ")).call(A,O,"\n }\n .tui-image-editor-container .tui-image-editor-partition > div {\n ")).call(T,L,"\n }\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\n ")).call(E,R,"\n }\n .tui-image-editor-container .tui-image-editor-checkbox label > span:before {\n ")).call(S,B,"\n }\n .tui-image-editor-container .tui-image-editor-checkbox label > input:checked + span:before {\n border: 0;\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\n ")).call(C,N,"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\n ")).call(x,V,"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\n ")).call(k,H,"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-pointer {\n ")).call(_,U,"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-subbar {\n ")).call(w,$,"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-bar {\n ")).call(y,W,"\n }\n .tui-image-editor-container .tui-image-editor-range-value {\n ")).call(b,j,"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value + label {\n ")).call(v,F,"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value {\n ")).call(g,z,"\n }\n .tui-image-editor-container .svg_ic-menu {\n ")).call(m,q,"\n }\n .tui-image-editor-container .svg_ic-submenu {\n ")).call(p,G,"\n }
85\n .tui-image-editor-container .tui-image-editor-controls-logo > img,\n .tui-image-editor-container .tui-image-editor-header-logo > img {\n ")).call(f,Y,"\n }\n .tui-image-editor-menu use.normal.use-default,\n .tui-image-editor-help-menu use.normal.use-default {\n fill-rule: evenodd;\n fill: ")).call(d,Z.normal.color,";\n stroke: ")).call(h,Z.normal.color,";\n }\n .tui-image-editor-menu use.active.use-default,\n .tui-image-editor-help-menu use.active.use-default {\n fill-rule: evenodd;\n fill: ")).call(u,Z.active.color,";\n stroke: ")).call(c,Z.active.color,";\n }\n .tui-image-editor-menu use.hover.use-default,\n .tui-image-editor-help-menu use.hover.use-default {\n fill-rule: evenodd;\n fill: ")).call(l,Z.hover.color,";\n stroke: ")).call(a,Z.hover.color,";\n }\n .tui-image-editor-menu use.disabled.use-default,\n .tui-image-editor-help-menu use.disabled.use-default {\n fill-rule: evenodd;\n fill: ")).call(s,Z.disabled.color,";\n stroke: ")).call(o,Z.disabled.color,";\n }\n .tui-image-editor-submenu use.normal.use-default {\n fill-rule: evenodd;\n fill: ")).call(r,X.normal.color,";\n stroke: ")).call(n,X.normal.color,";\n }\n .tui-image-editor-submenu use.active.use-default {\n fill-rule: evenodd;\n fill: ")).call(i,X.active.color,";\n stroke: ")).call(t,X.active.color,";\n }\n")}({subMenuLabelActive:e.active,subMenuLabelNormal:e.normal,submenuPartitionVertical:t.vertical,submenuPartitionHorizontal:t.horizontal,biSize:this.getStyle("common.bisize"),subMenuRangeTitle:this.getStyle("range.title"),submenuRangePointer:this.getStyle("range.pointer"),submenuRangeBar:this.getStyle("range.bar"),submenuRangeSubbar:this.getStyle("range.subbar"),submenuDisabledRangePointer:this.getStyle("range.disabledPointer"),submenuDisabledRangeBar:this.getStyle("range.disabledBar"),submenuDisabledRangeSubbar:this.getStyle("range.disabledSubbar"),submenuRangeValue:this.getStyle("range.value"),submenuColorpickerTitle:this.getStyle("colorpicker.title"),submenuColorpickerButton:this.getStyle("colorpicker.button"),submenuCheckbox:this.getStyle("checkbox"),menuIconSize:this.getStyle("menu.iconSize"),submenuIconSize:this.getStyle("submenu.iconSize"),menuIconStyle:this.getStyle("menu.icon"),submenuIconStyle:this.getStyle("submenu.icon")})}},{key:"_changeToObject",value:function(e){var t={};return U()(e,function(e,i){var n=X(i.match(/^(.+)\.([a-z]+)$/i),3),r=n[1],o=n[2];t[r]||(t[r]={}),t[r][o]=e}),t}},{key:"_makeCssText",value:function(e){var t=this,i=[];return U()(e,function(e,r){var o,s;n()(o=["backgroundImage"]).call(o,r)>-1&&"none"!==e&&(e="url(".concat(e,")")),i.push(D()(s="".concat(t._toUnderScore(r),": ")).call(s,e))}),i.join(";")}},{key:"_toUnderScore",value:function(e){return e.replace(/([A-Z])/g,function(e,t){return"-".concat(t.toLowerCase())})}},{key:"_loadDefaultSvgIcon",value:function(){if(!document.getElementById("tui-image-editor-svg-default-icons")){var e=new DOMParser,t=bn.replace(/data:image\/svg\+xml;base64,/,""),i=e.parseFromString(atob(t),"text/xml");document.body.appendChild(i.documentElement)}}},{key:"_makeIconClassName",value:function(e,t){var i=(t?this.get
vendor: 14,486 bytes, line 85
85Style("submenu.icon"):this.getStyle("menu.icon"))[e],n=i.path,r=i.name;return n&&r?e:"".concat(e," use-default")}},{key:"_makeSvgIconPrefix",value:function(e,t){var i,n=(t?this.getStyle("submenu.icon"):this.getStyle("menu.icon"))[e],r=n.path,o=n.name;return r&&o?D()(i="".concat(r,"#")).call(i,o,"-"):"#"}},{key:"_makeSvgItem",value:function(e,t,i){var n=this;return gn()(e).call(e,function(e){var r,o,s=n._makeSvgIconPrefix(e,i),a=n._toUnderScore(t),l=n._makeIconClassName(e,i);return D()(r=D()(o='<use xlink:href="'.concat(s,"ic-")).call(o,a,'" class="')).call(r,l,'"/>')}).join("")}},{key:"makeMenSvgIconSet",value:function(e,t){var i,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return D()(i='<svg class="svg_ic-'.concat(n?"submenu":"menu",'">')).call(i,this._makeSvgItem(e,t,n),"</svg>")}}]),e}(),wn=yn,_n=r(9146),kn=r.n(_n),xn=r(6623),Cn=r(4230);function Sn(e,t){return Sn=Cn||function(e,t){return e.__proto__=t,e},Sn(e,t)}function En(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=xn(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sn(e,t)}var Tn=r(3742);function An(e){return An="function"==typeof b&&"symbol"==typeof Tn?function(e){return typeof e}:function(e){return e&&"function"==typeof b&&e.constructor===b&&e!==b.prototype?"symbol":typeof e},An(e)}function In(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mn(e,t){if(t&&("object"===An(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return In(e)}var Pn=r(9856);function Dn(e){return Dn=Cn?Pn:function(e){return e.__proto__||Pn(e)},Dn(e)}var On=r(6092),Ln=r.n(On),Rn=r(4858),Bn=r.n(Rn),Nn=["#000000","#2a2a2a","#545454","#7e7e7e","#a8a8a8","#d2d2d2","#ffffff","","#ff4040","#ff6518","#ffbb3b","#03bd9e","#00a9ff","#515ce6","#9e5fff","#ff5583"],jn=function(){function e(t,i){var n=i.defaultColor,r=void 0===n?"#7e7e7e":n,o=i.toggleDirection,s=void 0===o?"up":o,a=i.usageStatistics;E(this,e),this.colorpickerElement=t,this.usageStatistics=a,this._show=!1,this._colorpickerElement=t,this._toggleDirection=s,this._makePickerButtonElement(r),this._makePickerLayerElement(t,t.getAttribute("title")),this._color=r,this.picker=Bn().create({container:this.pickerElement,preset:Nn,color:r,usageStatistics:this.usageStatistics}),this._addEvent()}return A(e,[{key:"destroy",value:function(){var e=this;this._removeEvent(),this.picker.destroy(),this.colorpickerElement.innerHTML="",U()(this,function(t,i){e[i]=null})}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._changeColorElement(e)}},{key:"_changeColorElement",value:function(e){e?(this.colorElement.classList.remove("transparent"),this.colorElement.style.backgroundColor=e):(this.colorElement.style.backgroundColor="#fff",this.colorElement.classList.add("transparent"))}},{key:"_makePickerButtonElement",value:function(e){this.colorpickerElement.classList.add("tui-image-editor-button"),this.colorElement=document.createElement("div"),this.colorElement.className="color-picker-value",e?this.colorElement.style.backgroundColor=e:this.colorElement.classList.add("transparent")}},{key:"_makePickerLayerElement",value:function(e,t){var i=document.createElement("label"),n=document.createElement("div");this.pickerControl=document.createElement("div"),this.pickerControl.className="color-picker-control",this.pickerElement=document.createElement("div"),this.pickerElement.className="color-picker",i.innerHTML=t,n.className="triangle",this.pickerControl.appendChild(this.pickerElement),this.pickerControl.appendChild(n),e.appendChild(this.pickerControl),e.appendChild(this.colorElement),e.appendChild(i)}},{key:"_addEvent",value:function(){var e,t=this;this.picker.on("selectColor",function(e){t._changeColorElement(e.color),t._color=e.color,t.fire("change",e.color)}),this.eventHandler={pickerToggle:M()(e=this._pickerToggleEventHandler).call(e,this),pickerHide:function(){return t.hide()}},this.colorpickerElement.addEventListener("click",this.eventHandler.pickerToggle),document.body.addEventListener("click",this.eventHandler.pickerHide)}},{key:"_removeEvent",value:function(){this.colorpickerElement.removeEventListener("click",this.eventHandler.pickerToggle),document.body.removeEventListener("click",this.eventHandler.pickerHide),this.picker.off()}},{key:"_pickerToggleEventHandler",value:function(e){var t=e.target,i=t&&this._isElementInColorPickerControl(t);(!i||i&&this._isPaletteButton(t))&&(this._show=!this._show,this.pickerControl.style.display=this._show?"block":"none",this._setPickerControlPosition(),this.fire("changeShow",this)),e.stopPropagation()}},{key:"_isPaletteButton",value:function(e){return"tui-colorpicker-palette-button"===e.className}},{key:"_isElementInColorPickerControl",value:function(e){for(var t=e;t!==document.body&&t;){if(t===this.pickerControl)return!0;t=t.parentNode}return!1}},{key:"hide",value:function(){this._show=!1,this.pickerControl.style.display="none"}},{key:"_setPickerControlPosition",value:function(){var e=this.pickerControl.style,t=this._colorpickerElement.clientWidth/2+2,i=this.pickerControl.offsetWidth/2-t,n=-1*(this.pickerControl.offsetHeight+10);"down"===this._toggleDirection&&(n=30),e.top="".concat(n,"px"),e.left="-".concat(i,"px")}}]),e}();$().mixin(jn);var Fn=jn,zn=/(-?)([0-9]*)[^0-9]*([0-9]*)/g,Vn=function(){function e(t){var i,n,r,o,s,a,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E(this,e),this._value=c.value||0,this.rangeElement=t.slider,this.rangeInputElement=t.input,this._drawRangeElement(),this.rangeWidth=this._getRangeWidth(),this._min=c.min||0,this._max=c.max||100,this._useDecimal=c.useDecimal,this._absMax=-1*this._min+this._max,this.realTimeEvent=c.realTimeEvent||!1,this._userInputTimer=null,this.eventHandler={startChangingSlide:M()(i=this._startChangingSlide).call(i,this),stopChangingSlide:M()(n=this._stopChangingSlide).call(n,this),changeSlide:M()(r=this._changeSlide).call(r,this),changeSlideFinally:M()(o=this._changeSlideFinally).call(o,this),changeInput:M()(s=this._changeInput).call(s,this),changeInputFinally:M()(a=this._changeValueWithInput).call(a,this,!0),changeInputWithArrow:M()(l=this._changeValueWithInputKeyEvent).call(l,this)},this._addClickEvent(),this._addDragEvent(),this._addInputEvent(),this.value=c.value,this.trigger("change")}return A(e,[{key:"destroy",value:function(){var e=this;this._removeClickEvent(),this._removeDragEvent(),this._removeInputEvent(),this.rangeElement.innerHTML="",U()(this,function(t,i){e[i]=null})}},{key:"max",get:function(){return this._max},set:function(e){this._max=e,this._absMax=-1*this._min+this._max,this.value=this._value}},{key:"min",get:function(){return this._min},set:function(e){this._min=e,this.max=this._max}},{key:"value",get:function(){return this._value},set:function(e){var t=((e=this._useDecimal?e:ji(e))-this._min)*this.rangeWidth/this._absMax;this.rangeWidth<t&&(t=this.rangeWidth),this.pointer.style.left="".concat(t,"px"),this.subbar.style.right="".concat(this.rangeWidth-t,"px"),this._value=e,this.rangeInputElement&&(this.rangeInputElement.value=e)}},{key:"trigger",value:function(e){this.fire(e,this._value)}},{key:"_getRangeWidth",value:function(){var e=function(e){return ji(window.getComputedStyle(e,null).width)};return e(this.rangeElement)-e(this.pointer)}},{key:"_drawRangeElement",value:function(){this.rangeElement.classList.add("tui-image-editor-range"),this.bar=document.createElement("div"),this.bar.className="tui-image-editor-virtual-range-bar",this.subbar=document.createElement("div"),this.subbar.className="tui-image-editor-virtual-range-subbar",this.pointer=document.createElement("div"),this.pointer.className="tui-image-editor-virtual-range-pointer",this.bar.appendChild(this.subbar),this.bar.appendChild(this.pointer),this.rangeElement.appendChild(this.bar)}},{key:"_addInputEvent",value:function(){this.rangeInputElement&&(this.rangeInputElement.addEventListener("keydown",this.eventHandler.changeInputWithArrow),this.rangeInputElement.addEventListener("keydown",this.eventHandler.changeInput),this.rangeInputElement.addEventListener("blur",this.eventHandler.changeInputFinally))}},{key:"_removeInputEvent",value:function(){this.rangeInputElement&&(this.rangeInputElement.removeEventListener("keydown",this.eventHandler.changeInputWithArrow),this.rangeInputElement.removeEventListener("keydown",this.eventHandler.changeInput),this.rangeInputElement.removeEventListener("blur",this.eventHandler.changeInputFinally))}},{key:"_changeValueWithInputKeyEvent",value:function(e){var t,i=e.keyCode,r=e.target;if(!(n()(t=[ti,ei]).call(t,i)<0)){var o=Number(r.value);if(!((o=this._valueUpDownForKeyEvent(o,i))<this._min||o>this._max)){var s=Ri(o,this._min,this.max);this.value=s,this.fire("change",s,!1)}}}},{key:"_valueUpDownForKeyEvent",value:function(e,t){var i=this._useDecimal?.1:1;return t===ti?e+=i:t===ei&&(e-=i),e}},{key:"_changeInput",value:function(e){var t=this;clearTimeout(this._userInputTimer);var i=e.keyCode;i<ni||i>ri?e.preventDefault():this._userInputTimer=m()(function(){t._inputSetValue(e.target.value)},350)}},{key:"_inputSetValue",value:function(e){var t=this._useDecimal?Number(e):ji(e);t=Ri(t,this._min,this.max),this.value=t,this.fire("change",t,!0)}},{key:"_changeValueWithInput",value:function(e,t){var i,r=t.keyCode,o=t.target;if(!(n()(i=[ti,ei]).call(i,r)>=0)){var s=this._filterForInputText(o.value),a=!s||isNaN(s);o.value=s,a||this._inputSetValue(s)}}},{key:"_addClickEvent",value:function(){this.rangeElement.addEventListener("click",this.eventHandler.changeSlideFinally)}},{key:"_removeClickEvent",value:function(){this.rangeElement.removeEventListener("click",this.eventHandler.changeSlideFinally)}},{key:"_addDragEvent",value:function(){this.pointer.addEventListener("mousedown",this.eventHandler.startChangingSlide)}},{key:"_removeDragEvent",value:function(){this.pointer.removeEventListener("mousedown",this.eventHandler.startChangingSlide)}},{key:"_changeSlide",value:function(e){var t=e.screenX-this.firstPosition,i=this.firstLeft+t;i=(i=i>this.rangeWidth?this.rangeWidth:i)<0?0:i,this.pointer.style.left="".concat(i,"px"),this.subbar.style.right="".concat(this.rangeWidth-i,"px");var n=i/this.rangeWidth,r=this._absMax*n+this._min,o=this._useDecimal?r:ji(r);this.value!==o&&(this.value=o,this.realTimeEvent&&this.fire("change",this._value,!1))}},{key:"_changeSlideFinally",value:function(e){if(e.stopPropagation(),"tui-image-editor-range"===e.target.className){var t=e.offsetX/this.rangeWidth,i=this._absMax*t+this._min;this.pointer.style.left="".concat(t*this.rangeWidth,"px"),this.subbar.style.right="".concat((1-t)*this.rangeWidth,"px"),this.value=i,this.fire("change",i,!0)}}},{key:"_startChangingSlide",value:function(e){this.firstPosition=e.screenX,this.firstLeft=ji(this.pointer.style.left)||0,document.addEventListener("mousemove",this.eventHandler.changeSlide),document.addEventListener("mouseup",this.eventHandler.stopChangingSlide)}},{key:"_stopChangingSlide",value:function(){this.fire("change",this._value,!0),document.removeEventListener("mousemove",this.eventHandler.changeSlide),document.removeEventListener("mouseup",this.eventHandler.stopChangingSlide)}},{key:"_filterForInputText",value:function(e){return e.replace(zn,"$1$2$3")}}]),e}();$().mixin(Vn);var Hn=Vn,Un=function(){function e(t,i){var n=i.locale,r=i.name,o=i.makeSvgIcon,s=i.menuBarPosition,a=i.templateHtml,l=i.usageStatistics;E(this,e),this.subMenuElement=t,this.menuBarPosition=s,this.toggleDirection="top"===s?"down":"up",this.colorPickerControls=[],this.usageStatistics=l,this.eventHandler={},this._makeSubMenuElement({locale:n,name:r,makeSvgIcon:o,templateHtml:a})}return A(e,[{key:"selector",value:function(e){return this.subMenuElement.querySelector(e)}},{key:"colorPickerChangeShow",value:function(e){var t;te()(t=this.colorPickerControls).call(t,function(t){e!==t&&t.hide()})}},{key:"getButtonType",value:function(e,t){return e.className.match(RegExp("(".concat(t.join("|"),")")))[0]}},{key:"changeClass",value:function(e,t,i){e.classList.remove(t),e.classList.add(i)}},{key:"changeStandbyMode",value:function(){}},{key:"changeStartMode",value:function(){}},{key:"_makeSubMenuElement",value:function(e){var t=e.locale,i=e.name,n=e.iconStyle,r=e.makeSvgIcon,o=e.templateHtml,s=document.createElement("div");s.className="tui-image-editor-menu-".concat(i),s.innerHTML=o({locale:t,iconStyle:n,makeSvgIcon:r}),this.subMenuElement.appendChild(s)}},{key:"_onStartEditingInputBox",value:function(){this.fire(wt)}},{key:"_onStopEditingInputBox",value:function(){this.fire(_t)}}]),e}();$().mixin(Un);var Wn=Un,$n=function(e){var t,i,n,r,o,s,a,l,c=e.locale,u=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l='\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-shape-button">\n <div class="tui-image-editor-button rect">\n <div>\n '.concat(u(["normal","active"],"shape-rectangle",!0),"\n </div>\n <label> ")).call(l,c.localize("Rectangle"),' </label>\n </div>\n <div class="tui-image-editor-button circle">\n <div>\n ')).call(a,u(["normal","active"],"shape-circle",!0),"\n </div>\n <label> ")).call(s,c.localize("Circle"),' </label>\n </div>\n <div class="tui-image-editor-button triangle">\n <div>\n ')).call(o,u(["normal","active"],"shape-triangle",!0),"\n </div>\n <label> ")).call(r,c.localize("Triangle"),' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tie-shape-color-button">\n <div class="tie-color-fill" title="')).call(n,c.localize("Fill"),'"></div>\n <div class="tie-color-stroke" title="')).call(i,c.localize("Stroke"),'"></div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">')).call(t,c.localize("Stroke"),'</label>\n <div class="tie-stroke-range"></div>\n <input class="tie-stroke-range-value tui-image-editor-range-value" value="
850" />\n </li>\n </ul>\n')};function Gn(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var qn={stroke:"#ffbb3b",fill:"",strokeWidth:3},Yn=function(e){En(i,e);var t=Gn(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"shape",makeSvgIcon:s,menuBarPosition:a,templateHtml:$n,usageStatistics:l})).type=null,r.options=qn,r._els={shapeSelectButton:r.selector(".tie-shape-button"),shapeColorButton:r.selector(".tie-shape-color-button"),strokeRange:new Hn({slider:r.selector(".tie-stroke-range"),input:r.selector(".tie-stroke-range-value")},wi),fillColorpicker:new Fn(r.selector(".tie-color-fill"),{defaultColor:"",toggleDirection:r.toggleDirection,usageStatistics:r.usageStatistics}),strokeColorpicker:new Fn(r.selector(".tie-color-stroke"),{defaultColor:"#ffbb3b",toggleDirection:r.toggleDirection,usageStatistics:r.usageStatistics})},r.colorPickerControls.push(r._els.fillColorpicker),r.colorPickerControls.push(r._els.strokeColorpicker),r.colorPickerInputBoxes=[],r.colorPickerInputBoxes.push(r._els.fillColorpicker.colorpickerElement.querySelector(Ct)),r.colorPickerInputBoxes.push(r._els.strokeColorpicker.colorpickerElement.querySelector(Ct)),r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),this._els.strokeRange.destroy(),this._els.fillColorpicker.destroy(),this._els.strokeColorpicker.destroy(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n,r,o,s,a=this;this.eventHandler.shapeTypeSelected=M()(t=this._changeShapeHandler).call(t,this),this.actions=e,this._els.shapeSelectButton.addEventListener("click",this.eventHandler.shapeTypeSelected),this._els.strokeRange.on("change",M()(i=this._changeStrokeRangeHandler).call(i,this)),this._els.fillColorpicker.on("change",M()(n=this._changeFillColorHandler).call(n,this)),this._els.strokeColorpicker.on("change",M()(r=this._changeStrokeColorHandler).call(r,this)),this._els.fillColorpicker.on("changeShow",M()(o=this.colorPickerChangeShow).call(o,this)),this._els.strokeColorpicker.on("changeShow",M()(s=this.colorPickerChangeShow).call(s,this)),Ln()(this.colorPickerInputBoxes,function(e){var t,i;e.addEventListener(kt,M()(t=a._onStartEditingInputBox).call(t,a)),e.addEventListener(xt,M()(i=a._onStopEditingInputBox).call(i,a))},this)}},{key:"_removeEvent",value:function(){var e=this;this._els.shapeSelectButton.removeEventListener("click",this.eventHandler.shapeTypeSelected),this._els.strokeRange.off(),this._els.fillColorpicker.off(),this._els.strokeColorpicker.off(),Ln()(this.colorPickerInputBoxes,function(t){var i,n;t.removeEventListener(kt,M()(i=e._onStartEditingInputBox).call(i,e)),t.removeEventListener(xt,M()(n=e._onStopEditingInputBox).call(n,e))},this)}},{key:"setShapeStatus",value:function(e){var t=e.strokeWidth,i=e.strokeColor,n=e.fillColor;this._els.strokeRange.value=t,this._els.strokeColorpicker.color=i,this._els.fillColorpicker.color=n,this.options.stroke=i,this.options.fill=n,this.options.strokeWidth=t,this.actions.setDrawingShape(this.type,{strokeWidth:t})}},{key:"changeStartMode",value:function(){this.actions.stopDrawingMode()}},{key:"changeStandbyMode",value:function(){this.type=null,this.actions.changeSelectableAll(!0),this._els.shapeSelectButton.classList.remove("circle"),this._els.shapeSelectButton.classList.remove("triangle"),this._els.shapeSelectButton.classList.remove("rect")}},{key:"setMaxStrokeValue",value:function(e){var t=e;t<=0&&(t=wi.max),this._els.strokeRange.max=t}},{key:"setStrokeValue",value:function(e){this._els.strokeRange.value=e,this._els.strokeRange.trigger("change")}},{key:"getStrokeValue",value:function(){return this._els.strokeRange.value}},{key:"_changeShapeHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){this.actions.stopDrawingMode(),this.actions.discardSelection();var i=this.getButtonType(t,["circle","triangle","rect"]);
vendor: 16,046 bytes, line 85
85if(this.type===i)return void this.changeStandbyMode();this.changeStandbyMode(),this.type=i,e.currentTarget.classList.add(i),this.actions.changeSelectableAll(!1),this.actions.modeChange("shape")}}},{key:"_changeStrokeRangeHandler",value:function(e,t){this.options.strokeWidth=ji(e),this.actions.changeShape({strokeWidth:e},!t),this.actions.setDrawingShape(this.type,this.options)}},{key:"_changeFillColorHandler",value:function(e){e=e||"transparent",this.options.fill=e,this.actions.changeShape({fill:e})}},{key:"_changeStrokeColorHandler",value:function(e){e=e||"transparent",this.options.stroke=e,this.actions.changeShape({stroke:e})}}]),i}(Wn),Zn=Yn,Xn=function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b=e.locale,y=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l=D()(c=D()(u=D()(h=D()(d=D()(f=D()(p=D()(m=D()(g=D()(v='\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-crop-preset-button">\n <div class="tui-image-editor-button preset preset-none active">\n <div>\n '.concat(y(["normal","active"],"shape-rectangle",!0),"\n </div>\n <label> ")).call(v,b.localize("Custom"),' </label>\n </div>\n <div class="tui-image-editor-button preset preset-square">\n <div>\n ')).call(g,y(["normal","active"],"crop",!0),"\n </div>\n <label> ")).call(m,b.localize("Square"),' </label>\n </div>\n <div class="tui-image-editor-button preset preset-3-2">\n <div>\n ')).call(p,y(["normal","active"],"crop",!0),"\n </div>\n <label> ")).call(f,b.localize("3:2"),' </label>\n </div>\n <div class="tui-image-editor-button preset preset-4-3">\n <div>\n ')).call(d,y(["normal","active"],"crop",!0),"\n </div>\n <label> ")).call(h,b.localize("4:3"),' </label>\n </div>\n <div class="tui-image-editor-button preset preset-5-4">\n <div>\n ')).call(u,y(["normal","active"],"crop",!0),"\n </div>\n <label> ")).call(c,b.localize("5:4"),' </label>\n </div>\n <div class="tui-image-editor-button preset preset-7-5">\n <div>\n ')).call(l,y(["normal","active"],"crop",!0),"\n </div>\n <label> ")).call(a,b.localize("7:5"),' </label>\n </div>\n <div class="tui-image-editor-button preset preset-16-9">\n <div>\n ')).call(s,y(["normal","active"],"crop",!0),"\n </div>\n <label> ")).call(o,b.localize("16:9"),' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition tui-image-editor-newline">\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tie-crop-button action">\n <div class="tui-image-editor-button apply">\n ')).call(r,y(["normal","active"],"apply"),"\n <label>\n ")).call(n,b.localize("Apply"),'\n </label>\n </div>\n <div class="tui-image-editor-button cancel">\n ')).call(i,y(["normal","active"],"cancel"),"\n <label>\n ")).call(t,b.localize("Cancel"),"\n </label>\n </div>\n </li>\n </ul>\n")};function Kn(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Jn=function(e){En(i,e);var t=Kn(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"crop",makeSvgIcon:s,menuBarPosition:a,templateHtml:Xn,usageStatistics:l})).status="active",r._els={apply:r.selector(".tie-crop-button .apply"),cancel:r.selector(".tie-crop-button .cancel"),preset:r.selector(".tie-crop-preset-button")},r.defaultPresetButton=r._els.preset.querySelector(".preset-none"),r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n,r=M()(t=this._applyEventHandler).call(t,this),o=M()(i=this._cancelEventHandler).call(i,this),s=M()(n=this._cropzonePresetEventHandler).call(n,this);this.eventHandler={apply:r,cancel:o,cropzonePreset:s},this.actions=e,this._els.apply.addEventListener("click",r),this._els.cancel.addEventListener("click",o),this._els.preset.addEventListener("click",s)}},{key:"_removeEvent",value:function(){this._els.apply.removeEventListener("click",this.eventHandler.apply),this._els.cancel.removeEventListener("click",this.eventHandler.cancel),this._els.preset.removeEventListener("click",this.eventHandler.cropzonePreset)}},{key:"_applyEventHandler",value:function(){this.actions.crop(),this._els.apply.classList.remove("active")}},{key:"_cancelEventHandler",value:function(){this.actions.cancel(),this._els.apply.classList.remove("active")}},{key:"_cropzonePresetEventHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button.preset");if(t){var i=X(t.className.match(/preset-[^\s]+/),1)[0];this._setPresetButtonActive(t),this.actions.preset(i)}}},{key:"changeStartMode",value:function(){this.actions.modeChange("crop")}},{key:"changeStandbyMode",value:function(){this.actions.stopDrawingMode(),this._setPresetButtonActive()}},{key:"changeApplyButtonStatus",value:function(e){e?this._els.apply.classList.add("active"):this._els.apply.classList.remove("active")}},{key:"_setPresetButtonActive",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultPresetButton;U()(this._els.preset.querySelectorAll(".preset"),function(e){e.classList.remove("active")}),e&&e.classList.add("active")}}]),i}(Wn),Qn=Jn,er=function(e){var t,i,n,r,o,s,a=e.locale,l=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s='\n <ul class="tui-image-editor-submenu-item">\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-range-wrap tui-image-editor-newline">\n <label class="range">'.concat(a.localize("Width"),' </label>\n <div class="tie-width-range"></div>\n <input class="tie-width-range-value tui-image-editor-range-value" value="0" /> <label>px</label>\n <div class="tui-image-editor-partition tui-image-editor-newline"></div>\n <label class="range">')).call(s,a.localize("Height"),'</label>\n <div class="tie-height-range"></div>\n <input class="tie-height-range-value tui-image-editor-range-value" value="0" /> <label>px</label>\n </div>\n </li>\n <li class="tui-image-editor-partition tui-image-editor-newline"></li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-checkbox-wrap">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-lock-aspect-ratio">\n <span>')).call(o,a.localize("Lock Aspect Ratio"),'</span>\n </label>\n </div>\n </div>\n </li>\n <li class="tui-image-editor-partition tui-image-editor-newline"></li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-partition tui-image-editor-newline"></li>\n <li class="tie-resize-button action">\n <div class="tui-image-editor-button apply">\n ')).call(r,l(["normal","active"],"apply"),"\n <label>\n ")).call(n,a.localize("Apply"),'\n </label>\n </div>\n <div class="tui-image-editor-button cancel">\n ')).call(i,l(["normal","active"],"cancel"),"\n <label>\n ")).call(t,a.localize("Cancel"),"\n </label>\n </div>\n </li>\n </ul>\n")};function tr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var ir=function(e){En(i,e);var t=tr(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"resize",makeSvgIcon:s,menuBarPosition:a,templateHtml:er,usageStatistics:l})).status="active",r._lockState=!1,r._originalDimensions=null,r._els={widthRange:new Hn({slider:r.selector(".tie-width-range"),input:r.selector(".tie-width-range-value")},Ti),heightRange:new Hn({slider:r.selector(".tie-height-range"),input:r.selector(".tie-height-range-value")},Ti),lockAspectRatio:r.selector(".tie-lock-aspect-ratio"),apply:r.selector(".tie-resize-button .apply"),cancel:r.selector(".tie-resize-button .cancel")},r}return A(i,[{key:"changeStartMode",value:function(){this.actions.modeChange("resize");var e=this.actions.getCurrentDimensions();this._originalDimensions=e,this.setWidthValue(e.width),this.setHeightValue(e.height)}},{key:"changeStandbyMode",value:function(){this.actions.stopDrawingMode(),this.actions.reset(!0)}},{key:"setLimit",value:function(e){this._els.widthRange.min=this.calcMinValue(e.minWidth),this._els.heightRange.min=this.calcMinValue(e.minHeight),this._els.widthRange.max=this.calcMaxValue(e.maxWidth),this._els.heightRange.max=this.calcMaxValue(e.maxHeight)}},{key:"calcMaxValue",value:function(e){return e<=0&&(e=Ti.max),e}},{key:"calcMinValue",value:function(e){return e<=0&&(e=Ti.min),e}},{key:"setWidthValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._els.widthRange.value=e,t&&this._els.widthRange.trigger("change")}},{key:"setHeightValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._els.heightRange.value=e,t&&this._els.heightRange.trigger("change")}},{key:"destroy",value:function(){this._removeEvent(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n,r,o;this._els.widthRange.on("change",M()(t=this._changeWidthRangeHandler).call(t,this)),this._els.heightRange.on("change",M()(i=this._changeHeightRangeHandler).call(i,this)),this._els.lockAspectRatio.addEventListener("change",M()(n=this._changeLockAspectRatio).call(n,this));var s=M()(r=this._applyEventHandler).call(r,this),a=M()(o=this._cancelEventHandler).call(o,this);this.eventHandler={apply:s,cancel:a},this.actions=e,this._els.apply.addEventListener("click",s),this._els.cancel.addEventListener("click",a)}},{key:"_changeWidthRangeHandler",value:function(e){this.actions.preview("width",ji(e),this._lockState)}},{key:"_changeHeightRangeHandler",value:function(e){this.actions.preview("height",ji(e),this._lockState)}},{key:"_changeLockAspectRatio",value:function(e){this._lockState=e.target.checked,this.actions.lockAspectRatio(this._lockState,Ti.min,Ti.max)}},{key:"_removeEvent",value:function(){this._els.apply.removeEventListener("click",this.eventHandler.apply),this._els.cancel.removeEventListener("click",this.eventHandler.cancel)}},{key:"_applyEventHandler",value:function(){this.actions.resize(),this._els.apply.classList.remove("active")}},{key:"_cancelEventHandler",value:function(){this.actions.reset(),this._els.cancel.classList.remove("active")}},{key:"changeApplyButtonStatus",value:function(e){e?this._els.apply.classList.add("active"):this._els.apply.classList.remove("active")}}]),i}(Wn),nr=ir,rr=function(e){var t,i,n,r,o,s=e.locale,a=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o='\n <ul class="tie-flip-button tui-image-editor-submenu-item">\n <li>\n <div class="tui-image-editor-button flipX">\n <div>\n '.concat(a(["normal","active"],"flip-x",!0),"\n </div>\n <label>\n ")).call(o,s.localize("Flip X"),'\n </label>\n </div>\n <div class="tui-image-editor-button flipY">\n <div>\n ')).call(r,a(["normal","active"],"flip-y",!0),"\n </div>\n <label>\n ")).call(n,s.localize("Flip Y"),'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tui-image-editor-button resetFlip">\n <div>\n ')).call(i,a(["normal","active"],"flip-reset",!0),"\n </div>\n <label>\n ")).call(t,s.localize("Reset"),"\n </label>\n </div>\n </li>\n </ul>\n")};function or(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var sr=function(e){En(i,e);var t=or(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"flip",makeSvgIcon:s,menuBarPosition:a,templateHtml:rr,usageStatistics:l})).flipStatus=!1,r._els={flipButton:r.selector(".tie-flip-button")},r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),Hi(this)}},{key:"addEvent",value:function(e){var t;this.eventHandler.changeFlip=M()(t=this._changeFlip).call(t,this),this._actions=e,this._els.flipButton.addEventListener("click",this.eventHandler.changeFlip)}},{key:"_removeEvent",value:function(){this._els.flipButton.removeEventListener("click",this.eventHandler.changeFlip)}},{key:"_changeFlip",value:function(e){var t=this,i=e.target.closest(".tui-image-editor-button");if(i){var n=this.getButtonType(i,["flipX","flipY","resetFlip"]);if(!this.flipStatus&&"resetFlip"===n)return;this._actions.flip(n).then(function(e){var i=t._els.flipButton.classList;t.flipStatus=!1,i.remove("resetFlip"),U()(["flipX","flipY"],function(n){i.remove(n),e[n]&&(i.add(n),i.add("resetFlip"),t.flipStatus=!0)})})}}}]),i}(Wn),ar=sr,lr=function(e){var t,i,n=e.locale,r=e.makeSvgIcon;return D()(t=D()(i='\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-rotate-button">\n <div class="tui-image-editor-button clockwise">\n <div>\n '.concat(r(["normal","active"],"rotate-clockwise",!0),'\n </div>\n <label> 30 </label>\n </div>\n <div class="tui-image-editor-button counterclockwise">\n <div>\n ')).call(i,r(["normal","active"],"rotate-counterclockwise",!0),'\n </div>\n <label> -30 </label>\n </div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">')).call(t,n.localize("Range"),'</label>\n <div class="tie-rotate-range"></div>\n <input class="tie-rotate-range-value tui-image-editor-range-value" value="
850" />\n </li>\n </ul>\n')};function cr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var ur=function(e){En(i,e);var t=cr(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"rotate",makeSvgIcon:s,menuBarPosition:a,templateHtml:lr,usageStatistics:l}))._value=0,r._els={rotateButton:r.selector(".tie-rotate-button"),rotateRange:new Hn({slider:r.selector(".tie-rotate-range"),input:r.selector(".tie-rotate-range-value")},bi)},r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),this._els.rotateRange.destroy(),Hi(this)}},{key:"setRangeBarAngle",value:function(e,t){var i=t;"rotate"===e&&(i=Q()(this._els.rotateRange.value,10)+t),this._setRangeBarRatio(i)}},{key:"_setRangeBarRatio",value:function(e){this._els.rotateRange.value=e}},{key:"addEvent",value:function(e){var t,i;this.eventHandler.rotationAngleChanged=M()(t=this._changeRotateForButton).call(t,this),this.actions=e,this._els.rotateButton.addEventListener("click",this.eventHandler.rotationAngleChanged),this._els.rotateRange.on("change",M()(i=this._changeRotateForRange).call(i,this))}},{key:"_removeEvent",value:function(){this._els.rotateButton.removeEventListener("click",this.eventHandler.rotationAngleChanged),this._els.rotateRange.off()}},{key:"_changeRotateForRange",value:function(e,t){var i=ji(e);this.actions.setAngle(i,!t),this._value=i}},{key:"_changeRotateForButton",value:function(e){var t=e.target.closest(".tui-image-editor-button"),i=this._els.rotateRange.value;if(t){var n={clockwise:30,counterclockwise:-30}[this.getButtonType(t,["counterclockwise","clockwise"])],r=Q()(i,10)+n;r>=-360&&r<=360&&this.actions.rotate(n)}}}]),i}(Wn),hr=ur,dr=function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p=e.locale,m=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l=D()(c=D()(u=D()(h=D()(d=D()(f='\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-text-effect-button">\n <div class="tui-image-editor-button bold">\n <div>\n '.concat(m(["normal","active"],"text-bold",!0),"\n </div>\n <label> ")).call(f,p.localize("Bold"),' </label>\n </div>\n <div class="tui-image-editor-button italic">\n <div>\n ')).call(d,m(["normal","active"],"text-italic",!0),"\n </div>\n <label> ")).call(h,p.localize("Italic"),' </label>\n </div>\n <div class="tui-image-editor-button underline">\n <div>\n ')).call(u,m(["normal","active"],"text-underline",!0),"\n </div>\n <label> ")).call(c,p.localize("Underline"),' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tie-text-align-button">\n <div class="tui-image-editor-button left">\n <div>\n ')).call(l,m(["normal","active"],"text-align-left",!0),"\n </div>\n <label> ")).call(a,p.localize("Left"),' </label>\n </div>\n <div class="tui-image-editor-button center">\n <div>\n ')).call(s,m(["normal","active"],"text-align-center",!0),"\n </div>\n <label> ")).call(o,p.localize("Center"),' </label>\n </div>\n <div class="tui-image-editor-button right">\n <div>\n ')).call(r,m(["normal","active"],"text-align-right",!0),"\n </div>\n <label> ")).call(n,p.localize("Right"),' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tie-text-color" title="')).call(i,p.localize("Color"),'"></div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">')).call(t,p.localize("Text size"),'</label>\n <div class="tie-text-range"></div>\n <input class="tie-text-range-value tui-image-editor-range-value" value="
850" />\n </li>\n </ul>\n')};function fr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var pr=function(e){En(i,e);var t=fr(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"text",makeSvgIcon:s,menuBarPosition:a,templateHtml:dr,usageStatistics:l})).effect={bold:!1,italic:!1,underline:!1},r.align="tie-text-align-left",r._els={textEffectButton:r.selector(".tie-text-effect-button"),textAlignButton:r.selector(".tie-text-align-button"),textColorpicker:new Fn(r.selector(".tie-text-color"),{defaultColor:"#ffbb3b",toggleDirection:r.toggleDirection,usageStatistics:r.usageStatistics}),textRange:new Hn({slider:r.selector(".tie-text-range"),input:r.selector(".tie-text-range-value")},_i)},r.colorPickerInputBox=r._els.textColorpicker.colorpickerElement.querySelector(Ct),r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),this._els.textColorpicker.destroy(),this._els.textRange.destroy(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n,r,o,s,a=M()(t=this._setTextEffectHandler).call(t,this),l=M()(i=this._setTextAlignHandler).call(i,this);this.eventHandler={setTextEffect:a,setTextAlign:l},this.actions=e,this._els.textEffectButton.addEventListener("click",a),this._els.textAlignButton.addEventListener("click",l),this._els.textRange.on("change",M()(n=this._changeTextRnageHandler).call(n,this)),this._els.textColorpicker.on("change",M()(r=this._changeColorHandler).call(r,this)),this.colorPickerInputBox.addEventListener(kt,M()(o=this._onStartEditingInputBox).call(o,this)),this.colorPickerInputBox.addEventListener(xt,M()(s=this._onStopEditingInputBox).call(s,this))}},{key:"_removeEvent",value:function(){var e,t,i=this.eventHandler,n=i.setTextEffect,r=i.setTextAlign;this._els.textEffectButton.removeEventListener("click",n),this._els.textAlignButton.removeEventListener("click",r),this._els.textRange.off(),this._els.textColorpicker.off(),this.colorPickerInputBox.removeEventListener(kt,M()(e=this._onStartEditingInputBox).call(e,this)),this.colorPickerInputBox.removeEventListener(xt,M()(t=this._onStopEditingInputBox).call(t,this))}},{key:"changeStandbyMode",value:function(){this.actions.stopDrawingMode()}},{key:"changeStartMode",value:function(){this.actions.modeChange("text")}},{key:"textColor",get:function(){return this._els.textColorpicker.color},set:function(e){this._els.textColorpicker.color=e}},{key:"fontSize",get:function(){return this._els.textRange.value},set:function(e){this._els.textRange.value=e}},{key:"fontStyle",get:function(){return this.effect.italic?"italic":"normal"}},{key:"fontWeight",get:function(){return this.effect.bold?"bold":"normal"}},{key:"underline",get:function(){return this.effect.underline}},{key:"setTextStyleStateOnAction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ne()(e),i=e.fontSize,n=e.fontStyle,r=e.fontWeight,o=e.textDecoration,s=e.textAlign;this.textColor=t,this.fontSize=i,this.setEffectState("italic",n),this.setEffectState("bold",r),this.setEffectState("underline",o),this.setAlignState("tie-text-align-".concat(s))}},{key:"setEffectState",value:function(e,t){var i="italic"===t||"bold"===t||"underline"===t,n=this._els.textEffectButton.querySelector(".tui-image-editor-button.".concat(e));this.effect[e]=i,n.classList[i?"add":"remove"]("active")}},{key:"setAlignState",value:function(e){var t=this._els.textAlignButton;t.classList.remove(this.align),t.classList.add(e),this.align=e}},{key:"_setTextEffectHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){var i=X(t.className.match(/(bold|italic|underline)/),1)[0],n={bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},underline:{textDecoration:"underline"}}[i];this.effect[i]=!this.effect[i],t.classList.toggle("active"),this.actions.changeTextStyle(n)}}},{key:"_setTextAlignHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){var i=this.getButtonType(t,["left","center","right"]),n="tie-text-align-".concat(i);e.currentTarget.classList.remove(this.align),this.align!==n&&e.currentTarget.classList.add(n),this.actions.changeTextStyle({textAlign:i}),this.align=n}}},{key:"_changeTextRnageHandler",value:function(e,t){this.actions.changeTextStyle({fontSize:e},!t)}},{key:"_changeColorHandler",value:function(e){e=e||"transparent",this.actions.changeTextStyle({fill:e})}}]),i}
vendor: 16,325 bytes, line 85
85(Wn),mr=pr,gr=function(e){var t,i,n,r=e.locale,o=e.makeSvgIcon;return D()(t=D()(i=D()(n='\n <ul class="tui-image-editor-submenu-item">\n <li>\n <div class="tui-image-editor-button">\n <div>\n <input type="file" accept="image/*" class="tie-mask-image-file">\n '.concat(o(["normal","active"],"mask-load",!0),"\n </div>\n <label> ")).call(n,r.localize("Load Mask Image"),' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tie-mask-apply tui-image-editor-newline apply" style="margin-top: 22px;margin-bottom: 5px">\n <div class="tui-image-editor-button apply">\n ')).call(i,o(["normal","active"],"apply"),"\n <label>\n ")).call(t,r.localize("Apply"),"\n </label>\n </div>\n </li>\n </ul>\n")};function vr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var br=function(e){En(i,e);var t=vr(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"mask",makeSvgIcon:s,menuBarPosition:a,templateHtml:gr,usageStatistics:l}))._els={applyButton:r.selector(".tie-mask-apply"),maskImageButton:r.selector(".tie-mask-image-file")},r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n=M()(t=this._loadMaskFile).call(t,this),r=M()(i=this._applyMask).call(i,this);this.eventHandler={loadMaskFile:n,applyMask:r},this.actions=e,this._els.maskImageButton.addEventListener("change",n),this._els.applyButton.addEventListener("click",r)}},{key:"_removeEvent",value:function(){this._els.maskImageButton.removeEventListener("change",this.eventHandler.loadMaskFile),this._els.applyButton.removeEventListener("click",this.eventHandler.applyMask)}},{key:"_applyMask",value:function(){this.actions.applyFilter(),this._els.applyButton.classList.remove("active")}},{key:"_loadMaskFile",value:function(e){var t;zi()||alert("This browser does not support file-api");var i=X(e.target.files,1)[0];i&&(t=B().createObjectURL(i),this.actions.loadImageFromURL(t,i),this._els.applyButton.classList.add("active"))}}]),i}(Wn),yr=br,wr=function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b,y,w,_=e.locale,k=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l=D()(c=D()(u=D()(h=D()(d=D()(f=D()(p=D()(m=D()(g=D()(v=D()(b=D()(y=D()(w='\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-icon-add-button">\n <div class="tui-image-editor-button" data-icontype="icon-arrow">\n <div>\n '.concat(k(["normal","active"],"icon-arrow",!0),"\n </div>\n <label>\n ")).call(w,_.localize("Arrow"),'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-arrow-2">\n <div>\n ')).call(y,k(["normal","active"],"icon-arrow-2",!0),"\n </div>\n <label>\n ")).call(b,_.localize("Arrow-2"),'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-arrow-3">\n <div>\n ')).call(v,k(["normal","active"],"icon-arrow-3",!0),"\n </div>\n <label>\n ")).call(g,_.localize("Arrow-3"),'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-star">\n <div>\n ')).call(m,k(["normal","active"],"icon-star",!0),"\n </div>\n <label>\n ")).call(p,_.localize("Star-1"),'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-star-2">\n <div>\n ')).call(f,k(["normal","active"],"icon-star-2",!0),"\n </div>\n <label>\n ")).call(d,_.localize("Star-2"),'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-polygon">\n <div>\n ')).call(h,k(["normal","active"],"icon-polygon",!0),"\n </div>\n <label>\n ")).call(u,_.localize("Polygon"),'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-location">\n <div>\n ')).call(c,k(["normal","active"],"icon-location",!0),"\n </div>\n <label>\n ")).call(l,_.localize("Location"),'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-heart">\n <div>\n ')).call(a,k(["normal","active"],"icon-heart",!0),"\n </div>\n <label>\n ")).call(s,_.localize("Heart"),'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-bubble">\n <div>\n ')).call(o,k(["normal","active"],"icon-bubble",!0),"\n </div>\n <label>\n ")).call(r,_.localize("Bubble"),'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tie-icon-add-button">\n <div class="tui-image-editor-button" style="margin:0">\n <div>\n <input type="file" accept="image/*" class="tie-icon-image-file">\n ')).call(n,k(["normal","active"],"icon-load",!0),"\n </div>\n <label>\n ")).call(i,_.localize("Custom icon"),'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tie-icon-color" title="')).call(t,_.localize("Color"),'"></div>\n </li>\n </ul>\n')};function _r(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var kr=function(e){En(i,e);var t=_r(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"icon",makeSvgIcon:s,menuBarPosition:a,templateHtml:wr,usageStatistics:l})).iconType=null,r._iconMap={},r._els={registerIconButton:r.selector(".tie-icon-image-file"),addIconButton:r.selector(".tie-icon-add-button"),iconColorpicker:new Fn(r.selector(".tie-icon-color"),{defaultColor:"#ffbb3b",toggleDirection:r.toggleDirection,usageStatistics:r.usageStatistics})},r.colorPickerInputBox=r._els.iconColorpicker.colorpickerElement.querySelector(Ct),r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),this._els.iconColorpicker.destroy(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n,r,o,s=M()(t=this._registerIconHandler).call(t,this),a=M()(i=this._addIconHandler).call(i,this);this.eventHandler={registerIcon:s,addIcon:a},this.actions=e,this._els.iconColorpicker.on("change",M()(n=this._changeColorHandler).call(n,this)),this._els.registerIconButton.addEventListener("change",s),this._els.addIconButton.addEventListener("click",a),this.colorPickerInputBox.addEventListener(kt,M()(r=this._onStartEditingInputBox).call(r,this)),this.colorPickerInputBox.addEventListener(xt,M()(o=this._onStopEditingInputBox).call(o,this))}},{key:"_removeEvent",value:function(){var e,t;this._els.iconColorpicker.off(),this._els.registerIconButton.removeEventListener("change",this.eventHandler.registerIcon),this._els.addIconButton.removeEventListener("click",this.eventHandler.addIcon),this.colorPickerInputBox.removeEventListener(kt,M()(e=this._onStartEditingInputBox).call(e,this)),this.colorPickerInputBox.removeEventListener(xt,M()(t=this._onStopEditingInputBox).call(t,this))}},{key:"clearIconType",value:function(){this._els.addIconButton.classList.remove(this.iconType),this.iconType=null}},{key:"registerDefaultIcon",value:function(){var e=this;U()(vi,function(t,i){e.actions.registerDefaultIcons(i,t)})}},{key:"setIconPickerColor",value:function(e){this._els.iconColorpicker.color=e}},{key:"changeStandbyMode",value:function(){this.clearIconType(),this.actions.cancelAddIcon()}},{key:"_changeColorHandler",value:function(e){e=e||"transparent",this.actions.changeColor(e)}},{key:"_addIconHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){var i=t.getAttribute("data-icontype"),n=this._els.iconColorpicker.color;this.actions.discardSelection(),this.actions.changeSelectableAll(!1),this._els.addIconButton.classList.remove(this.iconType),this._els.addIconButton.classList.add(i),this.iconType===i?this.changeStandbyMode():(this.actions.addIcon(i,n),this.iconType=i)}}},{key:"_registerIconHandler",value:function(e){var t;zi||alert("This browser does not support file-api");var i=X(e.target.files,1)[0];i&&(t=B().createObjectURL(i),this.actions.registerCustomIcon(t,i))}}]),i}(Wn),xr=kr,Cr=function(e){var t,i,n,r,o,s=e.locale,a=e.makeSvgIcon;return D()(t=D()(i=D()(n=D()(r=D()(o='\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-draw-line-select-button">\n <div class="tui-image-editor-button free">\n <div>\n '.concat(a(["normal","active"],"draw-free",!0),"\n </div>\n <label>\n ")).call(o,s.localize("Free"),'\n </label>\n </div>\n <div class="tui-image-editor-button line">\n <div>\n ')).call(r,a(["normal","active"],"draw-line",!0),"\n </div>\n <label>\n ")).call(n,s.localize("Straight"),'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tie-draw-color" title="')).call(i,s.localize("Color"),'"></div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">')).call(t,s.localize("Range"),'</label>\n <div class="tie-draw-range"></div>\n <input class="tie-draw-range-value tui-image-editor-range-value" value="0" />\n </li>\n </ul>\n')};function Sr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Er=function(e){En(i,e);var t=Sr(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon,a=n.menuBarPosition,l=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"draw",makeSvgIcon:s,menuBarPosition:a,templateHtml:Cr,usageStatistics:l}))._els={lineSelectButton:r.selector(".tie-draw-line-select-button"),drawColorPicker:new Fn(r.selector(".tie-draw-color"),{defaultColor:"#00a9ff",toggleDirection:r.toggleDirection,usageStatistics:r.usageStatistics}),drawRange:new Hn({slider:r.selector(".tie-draw-range"),input:r.selector(".tie-draw-range-value")},yi)},r.type=null,r.color=r._els.drawColorPicker.color,r.width=r._els.drawRange.value,r.colorPickerInputBox=r._els.drawColorPicker.colorpickerElement.querySelector(Ct),r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),this._els.drawColorPicker.destroy(),this._els.drawRange.destroy(),Hi(this)}},{key:"addEvent",value:function(e){var t,i,n,r,o;this.eventHandler.changeDrawType=M()(t=this._changeDrawType).call(t,this),this.actions=e,this._els.lineSelectButton.addEventListener("click",this.eventHandler.changeDrawType),this._els.drawColorPicker.on("change",M()(i=this._changeDrawColor).call(i,this)),this._els.drawRange.on("change",M()(n=this._changeDrawRange).call(n,this)),this.colorPickerInputBox.addEventListener(kt,M()(r=this._onStartEditingInputBox).call(r,this)),this.colorPickerInputBox.addEventListener(xt,M()(o=this._onStopEditingInputBox).call(o,this))}},{key:"_removeEvent",value:function(){var e,t;this._els.lineSelectButton.removeEventListener("click",this.eventHandler.changeDrawType),this._els.drawColorPicker.off(),this._els.drawRange.off(),this.colorPickerInputBox.removeEventListener(kt,M()(e=this._onStartEditingInputBox).call(e,this)),this.colorPickerInputBox.removeEventListener(xt,M()(t=this._onStopEditingInputBox).call(t,this))}},{key:"setDrawMode",value:function(){this.actions.setDrawMode(this.type,{width:this.width,color:Vi(this.color,.7)})}},{key:"changeStandbyMode",value:function(){this.type=null,this.actions.stopDrawingMode(),this.actions.changeSelectableAll(!0),this._els.lineSelectButton.classList.remove("free"),this._els.lineSelectButton.classList.remove("line")}},{key:"changeStartMode",value:function(){this.type="free",this._els.lineSelectButton.classList.add("free"),this.setDrawMode()}},{key:"_changeDrawType",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){var i=this.getButtonType(t,["free","line"]);if(this.actions.discardSelection(),this.type===i)return void this.changeStandbyMode();this.changeStandbyMode(),this.type=i,this._els.lineSelectButton.classList.add(i),this.setDrawMode()}}},{key:"_changeDrawColor",value:function(e){this.color=e||"transparent",this.type?this.setDrawMode():this.changeStartMode()}},{key:"_changeDrawRange",value:function(e){this.width=e,this.type?this.setDrawMode():this.changeStartMode()}}]),i}(Wn),Tr=Er,Ar=r(9886),Ir=r.n(Ar),Mr=function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v=e.locale;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l=D()(c=D()(u=D()(h=D()(d=D()(f=D()(p=D()(m=D()(g='\n <ul class="tui-image-editor-submenu-item">\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-checkbox-wrap fixed-width">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-grayscale">\n <span>'.concat(v.localize("Grayscale"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-invert">\n <span>')).call(g,v.localize("Invert"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-sepia">\n <span>')).call(m,v.localize("Sepia"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-vintage">\n <span>')).call(p,v.localize("Sepia2"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-blur">
85\n <span>')).call(f,v.localize("Blur"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-sharpen">\n <span>')).call(d,v.localize("Sharpen"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-emboss">\n <span>')).call(h,v.localize("Emboss"),'</span>\n </label>\n </div>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled" style="margin-bottom: 7px;">\n <div class="tui-image-editor-checkbox-wrap">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-remove-white">\n <span>')).call(u,v.localize("Remove White"),'</span>\n </label>\n </div>\n </div>\n <div class="tui-image-editor-newline tui-image-editor-range-wrap short">\n <label>')).call(c,v.localize("Distance"),'</label>\n <div class="tie-removewhite-distance-range"></div>\n </div>\n </div>\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-brightness">\n <span>')).call(l,v.localize("Brightness"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-range-wrap short">\n <div class="tie-brightness-range"></div>\n </div>\n </div>\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-noise">\n <span>')).call(a,v.localize("Noise"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-range-wrap short">\n <div class="tie-noise-range"></div>\n </div>\n </div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-pixelate">\n <span>')).call(s,v.localize("Pixelate"),'</span>\n </label>\n </div>\n <div class="tui-image-editor-range-wrap short">\n <div class="tie-pixelate-range"></div>\n </div>\n </div>\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled">\n <div class="tui-image-editor-newline tui-image-editor-checkbox-wrap">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-color-filter">\n <span>')).call(o,v.localize("Color Filter"),'</span>\n </label>\n </div>\n </div>\n <div class="tui-image-editor-newline tui-image-editor-range-wrap short">\n <label>')).call(r,v.localize("Threshold"),'</label>\n <div class="tie-colorfilter-threshold-range"></div>\n </div>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="filter-color-item">\n <div class="tie-filter-tint-color" title="')).call(n,v.localize("Tint"),'"></div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-tint">
85\n <span></span>\n </label>\n </div>\n </div>\n <div class="filter-color-item">\n <div class="tie-filter-multiply-color" title="')).call(i,v.localize("Multiply"),'"></div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-multiply">\n <span></span>\n </label>\n </div>\n </div>\n <div class="filter-color-item">\n <div class="tie-filter-blend-color" title="')).call(t,v.localize("Blend"),'"></div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-blend">\n <span></span>\n </label>\n </div>\n </div>\n </li>\n </ul>\n')};function Pr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Dr="130px",Or=["add","diff","subtract","multiply","screen","lighten","darken"],Lr=["grayscale","invert","sepia","vintage","blur","sharpen","emboss","remove-white","brightness","noise","pixelate","color-filter","tint","multiply","blend"],Rr={grayscale:"grayscale",invert:"invert",sepia:"sepia",blur:"blur",sharpen:"sharpen",emboss:"emboss",removeWhite:"removeColor",brightness:"brightness",contrast:"contrast",saturation:"saturation",vintage:"vintage",polaroid:"polaroid",noise:"noise",pixelate:"pixelate",colorFilter:"removeColor",tint:"blendColor",multiply:"blendColor",blend:"blendColor",hue:"hue",gamma:"gamma"},Br=["removewhiteDistanceRange","colorfilterThresholdRange","pixelateRange","noiseRange","brightnessRange","tintOpacity"],Nr=["filterBlendColor","filterMultiplyColor","filterTintColor"],jr=function(e){En(i,e);var t=Pr(i);function i(e,n){var r,o=n.locale,s=n.menuBarPosition,a=n.usageStatistics;return E(this,i),(r=t.call(this,e,{locale:o,name:"filter",menuBarPosition:s,templateHtml:Mr,usageStatistics:a})).selectBoxShow=!1,r.checkedMap={},r._makeControlElement(),r}return A(i,[{key:"destroy",value:function(){this._removeEvent(),this._destroyToolInstance(),Hi(this)}},{key:"_removeEvent",value:function(){var e,t=this;U()(Lr,function(e){var i=t.selector(".tie-".concat(e)),n=Fi(e);i.removeEventListener("change",t.eventHandler[n])}),U()(D()(e=[]).call(e,Br,Nr),function(e){t._els[e].off()}),this._els.blendType.removeEventListener("change",this.eventHandler.changeBlendFilter),this._els.blendType.removeEventListener("click",this.eventHandler.changeBlendFilter),Ln()(this.colorPickerInputBoxes,function(e){var i,n;e.removeEventListener(kt,M()(i=t._onStartEditingInputBox).call(i,t)),e.removeEventListener(xt,M()(n=t._onStopEditingInputBox).call(n,t))},this)}},{key:"_destroyToolInstance",value:function(){var e,t=this;U()(D()(e=[]).call(e,Br,Nr),function(e){t._els[e].destroy()})}},{key:"addEvent",value:function(e){var t,i,n,r=this,o=e.applyFilter,s=function(e){var t;return M()(t=r._changeFilterState).call(t,r,o,e)},a=function(e){return function(t,i){return r._changeFilterState(o,e,i)}};this.eventHandler={changeBlendFilter:s("blend"),blandTypeClick:function(e){return e.stopPropagation()}},U()(Lr,function(e){var t=r.selector(".tie-".concat(e)),i=Fi(e);r.checkedMap[i]=t,r.eventHandler[i]=s(i),t.addEventListener("change",r.eventHandler[i])}),this._els.removewhiteDistanceRange.on("change",a("removeWhite")),this._els.colorfilterThresholdRange.on("change",a("colorFilter")),this._els.pixelateRange.on("change",a("pixelate")),this._els.noiseRange.on("change",a("noise")),this._els.brightnessRange.on("change",a("brightness")),this._els.filterBlendColor.on("change",this.eventHandler.changeBlendFilter),this._els.filterMultiplyColor.on("change",s("multiply")),this._els.filterTintColor.on("change",s("tint")),this._els.tintOpacity.on("change",a("tint")),this._els.filterMultiplyColor.on("changeShow",M()(t=this.colorPickerChangeShow).call(t,this)),this._els.filterTintColor.on("changeShow",M()(i=this.colorPickerChangeShow).call(i,this)),this._els.filterBlendColor.on("changeShow",M()(n=this.colorPickerChangeShow).call(n,this)),this._els.blendType.addEventListener("change",this.eventHandler.changeBlendFilter),this._els.blendType.addEventListener("click",this.eventHandler.blandTypeClick),Ln()(this.colorPickerInputBoxes,function(e){var t,i;e.addEventListener(kt,M()(t=r._onStartEditingInputBox).call(t,r)),e.addEventListener(xt,M()(i=r._onStopEditingInputBox).call(i,r))},this)}},{key:"setFilterState",value:function(e){var t=e.type,i=e.options,n=e.action,r=this._getFilterNameFromOptions(t,i),o="remove"===n;o||this._setFilterState(r,i),this.checkedMap[r].checked=!o}},{key:"initFilterCheckBoxState",value:function(){U()(this.checkedMap,function(e){e.checked=!1}
vendor: 6,629 bytes, line 85
85,this)}},{key:"_setFilterState",value:function(e,t){"colorFilter"===e?this._els.colorfilterThresholdRange.value=t.distance:"removeWhite"===e?this._els.removewhiteDistanceRange.value=t.distance:"pixelate"===e?this._els.pixelateRange.value=t.blocksize:"brightness"===e?this._els.brightnessRange.value=t.brightness:"noise"===e?this._els.noiseRange.value=t.noise:"tint"===e?(this._els.tintOpacity.value=t.alpha,this._els.filterTintColor.color=t.color):"blend"===e?this._els.filterBlendColor.color=t.color:"multiply"===e&&(this._els.filterMultiplyColor.color=t.color)}},{key:"_getFilterNameFromOptions",value:function(e,t){var i=e;return"removeColor"===e?i=Ir()(t.useAlpha)?"removeWhite":"colorFilter":"blendColor"===e&&(i={add:"blend",multiply:"multiply",tint:"tint"}[t.mode]),i}},{key:"_changeFilterState",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.checkedMap[t].checked,r=Rr[t],o=this.checkedMap[t].closest(".tui-image-editor-checkbox-group");o&&(n?o.classList.remove("tui-image-editor-disabled"):o.classList.add("tui-image-editor-disabled")),e(n,r,this._getFilterOption(t),!i)}},{key:"_getFilterOption",value:function(e){var t={};switch(e){case"removeWhite":t.color="#FFFFFF",t.useAlpha=!1,t.distance=pn()(this._els.removewhiteDistanceRange.value);break;case"colorFilter":t.color="#FFFFFF",t.distance=pn()(this._els.colorfilterThresholdRange.value);break;case"pixelate":t.blocksize=ji(this._els.pixelateRange.value);break;case"noise":t.noise=ji(this._els.noiseRange.value);break;case"brightness":t.brightness=pn()(this._els.brightnessRange.value);break;case"blend":t.mode="add",t.color=this._els.filterBlendColor.color,t.mode=this._els.blendType.value;break;case"multiply":t.mode="multiply",t.color=this._els.filterMultiplyColor.color;break;case"tint":t.mode="tint",t.color=this._els.filterTintColor.color,t.alpha=this._els.tintOpacity.value;break;case"blur":t.blur=this._els.blurRange.value}return t}},{key:"_makeControlElement",value:function(){this._els={removewhiteDistanceRange:new Hn({slider:this.selector(".tie-removewhite-distance-range")},ki.removewhiteDistanceRange),brightnessRange:new Hn({slider:this.selector(".tie-brightness-range")},ki.brightnessRange),noiseRange:new Hn({slider:this.selector(".tie-noise-range")},ki.noiseRange),pixelateRange:new Hn({slider:this.selector(".tie-pixelate-range")},ki.pixelateRange),colorfilterThresholdRange:new Hn({slider:this.selector(".tie-colorfilter-threshold-range")},ki.colorfilterThresholdRange),filterTintColor:new Fn(this.selector(".tie-filter-tint-color"),{defaultColor:"#03bd9e",toggleDirection:this.toggleDirection,usageStatistics:this.usageStatistics}),filterMultiplyColor:new Fn(this.selector(".tie-filter-multiply-color"),{defaultColor:"#515ce6",toggleDirection:this.toggleDirection,usageStatistics:this.usageStatistics}),filterBlendColor:new Fn(this.selector(".tie-filter-blend-color"),{defaultColor:"#ffbb3b",toggleDirection:this.toggleDirection,usageStatistics:this.usageStatistics}),blurRange:ki.blurFilterRange},this._els.tintOpacity=this._pickerWithRange(this._els.filterTintColor.pickerControl),this._els.blendType=this._pickerWithSelectbox(this._els.filterBlendColor.pickerControl),this.colorPickerControls.push(this._els.filterTintColor),this.colorPickerControls.push(this._els.filterMultiplyColor),this.colorPickerControls.push(this._els.filterBlendColor),this.colorPickerInputBoxes=[],this.colorPickerInputBoxes.push(this._els.filterTintColor.colorpickerElement.querySelector(Ct)),this.colorPickerInputBoxes.push(this._els.filterMultiplyColor.colorpickerElement.querySelector(Ct)),this.colorPickerInputBoxes.push(this._els.filterBlendColor.colorpickerElement.querySelector(Ct))}},{key:"_pickerWithRange",value:function(e){var t=document.createElement("div"),i=document.createElement("label"),n=document.createElement("div");return n.id="tie-filter-tint-opacity",i.innerHTML="Opacity",t.appendChild(i),t.appendChild(n),e.appendChild(t),e.style.height=Dr,new Hn({slider:n},ki.tintOpacityRange)}},{key:"_pickerWithSelectbox",value:function(e){var t=document.createElement("div"),i=document.createElement("select"),n=document.createElement("ul");return t.className="tui-image-editor-selectlist-wrap",n.className="tui-image-editor-selectlist",t.appendChild(i),t.appendChild(n),this._makeSelectOptionList(i),e.appendChild(t),e.style.height=Dr,this._drawSelectOptionList(i,n),this._pickerWithSelectboxForAddEvent(i,n),i}},{key:"_drawSelectOptionList",value:function(e,t){var i=e.querySelectorAll("option");U()(i,function(e){var i=document.createElement("li");i.innerHTML=e.innerHTML,i.setAttribute("data-item",e.value),t.appendChild(i)})}},{key:"_pickerWithSelectboxForAddEvent",value:function(e,t){var i=this;t.addEventListener("click",function(n){var r=n.target.getAttribute("data-item"),o=document.createEvent("HTMLEvents");e.querySelector('[value="'.concat(r,'"]')).selected=!0,o.initEvent("change",!0,!0),e.dispatchEvent(o),i.selectBoxShow=!1,t.style.display="none"}),e.addEventListener("mousedown",function(n){n.preventDefault(),i.selectBoxShow=!i.selectBoxShow,t.style.display=i.selectBoxShow?"block":"none",t.setAttribute("data-selectitem",e.value),t.querySelector("[data-item='".concat(e.value,"']")).classList.add("active")})}},{key:"_makeSelectOptionList",value:function(e){U()(Or,function(t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t.replace(/^[a-z]/,function(e){return e.toUpperCase()}),e.appendChild(i)})}}]),i}(Wn),Fr=jr,zr=r(4383),Vr=r.n(zr);function Hr(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Ur="selected-item",Wr="disabled-item",$r=function(e){En(i,e);var t=Hr(i);function i(e,n){var r,o=n.locale,s=n.makeSvgIcon;return E(this,i),r=t.call(this,e,{name:"history"}),e.classList.add("enabled"),r.locale=o,r.makeSvgIcon=s,r._eventHandler={},r._historyIndex=r.getListLength(),r}return A(i,[{key:"add",value:function(e){var t=e.name,i=e.detail;this._hasDisabledItem()&&this.deleteListItemElement(this._historyIndex+1,this.getListLength());var n=function(e){var t,i,n,r=e.locale,o=e.makeSvgIcon,s=e.name,a=e.detail;return D()(t=D()(i=D()(n='\n <div class="tui-image-editor-history-item history">\n <div class="history-item-icon">\n '.concat(o(["normal","active"],"history-".concat(s.toLowerCase()),!0),"\n </div>
85\n <span>\n ")).call(n,r.localize(s),"\n ")).call(i,a?"(".concat(r.localize(a),")"):"",'\n </span>\n <div class="history-item-checkbox">\n ')).call(t,o(["normal"],"history-check",!0),"\n </div>\n </div>\n")}({locale:this.locale,makeSvgIcon:this.makeSvgIcon,name:t,detail:i}),r=this.makeListItemElement(n);this.pushListItemElement(r),this._historyIndex=this.getListLength()-1,this._selectItem(this._historyIndex)}},{key:"init",value:function(){this.deleteListItemElement(1,this.getListLength()),this._historyIndex=0,this._selectItem(this._historyIndex)}},{key:"clear",value:function(){this.deleteListItemElement(0,this.getListLength()),this._historyIndex=-1}},{key:"prev",value:function(){this._historyIndex-=1,this._selectItem(this._historyIndex)}},{key:"next",value:function(){this._historyIndex+=1,this._selectItem(this._historyIndex)}},{key:"_hasDisabledItem",value:function(){return this.getListLength()-1>this._historyIndex}},{key:"_addHistoryEventListener",value:function(){var e=this;this._eventHandler.history=function(t){return e._clickHistoryItem(t)},this.listElement.addEventListener("click",this._eventHandler.history)}},{key:"_removeHistoryEventListener",value:function(){this.listElement.removeEventListener("click",this._eventHandler.history)}},{key:"_clickHistoryItem",value:function(e){var t=e.target.closest(".".concat("history-item"));if(t){var i=Vr()(t.getAttribute("data-index"),10);if(i!==this._historyIndex){var n=Math.abs(i-this._historyIndex);i<this._historyIndex?this._actions.undo(n):this._actions.redo(n)}}}},{key:"_selectItem",value:function(e){for(var t=0;t<this.getListLength();t+=1)this.removeClass(t,Ur),this.removeClass(t,Wr),t>e&&this.addClass(t,Wr);this.addClass(e,Ur)}},{key:"destroy",value:function(){this.removeEvent(),Hi(this)}},{key:"addEvent",value:function(e){this._actions=e,this._addHistoryEventListener()}},{key:"removeEvent",value:function(){this._removeHistoryEventListener()}}]),i}(function(){function e(t,i){var n=i.name;E(this,e),this.name=n,this.items=[],this.panelElement=this._makePanelElement(),this.listElement=this._makeListElement(),this.panelElement.appendChild(this.listElement),t.appendChild(this.panelElement)}return A(e,[{key:"_makePanelElement",value:function(){var e=document.createElement("div");return e.className="tie-panel-".concat(this.name),e}},{key:"_makeListElement",value:function(){var e=document.createElement("ol");return e.className="".concat(this.name,"-list"),e}},{key:"makeListItemElement",value:function(e){var t=document.createElement("li");return t.innerHTML=e,t.className="".concat(this.name,"-item"),t.setAttribute("data-index",this.items.length),t}},{key:"pushListItemElement",value:function(e){this.listElement.appendChild(e),this.listElement.scrollTop+=e.offsetHeight,this.items.push(e)}},{key:"deleteListItemElement",value:function(e,t){for(var i=this.items,n=e;n<t;n+=1)this.listElement.removeChild(i[n]);a()(i).call(i,e,t-e+1)}},{key:"getListLength",value:function(){return this.items.length}},{key:"addClass",value:function(e,t){this.items[e]&&this.items[e].classList.add(t)}},{key:"removeClass",value:function(e,t){this.items[e]&&this.items[e].classList.remove(t)}},{key:"toggleClass",value:function(e,t){this.items[e]&&this.items[e].classList.toggle(t)}}]),e}()),Gr=$r,qr=function(){function e(t){E(this,e),this._locale=t}return A(e,[{key:"localize",value:function(e){return this._locale[e]||e}}]),e}(),Yr=qr,Zr={Shape:Zn,Crop:Qn,Resize:nr,Flip:ar,Rotate:hr,Text:mr,Mask:yr,Icon:xr,Draw:Tr,Filter:Fr},Xr="history",Kr="on",Jr="zoomIn",Qr="hand",eo=function(){function e(t,i,n){E(this,e),this.options=this._initializeOption(i),this._actions=n,this.submenu=!1,this.imageSize={},this.uiSize={},this._locale=new Yr(this.options.locale),this.theme=new wn(this.options.theme),this.eventHandler={},this._submenuChangeTransection=!1,this._selectedElement=null,this._mainElement=null,this._editorElementWrap=null,this._editorElement=null,this._menuBarElement=null,this._subMenuElement=null,this._makeUiElement(t),this._setUiSize(),this._initMenuEvent=!1,this._makeSubMenu(),this._attachHistoryEvent(),this._attachZoomEvent()}return A(e,[{key:"destroy",value:function(){this._removeUiEvent(),this._destroyAllMenu(),this._selectedElement.innerHTML="",Hi(this)}},{key:"setUiDefaultSelectionStyle",value:function(e){return F()({applyCropSelectionStyle:!0,applyGroupSelectionStyle:!0,selectionStyle:{cornerStyle:"circle",cornerSize:16,cornerColor:"#fff",cornerStrokeColor:"#fff",transparentCorners:!1,lineWidth:2,borderColor:"#fff"}},e)}},{key:"resizeEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.uiSize,i=e.imageSize,n=void 0===i?this.imageSize:i;n!==this.imageSize&&(this.imageSize=n),t&&this._setUiSize(t);var r=this._getCanvasMaxDimension(),o=r.width,s=r.height,a=this._editorElement.style,l=this.options.menuBarPosition;a.height="".concat(s,"px"),a.width="".concat(o,"px"),this._setEditorPosition(l),this._editorElementWrap.style.bottom="0px",this._editorElementWrap.style.top="0px",this._editorElementWrap.style.left="0px",this._editorElementWrap.style.width="100%";var c=this._selectedElement.classList;"top"===l&&this._selectedElement.offsetWidth<"1300"?c.add("tui-image-editor-top-optimization"):c.remove("tui-image-editor-top-optimization")}},{key:"toggleZoomButtonStatus",value:function(e){this._buttonElements[e].classList.toggle(Kr),e===Jr?this._buttonElements[Qr].classList.remove(Kr):this._buttonElements[Jr].classList.remove(Kr)}},{key:"offZoomInButtonStatus",value:function(){this._buttonElements[Jr].classList.remove(Kr)}},{key:"changeHandButtonStatus",value:function(e){this._buttonElements[Qr].classList[e?"add":"remove"](Kr)}},{key:"changeHelpButtonEnabled",value:function(e,t){this._buttonElements[e].classList[t?"add":"remove"]("enabled")}},{key:"_initializeOption",value:function(e){return F()({loadImage:{path:"",name:""},locale:{},menuIconPath:"",menu:["resize","crop","flip","rotate","draw","shape","icon","text","mask","filter"],initMenu:"",uiSize:{width:"100%",height:"100%"},menuBarPosition:"bottom"},e)}},{key:"_setUiSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.uiSize,t=this._selectedElement.style;t.width=e.width,t.height=e.height}},{key:"_makeSubMenu",value:function(){var e=this;U()(this.options.menu,function(t){var i,n=Zr[t.replace(/^[a-z]/,function(e){return e.toUpperCase()})];e._makeMenuElement(t),e._buttonElements[t]=e._menuBarElement.querySelector(".tie-btn-".concat(t)),e[t]=new n(e._subMenuElement,{locale:e._locale,makeSvgIcon:M()(i=e.theme.makeMenSvgIconSet).call(i,e.theme),menuBarPosition:e.options.menuBarPosition,usageStatistics:e.options.usageStatistics})})}},{key:"_attachHistoryEvent",value:function(){var e,t,i;this.on(dt,M()(e=this._addHistory).call(e,this)),this.on(ft,M()(t=this._selectPrevHistory).call(t,this)),this.on(pt,M()(i=this._selectNextHistory).call(i,this))}},{key:"_attachZoomEvent",value:function(){var e=this;this.on(gt,function(){e.offZoomInButtonStatus(),e.changeHandButtonStatus(!0)}),this.on(vt,function(){return e.changeHandButtonStatus(!1)})}},{key:"_makeUiElement",value:function(e){var t,i;
vendor: 22,825 bytes, line 85
85i=e.nodeType?e:document.querySelector(e);var n,r=(n=i,function(e){return n.querySelector(e)});i.classList.add("tui-image-editor-container"),i.innerHTML=function(e){var t,i,n,r,o,s,a=e.locale,l=e.biImage,c=e.loadButtonStyle,u=e.downloadButtonStyle,h=e.menuBarPosition;return D()(t=D()(i=D()(n=D()(r=D()(o='\n <ul class="tui-image-editor-help-menu '.concat((s=h,"top"===s?"bottom":"left"===s?"right":"right"===s?"left":"top"),'"></ul>\n <div class="tui-image-editor-controls">\n <div class="tui-image-editor-controls-logo">\n <img src="')).call(o,l,'" />\n </div>\n <ul class="tui-image-editor-menu"></ul>\n\n <div class="tui-image-editor-controls-buttons">\n <div style="')).call(r,c,'">\n ')).call(n,a.localize("Load"),'\n <input type="file" class="tui-image-editor-load-btn" />\n </div>\n <button class="tui-image-editor-download-btn" style="')).call(i,u,'">\n ')).call(t,a.localize("Download"),"\n </button>\n </div>\n </div>\n")}({locale:this._locale,biImage:this.theme.getStyle("common.bi"),loadButtonStyle:this.theme.getStyle("loadButton"),downloadButtonStyle:this.theme.getStyle("downloadButton"),menuBarPosition:this.options.menuBarPosition})+function(e){var t,i,n,r,o,s,a,l=e.locale,c=e.biImage,u=e.commonStyle,h=e.headerStyle,d=e.loadButtonStyle,f=e.downloadButtonStyle,p=e.submenuStyle;return D()(t=D()(i=D()(n=D()(r=D()(o=D()(s=D()(a='\n <div class="tui-image-editor-main-container" style="'.concat(u,'">\n <div class="tui-image-editor-header" style="')).call(a,h,'">\n <div class="tui-image-editor-header-logo">\n <img src="')).call(s,c,'" />\n </div>\n <div class="tui-image-editor-header-buttons">\n <div style="')).call(o,d,'">\n ')).call(r,l.localize("Load"),'\n <input type="file" class="tui-image-editor-load-btn" />\n </div>\n <button class="tui-image-editor-download-btn" style="')).call(n,f,'">\n ')).call(i,l.localize("Download"),'\n </button>\n </div>\n </div>\n <div class="tui-image-editor-main">\n <div class="tui-image-editor-submenu">\n <div class="tui-image-editor-submenu-style" style="')).call(t,p,'"></div>\n </div>\n <div class="tui-image-editor-wrap">\n <div class="tui-image-editor-size-wrap">\n <div class="tui-image-editor-align-wrap">\n <div class="tui-image-editor"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n')}({locale:this._locale,biImage:this.theme.getStyle("common.bi"),commonStyle:this.theme.getStyle("common"),headerStyle:this.theme.getStyle("header"),loadButtonStyle:this.theme.getStyle("loadButton"),downloadButtonStyle:this.theme.getStyle("downloadButton"),submenuStyle:this.theme.getStyle("submenu")}),this._selectedElement=i,this._selectedElement.classList.add(this.options.menuBarPosition),this._mainElement=r(".tui-image-editor-main"),this._editorElementWrap=r(".tui-image-editor-wrap"),this._editorElement=r(".tui-image-editor"),this._helpMenuBarElement=r(".tui-image-editor-help-menu"),this._menuBarElement=r(".tui-image-editor-menu"),this._subMenuElement=r(".tui-image-editor-submenu"),this._buttonElements={download:this._selectedElement.querySelectorAll(".tui-image-editor-download-btn"),load:this._selectedElement.querySelectorAll(".tui-image-editor-load-btn")},this._addHelpMenus(),this._historyMenu=new Gr(this._buttonElements[Xr],{locale:this._locale,makeSvgIcon:M()(t=this.theme.makeMenSvgIconSet).call(t,this.theme)}),this._activateZoomMenus()}},{key:"_activateZoomMenus",value:function(){var e=this;U()(ue,function(t){e.changeHelpButtonEnabled(t,!0)})}},{key:"_makeHelpMenuWithPartition",value:function(){var e;return D()(e=[]).call(e,x(ue),[""],x(he),[""],x(de))}},{key:"_addHelpMenus",value:function(){var e=this,t=this._makeHelpMenuWithPartition();U()(t,function(t){t?(e._makeMenuElement(t,["normal","disabled","hover"],"help"),e._buttonElements[t]=e._helpMenuBarElement.querySelector(".tie-btn-".concat(t))):e._makeMenuPartitionElement()})}},{key:"_makeMenuPartitionElement",value:function(){var e=document.createElement("li"),t=document.createElement("div");e.className=Ui("item"),t.className=Ui("icpartition"),e.appendChild(t),this._helpMenuBarElement.appendChild(e)}},{key:"_makeMenuElement",value:function(e){var t,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["normal","active","hover"],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal",o=document.createElement("li"),s=this.theme.makeMenSvgIconSet(n,e);this._addTooltipAttribute(o,e),o.className=D()(t=D()(i="tie-btn-".concat(e," ")).call(i,Ui("item")," ")).call(t,r),o.innerHTML=s,"normal"===r?this._menuBarElement.appendChild(o):this._helpMenuBarElement.appendChild(o)}},{key:"_addHelpActionEvent",value:function(){var e=this;U()(fe,function(t){e.eventHandler[t]=function(i){return e._actions.main[t](i)},e._buttonElements[t].addEventListener("click",e.eventHandler[t])})}},{key:"_removeHelpActionEvent",value:function(){var e=this;U()(fe,function(t){e._buttonElements[t].removeEventListener("click",e.eventHandler[t])})}},{key:"_addHistory",value:function(e){if(!function(e){return"string"==typeof e?Ae===e:Ae===e.name}(e)){var t="string"==typeof e?{name:e}:function(e){var t,i,n,r=Ie,o=Me,s=Fe,a=Oe,l=Le,c=je,u=Be,d=Ve,f=Te,p=He,m=De,g=qe,v=e.name,b=e.args;switch(v){case r:n={name:v,detail:"reset"===b[1]?b[1]:h()(t=b[1]).call(t,4)};break;case o:n={name:v,detail:b[2]};break;case a:n={name:Mt,detail:Ki(b[1],b[2])};break;case l:n={name:Pt,detail:"Remove"};break;case c:n={name:Dt,detail:"Change"};break;case u:n={name:Ot,detail:"Change"};break;case d:n={name:Rt,detail:"Change"};break;case m:n={name:Bt,detail:b[2]};break;case f:n={name:Nt,detail:"All"};break;case p:n={name:Tt,detail:"Add"};break;case s:n={name:Lt};break;case g:n={name:It,detail:D()(i="".concat(~~b[1].width,"x")).call(i,~~b[1].height)};break;default:n={name:v}}return"mask"===b[1]&&(n={name:Et,detail:"Apply"}),n}(e);this._historyMenu.add(t)}}},{key:"initHistory",value:function(){this._historyMenu.init()}},{key:"clearHistory",value:function(){this._historyMenu.clear()}},{key:"_selectPrevHistory",value:function(){this._historyMenu.prev()}},{key:"_selectNextHistory",value:function(){this._historyMenu.next()}},{key:"toggleHistoryMenu",value:function(e){e.target.closest(".".concat("tie-panel-history"))||this._buttonElements[Xr].classList.toggle("opened")}},{key:"_addTooltipAttribute",value:function(e,t){e.setAttribute("tooltip-content",this._locale.localize(t.replace(/^[a-z]/g,function(e){return e.toUpperCase()})))}},{key:"_addDownloadEvent",value:function(){var e=this;this.eventHandler.download=function(){return e._actions.main.download()},U()(this._buttonElements.download,function(t){t.addEventListener("click",e.eventHandler.download)})}},{key:"_removeDownloadEvent",value:function(){var e=this;U()(this._buttonElements.download,function(t){t.removeEventListener("click",e.eventHandler.download)})}},{key:"_addLoadEvent",value:function(){var e=this;this.eventHandler.loadImage=function(t){return e._actions.main.load(t.target.files[0])},U()(this._buttonElements.load,function(t){t.addEventListener("change",e.eventHandler.loadImage)})}},{key:"_removeLoadEvent",value:function(){var e=this;U()(this._buttonElements.load,function(t){t.removeEventListener("change",e.eventHandler.loadImage)})}},{key:"_addMainMenuEvent",value:function(e){var t=this;this.eventHandler[e]=function(){return t.changeMenu(e)},this._buttonElements[e].addEventListener("click",this.eventHandler[e])}},{key:"_addSubMenuEvent",value:function(e){var t=this;this[e].addEvent(this._actions[e]),this[e].on(wt,function(){return t.fire(wt)}),this[e].on(_t,function(){return t.fire(_t)})}},{key:"_addMenuEvent",value:function(){var e=this;U()(this.options.menu,function(t){e._addMainMenuEvent(t),e._addSubMenuEvent(t)})}},{key:"_removeMainMenuEvent",value:function(){var e=this;U()(this.options.menu,function(t){e._buttonElements[t].removeEventListener("click",e.eventHandler[t]),e[t].off(wt),e[t].off(_t)})}},{key:"getEditorArea",value:function(){return this._editorElement}},{key:"activeMenuEvent",value:function(){this._initMenuEvent||(this._addHelpActionEvent(),this._addDownloadEvent(),this._addMenuEvent(),this._initMenu(),this._historyMenu.addEvent(this._actions.history),this._initMenuEvent=!0)}},{key:"_removeUiEvent",value:function(){this._removeHelpActionEvent(),this._removeDownloadEvent(),this._removeLoadEvent(),this._removeMainMenuEvent(),this._historyMenu.removeEvent()}},{key:"_destroyAllMenu",value:function(){var e=this;U()(this.options.menu,function(t){e[t].destroy()}),this._historyMenu.destroy()}},{key:"initCanvas",value:function(){var e=this,t=this._getLoadImage();t.path&&this._actions.main.initLoadImage(t.path,t.name).then(function(){e.activeMenuEvent()}),this._addLoadEvent();var i=document.createElement("div");i.className=Ui("grid-visual"),i.innerHTML='<table>\n <tr><td class="dot left-top"></td><td></td><td class="dot right-top"></td></tr>\n <tr><td></td><td></td><td></td></tr>\n <tr><td class="dot left-bottom"></td><td></td><td class="dot right-bottom"></td></tr>\n </table>',this._editorContainerElement=this._editorElement.querySelector(".tui-image-editor-canvas-container"),this._editorContainerElement.appendChild(i)}},{key:"_getLoadImage",value:function(){return this.options.loadImage}},{key:"changeMenu",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._submenuChangeTransection||(this._submenuChangeTransection=!0,this._changeMenu(e,t,i),this._submenuChangeTransection=!1)}},{key:"_changeMenu",value:function(e,t,i){this.submenu&&(this._buttonElements[this.submenu].classList.remove("active"),this._mainElement.classList.remove("tui-image-editor-menu-".concat(this.submenu)),i&&this._actions.main.discardSelection(),this._actions.main.changeSelectableAll(!0),this[this.submenu].changeStandbyMode()),this.submenu===e&&t?this.submenu=null:(this._buttonElements[e].classList.add("active"),this._mainElement.classList.add("tui-image-editor-menu-".concat(e)),this.submenu=e,this[this.submenu].changeStartMode()),this.resizeEditor()}},{key:"_initMenu",value:function(){if(this.options.initMenu){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!1),this._buttonElements[this.options.initMenu].dispatchEvent(e)}this.icon&&this.icon.registerDefaultIcon()}},{key:"_getCanvasMaxDimension",value:function(){var e=this._editorContainerElement.style,t=e.maxWidth,i=e.maxHeight;return{width:pn()(t),height:pn()(i)}}},{key:"_setEditorPosition",value:function(e){var t=this._getCanvasMaxDimension(),i=t.width,n=t.height,r=this._editorElement.style,o=0,s=0;this.submenu&&("bottom"===e?o=n>this._editorElementWrap.scrollHeight-150?(n-this._editorElementWrap.scrollHeight)/2:-75:"top"===e?o=n>this._editorElementWrap.offsetHeight-150?75-(n-(this._editorElementWrap.offsetHeight-150))/2:75:"left"===e?s=i>this._editorElementWrap.offsetWidth-248?124-(i-(this._editorElementWrap.offsetWidth-248))/2:124:"right"===e&&(s=i>this._editorElementWrap.scrollWidth-248?(i-this._editorElementWrap.scrollWidth)/2:-124)),r.top="".concat(o,"px"),r.left="".concat(s,"px")}}]),e}();$().mixin(eo);var to=eo,io=r(381),no=r.n(io),ro=function(){function e(){E(this,e),this.versionnumber="1.2.4",this.optionpresets={default:{corsenabled:!1,ltres:1,qtres:1,pathomit:8,rightangleenhance:!0,colorsampling:2,numberofcolors:16,mincolorratio:0,colorquantcycles:3,layering:0,strokewidth:1,linefilter:!1,scale:1,roundcoords:1,viewbox:!1,desc:!1,lcpr:0,qcpr:0,blurradius:0,blurdelta:20},posterized1:{colorsampling:0,numberofcolors:2},posterized2:{numberofcolors:4,blurradius:5},curvy:{ltres:.01,linefilter:!0,rightangleenhance:!1},sharp:{qtres:.01,linefilter:!1},detailed:{pathomit:0,roundcoords:2,ltres:.5,qtres:.5,numberofcolors:64},smoothed:{blurradius:5,blurdelta:64},grayscale:{colorsampling:0,colorquantcycles:1,numberofcolors:7},fixedpalette:{colorsampling:0,colorquantcycles:1,numberofcolors:27},randomsampling1:{colorsampling:1,numberofcolors:8},randomsampling2:{colorsampling:1,numberofcolors:64},artistic1:{colorsampling:0,colorquantcycles:1,pathomit:0,blurradius:5,blurdelta:64,ltres:.01,linefilter:!0,numberofcolors:16,strokewidth:2},artistic2:{qtres:.01,colorsampling:0,colorquantcycles:1,numberofcolors:4,strokewidth:0},artistic3:{qtres:10,ltres:10,numberofcolors:8},artistic4:{qtres:10,ltres:10,numberofcolors:64,blurradius:5,blurdelta:256,strokewidth:2},posterized3:{ltres:1,qtres:1,pathomit:20,rightangleenhance:!0,colorsampling:0,numberofcolors:3,mincolorratio:0,colorquantcycles:3,blurradius:3,blurdelta:20,strokewidth:0,linefilter:!1,roundcoords:1,pal:[{r:0,g:0,b:100,a:255},{r:255,g:255,b:255,a:255}]}},this.pathscan_combined_lookup=[[[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1]],[[0,1,0,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[0,2,-1,0]],[[-1,-1,-1,-1],[-1,-1,-1,-1],[0,1,0,-1],[0,0,1,0]],[[0,0,1,0],[-1,-1,-1,-1],[0,2,-1,0],[-1,-1,-1,-1]],[[-1,-1,-1,-1],[0,0,1,0],[0,3,0,1],[-1,-1,-1,-1]],[[13,3,0,1],[13,2,-1,0],[7,1,0,-1],[7,0,1,0]],[[-1,-1,-1,-1],[0,1,0,-1],[-1,-1,-1,-1],[0,3,0,1]],[[0,3,0,1],[0,2,-1,0],[-1,-1,-1,-1],[-1,-1,-1,-1]],[[0,3,0,1],[0,2,-1,0],[-1,-1,-1,-1],[-1,-1,-1,-1]],[[-1,-1,-1,-1],[0,1,0,-1],[-1,-1,-1,-1],[0,3,0,1]],[[11,1,0,-1],[14,0,1,0],[14,3,0,1],[11,2,-1,0]],[[-1,-1,-1,-1],[0,0,1,0],[0,3,0,1],[-1,-1,-1,-1]],[[0,0,1,0],[-1,-1,-1,-1],[0,2,-1,0],[-1,-1,-1,-1]],[[-1,-1,-1,-1],[-1,-1,-1,-1],[0,1,0,-1],[0,0,1,0]],[[0,1,0,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[0,2,-1,0]],[[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1]]],this.gks=[[.27901,.44198,.27901],[.135336,.228569,.272192,.228569,.135336],[.086776,.136394,.178908,.195843,.178908,.136394,.086776],[.063327,.093095,.122589,.144599,.152781,.144599,.122589,.093095,.063327],[.049692,.069304,.089767,.107988,.120651,.125194,.120651,.107988,.089767,.069304,.049692]],this.specpalette=[{r:0,g:0,b:0,a:255},{r:128,g:128,b:128,a:255},{r:0,g:0,b:128,a:255},{r:64,g:64,b:128,a:255},{r:192,g:192,b:192,a:255},{r:255,g:255,b:255,a:255},{r:128,g:128,b:192,a:255},{r:0,g:0,b:192,a:255},{r:128,g:0,b:0,a:255},{r:128,g:64,b:64,a:255},{r:128,g:0,b:128,a:255},{r:168,g:168,b:168,a:255},{r:192,g:128,b:128,a:255},{r:192,g:0,b:0,a:255},{r:255,g:255,b:255,a:255},{r:0,g:128,b:0,a:255}]}return A(e,[{key:"imageToSVG",value:function(e,t,i){var n=this;i=this.checkoptions(i),this.loadImage(e,function(e){t(n.imagedataToSVG(n.getImgdata(e),i))},i)}},{key:"imagedataToSVG",value:function(e,t){t=this.checkoptions(t);var i=this.imagedataToTracedata(e,t);return this.getsvgstring(i,t)}},{key:"imageToTracedata",value:function(e,t,i){var n=this;i=this.checkoptions(i),this.loadImage(e,function(e){t(n.imagedataToTracedata(n.getImgdata(e),i))},i)}},{key:"imagedataToTracedata",value:function(e,t){t=this.checkoptions(t);var i,n=this.colorquantization(e,t);if(0===t.layering){i={layers:[],palette:n.palette,width:n.array[0].length-2,height:n.array.length-2};for(var r=0;r<n.palette.length;r+=1){var o=this.batchtracepaths(this.internodes(this.pathscan(this.layeringstep(n,r),t.pathomit),t),t.ltres,t.qtres);i.layers.push(o)}}else{var s=this.layering(n);t.layercontainerid&&this.drawLayers(s,this.specpalette,t.scale,t.layercontainerid);var a=this.batchpathscan(s,t.pathomit),l=this.batchinternodes(a,t);i={layers:this.batchtracelayers(l,t.ltres,t.qtres),palette:n.palette,width:e.width,height:e.height}}return i}},{key:"checkoptions",value:function(e){"string"==typeof(e=e||{})&&(e=e.toLowerCase(),e=this.optionpresets[e]?this.optionpresets[e]:{});for(var t=Z()(this.optionpresets.default),i=0;i<t.length;i+=1)e.hasOwnProperty(t[i])||(e[t[i]]=this.optionpresets.default[t[i]]);return e}},{key:"colorquantization",value:function(e,t){var i,n,r,o,s,a,l,c,u=[],h=0,d=[],f=e.width*e.height;for(s=0;s<e.height+2;s+=1)for(u[s]=[],o=0;o<e.width+2;o+=1)u[s][o]=-1;for(c=t.pal?t.pal:0===t.colorsampling?this.generatepalette(t.numberofcolors):1===t.colorsampling?this.samplepalette(t.numberofcolors,e):this.samplepalette2(t.numberofcolors,e),t.blurradius>0&&(e=this.blur(e,t.blurradius,t.blurdelta)),l=0;l<t.colorquantcycles;l+=1){if(l>0)for(a=0;a<c.length;a+=1)d[a].n>0&&(c[a]={r:Math.floor(d[a].r/d[a].n),g:Math.floor(d[a].g/d[a].n),b:Math.floor(d[a].b/d[a].n),a:Math.floor(d[a].a/d[a].n)}),d[a].n/f<t.mincolorratio&&l<t.colorquantcycles-1&&(c[a]={r:Math.floor(255*Math.random()),g:Math.floor(255*Math.random()),b:Math.floor(255*Math.random()),a:Math.floor(255*Math.random())});for(o=0;o<c.length;o+=1)d[o]={r:0,g:0,b:0,a:0,n:0};for(s=0;s<e.height;s+=1)for(o=0;o<e.width;o+=1){for(h=4*(s*e.width+o),r=0,n=1024,a=0;a<c.length;a+=1)(i=Math.abs(c[a].r-e.data[h])+Math.abs(c[a].g-e.data[h+1])+Math.abs(c[a].b-e.data[h+2])+Math.abs(c[a].a-e.data[h+3]))<n&&(n=i,r=a);d[r].r+=e.data[h],d[r].g+=e.data[h+1],d[r].b+=e.data[h+2],d[r].a+=e.data[h+3],d[r].n+=1,u[s+1][o+1]=r}}return{array:u,palette:c}}},{key:"samplepalette",value:function(e,t){for(var i,n=[],r=0;r<e;r+=1)i=4*Math.floor(Math.random()*t.data.length/4),n.push({r:t.data[i],g:t.data[i+1],b:t.data[i+2],a:t.data[i+3]});return n}},{key:"samplepalette2",value:function(e,t){for(var i,n=[],r=Math.ceil(Math.sqrt(e)),o=Math.ceil(e/r),s=t.width/(r+1),a=t.height/(o+1),l=0;l<o;l+=1)for(var c=0;c<r&&n.length!==e;c+=1)i=4*Math.floor((l+1)*a*t.width+(c+1)*s),n.push({r:t.data[i],g:t.data[i+1],b:t.data[i+2],a:t.data[i+3]});return n}},{key:"generatepalette",value:function(e){var t,i,n,r=[];if(e<8)for(var o=Math.floor(255/(e-1)),s=0;s<e;s+=1)r.push({r:s*o,g:s*o,b:s*o,a:255});else{var a=Math.floor(Math.pow(e,1/3)),l=Math.floor(255/(a-1)),c=e-a*a*a;for(t=0;t<a;t+=1)for(i=0;i<a;i+=1)for(n=0;n<a;n+=1)r.push({r:t*l,g:i*l,b:n*l,a:255});for(t=0;t<c;t+=1)r.push({r:Math.floor(255*Math.random()),g:Math.floor(255*Math.random()),b:Math.floor(255*Math.random()),a:Math.floor(255*Math.random())})}return r}},{key:"layering",value:function(e){var t,i,n,r,o,s,a,l,c,u,h,d=[],f=0,p=e.array.length,m=e.array[0].length;for(h=0;h<e.palette.length;h+=1)for(d[h]=[],u=0;u<p;u+=1)for(d[h][u]=[],c=0;c<m;c+=1)d[h][u][c]=0;for(u=1;u<p-1;u+=1)for(c=1;c<m-1;c+=1)f=e.array[u][c],t=e.array[u-1][c-1]===f?1:0,i=e.array[u-1][c]===f?1:0,n=e.array[u-1][c+1]===f?1:0,r=e.array[u][c-1]===f?1:0,o=e.array[u][c+1]===f?1:0,s=e.array[u+1][c-1]===f?1:0,a=e.array[u+1][c]===f?1:0,l=e.array[u+1][c+1]===f?1:0,d[f][u+1][c+1]=1+2*o+4*l+8*a,r||(d[f][u+1][c]=2+4*a+8*s),i||(d[f][u][c+1]=0+2*n+4*o+8),t||(d[f][u][c]=0+2*i+4+8*r);return d}},{key:"layeringstep",value:function(e,t){var i,n,r=[],o=e.array.length,s=e.array[0].length;for(n=0;n<o;n+=1)for(r[n]=[],i=0;i<s;i+=1)r[n][i]=0;for(n=1;n<o;n+=1)for(i=1;i<s;i+=1)r[n][i]=(e.array[n-1][i-1]===t?1:0)+(e.array[n-1][i]===t?2:0)+(e.array[n][i-1]===t?8:0)+(e.array[n][i]===t?4:0);return r}},{key:"pathscan",value:function(e,t){for(var i,n=[],r=0,o=0,s=0,a=0,l=e[0].length,c=e.length,u=0,h=!0,d=!1,f=0;f<c;f+=1)for(var p=0;p<l;p+=1)if(4===e[f][p]||11===e[f][p])for(s=p,a=f,n[r]={},n[r].points=[],n[r].boundingbox=[s,a,s,a],n[r].holechildren=[],h=!1,o=0,d=11===e[f][p],u=1;!h;){if(n[r].points[o]={},n[r].points[o].x=s-1,n[r].points[o].y=a-1,n[r].points[o].t=e[a][s],s-1<n[r].boundingbox[0]&&(n[r].boundingbox[0]=s-1),s-1>n[r].boundingbox[2]&&(n[r].boundingbox[2]=s-1),a-1<n[r].boundingbox[1]&&(n[r].boundingbox[1]=a-1),a-1>n[r].boundingbox[3]&&(n[r].boundingbox[3]=a-1),i=this.pathscan_combined_lookup[e[a][s]][u],e[a][s]=i[0],u=i[1],s+=i[2],a+=i[3],s-1===n[r].points[0].x&&a-1===n[r].points[0].y)if(h=!0,n[r].points.length<t)n.pop();else{if(n[r].isholepath=!!d,d){for(var m=0,g=[-1,-1,l+1,c+1],v=0;v<r;v++)!n[v].isholepath&&this.boundingboxincludes(n[v].boundingbox,n[r].boundingbox)&&this.boundingboxincludes(g,n[v].boundingbox)&&(m=v,g=n[v].boundingbox);n[m].holechildren.push(r)}r+=1}o+=1}return n}},{key:"boundingboxincludes",value:function(e,t){return e[0]<t[0]&&e[1]<t[1]&&e[2]>t[2]&&e[3]>t[3]}},{key:"batchpathscan",value:function(e,t){var i=[];for(var n in e)e.hasOwnProperty(n)&&(i[n]=this.pathscan(e[n],t));return i}},{key:"internodes",value:function(e,t){var i,n,r=[],o=0,s=0,a=0,l=0,c=0;for(i=0;i<e.length;i+=1)for(r[i]={},r[i].points=[],r[i].boundingbox=e[i].boundingbox,r[i].holechildren=e[i].holechildren,r[i].isholepath=e[i].isholepath,o=e[i].points.length,n=0;n<o;n+=1)s=(n+1)%o,a=(n+2)%o,l=(n-1+o)%o,c=(n-2+o)%o,t.rightangleenhance&&this.testrightangle(e[i],c,l,n,s,a)&&(r[i].points.length>0&&(r[i].points[r[i].points.length-1].linesegment=this.getdirection(r[i].points[r[i].points.length-1].x,r[i].points[r[i].points.length-1].y,e[i].points[n].x,e[i].points[n].y)),r[i].points.push({x:e[i].points[n].x,y:e[i].points[n].y,linesegment:this.getdirection(e[i].points[n].x,e[i].points[n].y,(e[i].points[n].x+e[i].points[s].x)/2,(e[i].points[n].y+e[i].points[s].y)/2)})),r[i].points.push({x:(e[i].points[n].x+e[i].points[s].x)/2,y:(e[i].points[n].y+e[i].points[s].y)/2,linesegment:this.getdirection((e[i].points[n].x+e[i].points[s].x)/2,(e[i].points[n].y+e[i].points[s].y)/2,(e[i].points[s].x+e[i].points[a].x)/2,(e[i].points[s].y+e[i].points[a].y)/2)});return r}},{key:"testrightangle",value:function(e,t,i,n,r,o){return e.points[n].x===e.points[t].x&&e.points[n].x===e.points[i].x&&e.points[n].y===e.points[r].y&&e.points[n].y===e.points[o].y||e.points[n].y===e.points[t].y&&e.points[n].y===e.points[i].y&&e.points[n].x===e.points[r].x&&e.points[n].x===e.points[o].x}},{key:"getdirection",value:function(e,t,i,n){return e<i?t<n?1:t>n?7:0:e>i?t<n?3:t>n?5:4:t<n?2:t>n?6:8}},{key:"batchinternodes",value:function(e,t){var i=[];for(var n in e)e.hasOwnProperty(n)&&(i[n]=this.internodes(e[n],t));return i}},{key:"tracepath",value:function(e,t,i){var n,r,o,s=0,a={segments:[]};for(a.boundingbox=e.boundingbox,a.holechildren=e.holechildren,a.isholepath=e.isholepath;s<e.points.length;){var l;for(n=e.points[s].linesegment,r=-1,o=s+1;(e.points[o].linesegment===n||e.points[o].linesegment===r||-1===r)&&o<e.points.length-1;)e.points[o].linesegment!==n&&-1===r&&(r=e.points[o].linesegment),o+=1;o===e.points.length-1&&(o=0),a.segments=D()(l=a.segments).call(l,this.fitseq(e,t,i,s,o)),s=o>0?o:e.points.length}return a}},{key:"fitseq",value:function(e,t,i,n,r){var o;if(r>e.points.length||r<0)return[];var s,a,l,c=n,u=0,h=!0,d=r-n;d<0&&(d+=e.points.length);for(var f,p=(e.points[r].x-e.points[n].x)/d,m=(e.points[r].y-e.points[n].y)/d,g=(n+1)%e.points.length;g!=r;)(f=g-n)<0&&(f+=e.points.length),s=e.points[n].x+p*f,a=e.points[n].y+m*f,(l=(e.points[g].x-s)*(e.points[g].x-s)+(e.points[g].y-a)*(e.points[g].y-a))>t&&(h=!1),l>
85u&&(c=g,u=l),g=(g+1)%e.points.length;if(h)return[{type:"L",x1:e.points[n].x,y1:e.points[n].y,x2:e.points[r].x,y2:e.points[r].y}];var v=c;h=!0,u=0;var b=(v-n)/d,y=(1-b)*(1-b),w=2*(1-b)*b,_=b*b,k=(y*e.points[n].x+_*e.points[r].x-e.points[v].x)/-w,x=(y*e.points[n].y+_*e.points[r].y-e.points[v].y)/-w;for(g=n+1;g!=r;)w=2*(1-(b=(g-n)/d))*b,_=b*b,s=(y=(1-b)*(1-b))*e.points[n].x+w*k+_*e.points[r].x,a=y*e.points[n].y+w*x+_*e.points[r].y,(l=(e.points[g].x-s)*(e.points[g].x-s)+(e.points[g].y-a)*(e.points[g].y-a))>i&&(h=!1),l>u&&(c=g,u=l),g=(g+1)%e.points.length;if(h)return[{type:"Q",x1:e.points[n].x,y1:e.points[n].y,x2:k,y2:x,x3:e.points[r].x,y3:e.points[r].y}];var C=v;return D()(o=this.fitseq(e,t,i,n,C)).call(o,this.fitseq(e,t,i,C,r))}},{key:"batchtracepaths",value:function(e,t,i){var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(this.tracepath(e[r],t,i));return n}},{key:"batchtracelayers",value:function(e,t,i){var n=[];for(var r in e)e.hasOwnProperty(r)&&(n[r]=this.batchtracepaths(e[r],t,i));return n}},{key:"roundtodec",value:function(e,t){return Number(e.toFixed(t))}},{key:"svgpathstring",value:function(e,t,i,n){var r,o,s,a=e.layers[t],l=a[i],c="";if(n.linefilter&&l.segments.length<3)return c;if(c=D()(r="<path ".concat(n.desc?D()(o='desc="l '.concat(t," p ")).call(o,i,'" '):"")).call(r,this.tosvgcolorstr(e.palette[t],n),'d="'),-1===n.roundcoords){var u;for(c+=D()(u="M ".concat(l.segments[0].x1*n.scale," ")).call(u,l.segments[0].y1*n.scale," "),s=0;s<l.segments.length;s++){var h,d,f;c+=D()(h=D()(d="".concat(l.segments[s].type," ")).call(d,l.segments[s].x2*n.scale," ")).call(h,l.segments[s].y2*n.scale," "),l.segments[s].hasOwnProperty("x3")&&(c+=D()(f="".concat(l.segments[s].x3*n.scale," ")).call(f,l.segments[s].y3*n.scale," "))}c+="Z "}else{var p;for(c+=D()(p="M ".concat(this.roundtodec(l.segments[0].x1*n.scale,n.roundcoords)," ")).call(p,this.roundtodec(l.segments[0].y1*n.scale,n.roundcoords)," "),s=0;s<l.segments.length;s++){var m,g,v;c+=D()(m=D()(g="".concat(l.segments[s].type," ")).call(g,this.roundtodec(l.segments[s].x2*n.scale,n.roundcoords)," ")).call(m,this.roundtodec(l.segments[s].y2*n.scale,n.roundcoords)," "),l.segments[s].hasOwnProperty("x3")&&(c+=D()(v="".concat(this.roundtodec(l.segments[s].x3*n.scale,n.roundcoords)," ")).call(v,this.roundtodec(l.segments[s].y3*n.scale,n.roundcoords)," "))}c+="Z "}for(var b=0;b<l.holechildren.length;b++){var y,w,_,k,x=a[l.holechildren[b]];if(-1===n.roundcoords)for(x.segments[x.segments.length-1].hasOwnProperty("x3")?c+=D()(y="M ".concat(x.segments[x.segments.length-1].x3*n.scale," ")).call(y,x.segments[x.segments.length-1].y3*n.scale," "):c+=D()(w="M ".concat(x.segments[x.segments.length-1].x2*n.scale," ")).call(w,x.segments[x.segments.length-1].y2*n.scale," "),s=x.segments.length-1;s>=0;s--){var C,S;c+="".concat(x.segments[s].type," "),x.segments[s].hasOwnProperty("x3")&&(c+=D()(S="".concat(x.segments[s].x2*n.scale," ")).call(S,x.segments[s].y2*n.scale," ")),c+=D()(C="".concat(x.segments[s].x1*n.scale," ")).call(C,x.segments[s].y1*n.scale," ")}else for(x.segments[x.segments.length-1].hasOwnProperty("x3")?c+=D()(_="M ".concat(this.roundtodec(x.segments[x.segments.length-1].x3*n.scale)," ")).call(_,this.roundtodec(x.segments[x.segments.length-1].y3*n.scale)," "):c+=D()(k="M ".concat(this.roundtodec(x.segments[x.segments.length-1].x2*n.scale)," ")).call(k,this.roundtodec(x.segments[x.segments.length-1].y2*n.scale)," "),s=x.segments.length-1;s>=0;s--){var E,T;c+="".concat(x.segments[s].type," "),x.segments[s].hasOwnProperty("x3")&&(c+=D()(T="".concat(this.roundtodec(x.segments[s].x2*n.scale)," ")).call(T,this.roundtodec(x.segments[s].y2*n.scale)," ")),c+=D()(E="".concat(this.roundtodec(x.segments[s].x1*n.scale)," ")).call(E,this.roundtodec(x.segments[s].y1*n.scale)," ")}c+="Z "}if(c+='" />',n.lcpr||n.qcpr){for(s=0;s<l.segments.length;s++){var A,I,M,P,O,L,R,B,N,j,F,z,V,H,U,W,$;l.segments[s].hasOwnProperty("x3")&&n.qcpr&&(c+=D()(A=D()(I=D()(M='<circle cx="'.concat(l.segments[s].x2*n.scale,'" cy="')).call(M,l.segments[s].y2*n.scale,'" r="')).call(I,n.qcpr,'" fill="cyan" stroke-width="')).call(A,.2*n.qcpr,'" stroke="black" />'),c+=D()(P=D()(O=D()(L='<circle cx="'.concat(l.segments[s].x3*n.scale,'" cy="')).call(L,l.segments[s].y3*n.scale,'" r="')).call(O,n.qcpr,'" fill="white" stroke-width="')).call(P,.2*n.qcpr,'" stroke="black" />'),c+=D()(R=D()(B=D()(N=D()(j='<line x1="'.concat(l.segments[s].x1*n.scale,'" y1="')).call(j,l.segments[s].y1*n.scale,'" x2="')).call(N,l.segments[s].x2*n.scale,'" y2="')).call(B,l.segments[s].y2*n.scale,'" stroke-width="')).call(R,.2*n.qcpr,'" stroke="cyan" />'),c+=D()(F=D()(z=D()(V=D()(H='<line x1="'.concat(l.segments[s].x2*n.scale,'" y1="')).call(H,l.segments[s].y2*n.scale,'" x2="')).call(V,l.segments[s].x3*n.scale,'" y2="')).call(z,l.segments[s].y3*n.scale,'" stroke-width="')).call(F,.2*n.qcpr,'" stroke="cyan" />')),!l.segments[s].hasOwnProperty("x3")&&n.lcpr&&(c+=D()(U=D()(W=D()($='<circle cx="'.concat(l.segments[s].x2*n.scale,'" cy="')).call($,l.
vendor: 38,173 bytes, line 85
85segments[s].y2*n.scale,'" r="')).call(W,n.lcpr,'" fill="white" stroke-width="')).call(U,.2*n.lcpr,'" stroke="black" />'))}for(b=0;b<l.holechildren.length;b++)for(x=a[l.holechildren[b]],s=0;s<x.segments.length;s++){var G,q,Y,Z,X,K,J,Q,ee,te,ie,ne,re,oe,se,ae,le;x.segments[s].hasOwnProperty("x3")&&n.qcpr&&(c+=D()(G=D()(q=D()(Y='<circle cx="'.concat(x.segments[s].x2*n.scale,'" cy="')).call(Y,x.segments[s].y2*n.scale,'" r="')).call(q,n.qcpr,'" fill="cyan" stroke-width="')).call(G,.2*n.qcpr,'" stroke="black" />'),c+=D()(Z=D()(X=D()(K='<circle cx="'.concat(x.segments[s].x3*n.scale,'" cy="')).call(K,x.segments[s].y3*n.scale,'" r="')).call(X,n.qcpr,'" fill="white" stroke-width="')).call(Z,.2*n.qcpr,'" stroke="black" />'),c+=D()(J=D()(Q=D()(ee=D()(te='<line x1="'.concat(x.segments[s].x1*n.scale,'" y1="')).call(te,x.segments[s].y1*n.scale,'" x2="')).call(ee,x.segments[s].x2*n.scale,'" y2="')).call(Q,x.segments[s].y2*n.scale,'" stroke-width="')).call(J,.2*n.qcpr,'" stroke="cyan" />'),c+=D()(ie=D()(ne=D()(re=D()(oe='<line x1="'.concat(x.segments[s].x2*n.scale,'" y1="')).call(oe,x.segments[s].y2*n.scale,'" x2="')).call(re,x.segments[s].x3*n.scale,'" y2="')).call(ne,x.segments[s].y3*n.scale,'" stroke-width="')).call(ie,.2*n.qcpr,'" stroke="cyan" />')),!x.segments[s].hasOwnProperty("x3")&&n.lcpr&&(c+=D()(se=D()(ae=D()(le='<circle cx="'.concat(x.segments[s].x2*n.scale,'" cy="')).call(le,x.segments[s].y2*n.scale,'" r="')).call(ae,n.lcpr,'" fill="white" stroke-width="')).call(se,.2*n.lcpr,'" stroke="black" />'))}}return c}},{key:"getsvgstring",value:function(e,t){var i,n,r;t=this.checkoptions(t);for(var o=e.width*t.scale,s=e.height*t.scale,a=D()(i="<svg ".concat(t.viewbox?D()(n='viewBox="0 0 '.concat(o," ")).call(n,s,'" '):D()(r='width="'.concat(o,'" height="')).call(r,s,'" '),'version="1.1" xmlns="http://www.w3.org/2000/svg" desc="Created with imagetracer.js version ')).call(i,this.versionnumber,'" >'),l=0;l<e.layers.length;l+=1)for(var c=0;c<e.layers[l].length;c+=1)e.layers[l][c].isholepath||(a+=this.svgpathstring(e,l,c,t));return a+="</svg>"}},{key:"compareNumbers",value:function(e,t){return e-t}},{key:"torgbastr",value:function(e){var t,i,n;return D()(t=D()(i=D()(n="rgba(".concat(e.r,",")).call(n,e.g,",")).call(i,e.b,",")).call(t,e.a,")")}},{key:"tosvgcolorstr",value:function(e,t){var i,n,r,o,s,a,l;return D()(i=D()(n=D()(r=D()(o=D()(s=D()(a=D()(l='fill="rgb('.concat(e.r,",")).call(l,e.g,",")).call(a,e.b,')" stroke="rgb(')).call(s,e.r,",")).call(o,e.g,",")).call(r,e.b,')" stroke-width="')).call(n,t.strokewidth,'" opacity="')).call(i,e.a/255,'" ')}},{key:"appendSVGString",value:function(e,t){var i;t?(i=document.getElementById(t))||((i=document.createElement("div")).id=t,document.body.appendChild(i)):(i=document.createElement("div"),document.body.appendChild(i)),i.innerHTML+=e}},{key:"blur",value:function(e,t,i){var n,r,o,s,a,l,c,u,h,d={width:e.width,height:e.height,data:[]};if((t=Math.floor(t))<1)return e;t>5&&(t=5),(i=Math.abs(i))>1024&&(i=1024);var f=this.gks[t-1];for(r=0;r<e.height;r++)for(n=0;n<e.width;n++){for(a=0,l=0,c=0,u=0,h=0,o=-t;o<t+1;o++)n+o>0&&n+o<e.width&&(s=4*(r*e.width+n+o),a+=e.data[s]*f[o+t],l+=e.data[s+1]*f[o+t],c+=e.data[s+2]*f[o+t],u+=e.data[s+3]*f[o+t],h+=f[o+t]);s=4*(r*e.width+n),d.data[s]=Math.floor(a/h),d.data[s+1]=Math.floor(l/h),d.data[s+2]=Math.floor(c/h),d.data[s+3]=Math.floor(u/h)}var p=new Uint8ClampedArray(d.data);for(r=0;r<e.height;r++)for(n=0;n<e.width;n++){for(a=0,l=0,c=0,u=0,h=0,o=-t;o<t+1;o++)r+o>0&&r+o<e.height&&(a+=p[s=4*((r+o)*e.width+n)]*f[o+t],l+=p[s+1]*f[o+t],c+=p[s+2]*f[o+t],u+=p[s+3]*f[o+t],h+=f[o+t]);s=4*(r*e.width+n),d.data[s]=Math.floor(a/h),d.data[s+1]=Math.floor(l/h),d.data[s+2]=Math.floor(c/h),d.data[s+3]=Math.floor(u/h)}for(r=0;r<e.height;r++)for(n=0;n<e.width;n++)s=4*(r*e.width+n),Math.abs(d.data[s]-e.data[s])+Math.abs(d.data[s+1]-e.data[s+1])+Math.abs(d.data[s+2]-e.data[s+2])+Math.abs(d.data[s+3]-e.data[s+3])>i&&(d.data[s]=e.data[s],d.data[s+1]=e.data[s+1],d.data[s+2]=e.data[s+2],d.data[s+3]=e.data[s+3]);return d}},{key:"loadImage",value:function(e,t,i){var n=new Image;i&&i.corsenabled&&(n.crossOrigin="Anonymous"),n.src=e,n.onload=function(){var e=document.createElement("canvas");e.width=n.width,e.height=n.height,e.getContext("2d").drawImage(n,0,0),t(e)}}},{key:"getImgdata",value:function(e){return e.getContext("2d").getImageData(0,0,e.width,e.height)}},{key:"drawLayers",value:function(e,t,i,n){var r,o,s,a,l,c;for(l in i=i||1,n?(c=document.getElementById(n))||((c=document.createElement("div")).id=n,document.body.appendChild(c)):(c=document.createElement("div"),document.body.appendChild(c)),e)if(e.hasOwnProperty(l)){r=e[l][0].length,o=e[l].length;var u=document.createElement("canvas");u.width=r*i,u.height=o*i;var h=u.getContext("2d");for(a=0;a<o;a+=1)for(s=0;s<r;s+=1)h.fillStyle=this.torgbastr(t[e[l][a][s]%t.length]),h.fillRect(s*i,a*i,i,i);c.appendChild(u)}}}],[{key:"tracerDefaultOption",value:function(){return{pathomit:100,ltres:.1,qtres:1,scale:1,strokewidth:5,viewbox:!1,linefilter:!0,desc:!1,rightangleenhance:!1,pal:[{r:0,g:0,b:0,a:255},{r:255,g:255,b:255,a:255}]}}}]),e}(),oo={getActions:function(){return{main:this._mainAction(),shape:this._shapeAction(),crop:this._cropAction(),resize:this._resizeAction(),flip:this._flipAction(),rotate:this._rotateAction(),text:this._textAction(),mask:this._maskAction(),draw:this._drawAction(),icon:this._iconAction(),filter:this._filterAction(),history:this._historyAction()}},_mainAction:function(){var e=this,t=function(){"crop"===e.ui.submenu&&(e.stopDrawingMode(),e.ui.changeMenu("crop"))},i=function(t){var i,n;return i=t,"rotate"===e.ui.submenu&&e.ui.rotate.setRangeBarAngle("setAngle",i),n=t,"filter"===e.ui.submenu&&no()(e.ui).setFilterState(n),t},n=function(){no()(e.ui)&&no()(e.ui).initFilterCheckBoxState()};return F()({initLoadImage:function(i,n){return e.loadImageFromURL(i,n).then(function(n){t(),e.ui.initializeImgUrl=i,e.ui.resizeEditor({imageSize:n}),e.clearUndoStack(),e._invoker.fire(dt,St)})},undo:function(){e.isEmptyUndoStack()||(t(),e.deactivateAll(),e.undo().then(i))},redo:function(){e.isEmptyRedoStack()||(t(),e.deactivateAll(),e.redo().then(i))},reset:function(){t(),e.loadImageFromURL(e.ui.initializeImgUrl,"resetImage").then(function(i){t(),n(),e.ui.resizeEditor({imageSize:i}),e.clearUndoStack(),e._initHistory()})},delete:function(){e.ui.changeHelpButtonEnabled("delete",!1),t(),e.removeActiveObject(),e.activeObjectId=null},deleteAll:function(){t(),e.clearObjects(),e.ui.changeHelpButtonEnabled("delete",!1),e.ui.changeHelpButtonEnabled("deleteAll",!1)},load:function(i){zi()||alert("This browser does not support file-api"),e.ui.initializeImgUrl=B().createObjectURL(i),e.loadImageFromFile(i).then(function(i){t(),n(),e.clearUndoStack(),e.ui.activeMenuEvent(),e.ui.resizeEditor({imageSize:i}),e._clearHistory(),e._invoker.fire(dt,St)}).catch(function(e){return L().reject(e)})},download:function(){var t,i,n=e.toDataURL(),r=e.getImageName();zi()&&window.saveAs?(i=(t=function(e){var t,i,n,r="";t=e.replace(/data:(image\/.+);base64,/,function(e,t){return r=t,""});var o=(t=atob(t)).length;for(i=new Uint8Array(o),n=0;n<o;n+=1)i[n]=t.charCodeAt(n);return new Blob([i],{type:r})}(n)).type.split("/")[1],r.split(".").pop()!==i&&(r+=".".concat(i)),saveAs(t,r)):window.open().document.body.innerHTML="<img src='".concat(n,"'>")},history:function(t){e.ui.toggleHistoryMenu(t)},zoomIn:function(){var t;e.ui.toggleZoomButtonStatus("zoomIn"),e.deactivateAll(),t=e._graphics.getZoomMode(),e.stopDrawingMode(),t!==$t?(e.startDrawingMode(jt.ZOOM),e._graphics.startZoomInMode()):e._graphics.endZoomInMode()},zoomOut:function(){e._graphics.zoomOut()},hand:function(){var t;e.ui.offZoomInButtonStatus(),e.ui.toggleZoomButtonStatus("hand"),e.deactivateAll(),t=e._graphics.getZoomMode(),e.stopDrawingMode(),t!==Gt?(e.startDrawingMode(jt.ZOOM),e._graphics.startHandMode()):e._graphics.endHandMode()}},this._commonAction())},_iconAction:function(){var e=this;return F()({changeColor:function(t){e.activeObjectId&&e.changeIconColor(e.activeObjectId,t)},addIcon:function(t,i){e.startDrawingMode("ICON"),e.setDrawingIcon(t,i)},cancelAddIcon:function(){e.ui.icon.clearIconType(),e.changeSelectableAll(!0),e.changeCursor("default"),e.stopDrawingMode()},registerDefaultIcons:function(t,i){var n={};n[t]=i,e.registerIcons(n)},registerCustomIcon:function(t,i){(new ro).imageToSVG(t,function(t){var n=X(t.match(/path[^>]*d="([^"]*)"/),2)[1],r={};r[i.name]=n,e.registerIcons(r),e.addIcon(i.name,{left:100,top:100})},ro.tracerDefaultOption())}},this._commonAction())},_drawAction:function(){var e=this;return F()({setDrawMode:function(t,i){e.stopDrawingMode(),"free"===t?e.startDrawingMode("FREE_DRAWING",i):e.startDrawingMode("LINE_DRAWING",i)},setColor:function(t){e.setBrush({color:t})}},this._commonAction())},_maskAction:function(){var e=this;return F()({loadImageFromURL:function(t,i){return e.loadImageFromURL(e.toDataURL(),"FilterImage").then(function(){e.addImageObject(t).then(function(){B().revokeObjectURL(i)}),e._invoker.fire(dt,Et)})},applyFilter:function(){e.applyFilter("mask",{maskObjId:e.activeObjectId})}},this._commonAction())},_textAction:function(){var e=this;return F()({changeTextStyle:function(t,i){e.activeObjectId&&e.changeTextStyle(e.activeObjectId,t,i)}},this._commonAction())},_rotateAction:function(){var e=this;return F()({rotate:function(t,i){e.rotate(t,i),e.ui.resizeEditor(),e.ui.rotate.setRangeBarAngle("rotate",t)},setAngle:function(t,i){e.setAngle(t,i),e.ui.resizeEditor(),e.ui.rotate.setRangeBarAngle("setAngle",t)}},this._commonAction())},_shapeAction:function(){var e=this;return F()({changeShape:function(t,i){e.activeObjectId&&e.changeShape(e.activeObjectId,t,i)},setDrawingShape:function(t){e.setDrawingShape(t)}},this._commonAction())},_cropAction:function(){var e=this;return F()({crop:function(){var t=e.getCropzoneRect();t&&!function(e){var t=e.left,i=e.top,n=e.width,r=e.height;return t===xi&&i===Ci&&n===Si&&r===Ei}(t)&&e.crop(t).then(function(){e.stopDrawingMode(),e.ui.resizeEditor(),e.ui.changeMenu("crop"),e._invoker.fire(dt,At)}).catch(function(e){return L().reject(e)})},cancel:function(){e.stopDrawingMode(),e.ui.changeMenu("crop")},preset:function(t){switch(t){case"preset-square":e.setCropzoneRect(1);break;case"preset-3-2":e.setCropzoneRect(1.5);break;case"preset-4-3":e.setCropzoneRect(4/3);break;case"preset-5-4":e.setCropzoneRect(5/4);break;case"preset-7-5":e.setCropzoneRect(1.4);break;case"preset-16-9":e.setCropzoneRect(16/9);break;default:e.setCropzoneRect(),e.ui.crop.changeApplyButtonStatus(!1)}}},this._commonAction())},_resizeAction:function(){var e=this;return F()({getCurrentDimensions:function(){return e._graphics.getCurrentDimensions()},preview:function(t,i,n){var r=e._graphics.getCurrentDimensions(),o=function(){return r.width/r.height},s={};switch(t){case"width":s.width=i,s.height=n?i/o():r.height;break;case"height":s.height=i,s.width=n?i*o():r.width;break;default:s=r}e._graphics.resize(s).then(function(){e.ui.resizeEditor()}),n&&(e.ui.resize.setWidthValue(s.width),e.ui.resize.setHeightValue(s.height))},lockAspectRatio:function(t,i,n){var r=e._graphics.getCurrentDimensions(),o=r.width,s=r.height,a=o/s;if(t)if(o>s){var l=n/a,c=i*a;e.ui.resize.setLimit({minWidth:c>i?c:i,minHeight:i,maxWidth:n,maxHeight:l<n?l:n})}else{var u=n*a,h=i/a;e.ui.resize.setLimit({minWidth:i,minHeight:h>i?h:i,maxWidth:u<n?u:n,maxHeight:n})}else e.ui.resize.setLimit({minWidth:i,minHeight:i,maxWidth:n,maxHeight:n})},resize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t||(t=e._graphics.getCurrentDimensions()),e.resize(t).then(function(){e._graphics.setOriginalDimensions(t),e.stopDrawingMode(),e.ui.resizeEditor(),e.ui.changeMenu("resize")}).catch(function(e){return L().reject(e)})},reset:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=e._graphics.getOriginalDimensions();e.ui.resize.setWidthValue(i.width,!0),e.ui.resize.setHeightValue(i.height,!0),e._graphics.resize(i).then(function(){t||(e.stopDrawingMode(),e.ui.resizeEditor(),e.ui.changeMenu("resize"))})}},this._commonAction())},_flipAction:function(){var e=this;return F()({flip:function(t){return e[t]()}},this._commonAction())},_filterAction:function(){var e=this;return F()({applyFilter:function(t,i,n,r){t?e.applyFilter(i,n,r):e.hasFilter(i)&&e.removeFilter(i)}},this._commonAction())},setReAction:function(){var e=this;this.on({undoStackChanged:function(t){t?(e.ui.changeHelpButtonEnabled("undo",!0),e.ui.changeHelpButtonEnabled("reset",!0)):(e.ui.changeHelpButtonEnabled("undo",!1),e.ui.changeHelpButtonEnabled("reset",!1)),e.ui.resizeEditor()},redoStackChanged:function(t){t?e.ui.changeHelpButtonEnabled("redo",!0):e.ui.changeHelpButtonEnabled("redo",!1),e.ui.resizeEditor()},objectActivated:function(t){var i,r;e.activeObjectId=t.id,e.ui.changeHelpButtonEnabled("delete",!0),e.ui.changeHelpButtonEnabled("deleteAll",!0),"cropzone"===t.type?e.ui.crop.changeApplyButtonStatus(!0):n()(i=["rect","circle","triangle"]).call(i,t.type)>-1?(e.stopDrawingMode(),"shape"!==e.ui.submenu&&e.ui.changeMenu("shape",!1,!1),e.ui.shape.setShapeStatus({strokeColor:t.stroke,strokeWidth:t.strokeWidth,fillColor:ne()(t)}),e.ui.shape.setMaxStrokeValue(Math.min(t.width,t.height))):"path"===t.type||"line"===t.type?"draw"!==e.ui.submenu&&(e.ui.changeMenu("draw",!1,!1),e.ui.draw.changeStandbyMode()):n()(r=["i-text","text"]).call(r,t.type)>-1?("text"!==e.ui.submenu&&e.ui.changeMenu("text",!1,!1),e.ui.text.setTextStyleStateOnAction(t)):"icon"===t.type&&(e.stopDrawingMode(),"icon"!==e.ui.submenu&&e.ui.changeMenu("icon",!1,!1),e.ui.icon.setIconPickerColor(ne()(t)))},addText:function(t){var i=e.ui.text,n=i.textColor,r=i.fontSize,o=i.fontStyle,s=i.fontWeight,a=i.underline;e.addText("Double Click",{position:t.originPosition,styles:{fill:n,fontSize:r,fontFamily:"Noto Sans",fontStyle:o,fontWeight:s,underline:a}}).then(function(){e.changeCursor("default")})},addObjectAfter:function(t){var i;"icon"===t.type?e.ui.icon.changeStandbyMode():n()(i=["rect","circle","triangle"]).call(i,t.type)>-1&&(e.ui.shape.setMaxStrokeValue(Math.min(t.width,t.height)),e.ui.shape.changeStandbyMode())},objectScaled:function(t){var i,r;if(n()(i=["i-text","text"]).call(i,t.type)>-1)e.ui.text.fontSize=ji(t.fontSize);else if(n()(r=["rect","circle","triangle"]).call(r,t.type)>=0){var o=t.width,s=t.height,a=e.ui.shape.getStrokeValue();o<a&&e.ui.shape.setStrokeValue(o),s<a&&e.ui.shape.setStrokeValue(s)}},selectionCleared:function(){e.activeObjectId=null,"text"===e.ui.submenu?e.changeCursor("text"):Gi(["draw","crop","resize"],e.ui.submenu)||e.stopDrawingMode()}})},_historyAction:function(){var e=this;return{undo:function(t){return e.undo(t)},redo:function(t){return e.redo(t)}}},_commonAction:function(){var e,t,i,n,r=this,o=jt.TEXT,s=jt.CROPPER,a=jt.SHAPE,l=jt.ZOOM,c=jt.RESIZE;return{modeChange:function(e){switch(e){case Ft:r._changeActivateMode(o);break;case zt:r.startDrawingMode(s);break;case Ht:r._changeActivateMode(a),r.setDrawingShape(r.ui.shape.type,r.ui.shape.options);break;case Ut:r.startDrawingMode(l);break;case Vt:r.startDrawingMode(c)}},deactivateAll:M()(e=this.deactivateAll).call(e,this),changeSelectableAll:M()(t=this.changeSelectableAll).call(t,this),discardSelection:M()(i=this.discardSelection).call(i,this),stopDrawingMode:M()(n=this.stopDrawingMode).call(n,this)}},mixin:function(e){F()(e.prototype,this)}},so=r(602),ao=r.n(so),lo=r(5573),co=r.n(lo),uo=function(){function e(t,i){E(this,e),this.name=t,this.graphics=i}return A(e,[{key:"fire",value:function(){for(var e=this.graphics,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return this.graphics.fire.apply(e,i)}},{key:"setCanvasImage",value:function(e,t){this.graphics.setCanvasImage(e,t)}},{key:"getCanvasElement",value:function(){return this.graphics.getCanvasElement()}},{key:"getCanvas",value:function(){return this.graphics.getCanvas()}},{key:"getCanvasImage",value:function(){return this.graphics.getCanvasImage()}},{key:"getImageName",value:function(){return this.graphics.getImageName()}},{key:"getEditor",value:function(){return this.graphics.getEditor()}},{key:"getName",value:function(){return this.name}},{key:"setImageProperties",value:function(e,t){this.graphics.setImageProperties(e,t)}},{key:"setCanvasCssDimension",value:function(e){this.graphics.setCanvasCssDimension(e)}},{key:"setCanvasBackstoreDimension",value:function(e){this.graphics.setCanvasBackstoreDimension(e)}},{key:"adjustCanvasDimension",value:function(){this.graphics.adjustCanvasDimension()}},{key:"adjustCanvasDimensionBase",value:function(){this.graphics.adjustCanvasDimensionBase()}}]),e}(),ho=uo;function fo(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var po={padding:0,crossOrigin:"Anonymous"},mo=function(e){En(i,e);var t=fo(i);function i(e){return E(this,i),t.call(this,Se.IMAGE_LOADER,e)}return A(i,[{key:"load",value:function(e,t){var i,n=this;if(e||t)i=this._setBackgroundImage(t).then(function(t){return n.setCanvasImage(e,t),n.adjustCanvasDimension(),t});else{var r=this.getCanvas();r.backgroundImage=null,r.renderAll(),i=new(L())(function(e){n.setCanvasImage("",null),e()})}return i}},{key:"_setBackgroundImage",value:function(e){var t=this;return e?new(L())(function(i,n){var r=t.getCanvas();r.setBackgroundImage(e,function(){var e=r.backgroundImage;e&&e.getElement()?i(e):n(hi)},po)}):L().reject(ui)}}]),i}(ho),go=mo,vo=["tl","tr","mt","ml","mr","mb","bl","br"],bo=function(){};function yo(e,t){return e>t?"width":"height"}var wo=N.fabric.util.createClass(N.fabric.Rect,{initialize:function(e,t,i){(t=F()(t,i)).type="cropzone",this.callSuper("initialize",t),this._addEventHandler(),this.canvas=e,this.options=t},canvasEventDelegation:function(e){var t,i="unregistered";return this.canvasEventTrigger[e]!==bo?i="registered":n()(t=[Ze,Xe]).call(t,e)<0&&(i="none"),i},canvasEventRegister:function(e,t){this.canvasEventTrigger[e]=t},_addEventHandler:function(){var e,t,i,n,r;this.canvasEventTrigger=(S(e={},Ze,bo),S(e,Xe,bo),e),this.on({moving:M()(t=this._onMoving).call(t,this),scaling:M()(i=this._onScaling).call(i,this)}),N.fabric.util.addListener(document,"keydown",M()(n=this._onKeyDown).call(n,this)),N.fabric.util.addListener(document,"keyup",M()(r=this._onKeyUp).call(r,this))},_renderCropzone:function(e){var t=this.flipX?-1:1,i=this.flipY?-1:1,n=t/this.scaleX,r=i/this.scaleY;e.scale(n,r),this._fillOuterRect(e,"rgba(0, 0, 0, 0.5)"),this.options.lineWidth?(this._fillInnerRect(e),this._strokeBorder(e,"rgb(255, 255, 255)",{lineWidth:this.options.lineWidth})):(this._strokeBorder(e,"rgb(0, 0, 0)",{lineDashWidth:7}),this._strokeBorder(e,"rgb(255, 255, 255)",{lineDashWidth:7,lineDashOffset:7})),e.scale(1/n,1/r)},_render:function(e){this.callSuper("_render",e),this._renderCropzone(e)},_fillOuterRect:function(e,t){var i=this._getCoordinates(),n=i.x,r=i.y;e.save(),e.fillStyle=t,e.beginPath(),e.moveTo(n[0]-1,r[0]-1),e.lineTo(n[3]+1,r[0]-1),e.lineTo(n[3]+1,r[3]+1),e.lineTo(n[0]-1,r[3]+1),e.lineTo(n[0]-1,r[0]-1),e.closePath(),e.moveTo(n[1],r[1]),e.lineTo(n[1],r[2]),e.lineTo(n[2],r[2]),e.lineTo(n[2],r[1]),e.lineTo(n[1],r[1]),e.closePath(),ne()(e).call(e),e.restore()},_fillInnerRect:function(e){var t=this._getCoordinates(),i=t.x,n=t.y,r=this._caculateInnerPosition(i,(i[2]-i[1])/3),o=this._caculateInnerPosition(n,(n[2]-n[1])/3);e.save(),e.strokeStyle="rgba(255, 255, 255, 0.7)",e.lineWidth=this.options.lineWidth,e.beginPath(),e.moveTo(r[0],o[1]),e.lineTo(r[3],o[1]),e.moveTo(r[0],o[2]),e.lineTo(r[3],o[2]),e.moveTo(r[1],o[0]),e.lineTo(r[1],o[3]),e.moveTo(r[2],o[0]),e.lineTo(r[2],o[3]),e.stroke(),e.closePath(),e.restore()},_caculateInnerPosition:function(e,t){var i=[];return i[0]=e[1],i[1]=e[1]+t,i[2]=e[1]+2*t,i[3]=e[2],i},_getCoordinates:function(){var e,t,i=this.canvas,n=this.width,r=this.height,o=this.left,s=this.top,a=n/2,l=r/2,c=i.getHeight(),u=i.getWidth();return{x:gn()(e=[-(a+o),-a,a,a+(u-o-n)]).call(e,Math.ceil),y:gn()(t=[-(l+s),-l,l,l+(c-s-r)]).call(t,Math.ceil)}},_strokeBorder:function(e,t,i){var n=i.lineDashWidth,r=i.lineDashOffset,o=i.lineWidth,s=this.width/2,a=this.height/2;e.save(),e.strokeStyle=t,e.setLineDash&&e.setLineDash([n,n]),r&&(e.lineDashOffset=r),o&&(e.lineWidth=o),e.beginPath(),e.moveTo(-s,-a),e.lineTo(s,-a),e.lineTo(s,a),e.lineTo(-s,a),e.lineTo(-s,-a),e.stroke(),e.restore()},_onMoving:function(){var e=this.height,t=this.width,i=this.left,n=this.top,r=this.canvas.getWidth()-t,o=this.canvas.getHeight()-e;this.left=Ri(i,0,r),this.top=Ri(n,0,o),this.canvasEventTrigger[Ze](this)},_onScaling:function(e){var t=e.transform.corner,i=this.canvas.getPointer(e.e),n=this._calcScalingSizeFromPointer(i,t);this.scale(1).set(n),this.canvasEventTrigger[Xe](this)},_calcScalingSizeFromPointer:function(e,t){var i=function(e){return n()(vo).call(vo,e)>=0}(t);return i&&this._resizeCropZone(e,t)},adjustRatioCropzoneSize:function(e){var t=e.width,i=e.height,n=e.leftMaker,r=e.topMaker,o=e.maxWidth,s=e.maxHeight,a=e.scaleTo;if(t=o?Ri(t,1,o):t,i=s?Ri(i,1,s):i,!this.presetRatio)return this._withShiftKey&&(t>i?i=t:i>t&&(t=i)),{width:t,height:i,left:n(t),top:r(i)};"width"===a?i=t/this.presetRatio:t=i*this.presetRatio;var l=Math.min(o/t,s/i);if(l<=1){var c,u=X(gn()(c=[t,i]).call(c,function(e){return e*l}),2);t=u[0],i=u[1]}return{width:t,height:i,left:n(t),top:r(i)}},_getCropzoneRectInfo:function(){var e=this.canvas,t=e.width,i=e.height,n=this.getBoundingRect(!1,!0),r=n.top,o=n.left,s=n.width,a=n.height;return{rectTop:r,rectLeft:o,rectWidth:s,rectHeight:a,rectRight:o+s,rectBottom:r+a,canvasWidth:t,canvasHeight:i}},_resizeCropZone:function(e,t){var i=e.x,n=e.y,r=this._getCropzoneRectInfo(),o=r.rectWidth,s=r.rectHeight,a=r.rectTop,l=r.rectLeft,c=r.rectBottom,u=r.rectRight,h=r.canvasWidth,d=r.canvasHeight,f={tl:{width:u-i,height:c-n,leftMaker:function(e){return u-e},topMaker:function(e){return c-e},maxWidth:u,maxHeight:c,scaleTo:yo(l-i,a-n)},tr:{width:i-l,height:c-n,leftMaker:function(){return l},topMaker:function(e){return c-e},maxWidth:h-l,maxHeight:c,scaleTo:yo(i-u,a-n)},mt:{width:o,height:c-n,leftMaker:function(){return l},topMaker:function(e){return c-e},maxWidth:h-l,maxHeight:c,scaleTo:"height"},ml:{width:u-i,height:s,leftMaker:function(e){return u-e},topMaker:function(){return a},maxWidth:u,maxHeight:d-a,scaleTo:"width"},mr:{width:i-l,height:s,leftMaker:function(){return l},topMaker:function(){return a},maxWidth:h-l,maxHeight:d-a,scaleTo:"width"},mb:{width:o,height:n-a,leftMaker:function(){return l},topMaker:function(){return a},maxWidth:h-l,maxHeight:d-a,scaleTo:"height"},bl:{width:u-i,height:n-a,leftMaker:function(e){return u-e},topMaker:function(){return a},maxWidth:u,maxHeight:d-a,scaleTo:yo(l-i,n-c)},br:{width:i-l,height:n-a,leftMaker:function(){return l},topMaker:function(){return a},maxWidth:h-l,maxHeight:d-a,scaleTo:yo(i-u,n-c)}};return this.adjustRatioCropzoneSize(f[t])},isValid:function(){return this.left>=0&&this.top>=0&&this.width>0&&this.height>0},_onKeyDown:function(e){e.keyCode===Kt&&(this._withShiftKey=!0)},_onKeyUp:function(e){e.keyCode===Kt&&(this._withShiftKey=!1)}}),_o=wo;function ko(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var xo={presetRatio:null,top:-10,left:-10,height:1,width:1},Co=function(e){En(i,e);var t=ko(i);function i(e){var n,r,o,s,a,l;return E(this,i),(l=t.call(this,Se.CROPPER,e))._cropzone=null,l._startX=null,l._startY=null,l._withShiftKey=!1,l._listeners={keydown:M()(n=l._onKeyDown).call(n,In(l)),keyup:M()(r=l._onKeyUp).call(r,In(l)),mousedown:M()(o=l._onFabricMouseDown).call(o,In(l)),mousemove:M()(s=l._onFabricMouseMove).call(s,In(l)),mouseup:M()(a=l._onFabricMouseUp).call(a,In(l))},l}return A(i,[{key:"start",value:function(){if(!this._cropzone){var e=this.getCanvas();e.forEachObject(function(e){e.evented=!1}),this._cropzone=new _o(e,F()({left:0,top:0,width:.5,height:.5,strokeWidth:0,cornerSize:10,cornerColor:"black",fill:"transparent"},Ee,this.graphics.cropSelectionStyle)),e.discardActiveObject(),e.add(this._cropzone),e.on("mouse:down",this._listeners.mousedown),e.selection=!1,e.defaultCursor="crosshair",N.fabric.util.addListener(document,"keydown",this._listeners.keydown),N.fabric.util.addListener(document,"keyup",this._listeners.keyup)}}},{key:"end",value:function(){var e=this.getCanvas(),t=this._cropzone;t&&(e.remove(t),e.selection=!0,e.defaultCursor="default",e.off("mouse:down",this._listeners.mousedown),e.forEachObject(function(e){e.evented=!0}),this._cropzone=null,N.fabric.util.removeListener(document,"keydown",this._listeners.keydown),N.fabric.util.removeListener(document,"keyup",this._listeners.keyup))}},{key:"changeVisibility",value:function(e){this._cropzone&&this._cropzone.set({visible:e})}},{key:"_onFabricMouseDown",value:function(e){var t=this.getCanvas();if(!e.target){t.selection=!1;var i=t.getPointer(e.e);this._startX=i.x,this._startY=i.y,t.on({"mouse:move":this._listeners.mousemove,"mouse:up":this._listeners.mouseup})}}},{key:"_onFabricMouseMove",value:function(e){var t=this.getCanvas(),i=t.getPointer(e.e),n=i.x,r=i.y,o=this._cropzone;Math.abs(n-this._startX)+Math.abs(r-this._startY)>10&&(t.remove(o),o.set(this._calcRectDimensionFromPoint(n,r,o.presetRatio)),t.add(o),t.setActiveObject(o))}},{key:"_calcRectDimensionFromPoint",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.getCanvas(),r=n.getWidth(),o=n.getHeight(),s=this._startX,a=this._startY,l=Ri(e,0,s),c=Ri(t,0,a),u=Ri(e,s,r)-l,h=Ri(t,a,o)-c;return this._withShiftKey&&!i?(u>h?h=u:h>u&&(u=h),s>=e&&(l=s-u),a>=t&&(c=a-h)):i&&(h=u/i,s>=e&&(l=Ri(s-u,0,r)),a>=t&&(c=Ri(a-h,0,o)),c+h>o&&(u=(h=o-c)*i,s>=e&&(l=Ri(s-u,0,r)),a>=t&&(c=Ri(a-h,0,o)))),{left:l,top:c,width:u,height:h}}},{key:"_onFabricMouseUp",value:function(){var e=this._cropzone,t=this._listeners,i=this.getCanvas();i.setActiveObject(e),i.off({"mouse:move":t.mousemove,"mouse:up":t.mouseup})}},{key:"getCroppedImageData",value:function(e){var t=this.getCanvas(),i=t.contains(this._cropzone);if(!e)return null;i&&t.remove(this._cropzone);var n={imageName:this.getImageName(),url:t.toDataURL(e)};return i&&t.add(this._cropzone),n}},{key:"getCropzoneRect",value:function(){var e=this._cropzone;return e.isValid()?{left:e.left,top:e.top,width:e.width,height:e.height}:null}},{key:"setCropzoneRect",value:function(e){var t=this.getCanvas(),i=this._cropzone;t.discardActiveObject(),t.selection=!1,t.remove(i),i.set(e?this._getPresetPropertiesForCropSize(e):xo),t.add(i),t.selection=!0,e&&t.setActiveObject(i)}},{key:"_getPresetPropertiesForCropSize",value:function(e){var t,i,n=this.getCanvas(),r=n.getWidth(),o=n.getHeight(),s=r>=o?r:o,a=function(e,t){return e>t?t/e:1},l=s*e,c=s,u=a(l,r),h=X(gn()(t=[l,c]).call(t,function(e){return e*u}),2);l=h[0];var d=a(c=h[1],o),f=X(gn()(i=[l,c]).call(i,function(e){return Number((e*d).toFixed(2))}),2);return l=f[0],{presetRatio:e,top:(o-(c=f[1]))/2,left:(r-l)/2,width:l,height:c}}},{key:"_onKeyDown",value:function(e){e.keyCode===Kt&&(this._withShiftKey=!0)}},{key:"_onKeyUp",value:function(e){e.keyCode===Kt&&(this._withShiftKey=!1)}}]),i}(ho),So=Co;function Eo(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var To=function(e){En(i,e);var t=Eo(i);function i(e){return E(this,i),t.call(this,Se.FLIP,e)}return A(i,[{key:"getCurrentSetting",value:function(){var e=this.getCanvasImage();return{flipX:e.flipX,flipY:e.flipY}}},{key:"set",value:function(e){var t=this.getCurrentSetting(),i=t.flipX!==e.flipX,n=t.flipY!==e.flipY;return i||n?(F()(t,e),this.setImageProperties(t,!0),this._invertAngle(i,n),this._flipObjects(i,n),L().resolve({flipX:t.flipX,flipY:t.flipY,angle:this.getCanvasImage().angle})):L().reject(ai)}},{key:"_invertAngle",value:function(e,t){var i=this.getCanvasImage(),n=i.angle;e&&(n*=-1),t&&(n*=-1),i.rotate(pn()(n)).setCoords()}},{key:"_flipObjects",value:function(e,t){var i=this.getCanvas();e&&i.forEachObject(function(e){e.set({angle:pn()(-1*e.angle),flipX:!e.flipX,left:i.width-e.left}).setCoords()}),t&&i.forEachObject(function(e){e.set({angle:pn()(-1*e.angle),flipY:!e.flipY,top:i.height-e.top}).setCoords()}),i.renderAll()}},{key:"reset",value:function(){return this.set({flipX:!1,flipY:!1})}},{key:"flipX",value:function(){var e=this.getCurrentSetting();return this.set({flipX:!e.flipX,flipY:e.flipY})}},{key:"flipY",value:function(){var e=this.getCurrentSetting();return this.set({flipX:e.flipX,flipY:!e.flipY})}}]),i}(ho),Ao=To;function Io(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Mo=function(e){En(i,e);var t=Io(i);function i(e){return E(this,i),t.call(this,Se.ROTATION,e)}return A(i,[{key:"getCurrentAngle",value:function(){return this.getCanvasImage().angle}},{key:"setAngle",value:function(e){var t=this.getCurrentAngle()%360;e%=360;var i=this.getCanvasImage(),n=i.getCenterPoint();i.set({angle:e}).setCoords(),this.adjustCanvasDimension();var r=i.getCenterPoint();return this._rotateForEachObject(n,r,e-t),L().resolve(e)}},{key:"_rotateForEachObject",value:function(e,t,i){var n=this.getCanvas(),r=e.x-t.x,o=e.y-t.y;n.forEachObject(function(t){var n=t.getCenterPoint(),s=N.fabric.util.degreesToRadians(i),a=N.fabric.util.rotatePoint(n,e,s);t.set({left:a.x-r,top:a.y-o,angle:(t.angle+i)%360}),t.setCoords()}),n.renderAll()}},{key:"rotate",value:function(e){var t=this.getCurrentAngle();return this.setAngle(t+e)}}]),i}(ho),Po=Mo;function Do(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Oo=function(e){En(i,e);var t=Do(i);function i(e){var n;return E(this,i),(n=t.call(this,Se.FREE_DRAWING,e)).width=12,n.oColor=new N.fabric.Color("rgba(0, 0, 0, 0.5)"),n}return A(i,[{key:"start",value:function(e){this.getCanvas().isDrawingMode=!0,this.setBrush(e)}},{key:"setBrush",value:function(e){var t=this.getCanvas().freeDrawingBrush;e=e||{},this.width=e.width||this.width,e.color&&(this.oColor=new N.fabric.Color(e.color)),t.width=this.width,t.color=this.oColor.toRgba()}},{key:"end",value:function(){this.getCanvas().isDrawingMode=!1}}]),i}(ho),Lo=Oo,Ro=N.fabric.util.createClass(N.fabric.Line,{type:"line",initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.callSuper("initialize",e,t),this.arrowType=t.arrowType},_render:function(e){var t=this.calcLinePoints(),i={fromX:t.x1,fromY:t.y1,toX:t.x2,toY:t.y2};this.ctx=e,e.lineWidth=this.strokeWidth,this._renderBasicLinePath(i),this._drawDecoratorPath(i),this._renderStroke(e)},_renderBasicLinePath:function(e){var t=e.fromX,i=e.fromY,n=e.toX,r=e.toY;this.ctx.beginPath(),this.ctx.moveTo(t,i),this.ctx.lineTo(n,r)},_drawDecoratorPath:function(e){this._drawDecoratorPathType("head",e),this._drawDecoratorPathType("tail",e)},_drawDecoratorPathType:function(e,t){switch(this.arrowType[e]){case"triangle":this._drawTrianglePath(e,t);break;case"chevron":this._drawChevronPath(e,t)}},_drawTrianglePath:function(e,t){var i=1.7*this.ctx.lineWidth;this._drawChevronPath(e,t,i),this.ctx.closePath()},_drawChevronPath:function(e,t,i){var n=this,r=t.fromX,o=t.fromY,s=t.toX,a=t.toY,l=this.ctx;i||(i=2.7*this.ctx.lineWidth);var c=X("head"===e?[r,o]:[s,a],2),u=c[0],h=c[1],d=X("head"===e?[s,a]:[r,o],2),f=d[0],p=d[1],m=180*Math.atan2(p-h,f-u)/Math.PI,g=function(e){return n.getRotatePosition(i,e,{x:u,y:h})};l.moveTo.apply(l,x(g(m+30))),l.lineTo(u,h),l.lineTo.apply(l,x(g(m-30)))},getRotatePosition:function(e,t,i){var n=t*Math.PI/180,r=i.x,o=i.y;return[e*Math.cos(n)+r,e*Math.sin(n)+o]}}),Bo=Ro;function No(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var jo=function(e){En(i,e);var t=No(i);function i(e){var n,r,o,s;return E(this,i),(s=t.call(this,Se.LINE,e))._width=12,s._oColor=new N.fabric.Color("rgba(0, 0, 0, 0.5)"),s._listeners={mousedown:M()(n=s._onFabricMouseDown).call(n,In(s)),mousemove:M()(r=s._onFabricMouseMove).call(r,In(s)),mouseup:M()(o=s._onFabricMouseUp).call(o,In(s))},s}return A(i,[{key:"setHeadOption",value:function(e){var t=e.arrowType,i=void 0===t?{head:null,tail:null}:t;this._arrowType=i}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getCanvas();t.defaultCursor="crosshair",t.selection=!1,this.setHeadOption(e),this.setBrush(e),t.forEachObject(function(e){e.set({evented:!1})}),t.on({"mouse:down":this._listeners.mousedown})}},{key:"setBrush",value:function(e){var t=this.getCanvas().freeDrawingBrush;e=e||{},this._width=e.width||this._width,e.color&&(this._oColor=new N.fabric.Color(e.color)),t.width=this._width,t.color=this._oColor.toRgba()}},{key:"end",value:function(){var e=this.getCanvas();e.defaultCursor="default",e.selection=!0,e.forEachObject(function(e){e.set({evented:!0})}),e.off("mouse:down",this._listeners.mousedown)}},{key:"_onFabricMouseDown",value:function(e){var t=this.getCanvas(),i=t.getPointer(e.e),n=i.x,r=i.y,o=[n,r,n,r];this._line=new Bo(o,{stroke:this._oColor.toRgba(),strokeWidth:this._width,arrowType:this._arrowType,evented:!1}),this._line.set(oi),t.add(this._line),t.on({"mouse:move":this._listeners.mousemove,"mouse:up":this._listeners.mouseup}),this.fire(ot,this._createLineEventObjectProperties())}},{key:"_onFabricMouseMove",value:function(e){var t=this.getCanvas(),i=t.getPointer(e.e);this._line.set({x2:i.x,y2:i.y}),this._line.setCoords(),t.renderAll()}},{key:"_onFabricMouseUp",value:function(){var e=this.getCanvas();this.fire(Je,this._createLineEventObjectProperties()),this._line=null,e.off({"mouse:move":this._listeners.mousemove,"mouse:up":this._listeners.mouseup})}},{key:"_createLineEventObjectProperties",value:function(){var e=this.graphics.createObjectProperties(this._line),t=this._line,i=t.x1,n=t.x2,r=t.y1,o=t.y2;return F()({},e,{startPosition:{x:i,y:r},endPosition:{x:n,y:o}})}}]),i}(ho),Fo=jo;function zo(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Vo={fill:"#000000",left:0,top:0},Ho={fill:"#000000",fontStyle:"normal",fontWeight:"normal",textAlign:"tie-text-align-left",underline:!1},Uo=function(e){En(i,e);var t=zo(i);function i(e){var n,r,o,s,a,l;return E(this,i),(l=t.call(this,Se.TEXT,e))._defaultStyles=Vo,l._isSelected=!1,l._selectedObj={},l._editingObj={},l._listeners={mousedown:M()(n=l._onFabricMouseDown).call(n,In(l)),select:M()(r=l._onFabricSelect).call(r,In(l)),selectClear:M()(o=l._onFabricSelectClear).call(o,In(l)),scaling:M()(s=l._onFabricScaling).call(s,In(l)),textChanged:M()(a=l._onFabricTextChanged).call(a,In(l))},l._textarea=null,l._ratio=1,l._lastClickTime=(new Date).getTime(),l._editingObjInfos={},l.isPrevEditing=!1,l}return A(i,[{key:"start",value:function(){var e=this,t=this.getCanvas();t.selection=!1,t.defaultCursor="text",t.on({"mouse:down":this._listeners.mousedown,"selection:created":this._listeners.select,"selection:updated":this._listeners.select,"before:selection:cleared":this._listeners.selectClear,"object:scaling":this._listeners.scaling,"text:changed":this._listeners.textChanged}),t.forEachObject(function(t){"i-text"===t.type&&e.adjustOriginPosition(t,"start")}),this.setCanvasRatio()}},{key:"end",value:function(){var e=this,t=this.getCanvas();t.selection=!0,t.defaultCursor="default",t.forEachObject(function(i){"i-text"===i.type&&(""===i.text?t.remove(i):e.adjustOriginPosition(i,"end"))}),t.off({"mouse:down":this._listeners.mousedown,"selection:created":this._listeners.select,"selection:updated":this._listeners.select,"before:selection:cleared":this._listeners.selectClear,"object:selected":this._listeners.select,"object:scaling":this._listeners.scaling,"text:changed":this._listeners.textChanged})}},{key:"adjustOriginPosition",value:function(e,t){var i="center",n="center";"start"===t&&(i="left",n="top");var r=e.getPointByOrigin(i,n),o=r.x,s=r.y;e.set({left:o,top:s,originX:i,originY:n}),e.setCoords()}},{key:"add",value:function(e,t){var i=this;return new(L())(function(n){var r,o=i.getCanvas(),s=null,a=oi,l=i._defaultStyles;i._setInitPos(t.position),t.styles&&(l=F()(l,t.styles)),Ir()(t.autofocus)||(t.autofocus=!0),s=new N.fabric.IText(e,l),a=F()({},a,{originX:"left",originY:"top"}),s.set(a),s.on({mouseup:M()(r=i._onFabricMouseUp).call(r,i)}),o.add(s),t.autofocus&&(s.enterEditing(),s.selectAll()),o.getActiveObject()||o.setActiveObject(s),i.isPrevEditing=!0,n(i.graphics.createObjectProperties(s))})}},{key:"change",value:function(e,t){var i=this;
85return new(L())(function(n){e.set("text",t),i.getCanvas().renderAll(),n()})}},{key:"setStyle",value:function(e,t){var i=this;return new(L())(function(n){U()(t,function(i,n){e[n]===i&&"fontSize"!==n&&(t[n]=Ho[n]||"")},i),"textDecoration"in t&&F()(t,i._getTextDecorationAdaptObject(t.textDecoration)),e.set(t),i.getCanvas().renderAll(),n()})}},{key:"getText",value:function(e){return e.text}},{key:"setSelectedInfo",value:function(e,t){this._selectedObj=e,this._isSelected=t}},{key:"isSelected",value:function(){return this._isSelected}},{key:"getSelectedObj",value:function(){return this._selectedObj}},{key:"setCanvasRatio",value:function(){var e=this.getCanvasElement(),t=Q()(e.style.maxWidth,10),i=e.width;this._ratio=i/t}},{key:"getCanvasRatio",value:function(){return this._ratio}},{key:"_getTextDecorationAdaptObject",value:function(e){return{underline:"underline"===e,linethrough:"line-through"===e,overline:"overline"===e}}},{key:"_setInitPos",value:function(e){e=e||this.getCanvasImage().getCenterPoint(),this._defaultStyles.left=e.x,this._defaultStyles.top=e.y}},{key:"_onInput",value:function(){var e=this.getCanvasRatio(),t=this._editingObj,i=this._textarea.style;i.width="".concat(Math.ceil(t.width/e),"px"),i.height="".concat(Math.ceil(t.height/e),"px")}
vendor: 59,336 bytes, line 85
85},{key:"_onKeyDown",value:function(){var e=this,t=this.getCanvasRatio(),i=this._editingObj,n=this._textarea.style;m()(function(){i.text(e._textarea.value),n.width="".concat(Math.ceil(i.width/t),"px"),n.height="".concat(Math.ceil(i.height/t),"px")},0)}},{key:"_onBlur",value:function(){var e=this.getCanvasRatio(),t=this._editingObj,i=this._editingObjInfos,n=this._textarea.value,r=t.width/e-i.width/e,o=t.height/e-i.height/e;if(1===e&&(r/=2,o/=2),this._textarea.style.display="none",t.set({left:i.left+r,top:i.top+o}),n.length){this.getCanvas().add(t);var s={id:Oi(t),type:t.type,text:n};this.fire(tt,s)}}},{key:"_onScroll",value:function(){this._textarea.scrollLeft=0,this._textarea.scrollTop=0}},{key:"_onFabricScaling",value:function(e){var t=e.target;t.fontSize=t.fontSize*t.scaleY,t.scaleX=1,t.scaleY=1}},{key:"_onFabricTextChanged",value:function(e){this.fire(tt,e.target)}},{key:"_onFabricSelectClear",value:function(e){var t=this.getSelectedObj();this.isPrevEditing=!0,this.setSelectedInfo(e.target,!1),t&&""===t.text&&this.getCanvas().remove(t)}},{key:"_onFabricSelect",value:function(e){this.isPrevEditing=!0,this.setSelectedInfo(e.target,!0)}},{key:"_onFabricMouseDown",value:function(e){var t=e.target;t&&!t.isType("text")||(this.isPrevEditing?this.isPrevEditing=!1:this._fireAddText(e))}},{key:"_fireAddText",value:function(e){var t=e.target,i=e.e||{},n=this.getCanvas().getPointer(i);t||this.fire(rt,{originPosition:{x:n.x,y:n.y},clientPosition:{x:i.clientX||0,y:i.clientY||0}})}},{key:"_onFabricMouseUp",value:function(e){var t=e.target,i=(new Date).getTime();this._isDoubleClick(i)&&!t.isEditing&&t.enterEditing(),t.isEditing&&this.fire(et),this._lastClickTime=i}},{key:"_isDoubleClick",value:function(e){return e-this._lastClickTime<500}}]),i}(ho),Wo=Uo;function $o(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Go={arrow:"M 0 90 H 105 V 120 L 160 60 L 105 0 V 30 H 0 Z",cancel:"M 0 30 L 30 60 L 0 90 L 30 120 L 60 90 L 90 120 L 120 90 L 90 60 L 120 30 L 90 0 L 60 30 L 30 0 Z"},qo=function(e){En(i,e);var t=$o(i);function i(e){var n,r,o,s;return E(this,i),(s=t.call(this,Se.ICON,e))._oColor="#000000",s._pathMap=Go,s._type=null,s._iconColor=null,s._handlers={mousedown:M()(n=s._onFabricMouseDown).call(n,In(s)),mousemove:M()(r=s._onFabricMouseMove).call(r,In(s)),mouseup:M()(o=s._onFabricMouseUp).call(o,In(s))},s}return A(i,[{key:"setStates",value:function(e,t){this._type=e,this._iconColor=t}},{key:"start",value:function(){var e=this.getCanvas();e.selection=!1,e.on("mouse:down",this._handlers.mousedown)}},{key:"end",value:function(){var e=this.getCanvas();e.selection=!0,e.off({"mouse:down":this._handlers.mousedown})}},{key:"add",value:function(e,t){var i=this;return new(L())(function(n,r){var o=i.getCanvas(),s=i._pathMap[e],a=oi,l=s?i._createIcon(s):null;i._icon=l,l||r(li),l.set(F()({type:"icon",fill:i._oColor},a,t,i.graphics.controlStyle)),o.add(l).setActiveObject(l),n(i.graphics.createObjectProperties(l))})}},{key:"registerPaths",value:function(e){var t=this;U()(e,function(e,i){t._pathMap[i]=e},this)}},{key:"setColor",value:function(e,t){this._oColor=e,t&&"icon"===t.get("type")&&(t.set({fill:this._oColor}),this.getCanvas().renderAll())}},{key:"getColor",value:function(e){return ne()(e)}},{key:"_createIcon",value:function(e){return new N.fabric.Path(e)}},{key:"_onFabricMouseDown",value:function(e){var t=this,i=this.getCanvas();this._startPoint=i.getPointer(e.e);var n=this._startPoint,r=n.x,o=n.y;this.add(this._type,{left:r,top:o,fill:this._iconColor}).then(function(){t.fire(ot,t.graphics.createObjectProperties(t._icon)),i.on("mouse:move",t._handlers.mousemove),i.on("mouse:up",t._handlers.mouseup)})}},{key:"_onFabricMouseMove",value:function(e){var t=this.getCanvas();if(this._icon){var i=t.getPointer(e.e),n=(i.x-this._startPoint.x)/this._icon.width,r=(i.y-this._startPoint.y)/this._icon.height;this._icon.set({scaleX:Math.abs(2*n),scaleY:Math.abs(2*r)}),this._icon.setCoords(),t.renderAll()}}},{key:"_onFabricMouseUp",value:function(){var e=this.getCanvas();this.fire(Je,this.graphics.createObjectProperties(this._icon)),this._icon=null,e.off("mouse:down",this._handlers.mousedown),e.off("mouse:move",this._handlers.mousemove),e.off("mouse:up",this._handlers.mouseup)}}]),i}(ho),Yo=qo,Zo=N.fabric.util.createClass(N.fabric.Image.filters.BlendImage,{applyTo:function(e){if(this.mask){var t=e.canvasEl,i=t.width,n=t.height,r=this._createCanvasOfMask(i,n),o=t.getContext("2d"),s=r.getContext("2d"),a=o.getImageData(0,0,i,n);this._drawMask(s,t,o),this._mapData(s,a,i,n),e.imageData=a}},_createCanvasOfMask:function(e,t){var i=N.fabric.util.createCanvasElement();return i.width=e,i.height=t,i},_drawMask:function(e){var t=this.mask,i=t.getElement(),n=t.angle,r=t.left,o=t.scaleX,s=t.scaleY,a=t.top;e.save(),e.translate(r,a),e.rotate(n*Math.PI/180),e.scale(o,s),e.drawImage(i,-i.width/2,-i.height/2),e.restore()},_mapData:function(e,t,i,n){for(var r=t.data,o=t.height,s=r,a=t.width*o*4,l=e.getImageData(0,0,i,n).data,c=0;c<a;c+=4)s[c+3]=l[c]}}),Xo=Zo,Ko=N.fabric.util.createClass(N.fabric.Image.filters.Convolute,{type:"Sharpen",initialize:function(){this.matrix=[0,-1,0,-1,5,-1,0,-1,0]}}),Jo=N.fabric.util.createClass(N.fabric.Image.filters.Convolute,{type:"Emboss",initialize:function(){this.matrix=[1,1,1,1,.7,-1,-1,-1,-1]}}),Qo=N.fabric.util.createClass(N.fabric.Image.filters.BaseFilter,{type:"ColorFilter",initialize:function(e){e||(e={}),this.color=e.color||"#FFFFFF",this.threshold=e.threshold||45,this.x=e.x||null,this.y=e.y||null},applyTo:function(e){var t,i,n=e.canvasEl,r=n.getContext("2d"),o=r.getImageData(0,0,n.width,n.height),s=o.data,a=this.threshold,l=N.fabric.Color.sourceFromHex(this.color);for(this.x&&this.y&&(l=this._getColor(o,this.x,this.y)),t=0,i=s.length;t<i;t+=4)this._isOutsideThreshold(s[t],l[0],a)||this._isOutsideThreshold(s[t+1],l[1],a)||this._isOutsideThreshold(s[t+2],l[2],a)||(s[t]=s[t+1]=s[t+2]=s[t+3]=0);r.putImageData(o,0,0)},_isOutsideThreshold:function(e,t,i){var n=e-t;return Math.abs(n)>i},_getColor:function(e,t,i){var n=[0,0,0,0],r=e.data,o=4*(e.width*i+t);return n[0]=r[o],n[1]=r[o+1],n[2]=r[o+2],n[3]=r[o+3],n}});function es(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var ts=N.fabric.Image.filters;ts.Mask=Xo,ts.Sharpen=Ko,ts.Emboss=Jo,ts.ColorFilter=Qo;var is,ns,rs,os=function(e){En(i,e);var t=es(i);function i(e){return E(this,i),t.call(this,Se.FILTER,e)}return A(i,[{key:"add",value:function(e,t){var i=this;return new(L())(function(n,r){var o=i._getSourceImage(),s=i.getCanvas(),a=i._getFilter(o,e);a||(a=i._createFilter(o,e,t)),a||r(li),i._changeFilterValues(a,t),i._apply(o,function(){s.renderAll(),n({type:e,action:"add",options:t})})})}},{key:"remove",value:function(e){var t=this;return new(L())(function(i,n){var r=t._getSourceImage(),o=t.getCanvas(),s=t.getOptions(e);r.filters.length||n(mi),t._removeFilter(r,e),t._apply(r,function(){o.renderAll(),i({type:e,action:"remove",options:s})})})}},{key:"hasFilter",value:function(e){return!!this._getFilter(this._getSourceImage(),e)}},{key:"getOptions",value:function(e){var t=this._getSourceImage(),i=this._getFilter(t,e);return i?F()({},i.options):null}},{key:"_changeFilterValues",value:function(e,t){U()(t,function(t,i){V()(e[i])||(e[i]=t)}),U()(e.options,function(i,n){V()(t[n])||(e.options[n]=t[n])})}},{key:"_apply",value:function(e,t){e.filters.push(),e.applyFilters()&&t()}},{key:"_getSourceImage",value:function(){return this.getCanvasImage()}},{key:"_createFilter",value:function(e,t,i){var n,r=this._getFabricFilterType(t),o=N.fabric.Image.filters[r];return o&&((n=new o(i)).options=i,e.filters.push(n)),n}},{key:"_getFilter",value:function(e,t){var i=null;if(e){var n,r,o=this._getFabricFilterType(t),s=e.filters.length;for(r=0;r<s;r+=1)if((n=e.filters[r]).type===o){i=n;break}}return i}},{key:"_removeFilter",value:function(e,t){var i,n=this._getFabricFilterType(t);e.filters=no()(i=e.filters).call(i,function(e){return e.type!==n})}},{key:"_getFabricFilterType",value:function(e){return e.charAt(0).toUpperCase()+h()(e).call(e,1)}}]),i}(ho),ss=os,as=r(1801),ls=r.n(as),cs={pixelate:"blocksize",blur:"blur"},us={x:"width",y:"height"},hs=(is=cs,rs={},te()(ns=Z()(is)).call(ns,function(e){rs[is[e]]=e}),rs),ds=null;function fs(e){return X($i(e,"patternSourceCanvas").patternSourceCanvas.getObjects(),1)[0]}function ps(e){var t=e.angle,i=e.flipX,n=e.flipY,r=fs(e),o=function(e){var t=bs(e),i=X(t,4),n=i[0],r=n.x,o=n.y,s=i[1],a=s.x,l=s.y,c=i[2],u=c.x,h=c.y,d=i[3],f=d.x,p=d.y,m=Math.min(r,a,u,f),g=Math.min(o,l,h,p),v=Math.max(r,a,u,f),b=Math.max(o,l,h,p);return{left:m,top:g,right:v,bottom:b,width:v-m,height:b-g}}(e),s=o.right,a=o.bottom,l=o.width,c=o.height,u=(l-e.width)/2,h=(c-e.height)/2,d=e.left-e.width/2-u,f=e.top-e.height/2-h,p=l/2-u,m=c/2-h,g=Math.max(l,c)+Math.max(u,h),v=function(e){var t=e.shapeObj,i=e.left,n=e.top,r=e.width,o=e.height,s=e.cropX,a=e.cropY,l=e.flipX,c=e.flipY,u=e.right,h=e.bottom,d=function(e,i,n,r){return function(e){var t=e.type,i=e.shapeObj,n=e.outDistance,r=e.left,o=e.top,s=e.flipX,a=e.flipY,l=bs(i),c=function(e,t,i){var n=0,r=0;U()(t,function(t,i){t[e]<n&&(n=t[e],r=i)});var o=X(i[r],2),s=o[0],a=o[1];return{startPointIndex:r,endPointIndex1:s,endPointIndex2:a}}(t,l,[[1,2],[0,3],[0,3],[1,2]]),u=function(e,t,i){var n,r=i.startPointIndex,o=i.endPointIndex1,s=i.endPointIndex2,a="x"===e?180:270;return gn()(n=[o,s]).call(n,function(e){var i=t[r],n=t[e],o=i.y-n.y,s=i.x-n.x;return 180*Math.atan2(o,s)/Math.PI-a})}(t,l,c),h=c.startPointIndex,d=function(e){var t=e.outDistance,i=e.startPointIndex,n=e.flipX,r=e.flipY,o=e.reatAngles,s=t*Math.cos(o[0]*Math.PI/180),a=t*Math.cos(o[1]*Math.PI/180),l=2===i||3===i,c={top:l?s:a,left:l?a:s};return function(e,t,i){return(!t&&i||!t&&!i)&&0===e||(t&&i||t&&!i)&&1===e||(!t&&!i||!t&&i)&&2===e||(t&&!i||t&&i)&&3===e}(i,n,r)&&(c.left=-1*c.left),function(e,t,i){return(t&&!i||!t&&!i)&&0===e||(!t&&!i||t&&!i)&&1===e||(t&&i||!t&&i)&&2===e||(!t&&i||t&&i)&&3===e}(i,n,r)&&(c.top=-1*c.top),c}({outDistance:n,startPointIndex:h,flipX:s,flipY:a,reatAngles:u});return[r+d.left,o+d.top]}({type:e,outDistance:i,shapeObj:t,flipX:l,flipY:c,left:n,top:r})},f=r,p=o,m=function(e,t){var i=t.left,n=t.top,r=t.width,o=t.height,s=t.cropX,a=t.cropY,l={width:r,height:o};return U()(["x","y"],function(t){var r="x"===t?s:a,o=l[us[t]],c=ds[us[t]];if(o>c){var u=(o-c)/2;l[us[t]]=c;var h=X(e(t,u,i,n),2);i=h[0],n=h[1]}if(r<0){var d=X(e(t,r,i,n),2);i=d[0],n=d[1]}}),[i,n,l.width,l.height]}(d,{left:i,top:n,width:r,height:o,cropX:s,cropY:a}),g=X(m,4);i=g[0],n=g[1],r=g[2],o=g[3];var v=function(e,t){var i=t.left,n=t.top,r=t.insideCanvasRealImageWidth,o=t.insideCanvasRealImageHeight,s=t.right,a=t.bottom,l=t.cropX,c=t.cropY,u=t.originalWidth,h=t.originalHeight,d=r,f=o,p=ds,m=p.width,g=p.height;s>m&&l>0&&(d=u-Math.abs(s-m)),a>g&&c>0&&(f=h-Math.abs(a-g));var v={x:(r-d)/2,y:(o-f)/2};return U()(["x","y"],function(t){var r=v[t];if(r>0){var o=X(e(t,r,i,n),2);i=o[0],n=o[1]}}),[i,n,d,f]}(d,{left:i,top:n,insideCanvasRealImageWidth:r,insideCanvasRealImageHeight:o,right:u,bottom:h,cropX:s,cropY:a,originalWidth:f,originalHeight:p}),b=X(v,4);return i=b[0],n=b[1],r=b[2],o=b[3],[i,n,r,o]}({shapeObj:e,left:p,top:m,width:l,height:c,cropX:d,cropY:f,flipX:i,flipY:n,right:s,bottom:a}),b=X(v,4);p=b[0],m=b[1],l=b[2],c=b[3],r.set({angle:i===n?-t:t,left:p,top:m,width:l,height:c,cropX:d,cropY:f,flipX:i,flipY:n}),Wi(r,{fillImageMaxSize:g})}function ms(e){var t;return gn()(t=e.filters).call(t,function(e){var t=X(Z()(e),1)[0];return S({},hs[t],e[t])})}function gs(e,t,i){var n=ys(vs(e),e.angle,t);i.add(n);var r={fill:new N.fabric.Pattern({source:i.getElement(),repeat:"no-repeat"})};return Wi(r,{patternSourceCanvas:i}),r}function vs(e){return ds&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||(ds=e.toCanvasElement()),ds}function bs(e){return[e.getPointByOrigin("left","top"),e.getPointByOrigin("right","top"),e.getPointByOrigin("left","bottom"),e.getPointByOrigin("right","bottom")]}function ys(e,t,i){var n,r=new N.fabric.Image(e);return U()(F().apply(void 0,D()(n=[{}]).call(n,x(i))),function(e,t){var i,n=(i=t).charAt(0).toUpperCase()+h()(i).call(i,1),o=new N.fabric.Image.filters[n](S({},cs[t],e));r.filters.push(o)}),r.applyFilters(),Wi(r,{originalAngle:t,fillImageMaxSize:Math.max(r.width,r.height)}),ls().adjustOriginToCenter(r),r}function ws(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var _s=F()({strokeWidth:1,stroke:"#000000",fill:"#ffffff",width:1,height:1,rx:0,ry:0},{lockSkewingX:!0,lockSkewingY:!0,bringForward:!0,isRegular:!1});function ks(e,t,i){var n=ne()(e),r=qi(ne()(e)),o=n;n.color&&(o=n.color);var s=null;if("filter"===r){var a=i();s=gs(t,no()(n),a)}else s={fill:o};return F()({},e,s)}var xs=function(e){En(i,e);var t=ws(i);function i(e){var n,r,o,s,a,l;return E(this,i),(l=t.call(this,Se.SHAPE,e))._shapeObj=null,l._type="rect",l._options=F()({},_s),l._isSelected=!1,l._startPoint={},l._withShiftKey=!1,l._handlers={mousedown:M()(n=l._onFabricMouseDown).call(n,In(l)),mousemove:M()(r=l._onFabricMouseMove).call(r,In(l)),mouseup:M()(o=l._onFabricMouseUp).call(o,In(l)),keydown:M()(s=l._onKeyDown).call(s,In(l)),keyup:M()(a=l._onKeyUp).call(a,In(l))},l}return A(i,[{key:"start",value:function(){var e=this.getCanvas();this._isSelected=!1,e.defaultCursor="crosshair",e.selection=!1,e.uniformScaling=!0,e.on({"mouse:down":this._handlers.mousedown}),N.fabric.util.addListener(document,"keydown",this._handlers.keydown),N.fabric.util.addListener(document,"keyup",this._handlers.keyup)}},{key:"end",value:function(){var e=this.getCanvas();this._isSelected=!1,e.defaultCursor="default",e.selection=!0,e.uniformScaling=!1,e.off({"mouse:down":this._handlers.mousedown}),N.fabric.util.removeListener(document,"keydown",this._handlers.keydown),N.fabric.util.removeListener(document,"keyup",this._handlers.keyup)}},{key:"setStates",value:function(e,t){this._type=e,t&&(this._options=F()(this._options,t))}},{key:"add",value:function(e,t){var i=this;return new(L())(function(n){var r=i.getCanvas(),o=i._extendOptions(t),s=i._createInstance(e,o),a=i.graphics.createObjectProperties(s);i._bindEventOnShape(s),r.add(s).setActiveObject(s),i._resetPositionFillFilter(s),n(a)})}},{key:"change",value:function(e,t){var i=this;return new(L())(function(n,r){Zi(e)||r(gi);var o="filter"===qi(ne()(t)),s=i.graphics,a=s.canvasImage,l=s.createStaticCanvas;e.set(o?ks(t,a,l):t),o&&i._resetPositionFillFilter(e),i.getCanvas().renderAll(),n()})}},{key:"makeFillPropertyForUserEvent",value:function(e){var t=Yi(e),i={};if(t===pe){var n=ms(fs(e));i.type=t,i.filter=n}else i.type=me,i.color=ne()(e)||"transparent";return i}},{key:"processForCopiedObject",value:function(e,t){if(this._bindEventOnShape(e),"filter"===Yi(e)){var i=ms(fs(t)),n=this.graphics.createStaticCanvas();e.set(gs(this.graphics.canvasImage,i,n)),this._resetPositionFillFilter(e)}}},{key:"_createInstance",value:function(e,t){var i;switch(e){case"rect":i=new N.fabric.Rect(t);break;case"circle":i=new N.fabric.Ellipse(F()({type:"circle"},t));break;case"triangle":i=new N.fabric.Triangle(t);break;default:i={}}return i}},{key:"_extendOptions",value:function(e){var t=oi,i=this.graphics,n=i.canvasImage,r=i.createStaticCanvas;return ks(e=F()({},_s,this._options,t,e),n,r)}},{key:"_bindEventOnShape",value:function(e){var t=this,i=this.getCanvas();e.on({added:function(){t._shapeObj=this,ls().setOrigins(t._shapeObj)},selected:function(){t._isSelected=!0,t._shapeObj=this,i.uniformScaling=!0,i.defaultCursor="default",ls().setOrigins(t._shapeObj)},deselected:function(){t._isSelected=!1,t._shapeObj=null,i.defaultCursor="crosshair",i.uniformScaling=!1},modified:function(){var e=t._shapeObj;ls().adjustOriginToCenter(e),ls().setOrigins(e)},modifiedInGroup:function(i){t._fillFilterRePositionInGroupSelection(e,i)},moving:function(){t._resetPositionFillFilter(this)},rotating:function(){t._resetPositionFillFilter(this)},scaling:function(e){var n=i.getPointer(e.e),r=t._shapeObj;i.setCursor("crosshair"),ls().resize(r,n,!0),t._resetPositionFillFilter(this)}})}},{key:"_onFabricMouseDown",value:function(e){if(e.target||(this._isSelected=!1,this._shapeObj=!1),!this._isSelected&&!this._shapeObj){var t=this.getCanvas();this._startPoint=t.getPointer(e.e),t.on({"mouse:move":this._handlers.mousemove,"mouse:up":this._handlers.mouseup})}}},{key:"_onFabricMouseMove",value:function(e){var t=this,i=this.getCanvas(),n=i.getPointer(e.e),r=this._startPoint.x,o=this._startPoint.y,s=r-n.x,a=o-n.y,l=this._shapeObj;l?(this._shapeObj.set({isRegular:this._withShiftKey}),ls().resize(l,n),i.renderAll(),this._resetPositionFillFilter(l)):this.add(this._type,{left:r,top:o,width:s,height:a}).then(function(e){t.fire(ot,e)})}},{key:"_onFabricMouseUp",value:function(){var e=this,t=this.getCanvas(),i=this._startPoint.x,n=this._startPoint.y,r=this._shapeObj;r?r&&(ls().adjustOriginToCenter(r),this.fire(Je,this.graphics.createObjectProperties(r))):this.add(this._type,{left:i,top:n,width:20,height:20}).then(function(t){e.fire(ot,t)}),t.off({"mouse:move":this._handlers.mousemove,"mouse:up":this._handlers.mouseup})}},{key:"_onKeyDown",value:function(e){e.keyCode===Kt&&(this._withShiftKey=!0,this._shapeObj&&(this._shapeObj.isRegular=!0))}},{key:"_onKeyUp",value:function(e){e.keyCode===Kt&&(this._withShiftKey=!1,this._shapeObj&&(this._shapeObj.isRegular=!1))}},{key:"_resetPositionFillFilter",value:function(e){if("filter"===Yi(e)){var t=$i(e,"patternSourceCanvas").patternSourceCanvas,i=$i(fs(e),"originalAngle").originalAngle;this.graphics.canvasImage.angle!==i&&function(e,t){var i=$i(e,"patternSourceCanvas").patternSourceCanvas,n=X(i.getObjects(),1)[0],r=ms(n);i.remove(n);var o=ys(vs(t,!0),t.angle,r);i.add(o)}(e,this.graphics.canvasImage);var n=e.originX,r=e.originY;ls().adjustOriginToCenter(e),e.width*=e.scaleX,e.height*=e.scaleY,e.rx*=e.scaleX,e.ry*=e.scaleY,e.scaleX=1,e.scaleY=1,ps(e),function(e,t){var i=t.originX,n=t.originY,r=e.getPointByOrigin(i,n),o=r.x,s=r.y;e.set({left:o,top:s,originX:i,originY:n}),e.setCoords()}(e,{originX:n,originY:r}),function(e){var t=$i(X(e.getObjects(),1)[0],"fillImageMaxSize").fillImageMaxSize;t=Math.max(1,t),e.setDimensions({width:t,height:t}),e.renderAll()}(t)}}},{key:"_fillFilterRePositionInGroupSelection",value:function(e,t){1===t.scaleX&&1===t.scaleY||t.addWithUpdate();var i=e.angle,n=e.left,r=e.top;N.fabric.util.addTransformToObject(e,t.calcTransformMatrix()),this._resetPositionFillFilter(e),e.set({angle:i,left:n,top:r})}}]),i}(ho);function Cs(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Ss={left:0,top:0,width:0,height:0,stroke:"#000000",strokeWidth:0,fill:"#000000",opacity:.4,evented:!1,selectable:!1,hoverCursor:"auto"},Es=.0045,Ts=.003,As=.003,Is=.0066,Ms=.0044,Ps=.003,Ds=mt,Os=rt,Ls=et,Rs=Qe,Bs=bt,Ns=yt,js=gt,Fs=vt,zs=function(e){En(i,e);var t=Cs(i);function i(e){var n,r,o,s,a,l,c,u,h,d,f,p,m;E(this,i),(m=t.call(this,Se.ZOOM,e)).zoomArea=null,m._startPoint=null,m._centerPoints=[],m.zoomLevel=1,m.zoomMode=Wt,m._listeners={startZoom:M()(n=m._onMouseDownWithZoomMode).call(n,In(m)),moveZoom:M()(r=m._onMouseMoveWithZoomMode).call(r,In(m)),stopZoom:M()(o=m._onMouseUpWithZoomMode).call(o,In(m)),startHand:M()(s=m._onMouseDownWithHandMode).call(s,In(m)),moveHand:M()(a=m._onMouseMoveWithHandMode).call(a,In(m)),stopHand:M()(l=m._onMouseUpWithHandMode).call(l,In(m)),zoomChanged:M()(c=m._changeScrollState).call(c,In(m)),keydown:M()(u=m._startHandModeWithSpaceBar).call(u,In(m)),keyup:M()(h=m._endHandModeWithSpaceBar).call(h,In(m))};var g=m.getCanvas();return m.aspectRatio=g.width/g.height,m._verticalScroll=new N.fabric.Rect(Ss),m._horizontalScroll=new N.fabric.Rect(Ss),g.on(Ds,m._listeners.zoomChanged),m.graphics.on(Os,M()(d=m._startTextEditingHandler).call(d,In(m))),m.graphics.on(Ls,M()(f=m._startTextEditingHandler).call(f,In(m))),m.graphics.on(Rs,M()(p=m._stopTextEditingHandler).call(p,In(m))),m}return A(i,[{key:"attachKeyboardZoomEvents",value:function(){N.fabric.util.addListener(document,Bs,this._listeners.keydown),N.fabric.util.addListener(document,Ns,this._listeners.keyup)}},{key:"detachKeyboardZoomEvents",value:function(){N.fabric.util.removeListener(document,Bs,this._listeners.keydown),N.fabric.util.removeListener(document,Ns,this._listeners.keyup)}},{key:"_startTextEditingHandler",value:function(){this.isTextEditing=!0}},{key:"_stopTextEditingHandler",value:function(){this.isTextEditing=!1}},{key:"_startHandModeWithSpaceBar",value:function(e){this.withSpace||this.isTextEditing||e.keyCode===ii&&(this.withSpace=!0,this.startHandMode())}},{key:"_endHandModeWithSpaceBar",value:function(e){e.keyCode===ii&&(this.withSpace=!1,this.endHandMode())}},{key:"startZoomInMode",value:function(){if(!this.zoomArea){this.endHandMode(),this.zoomMode=$t;var e=this.getCanvas();this._changeObjectsEventedState(!1),this.zoomArea=new N.fabric.Rect({left:0,top:0,width:.5,height:.5,stroke:"black",strokeWidth:1,fill:"transparent",hoverCursor:"zoom-in"}),e.discardActiveObject(),e.add(this.zoomArea),e.on("mouse:down",this._listeners.startZoom),e.selection=!1,e.defaultCursor="zoom-in"}}},{key:"endZoomInMode",value:function(){this.zoomMode=Wt;var e=this.getCanvas(),t=this._listeners,i=t.startZoom,n=t.moveZoom,r=t.stopZoom;e.selection=!0,e.defaultCursor="auto",e.off({"mouse:down":i,"mouse:move":n,"mouse:up":r}),this._changeObjectsEventedState(!0),e.remove(this.zoomArea),this.zoomArea=null}},{key:"start",value:function(){this.zoomArea=null,this._startPoint=null,this._startHandPoint=null}},{key:"end",value:function(){this.endZoomInMode(),this.endHandMode()}},{key:"startHandMode",value:function(){this.endZoomInMode(),this.zoomMode=Gt;var e=this.getCanvas();this._changeObjectsEventedState(!1),e.discardActiveObject(),e.off("mouse:down",this._listeners.startHand),e.on("mouse:down",this._listeners.startHand),e.selection=!1,e.defaultCursor="grab",e.fire(js)}},{key:"endHandMode",value:function(){this.zoomMode=Wt;var e=this.getCanvas();this._changeObjectsEventedState(!0),e.off("mouse:down",this._listeners.startHand),e.selection=!0,e.defaultCursor="auto",this._startHandPoint=null,e.fire(Fs)}},{key:"_onMouseDownWithZoomMode",value:function(e){var t=e.target,i=e.e;if(!t){var n=this.getCanvas();n.selection=!1,this._startPoint=n.getPointer(i),this.zoomArea.set({width:0,height:0});var r=this._listeners,o=r.moveZoom,s=r.stopZoom;n.on({"mouse:move":o,"mouse:up":s})}}},{key:"_onMouseMoveWithZoomMode",value:function(e){var t=e.e,i=this.getCanvas(),n=i.getPointer(t),r=n.x,o=n.y,s=this.zoomArea,a=this._startPoint;Math.abs(r-a.x)+Math.abs(o-a.y)>10&&(i.remove(s),s.set(this._calcRectDimensionFromPoint(r,o)),i.add(s))}},{key:"_calcRectDimensionFromPoint",value:function(e,t){var i=this.getCanvas(),n=i.getWidth(),r=i.getHeight(),o=this._startPoint,s=o.x,a=o.y,l=Math.min,c=l(s,e),u=l(a,t);return{left:c,top:u,width:Ri(e,s,n)-c,height:Ri(t,a,r)-u}}},{key:"_onMouseUpWithZoomMode",value:function(){var e=this.zoomLevel,t=this.zoomArea,i=this._listeners,n=i.moveZoom,r=i.stopZoom,o=this.getCanvas(),s=this._getCenterPoint(),a=s.x,l=s.y;this._isMaxZoomLevel()||(this._centerPoints.push({x:a,y:l,prevZoomLevel:e,zoomLevel:e+1}),e+=1,o.zoomToPoint({x:a,y:l},e),this._fireZoomChanged(o,e),this.zoomLevel=e),o.off({"mouse:move":n,"mouse:up":r}),o.remove(t),this._startPoint=null}},{key:"_getCenterPoint",value:function(){var e=this.zoomArea,t=e.left,i=e.top,n=e.width,r=e.height,o=this._startPoint,s=o.x,a=o.y,l=this.aspectRatio;return n<10&&r<10?{x:s,y:a}:n>r?{x:t+l*r/2,y:i+r/2}:{x:t+n/2,y:i+n/l/2}}},{key:"zoom",value:function(e){for(var t=e.x,i=e.y,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.zoomLevel,r=this.getCanvas(),o=this._centerPoints,s=o.length-1;s>=0&&!(o[s].zoomLevel<n);s-=1){var a=o.pop(),l=a.x,c=a.y,u=a.prevZoomLevel;r.zoomToPoint({x:l,y:c},u),this.zoomLevel=u}r.zoomToPoint({x:t,y:i},n),this._isDefaultZoomLevel(n)||this._centerPoints.push({x:t,y:i,zoomLevel:n,prevZoomLevel:this.zoomLevel}),this.zoomLevel=n,this._fireZoomChanged(r,n)}},{key:"zoomOut",value:function(){var e=this._centerPoints;if(e.length){var t=this.getCanvas(),i=e.pop(),n=i.x,r=i.y,o=i.prevZoomLevel;this._isDefaultZoomLevel(o)?t.setViewportTransform([1,0,0,1,0,0]):t.zoomToPoint({x:n,y:r},o),this.zoomLevel=o,this._fireZoomChanged(t,this.zoomLevel)}}},{key:"resetZoom",value:function(){var e=this.getCanvas();e.setViewportTransform([1,0,0,1,0,0]),this.zoomLevel=1,this._centerPoints=[],this._fireZoomChanged(e,this.zoomLevel)}},{key:"_isMaxZoomLevel",value:function(){return this.zoomLevel>=5}},{key:"_movePointOfZoom",value:function(e){var t=e.x,i=e.y,n=this._centerPoints;if(n.length){var r=this.getCanvas(),o=this.zoomLevel,s=n.pop(),a=s.x,l=s.y,c=s.prevZoomLevel,u=a-t,h=l-i;r.zoomToPoint({x:a,y:l},c),r.zoomToPoint({x:u,y:h},o),n.push({x:u,y:h,prevZoomLevel:c,zoomLevel:o}),this._fireZoomChanged(r,o)}}},{key:"_onMouseDownWithHandMode",value:function(e){var t=e.target,i=e.e;if(!t){var n=this.getCanvas();if(!(this.zoomLevel<=1)){n.selection=!1,this._startHandPoint=n.getPointer(i);var r=this._listeners,o=r.moveHand,s=r.stopHand;n.on({"mouse:move":o,"mouse:up":s})}}}},{key:"_onMouseMoveWithHandMode",value:function(e){var t=e.e,i=this.getCanvas().getPointer(t),n=i.x,r=i.y,o=n-this._startHandPoint.x,s=r-this._startHandPoint.y;this._movePointOfZoom({x:o,y:s})}},{key:"_onMouseUpWithHandMode",value:function(){var e=this.getCanvas(),t=this._listeners,i=t.moveHand,n=t.stopHand;e.off({"mouse:move":i,"mouse:up":n}),this._startHandPoint=null}},{key:"_changeScrollState",value:function(e){var t=e.viewport,i=e.zoomLevel,n=this.getCanvas();if(n.remove(this._verticalScroll),n.remove(this._horizontalScroll),!this._isDefaultZoomLevel(i)){var r=n.width,o=n.height,s=t.tl,a=t.tr,l=t.bl,c=a.x-s.x,u=l.y-s.y,h=c*c/r,d=u*Is,f=Ri(s.x+s.x/r*c,s.x,a.x-h),p=u*Ms,m=u*Ps;this._horizontalScroll.set({left:f,top:l.y-d-p,width:h,height:d,rx:m,ry:m});var g=c*Es,v=u*u/o,b=Ri(s.y+s.y/o*u,a.y,l.y-v),y=c*Ts,w=c*As;this._verticalScroll.set({left:a.x-g-y,top:b,width:g,height:v,rx:w,ry:w}),this._addScrollBar()}}},{key:"_changeObjectsEventedState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.getCanvas().forEachObject(function(t){t.evented=e})}},{key:"_addScrollBar",value:function(){var e=this,t=this.getCanvas();t.add(this._horizontalScroll),t.add(this._verticalScroll),this.scrollBarTid&&clearTimeout(this.scrollBarTid),this.scrollBarTid=m()(function(){t.remove(e._horizontalScroll),t.remove(e._verticalScroll)},3e3)}},{key:"_isDefaultZoomLevel",value:function(e){return 1===e}},{key:"_fireZoomChanged",value:function(e,t){e.fire(Ds,{viewport:e.calcViewportBoundaries(),zoomLevel:t})}},{key:"mode",get:function(){return this.zoomMode}}]),i}(ho),Vs=zs,Hs=rn.create,Us=rn.types,Ws=function(){function e(t){E(this,e),this.name=t}return A(e,[{key:"getName",value:function(){return this.name}},{key:"start",value:function(){throw new Error(Hs(Us.UN_IMPLEMENTATION,"start"))}},{key:"end",value:function(){throw new Error(Hs(Us.UN_IMPLEMENTATION,"stop"))}}]),e}();function $s(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Gs=function(e){En(i,e);var t=$s(i);function i(){return E(this,i),t.call(this,jt.CROPPER)}return A(i,[{key:"start",value:function(e){e.getComponent(Se.CROPPER).start()}},{key:"end",value:function(e){e.getComponent(Se.CROPPER).end()}}]),i}(Ws),qs=Gs;function Ys(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Zs=function(e){En(i,e);var t=Ys(i);function i(){return E(this,i),t.call(this,jt.FREE_DRAWING)}return A(i,[{key:"start",value:function(e,t){e.getComponent(Se.FREE_DRAWING).start(t)}},{key:"end",value:function(e){e.getComponent(Se.FREE_DRAWING).end()}}]),i}(Ws),Xs=Zs;function Ks(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var Js=function(e){En(i,e);var t=Ks(i);function i(){return E(this,i),t.call(this,jt.LINE_DRAWING)}return A(i,[{key:"start",value:function(e,t){e.getComponent(Se.LINE).start(t)}},{key:"end",value:function(e){e.getComponent(Se.LINE).end()}}]),i}(Ws),Qs=Js;function ea(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var ta=function(e){En(i,e);var t=ea(i);function i(){return E(this,i),t.call(this,jt.SHAPE)}return A(i,[{key:"start",value:function(e){e.getComponent(Se.SHAPE).start()}},{key:"end",value:function(e){e.getComponent(Se.SHAPE).end()}}]),i}(Ws),ia=ta;function na(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var ra=function(e){En(i,e);var t=na(i);function i(){return E(this,i),t.call(this,jt.TEXT)}return A(i,[{key:"start",value:function(e){e.getComponent(Se.TEXT).start()}},{key:"end",value:function(e){e.getComponent(Se.TEXT).end()}}]),i}(Ws),oa=ra;function sa(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var aa=function(e){En(i,e);var t=sa(i);function i(){return E(this,i),t.call(this,jt.ICON)}return A(i,[{key:"start",value:function(e){e.getComponent(Se.ICON).start()}},{key:"end",value:function(e){e.getComponent(Se.ICON).end()}}]),i}(Ws),la=aa;function ca(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var ua=function(e){En(i,e);var t=ca(i);function i(){return E(this,i),t.call(this,jt.ZOOM)}return A(i,[{key:"start",value:function(e){e.getComponent(Se.ZOOM).start()}},{key:"end",value:function(e){e.getComponent(Se.ZOOM).end()}}]),i}(Ws),ha=ua,da=null;function fa(e){da=e}function pa(e,t){var i,n;return i="activeSelection"===e.type?gn()(n=e.getObjects()).call(n,function(i){var n=i.angle,r=i.left,o=i.top,s=i.scaleX,a=i.scaleY,l=i.width,c=i.height;N.fabric.util.addTransformToObject(i,e.calcTransformMatrix());var u=t(i);return i.set({angle:n,left:r,top:o,width:l,height:c,scaleX:s,scaleY:a}),u}):[t(e)],i}function ma(e,t,i){return i?{id:e,width:t.width,height:t.height,top:t.top,left:t.left,angle:t.angle,scaleX:t.scaleX,scaleY:t.scaleY}:F()({id:e},t)}function ga(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var va=function(e){En(i,e);var t=ga(i);function i(e){var n;return E(this,i),(n=t.call(this,Se.RESIZE,e))._dimensions=null,n._originalDimensions=null,n}return A(i,[{key:"getCurrentDimensions",value:function(){var e=this.getCanvasImage();if(!this._dimensions&&e){var t=e.width,i=e.height;this._dimensions={width:t,height:i}}return this._dimensions}},{key:"getOriginalDimensions",value:function(){return this._originalDimensions}},{key:"setOriginalDimensions",value:function(e){this._originalDimensions=e}},{key:"resize",value:function(e){var t=this.getCanvasImage(),i=t.width,n=t.height,r=t.scaleX,o=t.scaleY,s=e.width,a=e.height,l={scaleX:s?s/i:r,scaleY:a?a/n:o};return r===l.scaleX&&o===l.scaleY||(t.set(l).setCoords(),this._dimensions={width:t.width*t.scaleX,height:t.height*t.scaleY}),this.adjustCanvasDimensionBase(),L().resolve()}},{key:"start",value:function(){var e=this.getCurrentDimensions();this.setOriginalDimensions(e)}},{key:"end",value:function(){}}]),i}(ho),ba=va;function ya(e){var t=function(){if("undefined"==typeof Reflect||!kn())return!1;if(kn().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(kn()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=Dn(e);if(t){var r=Dn(this).constructor;i=kn()(n,arguments,r)}else i=n.apply(this,arguments);return Mn(this,i)}}var wa=function(e){En(i,e);var t=ya(i);function i(){return E(this,i),t.call(this,jt.RESIZE)}return A(i,[{key:"start",value:function(e){e.getComponent(Se.RESIZE).start()}},{key:"end",value:function(e){e.getComponent(Se.RESIZE).end()}}]),i}(Ws),_a=wa,ka={cssOnly:!0},xa={backstoreOnly:!0},Ca=function(){function e(t){var i,n,r,o,s,a,l,c,u,h,d,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=f.cssMaxWidth,m=f.cssMaxHeight;E(this,e),this.canvasImage=null,this.cssMaxWidth=p||1e3,this.cssMaxHeight=m||800,this.cropSelectionStyle={},this.targetObjectForCopyPaste=null,this.imageName="",this._objects={},this._canvas=null,this._drawingMode=jt.NORMAL,this._drawingModeMap={},this._componentMap={},this._handler={onMouseDown:M()(i=this._onMouseDown).call(i,this),onObjectAdded:M()(n=this._onObjectAdded).call(n,this),onObjectRemoved:M()(r=this._onObjectRemoved).call(r,this),onObjectMoved:M()(o=this._onObjectMoved).call(o,this),onObjectScaled:M()(s=this._onObjectScaled).call(s,this),onObjectModified:M()(a=this._onObjectModified).call(a,this),onObjectRotated:M()(l=this._onObjectRotated).call(l,this),onObjectSelected:M()(c=this._onObjectSelected).call(c,this),onPathCreated:M()(u=this._onPathCreated).call(u,this),onSelectionCleared:M()(h=this._onSelectionCleared).call(h,this),onSelectionCreated:M()(d=this._onSelectionCreated).call(d,this)},this._setObjectCachingToFalse(),this._setCanvasElement(t),this._createDrawingModeInstances(),this._createComponents(),this._attachCanvasEvents(),this._attachZoomEvents()}return A(e,[{key:"destroy",value:function(){var e=this._canvas.wrapperEl;this._canvas.clear(),e.parentNode.removeChild(e),this._detachZoomEvents()}},{key:"_attachZoomEvents",value:function(){this.getComponent(Se.ZOOM).attachKeyboardZoomEvents()}},{key:"_detachZoomEvents",value:function(){this.getComponent(Se.ZOOM).detachKeyboardZoomEvents()}},{key:"deactivateAll",value:function(){return this._canvas.discardActiveObject(),this}},{key:"renderAll",value:function(){return this._canvas.renderAll(),this}},{key:"add",value:function(e){var t,i=[];ao()(e)?i=e:i.push(e),(t=this._canvas).add.apply(t,x(i))}},{key:"contains",value:function(e){return this._canvas.contains(e)}},{key:"getObjects",value:function(){var e;return h()(e=this._canvas.getObjects()).call(e)}},{key:"getObject",value:function(e){return this._objects[e]}},{key:"remove",value:function(e){this._canvas.remove(e)}},{key:"removeAll",value:function(e){var t,i=this._canvas,n=h()(t=i.getObjects()).call(t);return i.remove.apply(i,x(this._canvas.getObjects())),e&&i.clear(),n}},{key:"removeObjectById",value:function(e){var t=[],i=this._canvas,n=this.getObject(e);return n&&n.isType("group")&&!n.isEmpty()?(i.discardActiveObject(),n.forEachObject(function(e){t.push(e),i.remove(e)})):i.contains(n)&&(t.push(n),i.remove(n)),t}},{key:"getObjectId",value:function(e){var t=null;for(t in this._objects)if(this._objects.hasOwnProperty(t)&&e===this._objects[t])return t;return null}},{key:"getActiveObject",value:function(){return this._canvas._activeObject}},{key:"getActiveObjectIdForRemove",value:function(){var e=this.getActiveObject(),t=e.type,i=e.left,n=e.top;if("activeSelection"===t){var r=new N.fabric.Group(x(e.getObjects()),{left:i,top:n});return this._addFabricObject(r)}return this.getObjectId(e)}},{key:"isReadyRemoveObject",value:function(){var e=this.getActiveObject();return e&&!e.isEditing}},{key:"getActiveObjects",value:function(){var e=this._canvas._activeObject;return e&&"activeSelection"===e.type?e:null}},{key:"getActiveSelectionFromObjects",value:function(e){var t=this.getCanvas();return new N.fabric.ActiveSelection(e,{canvas:t})}},{key:"setActiveObject",value:function(e){this._canvas.setActiveObject(e)}},{key:"setCropSelectionStyle",value:function(e){this.cropSelectionStyle=e}},{key:"getComponent",value:function(e){return this._componentMap[e]}},{key:"getDrawingMode",value:function(){return this._drawingMode}},{key:"startDrawingMode",value:function(e,t){if(this._isSameDrawingMode(e))return!0;this.stopDrawingMode();var i=this._getDrawingModeInstance(e);return i&&i.start&&(i.start(this,t),this._drawingMode=e),!!i}},{key:"stopDrawingMode",value:function(){if(!this._isSameDrawingMode(jt.NORMAL)){var e=this._getDrawingModeInstance(this.getDrawingMode());e&&e.end&&e.end(this),this._drawingMode=jt.NORMAL}}},{key:"zoom",value:function(e,t){var i=e.x,n=e.y,r=this.getComponent(Se.ZOOM);r.zoom({x:i,y:n},t)}},{key:"getZoomMode",value:function(){return this.getComponent(Se.ZOOM).mode}},{key:"startZoomInMode",value:function(){this.getComponent(Se.ZOOM).startZoomInMode()}},{key:"endZoomInMode",value:function(){this.getComponent(Se.ZOOM).endZoomInMode()}},{key:"zoomOut",value:function(){this.getComponent(Se.ZOOM).zoomOut()}},{key:"startHandMode",value:function(){this.getComponent(Se.ZOOM).startHandMode()}},{key:"endHandMode",value:function(){this.getComponent(Se.ZOOM).endHandMode()}},{key:"resetZoom",value:function(){this.getComponent(Se.ZOOM).resetZoom()}},{key:"toDataURL",value:function(e){var t=this.getComponent(Se.CROPPER);t.changeVisibility(!1);var i=this._canvas&&this._canvas.toDataURL(e);return t.changeVisibility(!0),i}},{key:"setCanvasImage",value:function(e,t){t&&Oi(t),this.imageName=e,this.canvasImage=t}},{key:"setCssMaxDimension",value:function(e){this.cssMaxWidth=e.width||this.cssMaxWidth,this.cssMaxHeight=e.height||this.cssMaxHeight}},{key:"adjustCanvasDimension",value:function(){this.adjustCanvasDimensionBase(this.canvasImage.scale(1))}},{key:"adjustCanvasDimensionBase",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e||(e=this.canvasImage);var t=e.getBoundingRect(),i=t.width,n=t.height,r=this._calcMaxDimension(i,n);this.setCanvasCssDimension({width:"100%",height:"100%","max-width":"".concat(r.width,"px"),"max-height":"".concat(r.height,"px")}),this.setCanvasBackstoreDimension({width:i,height:n}),this._canvas.centerObject(e)}},{key:"setCanvasCssDimension",value:function(e){this._canvas.setDimensions(e,ka)}},{key:"setCanvasBackstoreDimension",value:function(e){this._canvas.setDimensions(e,xa)}},{key:"setImageProperties",value:function(e,t){var i=this.canvasImage;i&&(i.set(e).setCoords(),t&&this._canvas.renderAll())}},{key:"getCanvasElement",value:function(){return this._canvas.getElement()}},{key:"getCanvas",value:function(){return this._canvas}},{key:"getCanvasImage",value:function(){return this.canvasImage}},{key:"getImageName",value:function(){return this.imageName}},{key:"addImageObject",value:function(e){var t,i=this,n=M()(t=this._callbackAfterLoadingImageObject).call(t,this);return new(L())(function(t){N.fabric.Image.fromURL(e,function(e){n(e),t(i.createObjectProperties(e))},{crossOrigin:"Anonymous"})})}},{key:"getCenter",value:function(){return this._canvas.getCenter()}},{key:"getCropzoneRect",value:function(){return this.getComponent(Se.CROPPER).getCropzoneRect()}},{key:"setCropzoneRect",value:function(e){this.getComponent(Se.CROPPER).setCropzoneRect(e)}},{key:"getCroppedImageData",value:function(e){return this.getComponent(Se.CROPPER).getCroppedImageData(e)}},{key:"setBrush",value:function(e){var t=this._drawingMode,i=Se.FREE_DRAWING;t===jt.LINE_DRAWING&&(i=Se.LINE),this.getComponent(i).setBrush(e)}},{key:"setDrawingShape",value:function(e,t){this.getComponent(Se.SHAPE).setStates(e,t)}},{key:"setIconStyle",value:function(e,t){this.getComponent(Se.ICON).setStates(e,t)}},{key:"registerPaths",value:function(e){this.getComponent(Se.ICON).registerPaths(e)}},{key:"changeCursor",value:function(e){var t=this.getCanvas();t.defaultCursor=e,t.renderAll()}},{key:"hasFilter",value:function(e){return this.getComponent(Se.FILTER).hasFilter(e)}},{key:"setSelectionStyle",value:function(e){F()(oi,e)}},{key:"setObjectProperties",value:function(e,t){var i=this.getObject(e),n=F()({},t);return i.set(n),i.setCoords(),this.getCanvas().renderAll(),n}},{key:"getObjectProperties",value:function(e,t){var i=this.getObject(e),n={};return q()(t)?n[t]=i[t]:ao()(t)?Ln()(t,function(e){n[e]=i[e]}):co()(t,function(e,t){n[t]=i[t]}),n}},{key:"getObjectPosition",value:function(e,t,i){var n=this.getObject(e);return n?n.getPointByOrigin(t,i):null}},{key:"setObjectPosition",value:function(e,t){var i=this.getObject(e),n=t.x,r=t.y,o=t.originX,s=t.originY;if(!i)return!1;var a=i.getPointByOrigin(o,s),l=i.getPointByOrigin("center","center"),c=l.x-a.x,u=l.y-a.y;return i.set({left:n+c,top:r+u}),i.setCoords(),!0}},{key:"getCanvasSize",value:function(){var e=this.getCanvasImage();return{width:e?e.width:0,height:e?e.height:0}}},{key:"createStaticCanvas",value:function(){var e=new N.fabric.StaticCanvas;return e.set({enableRetinaScaling:!1}),e}},{key:"_getDrawingModeInstance",value:function(e){return this._drawingModeMap[e]}},{key:"_setObjectCachingToFalse",value:function(){N.fabric.Object.prototype.objectCaching=!1}},{key:"_setCanvasElement",value:function(e){var t,i;"CANVAS"!==(t=e.nodeType?e:document.querySelector(e)).nodeName.toUpperCase()&&(i=document.createElement("canvas"),t.appendChild(i)),this._canvas=new N.fabric.Canvas(i,{containerClass:"tui-image-editor-canvas-container",enableRetinaScaling:!1})}},{key:"_createDrawingModeInstances",value:function(){this._register(this._drawingModeMap,new qs),this._register(this._drawingModeMap,new Xs),this._register(this._drawingModeMap,new Qs),this._register(this._drawingModeMap,new ia),this._register(this._drawingModeMap,new oa),this._register(this._drawingModeMap,new la),this._register(this._drawingModeMap,new ha),this._register(this._drawingModeMap,new _a)}},{key:"_createComponents",value:function(){this._register(this._componentMap,new go(this)),this._register(this._componentMap,new So(this)),this._register(this._componentMap,new Ao(this)),this._register(this._componentMap,new Po(this)),this._register(this._componentMap,new Lo(this)),this._register(this._componentMap,new Fo(this)),this._register(this._componentMap,new Wo(this)),this._register(this._componentMap,new Yo(this)),this._register(this._componentMap,new ss(this)),this._register(this._componentMap,new xs(this)),this._register(this._componentMap,new Vs(this)),this._register(this._componentMap,new ba(this))}},{key:"_register",value:function(e,t){e[t.getName()]=t}},{key:"_isSameDrawingMode",value:function(e){return this.getDrawingMode()===e}},{key:"_calcMaxDimension",value:function(e,t){var i=this.cssMaxWidth/e,n=this.cssMaxHeight/t,r=Math.min(e,this.cssMaxWidth),o=Math.min(t,this.cssMaxHeight);return i<1&&i<n?(r=e*i,o=t*i):n<1&&n<i&&(r=e*n,o=t*n),{width:Math.floor(r),height:Math.floor(o)}}},{key:"_callbackAfterLoadingImageObject",value:function(e){var t=this.getCanvasImage().getCenterPoint();e.set(oi),e.set({left:t.x,top:t.y,crossOrigin:"Anonymous"}),this.getCanvas().add(e).setActiveObject(e)}},{key:"_attachCanvasEvents",value:function(){var e=this._canvas,t=this._handler;e.on({"mouse:down":t.onMouseDown,"object:added":t.onObjectAdded,"object:removed":t.onObjectRemoved,"object:moving":t.onObjectMoved,"object:scaling":t.onObjectScaled,"object:modified":t.onObjectModified,"object:rotating":t.onObjectRotated,"path:created":t.onPathCreated,"selection:cleared":t.onSelectionCleared,"selection:created":t.onSelectionCreated,"selection:updated":t.onObjectSelected})}},{key:"_onMouseDown",value:function(e){var t=this,i=e.e,n=e.target,r=this._canvas.getPointer(i);if(n){var o=n.type;fa(pa(n,function(e){return ma(t.getObjectId(e),e,"activeSelection"===o)}))}this.fire(at,i,r)}},{key:"_onObjectAdded",value:function(e){var t=e.target;t.isType("cropzone")||this._addFabricObject(t)}},{key:"_onObjectRemoved",value:function(e){var t=e.target;this._removeFabricObject(Oi(t))}},{key:"_onObjectMoved",value:function(e){var t=this;this._lazyFire(Ze,function(e){return t.createObjectProperties(e)},e.target)}},{key:"_onObjectScaled",value:function(e){var t=this;this._lazyFire(Xe,function(e){return t.createObjectProperties(e)},e.target)}},{key:"_onObjectModified",value:function(e){var t=e.target;if("activeSelection"===t.type){var i=t.getObjects();te()(i).call(i,function(e){return e.fire("modifiedInGroup",t)})}this.fire(Qe,t,this.getObjectId(t))}},{key:"_onObjectRotated",value:function(e){var t=this;this._lazyFire(Ke,function(e){return t.createObjectProperties(e)},e.target)}},{key:"_lazyFire",value:function(e,t,i){var n=this,r=i&&i.canvasEventDelegation?i.canvasEventDelegation(e):"none";"unregistered"===r&&i.canvasEventRegister(e,function(i){n.fire(e,t(i))}),"none"===r&&this.fire(e,t(i))}},{key:"_onObjectSelected",value:function(e){var t=e.target,i=this.createObjectProperties(t);this.fire(Ye,i)}},{key:"_onPathCreated",value:function(e){var t=e.path.getCenterPoint(),i=t.x,n=t.y;e.path.set(F()({left:i,top:n},oi));var r=this.createObjectProperties(e.path);this.fire(ot,r)}},{key:"_onSelectionCleared",value:function(){this.fire(ut)}},{key:"_onSelectionCreated",value:function(e){var t=e.target,i=this.createObjectProperties(t);this.fire(Ye,i),this.fire(ht,e.target)}},{key:"discardSelection",value:function(){this._canvas.discardActiveObject(),this._canvas.renderAll()}},{key:"changeSelectableAll",value:function(e){this._canvas.forEachObject(function(t){t.selectable=e,t.hoverCursor=e?"move":"crosshair"})}},{key:"createObjectProperties",value:function(e){var t={id:Oi(e),type:e.type};if(F()(t,Ni(e,["left","top","width","height","fill","stroke","strokeWidth","opacity","angle"])),Gi(["i-text","text"],e.type))F()(t,this._createTextProperties(e,t));else if(Gi(["rect","triangle","circle"],e.type)){var i=this.getComponent(Se.SHAPE);F()(t,{fill:i.makeFillPropertyForUserEvent(e)})}return t}},{key:"_createTextProperties",value:function(e){var t={};return F()(t,Ni(e,["text","fontFamily","fontSize","fontStyle","textAlign","textDecoration","fontWeight"])),t}},{key:"_addFabricObject",value:function(e){var t=Oi(e);return this._objects[t]=e,t}},{key:"_removeFabricObject",value:function(e){delete this._objects[e]}},{key:"resetTargetObjectForCopyPaste",value:function(){var e=this.getActiveObject();e&&(this.targetObjectForCopyPaste=e)}},{key:"pasteObject",value:function(){var e=this;if(!this.targetObjectForCopyPaste)return L().resolve([]);var t=this.targetObjectForCopyPaste,i="activeSelection"===t.type?t.getObjects():[t],n=null;return this.discardSelection(),this._cloneObject(i).then(function(t){if(t.length>1)n=e.getActiveSelectionFromObjects(t);else{var i=X(t,1);n=i[0]}e.targetObjectForCopyPaste=n,e.setActiveObject(n)})}},{key:"_cloneObject",value:function(e){var t=this,i=gn()(e).call(e,function(e){return t._cloneObjectItem(e)});return L().all(i)}},{key:"_cloneObjectItem",value:function(e){var t=this;return this._copyFabricObjectForPaste(e).then(function(e){var i=t.createObjectProperties(e);return t.add(e),t.fire(ot,i),e})}},{key:"_copyFabricObjectForPaste",value:function(e){var t=this,i=function(e,t){return t?e-10:e+10};return this._copyFabricObject(e).then(function(e){var n=e.left,r=e.top,o=e.width,s=e.height,a=t.getCanvasSize(),l=a.width,c=a.height,u=n+o/2,h=r+s/2;return e.set(F()({left:i(n,u+10>l),top:i(r,h+10>c)},oi)),e})}},{key:"_copyFabricObject",value:function(e){var t=this;return new(L())(function(i){e.clone(function(n){var r=t.getComponent(Se.SHAPE);Zi(n)&&r.processForCopiedObject(n,e),i(n)})})}},{key:"getCurrentDimensions",value:function(){return this.getComponent(Se.RESIZE).getCurrentDimensions()}},{key:"getOriginalDimensions",value:function(){return this.getComponent(Se.RESIZE).getOriginalDimensions()}},{key:"setOriginalDimensions",value:function(e){this.getComponent(Se.RESIZE).setOriginalDimensions(e)}},{key:"resize",value:function(e){var t=this.getComponent(Se.RESIZE);return t.resize(e)}}]),e}();$().mixin(Ca);var Sa=Ca,Ea=at,Ta=Ze,Aa=Xe,Ia=Ye,Ma=Ke,Pa=Je,Da=Qe,Oa=rt,La=ot,Ra=et,Ba=tt,Na=it,ja=nt,Fa=ut,za=ht,Va=st,Ha=function(){function e(t,i){var n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b;if(E(this,e),i=F()({includeUI:!1,usageStatistics:!0},i),this.mode=null,this.activeObjectId=null,i.includeUI){var y=i.includeUI;y.usageStatistics=i.usageStatistics,this.ui=new to(t,y,this.getActions()),i=this.ui.setUiDefaultSelectionStyle(i)}this._invoker=new dn,this._graphics=new Sa(this.ui?this.ui.getEditorArea():t,{cssMaxWidth:i.cssMaxWidth,cssMaxHeight:i.cssMaxHeight}),this._handlers={keydown:M()(n=this._onKeyDown).call(n,this),mousedown:M()(r=this._onMouseDown).call(r,this),objectActivated:M()(o=this._onObjectActivated).call(o,this),objectMoved:M()(s=this._onObjectMoved).call(s,this),objectScaled:M()(a=this._onObjectScaled).call(a,this),objectRotated:M()(l=this._onObjectRotated).call(l,this),objectAdded:M()(c=this._onObjectAdded).call(c,this),objectModified:M()(u=this._onObjectModified).call(u,this),createdPath:this._onCreatedPath,addText:M()(h=this._onAddText).call(h,this),addObject:M()(d=this._onAddObject).call(d,this),textEditing:M()(f=this._onTextEditing).call(f,this),textChanged:M()(p=this._onTextChanged).call(p,this),iconCreateResize:M()(m=this._onIconCreateResize).call(m,this),iconCreateEnd:M()(g=this._onIconCreateEnd).call(g,this),selectionCleared:M()(v=this._selectionCleared).call(v,this),selectionCreated:M()(b=this._selectionCreated).call(b,this)},this._attachInvokerEvents(),this._attachGraphicsEvents(),this._attachDomEvents(),this._setSelectionStyle(i.selectionStyle,{applyCropSelectionStyle:i.applyCropSelectionStyle,applyGroupSelectionStyle:i.applyGroupSelectionStyle}),i.usageStatistics&&(Pi||(Pi=!0,oe()("image-editor","UA-129999381-1"))),this.ui&&(this.ui.initCanvas(),this.setReAction(),this._attachColorPickerInputBoxEvents()),N.fabric.enableGLFiltering=!1}return A(e,[{key:"_attachColorPickerInputBoxEvents",value:function(){var e=this;this.ui.on(wt,function(){e.isColorPickerInputBoxEditing=!0}),this.ui.on(_t,function(){e.isColorPickerInputBoxEditing=!1})}},{key:"_detachColorPickerInputBoxEvents",value:function(){this.ui.off(wt),this.ui.off(_t)}},{key:"_setSelectionStyle",value:function(e,t){var i=t.applyCropSelectionStyle,n=t.applyGroupSelectionStyle;e&&this._graphics.setSelectionStyle(e),i&&this._graphics.setCropSelectionStyle(e),n&&this.on("selectionCreated",function(t){"activeSelection"===t.type&&t.set(e)})}},{key:"_attachInvokerEvents",value:function(){var e,t,i=this,n=ct,r=lt,o=dt,s=ft,a=pt,l=gt,c=vt;if(this._invoker.on(n,M()(e=this.fire).call(e,this,n)),this._invoker.on(r,M()(t=this.fire).call(t,this,r)),this.ui){var u=this._graphics.getCanvas();this._invoker.on(o,function(e){return i.ui.fire(o,e)}),this._invoker.on(s,function(e){return i.ui.fire(s,e)}),this._invoker.on(a,function(e){return i.ui.fire(a,e)}),u.on(l,function(){return i.ui.fire(l)}),u.on(c,function(){return i.ui.fire(c)})}}},{key:"_attachGraphicsEvents",value:function(){var e;this._graphics.on((S(e={},Ea,this._handlers.mousedown),S(e,Ta,this._handlers.objectMoved),S(e,Aa,this._handlers.objectScaled),S(e,Ma,this._handlers.objectRotated),S(e,Ia,this._handlers.objectActivated),S(e,Pa,this._handlers.objectAdded),S(e,Da,this._handlers.objectModified),S(e,Oa,this._handlers.addText),S(e,La,this._handlers.addObject),S(e,Ra,this._handlers.textEditing),S(e,Ba,this._handlers.textChanged),S(e,Na,this._handlers.iconCreateResize),S(e,ja,this._handlers.iconCreateEnd),S(e,Fa,this._handlers.selectionCleared),S(e,za,this._handlers.selectionCreated),e))}},{key:"_attachDomEvents",value:function(){document.addEventListener("keydown",this._handlers.keydown)}},{key:"_detachDomEvents",value:function(){document.removeEventListener("keydown",this._handlers.keydown)}},{key:"_onKeyDown",value:function(e){var t=e.ctrlKey,i=e.keyCode,n=e.metaKey;(t||n)&&(i===Zt?this._graphics.resetTargetObjectForCopyPaste():i===Xt?(this._graphics.pasteObject(),this.clearRedoStack()):i===qt?this.undo().catch(function(){}):i===Yt&&this.redo().catch(function(){}));var r=i===Jt||i===Qt,o=this._graphics.isReadyRemoveObject();!this.isColorPickerInputBoxEditing&&o&&r&&(e.preventDefault(),this.removeActiveObject())}},{key:"removeActiveObject",value:function(){var e=this._graphics.getActiveObjectIdForRemove();this.removeObject(e)}},{key:"_onMouseDown",value:function(e,t){this.fire(at,e,t)}},{key:"_pushAddObjectCommand",value:function(e){var t=un.create(Pe,this._graphics,e);this._invoker.pushUndoStack(t)}},{key:"_pushModifyObjectCommand",value:function(e){var t=this,i=e.type,n=pa(e,function(e){return ma(t._graphics.getObjectId(e),e,"activeSelection"===i)}),r=un.create(Ge,this._graphics,n);r.execute(this._graphics,n),this._invoker.pushUndoStack(r)}},{key:"_onObjectActivated",value:function(e){this.fire(Ye,e)}},{key:"_onObjectMoved",value:function(e){this.fire(Ze,e)}},{key:"_onObjectScaled",value:function(e){this.fire(Xe,e)}},{key:"_onObjectRotated",value:function(e){this.fire(Ke,e)}},{key:"getDrawingMode",value:function(){return this._graphics.getDrawingMode()}},{key:"clearObjects",value:function(){return this.execute(Te)}},{key:"deactivateAll",value:function(){this._graphics.deactivateAll(),this._graphics.renderAll()}},{key:"discardSelection",value:function(){this._graphics.discardSelection()}},{key:"changeSelectableAll",value:function(e){this._graphics.changeSelectableAll(e)}},{key:"_initHistory",value:function(){this.ui&&this.ui.initHistory()}},{key:"_clearHistory",value:function(){this.ui&&this.ui.clearHistory()}},{key:"execute",value:function(e){for(var t,i,n,r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];var a=D()(t=[this._graphics]).call(t,o);return(i=this._invoker).execute.apply(i,D()(n=[e]).call(n,x(a)))}},{key:"executeSilent",value:function(e){for(var t,i,n,r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];var a=D()(t=[this._graphics]).call(t,o);return(i=this._invoker).executeSilent.apply(i,D()(n=[e]).call(n,x(a)))}},{key:"undo",value:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=L().resolve(),n=0;n<t;n+=1)i=i.then(function(){return e._invoker.undo()});return i}},{key:"redo",value:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=L().resolve(),n=0;n<t;n+=1)i=i.then(function(){return e._invoker.redo()});return i}},{key:"zoom",value:function(e){var t=e.x,i=e.y,n=e.zoomLevel;this._graphics.zoom({x:t,y:i},n)}},{key:"resetZoom",value:function(){this._graphics.resetZoom()}},{key:"loadImageFromFile",value:function(e,t){if(!e)return L().reject(li);var i=B().createObjectURL(e);return t=t||e.name,this.loadImageFromURL(i,t).then(function(t){return B().revokeObjectURL(e),t})}},{key:"loadImageFromURL",value:function(e,t){return t&&e?this.execute(Ae,t,e):L().reject(li)}},{key:"addImageObject",value:function(e){return e?this.execute(He,e):L().reject(li)}},{key:"startDrawingMode",value:function(e,t){return this._graphics.startDrawingMode(e,t)}},{key:"stopDrawingMode",value:function(){this._graphics.stopDrawingMode()}},{key:"crop",value:function(e){var t=this._graphics.getCroppedImageData(e);return t?this.loadImageFromURL(t.url,t.imageName):L().reject(li)}},{key:"getCropzoneRect",value:function(){return this._graphics.getCropzoneRect()}},{key:"setCropzoneRect",value:function(e){this._graphics.setCropzoneRect(e)}},{key:"_flip",value:function(e){return this.execute(Ie,e)}},{key:"flipX",value:function(){return this._flip("flipX")}},{key:"flipY",value:function(){return this._flip("flipY")}},{key:"resetFlip",value:function(){return this._flip("reset")}},{key:"_rotate",value:function(e,t,i){return i?this.executeSilent(Me,e,t):this.execute(Me,e,t)}},{key:"rotate",value:function(e,t){return this._rotate("rotate",e,t)}},{key:"setAngle",value:function(e,t){return this._rotate("setAngle",e,t)}},{key:"setBrush",value:function(e){this._graphics.setBrush(e)}},{key:"setDrawingShape",value:function(e,t){this._graphics.setDrawingShape(e,t)}},{key:"setDrawingIcon",value:function(e,t){this._graphics.setIconStyle(e,t)}},{key:"addShape",value:function(e,t){return t=t||{},this._setPositions(t),this.execute(Ne,e,t)}},{key:"changeShape",value:function(e,t,i){return this[i?"executeSilent":"execute"](je,e,t)}},{key:"addText",value:function(e,t){return e=e||"",t=t||{},this.execute(Fe,e,t)}},{key:"changeText",value:function(e,t){return t=t||"",this.execute(ze,e,t)}},{key:"changeTextStyle",value:function(e,t,i){return this[i?"executeSilent":"execute"](Ve,e,t)}},{key:"_changeActivateMode",value:function(e){"ICON"!==e&&this.getDrawingMode()!==e&&this.startDrawingMode(e)}},{key:"_onTextChanged",value:function(e){this.fire(tt,e)}},{key:"_onIconCreateResize",value:function(e){this.fire(it,e)}},{key:"_onIconCreateEnd",value:function(e){this.fire(nt,e)}},{key:"_onTextEditing",value:function(){this.fire(et)}},{key:"_onAddText",value:function(e){this.fire(rt,{originPosition:e.originPosition,clientPosition:e.clientPosition})}},{key:"_onAddObject",value:function(e){var t=this._graphics.getObject(e.id);
85this._invoker.fire(dt,Xi(t.type)),this._pushAddObjectCommand(t)}},{key:"_onObjectAdded",value:function(e){this.fire(Pa,e),this.fire(Va,e)}},{key:"_onObjectModified",value:function(e){e.type!==ve&&(this._invoker.fire(dt,Xi(e.type)),this._pushModifyObjectCommand(e))}},{key:"_selectionCleared",value:function(){this.fire(Fa)}},{key:"_selectionCreated",value:function(e){this.fire(za,e)}},{key:"registerIcons",value:function(e){this._graphics.registerPaths(e)}},{key:"changeCursor",value:function(e){this._graphics.changeCursor(e)}},{key:"addIcon",value:function(e,t){return t=t||{},this._setPositions(t),this.execute(Re,e,t)}},{key:"changeIconColor",value:function(e,t){return this.execute(Be,e,t)}},{key:"removeObject",value:function(e){var t=this._graphics.getObject(e).type;return this.execute(De,e,Xi(t))}},{key:"hasFilter",value:function(e){return this._graphics.hasFilter(e)}},{key:"removeFilter",value:function(e){return this.execute(Le,e)}},{key:"applyFilter",value:function(e,t,i){return this[i?"executeSilent":"execute"](Oe,e,t)}},{key:"toDataURL",value:function(e){return this._graphics.toDataURL(e)}},{key:"getImageName",value:function(){return this._graphics.getImageName()}},{key:"clearUndoStack",value:function(){this._invoker.clearUndoStack()}},{key:"clearRedoStack",value:function(){this._invoker.clearRedoStack()}},{key:"isEmptyUndoStack",value:function(){return this._invoker.isEmptyUndoStack()}},{key:"isEmptyRedoStack",value:function(){return this._invoker.isEmptyRedoStack()}},{key:"resizeCanvasDimension",value:function(e){return e?this.execute(Ue,e):L().reject(li)}},{key:"destroy",value:function(){var e=this;this.stopDrawingMode(),this._detachDomEvents(),this._graphics.destroy(),this._graphics=null,this.ui&&(this._detachColorPickerInputBoxEvents(),this.ui.destroy()),U()(this,function(t,i){e[i]=null},this)}},{key:"_setPositions",value:function(e){var t=this._graphics.getCenter();V()(e.left)&&(e.left=t.left),V()(e.top)&&(e.top=t.top)}},{key:"setObjectProperties",value:function(e,t){return this.execute(We,e,t)}},{key:"setObjectPropertiesQuietly",value:function(e,t){this._graphics.setObjectProperties(e,t)}},{key:"getObjectProperties",value:function(e,t){return this._graphics.getObject(e)?this._graphics.getObjectProperties(e,t):null}},{key:"getCanvasSize",value:function(){return this._graphics.getCanvasSize()}},{key:"getObjectPosition",value:function(e,t,i){return this._graphics.getObjectPosition(e,t,i)}},{key:"setObjectPosition",value:function(e,t){return this.execute($e,e,t)}},{key:"resize",value:function(e){return this.execute(qe,e)}}]),e}();oo.mixin(Ha),$().mixin(Ha);var Ua=Ha,Wa=Se.ICON,$a={name:Re,execute:function(e,t,i){var n=this;return e.getComponent(Wa).add(t,i).then(function(t){return n.undoData.object=e.getObject(t.id),t})},undo:function(e){return e.remove(this.undoData.object),L().resolve()}};un.register($a);var Ga={name:He,execute:function(e,t){var i=this;return e.addImageObject(t).then(function(t){return i.undoData.object=e.getObject(t.id),t})},undo:function(e){return e.remove(this.undoData.object),L().resolve()}};un.register(Ga);var qa={name:Pe,execute:function(e,t){return new(L())(function(i,n){e.contains(t)?n(si):(e.add(t),i(t))})},undo:function(e,t){return new(L())(function(i,n){e.contains(t)?(e.remove(t),i(t)):n(di)})}};un.register(qa);var Ya=Se.SHAPE,Za={name:Ne,execute:function(e,t,i){var n=this;return e.getComponent(Ya).add(t,i).then(function(t){var i=t.id;return n.undoData.object=e.getObject(i),t})},undo:function(e){return e.remove(this.undoData.object),L().resolve()}};un.register(Za);var Xa=Se.TEXT,Ka={name:Fe,execute:function(e,t,i){var n=this,r=e.getComponent(Xa);if(this.undoData.object){var o=this.undoData.object;return new(L())(function(t,i){e.contains(o)?i(fi):(e.add(o),t(o))})}return r.add(t,i).then(function(t){var i=t.id,r=e.getObject(i);return n.undoData.object=r,fa(pa(r,function(){return ma(i,r,!1)})),t})},undo:function(e){return e.remove(this.undoData.object),L().resolve()}};un.register(Ka);var Ja=Se.FILTER,Qa=null,el={name:Oe,execute:function(e,t,i,n){var r=e.getComponent(Ja);if("mask"===t){var o=e.getObject(i.maskObjId);if(!o||!o.isType("image"))return L().reject(li);F()(i,{mask:o}),e.remove(i.mask)}if(!this.isRedo){var s=function(e,t,i){var n={};return"mask"===e&&(n.object=i.mask),n.options=t,n}(t,r.getOptions(t),i);Qa=this.setUndoData(s,Qa,n)}return r.add(t,i)},undo:function(e,t){var i=e.getComponent(Ja);if("mask"===t){var n=this.undoData.object;return e.add(n),e.setActiveObject(n),i.remove(t)}return this.undoData.options?i.add(t,this.undoData.options):i.remove(t)}};un.register(el);var tl=Se.ICON,il={name:Be,execute:function(e,t,i){var n=this;return new(L())(function(r,o){var s=e.getComponent(tl),a=e.getObject(t);
85a||o(di),n.undoData.object=a,n.undoData.color=s.getColor(a),s.setColor(i,a),r()})},undo:function(e){var t=e.getComponent(tl),i=this.undoData,n=i.object,r=i.color;return t.setColor(r,n),L().resolve()}};un.register(il);var nl=Se.SHAPE,rl=null,ol={name:je,execute:function(e,t,i,n){var r=e.getComponent(nl),o=e.getObject(t);if(!o)return L().reject(di);if(!this.isRedo){var s=function(e,t){var i={object:t,options:{}};return co()(e,function(e,n){i.options[n]=t[n]}),i}(i,o);rl=this.setUndoData(s,rl,n)}return r.change(o,i)},undo:function(e){var t=e.getComponent(nl),i=this.undoData,n=i.object,r=i.options;return t.change(n,r)}};un.register(ol);var sl=Se.TEXT,al={name:ze,execute:function(e,t,i){var n=e.getComponent(sl),r=e.getObject(t);return r?(this.undoData.object=r,this.undoData.text=n.getText(r),n.change(r,i)):L().reject(di)},undo:function(e){var t=e.getComponent(sl),i=this.undoData,n=i.object,r=i.text;return t.change(n,r)}};un.register(al);var ll=Se.TEXT,cl=null,ul={name:Ve,execute:function(e,t,i,n){var r=e.getComponent(ll),o=e.getObject(t);if(!o)return L().reject(di);if(!this.isRedo){var s=function(e,t){var i={object:t,styles:{}};return co()(e,function(e,n){var r=t[n];i.styles[n]=r}),i}(i,o);cl=this.setUndoData(s,cl,n)}return r.setStyle(o,i)},undo:function(e){var t=e.getComponent(ll),i=this.undoData,n=i.object,r=i.styles;return t.setStyle(n,r)}};un.register(ul);var hl={name:Te,execute:function(e){var t=this;return new(L())(function(i){t.undoData.objects=e.removeAll(),i()})},undo:function(e){return e.add(this.undoData.objects),L().resolve()}};un.register(hl);var dl=Se.FLIP,fl={name:Ie,execute:function(e,t){var i=e.getComponent(dl);return this.undoData.setting=i.getCurrentSetting(),i[t]()},undo:function(e){return e.getComponent(dl).set(this.undoData.setting)}};un.register(fl);var pl=Se.IMAGE_LOADER,ml={name:Ae,execute:function(e,t,i){var n,r=e.getComponent(pl),o=r.getCanvasImage(),s=o?o.width:0,a=o?o.height:0,l=no()(n=e.removeAll(!0)).call(n,function(e){return"cropzone"!==e.type});return te()(l).call(l,function(e){e.evented=!0}),this.undoData={name:r.getImageName(),image:o,objects:l},r.load(t,i).then(function(e){return{oldWidth:s,oldHeight:a,newWidth:e.width,newHeight:e.height}})},undo:function(e){var t=e.getComponent(pl),i=this.undoData,n=i.objects,r=i.name,o=i.image;return e.removeAll(!0),e.add(n),t.load(r,o)}};un.register(ml);var gl=Se.FILTER,vl={name:Le,execute:function(e,t){var i=e.getComponent(gl);return this.undoData.options=i.getOptions(t),i.remove(t)},undo:function(e,t){var i=e.getComponent(gl),n=this.undoData.options;return i.add(t,n)}};un.register(vl);var bl={name:De,execute:function(e,t){var i=this;return new(L())(function(n,r){i.undoData.objects=e.removeObjectById(t),i.undoData.objects.length?n():r(di)})},undo:function(e){return e.add(this.undoData.objects),L().resolve()}};un.register(bl);var yl={name:Ue,execute:function(e,t){var i=this;return new(L())(function(n){i.undoData.size={width:e.cssMaxWidth,height:e.cssMaxHeight},e.setCssMaxDimension(t),e.adjustCanvasDimension(),n()})},undo:function(e){return e.setCssMaxDimension(this.undoData.size),e.adjustCanvasDimension(),L().resolve()}};un.register(yl);var wl=Se.ROTATION,_l=null,kl={name:Me,execute:function(e,t,i,n){var r=e.getComponent(wl);if(!this.isRedo){var o=function(e){return{angle:e.getCurrentAngle()}}(r);_l=this.setUndoData(o,_l,n)}return r[t](i)},undo:function(e){var t=e.getComponent(wl),i=X(this.args,3),n=i[1],r=i[2];return"setAngle"===n?t[n](this.undoData.angle):t.rotate(-r)}};un.register(kl);var xl={name:We,execute:function(e,t,i){var n=this,r=e.getObject(t);return r?(this.undoData.props={},co()(i,function(e,t){n.undoData.props[t]=r[t]}),e.setObjectProperties(t,i),L().resolve()):L().reject(di)},undo:function(e,t){var i=this.undoData.props;return e.setObjectProperties(t,i),L().resolve()}};un.register(xl);var Cl={name:$e,execute:function(e,t,i){return e.getObject(t)?(this.undoData.objectId=t,this.undoData.props=e.getObjectProperties(t,["left","top"]),e.setObjectPosition(t,i),e.renderAll(),L().resolve()):L().reject(di)},undo:function(e){var t=this.undoData,i=t.objectId,n=t.props;return e.setObjectProperties(i,n),e.renderAll(),L().resolve()}};un.register(Cl);var Sl={name:Ge,execute:function(e,t){return this.isRedo?te()(t).call(t,function(t){e.setObjectProperties(t.id,t)}):this.undoData=da,L().resolve()},undo:function(e){var t;return te()(t=this.undoData).call(t,function(t){e.setObjectProperties(t.id,t)}),L().resolve()}};un.register(Sl);var El=Se.RESIZE,Tl={name:qe,execute:function(e,t){var i=e.getComponent(El),n=i.getOriginalDimensions();return n||(n=i.getCurrentDimensions()),this.undoData.dimensions=n,i.resize(t)}
85,undo:function(e){return e.getComponent(El).resize(this.undoData.dimensions)}};un.register(Tl);var Al=Ua}(),o=o.default}()},"object"==typeof i&&"object"==typeof t?t.exports=o(e("tui-color-picker")):"function"==typeof define&&define.amd?define(["tui-color-picker"],o):"object"==typeof i?i.tui=o(e("tui-color-picker")):(r.tui=r.tui||{},r.tui.ImageEditor=o(r.tui.colorPicker))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:123,"tui-color-picker":399}],401:[function(e,t,i){ 86/*! UIkit 3.17.11 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */ 87!function(e,n){"object"==typeof i&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define("uikit",n):(e="undefined"!=typeof globalThis?globalThis:e||self).UIkit=n()}(this,function(){"use strict";const{hasOwnProperty:e,toString:t}=Object.prototype;function i(t,i){return e.call(t,i)}const n=/\B([A-Z])/g,r=K(e=>e.replace(n,"-$1").toLowerCase()),o=/-(\w)/g,s=K(e=>(e.charAt(0).toLowerCase()+e.slice(1)).replace(o,(e,t)=>t.toUpperCase())),a=K(e=>e.charAt(0).toUpperCase()+e.slice(1));function l(e,t){var i;return null==(i=null==e?void 0:e.startsWith)?void 0:i.call(e,t)}function c(e,t){var i;return null==(i=null==e?void 0:e.endsWith)?void 0:i.call(e,t)}function u(e,t){var i;return null==(i=null==e?void 0:e.includes)?void 0:i.call(e,t)}function h(e,t){var i;return null==(i=null==e?void 0:e.findIndex)?void 0:i.call(e,t)}const{isArray:d,from:f}=Array,{assign:p}=Object;function m(e){return"function"==typeof e}function g(e){return null!==e&&"object"==typeof e}function v(e){return"[object Object]"===t.call(e)}function b(e){return g(e)&&e===e.window}function y(e){return 9===k(e)}function w(e){return k(e)>=1}function _(e){return 1===k(e)}function k(e){return!b(e)&&g(e)&&e.nodeType}function x(e){return"boolean"==typeof e}function C(e){return"string"==typeof e}function S(e){return"number"==typeof e}function E(e){return S(e)||C(e)&&!isNaN(e-parseFloat(e))}function T(e){return!(d(e)?e.length:g(e)&&Object.keys(e).length)}function A(e){return void 0===e}function I(e){return x(e)?e:"true"===e||"1"===e||""===e||"false"!==e&&"0"!==e&&e}function M(e){const t=Number(e);return!isNaN(t)&&t}function P(e){return parseFloat(e)||0}function D(e){return O(e)[0]}function O(e){return w(e)?[e]:Array.from(e||[]).filter(w)}function L(e){if(b(e))return e;const t=y(e=D(e))?e:null==e?void 0:e.ownerDocument;return(null==t?void 0:t.defaultView)||window}function R(e,t){return e===t||g(e)&&g(t)&&Object.keys(e).length===Object.keys(t).length&&j(e,(e,i)=>e===t[i])}function B(e,t,i){return e.replace(new RegExp(`${t}|${i}`,"g"),e=>e===t?i:t)}function N(e){return e[e.length-1]}function j(e,t){for(const i in e)if(!1===t(e[i],i))return!1;return!0}function F(e,t){return e.slice().sort(({[t]:e=0},{[t]:i=0})=>e>i?1:i>e?-1:0)}function z(e,t){return e.reduce((e,i)=>e+P(m(t)?t(i):i[t]),0)}function V(e,t){const i=new Set;return e.filter(({[t]:e})=>!i.has(e)&&i.add(e))}function H(e,t){return t.reduce((t,i)=>({...t,[i]:e[i]}),{})}function U(e,t=0,i=1){return Math.min(Math.max(M(e)||0,t),i)}function W(){}function $(...e){return[["bottom","top"],["right","left"]].every(([t,i])=>Math.min(...e.map(({[t]:e})=>e))-Math.max(...e.map(({[i]:e})=>e))>0)}function G(e,t){return e.x<=t.right&&e.x>=t.left&&e.y<=t.bottom&&e.y>=t.top}function q(e,t,i){const n="width"===t?"height":"width";return{[n]:e[t]?Math.round(i*e[n]/e[t]):e[n],[t]:i}}function Y(e,t){e={...e};for(const i in e)e=e[i]>t[i]?q(e,i,t[i]):e;return e}const Z={ratio:q,contain:Y,cover:function(e,t){e=Y(e,t);for(const i in e)e=e[i]<t[i]?q(e,i,t[i]):e;return e}};function X(e,t,i=0,n=!1){t=O(t);const{length:r}=t;return r?(e=E(e)?M(e):"next"===e?i+1:"previous"===e?i-1:"last"===e?r-1:t.indexOf(D(e)),n?U(e,0,r-1):(e%=r)<0?e+r:e):-1}function K(e){const t=Object.create(null);return(i,...n)=>t[i]||(t[i]=e(i,...n))}function J(e,t,i){var n;if(g(t))for(const i in t)J(e,i,t[i]);else{if(A(i))return null==(n=D(e))?void 0:n.getAttribute(t);for(const n of O(e))m(i)&&(i=i.call(n,J(n,t))),null===i?ee(n,t):n.setAttribute(t,i)}}function Q(e,t){return O(e).some(e=>e.hasAttribute(t))}
87function ee(e,t){O(e).forEach(e=>e.removeAttribute(t))}function te(e,t){for(const i of[t,`data-${t}`])if(Q(e,i))return J(e,i)}function ie(e,...t){for(const i of O(e)){const e=le(t).filter(e=>!se(i,e));e.length&&i.classList.add(...e)}}function ne(e,...t){for(const i of O(e)){const e=le(t).filter(e=>se(i,e));e.length&&i.classList.remove(...e)}}function re(e,t){t=new RegExp(t);for(const i of O(e))i.classList.remove(...f(i.classList).filter(e=>e.match(t)))}function oe(e,t,i){i=le(i),ne(e,t=le(t).filter(e=>!u(i,e))),ie(e,i)}function se(e,t){return[t]=le(t),O(e).some(e=>e.classList.contains(t))}function ae(e,t,i){const n=le(t);A(i)||(i=!!i);for(const t of O(e))for(const e of n)t.classList.toggle(e,i)}function le(e){return e?d(e)?e.map(le).flat():String(e).split(/[ ,]/).filter(Boolean):[]}const ce={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function ue(e){return O(e).some(e=>ce[e.tagName.toLowerCase()])}function he(e){return O(e).some(e=>e.offsetWidth||e.offsetHeight||e.getClientRects().length)}const de="input,select,textarea,button";function fe(e){return O(e).some(e=>be(e,de))}const pe=`${de},a[href],[tabindex]`;function me(e){return be(e,pe)}function ge(e){var t;return null==(t=D(e))?void 0:t.parentElement}function ve(e,t){return O(e).filter(e=>be(e,t))}function be(e,t){return O(e).some(e=>e.matches(t))}function ye(e,t){var i;return null==(i=D(e))?void 0:i.closest(l(t,">")?t.slice(1):t)}function we(e,t){return C(t)?!!ye(e,t):D(t).contains(D(e))}function _e(e,t){const i=[];for(;e=ge(e);)t&&!be(e,t)||i.push(e);return i}function ke(e,t){const i=(e=D(e))?f(e.children):[];return t?ve(i,t):i}function xe(e,t){return t?O(e).indexOf(D(t)):ke(ge(e)).indexOf(e)}function Ce(e){return(e=D(e))&&["origin","pathname","search"].every(t=>e[t]===location[t])}function Se(e){if(Ce(e)){e=D(e);const t=decodeURIComponent(e.hash).substring(1);return document.getElementById(t)||document.getElementsByName(t)[0]}}function Ee(e,t){return Ae(e,De(e,t))}function Te(e,t){return Ie(e,De(e,t))}function Ae(e,t){return D(Re(e,D(t),"querySelector"))}function Ie(e,t){return O(Re(e,D(t),"querySelectorAll"))}const Me=/(^|[^\\],)\s*[!>+~-]/,Pe=K(e=>e.match(Me));function De(e,t=document){return C(e)&&Pe(e)||y(t)?t:t.ownerDocument}const Oe=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,Le=K(e=>e.replace(Oe,"$1 *"));function Re(e,t=document,i){if(!e||!C(e))return e;if(e=Le(e),Pe(e)){const i=Ne(e);e="";for(let n of i){let r=t;if("!"===n[0]){const e=n.substr(1).trim().split(" ");if(r=ge(t).closest(e[0]),n=e.slice(1).join(" ").trim(),!n.length&&1===i.length)return r}if("-"===n[0]){const e=n.substr(1).trim().split(" "),i=(r||t).previousElementSibling;r=be(i,n.substr(1))?i:null,n=e.slice(1).join(" ")}r&&(e+=`${e?",":""}${je(r)} ${n}`)}t=document}try{return t[i](e)}catch(e){return null}}const Be=/.*?[^\\](?:,|$)/g,Ne=K(e=>e.match(Be).map(e=>e.replace(/,$/,"").trim()));function je(e){const t=[];for(;e.parentNode;){const i=J(e,"id");if(i){t.unshift(`#${Fe(i)}`);break}{let{tagName:i}=e;"HTML"!==i&&(i+=`:nth-child(${xe(e)+1})`),t.unshift(i),e=e.parentNode}}return t.join(" > ")}function Fe(e){return C(e)?CSS.escape(e):""}function ze(...e){let[t,i,n,r,o=!1]=$e(e);r.length>1&&(r=function(e){return t=>d(t.detail)?e(t,...t.detail):e(t)}(r)),(null==o?void 0:o.self)&&(r=function(e){return function(t){if(t.target===t.currentTarget||t.target===t.current)return e.call(null,t)}}(r)),n&&(r=function(e,t){return i=>{const n=">"===e[0]?Ie(e,i.currentTarget).reverse().find(e=>e.contains(i.target)):i.target.closest(e);n&&(i.current=n,t.call(this,i),delete i.current)}}(n,r));for(const e of i)for(const i of t)i.addEventListener(e,r,o);return()=>Ve(t,i,r,o)}function Ve(...e){let[t,i,,n,r=!1]=$e(e);for(const e of i)for(const i of t)i.removeEventListener(e,n,r)}function He(...e){const[t,i,n,r,o=!1,s]=$e(e),a=ze(t,i,n,e=>{const t=!s||s(e);t&&(a(),r(e,t))},o);return a}function Ue(e,t,i){return Ye(e).every(e=>e.dispatchEvent(We(t,!0,!0,i)))}function We(e,t=!0,i=!1,n){return C(e)&&(e=new CustomEvent(e,{bubbles:t,cancelable:i,detail:n})),e}function $e(e){return e[0]=Ye(e[0]),C(e[1])&&(e[1]=e[1].split(" ")),m(e[2])&&e.splice(2,0,!1),e}function Ge(e){return e&&"addEventListener"in e}function qe(e){return Ge(e)?e:D(e)}
87function Ye(e){return d(e)?e.map(qe).filter(Boolean):C(e)?Ie(e):Ge(e)?[e]:O(e)}function Ze(e){return"touch"===e.pointerType||!!e.touches}function Xe(e){var t,i;const{clientX:n,clientY:r}=(null==(t=e.touches)?void 0:t[0])||(null==(i=e.changedTouches)?void 0:i[0])||e;return{x:n,y:r}}const Ke={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function Je(e,t,i,n){const r=O(e);for(const e of r)if(C(t)){if(t=Qe(t),A(i))return getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,E(i)&&!Ke[t]?`${i}px`:i||S(i)?i:"",n)}else{if(d(t)){const i={};for(const n of t)i[n]=Je(e,n);return i}g(t)&&(n=i,j(t,(t,i)=>Je(e,i,t,n)))}return r[0]}const Qe=K(e=>function(e){if(l(e,"--"))return e;e=r(e);const{style:t}=document.documentElement;if(e in t)return e;for(const i of["webkit","moz"]){const n=`-${i}-${e}`;if(n in t)return n}}(e));const et="uk-transition",tt="transitionend",it="transitioncanceled";const nt={start:function(e,t,i=400,n="linear"){return i=Math.round(i),Promise.all(O(e).map(e=>new Promise((r,o)=>{for(const i in t){const t=Je(e,i);""===t&&Je(e,i,t)}const s=setTimeout(()=>Ue(e,tt),i);He(e,[tt,it],({type:t})=>{clearTimeout(s),ne(e,et),Je(e,{transitionProperty:"",transitionDuration:"",transitionTimingFunction:""}),t===it?o():r(e)},{self:!0}),ie(e,et),Je(e,{transitionProperty:Object.keys(t).map(Qe).join(","),transitionDuration:`${i}ms`,transitionTimingFunction:n,...t})})))},async stop(e){Ue(e,tt),await Promise.resolve()},async cancel(e){Ue(e,it),await Promise.resolve()},inProgress:e=>se(e,et)},rt="uk-animation-",ot="animationend",st="animationcanceled";function at(e,t,i=200,n,r){return Promise.all(O(e).map(e=>new Promise((o,s)=>{Ue(e,st);const a=setTimeout(()=>Ue(e,ot),i);He(e,[ot,st],({type:t})=>{clearTimeout(a),t===st?s():o(e),Je(e,"animationDuration",""),re(e,`${rt}\\S*`)},{self:!0}),Je(e,"animationDuration",`${i}ms`),ie(e,t,rt+(r?"leave":"enter")),l(t,rt)&&(n&&ie(e,`uk-transform-origin-${n}`),r&&ie(e,`${rt}reverse`))})))}const lt=new RegExp(`${rt}(enter|leave)`),ct={in:at,out:(e,t,i,n)=>at(e,t,i,n,!0),inProgress:e=>lt.test(J(e,"class")),cancel(e){Ue(e,st)}};function ut(e,...t){return t.some(t=>{var i;return(null==(i=null==e?void 0:e.tagName)?void 0:i.toLowerCase())===t.toLowerCase()})}function ht(e){return(e=Et(e)).innerHTML="",e}function dt(e,t){return A(t)?Et(e).innerHTML:pt(ht(e),t)}const ft=vt("prepend"),pt=vt("append"),mt=vt("before"),gt=vt("after");function vt(e){return function(t,i){var n;const r=O(C(i)?xt(i):i);return null==(n=Et(t))||n[e](...r),Ct(r)}}function bt(e){O(e).forEach(e=>e.remove())}function yt(e,t){for(t=D(mt(e,t));t.firstChild;)t=t.firstChild;return pt(t,e),t}function wt(e,t){return O(O(e).map(e=>e.hasChildNodes()?yt(f(e.childNodes),t):pt(e,t)))}function _t(e){O(e).map(ge).filter((e,t,i)=>i.indexOf(e)===t).forEach(e=>e.replaceWith(...e.childNodes))}const kt=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function xt(e){const t=kt.exec(e);if(t)return document.createElement(t[1]);const i=document.createElement("template");return i.innerHTML=e.trim(),Ct(i.content.childNodes)}function Ct(e){return e.length>1?e:e[0]}function St(e,t){if(_(e))for(t(e),e=e.firstElementChild;e;){const i=e.nextElementSibling;St(e,t),e=i}}function Et(e,t){return At(e)?D(xt(e)):Ae(e,t)}function Tt(e,t){return At(e)?O(xt(e)):Ie(e,t)}function At(e){return C(e)&&l(e.trim(),"<")}const It={width:["left","right"],height:["top","bottom"]};function Mt(e){const t=_(e)?D(e).getBoundingClientRect():{height:Lt(e),width:Rt(e),top:0,left:0};return{height:t.height,width:t.width,top:t.top,left:t.left,bottom:t.top+t.height,right:t.left+t.width}}function Pt(e,t){t&&Je(e,{left:0,top:0});const i=Mt(e);if(e){const{scrollY:t,scrollX:n}=L(e),r={height:t,width:n};for(const e in It)for(const t of It[e])i[t]+=r[e]}if(!t)return i;for(const n of["left","top"])Je(e,n,t[n]-i[n])}function Dt(e){let{top:t,left:i}=Pt(e);const{ownerDocument:{body:n,documentElement:r},offsetParent:o}=D(e);let s=o||r;for(;s&&(s===n||s===r)&&"static"===Je(s,"position");)s=s.parentNode;if(_(s)){const e=Pt(s);t-=e.top+P(Je(s,"borderTopWidth")),i-=e.left+P(Je(s,"borderLeftWidth"))}return{top:t-P(Je(e,"marginTop")),left:i-P(Je(e,"marginLeft"))}}function Ot(e){const t=[(e=D(e)).offsetTop,e.offsetLeft];for(;e=e.offsetParent;)if(t[0]+=e.offsetTop+P(Je(e,"borderTopWidth")),t[1]+=e.offsetLeft+P(Je(e,"borderLeftWidth")),"fixed"===Je(e,"position")){const i=L(e);return t[0]+=i.scrollY,t[1]+=i.scrollX,t}return t}const Lt=Bt("height"),Rt=Bt("width");function Bt(e){const t=a(e);return(i,n)=>{if(A(n)){if(b(i))return i[`inner${t}`];if(y(i)){const e=i.documentElement;return Math.max(e[`offset${t}`],e[`scroll${t}`])}return(n="auto"===(n=Je(i=D(i),e))?i[`offset${t}`]:P(n)||0)-Nt(i,e)}return Je(i,e,n||0===n?+n+Nt(i,e)+"px":"")}}function Nt(e,t,i="border-box"){return Je(e,"boxSizing")===i?z(It[t].map(a),t=>P(Je(e,`padding${t}`))+P(Je(e,`border${t}Width`))):0}function jt(e){for(const t in It)for(const i in It[t])if(It[t][i]===e)return It[t][1-i];return e}function Ft(e,t="width",i=window,n=!1){return C(e)?z(Vt(e),e=>{const r=Ut(e);return r?function(e,t){return e*P(t)/100}("vh"===r?function(){if(Wt)return Wt;$t||($t=Et("<div>"),Je($t,{height:"100vh",position:"fixed"}),ze(window,"resize",()=>Wt=null));return pt(document.body,$t),Wt=$t.clientHeight,bt($t),Wt}():"vw"===r?Rt(L(i)):n?i[`offset${a(t)}`]:Mt(i)[t],e):e}):P(e)}const zt=/-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g,Vt=K(e=>e.toString().replace(/\s/g,"").match(zt)||[]),Ht=/(?:v[hw]|%)$/,Ut=K(e=>(e.match(Ht)||[])[0]);let Wt,$t;const Gt="undefined"!=typeof window,qt=Gt&&"rtl"===document.dir,Yt=Gt&&"ontouchstart"in window,Zt=Gt&&window.PointerEvent,Xt=Zt?"pointerdown":Yt?"touchstart":"mousedown",Kt=Zt?"pointermove":Yt?"touchmove":"mousemove",Jt=Zt?"pointerup":Yt?"touchend":"mou
87seup",Qt=Zt?"pointerenter":Yt?"":"mouseenter",ei=Zt?"pointerleave":Yt?"":"mouseleave",ti=Zt?"pointercancel":"touchcancel",ii={reads:[],writes:[],read(e){return this.reads.push(e),oi(),e},write(e){return this.writes.push(e),oi(),e},clear(e){ai(this.reads,e),ai(this.writes,e)},flush:ni};function ni(e){si(ii.reads),si(ii.writes.splice(0)),ii.scheduled=!1,(ii.reads.length||ii.writes.length)&&oi(e+1)}const ri=4;function oi(e){ii.scheduled||(ii.scheduled=!0,e&&e<ri?Promise.resolve().then(()=>ni(e)):requestAnimationFrame(()=>ni(1)))}function si(e){let t;for(;t=e.shift();)try{t()}catch(e){console.error(e)}}function ai(e,t){const i=e.indexOf(t);return~i&&e.splice(i,1)}function li(){}function ci(e,t,i={},{intersecting:n=!0}={}){const r=new IntersectionObserver(n?(e,i)=>{e.some(e=>e.isIntersecting)&&t(e,i)}:t,i);for(const t of O(e))r.observe(t);return r}li.prototype={positions:[],init(){let e;this.positions=[],this.unbind=ze(document,"mousemove",t=>e=Xe(t)),this.interval=setInterval(()=>{e&&(this.positions.push(e),this.positions.length>5&&this.positions.shift())},50)},cancel(){var e;null==(e=this.unbind)||e.call(this),clearInterval(this.interval)},movesTo(e){if(this.positions.length<2)return!1;const t=e.getBoundingClientRect(),{left:i,right:n,top:r,bottom:o}=t,[s]=this.positions,a=N(this.positions),l=[s,a];if(G(a,t))return!1;return[[{x:i,y:r},{x:n,y:o}],[{x:i,y:o},{x:n,y:r}]].some(e=>{const i=function([{x:e,y:t},{x:i,y:n}],[{x:r,y:o},{x:s,y:a}]){const l=(a-o)*(i-e)-(s-r)*(n-t);if(0===l)return!1;const c=((s-r)*(t-o)-(a-o)*(e-r))/l;if(c<0)return!1;return{x:e+c*(i-e),y:t+c*(n-t)}}(l,e);return i&&G(i,t)})}};const ui=Gt&&window.ResizeObserver;function hi(e,t,i={box:"border-box"}){if(ui)return pi(ResizeObserver,e,t,i);const n=[ze(window,"load resize",t),ze(document,"loadedmetadata load",t,!0)];return{disconnect:()=>n.map(e=>e())}}function di(e){return{disconnect:ze([window,window.visualViewport],"resize",e)}}function fi(e,t,i){return pi(MutationObserver,e,t,i)}function pi(e,t,i,n){const r=new e(i);for(const e of O(t))r.observe(e,n);return r}function mi(e){wi(e)&&xi(e,{func:"playVideo",method:"play"}),yi(e)&&e.play()}function gi(e){wi(e)&&xi(e,{func:"pauseVideo",method:"pause"}),yi(e)&&e.pause()}function vi(e){wi(e)&&xi(e,{func:"mute",method:"setVolume",value:0}),yi(e)&&(e.muted=!0)}function bi(e){return yi(e)||wi(e)}function yi(e){return ut(e,"video")}function wi(e){return ut(e,"iframe")&&(_i(e)||ki(e))}function _i(e){return!!e.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/)}function ki(e){return!!e.src.match(/vimeo\.com\/video\/.*/)}async function xi(e,t){await function(e){if(e[Si])return e[Si];const t=_i(e),i=ki(e),n=++Ei;let r;return e[Si]=new Promise(o=>{t&&He(e,"load",()=>{const t=()=>Ci(e,{event:"listening",id:n});r=setInterval(t,100),t()}),He(window,"message",o,!1,({data:e})=>{try{return e=JSON.parse(e),t&&(null==e?void 0:e.id)===n&&"onReady"===e.event||i&&Number(null==e?void 0:e.player_id)===n}catch(e){}}),e.src=`${e.src}${u(e.src,"?")?"&":"?"}${t?"enablejsapi=1":`api=1&player_id=${n}`}`}).then(()=>clearInterval(r))}(e),Ci(e,t)}function Ci(e,t){e.contentWindow.postMessage(JSON.stringify({event:"command",...t}),"*")}const Si="_ukPlayer";let Ei=0;function Ti(e,{offset:t=0}={}){const i=he(e)?Ii(e,!1,["hidden"]):[];return i.reduce((n,r,o)=>{const{scrollTop:s,scrollHeight:a,offsetHeight:l}=r,c=Di(r),u=a-c.height,{height:h,top:d}=i[o-1]?Di(i[o-1]):Pt(e);let f=Math.ceil(d-c.top-t+s);return t>0&&l<h+t?f+=t:t=0,f>u?(t-=f-u,f=u):f<0&&(t-=f,f=0),()=>function(e,t,n,r){return new Promise(o=>{const s=e.scrollTop,a=(l=Math.abs(t),40*Math.pow(l,.375));var l;const c=Date.now(),u=Bi(e)===e,h=Pt(n).top+(u?0:s);let d=0,f=15;!function l(){const p=(m=U((Date.now()-c)/a),.5*(1-Math.cos(Math.PI*m)));var m;let g=0;if(i[0]===e&&s+t<r){g=Pt(n).top+(u?0:e.scrollTop)-h;const t=Oi(n);g-=t?Pt(t).height:0}e.scrollTop=Math[t+g>0?"max":"min"](e.scrollTop,s+(t+g)*p),1!==p||d!==g&&f--?(d=g,requestAnimationFrame(l)):o()}()})}(r,f-s,e,u).then(n)},()=>Promise.resolve())()}function Ai(e,t=0,i=0){if(!he(e))return 0;const n=Mi(e,!0),{scrollHeight:r,scrollTop:o}=n,{height:s}=Di(n),a=r-s,l=Ot(e)[0]-Ot(n)[0],c=Math.max(0,l-s+t);return U((o-c)/(Math.min(a,l+e.offsetHeight-i)-c))}function Ii(e,t=!1,i=[]){const n=Bi(e);let r=_e(e).reverse();r=r.slice(r.indexOf(n)+1);const o=h(r,e=>"fixed"===Je(e,"position"));return~o&&(r=r.slice(o)),[n].concat(r.filter(e=>Je(e,"overflow").split(" ").some(e=>u(["auto","scroll",...i],e))&&(!t||e.scrollHeight>Di(e).height))).reverse()}function Mi(...e){return Ii(...e)[0]}function Pi(e){return Ii(e,!1,["hidden","clip"])}
vendor: 4,127 bytes, line 87
87function Di(e){const t=L(e),{visualViewport:i,document:{documentElement:n}}=t;let r=e===Bi(e)?t:e;if(b(r)&&i){let{height:e,width:t,scale:n,pageTop:r,pageLeft:o}=i;return e=Math.round(e*n),t=Math.round(t*n),{height:e,width:t,top:r,left:o,bottom:r+e,right:o+t}}let o=Pt(r);if("inline"===Je(r,"display"))return o;for(let[e,t,i,s]of[["width","x","left","right"],["height","y","top","bottom"]]){b(r)?r=n:o[i]+=P(Je(r,`border-${i}-width`));const l=o[e]%1;o[e]=o[t]=r[`client${a(e)}`]-(l?l<.5?-l:1-l:0),o[s]=o[e]+o[i]}return o}function Oi(e){return e.ownerDocument.elementsFromPoint(Pt(e).left,0).find(t=>!t.contains(e)&&(Ri(t,"fixed")&&Li(_e(e).reverse().find(e=>!e.contains(t)&&!Ri(e,"static")))<Li(t)||Ri(t,"sticky")&&ge(t).contains(e)))}function Li(e){return P(Je(e,"zIndex"))}function Ri(e,t){return Je(e,"position")===t}function Bi(e){return L(e).document.scrollingElement}const Ni=[["width","x","left","right"],["height","y","top","bottom"]];function ji(e,t,i){i={attach:{element:["left","top"],target:["left","top"],...i.attach},offset:[0,0],placement:[],...i},d(t)||(t=[t,t]),Pt(e,Fi(e,t,i))}function Fi(e,t,i){const n=zi(e,t,i),{boundary:r,viewportOffset:o=0,placement:s}=i;let a=n;for(const[l,[c,,u,h]]of Object.entries(Ni)){const d=Ui(e,t[l],o,r,l);if(qi(n,d,l))continue;let f=0;if("flip"===s[l]){const r=i.attach.target[l];if(r===h&&n[h]<=d[h]||r===u&&n[u]>=d[u])continue;f=Yi(e,t,i,l)[u]-n[u];const s=Wi(e,t[l],o,l);if(!qi(Vi(n,f,l),s,l)){if(qi(n,s,l))continue;if(i.recursion)return!1;const r=Zi(e,t,i);if(r&&qi(r,s,1-l))return r;continue}}else if("shift"===s[l]){const e=Pt(t[l]),{offset:r}=i;f=U(U(n[u],d[u],d[h]-n[c]),e[u]-n[c]+r[l],e[h]-r[l])-n[u]}a=Vi(a,f,l)}return a}function zi(e,t,i){let{attach:n,offset:r}={attach:{element:["left","top"],target:["left","top"],...i.attach},offset:[0,0],...i},o=Pt(e);for(const[e,[i,,s,a]]of Object.entries(Ni)){const l=n.target[e]===n.element[e]?Di(t[e]):Pt(t[e]);o=Vi(o,l[s]-o[s]+Hi(n.target[e],a,l[i])-Hi(n.element[e],a,o[i])+ +r[e],e)}return o}function Vi(e,t,i){const[,n,r,o]=Ni[i],s={...e};return s[r]=e[n]=e[r]+t,s[o]+=t,s}function Hi(e,t,i){return"center"===e?i/2:e===t?i:0}function Ui(e,t,i,n,r){let o=Gi(...$i(e,t).map(Di));return i&&(o[Ni[r][2]]+=i,o[Ni[r][3]]-=i),n&&(o=Gi(o,Pt(d(n)?n[r]:n))),o}function Wi(e,t,i,n){const[r,o,s,l]=Ni[n],[c]=$i(e,t),u=Di(c);return["auto","scroll"].includes(Je(c,`overflow-${o}`))&&(u[s]-=c[`scroll${a(s)}`],u[l]=u[s]+c[`scroll${a(r)}`]),u[s]+=i,u[l]-=i,u}function $i(e,t){return Pi(t).filter(t=>t.contains(e))}function Gi(...e){let t={};for(const i of e)for(const[,,e,n]of Ni)t[e]=Math.max(t[e]||0,i[e]),t[n]=Math.min(...[t[n],i[n]].filter(Boolean));return t}function qi(e,t,i){const[,,n,r]=Ni[i];return e[n]>=t[n]&&e[r]<=t[r]}function Yi(e,t,{offset:i,attach:n},r){return zi(e,t,{attach:{element:Xi(n.element,r),target:Xi(n.target,r)},offset:Ji(i,r)})}function Zi(e,t,i){return Fi(e,t,{...i,attach:{element:i.attach.element.map(Ki).reverse(),target:i.attach.target.map(Ki).reverse()},offset:i.offset.reverse(),placement:i.placement.reverse(),recursion:!0})}function Xi(e,t){const i=[...e],n=Ni[t].indexOf(e[t]);return~n&&(i[t]=Ni[t][1-n%2+2]),i}function Ki(e){for(let t=0;t<Ni.length;t++){const i=Ni[t].indexOf(e);if(~i)return Ni[1-t][i%2+2]}}function Ji(e,t){return(e=[...e])[t]*=-1,e}var Qi=Object.freeze({__proto__:null,$:Et,$$:Tt,Animation:ct,Dimensions:Z,MouseTracker:li,Transition:nt,addClass:ie,after:gt,append:pt,apply:St,assign:p,attr:J,before:mt,boxModelAdjust:Nt,camelize:s,children:ke,clamp:U,closest:ye,createEvent:We,css:Je,data:te,dimensions:Mt,each:j,empty:ht,endsWith:c,escape:Fe,fastdom:ii,filter:ve,find:Ae,findAll:Ie,findIndex:h,flipPosition:jt,fragment:xt,getCoveringElement:Oi,getEventPos:Xe,getIndex:X,getTargetedElement:Se,hasAttr:Q,hasClass:se,hasOwn:i,hasTouch:Yt,height:Lt,html:dt,hyphenate:r,inBrowser:Gt,includes:u,index:xe,intersectRect:$,isArray:d,isBoolean:x,isDocument:y,isElement:_,isEmpty:T,isEqual:R,isFocusable:me,isFunction:m,isInView:function(e,t=0,i=0){return!!he(e)&&$(...Pi(e).map(e=>{const{top:n,left:r,bottom:o,right:s}=Di(e);return{top:n-t,left:r-i,bottom:o+t,right:s+i}}).concat(Pt(e)))}
87,isInput:fe,isNode:w,isNumber:S,isNumeric:E,isObject:g,isPlainObject:v,isRtl:qt,isSameSiteAnchor:Ce,isString:C,isTag:ut,isTouch:Ze,isUndefined:A,isVideo:bi,isVisible:he,isVoidElement:ue,isWindow:b,last:N,matches:be,memoize:K,mute:vi,noop:W,observeIntersection:ci,observeMutation:fi,observeResize:hi,observeViewportResize:di,off:Ve,offset:Pt,offsetPosition:Ot,offsetViewport:Di,on:ze,once:He,overflowParents:Pi,parent:ge,parents:_e,pause:gi,pick:H,play:mi,pointInRect:G,pointerCancel:ti,pointerDown:Xt,pointerEnter:Qt,pointerLeave:ei,pointerMove:Kt,pointerUp:Jt,position:Dt,positionAt:ji,prepend:ft,propName:Qe,query:Ee,queryAll:Te,ready:function(e){"loading"===document.readyState?He(document,"DOMContentLoaded",e):e()},remove:bt,removeAttr:ee,removeClass:ne,removeClasses:re,replaceClass:oe,scrollIntoView:Ti,scrollParent:Mi,scrollParents:Ii,scrolledOver:Ai,selFocusable:pe,selInput:de,sortBy:F,startsWith:l,sumBy:z,swap:B,toArray:f,toBoolean:I,toEventTargets:Ye,toFloat:P,toNode:D,toNodes:O,toNumber:M,toPx:Ft,toWindow:L,toggleClass:ae,trigger:Ue,ucfirst:a,uniqueBy:V,unwrap:_t,width:Rt,within:we,wrapAll:yt,wrapInner:wt}),en={connected(){ie(this.$el,this.$options.id)}};const tn=["days","hours","minutes","seconds"];var nn={mixins:[en],props:{date:String,clsWrapper:String,role:String},data:{date:"",clsWrapper:".uk-countdown-%unit%",role:"timer"},connected(){J(this.$el,"role",this.role),this.date=P(Date.parse(this.$props.date)),this.end=!1,this.start()},disconnected(){this.stop()},events:{name:"visibilitychange",el:()=>document,handler(){document.hidden?this.stop():this.start()}},methods:{start(){this.stop(),this.update(),this.timer||(Ue(this.$el,"countdownstart"),this.timer=setInterval(this.update,1e3))},stop(){this.timer&&(clearInterval(this.timer),Ue(this.$el,"countdownstop"),this.timer=null)},update(){const e=function(e){const t=Math.max(0,e-Date.now())/1e3;return{total:t,seconds:t%60,minutes:t/60%60,hours:t/60/60%24,days:t/60/60/24}}(this.date);e.total||(this.stop(),this.end||(Ue(this.$el,"countdownend"),this.end=!0));for(const t of tn){const i=Et(this.clsWrapper.replace("%unit%",t),this.$el);if(!i)continue;let n=String(Math.trunc(e[t]));n=n.length<2?`0${n}`:n,i.textContent!==n&&(n=n.split(""),n.length!==i.children.length&&dt(i,n.map(()=>"<span></span>
87").join("")),n.forEach((e,t)=>i.children[t].textContent=e))}}}};const rn={};function on(e,t,i){return rn.computed(m(e)?e.call(i,i):e,m(t)?t.call(i,i):t)}function sn(e,t){return e=e&&!d(e)?[e]:e,t?e?e.concat(t):d(t)?t:[t]:e}function an(e,t){return A(t)?e:t}function ln(e,t,n){const r={};if(m(t)&&(t=t.options),t.extends&&(e=ln(e,t.extends,n)),t.mixins)for(const i of t.mixins)e=ln(e,i,n);for(const t in e)o(t);for(const n in t)i(e,n)||o(n);function o(i){r[i]=(rn[i]||an)(e[i],t[i],n)}return r}function cn(e,t=[]){try{return e?l(e,"{")?JSON.parse(e):t.length&&!u(e,":")?{[t[0]]:e}:e.split(";").reduce((e,t)=>{const[i,n]=t.split(/:(.*)/);return i&&!A(n)&&(e[i.trim()]=n.trim()),e},{}):{}}catch(e){return{}}}function un(e,t){return e===Boolean?I(t):e===Number?M(t):"list"===e?function(e){return d(e)?e:C(e)?e.split(hn).map(e=>E(e)?M(e):I(e.trim())):[e]}(t):e===Object&&C(t)?cn(t):e?e(t):t}rn.events=rn.watch=rn.observe=rn.created=rn.beforeConnect=rn.connected=rn.beforeDisconnect=rn.disconnected=rn.destroy=sn,rn.args=function(e,t){return!1!==t&&sn(t||e)},rn.update=function(e,t){return F(sn(e,m(t)?{read:t}:t),"order")},rn.props=function(e,t){if(d(t)){const e={};for(const i of t)e[i]=String;t=e}return rn.methods(e,t)},rn.computed=rn.methods=function(e,t){return t?e?{...e,...t}:t:e},rn.i18n=rn.data=function(e,t,i){return i?on(e,t,i):t?e?function(i){return on(e,t,i)}:t:e};const hn=/,(?![^(]*\))/;function dn(e,t="update"){e._connected&&e._updates.length&&(e._queued||(e._queued=new Set,ii.read(()=>{e._connected&&function(e,t){for(const{read:i,write:n,events:r=[]}of e._updates){if(!t.has("update")&&!r.some(e=>t.has(e)))continue;let o;i&&(o=i.call(e,e._data,t),o&&v(o)&&p(e._data,o)),n&&!1!==o&&ii.write(()=>{e._connected&&n.call(e,e._data,t)})}}(e,e._queued),delete e._queued})),e._queued.add(t.type||t))}function fn(e){return wn(hi,e,"resize")}function pn(e){return wn(ci,e)}function mn(e){return wn(fi,e)}function gn(e={}){return pn({handler:function(t,i){const{targets:n=this.$el,preload:r=5}=e;for(const e of O(m(n)?n(this):n))Tt('[loading="lazy"]',e).slice(0,r-1).forEach(e=>ee(e,"loading"));for(const e of t.filter(({isIntersecting:e})=>e).map(({target:e})=>e))i.unobserve(e)},...e})}function vn(e){return wn((e,t)=>di(t),e)}function bn(e){return wn((e,t)=>{return{disconnect:ze((i=e,O(i).map(e=>{const{ownerDocument:t}=e,i=Mi(e,!0);return i===t.scrollingElement?t:i})),"scroll",t,{passive:!0})};var i},e,"scroll")}function yn(e){return{observe:(e,t)=>({observe:W,unobserve:W,disconnect:ze(e,Xt,t,{passive:!0})}),handler(e){if(!Ze(e))return;const t=Xe(e),i="tagName"in e.target?e.target:ge(e.target);He(document,`${Jt} ${ti} scroll`,e=>{const{x:n,y:r}=Xe(e);("scroll"!==e.type&&i&&n&&Math.abs(t.x-n)>100||r&&Math.abs(t.y-r)>100)&&setTimeout(()=>{var e,o,s,a;Ue(i,"swipe"),Ue(i,"swipe"+(e=t.x,o=t.y,s=n,a=r,Math.abs(e-s)>=Math.abs(o-a)?e-s>0?"Left":"Right":o-a>0?"Up":"Down"))})})},...e}}function wn(e,t,i){return{observe:e,handler(){dn(this,i)},...t}}var _n={props:{margin:String,firstColumn:Boolean},data:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},observe:[mn({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),fn({target:({$el:e})=>[e,...ke(e)]})],update:{read(){return{rows:kn(f(this.$el.children))}},write({rows:e}){for(const t of e)for(const i of t)ae(i,this.margin,e[0]!==t),ae(i,this.firstColumn,t[qt?t.length-1:0]===i)},events:["resize"]}};function kn(e){const t=[[]],i=e.some((t,i)=>i&&e[i-1].offsetParent!==t.offsetParent);for(const n of e){if(!he(n))continue;const e=xn(n,i);for(let r=t.length-1;r>=0;r--){const o=t[r];if(!o[0]){o.push(n);break}const s=xn(o[0],i);if(e.top>=s.bottom-1&&e.top!==s.top){t.push([n]);break}if(e.bottom-1>s.top||e.top===s.top){let t=o.length-1;for(;t>=0;t--){const n=xn(o[t],i);if(e.left>=n.left)break}o.splice(t+1,0,n);break}if(0===r){t.unshift([n]);break}}}return t}function xn(e,t=!1){let{offsetTop:i,offsetLeft:n,offsetHeight:r,offsetWidth:o}=e;return t&&([i,n]=Ot(e)),{top:i,left:n,bottom:i+r,right:n+o}}const Cn="uk-transition-leave",Sn="uk-transition-enter";function En(e,t,i,n=0){const r=Tn(t,!0),o={opacity:1},s={opacity:0}
87,a=e=>()=>r===Tn(t)?e():Promise.reject(),l=a(async()=>{ie(t,Cn),await Promise.all(In(t).map((e,t)=>new Promise(r=>setTimeout(()=>nt.start(e,s,i/2,"ease").then(r),t*n)))),ne(t,Cn)}),c=a(async()=>{const a=Lt(t);ie(t,Sn),e(),Je(ke(t),{opacity:0}),await new Promise(e=>requestAnimationFrame(e));const l=ke(t),c=Lt(t);Je(t,"alignContent","flex-start"),Lt(t,a);const u=In(t);Je(l,s);const h=u.map(async(e,t)=>{var r;await(r=t*n,new Promise(e=>setTimeout(e,r))),await nt.start(e,o,i/2,"ease")});a!==c&&h.push(nt.start(t,{height:c},i/2+u.length*n,"ease")),await Promise.all(h).then(()=>{ne(t,Sn),r===Tn(t)&&(Je(t,{height:"",alignContent:""}),Je(l,{opacity:""}),delete t.dataset.transition)})});return se(t,Cn)?An(t).then(c):se(t,Sn)?An(t).then(l).then(c):l().then(c)}function Tn(e,t){return t&&(e.dataset.transition=1+Tn(e)),M(e.dataset.transition)||0}function An(e){return Promise.all(ke(e).filter(nt.inProgress).map(e=>new Promise(t=>He(e,"transitionend transitioncanceled",t))))}function In(e){return kn(ke(e)).flat().filter(e=>he(e))}async function Mn(e,t,i){await On();let n=ke(t);const r=n.map(e=>Pn(e,!0)),o={...Je(t,["height","padding"]),display:"block"};await Promise.all(n.concat(t).map(nt.cancel)),e(),n=n.concat(ke(t).filter(e=>!u(n,e))),await Promise.resolve(),ii.flush();const s=J(t,"style"),a=Je(t,["height","padding"]),[l,c]=function(e,t,i){const n=t.map((e,t)=>!(!ge(e)||!(t in i))&&(i[t]?he(e)?Dn(e):{opacity:0}:{opacity:he(e)?1:0})),r=n.map((n,r)=>{const o=ge(t[r])===e&&(i[r]||Pn(t[r]));if(!o)return!1;if(n){if(!("opacity"in n)){const{opacity:e}=o;e%1?n.opacity=1:delete o.opacity}}else delete o.opacity;return o}
87);return[n,r]}(t,n,r),h=n.map(e=>({style:J(e,"style")}));n.forEach((e,t)=>c[t]&&Je(e,c[t])),Je(t,o),Ue(t,"scroll"),ii.flush(),await On();const d=n.map((e,n)=>ge(e)===t&&nt.start(e,l[n],i,"ease")).concat(nt.start(t,a,i,"ease"));try{await Promise.all(d),n.forEach((e,i)=>{J(e,h[i]),ge(e)===t&&Je(e,"display",0===l[i].opacity?"none":"")}),J(t,"style",s)}catch(e){J(n,"style",""),function(e,t){for(const i in t)Je(e,i,"")}(t,o)}}function Pn(e,t){const i=Je(e,"zIndex");return!!he(e)&&{display:"",opacity:t?Je(e,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:"auto"===i?xe(e):i,...Dn(e)}}function Dn(e){const{height:t,width:i}=Pt(e);return{height:t,width:i,transform:"",...Dt(e),...Je(e,["marginTop","marginLeft"])}}function On(){return new Promise(e=>requestAnimationFrame(e))}var Ln={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(e,t=this.$el){const i=this.animation;return("fade"===i?En:"delayed-fade"===i?(...e)=>En(...e,40):i?Mn:()=>(e(),Promise.resolve()))(e,t,this.duration).catch(W)}}};const Rn=9,Bn=27,Nn=32,jn=35,Fn=36,zn=37,Vn=38,Hn=39,Un=40;var Wn={mixins:[Ln],args:"target",props:{target:String,selActive:Boolean},data:{target:"",selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{children:({target:e},t)=>Tt(`${e} > *`,t),toggles:({attrItem:e},t)=>Tt(`[${e}],[data-${e}]`,t)},watch:{toggles(e){this.updateState();const t=Tt(this.selActive,this.$el);for(const i of e){!1!==this.selActive&&ae(i,this.cls,u(t,i));const e=Yn(i);ut(e,"a")&&J(e,"role","button")}},children(e,t){t&&this.updateState()}},events:{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(e){"keydown"===e.type&&e.keyCode!==Nn||e.target.closest("a,button")&&(e.preventDefault(),this.apply(e.current))}},methods:{apply(e){const t=this.getState(),i=Gn(e,this.attrItem,this.getState());var n,r;n=t,r=i,["filter","sort"].every(e=>R(n[e],r[e]))||this.setState(i)},getState(){return this.toggles.filter(e=>se(e,this.cls)).reduce((e,t)=>Gn(t,this.attrItem,e),{filter:{"":""},sort:[]})},async setState(e,t=!0){e={filter:{"":""},sort:[],...e},Ue(this.$el,"beforeFilter",[this,e]);for(const t of this.toggles)ae(t,this.cls,qn(t,this.attrItem,e));await Promise.all(Tt(this.target,this.$el).map(i=>{const n=()=>{!function(e,t,i){const n=function({filter:e}){let t="";return j(e,e=>t+=e||""),t}(e);i.forEach(e=>Je(e,"display",n&&!be(e,n)?"none":""));const[r,o]=e.sort;if(r){const e=function(e,t,i){return[...e].sort((e,n)=>te(e,t).localeCompare(te(n,t),void 0,{numeric:!0})*("asc"===i||-1))}(i,r,o);R(e,i)||pt(t,e)}}(e,i,ke(i)),this.$update(this.$el)};return t?this.animate(n,i):n()})),Ue(this.$el,"afterFilter",[this])},updateState(){ii.write(()=>this.setState(this.getState(),!1))}}};function $n(e,t){return cn(te(e,t),["filter"])}function Gn(e,t,i){const{filter:n,group:r,sort:o,order:s="asc"}=$n(e,t);return(n||A(o))&&(r?n?(delete i.filter[""],i.filter[r]=n):(delete i.filter[r],(T(i.filter)||""in i.filter)&&(i.filter={"":n||""})):i.filter={"":n||""}),A(o)||(i.sort=[o,s]),i}function qn(e,t,{filter:i={"":""},sort:[n,r]}){const{filter:o="",group:s="",sort:a,order:l="asc"}=$n(e,t);return A(a)?s in i&&o===i[s]||!o&&s&&!(s in i)&&!i[""]:n===a&&r===l}function Yn(e){return Et("a,button",e)||e}var Zn={props:{container:Boolean},data:{container:!0},computed:{container({container:e}){return!0===e&&this.$container||e&&Et(e)}}};let Xn;function Kn(e){const t=ze(e,"touchmove",e=>{if(1!==e.targetTouches.length||be(e.target,'input[type="range"'))return;let{scrollHeight:t,clientHeight:i}=Mi(e.target);i>=t&&e.cancelable&&e.preventDefault()},{passive:!1});if(Xn)return t;Xn=!0;const{scrollingElement:i}=document;return Je(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:Rt(window)-i.clientWidth||""}),()=>{Xn=!1,t(),Je(i,{overflowY:"",touchAction:"",paddingRight:""})}}var Jn={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation:({animation:e})=>!!e[0],hasTransition:({animation:e})=>["slide","reveal"].some(t=>l(e[0],t))},methods:{async toggleElement(e,t,i){try{return await Promise.all(O(e).map(e=>{const n=x(t)?t:!this.isToggled(e);if(!Ue(e,"before"+(n?"show":"hide"),[this]))return Promise.reject();const r=(m(i)?i:!1!==i&&this.hasAnimation?this.hasTransition?er:tr:Qn)(e,n,this),o=n?this.clsEnter:this.clsLeave;ie(e,o),Ue(e,n?"show":"hide",[this]);const s=()=>{ne(e,o),Ue(e,n?"shown":"hidden",[this])};return r?r.then(s,()=>(ne(e,o),Promise.reject())):s()})),!0}catch(e){return!1}},isToggled(e=this.$el){return!!se(e=D(e),this.clsEnter)||!se(e,this.clsLeave)&&(this.cls?se(e,this.cls.split(" ")[0]):he(e))},_toggle(e,t){if(!e)return;let i;t=Boolean(t),this.cls?(i=u(this.cls," ")||t!==se(e,this.cls),i&&ae(e,this.cls,u(this.cls," ")?void 0:t)):(i=t===e.hidden,i&&(e.hidden=!t)),Tt("[autofocus]",e).some(e=>he(e)?e.focus()||!0:e.blur()),i&&Ue(e,"toggled",[t,this])}}};function Qn(e,t,{_toggle:i}){return ct.cancel(e),nt.cancel(e),i(e,t)}async function er(e,t,{animation:i,duration:n,velocity:r,transition:o,_toggle:s}){var a;const[l="reveal",c="top"]=(null==(a=i[0])?void 0:a.split("-"))||[],h=[["left","right"],["top","bottom"]],d=h[u(h[0],c)?0:1],f=d[1]===c,p=["width","height"][h.indexOf(d)],m=`margin-${d[0]}`,g=`margin-${c}`;let v=Mt(e)[p];const b=nt.inProgress(e);await nt.cancel(e),t&&s(e,!0);const y=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",m,g].map(t=>[t,e.style[t]])),w=Mt(e),_=P(Je(e,m)),k=P(Je(e,g)),x=w[p]+k;b||t||(v+=k);const[C]=wt(e,"<div>");Je(C,{boxSizing:"border-box",height:w.height,width:w.width,...Je(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",g])}),Je(e,{padding:0,border:0,minWidth:0,minHeight:0,[g]:0,width:w.width,height:w.height,overflow:"hidden",[p]:v});const S=v/x;n=(r*x+n)*(t?1-S:S);const E={[p]:t?x:0};f&&(Je(e,m,x-v+_),E[m]=t?_:x+_),!f^"reveal"===l&&(Je(C,m,-x+v),nt.start(C,{[m]:t?0:-x},n,o));try{await nt.start(e,E,n,o)}finally{Je(e,y),_t(C.firstChild),t||s(e,!1)}}function tr(e,t,i){const{animation:n,duration:r,_toggle:o}=i;return t?(o(e,!0),ct.in(e,n[0],r,i.origin)):ct.out(e,n[1]||n[0],r,i.origin).then(()=>o(e,!1))}const ir=[];var nr={mixins:[en,Zn,Jn],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel:({selPanel:e},t)=>Et(e,t),transitionElement(){return this.panel},bgClose({bgClose:e}){return e&&this.panel}},connected(){J(this.panel||this.$el,"role",this.role),this.overlay&&J(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){u(ir,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(e){const{current:t,defaultPrevented:i}=e,{hash:n}=t;!i&&n&&Ce(t)&&!this.$el.contains(Et(n))?this.hide():be(t,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===u(ir,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(u(ir,this))return!1;!this.stack&&ir.length?(Promise.all(ir.map(e=>e.hide())).then(this.show),e.preventDefault()):ir.push(this)}}
87,{name:"show",self:!0,handler(){this.stack&&Je(this.$el,"zIndex",P(Je(this.$el,"zIndex"))+ir.length);const e=[this.overlay&&or(this),this.overlay&&Kn(this.$el),this.bgClose&&sr(this),this.escClose&&ar(this)];He(this.$el,"hidden",()=>e.forEach(e=>e&&e()),{self:!0}),ie(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){me(this.$el)||J(this.$el,"tabindex","-1"),be(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){u(ir,this)&&ir.splice(ir.indexOf(this),1),Je(this.$el,"zIndex",""),ir.some(e=>e.clsPage===this.clsPage)||ne(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&ge(this.$el)!==this.container?(pt(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,rr)},hide(){return this.toggleElement(this.$el,!1,rr)}}};function rr(e,t,{transitionElement:i,_toggle:n}){return new Promise((r,o)=>He(e,"show hide",()=>{var s;null==(s=e._reject)||s.call(e),e._reject=o,n(e,t);const a=He(i,"transitionstart",()=>{He(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{a(),r()},(u=Je(i,"transitionDuration"))?c(u,"ms")?P(u):1e3*P(u):0);var u})).then(()=>delete e._reject)}function or(e){return ze(document,"focusin",t=>{N(ir)!==e||e.$el.contains(t.target)||e.$el.focus()})}function sr(e){return ze(document,Xt,({target:t})=>{N(ir)!==e||e.overlay&&!e.$el.contains(t)||e.panel.contains(t)||He(document,`${Jt} ${ti} scroll`,({defaultPrevented:i,type:n,target:r})=>{i||n!==Jt||t!==r||e.hide()},!0)})}function ar(e){return ze(document,"keydown",t=>{27===t.keyCode&&N(ir)===e&&e.hide()})}var lr={slide:{show:e=>[{transform:ur(-100*e)},{transform:ur()}],percent:e=>cr(e),translate:(e,t)=>
87[{transform:ur(-100*t*e)},{transform:ur(100*t*(1-e))}]}};function cr(e){return Math.abs(Je(e,"transform").split(",")[4]/e.offsetWidth)}function ur(e=0,t="%"){return`translate3d(${e+=e?t:""}, 0, 0)`}function hr(e){return`scale3d(${e}, ${e}, 1)`}function dr(e,t,i){Ue(e,We(t,!1,!1,i))}var fr={props:{i18n:Object},data:{i18n:null},methods:{t(e,...t){var i,n,r;let o=0;return(null==(r=(null==(i=this.i18n)?void 0:i[e])||(null==(n=this.$options.i18n)?void 0:n[e]))?void 0:r.replace(/%s/g,()=>t[o++]||""))||""}}},pr={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){J(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){J(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:()=>document,filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&be(this.$el,":focus-within")||this.pauseOnHover&&be(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const mr={passive:!1,capture:!0},gr={passive:!0,capture:!0},vr="touchmove mousemove",br="touchend touchcancel mouseup click input scroll";var yr={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=e=>{const i=Xe(e).x*(qt?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(e)}}},events:[{name:"touchstart mousedown",passive:!0,delegate(){return`${this.selList} > *`},handler(e){var t;!this.draggable||!Ze(e)&&(t=e.target,"none"!==Je(t,"userSelect")&&f(t.childNodes).some(e=>3===e.nodeType&&e.textContent.trim()))||e.target.closest(de)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:vr,el(){return this.list},handler:W,...mr}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,ze(document,vr,this.move,mr),ze(document,br,this.end,gr),Je(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(0===t||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;Je(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;let{slides:i,prevIndex:n}=this,r=Math.abs(t),o=this.getIndex(n+this.dir),s=this._getDistance(n,o);for(;o!==n&&r>s;)this.drag-=s*this.dir,n=o,r-=s,o=this.getIndex(n+this.dir),s=this._getDistance(n,o);this.percent=r/s;const a=i[n],l=i[o],c=this.index!==o,h=n===o;let d;for(const e of[this.index,this.prevIndex])u([o,n],e)||(Ue(i[e],"itemhidden",[this]),h&&(d=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||d)&&Ue(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=o,!h&&Ue(a,"beforeitemhide",[this]),Ue(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!h&&l),c&&(!h&&Ue(a,"itemhide",[this]),Ue(l,"itemshow",[this]))},end(){if(Ve(document,vr,this.move,mr),Ve(document,br,this.end,gr),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(qt?this.dir*(qt?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}Je(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()||this.slides[e].offsetWidth}}};function wr(e,t,i){e._watches.push({name:i,...v(t)?t:{handler:t}})}function _r(e,t,n){e._hasComputed=!0,Object.defineProperty(e,t,{enumerable:!0,get(){const{_computed:r,$props:o,$el:s}=e;return i(r,t)||(r[t]=(n.get||n).call(e,o,s)),r[t]},set(i){const{_computed:r}=e;r[t]=n.set?n.set.call(e,i):i,A(r[t])&&delete r[t]}})}function kr(e){e._hasComputed&&(!function(e,t){e._updates.unshift(t)}(e,{read:()=>function(e,t){for(const{name:n,handler:r,immediate:o=!0}of e._watches)(e._initial&&o||i(t,n)&&!R(t[n],e[n]))&&r.call(e,e[n],t[n]);e._initial=!1}(e,xr(e)),events:["resize","computed"]}),function(){if(Cr)return;Sr=new Set,Cr=new MutationObserver(()=>{for(const e of Sr)dn(e,"computed")}),Cr.observe(document,{subtree:!0,childList:!0})}(),Sr.add(e))}function xr(e){const t={...e._computed};return e._computed={},t}let Cr,Sr;function Er(e,t,i){let{name:n,el:r,handler:o,capture:s,passive:a,delegate:l,filter:c,self:u}=v(t)?t:{name:i,handler:t};r=m(r)?r.call(e,e):r||e.$el,!r||d(r)&&!r.length||c&&!c.call(e)||e._events.push(ze(r,n,l?C(l)?l:l.call(e,e):null,C(o)?e[o]:o.bind(e),{passive:a,capture:s,self:u}))}function Tr(e,...t){e._observers.push(...t)}function Ar(e,t){let{observe:n,target:r=e.$el,handler:o,options:s,filter:a,args:l}=t;if(a&&!a.call(e,e))return;const c=`_observe${e._observers.length}`;m(r)&&!i(e,c)&&_r(e,c,()=>r.call(e,e)),o=C(o)?e[o]:o.bind(e),m(s)&&(s=s.call(e,e));const u=n(i(e,c)?e[c]:r,o,s,l);m(r)&&d(e[c])&&u.unobserve&&wr(e,{handler:Ir(u),immediate:!1},c),Tr(e,u)}function Ir(e){return(t,i)=>{for(const n of i)!u(t,n)&&e.unobserve(n);for(const n of t)!u(i,n)&&e.observe(n)}}function Mr(e){const t={},{args:i=[],props:n={},el:o,id:a}=e;if(!n)return t;for(const e in n){const i=r(e);let s=te(o,i);A(s)||(s=n[e]===Boolean&&""===s||un(n[e],s),"target"===i&&l(s,"_")||(t[e]=s))}const c=cn(te(o,a),i);for(const e in c){const i=s(e);A(n[i])||(t[i]=un(n[i],c[e]))}return t}const Pr=K((e,t)=>{const i=Object.keys(t),n=i.concat(e).map(e=>[r(e),`data-${r(e)}`]).flat();return{attributes:i,filter:n}});function Dr(e,t){var i;
87null==(i=e.$options[t])||i.forEach(t=>t.call(e))}function Or(e){e._connected||(!function(e){const{$options:t,$props:n}=e,r=Mr(t);p(n,r);const{computed:o,methods:s}=t;for(let t in n)!(t in r)||o&&i(o,t)||s&&i(s,t)||(e[t]=n[t])}(e),Dr(e,"beforeConnect"),e._connected=!0,function(e){e._events=[];for(const t of e.$options.events||[])if(i(t,"handler"))Er(e,t);else for(const i in t)Er(e,t[i],i)}(e),function(e){e._data={},e._updates=[...e.$options.update||[]]}(e),function(e){e._watches=[];for(const t of e.$options.watch||[])for(const[i,n]of Object.entries(t))wr(e,n,i);e._initial=!0}(e),function(e){e._observers=[];for(const t of e.$options.observe||[])if(i(t,"handler"))Ar(e,t);else for(const i of t)Ar(e,i)}(e),function(e){const{$options:t,$props:i}=e,{id:n,props:r,el:o}=t;if(!r)return;const{attributes:a,filter:l}=Pr(n,r),c=new MutationObserver(r=>{const o=Mr(t);r.some(({attributeName:e})=>{const t=e.replace("data-","");return(t===n?a:[s(t),s(e)]).some(e=>!A(o[e])&&o[e]!==i[e])})&&e.$reset()});c.observe(o,{attributes:!0,attributeFilter:l}),Tr(e,c)}(e),kr(e),Dr(e,"connected"),dn(e))}function Lr(e){e._connected&&(Dr(e,"beforeDisconnect"),function(e){e._events.forEach(e=>e()),delete e._events}(e),function(e){delete e._data}(e),function(e){for(const t of e._observers)t.disconnect()}(e),function(e){null==Sr||Sr.delete(e),xr(e)}(e),Dr(e,"disconnected"),e._connected=!1)}let Rr=0;function Br(e,t={}){t.data=function({data:e={}},{args:t=[],props:i={}}){d(e)&&(e=e.slice(0,t.length).reduce((e,i,n)=>(v(i)?p(e,i):e[t[n]]=i,e),{}));for(const t in e)A(e[t])?delete e[t]:i[t]&&(e[t]=un(i[t],e[t]));return e}(t,e.constructor.options),e.$options=ln(e.constructor.options,t,e),e.$props={},e._uid=Rr++,function(e){const{data:t={}}=e.$options;for(const i in t)e.$props[i]=e[i]=t[i]}(e),function(e){const{methods:t}=e.$options;if(t)for(const i in t)e[i]=t[i].bind(e)}(e),function(e){const{computed:t}=e.$options;if(e._computed={},t)for(const i in t)_r(e,i,t[i])}(e),Dr(e,"created"),t.el&&e.$mount(t.el)}const Nr=function(e){Br(this,e)};Nr.util=Qi,Nr.options={},Nr.version="3.17.11";const jr="__uikit__",Fr={};function zr(e,t){var i;const n="uk-"+r(e);if(!t)return v(Fr[n])&&(Fr[n]=Nr.extend(Fr[n])),Fr[n];e=s(e),Nr[e]=(t,i)=>Vr(e,t,i);const o=v(t)?{...t}:t.options;return o.id=n,o.name=e,null==(i=o.install)||i.call(o,Nr,o,e),Nr._initialized&&!o.functional&&requestAnimationFrame(()=>Vr(e,`[${n}],[data-${n}]`)),Fr[n]=o}function Vr(e,t,i,...n){const r=zr(e);return r.options.functional?new r({data:v(t)?t:[t,i,...n]}):t?Tt(t).map(o)[0]:o();function o(t){const n=Ur(t,e);if(n){if(!i)return n;n.$destroy()}return new r({el:t,data:i})}}function Hr(e){return(null==e?void 0:e[jr])||{}}function Ur(e,t){return Hr(e)[t]}function Wr(e,t){e=e?D(e):document.body;for(const i of _e(e).reverse())$r(i,t);St(e,e=>$r(e,t))}function $r(e,t){const i=Hr(e);for(const e in i)dn(i[e],t)}let Gr=1;function qr(e,t=null){return(null==t?void 0:t.id)||`${e.$options.id}-${Gr++}`}var Yr={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:e},t)=>Et(e,t),navChildren(){return ke(this.nav)},selNavItem:({attrItem:e})=>`[${e}],[data-${e}]`,navItems(e,t){return Tt(this.selNavItem,t)}},watch:{nav(e,t){J(e,"role","tablist"),t&&this.$emit()},list(e){J(e,"role","presentation")},navChildren(e){J(e,"role","presentation")},navItems(e){for(const t of e){const e=te(t,this.attrItem),i=Et("a,button",t)||t;let n,r=null;if(E(e)){const t=M(e),o=this.slides[t];o&&(o.id||(o.id=qr(this,o)),r=o.id),n=this.t("slideX",P(e)+1),J(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=qr(this,this.list)),r=this.list.id),n=this.t(e);J(i,{"aria-controls":r,"aria-label":J(i,"aria-label")||n})}},slides(e){e.forEach((e,t)=>J(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",t+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(e){const t=this.navChildren.length;if(this.nav&&e!==t){ht(this.nav);for(let t=0;t<e;t++)pt(this.nav,`<li ${this.attrItem}="${t}"><a href></a></li>`)}}},connected(){J(this.$el,{role:this.role,"aria-roledescription":"carousel"})}
87,update:[{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){!e.target.closest("a,button")||"click"!==e.type&&e.keyCode!==Nn||(e.preventDefault(),this.show(te(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:t,keyCode:i}=e;if(!E(te(t,this.attrItem)))return;let n=i===Fn?0:i===jn?"last":i===zn?"previous":i===Hn?"next":-1;~n&&(e.preventDefault(),this.show(n))}}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const i=te(t,this.attrItem),n=Et("a,button",t)||t;if(E(i)){const r=M(i)===e;ae(t,this.clsActive,r),J(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&be(ge(t),":focus-within")&&n.focus()}else ae(t,"uk-invisible",this.finite&&("previous"===i&&0===e||"next"===i&&e>=this.maxIndex))}}}},Zr={mixins:[pr,yr,Yr,fr],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){ne(this.slides,this.clsActive)},computed:{duration:({velocity:e},t)=>Xr(t.offsetWidth/e),list:({selList:e},t)=>Et(e,t),maxIndex(){return this.length-1},slides(){return ke(this.list)},length(){return this.slides.length}},watch:{slides(e,t){t&&this.$emit()}},observe:fn(),methods:{show(e,t=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,o=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1)return void(2===n.length&&(null==(i=this._transitioner)||i.forward(Math.min(this.duration,200))));const s=this.getIndex(this.index),a=se(this.slides,this.clsActive)&&this.slides[s],l=this.getIndex(e,this.index),c=this.slides[l];if(a===c)return void o();if(this.dir=function(e,t){return"next"===e?1:"previous"===e||e<t?-1:1}(e,s),this.prevIndex=s,this.index=l,a&&!Ue(a,"beforeitemhide",[this])||!Ue(c,"beforeitemshow",[this,a]))return this.index=this.prevIndex,void o();const u=this._show(a,c,t).then(()=>{a&&Ue(a,"itemhidden",[this]),Ue(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&Ue(a,"itemhide",[this]),Ue(c,"itemshow",[this]),u},getIndex(e=this.index,t=this.index){return U(X(e,this.slides,t,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,i){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:i?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(e,t=this.prevIndex,i=this.index){const n=this._getTransitioner(t!==i&&t,i);return n.translate(e),n},_getTransitioner(e=this.prevIndex,t=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(S(e)?this.slides[e]:e,S(t)?this.slides[t]:t,i*(qt?-1:1),n)}}};function Xr(e){return.5*e+300}var Kr={mixins:[Zr],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:lr,Transitioner:function(e,t,i,{animation:n,easing:r}){const{percent:o,translate:s,show:a=W}=n,l=a(i);let c;return{dir:i,show(n,o=0,s){const a=s?"linear":r;return n-=Math.round(n*U(o,-1,1)),this.translate(o),dr(t,"itemin",{percent:o,duration:n,timing:a,dir:i}),dr(e,"itemout",{percent:1-o,duration:n,timing:a,dir:i}),new Promise(i=>{c||(c=i),Promise.all([nt.start(t,l[1],n,a),nt.start(e,l[0],n,a)]).then(()=>{this.reset(),c()},W)})},cancel:()=>nt.cancel([t,e]),reset(){for(const i in l[0])Je([t,e],i,"")},async forward(e,t=this.percent()){return await this.cancel(),this.show(e,t,!0)},translate(n){this.reset();const r=s(n,i);Je(t,r[1]),Je(e,r[0]),dr(t,"itemtranslatein",{percent:n,dir:i}),dr(e,"itemtranslateout",{percent:1-n,dir:i})},percent:()=>o(e||t,t,i),getDistance:()=>null==e?void 0:e.offsetWidth}}},computed:{animation:({animation:e,Animations:t})=>({...t[e]||t.slide,name:e}),transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){ie(e,this.clsActive)},itemshown({target:e}){ie(e,this.clsActivated)},itemhidden({target:e}){ne(e,this.clsActive,this.clsActivated)}}},Jr={...lr,fade:{show:()=>[{opacity:0}
87,{opacity:1}],percent:e=>1-Je(e,"opacity"),translate:e=>[{opacity:1-e},{opacity:e}]},scale:{show:()=>[{opacity:0,transform:hr(.8)},{opacity:1,transform:hr(1)}],percent:e=>1-Je(e,"opacity"),translate:e=>[{opacity:1-e,transform:hr(1-.2*e)},{opacity:e,transform:hr(.8+.2*e)}]}},Qr={mixins:[nr,Kr],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:Jr,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-sli
87de-bottom uk-transition-opaque"></div> </div>'}),created(){const e=Et(this.template),t=Et(this.selList,e);this.items.forEach(()=>pt(t,"<li>"));const i=Et("[uk-close]",e),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(pt(this.container,e))},computed:{caption:({selCaption:e},t)=>Et(e,t)},events:[{name:`${Kt} ${Xt} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),ne(this.slides,this.clsActive),nt.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el:()=>document,handler({keyCode:e}){if(!this.isToggled(this.$el)||!this.draggable)return;let t=-1;e===zn?t="previous":e===Hn?t="next":e===Fn?t=0:e===jn&&(t="last"),~t&&this.show(t)}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=Jr.scale,ne(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){dt(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:i,type:n,alt:r="",poster:o,attrs:s={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!i)return;let a;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if("image"===n||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const e=eo("img",{src:i,alt:r,...s});ze(e,"load",()=>this.setItem(t,e)),ze(e,"error",()=>this.setError(t))}else if("video"===n||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const e=eo("video",{src:i,poster:o,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...s});ze(e,"loadedmetadata",()=>this.setItem(t,e)),ze(e,"error",()=>this.setError(t))}else if("iframe"===n||i.match(/\.(html|php)($|\?)/i))this.setItem(t,eo("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...s}));else if(a=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,eo("iframe",{src:`https://www.youtube${a[1]||""}.com/embed/${a[2]}${a[3]?`?${a[3]}`:""}`,width:1920,height:1080,...l,...s}));else if(a=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:e,width:n}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(t,eo("iframe",{src:`https://player.vimeo.com/video/${a[1]}${a[2]?`?${a[2]}`:""}`,width:n,height:e,...l,...s}))}catch(e){this.setError(t)}}}],methods:{loadItem(e=this.index){const t=this.getItem(e);this.getSlide(t).childElementCount||Ue(this.$el,"itemload",[t])},getItem(e=this.index){return this.items[X(e,this.slides)]},setItem(e,t){Ue(this.$el,"itemloaded",[this,dt(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),ie(this.$el,"uk-active","uk-transition-active")},hideControls(){ne(this.$el,"uk-active","uk-transition-active")}}};function eo(e,t){const i=xt(`<${e}>`);return J(i,t),i}var to={install:function(e,t){e.lightboxPanel||e.component("lightboxPanel",Qr);p(t.props,e.component("lightboxPanel").options.props)},props:{toggle:String},data:{toggle:"a"},computed:{toggles:({toggle:e},t)=>Tt(e,t)},watch:{toggles(e){this.hide();for(const t of e)ut(t,"a")&&J(t,"role","button")}},disconnected(){this.hide()},events:{name:"click",delegate(){return`${this.toggle}:not(.uk-disabled)`},handler(e){e.preventDefault(),this.show(e.current)}},methods:{show(e){const t=V(this.toggles.map(io),"source");if(_(e)){const{source:i}=io(e);e=h(t,({source:e})=>i===e)}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:t}),ze(this.panel.$el,"hidden",()=>this.panel=null),this.panel.show(e)},hide(){var e;return null==(e=this.panel)?void 0:e.hide()}}};function io(e){const t={};for(const i of["href","caption","type","poster","alt","attrs"])t["href"===i?"source":i]=te(e,i);return t.attrs=cn(t.attrs),t}var no={mixins:[Zn],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:"",pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:function(e){e.notification.closeAll=function(t,i){St(document.body,n=>{const r=e.getComponent(n,"notification");!r||t&&t!==r.group||r.close(i)})}},computed:{marginProp:({pos:e})=>`margin-${e.match(/[a-z]+(?=-)/)[0]}`,startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const e=`${this.clsContainer}-${this.pos}`;let t=Et(`.${e}`,this.container);t&&he(t)||(t=pt(this.container,`<div class="${this.clsContainer} ${e}"></div>`)),this.$mount(pt(t,`<div class="${this.clsMsg}${this.status?` ${this.clsMsg}-${this.status}`:""}" role="alert"> <a href class="${this.clsClose}" data-uk-close></a> <div>${this.message}</div> </div>`))},async connected(){const e=P(Je(this.$el,this.marginProp));await nt.start(Je(this.$el,this.startProps),{opacity:1,[this.marginProp]:e}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(e){e.target.closest('a[href="#"],a[href=""]')&&e.preventDefault(),this.close()},[Qt](){this.timer&&clearTimeout(this.timer)},[ei](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(e){this.timer&&clearTimeout(this.timer),e||await nt.start(this.$el,this.startProps),(e=>{const t=ge(e);Ue(e,"close",[this]),bt(e),(null==t?void 0:t.hasChildNodes())||bt(t)})(this.$el)}}};var ro={props:{media:Boolean},data:{media:!1},connected(){const e=function(e,t){if(C(e))if(l(e,"@"))e=P(Je(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e;return e&&E(e)?`(min-width: ${e}
87px)`:""}(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,Ue(this.$el,We("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=ze(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;null==(e=this.offMediaObj)||e.call(this)}};function oo(e){return Math.ceil(Math.max(0,...Tt("[stroke]",e).map(e=>{try{return e.getTotalLength()}catch(e){return 0}})))}const so={x:co,y:co,rotate:co,scale:co,color:uo,backgroundColor:uo,borderColor:uo,blur:ho,hue:ho,fopacity:ho,grayscale:ho,invert:ho,saturate:ho,sepia:ho,opacity:function(e,t,i){1===i.length&&i.unshift(xo(t,e,""));return i=bo(i),(t,n)=>{t[e]=wo(i,n)}},stroke:function(e,t,i){1===i.length&&i.unshift(0);const n=ko(i),r=oo(t);if(i=bo(i.reverse(),e=>(e=P(e),"%"===n?e*r/100:e)),!i.some(([e])=>e))return W;return Je(t,"strokeDasharray",r),(e,t)=>{e.strokeDashoffset=wo(i,t)}},bgx:fo,bgy:fo},{keys:ao}=Object;var lo={mixins:[ro],props:Co(ao(so),"list"),data:Co(ao(so),void 0),computed:{props(e,t){const i={};for(const t in e)t in so&&!A(e[t])&&(i[t]=e[t].slice());const n={};for(const e in i)n[e]=so[e](e,t,i[e],i);return n}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))Je(this.$el,e,"")},getCss(e){const t={};for(const i in this.props)this.props[i](t,U(e));return t.willChange=Object.keys(t).map(Qe).join(","),t}}};function co(e,t,i){let n,r=ko(i)||{x:"px",y:"px",rotate:"deg"}[e]||"";return"x"===e||"y"===e?(e=`translate${a(e)}`,n=e=>P(P(e).toFixed("px"===r?0:6))):"scale"===e&&(r="",n=e=>{var i;return ko([e])?Ft(e,"width",t,!0)/t["offset"+((null==(i=e.endsWith)?void 0:i.call(e,"vh"))?"Height":"Width")]:P(e)}),1===i.length&&i.unshift("scale"===e?1:0),i=bo(i,n),(t,n)=>{t.transform=`${t.transform||""} ${e}(${wo(i,n)}${r})`}}function uo(e,t,i){return 1===i.length&&i.unshift(xo(t,e,"")),i=bo(i,e=>function(e,t){return xo(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(P)}(t,e)),(t,n)=>{const[r,o,s]=yo(i,n),a=r.map((e,t)=>(e+=s*(o[t]-e),3===t?P(e):parseInt(e,10))).join(",");t[e]=`rgba(${a})`}}function ho(e,t,i){1===i.length&&i.unshift(0);const n=ko(i)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,i=bo(i),(t,r)=>{const o=wo(i,r);t.filter=`${t.filter||""} ${e}(${o+n})`}}function fo(e,t,i,n){1===i.length&&i.unshift(0);const r="bgy"===e?"height":"width";n[e]=bo(i,e=>Ft(e,r,t));const o=["bgx","bgy"].filter(e=>e in n);if(2===o.length&&"bgx"===e)return W;if("cover"===xo(t,"backgroundSize",""))return function(e,t,i,n){const r=function(e){const t=Je(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(go[t])return go[t];const i=new Image;if(t&&(i.src=t,!i.naturalWidth))return i.onload=()=>{go[t]=vo(i),Ue(e,We("load",!1))},vo(i);return go[t]=vo(i)}(t);if(!r.width)return W;const o={width:t.offsetWidth,height:t.offsetHeight},s=["bgx","bgy"].filter(e=>e in n),a={};for(const e of s){const t=n[e].map(([e])=>e),i=Math.min(...t),r=Math.max(...t),s=t.indexOf(i)<t.indexOf(r),l=r-i;a[e]=(s?-l:0)-(s?i:r)+"px",o["bgy"===e?"height":"width"]+=l}const l=Z.cover(r,o);for(const e of s){const i="bgy"===e?"height":"width",n=l[i]-o[i];a[e]=`max(${po(t,e)},-${n}px) + ${a[e]}`}const c=mo(s,a,n);return(e,t)=>{c(e,t),e.backgroundSize=`${l.width}px ${l.height}px`,e.backgroundRepeat="no-repeat"}}(0,t,0,n);const s={};for(const e of o)s[e]=po(t,e);return mo(o,s,n)}function po(e,t){return xo(e,`background-position-${t.substr(-1)}`,"")}function mo(e,t,i){return function(n,r){for(const o of e){const e=wo(i[o],r);n[`background-position-${o.substr(-1)}`]=`calc(${t[o]} + ${e}px)`}}}const go={};function vo(e){return{width:e.naturalWidth,height:e.naturalHeight}}function bo(e,t=P){const i=[],{length:n}=e;let r=0;for(let o=0;o<n;o++){let[s,a]=C(e[o])?e[o].trim().split(/ (?![^(]*\))/):[e[o]];if(s=t(s),a=a?P(a)/100:null,0===o?null===a?a=0:a&&i.push([s,0]):o===n-1&&(null===a?a=1:1!==a&&(i.push([s,a]),a=1)),i.push([s,a]),null===a)r++;else if(r){const e=i[o-r-1][1],t=(a-e)/(r+1);for(let n=r;n>0;n--)i[o-n][1]=e+t*(r-n+1);r=0}}return i}function yo(e,t){const i=h(e.slice(1),([,e])=>t<=e)+1;return[e[i-1][0],e[i][0],(t-e[i-1][1])/(e[i][1]-e[i-1][1])]}function wo(e,t){const[i,n,r]=yo(e,t);return i+Math.abs(i-n)*r*(i<n?1:-1)}const _o=/^-?\d+(?:\.\d+)?(\S+)?/;function ko(e,t){var i;for(const t of e){const e=null==(i=t.match)?void 0:i.call(t,_o);if(e)return e[1]}return t}function xo(e,t,i){const n=e.style[t],r=Je(Je(e,t,i),t);return e.style[t]=n,r}function Co(e,t){return e.reduce((e,i)=>(e[i]=t,e),{})}var So={mixins:[lo],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:({target:e},t)=>Eo(e&&Ee(e,t)||t),start({start:e}){return Ft(e,"height",this.target,!0)},end({end:e,viewport:t}){return Ft(e||(t=100*(1-t))&&`${t}vh+${t}%`,"height",this.target,!0)}},observe:[vn(),bn({target:({target:e})=>e}),fn({target:({$el:e,target:t})=>[e,t,Mi(t,!0)]})],update:{read({percent:e},t){if(t.has("scroll")||(e=!1),!he(this.$el))return!1;if(!this.matchMedia)return;const i=e;return{percent:e=function(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,1-t)}(Ai(this.target,this.start,this.end),this.easing),style:i!==e&&this.getCss(e)}},write({style:e}){this.matchMedia?e&&Je(this.$el,e):this.reset()},events:["scroll","resize"]}};function Eo(e){return e?"offsetTop"in e?e:Eo(ge(e)):document.documentElement}var To={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex();~this.prevIndex&&this.index===e?this._translate(1,this.prevIndex,this.index):this.show(e)},events:["resize"]}},Ao={observe:gn({target:({slides:e})=>e,targets:e=>e.getAdjacentSlides()})};function Io(e,t,i){const n=Do(e,t);return i?n-function(e,t){return Mt(t).width/2-Mt(e).width/2}(e,t):Math.min(n,Mo(t))}function Mo(e){return Math.max(0,Po(e)-Mt(e).width)}function Po(e){return z(ke(e),e=>Mt(e).width)}function Do(e,t){return e&&(Dt(e).left+(qt?Mt(e).width-Mt(t).width:0))*(qt?-1:1)||0}function Oo(e,t){t-=1;const i=Mt(e).width,n=t+i+2;return ke(e).filter(r=>{const o=Do(r,e),s=o+Math.min(Mt(r).width,i);return o>=t&&s<=n})}function Lo(e,t,i){Ue(e,We(t,!1,!1,i))}var Ro={mixins:[en,Zr,To,Ao],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:function(e,t,i,{center:n,easing:r,list:o}){const s=e?Io(e,o,n):Io(t,o,n)+Mt(t).width*i,a=t?Io(t,o,n):s+Mt(e).width*i*(qt?-1:1);let l;return{dir:i,show(t,n=0,s){const c=s?"linear":r;return t-=Math.round(t*U(n,-1,1)),this.translate(n),n=e?n:U(n,0,1),Lo(this.getItemIn(),"itemin",{percent:n,duration:t,timing:c,dir:i}),e&&Lo(this.getItemIn(!0),"itemout",{percent:1-n,duration:t,timing:c,dir:i}),new Promise(e=>{l||(l=e),nt.start(o,{transform:ur(-a*(qt?-1:1),"px")},t,c).then(l,W)})},cancel:()=>nt.cancel(o),reset(){Je(o,"transform","")},async forward(e,t=this.percent()){return await this.cancel(),this.show(e,t,!0)},translate(n){const r=this.getDistance()*i*(qt?-1:1);Je(o,"transform",ur(U(r-r*n-a,-Po(o),Mt(o).width)*(qt?-1:1),"px"));const s=this.getActives(),l=this.getItemIn(),c=this.getItemIn(!0);n=e?U(n,-1,1):0;for(const r of ke(o)){const a=u(s,r),h=r===l,d=r===c;Lo(r,"itemtranslate"+(h||!d&&(a||i*(qt?-1:1)==-1^Do(r,o)>Do(e||t))?"in":"out"),{dir:i,percent:d?1-n:h?n:a?1:0})}},percent:()=>Math.abs((Je(o,"transform").split(",")[4]*(qt?-1:1)+s)/(a-s)),getDistance:()=>Math.abs(a-s),getItemIn(i=!1){let r=this.getActives(),s=Oo(o,Io(t||e,o,n));if(i){const e=r;r=s,s=e}return s[h(s,e=>!u(r,e))]},getActives:()=>Oo(o,Io(e||t,o,n))}}},computed:{avgWidth(){return Po(this.list)/this.length},finite({finite:e}){return e||function(e,t){if(!e||e.length<2)return!0;const{width:i}=Mt(e);
87if(!t)return Math.ceil(Po(e))<Math.trunc(i+function(e){return Math.max(0,...ke(e).map(e=>Mt(e).width))}(e));const n=ke(e),r=Math.trunc(i/2);for(const e in n){const t=n[e],i=Mt(t).width,o=new Set([t]);let s=0;for(const t of[-1,1]){let a=i/2,l=0;for(;a<r;){const i=n[X(+e+t+l++*t,n)];if(o.has(i))return!0;a+=Mt(i).width,o.add(i)}s=Math.max(s,i/2+Mt(n[X(+e+t,n)]).width/2-(a-r))}if(s>z(n.filter(e=>!o.has(e)),e=>Mt(e).width))return!0}return!1}(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return N(this.sets);let e=0;const t=Mo(this.list),i=h(this.slides,i=>{if(e>=t)return!0;e+=Mt(i).width});return~i?i:this.length-1},sets({sets:e}){if(!e)return;let t=0;const i=[],n=Mt(this.list).width;for(let e=0;e<this.length;e++){const r=Mt(this.slides[e]).width;t+r>n&&(t=0),this.center?t<n/2&&t+r+Mt(X(+e+1,this.slides)).width/2>n/2&&(i.push(+e),t=n/2-r/2):0===t&&i.push(Math.min(+e,this.maxIndex)),t+=r}return i.length?i:void 0},transitionOptions(){return{center:this.center,list:this.list}},slides(){return ke(this.list).filter(he)}},connected(){ae(this.$el,this.clsContainer,!Et(`.${this.clsContainer}`,this.$el))},observe:fn({target:({slides:e})=>e}),update:{write(){for(const e of this.navItems){const t=M(te(e,this.attrItem));!1!==t&&(e.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!u(this.sets,t))}!this.length||this.dragging||this.stack.length||(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(e){!this.dragging&&this.sets&&this.stack.length<2&&!u(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let e=0;e<t;e++)this.stack.splice(1,0,this.dir>0?"next":"previous");return void e.preventDefault()}const i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=Xr(this.avgWidth/this.velocity)*(Mt(this.slides[i]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&ie(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite)return void Je(this.slides,"order","");const e=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((t,i)=>Je(t,"order",this.dir>0&&i<e?1:this.dir<0&&i>=this.index?-1:"")),!this.center)return;const t=this.slides[e];let i=Mt(this.list).width/2-Mt(t).width/2,n=0;for(;i>0;){const t=this.getIndex(--n+e,e),r=this.slides[t];Je(r,"order",t>e?-2:-1),i-=Mt(r).width}},updateActiveClasses(){const e=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||u(this.sets,P(this.index)))&&this.clsActivated||""];for(const n of this.slides){const r=u(e,n);ae(n,t,r),J(n,"aria-hidden",!r);for(const e of Tt(pe,n))i(e,"_tabindex")||(e._tabindex=J(e,"tabindex")),J(e,"tabindex",r?e._tabindex:-1)}},getValidIndex(e=this.index,t=this.prevIndex){if(e=this.getIndex(e,t),!this.sets)return e;let i;do{if(u(this.sets,e))return e;i=e,e=this.getIndex(e+this.dir,t)}while(e!==i);return e},getAdjacentSlides(){const{width:e}=Mt(this.list),t=-e,i=2*e,n=Mt(this.slides[this.index]).width,r=this.center?e/2-n/2:0,o=new Set;for(const e of[-1,1]){let s=r+(e>0?n:0),a=0;do{const t=this.slides[this.getIndex(this.index+e+a++*e)];s+=Mt(t).width*e,o.add(t)}while(this.length>a&&s>t&&s<i)}return Array.from(o)}}};var Bo={mixins:[lo],data:{selItem:"!li"},beforeConnect(){this.item=Ee(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,duration:i,timing:n,dir:r}}){ii.read(()=>{if(!this.matchMedia)return;const o=this.getCss(jo(e,r,t)),s=this.getCss(No(e)?.5:r>0?1:0);ii.write(()=>{Je(this.$el,o),nt.start(this.$el,s,i,n).catch(W)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){nt.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,dir:i}}){ii.read(()=>
87{if(!this.matchMedia)return void this.reset();const n=this.getCss(jo(e,i,t));ii.write(()=>Je(this.$el,n))})}}]};function No(e){return c(e,"in")}function jo(e,t,i){return i/=2,No(e)^t<0?i:1-i}var Fo={...lr,fade:{show:()=>[{opacity:0,zIndex:0},{zIndex:-1}],percent:e=>1-Je(e,"opacity"),translate:e=>[{opacity:1-e,zIndex:0},{zIndex:-1}]},scale:{show:()=>[{opacity:0,transform:hr(1.5),zIndex:0},{zIndex:-1}],percent:e=>1-Je(e,"opacity"),translate:e=>[{opacity:1-e,transform:hr(1+.5*e),zIndex:0},{zIndex:-1}]},pull:{show:e=>e<0?[{transform:ur(30),zIndex:-1},{transform:ur(),zIndex:0}]:[{transform:ur(-100),zIndex:0},{transform:ur(),zIndex:-1}],percent:(e,t,i)=>i<0?1-cr(t):cr(e),translate:(e,t)=>t<0?[{transform:ur(30*e),zIndex:-1},{transform:ur(-100*(1-e)),zIndex:0}]:[{transform:ur(100*-e),zIndex:0},{transform:ur(30*(1-e)),zIndex:-1}]},push:{show:e=>e<0?[{transform:ur(100),zIndex:0},{transform:ur(),zIndex:-1}]:[{transform:ur(-30),zIndex:-1},{transform:ur(),zIndex:0}],percent:(e,t,i)=>i>0?1-cr(t):cr(e),translate:(e,t)=>t<0?[{transform:ur(100*e),zIndex:0},{transform:ur(-30*(1-e)),zIndex:-1}]:[{transform:ur(-30*e),zIndex:-1},{transform:ur(100*(1-e)),zIndex:0}]}};const zo=Gt&&CSS.supports("aspect-ratio","1/1");var Vo={mixins:[en,Kr,To,Ao],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:Fo},watch:{list(e){e&&zo&&Je(e,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||zo)return!1;let[e,t]=this.ratio.split(":").map(Number);return t=t*this.list.offsetWidth/e||0,this.minHeight&&(t=Math.max(this.minHeight,t)),this.maxHeight&&(t=Math.min(this.maxHeight,t)),{height:t-Nt(this.list,"height","content-box")}},write({height:e}){e>0&&Je(this.list,"minHeight",e)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}},Ho={mixins:[en,Ln],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const e of["init","start","move","end"]){const t=this[e];this[e]=e=>{p(this.pos,Xe(e)),t(e)}}},events:{name:Xt,passive:!1,handler:"init"},computed:{target:(e,t)=>(t.tBodies||[t])[0],items(){return ke(this.target)},isEmpty(){return T(this.items)},handles({handle:e},t){return e?Tt(e,t):this.items}},watch:{isEmpty(e){ae(this.target,this.clsEmpty,e)},handles(e,t){Je(t,{touchAction:"",userSelect:""}),Je(e,{touchAction:Yt?"none":"",userSelect:"none"})}},update:{write(e){if(!this.drag||!ge(this.placeholder))return;const{pos:{x:t,y:i},origin:{offsetTop:n,offsetLeft:r},placeholder:o}=this;Je(this.drag,{top:i-n,left:t-r});const s=this.getSortable(document.elementFromPoint(t,i));if(!s)return;const{items:a}=s;if(a.some(nt.inProgress))return;const l=function(e,t){return e[h(e,e=>G(t,e.getBoundingClientRect()))]}(a,{x:t,y:i});if(a.length&&(!l||l===o))return;const c=this.getSortable(o),u=function(e,t,i,n,r,o){if(!ke(e).length)return;const s=t.getBoundingClientRect();if(!o)return function(e,t){const i=1===ke(e).length;i&&pt(e,t);const n=ke(e),r=n.some((e,t)=>{const i=e.getBoundingClientRect();return n.slice(t+1).some(e=>{const t=e.getBoundingClientRect();return!Wo([i.left,i.right],[t.left,t.right])})});i&&bt(t);return r}(e,i)||r<s.top+s.height/2?t:t.nextElementSibling;const a=i.getBoundingClientRect(),l=Wo([s.top,s.bottom],[a.top,a.bottom]),[c,u,h,d]=l?[n,"width","left","right"]:[r,"height","top","bottom"],f=a[u]<s[u]?s[u]-a[u]:0;if(a[h]<s[h])return!(f&&c<s[h]+f)&&t.nextElementSibling;if(f&&c>s[d]-f)return!1;return t}(s.target,l,o,t,i,s===c&&e.moved!==l);!1!==u&&(u&&o===u||(s!==c?(c.remove(o),e.moved=l):delete e.moved,s.insert(o,u),this.touched.add(s)))},events:["move"]},methods:{init(e){const{target:t,button:i,defaultPrevented:n}=e,[r]=this.items.filter(e=>e.contains(t));!r||n||i>0||fe(t)||t.closest(`.${this.clsNoDrag}`)||this.handle&&!t.closest(this.handle)||(e.preventDefault(),this.touched=new Set([this]),this.placeholder=r,this.origin={target:t,index:xe(r),...this.pos},ze(document,Kt,this.move),ze(document,Jt,this.end),this.threshold||this.start(e))},start(e){this.drag=function(e,t){let i;
87if(ut(t,"li","tr")){i=Et("<div>"),pt(i,t.cloneNode(!0).children);for(const e of t.getAttributeNames())J(i,e,t.getAttribute(e))}else i=t.cloneNode(!0);return pt(e,i),Je(i,"margin","0","important"),Je(i,{boxSizing:"border-box",width:t.offsetWidth,height:t.offsetHeight,padding:Je(t,"padding")}),Lt(i.firstElementChild,Lt(t.firstElementChild)),i}(this.$container,this.placeholder);const{left:t,top:i}=this.placeholder.getBoundingClientRect();p(this.origin,{offsetLeft:this.pos.x-t,offsetTop:this.pos.y-i}),ie(this.drag,this.clsDrag,this.clsCustom),ie(this.placeholder,this.clsPlaceholder),ie(this.items,this.clsItem),ie(document.documentElement,this.clsDragState),Ue(this.$el,"start",[this,this.placeholder]),function(e){let t=Date.now();Uo=setInterval(()=>{let{x:i,y:n}=e;n+=document.scrollingElement.scrollTop;const r=.3*(Date.now()-t);t=Date.now(),Ii(document.elementFromPoint(i,e.y)).reverse().some(e=>{let{scrollTop:t,scrollHeight:i}=e;const{top:o,bottom:s,height:a}=Di(e);if(o<n&&o+35>n)t-=r;else{if(!(s>n&&s-35<n))return;t+=r}if(t>0&&t<i-a)return e.scrollTop=t,!0})},15)}(this.pos),this.move(e)},move(e){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(e)},end(){if(Ve(document,Kt,this.move),Ve(document,Jt,this.end),!this.drag)return;clearInterval(Uo);const e=this.getSortable(this.placeholder);this===e?this.origin.index!==xe(this.placeholder)&&Ue(this.$el,"moved",[this,this.placeholder]):(Ue(e.$el,"added",[e,this.placeholder]),Ue(this.$el,"removed",[this,this.placeholder])),Ue(this.$el,"stop",[this,this.placeholder]),bt(this.drag),this.drag=null;for(const{clsPlaceholder:e,clsItem:t}of this.touched)for(const i of this.touched)ne(i.items,e,t);this.touched=null,ne(document.documentElement,this.clsDragState)},insert(e,t){ie(this.items,this.clsItem);this.animate(()=>t?mt(t,e):pt(this.target,e))},remove(e){this.target.contains(e)&&this.animate(()=>bt(e))},getSortable(e){do{const t=this.$getComponent(e,"sortable");if(t&&(t===this||!1!==this.group&&t.group===this.group))return t}while(e=ge(e))}}};let Uo;function Wo(e,t){return e[1]>t[0]&&t[1]>e[0]}var $o={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:"bottom-"+(qt?"right":"left"),offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=u(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(e,t,i){let n=[this.getPositionOffset(e),this.getShiftOffset(e)];const r=[this.flip&&"flip",this.shift&&"shift"],o={element:[this.inset?this.dir:jt(this.dir),this.align],target:[this.dir,this.align]};if("y"===this.axis){for(const e in o)o[e].reverse();n.reverse(),r.reverse()}const s=function(e){const t=Mi(e),{scrollTop:i}=t;return()=>{i!==t.scrollTop&&(t.scrollTop=i)}}(e),a=Mt(e);Je(e,{top:-a.height,left:-a.width}),ji(e,t,{attach:o,offset:n,boundary:i,placement:r,viewportOffset:this.getViewportOffset(e)}),s()},getPositionOffset(e){return Ft(!1===this.offset?Je(e,"--uk-position-offset"):this.offset,"x"===this.axis?"width":"height",e)*(u(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(e){return"center"===this.align?0:Ft(Je(e,"--uk-position-shift-offset"),"y"===this.axis?"width":"height",e)*(u(["left","top"],this.align)?1:-1)},getViewportOffset:e=>Ft(Je(e,"--uk-position-viewport-offset"))}};var Go={mixins:[Zn,Jn,$o],data:{pos:"top",animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},connected(){var e;me(e=this.$el)||J(e,"tabindex","0")},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:e=0,title:t}=function(e){const{el:t,id:i,data:n}=e;return["delay","title"].reduce((e,i)=>({[i]:te(t,i),...e}),{...cn(te(t,i),["title"]),...n})}(this.$options);if(!t)return;const i=J(this.$el,"title"),n=ze(this.$el,["blur",ei],e=>!Ze(e)&&this.hide());this.reset=()=>{J(this.$el,{title:i,"aria-describedby":null}),n()};const r=qr(this);J(this.$el,{title:null,"aria-describedby":r}),clearTimeout(this.showTimer),this.showTimer=setTimeout(()=>this._show(t,r),e)},async hide(){var e;be(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),null==(e=this.reset)||e.call(this),bt(this.tooltip),this.tooltip=null)},async _show(e,t){this.tooltip=pt(this.container,`<div id="${t}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${e}</div> </div>`),ze(this.tooltip,"toggled",(e,t)=>{if(!t)return;const i=()=>this.positionAt(this.tooltip,this.$el);i();const[n,r]=function(e,t,[i,n]){const r=Pt(e),o=Pt(t),s=[["left","right"],["top","bottom"]];for(const e of s){if(r[e[0]]>=o[e[1]]){i=e[1];break}if(r[e[1]]<=o[e[0]]){i=e[0];break}}const a=u(s[0],i)?s[1]:s[0];n=r[a[0]]===o[a[0]]?a[0]:r[a[1]]===o[a[1]]?a[1]:"center";return[i,n]}(this.tooltip,this.$el,this.pos);this.origin="y"===this.axis?`${jt(n)}-${r}`:`${r}-${jt(n)}`;const o=[He(document,`keydown ${Xt}`,this.hide,!1,e=>e.type===Xt&&!this.$el.contains(e.target)||"keydown"===e.type&&e.keyCode===Bn),ze([document,...Pi(this.$el)],"scroll",i,{passive:!0})];He(this.tooltip,"hide",()=>
87o.forEach(e=>e()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{[`focus ${Qt} ${Xt}`](e){Ze(e)||this.show()}}};var qo={mixins:[fr],i18n:{invalidMime:"Invalid File Type: %s",invalidName:"Invalid File Name: %s",invalidSize:"Invalid File Size: %s Kilobytes Max"},props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,multiple:!1,name:"files[]",params:{},type:"",url:"",abort:W,beforeAll:W,beforeSend:W,complete:W,completeAll:W,error:W,fail:W,load:W,loadEnd:W,loadStart:W,progress:W},events:{change(e){be(e.target,'input[type="file"]')&&(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){Zo(e);const t=e.dataTransfer;(null==t?void 0:t.files)&&(ne(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){Zo(e)},dragover(e){Zo(e),ie(this.$el,this.clsDragover)},dragleave(e){Zo(e),ne(this.$el,this.clsDragover)}},methods:{async upload(e){if(!(e=f(e)).length)return;Ue(this.$el,"upload",[e]);for(const t of e){if(this.maxSize&&1e3*this.maxSize<t.size)return void this.fail(this.t("invalidSize",this.maxSize));if(this.allow&&!Yo(this.allow,t.name))return void this.fail(this.t("invalidName",this.allow));if(this.mime&&!Yo(this.mime,t.type))return void this.fail(this.t("invalidMime",this.mime))}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=function(e,t){const i=[];for(let n=0;n<e.length;n+=t)i.push(e.slice(n,n+t));return i}(e,this.concurrent),i=async e=>{const n=new FormData;e.forEach(e=>n.append(this.name,e));for(const e in this.params)n.append(e,this.params[e]);try{const e=await function(e,t){const i={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:W,responseType:"",...t};return Promise.resolve().then(()=>i.beforeSend(i)).then(()=>function(e,t){return new Promise((i,n)=>{const{xhr:r}=t;for(const e in t)if(e in r)try{r[e]=t[e]}catch(e){}r.open(t.method.toUpperCase(),e);for(const e in t.headers)r.setRequestHeader(e,t.headers[e]);ze(r,"load",()=>{0===r.status||r.status>=200&&r.status<300||304===r.status?i(r):n(p(Error(r.statusText),{xhr:r,status:r.status}))}),ze(r,"error",()=>n(p(Error("Network Error"),{xhr:r}))),ze(r,"timeout",()=>n(p(Error("Network Timeout"),{xhr:r}))),r.send(t.data)})}(e,i))}(this.url,{data:n,method:this.method,responseType:this.type,beforeSend:e=>{const{xhr:t}=e;ze(t.upload,"progress",this.progress);for(const e of["loadStart","load","loadEnd","abort"])ze(t,e.toLowerCase(),this[e]);return this.beforeSend(e)}});this.complete(e),t.length?await i(t.shift()):this.completeAll(e)}catch(e){this.error(e)}};await i(t.shift())}}};function Yo(e,t){return t.match(new RegExp(`^${e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")}$`,"i"))}function Zo(e){e.preventDefault(),e.stopPropagation()}var Xo=Object.freeze({__proto__:null,Countdown:nn,Filter:Wn,Lightbox:to,LightboxPanel:Qr,Notification:no,Parallax:So,Slider:Ro,SliderParallax:Bo,Slideshow:Vo,SlideshowParallax:Bo,Sortable:Ho,Tooltip:Go,Upload:qo});function Ko(e){Ue(document,"uikit:init",e),document.body&&St(document.body,es),new MutationObserver(e=>e.forEach(Jo)).observe(document,{subtree:!0,childList:!0}),new MutationObserver(e=>e.forEach(Qo)).observe(document,{subtree:!0,attributes:!0}),e._initialized=!0}function Jo({addedNodes:e,removedNodes:t}){for(const t of e)St(t,es);for(const e of t)St(e,ts)}function Qo({target:e,attributeName:t}){var i;const n=is(t);if(n){if(Q(e,t))return void Vr(n,e);null==(i=Ur(e,n))||i.$destroy()}}function es(e){const t=Hr(e);for(const i in Hr(e))Or(t[i]);for(const t of e.getAttributeNames()){const i=is(t);i&&Vr(i,e)}}function ts(e){const t=Hr(e);for(const i in Hr(e))Lr(t[i])}function is(e){l(e,"data-")&&(e=e.slice(5));const t=Fr[e];return t&&(v(t)?t:t.options).name}!function(e){let t;e.component=zr,e.getComponents=Hr,e.getComponent=Ur,e.update=Wr,e.use=function(e){if(!e.installed)return e.call(null,this),e.installed=!0,this},e.mixin=function(e,t){(t=(C(t)?this.component(t):t)||this).options=ln(t.options,e)},e.extend=function(e){e||(e={});const t=this,i=function(e){Br(this,e)};return(i.prototype=Object.create(t.prototype)).constructor=i,i.options=ln(t.options,e),i.super=t,i.extend=t.extend,i},Object.defineProperty(e,"container",{get:()=>t||document.body,set(e){t=Et(e)}})}(Nr),function(e){e.prototype.$mount=function(e){const t=this;!function(e,t){e[jr]||(e[jr]={}),e[jr][t.$options.name]=t}(e,t),t.$options.el=e,document.contains(e)&&Or(t)},e.prototype.$destroy=function(e=!1){const t=this,{el:i}=t.$options;i&&Lr(t),Dr(t,"destroy"),function(e,t){var i;null==(i=e[jr])||delete i[t.$options.name],T(e[jr])||delete e[jr]}(i,t),e&&bt(t.$el)},e.prototype.$create=Vr,e.prototype.$emit=function(e){dn(this,e)},e.prototype.$update=function(e=this.$el,t){Wr(e,t)},e.prototype.$reset=function(){Lr(this),Or(this)},e.prototype.$getComponent=Ur,Object.defineProperties(e.prototype,{$el:{get(){return this.$options.el}},$container:Object.getOwnPropertyDescriptor(e,"container")})}(Nr);var ns={mixins:[en,Jn],props:{animation:Boolean,targets:String,active:null,collapsible:Boolean,multiple:Boolean,toggle:String,content:String,offset:Number},data:{targets:"> *",active:!1,animation:!0,collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",offset:0},computed:{items:({targets:e},t)=>Tt(e,t),toggles({toggle:e}){return this.items.map(t=>Et(e,t))},contents({content:e}){return this.items.map(t=>{var i;return(null==(i=t._wrapper)?void 0:i.firstElementChild)||Et(e,t)})}},watch:{items(e,t){if(t||se(e,this.clsOpen))return;const i=!1!==this.active&&e[Number(this.active)]||!this.collapsible&&e[0];i&&this.toggle(i,!1)},toggles(){this.$emit()},contents(e){for(const t of e){const e=se(this.items.find(e=>e.contains(t)),this.clsOpen);rs(t,!e)}this.$emit()}},observe:gn(),events:[{name:"click keydown",delegate(){return`${this.targets} ${this.$props.toggle}`},async handler(e){var t;"keydown"===e.type&&e.keyCode!==Nn||(e.preventDefault(),null==(t=this._off)||t.call(this),this._off=function(e){const t=Mi(e,!0);let i;return function n(){i=requestAnimationFrame(()=>{const{top:i}=e.getBoundingClientRect();i<0&&(t.scrollTop+=i),n()})}(),()=>requestAnimationFrame(()=>cancelAnimationFrame(i))}(e.target),await this.toggle(xe(this.toggles,e.current)),this._off())}},{name:"shown hidden",self:!0,delegate(){return this.targets},handler(){this.$emit()}}],update(){const e=ve(this.items,`.${this.clsOpen}`);for(const t in this.items){const i=this.toggles[t],n=this.contents[t];if(!i||!n)continue;i.id=qr(this,i),n.id=qr(this,n);const r=u(e,this.items[t]);J(i,{role:ut(i,"a")?"button":null,"aria-controls":n.id,"aria-expanded":r,"aria-disabled":!this.collapsible&&e.length<2&&r}),J(n,{role:"region","aria-labelledby":i.id}),ut(n,"ul")&&J(ke(n),"role","presentation")}},methods:{toggle(e,t){let i=[e=this.items[X(e,this.items)]];const n=ve(this.items,`.${this.clsOpen}`);
87if(this.multiple||u(n,i[0])||(i=i.concat(n)),!(!this.collapsible&&n.length<2&&u(n,e)))return Promise.all(i.map(e=>this.toggleElement(e,!u(n,e),(e,i)=>{if(ae(e,this.clsOpen,i),!1!==t&&this.animation)return async function(e,t,{content:i,duration:n,velocity:r,transition:o}){var s;i=(null==(s=e._wrapper)?void 0:s.firstElementChild)||Et(i,e),e._wrapper||(e._wrapper=yt(i,"<div>"));const a=e._wrapper;Je(a,"overflow","hidden");const l=P(Je(a,"height"));await nt.cancel(a),rs(i,!1);const c=z(["marginTop","marginBottom"],e=>Je(i,e))+Mt(i).height,u=l/c;n=(r*c+n)*(t?1-u:u),Je(a,"height",l),await nt.start(a,{height:t?c:0},n,o),_t(i),delete e._wrapper,t||rs(i,!0)}(e,i,this);rs(Et(this.content,e),!i)})))}}};function rs(e,t){e&&(e.hidden=t)}var os={mixins:[en,Jn],args:"animation",props:{animation:Boolean,close:String},data:{animation:!0,selClose:".uk-alert-close",duration:150},events:{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.close()}},methods:{async close(){await this.toggleElement(this.$el,!1,ss),this.$destroy(!0)}}};function ss(e,t,{duration:i,transition:n,velocity:r}){const o=P(Je(e,"height"));return Je(e,"height",o),nt.start(e,{height:0,marginTop:0,marginBottom:0,paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,opacity:0},r*o+i,n)}var as={args:"autoplay",props:{automute:Boolean,autoplay:Boolean},data:{automute:!1,autoplay:!0},connected(){"inview"!==this.autoplay||Q(this.$el,"preload")||(this.$el.preload="none"),ut(this.$el,"iframe")&&!Q(this.$el,"allow")&&(this.$el.allow="autoplay"),this.automute&&vi(this.$el)},observe:[pn({filter:({$el:e,autoplay:t})=>t&&bi(e),handler([{isIntersecting:e}]){e?mi(this.$el):gi(this.$el)},args:{intersecting:!1},options:({$el:e,autoplay:t})=>({root:"inview"===t?null:ge(e)})})]},ls={mixins:[as],props:{width:Number,height:Number},data:{automute:!0},events:{"load loadedmetadata"(){this.$emit("resize")}},observe:fn({target:({$el:e})=>[cs(e)||ge(e)],filter:({$el:e})=>!us(e)}),update:{read(){if(us(this.$el))return;const{ratio:e,cover:t}=Z,{$el:i,width:n,height:r}=this;let o={width:n,height:r};if(!n||!r){const t={width:i.naturalWidth||i.videoWidth||i.clientWidth,height:i.naturalHeight||i.videoHeight||i.clientHeight};o=n?e(t,"width",n):r?e(t,"height",r):t}const{offsetHeight:s,offsetWidth:a}=cs(i)||ge(i),l=t(o,{width:a+(a%2?1:0),height:s+(s%2?1:0)});return!(!l.width||!l.height)&&l},write({height:e,width:t}){Je(this.$el,{height:e,width:t})},events:["resize"]}};function cs(e){for(;e=ge(e);)if("static"!==Je(e,"position"))return e}function us(e){return ut(e,"img","video")}let hs;var ds={mixins:[Zn,$o,Jn],args:"pos",props:{mode:"list",toggle:Boolean,boundary:Boolean,boundaryX:Boolean,boundaryY:Boolean,target:Boolean,targetX:Boolean,targetY:Boolean,stretch:Boolean,delayShow:Number,delayHide:Number,autoUpdate:Boolean,clsDrop:String,animateOut:Boolean,bgScroll:Boolean,closeOnScroll:Boolean},data:{mode:["click","hover"],toggle:"- *",boundary:!1,boundaryX:!1,boundaryY:!1,target:!1,targetX:!1,targetY:!1,stretch:!1,delayShow:0,delayHide:800,autoUpdate:!0,clsDrop:!1,animateOut:!1,bgScroll:!0,animation:["uk-animation-fade"],cls:"uk-open",container:!1,closeOnScroll:!1},computed:{boundary:({boundary:e,boundaryX:t,boundaryY:i},n)=>[Ee(t||e,n)||window,Ee(i||e,n)||window],target({target:e,targetX:t,targetY:i},n){return t||(t=e||this.targetEl),i||(i=e||this.targetEl),[!0===t?window:Ee(t,n),!0===i?window:Ee(i,n)]}},created(){this.tracker=new li},beforeConnect(){this.clsDrop=this.$props.clsDrop||`uk-${this.$options.name}`},connected(){ie(this.$el,"uk-drop",this.clsDrop),this.toggle&&!this.targetEl&&(this.targetEl=function(e){const{$el:t}=e.$create("toggle",Ee(e.toggle,e.$el),{target:e.$el,mode:e.mode});return J(t,"aria-haspopup",!0),t}(this)),this._style=H(this.$el.style,["width","height"])},disconnected(){this.isActive()&&(this.hide(!1),hs=null),Je(this.$el,this._style)},observe:gn({target:({toggle:e,$el:t})=>Ee(e,t),targets:({$el:e})=>e}),events:[{name:"click",delegate:()=>".uk-drop-close",handler(e){e.preventDefault(),this.hide(!1)}},{name:"click",delegate:()=>'a[href*="#"]',handler({defaultPrevented:e,current:t}){const{hash:i}=t;!e&&i&&Ce(t)&&!this.$el.contains(Et(i))&&this.hide(!1)}},{name:"beforescroll",handler(){this.hide(!1)}},{name:"toggle",self:!0,handler(e,t){e.preventDefault(),this.isToggled()?this.hide(!1):this.show(null==t?void 0:t.$el,!1)}},{name:"toggleshow",self:!0,handler(e,t){e.preventDefault(),this.show(null==t?void 0:t.$el)}},{name:"togglehide",self:!0,handler(e){e.preventDefault(),be(this.$el,":focus,:hover")||this.hide()}},{name:`${Qt} focusin`,filter(){return u(this.mode,"hover")},handler(e){Ze(e)||this.clearTimers()}},{name:`${ei} focusout`,filter(){return u(this.mode,"hover")},handler(e){!Ze(e)&&e.relatedTarget&&this.hide()}},{name:"toggled",self:!0,handler(e,t){t&&(this.clearTimers(),this.position())}}
87,{name:"show",self:!0,handler(){hs=this,this.tracker.init(),J(this.targetEl,"aria-expanded",!0);const e=[fs(this),ms(this),vs(this),this.autoUpdate&&ps(this),this.closeOnScroll&&gs(this),!this.bgScroll&&Kn(this.$el)];He(this.$el,"hide",()=>e.forEach(e=>e&&e()),{self:!0})}},{name:"beforehide",self:!0,handler(){this.clearTimers()}},{name:"hide",handler({target:e}){this.$el===e?(hs=this.isActive()?null:hs,this.tracker.cancel(),J(this.targetEl,"aria-expanded",null)):hs=null===hs&&this.$el.contains(e)&&this.isToggled()?this:hs}}],update:{write(){this.isToggled()&&!se(this.$el,this.clsEnter)&&this.position()}},methods:{show(e=this.targetEl,t=!0){if(this.isToggled()&&e&&this.targetEl&&e!==this.targetEl&&this.hide(!1,!1),this.targetEl=e,this.clearTimers(),!this.isActive()){if(hs){if(t&&hs.isDelaying)return void(this.showTimer=setTimeout(()=>be(e,":hover")&&this.show(),10));let i;for(;hs&&i!==hs&&!hs.$el.contains(this.$el);)i=hs,hs.hide(!1,!1)}this.container&&ge(this.$el)!==this.container&&pt(this.container,this.$el),this.showTimer=setTimeout(()=>this.toggleElement(this.$el,!0),t&&this.delayShow||0)}},hide(e=!0,t=!0){const i=()=>this.toggleElement(this.$el,!1,this.animateOut&&t);this.clearTimers(),this.isDelayedHide=e,this.isDelaying=function(e){const t=[];return St(e,e=>"static"!==Je(e,"position")&&t.push(e)),t}(this.$el).some(e=>this.tracker.movesTo(e)),e&&this.isDelaying?this.hideTimer=setTimeout(this.hide,50):e&&this.delayHide?this.hideTimer=setTimeout(i,this.delayHide):i()},clearTimers(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive(){return hs===this},position(){ne(this.$el,"uk-drop-stack"),Je(this.$el,this._style),this.$el.hidden=!0;const e=this.target.map(e=>function(e,t){return Di(Pi(t).find(t=>t.contains(e)))}(this.$el,e)),t=this.getViewportOffset(this.$el),i=[[0,["x","width","left","right"]],[1,["y","height","top","bottom"]]];for(const[n,[r,o]]of i)this.axis!==r&&u([r,!0],this.stretch)&&Je(this.$el,{[o]:Math.min(Pt(this.boundary[n])[o],e[n][o]-2*t),[`overflow-${r}`]:"auto"});const n=e[0].width-2*t;this.$el.hidden=!1,Je(this.$el,"maxWidth",""),this.$el.offsetWidth>n&&ie(this.$el,"uk-drop-stack"),Je(this.$el,"maxWidth",n),this.positionAt(this.$el,this.target,this.boundary);for(const[n,[r,o,s,a]]of i)if(this.axis===r&&u([r,!0],this.stretch)){const i=Math.abs(this.getPositionOffset(this.$el)),l=Pt(this.target[n]),c=Pt(this.$el);Je(this.$el,{[o]:(l[s]>c[s]?l[this.inset?a:s]-Math.max(Pt(this.boundary[n])[s],e[n][s]+t):Math.min(Pt(this.boundary[n])[a],e[n][a]-t)-l[this.inset?s:a])-i,[`overflow-${r}`]:"auto"}),this.positionAt(this.$el,this.target,this.boundary)}}}};function fs(e){const t=()=>e.$emit(),i=[di(t),hi(Pi(e.$el).concat(e.target),t)];return()=>i.map(e=>e.disconnect())}function ps(e,t=()=>e.$emit()){return ze([document,...Pi(e.$el)],"scroll",t,{passive:!0})}function ms(e){return ze(document,"keydown",t=>{t.keyCode===Bn&&e.hide(!1)})}function gs(e){return ps(e,()=>e.hide(!1))}function vs(e){return ze(document,Xt,({target:t})=>{e.$el.contains(t)||He(document,`${Jt} ${ti} scroll`,({defaultPrevented:i,type:n,target:r})=>{i||n!==Jt||t!==r||e.targetEl&&we(t,e.targetEl)||e.hide(!1)},!0)})}var bs={mixins:[en,Zn],props:{align:String,clsDrop:String,boundary:Boolean,dropbar:Boolean,dropbarAnchor:Boolean,duration:Number,mode:Boolean,offset:Boolean,stretch:Boolean,delayShow:Boolean,delayHide:Boolean,target:Boolean,targetX:Boolean,targetY:Boolean,animation:Boolean,animateOut:Boolean,closeOnScroll:Boolean},data:{align:qt?"right":"left",clsDrop:"uk-dropdown",clsDropbar:"uk-dropnav-dropbar",boundary:!0,dropbar:!1,dropbarAnchor:!1,duration:200,container:!1,selNavItem:"> li > a, > ul > li > a"},computed:{dropbarAnchor:({dropbarAnchor:e},t)=>Ee(e,t)||t,dropbar({dropbar:e}){return e?(e=this._dropbar||Ee(e,this.$el)||Et(`+ .${this.clsDropbar}`,this.$el))||(this._dropbar=Et("<div></div>")):null},dropbarOffset:()=>0,dropContainer(e,t){return this.container||t},dropdowns({clsDrop:e},t){var i;const n=Tt(`.${e}`,t);if(this.dropContainer!==t)for(const t of Tt(`.${e}`,this.dropContainer)){const e=null==(i=this.getDropdown(t))?void 0:i.targetEl;!u(n,t)&&e&&this.$el.contains(e)&&n.push(t)}return n},items:({selNavItem:e},t)=>Tt(e,t)},watch:{dropbar(e){ie(e,"uk-dropbar","uk-dropbar-top",this.clsDropbar,`uk-${this.$options.name}-dropbar`)},dropdowns(){this.initializeDropdowns()}},connected(){this.initializeDropdowns()},disconnected(){bt(this._dropbar),delete this._dropbar},events:[{name:"mouseover focusin",delegate(){return this.selNavItem},handler({current:e}){const t=this.getActive();t&&u(t.mode,"hover")&&t.targetEl&&!e.contains(t.targetEl)&&!t.isDelaying&&t.hide(!1)}},{name:"keydown",self:!0,delegate(){return this.selNavItem},handler(e){var t;const{current:i,keyCode:n}=e,r=this.getActive();n===Un&&(null==r?void 0:r.targetEl)===i&&(e.preventDefault(),null==(t=Et(pe,r.$el))||t.focu
87s()),ys(e,this.items,r)}},{name:"keydown",el(){return this.dropContainer},delegate(){return`.${this.clsDrop}`},handler(e){var t;const{current:i,keyCode:n}=e;if(!u(this.dropdowns,i))return;const r=this.getActive();let o=-1;if(n===Fn?o=0:n===jn?o="last":n===Vn?o="previous":n===Un?o="next":n===Bn&&(null==(t=r.targetEl)||t.focus()),~o){e.preventDefault();const t=Tt(pe,i);t[X(o,t,h(t,e=>be(e,":focus")))].focus()}ys(e,this.items,r)}},{name:"mouseleave",el(){return this.dropbar},filter(){return this.dropbar},handler(){const e=this.getActive();e&&u(e.mode,"hover")&&!this.dropdowns.some(e=>be(e,":hover"))&&e.hide()}},{name:"beforeshow",el(){return this.dropContainer},filter(){return this.dropbar},handler({target:e}){this.isDropbarDrop(e)&&(this.dropbar.previousElementSibling!==this.dropbarAnchor&>(this.dropbarAnchor,this.dropbar),ie(e,`${this.clsDrop}-dropbar`))}},{name:"show",el(){return this.dropContainer},filter(){return this.dropbar},handler({target:e}){if(!this.isDropbarDrop(e))return;const t=this.getDropdown(e),i=()=>{const t=_e(e,`.${this.clsDrop}`).concat(e).map(e=>Pt(e)),i=Math.min(...t.map(({top:e})=>e)),n=Math.max(...t.map(({bottom:e})=>e)),r=Pt(this.dropbar);Je(this.dropbar,"top",this.dropbar.offsetTop-(r.top-i)-this.dropbarOffset),this.transitionTo(n-i+P(Je(e,"marginBottom"))+this.dropbarOffset,e)};this._observer=hi([t.$el,...t.target],i),i()}},{name:"beforehide",el(){return this.dropContainer},filter(){return this.dropbar},handler(e){const t=this.getActive();be(this.dropbar,":hover")&&t.$el===e.target&&u(t.mode,"hover")&&t.isDelayedHide&&!this.items.some(e=>t.targetEl!==e&&be(e,":focus"))&&e.preventDefault()}},{name:"hide",el(){return this.dropContainer},filter(){return this.dropbar},handler({target:e}){var t;if(!this.isDropbarDrop(e))return;null==(t=this._observer)||t.disconnect();const i=this.getActive();i&&i.$el!==e||this.transitionTo(0)}}],methods:{getActive(){var e;return u(this.dropdowns,null==(e=hs)?void 0:e.$el)&&hs},async transitionTo(e,t){const{dropbar:i}=this,n=Lt(i);t=n<e&&t,await nt.cancel([t,i]),Je(t,"clipPath",`polygon(0 0,100% 0,100% ${n}px,0 ${n}px)`),Lt(i,n),await Promise.all([nt.start(i,{height:e},this.duration),nt.start(t,{clipPath:`polygon(0 0,100% 0,100% ${e}px,0 ${e}px)`},this.duration).finally(()=>Je(t,{clipPath:""}))]).catch(W)},getDropdown(e){return this.$getComponent(e,"drop")||this.$getComponent(e,"dropdown")},isDropbarDrop(e){return this.getDropdown(e)&&se(e,this.clsDrop)},initializeDropdowns(){this.$create("drop",this.dropdowns.filter(e=>!this.getDropdown(e)),{...this.$props,flip:!1,shift:!0,pos:`bottom-${this.align}`,boundary:!0===this.boundary?this.$el:this.boundary})}}};function ys(e,t,i){var n,r,o;const{current:s,keyCode:a}=e;let l=-1;a===Fn?l=0:a===jn?l="last":a===zn?l="previous":a===Hn?l="next":a===Rn&&(null==(n=i.targetEl)||n.focus(),null==(r=i.hide)||r.call(i,!1)),~l&&(e.preventDefault(),null==(o=i.hide)||o.call(i,!1),t[X(l,t,t.indexOf(i.targetEl||s))].focus())}var ws={mixins:[en],args:"target",props:{target:Boolean},data:{target:!1},computed:{input:(e,t)=>Et(de,t),state(){return this.input.nextElementSibling},target({target:e},t){return e&&(!0===e&&ge(this.input)===t&&this.input.nextElementSibling||Et(e,t))}},update(){var e;const{target:t,input:i}=this;if(!t)return;let n;const r=fe(t)?"value":"textContent",o=t[r],s=(null==(e=i.files)?void 0:e[0])?i.files[0].name:be(i,"select")&&(n=Tt("option",i).filter(e=>e.selected)[0])?n.textContent:i.value;o!==s&&(t[r]=s)},events:[{name:"change",handler(){this.$emit()}},{name:"reset",el(){return this.$el.closest("form")},handler(){this.$emit()}}]},_s={extends:_n,mixins:[en],name:"grid",props:{masonry:Boolean,parallax:String,parallaxStart:String,parallaxEnd:String,parallaxJustify:Boolean},data:{margin:"uk-grid-margin",clsStack:"uk-grid-stack",masonry:!1,parallax:0,parallaxStart:0,parallaxEnd:0,parallaxJustify:!1},connected(){this.masonry&&ie(this.$el,"uk-flex-top","uk-flex-wrap-top")},observe:bn({filter:({parallax:e,parallaxJustify:t})=>e||t}),update:[{write({rows:e}){ae(this.$el,this.clsStack,!e.some(e=>e.length>1))},events:["resize"]},{read(e){const{rows:t}=e;let{masonry:i,parallax:n,parallaxJustify:r,margin:o}=this;if(n=Math.max(0,Ft(n)),!(i||n||r)||ks(t)||t[0].some((e,i)=>t.some(t=>
87t[i]&&t[i].offsetWidth!==e.offsetWidth)))return e.translates=e.scrollColumns=!1;let s,a,l=function(e,t){const i=e.flat().find(e=>se(e,t));return P(i?Je(i,"marginTop"):Je(e[0][0],"paddingLeft"))}(t,o);i?[s,a]=function(e,t,i){const n=[],r=[],o=Array(e[0].length).fill(0);let s=0;for(let a of e){qt&&(a=a.reverse());let e=0;for(const l in a){const{offsetWidth:c,offsetHeight:u}=a[l],h=i?l:o.indexOf(Math.min(...o));xs(n,h,a[l]),xs(r,h,[(h-l)*c*(qt?-1:1),o[h]-s]),o[h]+=u+t,e=Math.max(e,u)}s+=e+t}return[n,r]}(t,l,"next"===i):s=function(e){const t=[];for(const i of e)for(const e in i)xs(t,e,i[e]);return t}(t);const c=s.map(e=>z(e,"offsetHeight")+l*(e.length-1)),u=Math.max(0,...c);let h,d,f;return(n||r)&&(h=c.map((e,t)=>r?u-e+n:n/(t%2||8)),r||(n=Math.max(...c.map((e,t)=>e+h[t]-u))),d=Ft(this.parallaxStart,"height",this.$el,!0),f=Ft(this.parallaxEnd,"height",this.$el,!0)),{columns:s,translates:a,scrollColumns:h,parallaxStart:d,parallaxEnd:f,padding:n,height:a?u:""}},write({height:e,padding:t}){Je(this.$el,"paddingBottom",t||""),!1!==e&&Je(this.$el,"height",e)},events:["resize"]},{read({rows:e,scrollColumns:t,parallaxStart:i,parallaxEnd:n}){return(!t||!ks(e))&&{scrolled:!!t&&Ai(this.$el,i,n)}},write({columns:e,scrolled:t,scrollColumns:i,translates:n}){(t||n)&&e.forEach((e,r)=>e.forEach((e,o)=>{let[s,a]=n&&n[r][o]||[0,0];t&&(a+=t*i[r]),Je(e,"transform",`translate(${s}px, ${a}px)`)}))},events:["scroll","resize"]}]};function ks(e){return e.flat().some(e=>"absolute"===Je(e,"position"))}function xs(e,t,i){e[t]||(e[t]=[]),e[t].push(i)}var Cs={args:"target",props:{target:String,row:Boolean},data:{target:"> *",row:!0},computed:{elements:({target:e},t)=>Tt(e,t)},observe:fn({target:({$el:e,elements:t})=>t.reduce((e,t)=>e.concat(t,...t.children),[e])}),update:{read(){return{rows:(this.row?kn(this.elements):[this.elements]).map(Ss)}},write({rows:e}){for(const{heights:t,elements:i}of e)i.forEach((e,i)=>Je(e,"minHeight",t[i]))},events:["resize"]}};function Ss(e){if(e.length<2)return{heights:[""],elements:e};let t=e.map(Es);const i=Math.max(...t);return{heights:e.map((e,n)=>t[n].toFixed(2)===i.toFixed(2)?"":i),elements:e}}function Es(e){const t=H(e.style,["display","minHeight"]);he(e)||Je(e,"display","block","important"),Je(e,"minHeight","");const i=Mt(e).height-Nt(e,"height","content-box");return Je(e,t),i}var Ts={props:{expand:Boolean,offsetTop:Boolean,offsetBottom:Boolean,minHeight:Number},data:{expand:!1,offsetTop:!1,offsetBottom:!1,minHeight:0},observe:[vn({filter:({expand:e})=>e}),fn({target:({$el:e})=>Ii(e)})],update:{read(){if(!he(this.$el))return!1;let e="";const t=Nt(this.$el,"height","content-box"),{body:i,scrollingElement:n}=document,r=Mi(this.$el),{height:o}=Di(r===i?n:r),s=n===r||i===r;if(e="calc("+(s?"100vh":`${o}px`),this.expand){e+=` - ${Mt(r).height-Mt(this.$el).height}px`}else{if(this.offsetTop)if(s){const t=Ot(!0===this.offsetTop?this.$el:Ee(this.offsetTop,this.$el))[0]-Ot(r)[0];e+=t>0&&t<o/2?` - ${t}px`:""}else e+=` - ${Je(r,"paddingTop")}`;!0===this.offsetBottom?e+=` - ${Mt(this.$el.nextElementSibling).height}px`:E(this.offsetBottom)?e+=` - ${this.offsetBottom}vh`:this.offsetBottom&&c(this.offsetBottom,"px")?e+=` - ${P(this.offsetBottom)}px`:C(this.offsetBottom)&&(e+=` - ${Mt(Ee(this.offsetBottom,this.$el)).height}px`)}return e+=(t?` - ${t}px`:"")+")",{minHeight:e}},write({minHeight:e}){Je(this.$el,"minHeight",`max(${this.minHeight||0}px, ${e})`)},events:["resize"]}},As={args:"src",props:{width:Number,height:Number,ratio:Number},data:{ratio:1},connected(){this.svg=this.getSvg().then(e=>{if(!this._connected)return;const t=function(e,t){if(ue(t)||ut(t,"canvas")){t.hidden=!0;const i=t.nextElementSibling;return Is(e,i)?i:gt(t,e)}const i=t.lastElementChild;return Is(e,i)?i:pt(t,e)}(e,this.$el);return this.svgEl&&t!==this.svgEl&&bt(this.svgEl),Ms.call(this,t,e),this.svgEl=t},W)},disconnected(){this.svg.then(e=>{this._connected||(ue(this.$el)&&(this.$el.hidden=!1),bt(e),this.svgEl=null)}),this.svg=null},methods:{async getSvg(){}}};function Is(e,t){return ut(e,"svg")&&ut(t,"svg")&&e.innerHTML===t.innerHTML}function Ms(e,t){const i=["width","height"];let n=i.map(e=>this[e]);n.some(e=>e)||(n=i.map(e=>J(t,e)));const r=J(t,"viewBox");r&&!n.some(e=>
87e)&&(n=r.split(" ").slice(2)),n.forEach((t,n)=>J(e,i[n],P(t)*this.ratio||null))}const Ps={spinner:'<svg width="30" height="30" viewBox="0 0 30 30"><circle fill="none" stroke="#000" cx="15" cy="15" r="14"/></svg>',totop:'<svg width="18" height="10" viewBox="0 0 18 10"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 9 9 1 17 9"/></svg>',marker:'<svg width="20" height="20" viewBox="0 0 20 20"><rect x="9" y="4" width="1" height="11"/><rect x="4" y="9" width="11" height="1"/></svg>',"close-icon":'<svg width="14" height="14" viewBox="0 0 14 14"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"/><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"/></svg>',"close-large":'<svg width="20" height="20" viewBox="0 0 20 20"><line fill="none" stroke="#000" stroke-width="1.4" x1="1" y1="1" x2="19" y2="19"/><line fill="none" stroke="#000" stroke-width="1.4" x1="19" y1="1" x2="1" y2="19"/></svg>',"drop-parent-icon":'<svg width="12" height="12" viewBox="0 0 12 12"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 3.5 6 8.5 11 3.5"/></svg>',"nav-parent-icon":'<svg width="12" height="12" viewBox="0 0 12 12"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 3.5 6 8.5 11 3.5"/></svg>',"nav-parent-icon-large":'<svg width="14" height="14" viewBox="0 0 14 14"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 4 7 10 13 4"/></svg>',"navbar-parent-icon":'<svg width="12" height="12" viewBox="0 0 12 12"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 3.5 6 8.5 11 3.5"/></svg>',"navbar-toggle-icon":'<svg width="20" height="20" viewBox="0 0 20 20"><style>.uk-navbar-toggle-animate svg>[class*="line-"]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.uk-navbar-toggle svg>.line-3{opacity:0}.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-3{opacity:1}.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-2{transform:rotate(45deg)}.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-3{transform:rotate(-45deg)}.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-1,.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-4{opacity:0}.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-1{transform:translateY(6px) scaleX(0)}.uk-navbar-toggle-animate[aria-expanded="true"] svg>.line-4{transform:translateY(-6px) scaleX(0)}</style><rect class="line-1" y="3" width="20" height="2"/><rect class="line-2" y="9" width="20" height="2"/><rect class="line-3" y="9" width="20" height="2"/><rect class="line-4" y="15" width="20" height="2"/></svg>',"overlay-icon":'<svg width="40" height="40" viewBox="0 0 40 40"><rect x="19" y="0" width="1" height="40"/><rect x="0" y="19" width="40" height="1"/></svg>',"pagination-next":'<svg width="7" height="12" viewBox="0 0 7 12"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 1 6 6 1 11"/></svg>',"pagination-previous":'<svg width="7" height="12" viewBox="0 0 7 12"><polyline fill="none" stroke="#000" stroke-width="1.2" points="6 1 1 6 6 11"/></svg>',"search-icon":'<svg width="20" height="20" viewBox="0 0 20 20"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"/><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"/></svg>',"search-large":'<svg width="40" height="40" viewBox="0 0 40 40"><circle fill="none" stroke="#000" stroke-width="1.8" cx="17.5" cy="17.5" r="16.5"/><line fill="none" stroke="#000" stroke-width="1.8" x1="38" y1="39" x2="29" y2="30"/></svg>',"search-navbar":'<svg width="24" height="24" viewBox="0 0 24 24"><circle fill="none" stroke="#000" stroke-width="1.1" cx="10.5" cy="10.5" r="9.5"/><line fill="none" stroke="#000" stroke-width="1.1" x1="23" y1="23" x2="17" y2="17"/></svg>',"slidenav-next":'<svg width="14" height="24" viewBox="0 0 14 24"><polyline fill="none" stroke="#000" stroke-width="1.4" points="1.225,23 12.775,12 1.225,1"/></svg>',"slidenav-next-large":'<svg width="25" height="40" viewBox="0 0 25 40"><polyline fill="none" stroke="#000" stroke-width="2" points="4.002,38.547 22.527,20.024 4,1.5"/></svg>',"slidenav-previous":'<svg width="14" height="24" viewBox="0 0 14 24"><polyline fill="none" stroke="#000" stroke-width="1.4" points="12.775,1 1.225,12 12.775,23"/></svg>',"slidenav-previous-large":'<svg width="25" height="40" viewBox="0 0 25 40"><polyline fill="none" stroke="#000" stroke-width="2" points="20.527,1.5 2,20.024 20.525,38.547"/></svg>'},Ds={install:function(e){e.icon.add=(t,i)=>{const n=C(t)?{[t]:i}:t;j(n,(e,t)=>{Ps[t]=e,delete $s[t]}
87),e._initialized&&St(document.body,t=>j(e.getComponents(t),e=>{e.$options.isIcon&&e.icon in n&&e.$reset()}))}},mixins:[As],args:"icon",props:{icon:String},isIcon:!0,beforeConnect(){ie(this.$el,"uk-icon")},methods:{async getSvg(){const e=function(e){if(!Ps[e])return null;$s[e]||($s[e]=Et((Ps[function(e){return qt?B(B(e,"left","right"),"previous","next"):e}(e)]||Ps[e]).trim()));return $s[e].cloneNode(!0)}(this.icon);if(!e)throw"Icon not found.";return e}}},Os={args:!1,extends:Ds,data:e=>({icon:r(e.constructor.options.name)}),beforeConnect(){ie(this.$el,this.$options.id)}},Ls={extends:Os,beforeConnect(){const e=this.$props.icon;this.icon=this.$el.closest(".uk-nav-primary")?`${e}-large`:e}},Rs={extends:Os,mixins:[fr],i18n:{toggle:"Open Search",submit:"Submit Search"},beforeConnect(){if(this.icon=se(this.$el,"uk-search-icon")&&_e(this.$el,".uk-search-large").length?"search-large":_e(this.$el,".uk-search-navbar").length?"search-navbar":this.$props.icon,!Q(this.$el,"aria-label"))if(se(this.$el,"uk-search-toggle")||se(this.$el,"uk-navbar-toggle")){const e=this.t("toggle");J(this.$el,"aria-label",e)}else{const e=this.$el.closest("a,button");if(e){J(e,"aria-label",this.t("submit"))}}}},Bs={extends:Os,beforeConnect(){J(this.$el,"role","status")},methods:{async getSvg(){const e=await Ds.methods.getSvg.call(this);return 1!==this.ratio&&Je(Et("circle",e),"strokeWidth",1/this.ratio),e}}},Ns={extends:Os,mixins:[fr],beforeConnect(){const e=this.$el.closest("a,button");J(e,"role",null!==this.role&&ut(e,"a")?"button":this.role);const t=this.t("label");t&&!Q(e,"aria-label")&&J(e,"aria-label",t)}},js={extends:Ns,beforeConnect(){ie(this.$el,"uk-slidenav");const e=this.$props.icon;this.icon=se(this.$el,"uk-slidenav-large")?`${e}-large`:e}},Fs={extends:Ns,i18n:{label:"Open menu"}},zs={extends:Ns,i18n:{label:"Close"},beforeConnect(){this.icon="close-"+(se(this.$el,"uk-close-large")?"large":"icon")}},Vs={extends:Ns,i18n:{label:"Open"}},Hs={extends:Ns,i18n:{label:"Back to top"}},Us={extends:Ns,i18n:{label:"Next page"},data:{role:null}},Ws={extends:Ns,i18n:{label:"Previous page"},data:{role:null}},$s={};const Gs=Gt&&"loading"in HTMLImageElement.prototype;var qs={args:"dataSrc",props:{dataSrc:String,sources:String,margin:String,target:String,loading:String},data:{dataSrc:"",sources:!1,margin:"50%",target:!1,loading:"lazy"},connected(){var e;"lazy"===this.loading?(Gs&&Ks(this.$el)&&(this.$el.loading="lazy",Ys(this.$el)),Ks(e=this.$el)&&!Q(e,"src")&&J(e,"src",'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>')):this.load()},disconnected(){this.img&&(this.img.onload=""),delete this.img},observe:pn({target:({$el:e,$props:t})=>[e,...Te(t.target,e)],handler(e,t){this.load(),t.disconnect()},options:({margin:e})=>({rootMargin:e}),filter:({loading:e})=>"lazy"===e}),methods:{load(){if(this.img)return this.img;const e=Ks(this.$el)?this.$el:function(e,t,i){const n=new Image;return function(e,t){if((t=function(e){if(!e)return[];if(l(e,"["))try{e=JSON.parse(e)}catch(t){e=[]}else e=cn(e);d(e)||(e=[e]);return e.filter(e=>!T(e))}(t)).length){const i=xt("<picture>");for(const e of t){const t=xt("<source>");J(t,e),pt(i,t)}pt(i,e)}}(n,i),Xs(e,n),n.onload=()=>{Ys(e,n.currentSrc)},J(n,"src",t),n}(this.$el,this.dataSrc,this.sources);return ee(e,"loading"),Ys(this.$el,e.currentSrc),this.img=e}}};function Ys(e,t){if(Ks(e)){const t=ge(e);(ut(t,"picture")?ke(t):[e]).forEach(e=>Xs(e,e))}else if(t){!u(e.style.backgroundImage,t)&&(Je(e,"backgroundImage",`url(${Fe(t)})`),Ue(e,We("load",!1)))}}const Zs=["data-src","data-srcset","sizes"];function Xs(e,t){for(const i of Zs){const n=te(e,i);n&&J(t,i.replace(/^(data-)+/,""),n)}}function Ks(e){return ut(e,"img")}var Js={mixins:[en,ro],props:{fill:String},data:{fill:"",clsWrapper:"uk-leader-fill",clsHide:"uk-leader-hide",attrFill:"data-fill"},computed:{fill:({fill:e},t)=>e||Je(t,"--uk-leader-fill-content")},connected(){[this.wrapper]=wt(this.$el,`<span class="${this.clsWrapper}">`)},disconnected(){_t(this.wrapper.childNodes)},observe:fn(),update:{read(){return{width:Math.trunc(this.$el.offsetWidth/2),fill:this.fill,hide:!this.matchMedia}},write({width:e,fill:t,hide:i}){ae(this.wrapper,this.clsHide,i),J(this.wrapper,this.attrFill,new Array(e).join(t))},events:["resize"]}},Qs={install:function({modal:e}){function t(t,i,n=W,r=W){i={bgClose:!1,escClose:!0,...i,i18n:{...e.i18n,...null==i?void 0:i.i18n}};const o=e.dialog(t(i),i);return p(new Promise(e=>{const t=ze(o.$el,"hide",()=>e(n()));ze(o.$el,"submit","form",i=>{i.preventDefault(),e(r(o)),t(),o.hide()})}),{dialog:o})}e.dialog=function(t,i){const n=e(`<div class="uk-modal"> <div class="uk-modal-dialog">${t}</div> </div>`,{stack:!0,role:"alertdialog",...i});return n.show(),ze(n.$el,"hidden",async()=>{await Promise.resolve(),n.$destroy(!0)},{self:!0}),n},e.alert=function(e,i){return t(({i18n:t})=>`<div class="uk-modal-body">${C(e)?e:dt(e)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-primary uk-modal-close" autofocus>${t.ok}</button> </div>`,i)},e.confirm=function(e,i){return t(({i18n:t})=>`<form> <div class="uk-modal-body">${C(e)?e:dt(e)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${t.cancel}</button> <button class="uk-button uk-button-primary" autofocus>${t.ok}</button> </div> </form>`,i,()=>Promise.reject())},e.prompt=function(e,i,n){const r=t(({i18n:t})=>`<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${C(e)?e:dt(e)}</label> <input class="uk-input" value="${i||""}" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${t.cancel}</button> <button class="uk-button uk-button-primary">${t.ok}</button> </div> </form>`,n,()=>null,()=>s.value),{$el:o}=r.dialog,s=Et("input",o);return ze(o,"show",()=>s.select()),r},e.i18n={ok:"Ok",cancel:"Cancel"}},mixins:[nr],data:{clsPage:"uk-modal-page",selPanel:".uk-modal-dialog",selClose:".uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full"}
87,events:[{name:"show",self:!0,handler(){se(this.panel,"uk-margin-auto-vertical")?ie(this.$el,"uk-flex"):Je(this.$el,"display","block"),Lt(this.$el)}},{name:"hidden",self:!0,handler(){Je(this.$el,"display",""),ne(this.$el,"uk-flex")}}]};var ea={extends:ns,data:{targets:"> .uk-parent",toggle:"> a",content:"> ul"}},ta={extends:bs,props:{dropbarTransparentMode:Boolean},data:{clsDrop:"uk-navbar-dropdown",selNavItem:".uk-navbar-nav > li > a,a.uk-navbar-item,button.uk-navbar-item,.uk-navbar-item a,.uk-navbar-item button,.uk-navbar-toggle",selTransparentTarget:'[class*="uk-section"]',dropbarTransparentMode:!1},computed:{navbarContainer:(e,t)=>t.closest(".uk-navbar-container"),dropbarOffset:({dropbarTransparentMode:e},t)=>"behind"===e?t.offsetHeight:0},watch:{items(){const e=se(this.$el,"uk-navbar-justify");for(const t of Tt(".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",this.$el))Je(t,"flexGrow",e?Tt(".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",t).length:"")}},disconnect(){var e;null==(e=this._colorListener)||e.call(this)},observe:[mn({target:({navbarContainer:e})=>e,handler:"registerColorListener",options:{attributes:!0,attributeFilter:["class"],attributeOldValue:!0}}),pn({handler(e){this._isIntersecting=e[0].isIntersecting,this.registerColorListener()},args:{intersecting:!1}})],events:[{name:"show",el(){return this.dropContainer},handler({target:e}){const t=this.getTransparentMode(e);if(!t||this._mode)return;const i=()=>this._mode=function(e,...t){for(const i of t)if(se(e,i))return ne(e,i),i}(this.navbarContainer,"uk-light","uk-dark");if("behind"===t){const e=ia(this.$el);e&&(i(),ie(this.navbarContainer,`uk-${e}`))}"remove"===t&&(i(),ne(this.navbarContainer,"uk-navbar-transparent"))}},{name:"hide",el(){return this.dropContainer},async handler({target:e}){const t=this.getTransparentMode(e);if(t&&this._mode&&(await async function(){return new Promise(e=>setTimeout(e))}(),!this.getActive())){if("behind"===t){const e=ia(this.$el);e&&ne(this.navbarContainer,`uk-${e}`)}ie(this.navbarContainer,this._mode),"remove"===t&&ie(this.navbarContainer,"uk-navbar-transparent"),this._mode=null}}}],methods:{getTransparentMode(e){if(!this.navbarContainer)return;if(this.dropbar&&this.isDropbarDrop(e))return this.dropbarTransparentMode;const t=this.getDropdown(e);return t&&se(e,"uk-dropbar")?t.inset?"behind":"remove":void 0},registerColorListener(){const e=this._isIntersecting&&se(this.navbarContainer,"uk-navbar-transparent")&&!function(e){do{if("normal"!==Je(e,"mixBlendMode"))return!0}while(e=ge(e))}(this.navbarContainer)&&!Tt(".uk-drop",this.dropContainer).map(this.getDropdown).some(e=>e.isToggled()&&(e.inset||"behind"===this.getTransparentMode(e.$el)));this._colorListener?e||(this._colorListener(),this._colorListener=null):e&&(this._colorListener=function(e,t){const i=Mi(e,!0),n=ze(i===document.documentElement?document:i,"scroll",t,{passive:!0}),r=hi([e,i],t);return()=>{n(),r.disconnect()}}(this.navbarContainer,()=>{const{left:e,top:t,height:i}=Pt(this.navbarContainer),n={x:e,y:Math.max(0,t)+i/2},r=Je(Tt(this.selTransparentTarget).find(e=>G(n,Pt(e))),"--uk-navbar-color");r&&oe(this.navbarContainer,"uk-light,uk-dark",`uk-${r}`)}))}}};function ia(e){return Je(e,"--uk-navbar-dropbar-behind-color")}var na={mixins:[nr],args:"mode",props:{mode:String,flip:Boolean,overlay:Boolean,swiping:Boolean},data:{mode:"slide",flip:!1,overlay:!1,clsPage:"uk-offcanvas-page",clsContainer:"uk-offcanvas-container",selPanel:".uk-offcanvas-bar",clsFlip:"uk-offcanvas-flip",clsContainerAnimation:"uk-offcanvas-container-animation",clsSidebarAnimation:"uk-offcanvas-bar-animation",clsMode:"uk-offcanvas",clsOverlay:"uk-offcanvas-overlay",selClose:".uk-offcanvas-close",container:!1,swiping:!0},computed:{clsFlip:({flip:e,clsFlip:t})=>e?t:"",clsOverlay:({overlay:e,clsOverlay:t})=>e?t:"",clsMode:({mode:e,clsMode:t})=>`${t}-${e}`,clsSidebarAnimation:({mode:e,clsSidebarAnimation:t})=>"none"===e||"reveal"===e?"":t,clsContainerAnimation:({mode:e,clsContainerAnimation:t})=>"push"!==e&&"reveal"!==e?"":t,transitionElement({mode:e}){return"reveal"===e?ge(this.panel):this.panel}},observe:yn({filter:({swiping:e})=>e}),update:{read(){this.isToggled()&&!he(this.$el)&&this.hide()},events:["resize"]},events:[{name:"touchmove",self:!0,passive:!1,filter(){return this.overlay},handler(e){e.cancelable&&e.preventDefault()}}
87,{name:"show",self:!0,handler(){"reveal"!==this.mode||se(ge(this.panel),this.clsMode)||(yt(this.panel,"<div>"),ie(ge(this.panel),this.clsMode));const{body:e,scrollingElement:t}=document;ie(e,this.clsContainer,this.clsFlip),Je(e,"touch-action","pan-y pinch-zoom"),Je(this.$el,"display","block"),Je(this.panel,"maxWidth",t.clientWidth),ie(this.$el,this.clsOverlay),ie(this.panel,this.clsSidebarAnimation,"reveal"===this.mode?"":this.clsMode),Lt(e),ie(e,this.clsContainerAnimation),this.clsContainerAnimation&&(ra().content+=",user-scalable=0")}},{name:"hide",self:!0,handler(){ne(document.body,this.clsContainerAnimation),Je(document.body,"touch-action","")}},{name:"hidden",self:!0,handler(){this.clsContainerAnimation&&function(){const e=ra();e.content=e.content.replace(/,user-scalable=0$/,"")}(),"reveal"===this.mode&&_t(this.panel),ne(this.panel,this.clsSidebarAnimation,this.clsMode),ne(this.$el,this.clsOverlay),Je(this.$el,"display",""),Je(this.panel,"maxWidth",""),ne(document.body,this.clsContainer,this.clsFlip)}},{name:"swipeLeft swipeRight",handler(e){this.isToggled()&&c(e.type,"Left")^this.flip&&this.hide()}}]};function ra(){return Et('meta[name="viewport"]',document.head)||pt(document.head,'<meta name="viewport">')}var oa={mixins:[en],props:{selContainer:String,selContent:String,minHeight:Number},data:{selContainer:".uk-modal",selContent:".uk-modal-dialog",minHeight:150},computed:{container:({selContainer:e},t)=>t.closest(e),content:({selContent:e},t)=>t.closest(e)},observe:fn({target:({container:e,content:t})=>[e,t]}),update:{read(){return!!(this.content&&this.container&&he(this.$el))&&{max:Math.max(this.minHeight,Lt(this.container)-(Mt(this.content).height-Lt(this.$el)))}},write({max:e}){Je(this.$el,{minHeight:this.minHeight,maxHeight:e})},events:["resize"]}},sa={props:["width","height"],connected(){ie(this.$el,"uk-responsive-width")},observe:fn({target:({$el:e})=>[e,ge(e)]}),update:{read(){return!!(he(this.$el)&&this.width&&this.height)&&{width:Rt(ge(this.$el)),height:this.height}},write(e){Lt(this.$el,Z.contain({height:this.height,width:this.width},e).height)},events:["resize"]}},aa={props:{offset:Number},data:{offset:0},connected(){!function(e){la.size||ze(document,"click",ca);la.add(e)}(this)},disconnected(){var e;e=this,la.delete(e),la.size||Ve(document,"click",ca)},methods:{async scrollTo(e){e=e&&Et(e)||document.body,Ue(this.$el,"beforescroll",[this,e])&&(await Ti(e,{offset:this.offset}),Ue(this.$el,"scrolled",[this,e]))}}};const la=new Set;function ca(e){if(!e.defaultPrevented)for(const t of la)t.$el.contains(e.target)&&Ce(t.$el)&&(e.preventDefault(),window.location.href!==t.$el.href&&window.history.pushState({},"",t.$el.href),t.scrollTo(Se(t.$el)))}var ua={args:"cls",props:{cls:String,target:String,hidden:Boolean,margin:String,repeat:Boolean,delay:Number},data:()=>({cls:"",target:!1,hidden:!0,margin:"-1px",repeat:!1,delay:0,inViewClass:"uk-scrollspy-inview"}),computed:{elements:({target:e},t)=>e?Tt(e,t):[t]},watch:{elements(e){this.hidden&&Je(ve(e,`:not(.${this.inViewClass})`),"opacity",0)}},connected(){this.elementData=new Map},disconnected(){for(const[e,t]of this.elementData.entries())ne(e,this.inViewClass,(null==t?void 0:t.cls)||"");delete this.elementData},observe:pn({target:({elements:e})=>e,handler(e){const t=this.elementData;for(const{target:i,isIntersecting:n}of e){t.has(i)||t.set(i,{cls:te(i,"uk-scrollspy-class")||this.cls});const e=t.get(i);!this.repeat&&e.show||(e.show=n)}this.$emit()},options:({margin:e})=>({rootMargin:e}),args:{intersecting:!1}}),update:[{write(e){for(const[t,i]of this.elementData.entries())!i.show||i.inview||i.queued?!i.show&&i.inview&&!i.queued&&this.repeat&&this.toggle(t,!1):(i.queued=!0,e.promise=(e.promise||Promise.resolve()).then(()=>new Promise(e=>setTimeout(e,this.delay))).then(()=>{this.toggle(t,!0),setTimeout(()=>{i.queued=!1,this.$emit()},300)}))}}],methods:{toggle(e,t){var i;const n=this.elementData.get(e);if(n){if(null==(i=n.off)||i.call(n),Je(e,"opacity",!t&&this.hidden?0:""),ae(e,this.inViewClass,t),ae(e,n.cls),/\buk-animation-/.test(n.cls)){const i=()=>re(e,"uk-animation-[\\w-]+");t?n.off=He(e,"animationcancel animationend",i):i()}Ue(e,t?"inview":"outview"),n.inview=t,this.$update(e)}}}},ha={props:{cls:String,closest:Boolean,scroll:Boolean,overflow:Boolean,offset:Number},data:{cls:"uk-active",closest:!1,scroll:!1,overflow:!0,offset:0},computed:{links:(e,t)=>Tt('a[href*="#"]',t).filter(e=>e.hash&&Ce(e)),elements({closest:e}){return this.links.map(t=>t.closest(e||"*"))}},watch:{links(e){this.scroll&&this.$create("scroll",e,{offset:this.offset})}},observe:[pn(),bn()],update:[{read(){const e=this.links.map(Se).filter(
87Boolean),{length:t}=e;if(!t||!he(this.$el))return!1;const i=Mi(e,!0),{scrollTop:n,scrollHeight:r}=i,o=Di(i);let s=!1;if(n===r-o.height)s=t-1;else{for(let t=0;t<e.length;t++){const i=Oi(e[t]),n=this.offset+(i?Pt(i).height:0);if(Pt(e[t]).top-o.top-n>0)break;s=+t}!1===s&&this.overflow&&(s=0)}return{active:s}},write({active:e}){const t=!1!==e&&!se(this.elements[e],this.cls);this.links.forEach(e=>e.blur());for(let t=0;t<this.elements.length;t++)ae(this.elements[t],this.cls,+t===e);t&&Ue(this.$el,"active",[e,this.elements[e]])},events:["scroll","resize"]}]},da={mixins:[en,ro],props:{position:String,top:null,bottom:null,start:null,end:null,offset:String,overflowFlip:Boolean,animation:String,clsActive:String,clsInactive:String,clsFixed:String,clsBelow:String,selTarget:String,showOnUp:Boolean,targetOffset:Number},data:{position:"top",top:!1,bottom:!1,start:!1,end:!1,offset:0,overflowFlip:!1,animation:"",clsActive:"uk-active",clsInactive:"",clsFixed:"uk-sticky-fixed",clsBelow:"uk-sticky-below",selTarget:"",showOnUp:!1,targetOffset:!1},computed:{selTarget:({selTarget:e},t)=>e&&Et(e,t)||t},connected(){this.start=pa(this.start||this.top),this.end=pa(this.end||this.bottom),this.placeholder=Et("+ .uk-sticky-placeholder",this.$el)||Et('<div class="uk-sticky-placeholder"></div>'),this.isFixed=!1,this.setActive(!1)},beforeDisconnect(){this.isFixed&&(this.hide(),ne(this.selTarget,this.clsInactive)),ma(this.$el),bt(this.placeholder),this.placeholder=null},observe:[vn(),bn({target:()=>document.scrollingElement}),fn({target:({$el:e})=>[e,document.scrollingElement]})],events:[{name:"load hashchange popstate",el:()=>window,filter(){return!1!==this.targetOffset},handler(){const{scrollingElement:e}=document;location.hash&&0!==e.scrollTop&&setTimeout(()=>{const t=Pt(Et(location.hash)),i=Pt(this.$el);this.isFixed&&$(t,i)&&(e.scrollTop=t.top-i.height-Ft(this.targetOffset,"height",this.placeholder)-Ft(this.offset,"height",this.placeholder))})}},{name:"transitionstart",handler(){this.transitionInProgress=He(this.$el,"transitionend transitioncancel",()=>this.transitionInProgress=null)}}],update:[{read({height:e,width:t,margin:i,sticky:n}){if(this.inactive=!this.matchMedia||!he(this.$el),this.inactive)return;const r=this.isFixed&&!this.transitionInProgress;r&&(ga(this.$el),this.hide()),this.active||(({height:e,width:t}=Pt(this.$el)),i=Je(this.$el,"margin")),r&&this.show();const o=Ft("100vh","height"),s=Lt(window),a=Math.max(0,document.scrollingElement.scrollHeight-o);let l=this.position;this.overflowFlip&&e>o&&(l="top"===l?"bottom":"top");const c=this.isFixed?this.placeholder:this.$el;let u=Ft(this.offset,"height",n?this.$el:c);"bottom"===l&&(e<s||this.overflowFlip)&&(u+=s-e);const h=this.overflowFlip?0:Math.max(0,e+u-o),d=Pt(c).top,f=Pt(this.$el).height,p=(!1===this.start?d:fa(this.start,this.$el,d))-u,m=!1===this.end?a:Math.min(a,fa(this.end,this.$el,d+e,!0)-f-u+h);return n=a&&!this.showOnUp&&p+u===d&&m===Math.min(a,fa("!*",this.$el,0,!0)-f-u+h)&&"visible"===Je(ge(this.$el),"overflowY"),{start:p,end:m,offset:u,overflow:h,topOffset:d,height:e,elHeight:f,width:t,margin:i,top:Ot(c)[0],sticky:n}},write({height:e,width:t,margin:i,offset:n,sticky:r}){if((this.inactive||r||!this.isFixed)&&ma(this.$el),this.inactive)return;r&&(e=t=i=0,Je(this.$el,{position:"sticky",top:n}));const{placeholder:o}=this;Je(o,{height:e,width:t,margin:i}),document.contains(o)||(o.hidden=!0),(r?mt:gt)(this.$el,o)},events:["resize"]},{read({scroll:e=0,dir:t="down",overflow:i,overflowScroll:n=0,start:r,end:o}){const s=document.scrollingElement.scrollTop;return{dir:e<=s?"down":"up",prevDir:t,scroll:s,prevScroll:e,offsetParentTop:Pt((this.isFixed?this.placeholder:this.$el).offsetParent).top,overflowScroll:U(n+U(s,r,o)-U(e,r,o),0,i)}},write(e,t){const i=t.has("scroll"),{initTimestamp:n=0,dir:r,prevDir:o,scroll:s,prevScroll:a=0,top:l,start:c,topOffset:u,height:h}=e;if(s<0||s===a&&i||this.showOnUp&&!i&&!this.isFixed)return;const d=Date.now();if((d-n>300||r!==o)&&(e.initScroll=s,e.initTimestamp=d),!(this.showOnUp&&!this.isFixed&&Math.abs(e.initScroll-s)<=30&&Math.abs(a-s)<=10))if(this.inactive||s<c||this.showOnUp&&(s<=c||"down"===r&&i||"up"===r&&!this.isFixed&&s<=u+h)){if(!this.isFixed)return void(ct.inProgress(this.$el)&&l>s&&(ct.cancel(this.$el),this.hide()));if(this.animation&&s>u){if(se(this.$el,"uk-animation-leave"))return;ct.out(this.$el,this.animation).then(()=>this.hide(),W)}else this.hide()}else this.isFixed?this.update():this.animation&&s>u?(this.show(),ct.in(this.$el,this.animation).catch(W)):(ga(this.selTarget),this.show())},events:["resize","resizeViewport","scroll"]}],methods:{show(){this.isFixed=!0,this.update(),this.placeholder.hidden=!1},hide(){const{offset:e,sticky:t}=this._data;this.setActive(!1),ne(this.$el,this.clsFixed,this.clsBelow),t?Je(this.$el,"top",e):Je(this.$el,{position:"",top:"",width:"",marginTop:""}),this.placeholder.hidden=!0,this.isFixed=!1},update(){let{width:e,scroll:t=0,overflow:i,overflowScroll:n=0,start:r,end:o,offset:s,topOffset:a,height:l,elHeight:c,offsetParentTop:u,sticky:
87h}=this._data;const d=0!==r||t>r;if(!h){let r="fixed";t>o&&(s+=o-u+n-i,r="absolute"),Je(this.$el,{position:r,width:e,marginTop:0},"important")}Je(this.$el,"top",s-n),this.setActive(d),ae(this.$el,this.clsBelow,t>a+(h?Math.min(l,c):l)),ie(this.$el,this.clsFixed)},setActive(e){const t=this.active;this.active=e,e?(oe(this.selTarget,this.clsInactive,this.clsActive),t!==e&&Ue(this.$el,"active")):(oe(this.selTarget,this.clsActive,this.clsInactive),t!==e&&Ue(this.$el,"inactive"))}}};function fa(e,t,i,n){if(!e)return 0;if(E(e)||C(e)&&e.match(/^-?\d/))return i+Ft(e,"height",t,!0);{const i=!0===e?ge(t):Ee(e,t);return Pt(i).bottom-(n&&(null==i?void 0:i.contains(t))?P(Je(i,"paddingBottom")):0)}}function pa(e){return"true"===e||"false"!==e&&e}function ma(e){Je(e,{position:"",top:"",marginTop:"",width:""})}function ga(e){ie(e,"uk-transition-disable"),requestAnimationFrame(()=>ne(e,"uk-transition-disable"))}var va={mixins:[As],args:"src",props:{src:String,icon:String,attributes:"list",strokeAnimation:Boolean},data:{strokeAnimation:!1},observe:[mn({async handler(){const e=await this.svg;e&&ba.call(this,e)},options:{attributes:!0,attributeFilter:["id","class","style"]}})],async connected(){u(this.src,"#")&&([this.src,this.icon]=this.src.split("#"));const e=await this.svg;e&&(ba.call(this,e),this.strokeAnimation&&function(e){const t=oo(e);t&&Je(e,"--uk-animation-stroke",t)}(e))},methods:{async getSvg(){return ut(this.$el,"img")&&!this.$el.complete&&"lazy"===this.$el.loading?new Promise(e=>He(this.$el,"load",()=>e(this.getSvg()))):function(e,t){t&&u(e,"<symbol")&&(e=_a(e)[t]||e);return e=Et(e.substr(e.indexOf("<svg"))),(null==e?void 0:e.hasChildNodes())&&e}(await ya(this.src),this.icon)||Promise.reject("SVG not found.")}}};function ba(e){const{$el:t}=this;ie(e,J(t,"class"),"uk-svg");for(let i=0;i<t.style.length;i++){const n=t.style[i];Je(e,n,Je(t,n))}for(const t in this.attributes){const[i,n]=this.attributes[t].split(":",2);J(e,i,n)}this.$el.id||ee(e,"id")}const ya=K(async e=>e?l(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());const wa=/<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g,_a=K(function(e){const t={};let i;for(wa.lastIndex=0;i=wa.exec(e);)t[i[3]]=`<svg ${i[1]}svg>`;return t});const ka=".uk-disabled *, .uk-disabled, [disabled]";var xa={mixins:[Jn],args:"connect",props:{connect:String,toggle:String,itemNav:String,active:Number,followFocus:Boolean,swiping:Boolean},data:{connect:"~.uk-switcher",toggle:"> * > :first-child",itemNav:!1,active:0,cls:"uk-active",attrItem:"uk-switcher-item",selVertical:".uk-nav",followFocus:!1,swiping:!0},computed:{connects:({connect:e},t)=>Te(e,t),connectChildren(){return this.connects.map(e=>ke(e)).flat()},toggles:({toggle:e},t)=>Tt(e,t),children(e,t){return ke(t).filter(e=>this.toggles.some(t=>e.contains(t)))}},watch:{connects(e){this.swiping&&Je(e,"touchAction","pan-y pinch-zoom"),this.$emit()},connectChildren(){let e=Math.max(0,this.index());for(const t of this.connects)ke(t).forEach((t,i)=>ae(t,this.cls,i===e));this.$emit()},toggles(e){this.$emit();const t=this.index();this.show(~t?t:e[this.active]||e[0])}},connected(){J(this.$el,"role","tablist")},observe:[gn({targets:({connectChildren:e})=>e}),yn({target:({connects:e})=>e,filter:({swiping:e})=>e})],events:[{name:"click keydown",delegate(){return this.toggle},handler(e){be(e.current,ka)||"click"!==e.type&&e.keyCode!==Nn||(e.preventDefault(),this.show(e.current))}},{name:"keydown",delegate(){return this.toggle},handler(e){const{current:t,keyCode:i}=e,n=be(this.$el,this.selVertical);let r=i===Fn?0:i===jn?"last":i===zn&&!n||i===Vn&&n?"previous":i===Hn&&!n||i===Un&&n?"next":-1;if(~r){e.preventDefault();const i=this.toggles.filter(e=>!be(e,ka)),n=i[X(r,i,i.indexOf(t))];n.focus(),this.followFocus&&this.show(n)}}},{name:"click",el(){return this.connects.concat(this.itemNav?Te(this.itemNav,this.$el):[])},delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(e){e.target.closest("a,button")&&(e.preventDefault(),this.show(te(e.current,this.attrItem)))}},{name:"swipeRight swipeLeft",filter(){return this.swiping},el(){return this.connects},handler({type:e}){this.show(c(e,"Left")?"next":"previous")}}],update(){var e;J(this.connects,"role","presentation"),J(ke(this.$el),"role","presentation");for(const t in this.toggles){const i=this.toggles[t],n=null==(e=this.connects[0])?void 0:e.children[t];J(i,"role","tab"),n&&(i.id=qr(this,i),n.id=qr(this,n),J(i,"aria-controls",n.id),J(n,{role:"tabpanel","aria-labelledby":i.id}))}
87J(this.$el,"aria-orientation",be(this.$el,this.selVertical)?"vertical":null)},methods:{index(){return h(this.children,e=>se(e,this.cls))},show(e){const t=this.toggles.filter(e=>!be(e,ka)),i=this.index(),n=X(!w(e)||u(t,e)?e:0,t,X(this.toggles[i],t)),r=X(t[n],this.toggles);this.children.forEach((e,t)=>{ae(e,this.cls,r===t),J(this.toggles[t],{"aria-selected":r===t,tabindex:r===t?null:-1})});const o=i>=0&&i!==n;this.connects.forEach(async({children:e})=>{const t=f(e).filter((e,t)=>t!==r&&se(e,this.cls));await this.toggleElement(t,!1,o),await this.toggleElement(e[r],!0,o)})}}},Ca={mixins:[en],extends:xa,props:{media:Boolean},data:{media:960,attrItem:"uk-tab-item",selVertical:".uk-tab-left,.uk-tab-right"},connected(){const e=se(this.$el,"uk-tab-left")?"uk-tab-left":!!se(this.$el,"uk-tab-right")&&"uk-tab-right";e&&this.$create("toggle",this.$el,{cls:e,mode:"media",media:this.media})}};var Sa={mixins:[ro,Jn],args:"target",props:{href:String,target:null,mode:"list",queued:Boolean},data:{href:!1,target:!1,mode:"click",queued:!0},computed:{target:({target:e},t)=>(e=Te(e||t.hash,t)).length?e:[t]},connected(){u(this.mode,"media")||(me(this.$el)||J(this.$el,"tabindex","0"),!this.cls&&ut(this.$el,"a")&&J(this.$el,"role","button"))},observe:gn({target:({target:e})=>e}),events:[{name:Xt,filter(){return u(this.mode,"hover")},handler(e){this._preventClick=null,!Ze(e)||x(this._showState)||this.$el.disabled||(Ue(this.$el,"focus"),He(document,Xt,()=>
87Ue(this.$el,"blur"),!0,e=>!this.$el.contains(e.target)),u(this.mode,"click")&&(this._preventClick=!0))}},{name:`mouseenter mouseleave ${Qt} ${ei} focus blur`,filter(){return u(this.mode,"hover")},handler(e){if(Ze(e)||this.$el.disabled)return;const t=u(["mouseenter",Qt,"focus"],e.type),i=this.isToggled(this.target);t||!(!x(this._showState)||"blur"!==e.type&&be(this.$el,":focus")||"blur"===e.type&&be(this.$el,":hover"))?t&&x(this._showState)&&i!==this._showState||(this._showState=t?i:null,this.toggle("toggle"+(t?"show":"hide"))):i===this._showState&&(this._showState=null)}},{name:"keydown",filter(){return u(this.mode,"click")&&!ut(this.$el,"input")},handler(e){32===e.keyCode&&(e.preventDefault(),this.$el.click())}},{name:"click",filter(){return["click","hover"].some(e=>u(this.mode,e))},handler(e){let t;(this._preventClick||e.target.closest('a[href="#"], a[href=""]')||(t=e.target.closest("a[href]"))&&(!this.isToggled(this.target)||t.hash&&be(this.target,t.hash)))&&e.preventDefault(),!this._preventClick&&u(this.mode,"click")&&this.toggle()}},{name:"mediachange",filter(){return u(this.mode,"media")},el(){return this.target},handler(e,t){t.matches^this.isToggled(this.target)&&this.toggle()}}],methods:{async toggle(e){if(!Ue(this.target,e||"toggle",[this]))return;if(Q(this.$el,"aria-expanded")&&J(this.$el,"aria-expanded",!this.isToggled(this.target)),!this.queued)return this.toggleElement(this.target);const t=this.target.filter(e=>se(e,this.clsLeave));if(t.length){for(const e of this.target){const i=u(t,e);this.toggleElement(e,i,i)}return}const i=this.target.filter(this.isToggled);await this.toggleElement(i,!1)&&await this.toggleElement(this.target.filter(e=>!u(i,e)),!0)}}};return j(Object.freeze({__proto__:null,Accordion:ns,Alert:os,Close:zs,Cover:ls,Drop:ds,DropParentIcon:Os,Dropdown:ds,Dropnav:bs,FormCustom:ws,Grid:_s,HeightMatch:Cs,HeightViewport:Ts,Icon:Ds,Img:qs,Leader:Js,Margin:_n,Marker:Vs,Modal:Qs,Nav:ea,NavParentIcon:Ls,Navbar:ta,NavbarParentIcon:Os,NavbarToggleIcon:Fs,Offcanvas:na,OverflowAuto:oa,OverlayIcon:Os,PaginationNext:Us,PaginationPrevious:Ws,Responsive:sa,Scroll:aa,Scrollspy:ua,ScrollspyNav:ha,SearchIcon:Rs,SlidenavNext:js,SlidenavPrevious:js,Spinner:Bs,Sticky:da,Svg:va,Switcher:xa,Tab:Ca,Toggle:Sa,Totop:Hs,Video:as}),(e,t)=>Nr.component(t,e)),function(e){Gt&&window.MutationObserver&&(document.body?requestAnimationFrame(()=>Ko(e)):new MutationObserver((t,i)=>{document.body&&(Ko(e),i.disconnect())}).observe(document.documentElement,{childList:!0}))}(Nr),j(Xo,(e,t)=>Nr.component(t,e)),Nr})},{}],402:[function(e,t,i){(function(e){(function(){function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],403:[function(e,t,i){ 88/*! 89 * CookieConsent v2.9.2 90 * https://www.github.com/orestbida/cookieconsent 91 * Author Orest Bida 92 * Released under the MIT License 93 */ 94!function(){"use strict";var e="initCookieConsent";"undefined"!=typeof window&&"function"!=typeof window[e]&&(window[e]=function(e){var t,i,n,r,o,s,a,l,c,u,h,d,f,p,m,g,v,b,y,w,_,k,x,C,S,E,T,A,I,M,P,D,O,L,R,B={mode:"opt-in",current_lang:"en",auto_language:null,autorun:!0,page_scripts:!0,hide_from_bots:!0,cookie_name:"cc_cookie",cookie_expiration:182,cookie_domain:location.hostname,cookie_path:"/",cookie_same_site:"Lax",use_rfc_cookie:!1,autoclear_cookies:!0,revision:0,script_selector:"data-cookiecategory"},N={},j={},F=null,z=!0,V=!1,H=!1,U=!1,W=!1,$=!0,G=[],q=!1,Y=[],Z=[],X=[],K=!1,J=[],Q=[],ee=[],te=[],ie=[],ne=document.documentElement,re=function(e){"number"==typeof(t=e).cookie_expiration&&(B.cookie_expiration=t.cookie_expiration),"number"==typeof t.cookie_necessary_only_expiration&&(B.cookie_necessary_only_expiration=t.cookie_necessary_only_expiration),"boolean"==typeof t.autorun&&(B.autorun=t.autorun),"string"==typeof t.cookie_domain&&(B.cookie_domain=t.cookie_domain),"string"==typeof t.cookie_same_site&&(B.cookie_same_site=t.cookie_same_site),"string"==typeof t.cookie_path&&(B.cookie_path=t.cookie_path),"string"==typeof t.cookie_name&&(B.cookie_name=t.cookie_name),"function"==typeof t.onAccept&&(h=t.onAccept),"function"==typeof t.onFirstAction&&(f=t.onFirstAction),"function"==typeof t.onChange&&(d=t.onChange),"opt-out"===t.mode&&(B.mode="opt-out"),"number"==typeof t.revision&&(t.revision>-1&&(B.revision=t.revision),W=!0),"boolean"==typeof t.autoclear_cookies&&(B.autoclear_cookies=t.autoclear_cookies),!0===t.use_rfc_cookie&&(B.use_rfc_cookie=!0),"boolean"==typeof t.hide_from_bots&&(B.hide_from_bots=t.hide_from_bots),B.hide_from_bots&&(K=navigator&&(navigator.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(navigator.userAgent)||navigator.webdriver)),B.page_scripts=!0===t.page_scripts,"browser"===t.auto_language||!0===t.auto_language?B.auto_language="browser":"document"===t.auto_language&&(B.auto_language="document"),B.auto_language,B.current_lang=de(t.languages,t.current_lang)},oe=function(e){for(var t="accept-",i=a("c-settings"),n=a(t+"all"),r=a(t+"necessary"),o=a(t+"custom"),s=0;s<i.length;s++)i[s].setAttribute("aria-haspopup","dialog"),we(i[s],"click",function(e){e.preventDefault(),N.showSettings(0)});for(s=0;s<n.length;s++)we(n[s],"click",function(e){l(e,"all")});for(s=0;s<o.length;s++)we(o[s],"click",function(e){l(e)});for(s=0;s<r.length;s++)we(r[s],"click",function(e){l(e,[])});function a(t){return(e||document).querySelectorAll('[data-cc="'+t+'"]')}function l(e,t){e.preventDefault(),N.accept(t),N.hideSettings(),N.hide()}},se=function(e,t){return t.hasOwnProperty(e)?e:_e(t).length>0?t.hasOwnProperty(B.current_lang)?B.current_lang:_e(t)[0]:void 0},ae=function(e){if(!0===t.force_consent&&ke(ne,"force--consent"),!y){y=he("div");var i=he("div"),n=he("div");y.id="cm",i.id="c-inr-i",n.id="cm-ov",y.tabIndex=-1,y.setAttribute("role","dialog"),y.setAttribute("aria-modal","true"),y.setAttribute("aria-hidden","false"),y.setAttribute("aria-labelledby","c-ttl"),y.setAttribute("aria-describedby","c-txt"),b.appendChild(y),b.appendChild(n),y.style.visibility=n.style.visibility="hidden",n.style.opacity=0}var r=t.languages[e].consent_modal.title;r&&(w||((w=he("h2")).id="c-ttl",i.appendChild(w)),w.innerHTML=r);var o=t.languages[e].consent_modal.description;W&&(o=$?o.replace("{{revision_message}}",""):o.replace("{{revision_message}}",t.languages[e].consent_modal.revision_message||"")),_||((_=he("div")).id="c-txt",i.appendChild(_)),_.innerHTML=o;var s,a=t.languages[e].consent_modal.primary_btn,l=t.languages[e].consent_modal.secondary_btn;
vendor: 4,456 bytes, line 94
94a&&(k||((k=he("button")).id="c-p-bn",k.className="c-bn",k.appendChild(Se(1)),"accept_all"===a.role&&(s="all"),we(k,"click",function(){N.hide(),N.accept(s)})),k.firstElementChild.innerHTML=t.languages[e].consent_modal.primary_btn.text),l&&(x||((x=he("button")).id="c-s-bn",x.className="c-bn c_link",x.appendChild(Se(1)),"accept_necessary"===l.role?we(x,"click",function(){N.hide(),N.accept([])}):we(x,"click",function(){N.showSettings(0)})),x.firstElementChild.innerHTML=t.languages[e].consent_modal.secondary_btn.text);var c=t.gui_options;S||((S=he("div")).id="c-inr",S.appendChild(i)),C||((C=he("div")).id="c-bns",c&&c.consent_modal&&!0===c.consent_modal.swap_buttons?(l&&C.appendChild(x),a&&C.appendChild(k),C.className="swap"):(a&&C.appendChild(k),l&&C.appendChild(x)),(a||l)&&S.appendChild(C),y.appendChild(S)),V=!0,oe(S)},le=function(e){if(E)(P=he("div")).id="s-bl";else{(E=he("div")).tabIndex=-1;var i=he("div"),n=he("div"),r=he("div");T=he("div"),A=he("h2");var o=he("div");(I=he("button")).appendChild(Se(2));var s=he("div");M=he("div");var a=he("div"),l=!1;we(E,"mouseup",function(e){!U||l||T.contains(e.target)||N.hideSettings()}),we(E,"mousedown",function(e){U&&(l=T.contains(e.target))}),E.id="s-cnt",i.id="c-vln",r.id="c-s-in",n.id="cs",A.id="s-ttl",T.id="s-inr",o.id="s-hdr",M.id="s-bl",I.id="s-c-bn",a.id="cs-ov",s.id="s-c-bnc",I.className="c-bn",E.setAttribute("role","dialog"),E.setAttribute("aria-modal","true"),E.setAttribute("aria-hidden","true"),E.setAttribute("aria-labelledby","s-ttl"),E.style.visibility=a.style.visibility="hidden",a.style.opacity=0,s.appendChild(I),we(document,"keydown",function(e){27===e.keyCode&&U&&N.hideSettings()},!0),we(I,"click",function(){N.hideSettings()})}var h=t.languages[e].settings_modal;I.setAttribute("aria-label",h.close_btn_label||"Close"),u=h.blocks,c=h.cookie_table_headers;var d=h.cookie_table_caption,f=u.length;A.innerHTML=h.title;for(var p=0;p<f;++p){var m=u[p].title,g=u[p].description,v=u[p].toggle,y=u[p].cookie_table,w=!0===t.remove_cookie_tables,_=!!g||!w&&!!y,k=he("div"),x=he("div");if(g){var C=he("div");C.className="p",C.insertAdjacentHTML("beforeend",g)}var S=he("div");if(S.className="title",k.className="c-bl",x.className="desc",void 0!==v){var B="c-ac-"+p,F=he(_?"button":"div"),V=he("label"),H=he("input"),W=he("span"),$=he("span"),G=he("span"),q=he("span");F.className=_?"b-tl exp":"b-tl",V.className="b-tg",H.className="c-tgl",G.className="on-i",q.className="off-i",W.className="c-tg",$.className="t-lb",_&&(F.setAttribute("aria-expanded","false"),F.setAttribute("aria-controls",B)),H.type="checkbox",W.setAttribute("aria-hidden","true");var Y=v.value;H.value=Y,$.textContent=m,F.insertAdjacentHTML("beforeend",m),S.appendChild(F),W.appendChild(G),W.appendChild(q),z?v.enabled?(H.checked=!0,!P&&ee.push(!0),v.enabled&&!P&&X.push(Y)):!P&&ee.push(!1):ue(j.categories,Y)>-1?(H.checked=!0,!P&&ee.push(!0)):!P&&ee.push(!1),!P&&te.push(Y),v.readonly&&(H.disabled=!0,ke(W,"c-ro"),!P&&ie.push(Y)),ke(x,"b-acc"),ke(S,"b-bn"),ke(k,"b-ex"),x.id=B,x.setAttribute("aria-hidden","true"),V.appendChild(H),V.appendChild(W),V.appendChild($),S.appendChild(V),_&&function(e,t,i){we(F,"click",function(){Ce(t,"act")?(xe(t,"act"),i.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(ke(t,"act"),i.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false"))},!1)}(x,k,F)}else if(m){var Z=he("div");Z.className="b-tl",Z.setAttribute("role","heading"),Z.setAttribute("aria-level","3"),Z.insertAdjacentHTML("beforeend",m),S.appendChild(Z)}if(m&&k.appendChild(S),g&&x.appendChild(C),!w&&void 0!==y){for(var K=document.createDocumentFragment(),J=0;J<c.length;++J){var Q=he("th"),ne=c[J];if(Q.setAttribute("scope","col"),ne){var re=ne&&_e(ne)[0];Q.textContent=c[J][re],K.appendChild(Q)}}var oe=he("tr");oe.appendChild(K);var se=he("thead");se.appendChild(oe);var ae=he("table");if(d){var le=he("caption");le.innerHTML=d,ae.appendChild(le)}ae.appendChild(se);for(var ce=document.createDocumentFragment(),de=0;de<y.length;de++){for(var fe=he("tr"),pe=0;pe<c.length;++pe)if(ne=c[pe]){re=_e(ne)[0];var me=he("td");me.insertAdjacentHTML("beforeend",y[de][re]),me.setAttribute("data-column",ne[re]),fe.appendChild(me)}ce.appendChild(fe)}var ge=he("tbody");ge.appendChild(ce),ae.appendChild(ge),x.appendChild(ae)}(v&&m||!v&&(m||g))&&(k.appendChild(x),P?P.appendChild(k):M.appendChild(k))}D||((D=he("div")).id="s-bns"),L||((L=he("button")).id="s-all-bn",L.className="
94c-bn",D.appendChild(L),we(L,"click",function(){N.accept("all"),N.hideSettings(),N.hide()})),L.innerHTML=h.accept_all_btn;var ve=h.reject_all_btn;if(ve&&(R||((R=he("button")).id="s-rall-bn",R.className="c-bn",we(R,"click",function(){N.accept([]),N.hideSettings(),N.hide()}),T.className="bns-t",D.appendChild(R)),R.innerHTML=ve),O||((O=he("button")).id="s-sv-bn",O.className="c-bn",D.appendChild(O),we(O,"click",function(){N.accept(),N.hideSettings(),N.hide()})),O.innerHTML=h.save_settings_btn,P)return T.replaceChild(P,M),void(M=P);o.appendChild(A),o.appendChild(s),T.appendChild(o),T.appendChild(M),T.appendChild(D),r.appendChild(T),n.appendChild(r),i.appendChild(n),E.appendChild(i),b.appendChild(E),b.appendChild(a)};N.updateLanguage=function(e,i){if("string"==typeof e){var n=se(e,t.languages);return(n!==B.current_lang||!0===i)&&(B.current_lang=n,V&&ae(n),le(n),!0)}};var ce=function(e){var t=u.length,i=-1;q=!1;var n=be("","all"),r=[B.cookie_domain,"."+B.cookie_domain];if("www."===B.cookie_domain.slice(0,4)){var o=B.cookie_domain.substr(4);r.push(o),r.push("."+o)}for(var s=0;s<t;s++){var a=u[s];if(a.hasOwnProperty("toggle")){var l=ue(G,a.toggle.value)>-1;if(!ee[++i]&&a.hasOwnProperty("cookie_table")&&(e||l)){var h=a.cookie_table,d=_e(c[0])[0],f=h.length;"on_disable"===a.toggle.reload&&l&&(q=!0);for(var p=0;p<f;p++){var m=r,g=h[p],v=[],b=g[d],y=g.is_regex||!1,w=g.domain||null,_=g.path||!1;if(w&&(m=[w,"."+w]),y)for(var k=0;k<n.length;k++)n[k].match(b)&&v.push(n[k]);else{var x=ue(n,b);x>-1&&v.push(n[x])}v.length>0&&(ye(v,_,m),"on_clear"===a.toggle.reload&&(q=!0))}}}}},ue=function(e,t){return e.indexOf(t)},he=function(e){var t=document.createElement(e);return"button"===e&&t.setAttribute("type",e),t},de=function(e,t){return"browser"===B.auto_language?se(fe(),e):"document"===B.auto_language?se(document.documentElement.lang,e):"string"==typeof t?B.current_lang=se(t,e):(B.current_lang,B.current_lang)},fe=function(){var e=navigator.language||navigator.browserLanguage;return e.length>2&&(e=e[0]+e[1]),e.toLowerCase()};N.allowedCategory=function(e){if(z&&"opt-in"!==B.mode)t=X;else var t=JSON.parse(be(B.cookie_name,"one",!0)||"{}").categories||[];return ue(t,e)>-1},N.run=function(t){if(!document.getElementById("cc_div")){if(re(t),K)return;j=JSON.parse(be(B.cookie_name,"one",!0)||"{}");var a=void 0!==(r=j.consent_uuid);if((i=j.consent_date)&&(i=new Date(i)),(n=j.last_consent_update)&&(n=new Date(n)),F=void 0!==j.data?j.data:null,W&&j.revision!==B.revision&&($=!1),V=z=!(a&&$&&i&&n&&r),function(){(v=he("div")).id="cc--main",v.style.position="fixed",v.innerHTML='<div id="cc_div" class="cc_div"></div>',b=v.children[0];var t=B.current_lang;V&&ae(t),le(t),(e||document.body).appendChild(v)}(),function(){var e=["[href]","button","input","details",'[tabindex="0"]'];function t(t,i){try{var n=t.querySelectorAll(e.join(':not([tabindex="-1"]), '))}catch(i){return t.querySelectorAll(e.join(", "))}i[0]=n[0],i[1]=n[n.length-1]}t(T,Q),V&&t(y,J)}(),function(e){if("object"==typeof e){var t=e.consent_modal,i=e.settings_modal;V&&t&&n(y,["box","bar","cloud"],["top","middle","bottom"],["zoom","slide"],t.layout,t.position,t.transition),i&&n(E,["bar"],["left","right"],["zoom","slide"],i.layout,i.position,i.transition)}function n(e,t,i,n,r,o,s){if(o=o&&o.split(" ")||[],ue(t,r)>-1&&(ke(e,r),("bar"!==r||"middle"!==o[0])&&ue(i,o[0])>-1))for(var a=0;a<o.length;a++)ke(e,o[a]);ue(n,s)>-1&&ke(e,s)}}(t.gui_options),oe(),B.autorun&&V&&N.show(t.delay||0),setTimeout(function(){ke(v,"c--anim")},30),setTimeout(function(){we(document,"keydown",function(e){if("Tab"===e.key&&(H||U)&&o){var t=Ae();e.shiftKey?t!==o[0]&&s.contains(t)||(e.preventDefault(),Ee(o[1])):t!==o[1]&&s.contains(t)||(e.preventDefault(),Ee(o[0]))}})},100),z)"opt-out"===B.mode&&(B.mode,pe());else{var l="boolean"==typeof j.rfc_cookie;(!l||l&&j.rfc_cookie!==B.use_rfc_cookie)&&(j.rfc_cookie=B.use_rfc_cookie,ve(B.cookie_name,JSON.stringify(j))),p=ge(me()),pe(),"function"==typeof h&&h(j)}}};var pe=function(){if(B.page_scripts){var e=j.categories||[];z&&"opt-out"===B.mode&&(e=X);var t=document.querySelectorAll("script["+B.script_selector+"]"),i=function(t,n){if(n<t.length){var r=t[n],o=r.getAttribute(B.script_selector);if(ue(e,o)>-1){r.type=r.getAttribute("data-type")||"text/javascript",r.removeAttribute(B.script_selector);var s=r.getAttribute("data-src");s&&r.removeAttribute("data-src");var a=he("script");
vendor: 4,906 bytes, line 94
94if(a.textContent=r.innerHTML,function(e,t){for(var i=t.attributes,n=i.length,r=0;r<n;r++){var o=i[r].nodeName;e.setAttribute(o,t[o]||t.getAttribute(o))}}(a,r),s?a.src=s:s=r.src,s&&(a.readyState?a.onreadystatechange=function(){"loaded"!==a.readyState&&"complete"!==a.readyState||(a.onreadystatechange=null,i(t,++n))}:a.onload=function(){a.onload=null,i(t,++n)}),r.parentNode.replaceChild(a,r),s)return}i(t,++n)}};i(t,0)}};N.set=function(e,t){return"data"===e&&function(e,t){var i=!1;if("update"===t){var n=typeof(F=N.get("data"))==typeof e;if(n&&"object"==typeof F)for(var r in!F&&(F={}),e)F[r]!==e[r]&&(F[r]=e[r],i=!0);else!n&&F||F===e||(F=e,i=!0)}else F=e,i=!0;return i&&(j.data=F,ve(B.cookie_name,JSON.stringify(j))),i}(t.value,t.mode)},N.get=function(e,t){return JSON.parse(be(t||B.cookie_name,"one",!0)||"{}")[e]},N.getConfig=function(e){return B[e]||t[e]};var me=function(){return Y=j.categories||[],Z=te.filter(function(e){return-1===ue(Y,e)}),{accepted:Y,rejected:Z}},ge=function(e){var t="custom",i=ie.length;return e.accepted.length===te.length?t="all":e.accepted.length===i&&(t="necessary"),t};N.getUserPreferences=function(){var e=me();return{accept_type:ge(e),accepted_categories:e.accepted,rejected_categories:e.rejected}},N.loadScript=function(e,t,i){var n="function"==typeof t;if(document.querySelector('script[src="'+e+'"]'))n&&t();else{var r=he("script");if(i&&i.length>0)for(var o=0;o<i.length;++o)i[o]&&r.setAttribute(i[o].name,i[o].value);n&&(r.onload=t),r.src=e,document.head.appendChild(r)}},N.updateScripts=function(){pe()},N.show=function(e,t){!0===t&&ae(B.current_lang),V&&(m=Ae(),o=J,s=y,H=!0,y.removeAttribute("aria-hidden"),setTimeout(function(){ke(ne,"show--consent")},e>0?e:t?30:0))},N.hide=function(){V&&(H=!1,Ee(a),y.setAttribute("aria-hidden","true"),xe(ne,"show--consent"),Ee(m),m=null)},N.showSettings=function(e){U=!0,E.removeAttribute("aria-hidden"),H?g=Ae():m=Ae(),s=E,o=Q,setTimeout(function(){ke(ne,"show--settings")},e>0?e:0)},N.hideSettings=function(){U=!1,Te(),Ee(l),E.setAttribute("aria-hidden","true"),xe(ne,"show--settings"),H?(Ee(g),g=null,s=y,o=J):(Ee(m),m=null)},N.accept=function(e,t){var o=e||void 0,s=t||[],a=[];if(o)if("object"==typeof o&&"number"==typeof o.length)for(var l=0;l<o.length;l++)-1!==ue(te,o[l])&&a.push(o[l]);else"string"==typeof o&&("all"===o?a=te.slice():-1!==ue(te,o)&&a.push(o));else a=function(){for(var e=document.querySelectorAll(".c-tgl")||[],t=[],i=0;i<e.length;i++)e[i].checked&&t.push(e[i].value);return t}();if(s.length>=1)for(l=0;l<s.length;l++)a=a.filter(function(e){return e!==s[l]});for(l=0;l<te.length;l++)!0===ie.includes(te[l])&&-1===ue(a,te[l])&&a.push(te[l]);!function(e){G=[];var t=E.querySelectorAll(".c-tgl")||[];if(t.length>0)for(var o=0;o<t.length;o++)-1!==ue(e,te[o])?(t[o].checked=!0,ee[o]||(G.push(te[o]),ee[o]=!0)):(t[o].checked=!1,ee[o]&&(G.push(te[o]),ee[o]=!1));!z&&B.autoclear_cookies&&G.length>0&&ce(),i||(i=new Date),r||(r=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){try{return(e^(window.crypto||window.msCrypto).getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}catch(e){return""}})),j={categories:e,level:e,revision:B.revision,data:F,rfc_cookie:B.use_rfc_cookie,consent_date:i.toISOString(),consent_uuid:r},(z||G.length>0)&&($=!0,n=n?new Date:i,j.last_consent_update=n.toISOString(),p=ge(me()),ve(B.cookie_name,JSON.stringify(j)),pe()),z&&(B.autoclear_cookies&&ce(!0),"function"==typeof f&&f(N.getUserPreferences(),j),"function"==typeof h&&h(j),z=!1,"opt-in"===B.mode)||("function"==typeof d&&G.length>0&&d(j,G),q&&location.reload())}(a)},N.eraseCookies=function(e,t,i){var n=[],r=i?[i,"."+i]:[B.cookie_domain,"."+B.cookie_domain];if("object"==typeof e&&e.length>0)for(var o=0;o<e.length;o++)this.validCookie(e[o])&&n.push(e[o]);else this.validCookie(e)&&n.push(e);ye(n,t,r)};var ve=function(e,t){var i=B.cookie_expiration;"number"==typeof B.cookie_necessary_only_expiration&&"necessary"===p&&(i=B.cookie_necessary_only_expiration),t=B.use_rfc_cookie?encodeURIComponent(t):t;var n=new Date;n.setTime(n.getTime()+24*i*60*60*1e3);var r=e+"="+(t||"")+"; expires="+n.toUTCString()+"; Path="+B.cookie_path+";";r+=" SameSite="+B.cookie_same_site+";",location.hostname.indexOf(".")>-1&&B.cookie_domain&&(r+=" Domain="+B.cookie_domain+";"),"https:"===location.protocol&&(r+=" Secure;"),document.cookie=r},be=function(e,t,i){var n;if("one"===t){if((n=(n=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))?i?n.pop():e:"")&&e===B.cookie_name){try{n=JSON.parse(n)}catch(e){try{n=JSON.parse(decodeURIComponent(n))}catch(e){n={}}}n=JSON.stringify(n)}}else if("all"===t){var r=document.cookie.split(/;\s*/);n=[];for(var o=0;o<r.length;o++)n.push(r[o].split("=")[0])}return n},ye=function(e,t,i){for(var n=t||"/",r=0;r<e.length;r++){for(var o=0;o<i.length;o++)document.cookie=e[r]+"=; path="+n+(0==i[o].indexOf(".")?"; domain="+i[o]:"")+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";e[r]}};
94N.validCookie=function(e){return""!==be(e,"one",!0)},N.validConsent=function(){return!z};var we=function(e,t,i,n){e.addEventListener(t,i,!0===n&&{passive:!0})},_e=function(e){if("object"==typeof e)return Object.keys(e)},ke=function(e,t){e.classList.add(t)},xe=function(e,t){e.classList.remove(t)},Ce=function(e,t){return e.classList.contains(t)},Se=function(e){var t=he("span");return t.tabIndex=-1,1===e?a=t:l=t,t},Ee=function(e){e&&e instanceof HTMLElement&&e.focus()},Te=function(){for(var e=T.querySelectorAll(".c-tgl"),t=0;t<e.length;t++){var i=e[t].value,n=ie.includes(i);e[t].checked=n||N.allowedCategory(i)}},Ae=function(){return document.activeElement};return N})}()},{}],"core-js/modules/es.regexp.flags.js":[function(e,t,i){"use strict";var n=e("../internals/global"),r=e("../internals/descriptors"),o=e("../internals/define-built-in-accessor"),s=e("../internals/regexp-flags"),a=e("../internals/fails"),l=n.RegExp,c=l.prototype;r&&a(function(){var e=!0;try{l(".","d")}catch(t){e=!1}var t={},i="",n=e?"dgimsy":"gimsy",r=function(e,n){Object.defineProperty(t,e,{get:function(){return i+=n,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(o.hasIndices="d"),o)r(s,o[s]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(t)!==n||i!==n})&&o(c,"flags",{configurable:!0,get:s})},{"../internals/define-built-in-accessor":130,"../internals/descriptors":132,"../internals/fails":137,"../internals/global":144,"../internals/regexp-flags":159}]},{},[42]); 95//# sourceMappingURL=index-69a2dbabdb.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.