PageSourceSearch

https://folex-lite-astro.vercel.app/_astro/ContactForm.astro_astro_type_script_index_0_lang.BqIpEVji.js

js folex-lite-astro.vercel.app collected 2026-10-03 06:57:31 UTC 96,408 bytes, 69 lines download raw bytes

1var Q={exports:{}},de;function Re(){return de||(de=1,function(s,e){(function(n,l){s.exports=l()})(self,()=>(()=>{var n={223:(p,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BREAKPOINTS=r.COMBO_BOX_ACCESSIBILITY_KEY_SET=r.SELECT_ACCESSIBILITY_KEY_SET=r.TABS_ACCESSIBILITY_KEY_SET=r.OVERLAY_ACCESSIBILITY_KEY_SET=r.DROPDOWN_ACCESSIBILITY_KEY_SET=r.POSITIONS=void 0,r.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},r.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Home","End","Enter"],r.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],r.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],r.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Space","Tab"],r.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],r.BREAKPOINTS={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},292:function(p,r){/*
2 * @version: 3.1.0
3 * @author: Preline Labs Ltd.
4 * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
5 * Copyright 2024 Preline Labs Ltd.
6 */Object.defineProperty(r,"__esModule",{value:!0}),r.menuSearchHistory=r.classToClassList=r.htmlToElement=r.afterTransition=r.dispatch=r.debounce=r.isScrollable=r.isParentOrElementHidden=r.isJson=r.isIpadOS=r.isIOS=r.isDirectChild=r.isFormElement=r.isFocused=r.isEnoughSpace=r.getHighestZIndex=r.getZIndex=r.getClassPropertyAlt=r.getClassProperty=r.stringToBoolean=void 0,r.stringToBoolean=d=>d==="true",r.getClassProperty=(d,x,b="")=>(window.getComputedStyle(d).getPropertyValue(x)||b).replace(" ",""),r.getClassPropertyAlt=(d,x,b="")=>{let k="";return d.classList.forEach(T=>{T.includes(x)&&(k=T)}),k.match(/:(.*)]/)?k.match(/:(.*)]/)[1]:b};const c=d=>window.getComputedStyle(d).getPropertyValue("z-index");r.getZIndex=c,r.getHighestZIndex=d=>{let x=Number.NEGATIVE_INFINITY;return d.forEach(b=>{let k=c(b);k!=="auto"&&(k=parseInt(k,10),k>x&&(x=k))}),x},r.isDirectChild=(d,x)=>{const b=d.children;for(let k=0;k<b.length;k++)if(b[k]===x)return!0;return!1},r.isEnoughSpace=(d,x,b="auto",k=10,T=null)=>{const i=x.getBoundingClientRect(),o=T?T.getBoundingClientRect():null,a=window.innerHeight,u=o?i.top-o.top:i.top,f=(T?o.bottom:a)-i.bottom,m=d.clientHeight+k;return b==="bottom"?f>=m:b==="top"?u>=m:u>=m||f>=m},r.isFocused=d=>document.activeElement===d,r.isFormElement=d=>d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement,r.isIOS=()=>!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),r.isIpadOS=()=>navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),r.isJson=d=>{if(typeof d!="string")return!1;const x=d.trim()[0],b=d.trim().slice(-1);if(x==="{"&&b==="}"||x==="["&&b==="]")try{return JSON.parse(d),!0}catch{return!1}return!1};const g=d=>d?window.getComputedStyle(d).display==="none"||g(d.parentElement):!1;r.isParentOrElementHidden=g,r.isScrollable=d=>{const x=window.getComputedStyle(d),b=x.overflowY,k=x.overflowX,T=(b==="scroll"||b==="auto")&&d.scrollHeight>d.clientHeight,i=(k==="scroll"||k==="auto")&&d.scrollWidth>d.clientWidth;return T||i},r.debounce=(d,x=200)=>{let b;return(...k)=>{clearTimeout(b),b=setTimeout(()=>{d.apply(this,k)},x)}},r.dispatch=(d,x,b=null)=>{const k=new CustomEvent(d,{detail:{payload:b},bubbles:!0,cancelable:!0,composed:!1});x.dispatchEvent(k)},r.afterTransition=(d,x)=>{const b=()=>{x(),d.removeEventListener("transitionend",b,!0)},k=window.getComputedStyle(d),T=k.getPropertyValue("transition-duration");k.getPropertyValue("transition-property")!=="none"&&parseFloat(T)>0?d.addEventListener("transitionend",b,!0):x()},r.htmlToElement=d=>{const x=document.createElement("template");return d=d.trim(),x.innerHTML=d,x.content.firstChild},r.classToClassList=(d,x,b=" ",k="add")=>{d.split(b).forEach(T=>k==="add"?x.classList.add(T):x.classList.remove(T))};const v={historyIndex:-1,addHistory(d){this.historyIndex=d},existsInHistory(d){return d>this.historyIndex},clearHistory(){this.historyIndex=-1}};r.menuSearchHistory=v},442:function(p,r,c){/*
7 * HSSelect
8 * @version: 3.1.0
9 * @author: Preline Labs Ltd.
10 * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
11 * Copyright 2024 Preline Labs Ltd.
12 */var g=this&&this.__awaiter||function(T,i,o,a){return new(o||(o=Promise))(function(u,f){function m(S){try{y(a.next(S))}catch(h){f(h)}}function w(S){try{y(a.throw(S))}catch(h){f(h)}}function y(S){var h;S.done?u(S.value):(h=S.value,h instanceof o?h:new o(function(A){A(h)})).then(m,w)}y((a=a.apply(T,i||[])).next())})}
12,v=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0});const d=c(292),x=v(c(961)),b=c(223);class k extends x.default{constructor(i,o){var a,u,f,m,w;super(i,o),this.optionId=0;const y=i.getAttribute("data-hs-select"),S=y?JSON.parse(y):{},h=Object.assign(Object.assign({},S),o);this.value=h?.value||this.el.value||null,this.placeholder=h?.placeholder||"Select...",this.hasSearch=h?.hasSearch||!1,this.minSearchLength=(a=h?.minSearchLength)!==null&&a!==void 0?a:0,this.preventSearchFocus=h?.preventSearchFocus||!1,this.mode=h?.mode||"default",this.viewport=h?.viewport!==void 0?document.querySelector(h?.viewport):null,this.isOpened=!!h?.isOpened||!1,this.isMultiple=this.el.hasAttribute("multiple")||!1,this.isDisabled=this.el.hasAttribute("disabled")||!1,this.selectedItems=[],this.apiUrl=h?.apiUrl||null,this.apiQuery=h?.apiQuery||null,this.apiOptions=h?.apiOptions||null,this.apiSearchQueryKey=h?.apiSearchQueryKey||null,this.apiDataPart=h?.apiDataPart||null,this.apiLoadMore=h?.apiLoadMore===!0?{perPage:10,scrollThreshold:100}:typeof h?.apiLoadMore=="object"&&h?.apiLoadMore!==null&&{perPage:h.apiLoadMore.perPage||10,scrollThreshold:h.apiLoadMore.scrollThreshold||100},this.apiFieldsMap=h?.apiFieldsMap||null,this.apiIconTag=h?.apiIconTag||null,this.apiSelectedValues=h?.apiSelectedValues||null,this.currentPage=0,this.isLoading=!1,this.hasMore=!0,this.wrapperClasses=h?.wrapperClasses||null,this.toggleTag=h?.toggleTag||null,this.toggleClasses=h?.toggleClasses||null,this.toggleCountText=typeof h?.toggleCountText===void 0?null:h.toggleCountText,this.toggleCountTextPlacement=h?.toggleCountTextPlacement||"postfix",this.toggleCountTextMinItems=h?.toggleCountTextMinItems||1,this.toggleCountTextMode=h?.toggleCountTextMode||"countAfterLimit",this.toggleSeparators={items:((u=h?.toggleSeparators)===null||u===void 0?void 0:u.items)||", ",betweenItemsAndCounter:((f=h?.toggleSeparators)===null||f===void 0?void 0:f.betweenItemsAndCounter)||"and"},this.tagsItemTemplate=h?.tagsItemTemplate||null,this.tagsItemClasses=h?.tagsItemClasses||null,this.tagsInputId=h?.tagsInputId||null,this.tagsInputClasses=h?.tagsInputClasses||null,this.dropdownTag=h?.dropdownTag||null,this.dropdownClasses=h?.dropdownClasses||null,this.dropdownDirectionClasses=h?.dropdownDirectionClasses||null,this.dropdownSpace=h?.dropdownSpace||10,this.dropdownPlacement=h?.dropdownPlacement||null,this.dropdownVerticalFixedPlacement=h?.dropdownVerticalFixedPlacement||null,this.dropdownScope=h?.dropdownScope||"parent",this.dropdownAutoPlacement=h?.dropdownAutoPlacement||!1,this.searchTemplate=h?.searchTemplate||null,this.searchWrapperTemplate=h?.searchWrapperTemplate||null,this.searchWrapperClasses=h?.searchWrapperClasses||"bg-white p-2 sticky top-0",this.searchId=h?.searchId||null,this.searchLimit=h?.searchLimit||1/0,this.isSearchDirectMatch=h?.isSearchDirectMatch===void 0||h?.isSearchDirectMatch,this.searchClasses=h?.searchClasses||"block w-[calc(100%-32px)] text-sm border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 py-2 px-3 my-2 mx-4",this.searchPlaceholder=h?.searchPlaceholder||"Search...",this.searchNoResultTemplate=h?.searchNoResultTemplate||"<span></span>",this.searchNoResultText=h?.searchNoResultText||"No results found",this.searchNoResultClasses=h?.searchNoResultClasses||"px-4 text-sm text-gray-800 dark:text-neutral-200",this.optionAllowEmptyOption=h?.optionAllowEmptyOption!==void 0&&h?.optionAllowEmptyOption,this.optionTemplate=h?.optionTemplate||null,this.optionTag=h?.optionTag||null,this.optionClasses=h?.optionClasses||null,this.extraMarkup=h?.extraMarkup||null,this.descriptionClasses=h?.descriptionClasses||null,this.iconClasses=h?.iconClasses||null,this.isAddTagOnEnter=(m=h?.isAddTagOnEnter)===null||m===void 0||m,this.isSelectedOptionOnTop=(w=h?.isSelectedOptionOnTop)===null||w===void 0||w,this.animationInProcess=!1,this.selectOptions=[],this.remoteOptions=[],this.tagsInputHelper=null,this.init()}wrapperClick(i){i.target.closest("[data-hs-select-dropdown]")||i.target.closest("[data-tag-value]")||this.tagsInput.focus()}toggleClick(){if(this.isDisabled)return!1;this.toggleFn()}tagsInputFocus(){this.isOpened||this.open()}tagsInputInput(){this.calculateInputWidth()}tagsInputInputSecond(i){this.apiUrl||this.searchOptions(i.target.value)}tagsInputKeydown(i){if(i.key==="Enter"&&this.isAddTagOnEnter){const o=i.target.value;if(this.selectOptions.find(a=>a.val===o))return!1;this.addSelectOption(o,o),this.buildOption(o,o),this.buildOriginalOption(o,o),this.dropdown.querySelector(`[data-value="${o}"]`).click(),this.resetTagsInputField()}}searchInput(i){const o=i.target.value;this.apiUrl?this.remoteSearch(o):this.searchOptions(o)}setValue(i){this.value=i,this.clearSelections(),Array.isArray(i)?this.mode==="tags"?(this.unselectMultipleItems(),this.selectMultipleItems(),this.selectedItems=[],this.wrapper.querySelectorAll("[data-tag-value]").forEach(o=>o.remove()),this.setTagsItems(),this.reassignTagsInputPlaceholder(this.value.length?"":this.placeholder)):(this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder,this.unselectMultipleItems(),this.selectMultipleItems()):(this.setToggleTitle(),this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.selectSingleItem())}init(){this.createCollection(window.$hsSelectCollection,this),this.build()}build(){if(this.el.style.display="none",this.el.children&&Array.from(this.el.children).filter(i=>this.optionAllowEmptyOption||!this.optionAllowEmptyOption&&i.value&&i.value!=="").forEach(i=>
12{const o=i.getAttribute("data-hs-select-option");this.selectOptions=[...this.selectOptions,{title:i.textContent,val:i.value,disabled:i.disabled,options:o!=="undefined"?JSON.parse(o):null}]}),this.optionAllowEmptyOption&&!this.value&&(this.value=""),this.isMultiple){const i=Array.from(this.el.children).filter(o=>o.selected);if(i){const o=[];i.forEach(a=>{o.push(a.value)}),this.value=o}}this.buildWrapper(),this.mode==="tags"?this.buildTags():this.buildToggle(),this.buildDropdown(),this.extraMarkup&&this.buildExtraMarkup()}buildWrapper(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("hs-select","relative"),this.mode==="tags"&&(this.onWrapperClickListener=i=>this.wrapperClick(i),this.wrapper.addEventListener("click",this.onWrapperClickListener)),this.wrapperClasses&&(0,d.classToClassList)(this.wrapperClasses,this.wrapper),this.el.before(this.wrapper),this.wrapper.append(this.el)}buildExtraMarkup(){const i=a=>{const u=(0,d.htmlToElement)(a);return this.wrapper.append(u),u},o=a=>{a.classList.contains("--prevent-click")||a.addEventListener("click",u=>{u.stopPropagation(),this.isDisabled||this.toggleFn()})};if(Array.isArray(this.extraMarkup))this.extraMarkup.forEach(a=>{const u=i(a);o(u)});else{const a=i(this.extraMarkup);o(a)}}buildToggle(){var i,o;let a,u;this.toggleTextWrapper=document.createElement("span"),this.toggleTextWrapper.classList.add("truncate"),this.toggle=(0,d.htmlToElement)(this.toggleTag||"<div></div>"),a=this.toggle.querySelector("[data-icon]"),u=this.toggle.querySelector("[data-title]"),!this.isMultiple&&a&&this.setToggleIcon(),!this.isMultiple&&u&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=((i=this.getItemByValue(this.value))===null||i===void 0?void 0:i.title)||this.placeholder,u||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,d.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),!((o=this.toggle)===null||o===void 0)&&o.ariaExpanded&&(this.isOpened?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.onToggleClickListener=()=>this.toggleClick(),this.toggle.addEventListener("click",this.onToggleClickListener)}setToggleIcon(){var i;const o=this.getItemByValue(this.value),a=this.toggle.querySelector("[data-icon]");if(a){a.innerHTML="";const u=(0,d.htmlToElement)(this.apiUrl&&this.apiIconTag?this.apiIconTag||"":((i=o?.options)===null||i===void 0?void 0:i.icon)||"");this.value&&this.apiUrl&&this.apiIconTag&&o[this.apiFieldsMap.icon]&&(u.src=o[this.apiFieldsMap.icon]||""),a.append(u),u?.src?a.classList.remove("hidden"):a.classList.add("hidden")}}setToggleTitle(){const i=this.toggle.querySelector("[data-title]");let o=this.placeholder;if(this.optionAllowEmptyOption&&this.value===""){const a=this.selectOptions.find(u=>u.val==="");o=a?.title||this.placeholder}else if(this.value)if(this.apiUrl){const a=this.remoteOptions.find(u=>`${u[this.apiFieldsMap.val]}`===this.value||`${u[this.apiFieldsMap.title]}`===this.value);a&&(o=a[this.apiFieldsMap.title])}else{const a=this.selectOptions.find(u=>u.val===this.value);a&&(o=a.title)}i?(i.innerHTML=o,i.classList.add("truncate"),this.toggle.append(i)):this.toggleTextWrapper.innerHTML=o}buildTags(){this.isDisabled&&this.wrapper.classList.add("disabled"),this.buildTagsInput(),this.setTagsItems()}reassignTagsInputPlaceholder(i){this.tagsInput.placeholder=i,this.tagsInputHelper.innerHTML=i,this.calculateInputWidth()}buildTagsItem(i){var o,a,u,f,m;const w=this.getItemByValue(i);let y,S,h,A;const C=document.createElement("div");if(C.setAttribute("data-tag-value",i),this.tagsItemClasses&&(0,d.classToClassList)(this.tagsItemClasses,C),this.tagsItemTemplate&&(y=(0,d.htmlToElement)(this.tagsItemTemplate),C.append(y)),((o=w?.options)===null||o===void 0?void 0:o.icon)||this.apiIconTag){const L=(0,d.htmlToElement)(this.apiUrl&&this.apiIconTag?this.apiIconTag:(a=w?.options)===null||a===void 0?void 0:a.icon);this.apiUrl&&this.apiIconTag&&w[this.apiFieldsMap.icon]&&(L.src=w[this.apiFieldsMap.icon]||""),A=y?y.querySelector("[data-icon]"):document.createElement("span"),A.append(L),y||C.append(A)}!y||!y.querySelector("[data-icon]")||!((u=w?.options)===null||u===void 0)&&u.icon||this.apiUrl||this.apiIconTag||w[(f=this.apiFieldsMap)===null||f===void 0?void 0:f.icon]||y.querySelector("[data-icon]").classList.add("hidden"),S=y?y.querySelector("[data-title]"):document.createElement("span"),this.apiUrl&&(!((m
12=this.apiFieldsMap)===null||m===void 0)&&m.title)&&w[this.apiFieldsMap.title]?S.textContent=w[this.apiFieldsMap.title]:S.textContent=w.title||"",y||C.append(S),y?h=y.querySelector("[data-remove]"):(h=document.createElement("span"),h.textContent="X",C.append(h)),h.addEventListener("click",()=>{this.value=this.value.filter(L=>L!==i),this.selectedItems=this.selectedItems.filter(L=>L!==i),this.value.length||this.reassignTagsInputPlaceholder(this.placeholder),this.unselectMultipleItems(),this.selectMultipleItems(),C.remove(),this.triggerChangeEventForNativeSelect()}),this.wrapper.append(C)}getItemByValue(i){return this.apiUrl?this.remoteOptions.find(o=>`${o[this.apiFieldsMap.val]}`===i||o[this.apiFieldsMap.title]===i):this.selectOptions.find(o=>o.val===i)}setTagsItems(){this.value&&this.value.forEach(i=>{this.selectedItems.includes(i)||this.buildTagsItem(i),this.selectedItems=this.selectedItems.includes(i)?this.selectedItems:[...this.selectedItems,i]}),this.isOpened&&this.floatingUIInstance&&this.floatingUIInstance.update()}buildTagsInput(){this.tagsInput=document.createElement("input"),this.tagsInputId&&(this.tagsInput.id=this.tagsInputId),this.tagsInputClasses&&(0,d.classToClassList)(this.tagsInputClasses,this.tagsInput),this.onTagsInputFocusListener=()=>this.tagsInputFocus(),this.onTagsInputInputListener=()=>this.tagsInputInput(),this.onTagsInputInputSecondListener=(0,d.debounce)(i=>this.tagsInputInputSecond(i)),this.onTagsInputKeydownListener=i=>this.tagsInputKeydown(i),this.tagsInput.addEventListener("focus",this.onTagsInputFocusListener),this.tagsInput.addEventListener("input",this.onTagsInputInputListener),this.tagsInput.addEventListener("input",this.onTagsInputInputSecondListener),this.tagsInput.addEventListener("keydown",this.onTagsInputKeydownListener),this.wrapper.append(this.tagsInput),setTimeout(()=>{this.adjustInputWidth(),this.reassignTagsInputPlaceholder(this.value.length?"":this.placeholder)})}buildDropdown(){this.dropdown=(0,d.htmlToElement)(this.dropdownTag||"<div></div>"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdownScope==="parent"&&(this.dropdown.classList.add("absolute"),this.dropdownVerticalFixedPlacement||this.dropdown.classList.add("top-full")),this.dropdown.role="listbox",this.dropdown.tabIndex=-1,this.dropdown.ariaOrientation="vertical",this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,d.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((i,o)=>this.buildOption(i.title,i.val,i.disabled,i.selected,i.options,`${o}`)),this.apiUrl&&this.optionsFromRemoteData(),this.dropdownScope==="window"&&this.buildFloatingUI(),this.dropdown&&this.apiLoadMore&&this.setupInfiniteScroll()}setupInfiniteScroll(){this.dropdown.addEventListener("scroll",this.handleScroll.bind(this))}handleScroll(){return g(this,void 0,void 0,function*(){if(!this.dropdown||this.isLoading||!this.hasMore||!this.apiLoadMore)return;const{scrollTop:i,scrollHeight:o,clientHeight:a}=this.dropdown;o-i-a<(typeof this.apiLoadMore=="object"?this.apiLoadMore.scrollThreshold:100)&&(yield this.loadMore())})}loadMore(){return g(this,void 0,void 0,function*(){var i,o,a,u;if(this.apiUrl&&!this.isLoading&&this.hasMore&&this.apiLoadMore){this.isLoading=!0;try{const f=new URL(this.apiUrl),m=((i=this.apiFieldsMap)===null||i===void 0?void 0:i.page)||((o=this.apiFieldsMap)===null||o===void 0?void 0:o.offset)||"page",w=!!(!((a=this.apiFieldsMap)===null||a===void 0)&&a.offset),y=typeof this.apiLoadMore=="object"?this.apiLoadMore.perPage:10;if(w){const O=this.currentPage*y;f.searchParams.set(m,O.toString()),this.currentPage++}else this.currentPage++,f.searchParams.set(m,this.currentPage.toString());f.searchParams.set(((u=this.apiFieldsMap)===null||u===void 0?void 0:u.limit)||"limit",y.toString());const S=yield fetch(f.toString(),this.apiOptions||{}),h=yield S.json(),A=this.apiDataPart?h[this.apiDataPart]:h.results,C=h.count||0,L=this.currentPage*y;A&&A.length>0?(this.remoteOptions=[...this.remoteOptions||[],...A],this.buildOptionsFromRemoteData(A),this.hasMore=L<C):this.hasMore=!1}catch(f){this.hasMore=!1,console.error("Error loading more options:",f)}finally{this.isLoading=!1}}})}buildFloatingUI(){if(typeof FloatingUIDOM<"u"&&FloatingUIDOM.computePosition){document.body.appendChild(this.dropdown);const i=this.mode==="tags"?this.wrapper:this.toggle,o=[FloatingUIDOM.offset([0,5
12])];this.dropdownAutoPlacement&&typeof FloatingUIDOM.flip=="function"&&o.push(FloatingUIDOM.flip({fallbackPlacements:["bottom-start","bottom-end","top-start","top-end"]}));const a={placement:b.POSITIONS[this.dropdownPlacement]||"bottom",strategy:"fixed",middleware:o},u=()=>{FloatingUIDOM.computePosition(i,this.dropdown,a).then(({x:m,y:w,placement:y})=>{Object.assign(this.dropdown.style,{position:"fixed",left:`${m}px`,top:`${w}px`,["margin"+(y==="bottom"?"Top":y==="top"?"Bottom":y==="right"?"Left":"Right")]:`${this.dropdownSpace}px`}),this.dropdown.setAttribute("data-placement",y)})};u();const f=FloatingUIDOM.autoUpdate(i,this.dropdown,u);this.floatingUIInstance={update:u,destroy:f}}else console.error("FloatingUIDOM not found! Please enable it on the page.")}updateDropdownWidth(){const i=this.mode==="tags"?this.wrapper:this.toggle;this.dropdown.style.width=`${i.clientWidth}px`}buildSearch(){let i;this.searchWrapper=(0,d.htmlToElement)(this.searchWrapperTemplate||"<div></div>"),this.searchWrapperClasses&&(0,d.classToClassList)(this.searchWrapperClasses,this.searchWrapper),i=this.searchWrapper.querySelector("[data-input]");const o=(0,d.htmlToElement)(this.searchTemplate||'<input type="text">');this.search=o.tagName==="INPUT"?o:o.querySelector(":scope input"),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,d.classToClassList)(this.searchClasses,this.search),this.searchId&&(this.search.id=this.searchId),this.onSearchInputListener=(0,d.debounce)(a=>this.searchInput(a)),this.search.addEventListener("input",this.onSearchInputListener),i?i.append(o):this.searchWrapper.append(o),this.dropdown.append(this.searchWrapper)}buildOption(i,o,a=!1,u=!1,f,m="1",w){var y;let S=null,h=null,A=null,C=null;const L=(0,d.htmlToElement)(this.optionTag||"<div></div>");if(L.setAttribute("data-value",o),L.setAttribute("data-title-value",i),L.setAttribute("tabIndex",m),L.classList.add("cursor-pointer"),L.setAttribute("data-id",w||`${this.optionId}`),w||this.optionId++,a&&L.classList.add("disabled"),u&&(this.isMultiple?this.value=[...this.value,o]:this.value=o),this.optionTemplate&&(S=(0,d.htmlToElement)(this.optionTemplate),L.append(S)),S?(h=S.querySelector("[data-title]"),h.textContent=i||""):L.textContent=i||"",f){if(f.icon){const O=(0,d.htmlToElement)((y=this.apiIconTag)!==null&&y!==void 0?y:f.icon);if(O.classList.add("max-w-full"),this.apiUrl&&(O.setAttribute("alt",i),O.setAttribute("src",f.icon)),S)A=S.querySelector("[data-icon]"),A.append(O);else{const _=(0,d.htmlToElement)("<div></div>");this.iconClasses&&(0,d.classToClassList)(this.iconClasses,_),_.append(O),L.append(_)}}if(f.description)if(S)C=S.querySelector("[data-description]"),C&&C.append(f.description);else{const O=(0,d.htmlToElement)("<div></div>");O.textContent=f.description,this.descriptionClasses&&(0,d.classToClassList)(this.descriptionClasses,O),L.append(O)}}S&&S.querySelector("[data-icon]")&&!f&&!f?.icon&&S.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(o):this.value===o)&&L.classList.add("selected"),a||L.addEventListener("click",()=>this.onSelectOption(o)),this.optionClasses&&(0,d.classToClassList)(this.optionClasses,L),this.dropdown&&this.dropdown.append(L),u&&this.setNewValue()}buildOptionFromRemoteData(i,o,a=!1,u=!1,f="1",m,w){f?this.buildOption(i,o,a,u,w,f,m):alert("ID parameter is required for generating remote options! Please check your API endpoint have it.")}buildOptionsFromRemoteData(i){i.forEach((o,a)=>{let u=null,f="",m="";const w={id:"",val:"",title:"",icon:null,description:null,rest:{}};if(Object.keys(o).forEach(y=>{var S;o[this.apiFieldsMap.id]&&(u=o[this.apiFieldsMap.id]),o[this.apiFieldsMap.val]&&(m=`${o[this.apiFieldsMap.val]}`),o[this.apiFieldsMap.title]&&(f=o[this.apiFieldsMap.title],o[this.apiFieldsMap.val]||(m=f)),o[this.apiFieldsMap.icon]&&(w.icon=o[this.apiFieldsMap.icon]),o[(S=this.apiFieldsMap)===null||S===void 0?void 0:S.description]&&(w.description=o[this.apiFieldsMap.description]),w.rest[y]=o[y]}),!this.dropdown.querySelector(`[data-value="${m}"]`)){const y=!!this.apiSelectedValues&&(Array.isArray(this.apiSelectedValues)?this.apiSelectedValues.includes(m):this.apiSelectedValues===m);this.buildOriginalOption(f,m,u,!1,y,w),this.buildOptionFromRemoteData(f,m,!1,y,`${a}`,u,w),y&&(this.isMultiple?(this.value||(this.value=[]),Array.isArray(this.value)&&(this.value=[...this.value,m])):this.value=m)}}),this.sortElements(this.el,"option"),this.sortElements(this.dropdown,"[data-value]")}optionsFromRemoteData(){return g(this,arguments,void 0,function*(i=""){const o=yield this.apiRequest(i);this.remoteOptions=o,o.length?this.buildOptionsFromRemoteData(this.remoteOptions):console.log("There is no data were responded!")})}apiRequest(){return g(this,arguments,void 0,function*(i=""){var o,a,u,f;try{let m=this.apiUrl;const w=this.apiSearchQueryKey?`${this.apiSearchQueryKey}=${i.toLowerCase()}`:null,y=this.apiQuery||"",S=this.apiOptions||{},h=new URLSearchParams(y),A=h.toString();if(this.apiLoadMore){const O=((o=this.apiFieldsMap)===null||o===void 0?void 0:o.page)||((a=this.apiFieldsMap)===null||a===void 0?void 0:a.offset)||"page",_=!!(!((u=this.apiFieldsMap)===null||u===void 0)&&u.offset),pe=((f=this.apiFieldsMap)===null||f===void 0?void 0:f.limit)||"limit",Me=typeof this.apiLoadMore=="object"?this.apiLoadMore.perPage:10;h.delete(O),h.delete(pe),m+=_?`?${O}=0`:`?${O}=1`,m+=`&${pe}=${Me}`}else(w||A)&&(m+=`?${w||A}`);w&&A?m+=`&${A}`:!w||A||this.apiLoadMore||(m+=`?${w}`);const C=yield fetch(m,S),L=yield C.json();return this.apiDataPart?L[this.apiDataPart]:L}catch(m){console.error(m)}})}
12sortElements(i,o){const a=Array.from(i.querySelectorAll(o));this.isSelectedOptionOnTop&&a.sort((u,f)=>{const m=u.classList.contains("selected")||u.hasAttribute("selected"),w=f.classList.contains("selected")||f.hasAttribute("selected");return m&&!w?-1:!m&&w?1:0}),a.forEach(u=>i.appendChild(u))}remoteSearch(i){return g(this,void 0,void 0,function*(){if(i.length<=this.minSearchLength){const m=yield this.apiRequest("");return this.remoteOptions=m,Array.from(this.dropdown.querySelectorAll("[data-value]")).forEach(w=>w.remove()),Array.from(this.el.querySelectorAll("option[value]")).forEach(w=>{w.remove()}),m.length?this.buildOptionsFromRemoteData(m):console.log("No data responded!"),!1}const o=yield this.apiRequest(i);this.remoteOptions=o;let a=o.map(m=>`${m.id}`),u=null;const f=this.dropdown.querySelectorAll("[data-value]");this.el.querySelectorAll("[data-hs-select-option]").forEach(m=>{var w;const y=m.getAttribute("data-id");a.includes(y)||!((w=this.value)===null||w===void 0)&&w.includes(m.value)||this.destroyOriginalOption(m.value)}),f.forEach(m=>{var w;const y=m.getAttribute("data-id");a.includes(y)||!((w=this.value)===null||w===void 0)&&w.includes(m.getAttribute("data-value"))?a=a.filter(S=>S!==y):this.destroyOption(m.getAttribute("data-value"))}),u=o.filter(m=>a.includes(`${m.id}`)),u.length?this.buildOptionsFromRemoteData(u):console.log("No data responded!")})}destroyOption(i){const o=this.dropdown.querySelector(`[data-value="${i}"]`);if(!o)return!1;o.remove()}buildOriginalOption(i,o,a,u,f,m){const w=(0,d.htmlToElement)("<option></option>");w.setAttribute("value",o),u&&w.setAttribute("disabled","disabled"),f&&w.setAttribute("selected","selected"),a&&w.setAttribute("data-id",a),w.setAttribute("data-hs-select-option",JSON.stringify(m)),w.innerText=i,this.el.append(w)}destroyOriginalOption(i){const o=this.el.querySelector(`[value="${i}"]`);if(!o)return!1;o.remove()}buildTagsInputHelper(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)}calculateInputWidth(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;const i=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),o=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),a=this.tagsInputHelper.offsetWidth+i+o,u=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width=`${Math.min(a,u)+2}px`}adjustInputWidth(){this.buildTagsInputHelper(),this.calculateInputWidth()}onSelectOption(i){if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(i)?Array.from(this.value).filter(o=>o!==i):[...Array.from(this.value),i],this.selectMultipleItems(),this.setNewValue()):(this.value=i,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),this.mode==="tags"){const o=this.selectedItems.filter(a=>!this.value.includes(a));o.length&&o.forEach(a=>{this.selectedItems=this.selectedItems.filter(u=>u!==a),this.wrapper.querySelector(`[data-tag-value="${a}"]`).remove()}),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close(!0)),this.value.length||this.mode!=="tags"||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&this.mode==="tags"&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()}triggerChangeEventForNativeSelect(){const i=new Event("change",{bubbles:!0});this.el.dispatchEvent(i),(0,d.dispatch)("change.hs.select",this.el,this.value)}addSelectOption(i,o,a,u,f){this.selectOptions=[...this.selectOptions,{title:i,val:o,disabled:a,selected:u,options:f}
12]}removeSelectOption(i,o=!1){if(!this.selectOptions.some(a=>a.val===i))return!1;this.selectOptions=this.selectOptions.filter(a=>a.val!==i),this.value=o?this.value.filter(a=>a!==i):i}resetTagsInputField(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")}clearSelections(){Array.from(this.dropdown.children).forEach(i=>{i.classList.contains("selected")&&i.classList.remove("selected")}),Array.from(this.el.children).forEach(i=>{i.selected&&(i.selected=!1)})}setNewValue(){if(this.mode==="tags")this.setTagsItems();else if(this.optionAllowEmptyOption&&this.value===""){const i=this.selectOptions.find(o=>o.val==="");this.toggleTextWrapper.innerHTML=i?.title||this.placeholder}else if(this.value)if(this.apiUrl){const i=this.dropdown.querySelector(`[data-value="${this.value}"]`);if(i)this.toggleTextWrapper.innerHTML=i.getAttribute("data-title-value")||this.placeholder;else{const o=this.remoteOptions.find(a=>(a[this.apiFieldsMap.val]?`${a[this.apiFieldsMap.val]}`:a[this.apiFieldsMap.title])===this.value);this.toggleTextWrapper.innerHTML=o?`${o[this.apiFieldsMap.title]}`:this.stringFromValue()}}else this.toggleTextWrapper.innerHTML=this.stringFromValue();else this.toggleTextWrapper.innerHTML=this.placeholder}stringFromValueBasic(i){var o;const a=[];let u="";if(i.forEach(f=>{this.isMultiple?this.value.includes(f.val)&&a.push(f.title):this.value===f.val&&a.push(f.title)}),this.toggleCountText!==void 0&&this.toggleCountText!==null&&a.length>=this.toggleCountTextMinItems)if(this.toggleCountTextMode==="nItemsAndCount"){const f=a.slice(0,this.toggleCountTextMinItems-1),m=[f.join(this.toggleSeparators.items)],w=""+(a.length-f.length);if(!((o=this==null?void 0:this.toggleSeparators)===null||o===void 0)&&o.betweenItemsAndCounter&&m.push(this.toggleSeparators.betweenItemsAndCounter),this.toggleCountText)switch(this.toggleCountTextPlacement){case"postfix-no-space":m.push(`${w}${this.toggleCountText}`);break;case"prefix-no-space":m.push(`${this.toggleCountText}${w}`);break;case"prefix":m.push(`${this.toggleCountText} ${w}`);break;default:m.push(`${w} ${this.toggleCountText}`)}u=m.join(" ")}else u=`${a.length} ${this.toggleCountText}`;else u=a.join(this.toggleSeparators.items);return u}stringFromValueRemoteData(){const i=this.dropdown.querySelectorAll("[data-title-value]"),o=[];let a="";if(i.forEach(u=>{const f=u.getAttribute("data-value"),m=u.getAttribute("data-title-value");this.isMultiple?this.value.includes(f)&&o.push(m):this.value===f&&o.push(m)}),this.toggleCountText&&this.toggleCountText!==""&&o.length>=this.toggleCountTextMinItems)if(this.toggleCountTextMode==="nItemsAndCount"){const u=o.slice(0,this.toggleCountTextMinItems-1);a=`${u.join(this.toggleSeparators.items)} ${this.toggleSeparators.betweenItemsAndCounter} ${o.length-u.length} ${this.toggleCountText}`}else a=`${o.length} ${this.toggleCountText}`;else a=o.join(this.toggleSeparators.items);return a}stringFromValue(){return this.apiUrl?this.stringFromValueRemoteData():this.stringFromValueBasic(this.selectOptions)}selectSingleItem(){Array.from(this.el.children).find(o=>this.value===o.value).selected=!0;const i=Array.from(this.dropdown.children).find(o=>this.value===o.getAttribute("data-value"));i&&i.classList.add("selected")}selectMultipleItems(){Array.from(this.dropdown.children).filter(i=>this.value.includes(i.getAttribute("data-value"))).forEach(i=>i.classList.add("selected")),Array.from(this.el.children).filter(i=>this.value.includes(i.value)).forEach(i=>i.selected=!0)}unselectMultipleItems(){Array.from(this.dropdown.children).forEach(i=>i.classList.remove("selected")),Array.from(this.el.children).forEach(i=>i.selected=!1)}searchOptions(i){if(i.length<=this.minSearchLength)return this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.dropdown.querySelectorAll("[data-value]").forEach(f=>{f.classList.remove("hidden")}),!1;this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,d.htmlToElement)(this.searchNoResultTemplate),this.searchNoResult.innerText=this.searchNoResultText,(0,d.classToClassList)(this.searchNoResultClasses,this.searchNoResult);const o=this.dropdown.querySelectorAll("[data-value]");let a,u=!1;this.searchLimit&&(a=0),o.forEach(f=>{const m=f.getAttribute("data-title-value").toLocaleLowerCase();let w;if(this.isSearchDirectMatch)w=!m.includes(i.toLowerCase())||this.searchLimit&&a>=this.searchLimit;else{const y=i?i.split("").map(S=>/\w/.test(S)?`${S}[\\W_]*`:"\\W*").join(""):"";w=!new RegExp(y,"i").test(m.trim())||this.searchLimit&&a>=this.searchLimit}w?f.classList.add("hidden"):(f.classList.remove("hidden"),u=!0,this.searchLimit&&a++)}),u||this.dropdown.append(this.searchNoResult)}eraseToggleIcon(){const i=this.toggle.querySelector("[data-icon]");i&&(i.innerHTML=null,i.classList.add("hidden"))}eraseToggleTitle(){const i=this.toggle.querySelector("[data-title]");i?i.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder}toggleFn(){this.isOpened?this.close():this.open()}destroy(){this.wrapper&&this.wrapper.removeEventListener("click",this.onWrapperClickListener),this.toggle&&this.toggle.removeEventListener("click",this.onToggleClickListener),this.tagsInput&&(this.tagsInput.removeEventListener("focus",this.onTagsInputFocusListener),this.tagsInput.removeEventListener("input",this.onTagsInputInputListener),this.tagsInput.removeEventListener("input",this.onTagsInputInputSecondListener),this.tagsInput.removeEventListener("keydown",this.onTagsInputKeydownListener)),this.search&&this.search.removeEventListener("input",this.onSearchInputListener);const i=this.el.parentElement.parentElement;this.el.classList.add("hidden"),this.el.style.display="",i.prepend(this.el),i.querySelector(".hs-select").remove(),this.wrapper=null,window.$hsSelectCollection=window.$hsSelectCollection.filter(({element:o})=>o.el!==this.el)}open(){var i;const o=((i=window?.$hsSelectCollection)===null||i===void 0?void 0:i.find(a=>a.element.isOpened))||null;if(o&&o.element.close(),this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdownScope==="window"&&this.dropdown.classList.add("invisible"),this.dropdown.classList.remove("hidden"),this.dropdownScope!=="window"&&this.recalculateDirection(),setTimeout(()=>{var a;!((a=this==null?void 0:this.toggle)===null||a===void 0)&&a.ariaExpanded&&(this.toggle.ariaExpanded="true"),this.wrapper.classList.add("active"),this.dropdown.classList.add("opened"),this.dropdown.classList.contains("w-full")&&this.dropdownScope==="window"&&this.updateDropdownWidth(),this.floatingUIInstance&&this.dropdownScope==="window"&&(this.floatingUIInstance.update(
12),this.dropdown.classList.remove("invisible")),this.hasSearch&&!this.preventSearchFocus&&this.search.focus(),this.animationInProcess=!1}),this.isOpened=!0}close(i=!1){var o,a,u,f;if(this.animationInProcess)return!1;this.animationInProcess=!0,!((o=this==null?void 0:this.toggle)===null||o===void 0)&&o.ariaExpanded&&(this.toggle.ariaExpanded="false"),this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),!((a=this.dropdownDirectionClasses)===null||a===void 0)&&a.bottom&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),!((u=this.dropdownDirectionClasses)===null||u===void 0)&&u.top&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,d.afterTransition)(this.dropdown,()=>{this.dropdown.classList.add("hidden"),this.hasSearch&&(this.search.value="",this.search.dispatchEvent(new Event("input",{bubbles:!0})),this.search.blur()),i&&this.toggle.focus(),this.animationInProcess=!1}),(f=this.dropdown.querySelector(".hs-select-option-highlighted"))===null||f===void 0||f.classList.remove("hs-select-option-highlighted"),this.isOpened=!1}addOption(i){let o=`${this.selectOptions.length}`;const a=u=>{const{title:f,val:m,disabled:w,selected:y,options:S}=u;this.selectOptions.some(h=>h.val===m)||(this.addSelectOption(f,m,w,y,S),this.buildOption(f,m,w,y,S,o),this.buildOriginalOption(f,m,null,w,y,S),y&&!this.isMultiple&&this.onSelectOption(m))};Array.isArray(i)?i.forEach(u=>{a(u)}):a(i)}removeOption(i){const o=(a,u=!1)=>{this.selectOptions.some(f=>f.val===a)&&(this.removeSelectOption(a,u),this.destroyOption(a),this.destroyOriginalOption(a),this.value===a&&(this.value=null,this.eraseToggleTitle(),this.eraseToggleIcon()))};Array.isArray(i)?i.forEach(a=>{o(a,this.isMultiple)}):o(i,this.isMultiple),this.setNewValue()}recalculateDirection(){var i,o,a,u;if(this!=null&&this.dropdownVerticalFixedPlacement&&(this.dropdown.classList.contains("bottom-full")||this.dropdown.classList.contains("top-full")))return!1;(this==null?void 0:this.dropdownVerticalFixedPlacement)==="top"?(this.dropdown.classList.add("bottom-full"),this.dropdown.style.marginBottom=`${this.dropdownSpace}px`):(this==null?void 0:this.dropdownVerticalFixedPlacement)==="bottom"?(this.dropdown.classList.add("top-full"),this.dropdown.style.marginTop=`${this.dropdownSpace}px`):(0,d.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),!((i=this.dropdownDirectionClasses)===null||i===void 0)&&i.bottom&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),!((o=this.dropdownDirectionClasses)===null||o===void 0)&&o.top&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop=`${this.dropdownSpace}px`):(this.dropdown.classList.remove("top-full"),!((a=this.dropdownDirectionClasses)===null||a===void 0)&&a.top&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),!((u=this.dropdownDirectionClasses)===null||u===void 0)&&u.bottom&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom=`${this.dropdownSpace}px`)}static findInCollection(i){return window.$hsSelectCollection.find(o=>i instanceof k?o.element.el===i.el:typeof i=="string"?o.element.el===document.querySelector(i):o.element.el===i)||null}static getInstance(i,o){const a=window.$hsSelectCollection.find(u=>u.element.el===(typeof i=="string"?document.querySelector(i):i));return a?o?a:a.element:null}static autoInit(){window.$hsSelectCollection||(window.$hsSelectCollection=[],window.addEventListener("click",i=>{const o=i.target;k.closeCurrentlyOpened(o)}),document.addEventListener("keydown",i=>k.accessibility(i))),window.$hsSelectCollection&&(window.$hsSelectCollection=window.$hsSelectCollection.filter(({element:i})=>document.contains(i.el))),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach(i=>
12{if(!window.$hsSelectCollection.find(o=>{var a;return((a=o?.element)===null||a===void 0?void 0:a.el)===i})){const o=i.getAttribute("data-hs-select"),a=o?JSON.parse(o):{};new k(i,a)}})}static open(i){const o=k.findInCollection(i);o&&!o.element.isOpened&&o.element.open()}static close(i){const o=k.findInCollection(i);o&&o.element.isOpened&&o.element.close()}static closeCurrentlyOpened(i=null){if(!i.closest(".hs-select.active")&&!i.closest("[data-hs-select-dropdown].opened")){const o=window.$hsSelectCollection.filter(a=>a.element.isOpened)||null;o&&o.forEach(a=>{a.element.close()})}}static accessibility(i){const o=window.$hsSelectCollection.find(a=>a.element.isOpened);if(o&&b.SELECT_ACCESSIBILITY_KEY_SET.includes(i.code)&&!i.metaKey)switch(i.code){case"Escape":i.preventDefault(),this.onEscape();break;case"ArrowUp":i.preventDefault(),i.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":i.preventDefault(),i.stopImmediatePropagation(),this.onArrow(!1);break;case"Tab":i.preventDefault(),i.stopImmediatePropagation(),this.onTab(i.shiftKey);break;case"Home":i.preventDefault(),i.stopImmediatePropagation(),this.onStartEnd();break;case"End":i.preventDefault(),i.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":i.preventDefault(),this.onEnter(i);break;case"Space":if((0,d.isFocused)(o.element.search))break;i.preventDefault(),this.onEnter(i)}}static onEscape(){const i=window.$hsSelectCollection.find(o=>o.element.isOpened);i&&i.element.close()}static onArrow(i=!0){const o=window.$hsSelectCollection.find(a=>a.element.isOpened);if(o){const a=o.element.dropdown;if(!a)return!1;const u=(i?Array.from(a.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(a.querySelectorAll(":scope > *:not(.hidden)"))).filter(w=>!w.classList.contains("disabled")),f=a.querySelector(".hs-select-option-highlighted")||a.querySelector(".selected");f||u[0].classList.add("hs-select-option-highlighted");let m=u.findIndex(w=>w===f);m+1<u.length&&m++,u[m].focus(),f&&f.classList.remove("hs-select-option-highlighted"),u[m].classList.add("hs-select-option-highlighted")}}static onTab(i=!0){const o=window.$hsSelectCollection.find(a=>a.element.isOpened);if(o){const a=o.element.dropdown;if(!a)return!1;const u=(i?Array.from(a.querySelectorAll(":scope >  *:not(.hidden)")).reverse():Array.from(a.querySelectorAll(":scope >  *:not(.hidden)"))).filter(w=>!w.classList.contains("disabled")),f=a.querySelector(".hs-select-option-highlighted")||a.querySelector(".selected");f||u[0].classList.add("hs-select-option-highlighted");let m=u.findIndex(w=>w===f);if(!(m+1<u.length))return f&&f.classList.remove("hs-select-option-highlighted"),o.element.close(),o.element.toggle.focus(),!1;m++,u[m].focus(),f&&f.classList.remove("hs-select-option-highlighted"),u[m].classList.add("hs-select-option-highlighted")}}static onStartEnd(i=!0){const o=window.$hsSelectCollection.find(a=>a.element.isOpened);if(o){const a=o.element.dropdown;if(!a)return!1;const u=(i?Array.from(a.querySelectorAll(":scope >  *:not(.hidden)")):Array.from(a.querySelectorAll(":scope >  *:not(.hidden)")).reverse()).filter(m=>!m.classList.contains("disabled")),f=a.querySelector(".hs-select-option-highlighted");u.length&&(u[0].focus(),f&&f.classList.remove("hs-select-option-highlighted"),u[0].classList.add("hs-select-option-highlighted"))}}static onEnter(i){const o=i.target.previousSibling;if(window.$hsSelectCollection.find(a=>a.element.el===o)){const a=window.$hsSelectCollection.find(f=>f.element.isOpened),u=window.$hsSelectCollection.find(f=>f.element.el===o);a.element.close(),a!==u&&u.element.open()}else{const a=window.$hsSelectCollection.find(u=>u.element.isOpened);a&&a.element.onSelectOption(i.target.dataset.value||"")}}}window.addEventListener("load",()=>{k.autoInit()}),document.addEventListener("scroll",()=>{if(!window.$hsSelectCollection)return!1;const T=window.$hsSelectCollection.find(i=>i.element.isOpened);T&&T.element.recalculateDirection()}),typeof window<"u"&&(window.HSSelect=k),r.default=k},961:(p,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.default=class{constructor(c,g,v){this.el=c,this.options=g,this.events=v,this.el=c,this.options=g,this.events={}}createCollection(c,g){var v;c.push({id:((v=g?.el)===null||v===void 0?void 0:v.id)||c.length+1,element:g})}fireEvent(c,g=null){if(this.events.hasOwnProperty(c))return this.events[c](g)}on(c,g){this.events[c]=g}}}},l={},t=function p(r){var c=l[r];if(c!==void 0)return c.exports;var g=l[r]={exports:{}};
12return n[r].call(g.exports,g,g.exports,p),g.exports}(442);return t})())}(Q)),Q.exports}Re();var W={exports:{}},Pe=W.exports,ue;function qe(){return ue||(ue=1,function(s,e){(function(n,l,t){s.exports=t(),s.exports.default=t()})("slugify",Pe,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","Â¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ä¢":"G","Ä£":"g","Ĩ":"I","Ä©":"i","Ī":"i","Ä«":"i","Ä®":"I","į":"i","İ":"I","ı":"i","Ķ":"k","Ä·":"k","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Å ":"S","Å¡":"s","Å¢":"T","Å£":"t","Ť":"T","Å¥":"t","Ũ":"U","Å©":"u","Ū":"u","Å«":"u","Å®":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Æ ":"O","Æ¡":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Î¥":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Ð¥":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ò¢":"NG","Ò£":"ng","Ò®":"UE","Ò¯":"ue","Ò°":"U","Ò±":"u","Òº":"H","Ò»":"h","Ә":"AE","ә":"ae","Ó¨":"OE","Ó©":"oe","Ô±":"A","Ô²":"B","Ô³":"G","Ô´":"D","Ôµ":"E","Ô¶":"Z","Ô·":"E'","Ô¸":"Y'","Ô¹":"T'","Ôº":"JH","Ô»":"I","Ô¼":"L","Ô½":"X","Ô¾":"C'","Ô¿":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","Ø¡":"a","Ø¢":"aa","Ø£":"a","ؤ":"u","Ø¥":"i","ئ":"e","ا":"a","ب":"b","Ø©":"h","ت":"t","Ø«":"th","ج":"j","Ø­":"h","Ø®":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","Ø´":"sh","ص":"s","ض":"dh","Ø·":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","Ù ":"0","Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù¾":"p","چ":"ch","ژ":"zh","Ú©":"k","Ú¯":"g","ی":"y","Û°":"0","Û±":"1","Û²":"2","Û³":"3","Û´":"4","Ûµ":"5","Û¶":"6","Û·":"7","Û¸":"8","Û¹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","á¹¢":"S","á¹£":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","á» ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","á»§":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","á»­":"u","á»®":"U","ữ":"u","á»°":"U","á»±":"u","Ỳ":"Y","ỳ":"y","á»´":"Y","ỵ":"y","á»¶":"Y","á»·":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","â
12‚§":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","ï·¼":"rial","ﻵ":"laa","ï»·":"laa","ﻹ":"lai","ï»»":"la"}`),l=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Ð¥":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","Ã¥":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","Ã¥":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","Ã¥":"aa","ä":"ae","ö":"oe"}}');function t(p,r){if(typeof p!="string")throw new Error("slugify: string argument expected");r=typeof r=="string"?{replacement:r}:r||{};var c=l[r.locale]||{},g=r.replacement===void 0?"-":r.replacement,v=r.trim===void 0?!0:r.trim,d=p.normalize().split("").reduce(function(x,b){var k=c[b];return k===void 0&&(k=n[b]),k===void 0&&(k=b),k===g&&(k=" "),x+k.replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return r.strict&&(d=d.replace(/[^A-Za-z0-9\s]/g,"")),v&&(d=d.trim()),d=d.replace(/\s+/g,g),r.lower&&(d=d.toLowerCase()),d}return t.extend=function(p){Object.assign(n,p)},t})}(W)),W.exports}qe();function te(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var D=te();function xe(s){D=s}var N={exec:()=>null};function E(s,e=""){let n=typeof s=="string"?s:s.source,l={replace:(t,p)=>{let r=typeof p=="string"?p:p.source;return r=r.replace($.caret,"$1"),n=n.replace(t,r),l},getRegex:()=>new RegExp(n,e)};return l}var $={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Fe=/^(?:[ \t]*(?:\n|$))+/,De=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_e=/^ {0,3}(`{3,}
vendor: 7,479 bytes, lines 12-13
12(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,B=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ze=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,se=/(?:[*+-]|\d{1,9}[.)])/,ye=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Se=E(ye).replace(/bull/g,se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),He=E(ye).replace(/bull/g,se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ie=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ne=/^[^\n]+/,ne=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Be=E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ne).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ue=E(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,se).getRegex(),K="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",le=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,We=E("^ {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|/?>)[\\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|$))","i").replace("comment",le).replace("tag",K).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Te=E(ie).replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",K).getRegex(),je=E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Te).getRegex(),re={blockquote:je,code:De,def:Be,fences:_e,heading:ze,hr:B,html:We,lheading:Se,list:Ue,newline:Fe,paragraph:Te,table:N,text:Ne},ge=E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\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",K).getRegex(),Ye={...re,lheading:He,table:ge,paragraph:E(ie).replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ge).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",K).getRegex()},Ve={...re,html:E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",le).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:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:E(ie).replace("hr",B).replace("heading",` *#{1,6} *[^
13]`).replace("lheading",Se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ze=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ke=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ie=/^( {2,}|\\)\n(?!\s*$)/,Je=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,J=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Ee=/[^\s\p{P}\p{S}]/u,Qe=E(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),Le=/(?!~)[\p{P}\p{S}]/u,Ge=/(?!~)[\s\p{P}\p{S}]/u,Xe=/(?:[^\s\p{P}\p{S}]|~)/u,et=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ae=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,tt=E(Ae,"u").replace(/punct/g,J).getRegex(),st=E(Ae,"u").replace(/punct/g,Le).getRegex(),Ce="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",it=E(Ce,"gu").replace(/notPunctSpace/g,Ee).replace(/punctSpace/g,oe).replace(/punct/g,J).getRegex(),nt=E(Ce,"gu").replace(/notPunctSpace/g,Xe).replace(/punctSpace/g,Ge).replace(/punct/g,Le).getRegex(),lt=E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ee).replace(/punctSpace/g,oe).replace(/punct/g,J).getRegex(),rt=E(/\\(punct)/,"gu").replace(/punct/g,J).getRegex(),ot=E(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),at=E(le).replace("(?:-->|$)","-->").getRegex(),ht=E("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",at).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ct=E(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oe=E(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",ne).getRegex(),$e=E(/^!?\[(ref)\](?:\[\])?/).replace("ref",ne).getRegex(),pt=E("reflink|nolink(?!\\()","g").replace("reflink",Oe).replace("nolink",$e).getRegex(),ae={_backpedal:N,anyPunctuation:rt,autolink:ot,blockSkip:et,br:Ie,code:Ke,del:N,emStrongLDelim:tt,emStrongRDelimAst:it,emStrongRDelimUnd:lt,escape:Ze,link:ct,nolink:$e,punctuation:Qe,reflink:Oe,reflinkSearch:pt,tag:ht,text:Je,url:N}
vendor: 1,375 bytes, line 13
13,dt={...ae,link:E(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()},G={...ae,emStrongRDelimAst:nt,emStrongLDelim:st,url:E(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ut={...G,br:E(Ie).replace("{2,}","*").getRegex(),text:E(G.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},U={normal:re,gfm:Ye,pedantic:Ve},z={normal:ae,gfm:G,breaks:ut,pedantic:dt},gt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fe=s=>gt[s];function M(s,e){if(e){if($.escapeTest.test(s))return s.replace($.escapeReplace,fe)}else if($.escapeTestNoEncode.test(s))return s.replace($.escapeReplaceNoEncode,fe);return s}function me(s){try{s=encodeURI(s).replace($.percentDecode,"%")}catch{return null}return s}function we(s,e){let n=s.replace($.findPipe,(p,r,c)=>{let g=!1,v=r;
vendor: 11,475 bytes, lines 13-37
13for(;--v>=0&&c[v]==="\\";)g=!g;return g?"|":" |"}),l=n.split($.splitPipe),t=0;if(l[0].trim()||l.shift(),l.length>0&&!l.at(-1)?.trim()&&l.pop(),e)if(l.length>e)l.splice(e);else for(;l.length<e;)l.push("");for(;t<l.length;t++)l[t]=l[t].trim().replace($.slashPipe,"|");return l}function H(s,e,n){let l=s.length;if(l===0)return"";let t=0;for(;t<l&&s.charAt(l-t-1)===e;)t++;return s.slice(0,l-t)}function ft(s,e){if(s.indexOf(e[1])===-1)return-1;let n=0;for(let l=0;l<s.length;l++)if(s[l]==="\\")l++;else if(s[l]===e[0])n++;else if(s[l]===e[1]&&(n--,n<0))return l;return n>0?-2:-1}function ve(s,e,n,l,t){let p=e.href,r=e.title||null,c=s[1].replace(t.other.outputLinkReplace,"$1");l.state.inLink=!0;let g={type:s[0].charAt(0)==="!"?"image":"link",raw:n,href:p,title:r,text:c,tokens:l.inlineTokens(c)};return l.state.inLink=!1,g}function mt(s,e,n){let l=s.match(n.other.indentCodeCompensation);if(l===null)return e;let t=l[1];return e.split(`
14`).map(p=>{let r=p.match(n.other.beginningSpace);if(r===null)return p;let[c]=r;return c.length>=t.length?p.slice(t.length):p}).join(`
15`)}var V=class{options;rules;lexer;constructor(s){this.options=s||D}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:H(n,`
16`)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let n=e[0],l=mt(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:l}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let l=H(n,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(n=l.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:H(e[0],`
17`)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let n=H(e[0],`
18`).split(`
19`),l="",t="",p=[];for(;n.length>0;){let r=!1,c=[],g;for(g=0;g<n.length;g++)if(this.rules.other.blockquoteStart.test(n[g]))c.push(n[g]),r=!0;else if(!r)c.push(n[g]);else break;n=n.slice(g);let v=c.join(`
20`),d=v.replace(this.rules.other.blockquoteSetextReplace,`
21    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");l=l?`${l}
22${v}`:v,t=t?`${t}
23${d}`:d;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,p,!0),this.lexer.state.top=x,n.length===0)break;let b=p.at(-1);if(b?.type==="code")break;if(b?.type==="blockquote"){let k=b,T=k.raw+`
24`+n.join(`
25`),i=this.blockquote(T);p[p.length-1]=i,l=l.substring(0,l.length-k.raw.length)+i.raw,t=t.substring(0,t.length-k.text.length)+i.text;break}else if(b?.type==="list"){let k=b,T=k.raw+`
26`+n.join(`
27`),i=this.list(T);p[p.length-1]=i,l=l.substring(0,l.length-b.raw.length)+i.raw,t=t.substring(0,t.length-k.raw.length)+i.raw,n=T.substring(p.at(-1).raw.length).split(`
28`);continue}}return{type:"blockquote",raw:l,tokens:p,text:t}}}list(s){let e=this.rules.block.list.exec(s);if(e){let n=e[1].trim(),l=n.length>1,t={type:"list",raw:"",ordered:l,start:l?+n.slice(0,-1):"",loose:!1,items:[]};n=l?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=l?n:"[*+-]");let p=this.rules.other.listItemRegex(n),r=!1;for(;s;){let g=!1,v="",d="";if(!(e=p.exec(s))||this.rules.block.hr.test(s))break;v=e[0],s=s.substring(v.length);let x=e[2].split(`
29`,1)[0].replace(this.rules.other.listReplaceTabs,a=>" ".repeat(3*a.length)),b=s.split(`
30`,1)[0],k=!x.trim(),T=0;if(this.options.pedantic?(T=2,d=x.trimStart()):k?T=e[1].length+1:(T=e[2].search(this.rules.other.nonSpaceChar),T=T>4?1:T,d=x.slice(T),T+=e[1].length),k&&this.rules.other.blankLine.test(b)&&(v+=b+`
31`,s=s.substring(b.length+1),g=!0),!g){let a=this.rules.other.nextBulletRegex(T),u=this.rules.other.hrRegex(T),f=this.rules.other.fencesBeginRegex(T),m=this.rules.other.headingBeginRegex(T),w=this.rules.other.htmlBeginRegex(T);for(;s;){let y=s.split(`
32`,1)[0],S;if(b=y,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting,"  "),S=b):S=b.replace(this.rules.other.tabCharGlobal,"    "),f.test(b)||m.test(b)||w.test(b)||a.test(b)||u.test(b))break;if(S.search(this.rules.other.nonSpaceChar)>=T||!b.trim())d+=`
33`+S.slice(T);else{if(k||x.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||f.test(x)||m.test(x)||u.test(x))break;d+=`
34`+b}!k&&!b.trim()&&(k=!0),v+=y+`
35`,s=s.substring(y.length+1),x=S.slice(T)}}t.loose||(r?t.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(r=!0));let i=null,o;this.options.gfm&&(i=this.rules.other.listIsTask.exec(d),i&&(o=i[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:v,task:!!i,checked:o,loose:!1,text:d,tokens:[]}),t.raw+=v}let c=t.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let g=0;g<t.items.length;g++)if(this.lexer.state.top=!1,t.items[g].tokens=this.lexer.blockTokens(t.items[g].text,[]),!t.loose){let v=t.items[g].tokens.filter(x=>x.type==="space"),d=v.length>0&&v.some(x=>this.rules.other.anyLine.test(x.raw));t.loose=d}if(t.loose)for(let g=0;g<t.items.length;g++)t.items[g].loose=!0;return t}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),l=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:l,title:t}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=we(e[1]),l=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
36`):[],p={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===l.length){for(let r of l)this.rules.other.tableAlignRight.test(r)?p.align.push("right"):this.rules.other.tableAlignCenter.test(r)?p.align.push("center"):this.rules.other.tableAlignLeft.test(r)?p.align.push("left"):p.align.push(null);for(let r=0;r<n.length;r++)p.header.push({text:n[r],tokens:this.lexer.inline(n[r]),header:!0,align:p.align[r]});for(let r of t)p.rows.push(we(r,p.header.length).map((c,g)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:p.align[g]})));return p}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let n=e[1].charAt(e[1].length-1)===`
37`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let p=H(n.slice(0,-1),"\\");if((n.length-p.length)%2===0)return}else{let p=ft(e[2],"()");if(p===-2)return;if(p>-1){let r=(e[0].indexOf("!")===0?5:4)+e[1].length+p;e[2]=e[2].substring(0,p),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let l=e[2],t="";if(this.options.pedantic){let p=this.rules.other.pedanticHrefTitle.exec(l);p&&(l=p[1],t=p[3])}else t=e[3]?e[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?l=l.slice(1):l=l.slice(1,-1)),ve(e,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let n;if((n=this.rules.inline.reflink.exec(s))||(n=this.rules.inline.nolink.exec(s))){let l=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=e[l.toLowerCase()];if(!t){let p=n[0].charAt(0);return{type:"text",raw:p,text:p}}return ve(n,t,n[0],this.lexer,this.rules)}}emStrong(s,e,n=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(l[1]||l[2])||!n||this.rules.inline.punctuation.exec(n))){let t=[...l[0]].length-1,p,r,c=t,g=0,v=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*s.length+t);(l=v.exec(e))!=null;){if(p=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!p)continue;if(r=[...p].length,l[3]||l[4]){c+=r;continue}else if((l[5]||l[6])&&t%3&&!((t+r)%3)){g+=r;continue}if(c-=r,c>0)continue;r=Math.min(r,r+c+g);let d=[...l[0]][0].length,x=s.slice(0,t+l.index+d+r);if(Math.min(t,r)%2){let k=x.slice(1,-1);return{type:"em",raw:x,text:k,tokens:this.lexer.inlineTokens(k)}}let b=x.slice(2,-2);return{type:"strong",raw:x,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),l=this.rules.other.nonSpaceChar.test(n),t=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return l&&t&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s){let e=this.rules.inline.del.exec(s);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let n,l;return e[2]==="@"?(n=e[1],l="mailto:"+n):(n=e[1],l=n),{type:"link",raw:e[0],text:n,href:l,tokens:[{type:"text",raw:n,text:n}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let n,l;if(e[2]==="@")n=e[0],l="mailto:"+n;else{let t;do t=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(t!==e[0]);n=e[0],e[1]==="www."?l="http://"+e[0]:l=e[0]}return{type:"link",raw:e[0],text:n,href:l,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},P=class X{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||D,this.options.tokenizer=this.options.tokenizer||new V,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:$,block:U.normal,inline:z.normal};this.options.pedantic?(n.block=U.pedantic,n.inline=z.pedantic):this.options.gfm&&(n.block=U.gfm,this.options.breaks?n.inline=z.breaks:n.inl
vendor: 11,064 bytes, lines 37-66
37ine=z.gfm),this.tokenizer.rules=n}static get rules(){return{block:U,inline:z}}static lex(e,n){return new X(n).lex(e)}static lexInline(e,n){return new X(n).inlineTokens(e)}lex(e){e=e.replace($.carriageReturn,`
38`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let l=this.inlineQueue[n];this.inlineTokens(l.src,l.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],l=!1){for(this.options.pedantic&&(e=e.replace($.tabCharGlobal,"    ").replace($.spaceLine,""));e;){let t;if(this.options.extensions?.block?.some(r=>(t=r.call({lexer:this},e,n))?(e=e.substring(t.raw.length),n.push(t),!0):!1))continue;if(t=this.tokenizer.space(e)){e=e.substring(t.raw.length);let r=n.at(-1);t.raw.length===1&&r!==void 0?r.raw+=`
39`:n.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let r=n.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=`
40`+t.raw,r.text+=`
41`+t.text,this.inlineQueue.at(-1).src=r.text):n.push(t);continue}if(t=this.tokenizer.fences(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.heading(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.hr(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.blockquote(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.list(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.html(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.def(e)){e=e.substring(t.raw.length);let r=n.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=`
42`+t.raw,r.text+=`
43`+t.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title});continue}if(t=this.tokenizer.table(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.lheading(e)){e=e.substring(t.raw.length),n.push(t);continue}let p=e;if(this.options.extensions?.startBlock){let r=1/0,c=e.slice(1),g;this.options.extensions.startBlock.forEach(v=>{g=v.call({lexer:this},c),typeof g=="number"&&g>=0&&(r=Math.min(r,g))}),r<1/0&&r>=0&&(p=e.substring(0,r+1))}if(this.state.top&&(t=this.tokenizer.paragraph(p))){let r=n.at(-1);l&&r?.type==="paragraph"?(r.raw+=`
44`+t.raw,r.text+=`
45`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):n.push(t),l=p.length!==e.length,e=e.substring(t.raw.length);continue}if(t=this.tokenizer.text(e)){e=e.substring(t.raw.length);let r=n.at(-1);r?.type==="text"?(r.raw+=`
46`+t.raw,r.text+=`
47`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):n.push(t);continue}if(e){let r="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let l=e,t=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,t.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(t=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,r="";for(;e;){p||(r=""),p=!1;let c;if(this.options.extensions?.inline?.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let v=n.at(-1);c.type==="text"&&v?.type==="text"?(v.raw+=c.raw,v.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(e,l,r)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),n.push(c);continue}let g=e;if(this.options.extensions?.startInline){let v=1/0,d=e.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},d),typeof x=="number"&&x>=0&&(v=Math.min(v,x))}),v<1/0&&v>=0&&(g=e.substring(0,v+1))}if(c=this.tokenizer.inlineText(g)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(r=c.raw.slice(-1)),p=!0;let v=n.at(-1);v?.type==="text"?(v.raw+=c.raw,v.text+=c.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return n}},Z=class{options;parser;constructor(s){this.options=s||D}space(s){return""}code({text:s,lang:e,escaped:n}){let l=(e||"").match($.notSpaceStart)?.[0],t=s.replace($.endingNewline,"")+`
48`;return l?'<pre><code class="language-'+M(l)+'">'+(n?t:M(t,!0))+`</code></pre>
49`:"<pre><code>"+(n?t:M(t,!0))+`</code></pre>
50`}blockquote({tokens:s}){return`<blockquote>
51${this.parser.parse(s)}</blockquote>
52`}html({text:s}){return s}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>
53`}hr(s){return`<hr>
54`}list(s){let e=s.ordered,n=s.start,l="";for(let r=0;r<s.items.length;r++){let c=s.items[r];l+=this.listitem(c)}let t=e?"ol":"ul",p=e&&n!==1?' start="'+n+'"':"";return"<"+t+p+`>
55`+l+"</"+t+`>
56`}listitem(s){let e="";if(s.task){let n=this.checkbox({checked:!!s.checked});s.loose?s.tokens[0]?.type==="paragraph"?(s.tokens[0].text=n+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=n+" "+M(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>
57`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
58`}table(s){let e="",n="";for(let t=0;t<s.header.length;t++)n+=this.tablecell(s.header[t]);e+=this.tablerow({text:n});let l="";for(let t=0;t<s.rows.length;t++){let p=s.rows[t];n="";for(let r=0;r<p.length;r++)n+=this.tablecell(p[r]);l+=this.tablerow({text:n})}return l&&(l=`<tbody>${l}</tbody>`),`<table>
59<thead>
60`+e+`</thead>
61`+l+`</table>
62`}tablerow({text:s}){return`<tr>
63${s}</tr>
64`}tablecell(s){let e=this.parser.parseInline(s.tokens),n=s.header?"th":"td";return(s.align?`<${n} align="${s.align}">`:`<${n}>`)+e+`</${n}>
65`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${M(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:n}){let l=this.parser.parseInline(n),t=me(s);if(t===null)return l;s=t;let p='<a href="'+s+'"';return e&&(p+=' title="'+M(e)+'"'),p+=">"+l+"</a>",p}image({href:s,title:e,text:n,tokens:l}){l&&(n=this.parser.parseInline(l,this.parser.textRenderer));let t=me(s);if(t===null)return M(n);s=t;let p=`<img src="${s}" alt="${n}"`;return e&&(p+=` title="${M(e)}"`),p+=">",p}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:M(s.text)}},he=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},q=class ee{options;renderer;textRenderer;constructor(e){this.options=e||D,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new he}static parse(e,n){return new ee(n).parse(e)}static parseInline(e,n){return new ee(n).parseInline(e)}parse(e,n=!0){let l="";for(let t=0;t<e.length;t++){let p=e[t];if(this.options.extensions?.renderers?.[p.type]){let c=p,g=this.options.extensions.renderers[c.type].call({parser:this},c);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){l+=g||"";continue}}let r=p;switch(r.type){case"space":{l+=this.renderer.space(r);continue}case"hr":{l+=this.renderer.hr(r);continue}case"heading":{l+=this.renderer.heading(r);continue}case"code":{l+=this.renderer.code(r);continue}case"table":{l+=this.renderer.table(r);continue}case"blockquote":{l+=this.renderer.blockquote(r);continue}case"list":{l+=this.renderer.list(r);continue}case"html":{l+=this.renderer.html(r);continue}case"paragraph":{l+=this.renderer.paragraph(r);continue}case"text":{let c=r,g=this.renderer.text(c);for(;t+1<e.length&&e[t+1].type==="text";)c=e[++t],g+=`
66`+this.renderer.text(c);n?l+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):l+=g;continue}default:{let c='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return l}parseInline(e,n=this.renderer){let l="";for(let t=0;t<e.length;t++){let p=e[t];if(this.options.extensions?.renderers?.[p.type]){let c=this.options.extensions.renderers[p.type].call({parser:this},p);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(p.type)){l+=c||"";continue}}let r=p;switch(r.type){case"escape":{l+=n.text(r);break}case"html":{l+=n.html(r);break}case"link":{l+=n.link(r);break}case"image":{l+=n.image(r);break}case"strong":{l+=n.strong(r);break}case"em":{l+=n.em(r);break}case"codespan":{l+=n.codespan(r);break}case"br":{l+=n.br(r);break}case"del":{l+=n.del(r);break}case"text":{l+=n.text(r);break}default:{let c='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return l}},j=class{options;block;constructor(s){this.options=s||D}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?P.lex:P.lexInline}provideParser(){return this.block?q.parse:q.parseInline}},wt=class{defaults=te();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=q;Renderer=Z;TextRenderer=he;Lexer=P;Tokenizer=V;Hooks=j;constructor(...s){this.use(...s)}walkTokens(s,e){let n=[];for(let l of s)switch(n=n.concat(e.call(this,l)),l.type){case"table":{let t=l;for(let p of t.header)n=n.concat(this.walkTokens(p.tokens,e));for(let p of t.rows)for(let r of p)n=n.concat(this.walkTokens(r.tokens,e));break}case"list":{let t=l;
66n=n.concat(this.walkTokens(t.items,e));break}default:{let t=l;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(p=>{let r=t[p].flat(1/0);n=n.concat(this.walkTokens(r,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(n=>{let l={...n};if(l.async=this.defaults.async||l.async||!1,n.extensions&&(n.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let p=e.renderers[t.name];p?e.renderers[t.name]=function(...r){let c=t.renderer.apply(this,r);return c===!1&&(c=p.apply(this,r)),c}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let p=e[t.level];p?p.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&(t.level==="block"?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:t.level==="inline"&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),l.extensions=e),n.renderer){let t=this.defaults.renderer||new Z(this.defaults);for(let p in n.renderer){if(!(p in t))throw new Error(`renderer '${p}' does not exist`);if(["options","parser"].includes(p))continue;let r=p,c=n.renderer[r],g=t[r];t[r]=(...v)=>{let d=c.apply(t,v);return d===!1&&(d=g.apply(t,v)),d||""}}l.renderer=t}if(n.tokenizer){let t=this.defaults.tokenizer||new V(this.defaults);for(let p in n.tokenizer){if(!(p in t))throw new Error(`tokenizer '${p}' does not exist`);if(["options","rules","lexer"].includes(p))continue;let r=p,c=n.tokenizer[r],g=t[r];t[r]=(...v)=>{let d=c.apply(t,v);return d===!1&&(d=g.apply(t,v)),d}}l.tokenizer=t}if(n.hooks){let t=this.defaults.hooks||new j;for(let p in n.hooks){if(!(p in t))throw new Error(`hook '${p}' does not exist`);if(["options","block"].includes(p))continue;let r=p,c=n.hooks[r],g=t[r];j.passThroughHooks.has(p)?t[r]=v=>{if(this.defaults.async)return Promise.resolve(c.call(t,v)).then(x=>g.call(t,x));let d=c.call(t,v);return g.call(t,d)}:t[r]=(...v)=>{let d=c.apply(t,v);return d===!1&&(d=g.apply(t,v)),d}}l.hooks=t}if(n.walkTokens){let t=this.defaults.walkTokens,p=n.walkTokens;l.walkTokens=function(r){let c=[];return c.push(p.call(this,r)),t&&(c=c.concat(t.call(this,r))),c}}this.defaults={...this.defaults,...l}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return P.lex(s,e??this.defaults)}parser(s,e){return q.parse(s,e??this.defaults)}parseMarkdown(s){return(e,n)=>{let l={...n},t={...this.defaults,...l},p=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&l.async===!1)return p(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return p(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return p(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));t.hooks&&(t.hooks.options=t,t.hooks.block=s);let r=t.hooks?t.hooks.provideLexer():s?P.lex:P.lexInline,c=t.hooks?t.hooks.provideParser():s?q.parse:q.parseInline;if(t.async)return Promise.resolve(t.hooks?t.hooks.preprocess(e):e).then(g=>r(g,t)).then(g=>t.hooks?t.hooks.processAllTokens(g):g).then(g=>t.walkTokens?Promise.all(this.walkTokens(g,t.walkTokens)).then(()=>g):g).then(g=>c(g,t)).then(g=>t.hooks?t.hooks.postprocess(g):g).catch(p);try{t.hooks&&(e=t.hooks.preprocess(e));let g=r(e,t);t.hooks&&(g=t.hooks.processAllTokens(g)),t.walkTokens&&this.walkTokens(g,t.walkTokens);let v=c(g,t);return t.hooks&&(v=t.hooks.postprocess(v)),v}catch(g){return p(g)}}}onError(s,e){return n=>{if(n.message+=`
67Please report this to https://github.com/markedjs/marked.`,s){let l="<p>An error occurred:</p><pre>"+M(n.message+"",!0)+"</pre>";return e?Promise.resolve(l):l}if(e)return Promise.reject(n);throw n}}},F=new wt;function I(s,e){return F.parse(s,e)}I.options=I.setOptions=function(s){return F.setOptions(s),I.defaults=F.defaults,xe(I.defaults),I};I.getDefaults=te;I.defaults=D;I.use=function(...s){return F.use(...s),I.defaults=F.defaults,xe(I.defaults),I};I.walkTokens=function(s,e){return F.walkTokens(s,e)};I.parseInline=F.parseInline;I.Parser=q;I.parser=q.parse;I.Renderer=Z;I.TextRenderer=he;I.Lexer=P;I.lexer=P.lex;I.Tokenizer=V;I.Hooks=j;I.parse=I;I.options;I.setOptions;I.use;I.walkTokens;I.parseInline;q.parse;P.lex;const be=(s,e)=>{if(!s)return"";const n=new I.Renderer;return n.link=l=>{const t=l.href.startsWith("http"),p=l.href.includes("getastrothemes")?'target="_blank" rel="noopener"':t?'target="_blank" rel="noopener noreferrer nofollow"':"";return`<a href="${l.href}" ${p}>${l.text}</a>`},I.setOptions({renderer:n}),e?I.parse(s):I.parseInline(s)};function ce(s){s?.reset(),s?.querySelectorAll("[input-wrapper]:not(.hidden):not(.message).success, [input-wrapper]:not(.hidden):not(.message).error")?.forEach(l=>{l.classList.remove("success","error")}),s?.querySelectorAll("[input-wrapper]:not(.hidden) select[data-hs-select]")?.forEach(l=>{const t=l,p=window.HSSelect.getInstance(l);t.selectedIndex=0,p&&p.setValue("")})}const ke=s=>{const e=s.closest("[input-wrapper]");s.value===""?(e?.classList.add("error"),e?.classList.remove("success")):(e?.classList.contains("error")&&e?.classList.add("success"),e?.classList.remove("error"))};function vt(s){const e=s.querySelectorAll("input[name], [input-wrapper]:not(.hidden) select[data-hs-select], textarea[name]");for(let n of e){const l=n;if(l.tagName==="SELECT"&&l.value==="")return!1;if(l.hasAttribute("required")&&l.value==="")return!1}return!0}const R=(s,e,n=!1,l)=>{const t=l?.querySelector('button[type="submit"]'),p=e?"success":"error",r=l.querySelectorAll(".message"),c=l.querySelector(`.message.${p}`),g=c?.querySelector(".prose-styles"),v=g?.getAttribute("data-default");r.forEach(d=>{d!==c&&d.classList.add("hidden")}),s==="default"&&g&&v&&(g.innerHTML=be(v,!0)),c?.classList.remove("hidden"),n?t?.setAttribute("disabled","true"):t?.removeAttribute("disabled"),g&&s!=="default"&&(g.innerHTML=be(s,!0))},bt=async({form:s,action:e})=>{const n=Object.fromEntries(new FormData(s).entries()),l=new AbortController,t=l.signal,p=6e4,r=e.replace("formsubmit.co/","formsubmit.co/ajax/"),c=setTimeout(()=>{l.abort()},p);fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n),signal:t}).then(async g=>{const v=await g.json();v.success==="true"?(R("default",!0,!1,s),ce(s)):v.success==="false"&&R(v.message,!1,!1,s)}).catch(async g=>{g.name==="AbortError"?R("We couldn't reach the server. Trying alternative server.",!1,!1,s):R("Oops! There was a problem submitting your form.",!1,!1,s)}).finally(()=>{clearTimeout(c)})},kt=async(s,e,n,l)=>{setTimeout(()=>n.abort(),l);const t=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:n.signal});if(t.status!==200)throw new Error("Request failed with status code "+t.status)},xt=async(s,e,n)=>{try{await kt("https://formspree.io/f/xwpkvjaa",s,new AbortController,e),R("default",!0,!1,n),ce(n)}catch(l){R(l+"! Please use this mail - [[email protected]](mailto:[email protected]) to submit a ticket!",!0,!1,n)}},yt=async(s,e)=>{const n=new URLSearchParams(new FormData(s)).toString();try{if((await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n})).ok)R("default",!0,!1,s),ce(s);else throw new Error("Netlify form submission failed.")}catch(l){throw R("Netlify submission error: "+l,!1,!1,s),l}};document.addEventListener("DOMContentLoaded",()=>{const s=document.getElementById("contact-form");let e=s?.querySelectorAll("[input-wrapper]:not(.hidden) select[data-hs-select]");function n(l){l.forEach(t=>{t.value!==""?t.classList.add("hs-select-active"):t.classList.remove("hs-select-active")})}n(Array.from(e)),e.forEach(l=>{l.addEventListener("change",()=>{e.forEach(t=>{const p=t.getAttribute("data-name");t.setAttribute("name",p||"")}),ke(l),n(Array.from(e))})}),s?.addEventListener("submit",async l=>{l.preventDefault();const t=s?.getAttribute("data-provider")||"",p=s?.getAttribute("data-action")||"";if(e=s?.querySelectorAll("[input-wrapper]:not(.hidden) select[data-hs-select]"),e.forEach(ke),vt(s)){const r=Object.fromEntries(new FormData(s).entries());console.log(Object.entries(r).map(([c,g])=>`${c}: ${g}`).join(`
68
69`)),R("Form Submitting!...",!0,!0,s);try{switch(t){case"netlify":await yt(s,p);break;case"formsubmit.co":await bt({form:s,action:p});break;case"formspree":await xt(Object.fromEntries(new FormData(s).entries()),5e3,s);break;default:throw new Error("Unknown form provider.")}}catch(c){R(c+"! Please use this mail - [[email protected]](mailto:[email protected]) to submit a ticket!",!1,!1,s)}}})});

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.