1!function(e,t){"use strict";const i="WordpressUlikeAjaxForms",n={},s=(e,t,i)=>{const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});e.dispatchEvent(n)},o=new WeakMap;function r(e,t){if(e){if(o.has(e))return o.get(e);this.element=e,this.settings=Object.assign({},n,t),this._defaults=n,this._name=i,this.form=this.element.querySelector("form"),this.form&&(o.set(e,this),this.init())}}const a=(e,t)=>{let i;return function(...n){clearTimeout(i),i=setTimeout(()=>{clearTimeout(i),e(...n)},t)}},l=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);r.prototype={init(){this.form&&this.form.addEventListener("submit",this._submit.bind(this)),this._initPasswordToggles(),this._initPasswordStrength(),this._initValidation()},_initPasswordToggles(){this.element.querySelectorAll(".ulp-password-toggle").forEach(e=>{const t=e.closest(".ulp-password-wrapper")?.querySelector('input[type="password"], input[type="text"]');if(!t)return;const i=e.querySelector(".ulp-password-toggle-icon");if(!i)return;i.classList.add("ulp-password-hidden");const n=n=>{n.preventDefault(),n.stopPropagation();const s="password"===t.type;t.type=s?"text":"password",e.setAttribute("aria-pressed",s?"true":"false");const o=s?e.getAttribute("data-label-hide")||e.getAttribute("aria-label")||"":e.getAttribute("data-label-show")||e.getAttribute("aria-label")||"";o&&e.setAttribute("aria-label",o),i.classList.toggle("ulp-password-visible",s),i.classList.toggle("ulp-password-hidden",!s)};e.addEventListener("click",n,{passive:!1}),e.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n(e))},{passive:!1})})},_initPasswordStrength(){this.element.querySelectorAll('input[type="password"][name="password"], input[type="password"][name="newpassword"]').forEach(e=>{const t=e.closest(".ulp-password-wrapper");if(!t)return;const i=t.querySelector(".ulp-password-strength-fill"),n=t.querySelector(".ulp-password-requirements");if(!i)return;const s=a(()=>{const t=e.value;if(!t)return i.style.width="0%",i.setAttribute("aria-valuenow","0"),i.className="ulp-password-strength-fill",void n?.classList.remove("ulp-visible");const s=(e=>{let t=0;const i={length:e.length>=8,lowercase:/[a-z]/.test(e),uppercase:/[A-Z]/.test(e),numbers:/[0-9]/.test(e),special:/[^A-Za-z0-9]/.test(e)};return Object.values(i).forEach(e=>{e&&(t+=20)}),e.length>=12&&(t+=10),e.length>=16&&(t+=10),Math.min(100,t)})(t),o=(e=>0===e?{class:"",value:0}:e<30?{class:"ulp-strength-very-weak",value:e}:e<50?{class:"ulp-strength-weak",value:e}:e<70?{class:"ulp-strength-fair",value:e}:e<90?{class:"ulp-strength-good",value:e}:{class:"ulp-strength-strong",value:e})(s);requestAnimationFrame(()=>{i.style.width=`${o.value}%`,i.setAttribute("aria-valuenow",o.value),i.className=`ulp-password-strength-fill ${o.class}`,n?.classList.add("ulp-visible")})},300);e.addEventListener("input",s,{passive:!0}),e.addEventListener("blur",s)})},_initValidation(){this.element.querySelectorAll('input[type="email"]').forEach(e=>{const t=a(()=>{const t=e.value.trim();t&&!l(t)?(e.classList.add("ulp-input-error"),e.classList.remove("ulp-input-success")):t&&l(t)?(e.classList.remove("ulp-input-error"),e.classList.add("ulp-input-success")):e.classList.remove("ulp-input-error","ulp-input-success")},300);e.addEventListener("blur",t),e.addEventListener("input",()=>{e.classList.contains("ulp-input-error")&&(e.classList.remove("ulp-input-error"),e.value.trim()?t():e.classList.remove("ulp-input-success"))},{passive:!0})});const e=this.element.querySelector('input[name="newpassword"]'),t=this.element.querySelector('input[name="repassword"]');if(e&&t){const i=a(()=>{const i=e.value,n=t.value;if(!i||!n)return t.classList.remove("ulp-input-error","ulp-input-success"),void e.classList.remove("ulp-input-error","ulp-input-success");i===n?(t.classList.remove("ulp-input-error"),t.classList.add("ulp-input-success"),e.classList.remove("ulp-input-error"),e.classList.add("ulp-input-success")):(t.classList.remove("ulp-input-success"),t.classList.add("ulp-input-error"),e.classList.remove("ulp-input-success"),e.classList.add("ulp-input-error"))},300);e.addEventListener("input",i,{passive:!0}),t.addEventListener("input",i,{passive:!0})}},_ajax(e,t){const i=new FormData;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];if(Array.isArray(n)){const e=t.endsWith("[]")?t:t+"[]";
1n.forEach(t=>{i.append(e,t)})}else i.append(t,n)}fetch(UlikeProCommonConfig.AjaxUrl,{method:"POST",cache:"no-cache",body:i}).then(e=>e.json()).then(t).catch(e=>{this.buttonElement&&this.buttonElement.length>0&&Array.from(this.buttonElement).forEach(e=>{e.disabled=!1}),this.currentForm&&this.currentForm.classList.remove("ulp-loading")})},_submit(e){e.preventDefault(),e.stopPropagation(),s(t,"UlpAjaxFormStarted",[this.element]),this.currentForm=e.currentTarget,this.buttonElement=this.currentForm.querySelectorAll(".ulp-button");const i=(e=>{const t={},i=new FormData(e);for(const[e,n]of i.entries())void 0!==t[e]?(Array.isArray(t[e])||(t[e]=[t[e]]),t[e].push(n||"")):t[e]=n||"";return t})(this.currentForm);this.buttonElement&&this.buttonElement.length>0&&Array.from(this.buttonElement).forEach(e=>{e.disabled=!0}),this.currentForm.classList.add("ulp-loading"),this._submitFormData(i)},_submitFormData(i){this._ajax(i,i=>{var n;if(void 0!==i.data.action&&i.data.action&&this._submitFormData(i.data),this.currentForm&&this.currentForm.classList.remove("ulp-loading"),this.buttonElement&&this.buttonElement.length>0&&Array.from(this.buttonElement).forEach(e=>{e.disabled=!1}),void 0!==i.data.message&&i.data.message&&this._sendNotification(i.data.status,i.data.message),void 0!==i.data.fragments&&i.data.fragments&&((n=i.data.fragments)&&"object"==typeof n&&Object.keys(n).forEach(e=>{const i=n[e];i&&"object"==typeof i&&t.querySelectorAll(e).forEach(e=>{const n=i.method||"append",s=i.content||"";switch(n){case"prepend":if(s){const i=t.createElement("div");i.innerHTML=s,Array.from(i.children).reverse().forEach(t=>{e.insertBefore(t,e.firstChild)})}break;case"hidden":e.classList.add("ulp-hidden-visually");break;default:if(s){const i=t.createElement("div");for(i.innerHTML=s;i.firstChild;)e.appendChild(i.firstChild)}}})}),this._initPasswordToggles&&this._initPasswordToggles(),this._initPasswordStrength&&this._initPasswordStrength(),this._initValidation&&this._initValidation(),"function"==typeof e.ulpOtpInput&&setTimeout(()=>{e.ulpOtpInput()},50)),void 0!==i.data.replace&&i.data.replace){const n=t.createElement("div");n.innerHTML=i.data.replace;const s=n.firstElementChild;if(s&&this.currentForm&&this.currentForm.parentNode){this.currentForm.parentNode.replaceChild(s,this.currentForm);const t=s.closest(".ulp-ajax-form");if(t){o.delete(this.element);const i=new r(t);i._initPasswordToggles&&i._initPasswordToggles(),i._initPasswordStrength&&i._initPasswordStrength(),i._initValidation&&i._initValidation(),"function"==typeof e.ulpOtpInput&&setTimeout(()=>{e.ulpOtpInput(t)},50)}return}}s(t,"UlpAjaxFormEnded",[this.element,i]),void 0!==i.data.refresh&&i.data.refresh&&location.reload(),void 0!==i.data.redirect&&i.data.redirect&&e.location.replace(i.data.redirect)})},_sendNotification(e,i){"undefined"!=typeof WordpressUlikeNotifications&&new WordpressUlikeNotifications(t.body,{messageType:e,messageText:i})}},e[i]=r}(window,document),function(){"use strict";let e=null;const t={namespace:"ulpmodal",closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",openSpeed:250,closeSpeed:250,afterOpen:null},i=()=>{if(!e)return;const i=e,n=t.namespace;i.classList.remove(`${n}-visible`),setTimeout(()=>{i.remove(),e=null,document.documentElement.classList.remove("with-ulpmodal")},t.closeSpeed)},n=async(n,s={})=>{const o=(s={...t,...s}).namespace||t.namespace;e&&(i(),await new Promise(e=>setTimeout(e,s.closeSpeed)));const r=(e=>{const i=e.namespace||t.namespace,n=document.createElement("div");return n.className=`${i}-loading ${i}`,n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-busy","true"),n.setAttribute("tabindex","-1"),n.innerHTML=`\n\t\t\t<div class="${i}-content">\n\t\t\t\t<div class="${i}-handle" aria-hidden="true"></div>\n\t\t\t\t<div class="${i}-header">\n\t\t\t\t\t<div class="${i}-header__title"></div>\n\t\t\t\t\t<button class="${i}-close-icon ${i}-close" aria-label="${void 0!==window.UlikeProCommonConfig&&window.UlikeProCommonConfig.modalClose?window.UlikeProCommonConfig.modalClose:"Close"}" type="button">${e.closeIcon||t.closeIcon}</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="${i}-body">\n\t\t\t\t\t<div class="${i}-inner" role="document"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`,n})(s);document.body.appendChild(r),e=r;const a=document.activeElement;document.documentElement.classList.add("with-ulpmodal"),r.offsetHeight,r.classList.add(`${o}-visible`),r.focus();const l=s.type||n&&n.getAttribute&&n.getAttribute("data-ulpmodal-type");try{const e=await(async(e,t)=>{if(e instanceof Element)return e.cloneNode(!0);if("string"==typeof e&&e.trim().startsWith("<")){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild||t}if("string"==typeof e){if("ajax"===t||!t&&!e.match(/\.(png|jpg|jpeg|gif|svg|webp)(\?|$)/i))try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");const i=await t.text(),n=document.createElement("div");return n.innerHTML=i,n}catch(e){const t=document.createElement("div");return t.textContent="Failed to load content",t}return new Promise((t,i)=>{const n=document.createElement("img");n.src=e,n.className="ulpmodal-image",n.alt="",n.onload=()=>t(n),n.onerror=()=>i(n)})}const i=document.createElement("div");return i.textContent=String(e),i})(n,l),t=r.querySelector(`.${o}-inner`);if(t&&e){t.appendChild(e),((e,t,i,n)=>{const s=e.querySelector(`.${n}-header__title`);
1if(!s)return;const o=t.querySelector(`.${n}-title, h1, h2, h3`);o?(o.id||(o.id=`${n}-title`),s.appendChild(o),e.setAttribute("aria-labelledby",o.id),e.classList.add(`${n}-has-title`)):i.ariaLabel?(s.textContent=i.ariaLabel,s.id=`${n}-title`,e.setAttribute("aria-labelledby",s.id),e.classList.add(`${n}-has-title`)):(e.removeAttribute("aria-labelledby"),e.setAttribute("aria-label","Dialog"))})(r,e,s,o),(e.classList.contains(`${o}-media-wrapper`)||e.classList.contains("ulp-avatar-cropper-modal")||e.querySelector(`.${o}-media-wrapper, .ulp-avatar-cropper-modal`))&&r.classList.add(`${o}-media`),(e.classList.contains(`${o}-ajax-wrapper`)||e.querySelector(`.${o}-ajax-wrapper`))&&r.classList.add(`${o}-ajax`),r.classList.remove(`${o}-loading`),r.removeAttribute("aria-busy");const i=e.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(i)setTimeout(()=>i.focus(),100);else{const e=r.querySelector(`.${o}-close`);e&&e.focus()}}}catch(e){r.classList.remove(`${o}-loading`),r.removeAttribute("aria-busy");const t=r.querySelector(`.${o}-inner`);t&&(t.innerHTML='<div class="ulpmodal-error"><p>Failed to load content. Please try again.</p></div>')}const u=t=>{t&&t.preventDefault(),e===r&&(r.classList.remove(`${o}-visible`),setTimeout(()=>{e===r&&(r.remove(),e=null,document.querySelector(`.${o}.${o}-visible`)||document.documentElement.classList.remove("with-ulpmodal"),a&&"function"==typeof a.focus&&a.focus())},s.closeSpeed))};if(r.addEventListener("click",e=>{("background"===s.closeOnClick&&e.target===r||e.target.closest(`.${o}-close`))&&u(e)}),s.closeOnEsc){const e=t=>{"Escape"!==t.key&&27!==t.keyCode||(u(t),document.removeEventListener("keydown",e))};document.addEventListener("keydown",e)}return r.addEventListener("keydown",e=>{if("Tab"!==e.key)return;const t=r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),i=t[0]||r.querySelector(`.${o}-close`),n=t[t.length-1]||r.querySelector(`.${o}-close`);e.shiftKey?document.activeElement===i&&(n.focus(),e.preventDefault()):document.activeElement===n&&(i.focus(),e.preventDefault())}),setTimeout(()=>{s.afterOpen&&s.afterOpen({target:r})},s.openSpeed),r},s=()=>{document.addEventListener("click",i=>{const s=i.target.closest("[data-ulpmodal]");if(!s)return;const o=s.getAttribute("data-ulpmodal");if(!o||!o.trim())return;if(i.preventDefault(),i.stopPropagation(),e)return;const r=s.getAttribute("data-ulpmodal-type")||"ajax";n(o,{type:r,afterOpen:t.afterOpen})})};"undefined"!=typeof window&&(window.ulpmodal=n,window.ulpmodalClose=i),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",s):s()}(),function(e,t){"use strict";const i="WordpressUlikeNotifications",n={messageType:"success",messageText:"Hello World!",timeout:8e3,messageElement:"wpulike-message",notifContainer:"wpulike-notification",fadeOutClass:"wpulike-message-fadeout"},s=new WeakMap,o=(e,t,i)=>{if(!e)return;const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i||null});e.dispatchEvent(n)};function r(e,t){e&&(this.element=e,this.settings=Object.assign({},n,t),this._defaults=n,this._name=i,this.timeoutId=null,this.fadeTimeoutId=null,this.isRemoving=!1,this._messageClassName=null,this.init())}r.prototype={init(){this._createMessage(),this._getContainer(),this._append(),this._setupRemoval()},_createMessage(){this.messageElement=t.createElement("div"),this._messageClassName||(this._messageClassName=`${this.settings.messageElement} wpulike-${this.settings.messageType}`),this.messageElement.className=this._messageClassName,this.messageElement.textContent=this.settings.messageText,this.messageElement.setAttribute("role","alert"),this.messageElement.setAttribute("aria-live","polite")},_getContainer(){this.notifContainer=((e,i)=>{let n=s.get(e);return n&&n.parentNode||(n=e.querySelector(`.${i}`),n||(n=t.createElement("div"),n.className=i,e.appendChild(n)),s.set(e,n)),n})(this.element,this.settings.notifContainer)},_append(){this.notifContainer&&this.messageElement&&(this.notifContainer.appendChild(this.messageElement),requestAnimationFrame(()=>{o(this.notifContainer,"WordpressUlikeNotificationAppend",{messageElement:this.messageElement})}))},_setupRemoval(){this.messageElement&&(this.messageElement.addEventListener("click",()=>{this.remove()},{once:!0,passive:!0}),this.settings.timeout&&this.settings.timeout>0&&(this.timeoutId=setTimeout(()=>{this.remove()},this.settings.timeout)))},remove(){var e,t,i;!this.isRemoving&&this.messageElement&&(this.isRemoving=!0,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.fadeTimeoutId&&(clearTimeout(this.fadeTimeoutId),this.fadeTimeoutId=null),e=this.messageElement,t=()=>{this._cleanup()},i=this,e&&requestAnimationFrame(()=>{e.classList.add(n.fadeOutClass);const s=setTimeout(()=>
1{i&&(i.fadeTimeoutId=null),t&&t()},300);i&&(i.fadeTimeoutId=s)}))},_cleanup(){if(!this.messageElement)return;const e=this.messageElement,t=this.notifContainer;e.parentNode&&e.remove(),t&&0===t.children.length&&t.parentNode&&(t.remove(),s.delete(this.element)),o(this.element,"WordpressUlikeRemoveNotification",{messageElement:e}),this.messageElement=null,this.notifContainer=null,this.isRemoving=!1,this._messageClassName=null}},e[i]=r,"undefined"!=typeof jQuery&&jQuery&&jQuery.fn&&(jQuery.fn[i]=function(e){return this.each(function(){new r(this,e)})})}(window,document),function(e,t){"use strict";const i=new WeakMap,n={},s=[],o={id:Date.now(),title:"",trigger:"hover",position:"top",class:"",theme:"light",size:"small",singleton:!0,close_on_outside_click:!0},r=(t,i,n)=>{t.offsetHeight;const s=(e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}})(i),o=t.getBoundingClientRect(),r=t.querySelector(".ulf-arrow"),a=e.innerWidth,l=e.innerHeight,u={top:{top:s.top-o.height-13,left:s.left+s.width/2-o.width/2,arrow:"bottom"},bottom:{top:s.top+s.height+13,left:s.left+s.width/2-o.width/2,arrow:"top"},left:{top:s.top+s.height/2-o.height/2,left:s.left-o.width-13,arrow:"right"},right:{top:s.top+s.height/2-o.height/2,left:s.left+s.width+13,arrow:"left"}},c=u[n]||u.top;c.left<10&&(c.left=10),c.left+o.width>a-10&&(c.left=a-o.width-10),c.top<10&&(c.top=10),c.top+o.height>l-10&&(c.top=l-o.height-10),t.style.position="fixed",t.style.left=`${c.left}px`,t.style.top=`${c.top}px`,r&&(r.className=`ulf-arrow ulf-arrow-${c.arrow}`),t.setAttribute("data-positioned","true")},a=Array.from||(e=>Array.prototype.slice.call(e));function l(u,c){if(void 0!==u.length&&u.length>1)return a(u).forEach(e=>{new l(e,c)}),u;if(!u)return!1;if(!(c=Object.assign({},o,c||{})).title){const e=u.querySelector("[data-tooltip-content]");if(e&&"ready"===e.getAttribute("data-tooltip-state")&&(c.title=e.innerHTML.trim()),!c.title){const e=u.getAttribute("title");e&&(c.title=e,u.removeAttribute("title"))}}const d=i.get(u);d&&d.destroy();let p=null,m=null,h=null,g=!1,f=null,v=null,y=null,b=!1;const k=i=>{if(p&&p.parentNode&&!i)return;!1!==c.singleton&&s.forEach(e=>{e&&e.hide&&e.element!==u&&e.hide()});let n=`ulf-${c.theme||"light"}-theme ulf-${c.size||"small"}`;c.class&&(n+=` ${c.class}`);let o=u;if(c.child){const e=u.querySelector(c.child);e&&(o=e)}if(p&&p.parentNode&&!i){const e=p.querySelector(".ulf-content");e&&(g=!0===i,e.innerHTML=g?'<div class="ulf-loading-spinner"><div class="ulf-spinner-circle"></div><div class="ulf-spinner-circle"></div><div class="ulf-spinner-circle"></div></div>':c.title||" "),requestAnimationFrame(()=>{p&&p.parentNode&&r(p,o,c.position||"top")})}else p&&p.parentNode&&p.remove(),g=!0===i,p=((e,i,n)=>{const s=t.createElement("div");s.className=`ulf-tooltip ${i||""}`,s.setAttribute("role","tooltip");const o=n?'<div class="ulf-loading-spinner"><div class="ulf-spinner-circle"></div><div class="ulf-spinner-circle"></div><div class="ulf-spinner-circle"></div></div>':e||" ";return s.innerHTML=`<div class="ulf-arrow"></div><div class="ulf-content">${o}</div>`,s})(c.title||"",n,g),t.body.appendChild(p),requestAnimationFrame(()=>{p&&p.parentNode&&r(p,o,c.position||"top")});"hover"!==c.trigger&&c.trigger||(p.addEventListener("mouseenter",()=>{clearTimeout(h)}),p.addEventListener("mouseleave",S)),f||(f=()=>{p&&p.parentNode&&A()},v={capture:!0,passive:!0},e.addEventListener("scroll",f,v)),s.some(e=>e.element===u)||s.push({element:u,hide:A});const a=`ulp-dom-${c.id}`;p.setAttribute("id",a),u.setAttribute("aria-describedby",a);const l=new CustomEvent("ulf-show",{bubbles:!0,detail:{tooltip:p}});u.dispatchEvent(l)},E=()=>{let e=u.querySelector("[data-tooltip-content]");return e||(e=t.createElement("div"),e.setAttribute("data-tooltip-content",""),e.style.display="none",u.appendChild(e)),e},w=e=>{E().setAttribute("data-tooltip-state",e)},L=()=>{const e=u.querySelector("[data-tooltip-content]");return e?e.getAttribute("data-tooltip-state"):null},_=e=>{c.title=e||"",E().innerHTML=e||"";const t=e&&e.trim().length>0;if(w(t?"ready":"empty"),t)if(p&&p.parentNode){const t=p.querySelector(".ulf-content");
1if(t){t.innerHTML=e,g=!1;const i=c.child&&u.querySelector(c.child)||u;requestAnimationFrame(()=>{p&&p.parentNode&&r(p,i,c.position||"top")})}}else b&&k(!1);else p&&p.parentNode&&A()},A=()=>{if(!p||!p.parentNode)return;f&&v&&(e.removeEventListener("scroll",f,v),f=null,v=null),p.remove(),p=null,g=!1;const t=s.findIndex(e=>e.element===u);t>-1&&s.splice(t,1),u.removeAttribute("aria-describedby");const i=new CustomEvent("ulf-hide",{bubbles:!0});u.dispatchEvent(i)},C=()=>{const e=u.querySelector("[data-tooltip-content]");return e?e.innerHTML.trim():""},T=()=>{clearTimeout(h),b=!0;const e=L();if("empty"!==e){if("ready"===e){const e=C();return void(e?(c.title=e,m=setTimeout(k,100)):w("empty"))}if("loading"!==e)return e&&""!==e?void(c.showLoadingImmediately?k(!0):m=setTimeout(k,100)):(U.requestData&&U.requestData()||w("loading"),void k(!0));k(!0)}},S=()=>{clearTimeout(m),b=!1,h=setTimeout(A,100)};"hover"!==c.trigger&&c.trigger?"click"===c.trigger&&u.addEventListener("click",e=>{e.preventDefault(),p&&p.parentNode?A():k()}):(u.addEventListener("mouseenter",T),u.addEventListener("mouseleave",S)),!1!==c.close_on_outside_click&&(y=e=>{p&&p.parentNode&&!p.contains(e.target)&&!u.contains(e.target)&&A()},t.addEventListener("mousedown",y));const U={show:k,showLoading:()=>k(!0),updateContent:_,hide:A,destroy:()=>{A(),u.removeEventListener("mouseenter",T),u.removeEventListener("mouseleave",S),U.contentUpdateHandler&&u.removeEventListener("tooltip-content-updated",U.contentUpdateHandler),f&&v&&(e.removeEventListener("scroll",f,v),f=null,v=null),y&&(t.removeEventListener("mousedown",y),y=null),m&&(clearTimeout(m),m=null),h&&(clearTimeout(h),h=null),i.delete(u),c.id&&delete n[c.id]}};
1i.set(u,U),c.id&&(n[c.id]=U),U.setLoadingState=()=>{w("loading")},c.trigger&&"hover"!==c.trigger||setTimeout(()=>{if(!u.matches(":hover"))return;const e=L();if(e&&""!==e){if("loading"===e)k(!0);else if("ready"===e){const e=C();e&&(c.title=e,m=setTimeout(k,100))}}else T()},0),U.requestData=()=>{const e=L();return"ready"!==e&&"empty"!==e&&"loading"!==e&&(w("loading"),"function"==typeof c.dataFetcher?(c.dataFetcher(u,c.id),!0):(setTimeout(()=>{const e=new CustomEvent("tooltip-request-data",{bubbles:!0,detail:{element:u,tooltipId:c.id}});u.dispatchEvent(e),t.dispatchEvent(e)},0),!0))};const q=e=>{const t=e.detail||{};(t.element===u||t.target&&u.contains(t.target))&&_(t.content||"")};return u.addEventListener("tooltip-content-updated",q),U.contentUpdateHandler=q,u}e.WordpressUlikeTooltipPlugin=l,e.WordpressUlikeTooltip={visible:s,defaults:o,getInstanceById:e=>n[e],getInstanceByElement:e=>i.get(e)},"undefined"!=typeof jQuery&&jQuery&&jQuery.fn&&(jQuery.fn.WordpressUlikeTooltip=function(e){return this.each(function(){new l(this,e)})})}(window,document),function(e,t,i){"use strict";const n="WordpressUlike",s={ID:0,nonce:0,type:"",append:"",appendTimeout:2e3,displayLikers:!1,likersTemplate:"default",disablePophover:!0,isTotal:!1,factor:"",template:"",counterSelector:".count-box",generalSelector:".wp_ulike_general_class",buttonSelector:".wp_ulike_btn",likersSelector:".wp_ulike_likers_wrapper"},o=()=>{if(void 0===t||!t.body)return!1;const i=t.body;if(i.classList.contains("ulp-customizer-preview")||i.classList.contains("elementor-editor-active")||i.classList.contains("block-editor-page"))return!0;try{const t=new URLSearchParams(e.location.search||"");if(t.has("preview")||t.has("customize_changeset_uuid")||t.has("elementor-preview"))return!0}catch(e){}return!("undefined"==typeof UlikeProCommonConfig||!UlikeProCommonConfig.AjaxUrl||!/[?&]preview=/.test(UlikeProCommonConfig.AjaxUrl))||void 0!==e.wp&&!!e.wp.customize},r={"ulike-id":"ID","ulike-nonce":"nonce","ulike-type":"type","ulike-append":"append","ulike-is-total":"isTotal","ulike-display-likers":"displayLikers","ulike-likers-style":"likersTemplate","ulike-disable-pophover":"disablePophover","ulike-append-timeout":"appendTimeout","ulike-factor":"factor","ulike-template":"template"},a=(e,t)=>{const n=t.replace(/-([a-z])/g,e=>e[1].toUpperCase());if(e.dataset&&e.dataset[n]!==i)return e.dataset[n];const s=e.getAttribute(`data-${t}`);return null===s?i:"true"===s||"false"!==s&&(""===s||"null"===s?null:isNaN(s)||""===s?s:Number(s))},l=(e,t,i)=>{const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});e.dispatchEvent(n),"undefined"!=typeof jQuery&&jQuery&&jQuery.fn&&jQuery.fn.on&&jQuery(e).trigger(t,i)},u=e=>Array.from?Array.from(e):Array.prototype.slice.call(e),c=(e,t)=>{e&&(e.length===i?t(e,0):u(e).forEach(t))},d=(e,t)=>{const i=[],n=e.parentNode;if(!n)return i;const s=n.children;for(let n=0;n<s.length;n++)s[n]!==e&&(t&&!s[n].matches(t)||i.push(s[n]));return i},p=(e,t)=>{const i=[],n=new Set;return c(e,e=>{d(e,t).forEach(e=>{n.has(e)||(n.add(e),i.push(e))})}),i},m=e=>Array.isArray(e)||e.length!==i?e[0]:e,h=(e,t)=>{for(const i in t)"boolean"==typeof t[i]&&null!=e[i]&&(e[i]=0!=e[i]&&"0"!==e[i]&&!1!==e[i])};function g(e,t){this.element=e,this.settings=Object.assign({},s,t),h(this.settings,s),this._defaults=s,this._name=n,this._boundHandlers=[],this._timeouts=[],this._isFetchingLikers=!1,this.buttonElement=this.element.querySelectorAll(this.settings.buttonSelector);const o=this.buttonElement.length>0?this.buttonElement[0]:null;if(o){for(const e in r)if(r.hasOwnProperty(e)){const t=a(o,e);t!==i&&(this.settings[r[e]]=t)}h(this.settings,s)}this.generalElement=this.element.querySelectorAll(this.settings.generalSelector),this.counterElement=[],this.generalElement.length>0&&c(this.generalElement,e=>{const t=e.querySelectorAll(this.settings.counterSelector);c(t,e=>{this.counterElement.push(e)})}),this.counterElement.length>0&&c(this.counterElement,e=>{const t=a(e,"ulike-counter-value");t!==i&&(e.innerHTML=t)}),this.likersElement=this.element.querySelector(this.settings.likersSelector),this.init()}g.prototype={init(){if(this.buttonElement&&this.buttonElement.length>0){const e=this._initLike.bind(this);this._boundHandlers.push({element:this.buttonElement,event:"click",handler:e}),c(this.buttonElement,t=>{t&&t.addEventListener("click",e)})}const e=this.generalElement.length>0?this.generalElement[0]:null;if(e){const t=i=>{this._updateLikers(i),e.removeEventListener("mouseenter",t);const n=this._boundHandlers.findIndex(e=>e.handler===t);n>-1&&this._boundHandlers.splice(n,1)};
1this._boundHandlers.push({element:e,event:"mouseenter",handler:t}),e.addEventListener("mouseenter",t)}this._trackButtonView()},_ajax(e,i){const n=new FormData;for(const t in e)e.hasOwnProperty(t)&&n.append(t,e[t]);const s=this,o="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.AjaxUrl?UlikeProCommonConfig.AjaxUrl:"";o&&fetch(o,{method:"POST",body:n}).then(e=>{if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(i).catch(e=>{s.generalElement&&c(s.generalElement,e=>{e.classList.remove("wp_ulike_is_loading"),e.classList.remove("wp_ulike_is_getting_likers_list")}),s._isFetchingLikers=!1,s.buttonElement&&c(s.buttonElement,e=>{e.disabled=!1}),UlikeProCommonConfig&&UlikeProCommonConfig.notifications&&UlikeProCommonConfig.ajax_error&&s._sendNotification("error",UlikeProCommonConfig.ajax_error),l(t,"WordpressUlikeUpdated",s.element)})},_initLike(e){e.stopPropagation(),this._maybeUpdateElements(e),this._updateSameButtons(),this._updateSameLikers(),this.buttonElement&&c(this.buttonElement,e=>{e.disabled=!0}),l(t,"WordpressUlikeLoading",this.element),this.generalElement&&c(this.generalElement,e=>{e.classList.add("wp_ulike_is_loading")}),this._ajax({action:"wp_ulike_process",id:this.settings.ID,nonce:this.settings.nonce,factor:this.settings.factor,type:this.settings.type,template:this.settings.template,displayLikers:this.settings.displayLikers,likersTemplate:this.settings.likersTemplate},e=>{this.generalElement&&c(this.generalElement,e=>{e.classList.remove("wp_ulike_is_loading")}),e.success?void 0!==e.data.hasToast&&void 0!==e.data.modalTemplate&&e.data.modalTemplate?this._openModal(e.data.modalTemplate):(this._updateMarkup(e),this._appendChild()):e.data&&e.data.hasToast&&this._sendNotification("error",e.data.message),this.buttonElement&&c(this.buttonElement,e=>{e.disabled=!1}),l(t,"WordpressUlikeUpdated",this.element)})},_openModal(i){if("function"==typeof e.ulpmodal){const n=t.createElement("div");n.className="ulpmodal-ajax-wrapper",n.innerHTML=i,e.ulpmodal(n,{closeOnClick:"background",afterOpen:e=>{l(t,"WordpressUlikeModalAfterOpen",e)},closeOnEsc:!0})}},_maybeUpdateElements(e){this.buttonElement=e.currentTarget,this.generalElement=this.buttonElement.closest(this.settings.generalSelector),this.generalElement?this.counterElement=this.generalElement.querySelectorAll(this.settings.counterSelector):this.counterElement=[],this.settings.factor=a(this.buttonElement,"ulike-factor")},_appendChild(){if(""!==this.settings.append&&this.buttonElement){let e=[];
1if(this.settings.append.trim().startsWith("<")){const i=t.createElement("div");for(i.innerHTML=this.settings.append;i.firstChild;)e.push(i.removeChild(i.firstChild))}else{const i=t.querySelector(this.settings.append);i&&e.push(i)}if(e.length>0){const t=[];if(c(this.buttonElement,i=>{i&&e.forEach(e=>{const n=e.cloneNode(!0);i.appendChild(n),t.push(n)})}),this.settings.appendTimeout&&t.length>0){const e=setTimeout(()=>{t.forEach(e=>{e&&e.parentNode&&e.remove()})},this.settings.appendTimeout);this._timeouts.push(e)}}}},_updateMarkup(e){this._setSbilingElement(),this._setSbilingButtons(),this._updateGeneralClassNames(e.data.status),null!==e.data.data&&(5!==e.data.status&&(this.__updateCounter(e.data.data),this.settings.displayLikers&&void 0!==e.data.likers&&this._updateLikersMarkup(e.data.likers)),this._updateButton(e.data.btnText,e.data.status)),e.data.hasToast&&this._sendNotification(e.data.messageType,e.data.message),e.data.modalAfterSuccess&&this._openModal(e.data.modalAfterSuccess)},_updateGeneralClassNames(e){const t="wp_ulike_is_liked",i="wp_ulike_is_unliked",n="wp_ulike_click_is_disabled";this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,e=>{e.classList.remove(t,i)}),c(this.generalElement,s=>{if(s)switch(e){case 1:s.classList.add(t),s.classList.remove("wp_ulike_is_not_liked");const e=s.firstElementChild;e&&e.classList.add(n);break;case 2:s.classList.add(i),s.classList.remove(t);break;case 3:s.classList.add(t),s.classList.remove(i);break;case 0:case 5:s.classList.add(n)}}),(0===e||5===e)&&this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,e=>{e.classList.add(n)})},_arrayToString:e=>e.join(" "),_setSbilingElement(){if(this.generalElement.length!==i&&this.generalElement.length>1)this.siblingElement=p(this.generalElement);else{const e=m(this.generalElement);this.siblingElement=e?d(e):[]}},_setSbilingButtons(){if(this.buttonElement.length!==i&&this.buttonElement.length>1)this.siblingButton=p(this.buttonElement,this.settings.buttonSelector);else{const e=m(this.buttonElement);this.siblingButton=e?d(e,this.settings.buttonSelector):[]}},__updateCounter(e){"object"!=typeof e?c(this.counterElement,t=>{t.setAttribute("data-ulike-counter-value",e),t.innerHTML=e}):this.settings.isTotal&&void 0!==e.sub?c(this.counterElement,t=>{t.setAttribute("data-ulike-counter-value",e.sub),t.innerHTML=e.sub}):"down"===this.settings.factor?(c(this.counterElement,t=>{t.setAttribute("data-ulike-counter-value",e.down),t.innerHTML=e.down}),this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,t=>{const i=t.querySelectorAll(this.settings.counterSelector);c(i,t=>{t.setAttribute("data-ulike-counter-value",e.up),t.innerHTML=e.up})})):(c(this.counterElement,t=>{t.setAttribute("data-ulike-counter-value",e.up),t.innerHTML=e.up}),this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,t=>{const i=t.querySelectorAll(this.settings.counterSelector);c(i,t=>{t.setAttribute("data-ulike-counter-value",e.down),t.innerHTML=e.down})}));const i=m(this.buttonElement);l(t,"WordpressUlikeCounterUpdated",[i])},_fetchLikersData(){if(!this.settings.displayLikers)return void(this._isFetchingLikers=!1);if(this._isFetchingLikers)return;this._isFetchingLikers=!0;const e=m(this.generalElement);e&&e.classList.add("wp_ulike_is_getting_likers_list"),this._ajax({action:"wp_ulike_get_likers",id:this.settings.ID,nonce:this.settings.nonce,type:this.settings.type,displayLikers:this.settings.displayLikers,likersTemplate:this.settings.likersTemplate},t=>{e&&e.classList.remove("wp_ulike_is_getting_likers_list"),this._isFetchingLikers=!1,t.success?this._updateLikersMarkup(t.data):this._updateLikersMarkup("")})},_getAllTooltipElements(){const e=void 0!==this.settings.factor&&this.settings.factor?`_${this.settings.factor}`:"",i=`.wp_${this.settings.type.toLowerCase()}${e}_btn_${this.settings.ID}`,n=t.querySelectorAll(i),s=[];return c(n,e=>{const t=e.closest(".wpulike");t&&!s.includes(t)&&s.push(t)}),s.length>0?s:[this.element]},_updateLikers(t){if(this.settings.displayLikers){if("popover"===this.settings.likersTemplate&&a(this.element,"ulike-tooltip"))return;if(["default","pile"].includes(this.settings.likersTemplate)&&this.likersElement&&(this.likersElement.length===i||this.likersElement.length>0))return;if("popover"===this.settings.likersTemplate){if("undefined"!=typeof WordpressUlikeTooltipPlugin){const t=`${this.settings.type.toLowerCase()}-${this.settings.ID}`;e.WordpressUlikeTooltip&&e.WordpressUlikeTooltip.getInstanceByElement&&e.WordpressUlikeTooltip.getInstanceByElement(this.element)||new WordpressUlikeTooltipPlugin(this.element,{id:t,position:"top",child:this.settings.generalSelector,theme:"white",size:"tiny",trigger:"hover",dataFetcher:(e,t)=>{this._fetchLikersData()}})}}else this._fetchLikersData();return t&&t.stopImmediatePropagation(),!1}},_updateLikersMarkup(e){if("popover"===this.settings.likersTemplate){this.likersElement=this.element,this.settings.type.toLowerCase(),this.settings.ID;const i=(e&&"object"==typeof e?e.template:e)||"",n=this._getAllTooltipElements();c(n,e=>{const n=new CustomEvent("tooltip-content-updated",{bubbles:!0,detail:{element:e,content:i}});e.dispatchEvent(n),t.dispatchEvent(n);let s=e.querySelector("[data-tooltip-content]");s||(s=t.createElement("div"),s.setAttribute("data-tooltip-content",""),s.setAttribute("data-tooltip-state","ready"),s.style.display="none",e.appendChild(s)),s.innerHTML=i,s.setAttribute("data-tooltip-state","ready")})}else{if((!this.likersElement||!(this.likersElement.length===i||this.likersElement.length>0))&&e&&e.template){const i=t.createElement("div");i.innerHTML=e.template;const n=i.firstElementChild;n&&(this.element.appendChild(n),this.likersElement=n)}if(this.likersElement){const t=this.likersElement.length!==i?u(this.likersElement):[this.likersElement],n=e&&"object"==typeof e&&e.template?e.template:"string"==typeof e?e:"";c(t,e=>{e&&(n?(e.style.display="",e.innerHTML=n):(e.style.display="none",e.innerHTML=""))})}}const n=e&&"object"==typeof e?e.template:e;l(t,"WordpressUlikeLikersMarkupUpdated",[this.likersElement,this.settings.likersTemplate,n])},_updateSameButtons(){const e=void 0!==this.settings.factor&&this.settings.factor?`_${this.settings.factor}`:"",i=`.wp_${this.settings.type.toLowerCase()}${e}_btn_${this.settings.ID}`;if(this.sameButtons=t.querySelectorAll(i),this.sameButtons.length>1){this.buttonElement=this.sameButtons;const e=[];c(this.sameButtons,t=>{const i=t.closest(this.settings.generalSelector);i&&e.push(i)}),this.generalElement=1===e.length?e[0]:e;const t=[];c(e,e=>{const i=e.querySelectorAll(this.settings.counterSelector);c(i,e=>{t.push(e)})}),this.counterElement=t}},_updateSameLikers(){const e=`.wp_${this.settings.type.toLowerCase()}_likers_${this.settings.ID}`;this.sameLikers=t.querySelectorAll(e),this.sameLikers.length>1&&(this.likersElement=this.sameLikers)},_getLikersElement(){return this.likersElement},_updateButton(e,t){c(this.buttonElement,i=>{if(i)if(i.classList.contains("wp_ulike_put_image"))4===t?(i.classList.remove("wp_ulike_btn_is_active"),i.offsetWidth,i.classList.add("image-unlike","wp_ulike_btn_is_active")):(i.classList.toggle("image-unlike"),i.classList.toggle("wp_ulike_btn_is_active"));else if(i.classList.contains("wp_ulike_put_text")&&null!==e){const t=i.querySelector("span");t&&("object"==typeof e&&null!==e?"down"===this.settings.factor?(t.innerHTML=e.down,this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,t=>{const i=t.querySelector(this.settings.buttonSelector);if(i){const t=i.querySelector("span");t&&(t.innerHTML=e.up)}})):(t.innerHTML=e.up,this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,t=>{const i=t.querySelector(this.settings.buttonSelector);if(i){const t=i.querySelector("span");t&&(t.innerHTML=e.down)}}
1)):t.innerHTML=e)}}),this.siblingElement&&this.siblingElement.length&&c(this.siblingElement,e=>{const t=e.querySelector(this.settings.buttonSelector);t&&t.classList.remove("image-unlike","wp_ulike_btn_is_active")}),this.siblingButton&&this.siblingButton.length&&c(this.siblingButton,e=>{e.classList.remove("image-unlike","wp_ulike_btn_is_active")})},_sendNotification(e,i){"undefined"!=typeof WordpressUlikeNotifications&&new WordpressUlikeNotifications(t.body,{messageType:e,messageText:i})},_trackButtonView(){if(o())return;const t=this.settings.ID,i=this.settings.type;if(!t||!i)return;const n="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.ViewTracking?UlikeProCommonConfig.ViewTracking:null;if(!n||!Array.isArray(n.enabledTypes)||!n.enabledTypes.includes(i))return;if(f.isTracked(t,i))return;const s="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.AjaxUrl?UlikeProCommonConfig.AjaxUrl:"",r="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.Nonce?UlikeProCommonConfig.Nonce:"";if(!s||!r)return;const a=()=>{o()||(f.queueView(t,i,s,r),this.element.setAttribute&&this.element.setAttribute("data-view-tracked","true"))};if("IntersectionObserver"in e){const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>0&&(a(),e.disconnect())})},{threshold:[.1,.5],rootMargin:"0px"}),t=(this.generalElement.length>0?this.generalElement[0]:null)||this.element;t&&(e.observe(t),this._viewObserver=e)}else a()},destroy(){this._boundHandlers.forEach(({element:e,event:t,handler:n})=>{e&&e.length!==i?c(e,e=>{e&&e.removeEventListener(t,n)}):e&&e.removeEventListener(t,n)}),this._boundHandlers=[],this._timeouts.forEach(e=>{clearTimeout(e)}),this._timeouts=[],this._viewObserver&&(this._viewObserver.disconnect(),this._viewObserver=null),this._isFetchingLikers=!1}};const f=function(){const i=new Set,n=[];let s=null;function o(e,t){return`${e}_${t}`}function r(){if(s&&(clearTimeout(s),s=null),0===n.length)return;const e=[],t=new Set;if(n.forEach(i=>{t.has(i.key)||(t.add(i.key),e.push(i))}),n.length=0,e.length>0){const t=new FormData;t.append("action","ulp_track_view_batch"),t.append("nonce",e[0].nonce),t.append("items",JSON.stringify(e.map(e=>({id:e.itemId,type:e.type})))),e.forEach(e=>{var t,n;t=e.itemId,n=e.type,i.add(o(t,n))}),fetch(e[0].ajaxUrl,{method:"POST",body:t,keepalive:!0}).catch(()=>{})}}return void 0!==e&&(e.addEventListener("beforeunload",()=>{r()}),t.addEventListener("visibilitychange",()=>{t.hidden&&r()})),{isTracked:function(e,t){return i.has(o(e,t))},queueView:function(e,t,i,a){const l=o(e,t);-1===n.findIndex(e=>e.key===l)&&(n.push({key:l,itemId:e,type:t,ajaxUrl:i,nonce:a}),n.length>=10?r():(s&&clearTimeout(s),s=setTimeout(()=>{r()},2e3)))},sendBatch:r}}();e.WP_Ulike_ViewTracking=f,e[n]=g,"undefined"!=typeof jQuery&&jQuery&&jQuery.fn&&(jQuery.fn[n]=function(t){return this.each(function(){if(!this.hasAttribute||!this.hasAttribute("data-ulike-initialized"))try{new g(this,t),this.setAttribute&&this.setAttribute("data-ulike-initialized","true")}catch(t){e.console&&"function"==typeof e.console.error&&e.console.error("WP ULike Pro: failed to initialize button",this,t),this&&this.setAttribute&&this.setAttribute("data-ulike-initialized","error")}})})}(window,document),function(e,t){"use strict";const i=()=>"undefined"==typeof UlikeProCommonConfig?null:UlikeProCommonConfig.Engagements||null,n=()=>{if(void 0===t||!t.body)return!1;const i=t.body;if(i.classList.contains("ulp-customizer-preview")||i.classList.contains("elementor-editor-active")||i.classList.contains("block-editor-page"))return!0;try{const t=new URLSearchParams(e.location.search||"");if(t.has("preview")||t.has("customize_changeset_uuid")||t.has("elementor-preview"))return!0}catch(e){}return!("undefined"==typeof UlikeProCommonConfig||!UlikeProCommonConfig.AjaxUrl||!/[?&]preview=/.test(UlikeProCommonConfig.AjaxUrl))||void 0!==e.wp&&!!e.wp.customize},s=(e,i)=>{"undefined"!=typeof WordpressUlikeNotifications&&i&&new WordpressUlikeNotifications(t.body,{messageType:e,messageText:i})},o=()=>{const e=i();return e&&e.i18n||{}},r=(e,...t)=>{if(!e)return t.join(" ");let i=e;return t.forEach((e,t)=>{const n=String(t+1),s=String(e);i=i.replace("%"+n+"$s",s).replace("%"+n+"$d",s)}
1),t.forEach(e=>{i=i.replace("%s",String(e))}),i},a=e=>Array.from(e.querySelectorAll(".ulp-engagement-reaction")),l=(e,t)=>{const i=a(e);if(!i.length)return;let n=t?i.findIndex(e=>e.getAttribute("data-ulp-engagement-key")===t):-1;n<0&&(n=i.findIndex(e=>e.classList.contains("is-active"))),n<0&&(n=0),i.forEach((e,t)=>{e.tabIndex=t===n?0:-1})},u=e=>Array.from(e.querySelectorAll(".ulp-engagement-star")),c=e=>{const t=e.querySelector(".ulp-engagement-stars");t&&t.classList.remove("is-previewing"),u(e).forEach(e=>{e.classList.remove("is-preview","is-focus")})},d=(e,t)=>{const i=e.querySelector(".ulp-engagement-stars"),n=Number(t)||0;i&&i.classList.toggle("is-previewing",n>0),u(e).forEach(e=>{const t=Number(e.getAttribute("data-ulp-engagement-value"))||0;e.classList.toggle("is-preview",n>0&&t<=n),e.classList.toggle("is-focus",n>0&&t===n)})},p=e=>{if(!e)return;const t=e.querySelector("[data-ulp-engagers-popover-trigger]");if(!t)return;const i=t.querySelector("[data-tooltip-content]");i&&(i.innerHTML="",i.removeAttribute("data-tooltip-state")),delete t.dataset.ulpPopoverBound},m=(e,d)=>{if(n())return;const m=i();if(!m||!m.enabled)return;if(e.classList.contains("ulp-is-loading"))return;e.classList.add("ulp-is-loading");const h=new FormData;h.append("action",m.action||"wp_ulike_pro_engagement_process"),Object.keys(d).forEach(e=>{void 0!==d[e]&&null!==d[e]&&h.append(e,d[e])});const g="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.AjaxUrl?UlikeProCommonConfig.AjaxUrl:"/wp-admin/admin-ajax.php";fetch(g,{method:"POST",body:h}).then(e=>e.json()).then(i=>{if(e.classList.remove("ulp-is-loading"),!i.success){const e=i.data&&i.data.message?i.data.message:"Error";return void s("error",e)}const n=i.data||{};n.data&&("emoji"===n.data.kind&&((e,t)=>{if(!t)return;const i="1"===e.getAttribute("data-ulp-hide-zero"),n=o(),s=t.counts&&"object"==typeof t.counts;if(s){e.querySelectorAll("[data-ulp-count-key]").forEach(e=>{const i=e.getAttribute("data-ulp-count-key");if(i&&Object.prototype.hasOwnProperty.call(t.counts,i)){const n=Number(t.counts[i])||0;e.textContent=t.formatted_counts&&Object.prototype.hasOwnProperty.call(t.formatted_counts,i)?t.formatted_counts[i]:String(n),e.classList.toggle("is-zero",0===n)}});const n=void 0!==t.total?Number(t.total)||0:null;e.querySelectorAll("[data-ulp-engagement-total]").forEach(e=>{null!==n&&(e.textContent=void 0!==t.formatted_total?t.formatted_total:String(n),i&&e.classList.toggle("is-zero",0===n))})}const u=e.querySelector(".ulp-engagement-trigger"),c=e.querySelector(".ulp-engagement-trigger-icon");let d="";if(u&&c){const i=c.getAttribute("data-ulp-default-emoji")||"\ud83d\ude0a";let s=i;if(t.active){const n=e.querySelector('.ulp-engagement-reaction[data-ulp-engagement-key="'+t.active+'"]'),o=n?n.querySelector(".ulp-engagement-emoji"):null;o&&(s=o.textContent.trim()||i),d=n&&n.getAttribute("data-ulp-reaction-label")||""}c.textContent=s,u.classList.toggle("is-reacted",!!t.active),u.setAttribute("aria-label",t.active&&d?r(n.reactedWith||"You reacted with %s",d):n.addReaction||"Add")}a(e).forEach(e=>{const i=e.getAttribute("data-ulp-engagement-key"),o=e.getAttribute("data-ulp-reaction-label")||"",a=!(!t.active||t.active!==i);if(e.classList.toggle("is-active",a),e.setAttribute("aria-pressed",a?"true":"false"),o){if(s&&i&&Object.prototype.hasOwnProperty.call(t.counts,i)){const s=Number(t.counts[i])||0,a=t.formatted_counts&&Object.prototype.hasOwnProperty.call(t.formatted_counts,i)?t.formatted_counts[i]:String(s);return void e.setAttribute("aria-label",s>0?r(n.reactionCount||"%1$s, %2$s reactions",o,a):o)}e.setAttribute("aria-label",o)}}),l(e,t.active||"")})(e,n.data),"star"===n.data.kind&&((e,t)=>{if(!t)return;if(c(e),((e,t)=>{const i=Number(t)||0,n=i>0?i:1;e.setAttribute("data-ulp-user-value",String(i)),u(e).forEach(e=>{const t=Number(e.getAttribute("data-ulp-engagement-value"))||0;e.classList.toggle("is-active",i>=t),e.setAttribute("aria-checked",i>0&&t===i?"true":"false"),e.tabIndex=t===n?0:-1});const s=e.querySelector("[data-ulp-star-live]");if(!s)return;const a=Number(e.getAttribute("data-ulp-star-max"))||5,l=o();s.textContent=i>0?r(l.ratingStatus||"Your rating: %1$d of %2$d",i,a):l.noRating||"No rating"}
1)(e,Number(t.user)||0),"1"!==e.getAttribute("data-ulp-show-counters"))return;const i=e.querySelector("[data-ulp-engagement-average]");i&&void 0!==t.average&&(i.textContent=void 0!==t.formatted_average?t.formatted_average:Number(t.average).toFixed(1));const n=void 0!==t.count?Number(t.count)||0:null,s=e.querySelector("[data-ulp-engagement-rating-count]");!s||void 0===t.formatted_count&&null===n||(s.textContent="("+(void 0!==t.formatted_count?t.formatted_count:String(n))+")");const a=e.querySelector("[data-ulp-rating-summary]");if(a&&null!==n){const t="1"===e.getAttribute("data-ulp-hide-zero")&&0===n;a.classList.toggle("is-zero",t),a.toggleAttribute("aria-hidden",t)}})(e,n.data)),n.hasToast&&n.message&&s(n.messageType||"success",n.message),n.requireLogin&&"undefined"!=typeof WordpressUlikeProModal&&WordpressUlikeProModal.open(),p(e),(e=>{if(!e)return Promise.resolve();if("popover"===e.getAttribute("data-ulp-likers-style"))return p(e),Promise.resolve();const i=e.getAttribute("data-ulp-engagers-url");i?fetch(i,{credentials:"same-origin"}).then(e=>e.text()).then(i=>{const n=e.querySelector(".ulp-engagement-engagers"),s=(i||"").trim();if(!s)return void(n&&n.remove());const o=t.createElement("div");o.innerHTML=s;const r=o.firstElementChild;r&&(n?n.replaceWith(r):e.appendChild(r))}).catch(()=>{}):Promise.resolve()})(e)}).catch(()=>{e.classList.remove("ulp-is-loading"),"undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.ajax_error&&s("error",UlikeProCommonConfig.ajax_error)})},h=()=>"function"!=typeof e.matchMedia||e.matchMedia("(hover: hover) and (pointer: fine)").matches,g=(e,t={})=>{if(!e)return;e.classList.remove("ulp-picker-open"),t.dismiss&&e.classList.add("ulp-picker-dismissed");const i=e.querySelector(".ulp-engagement-trigger");i&&i.setAttribute("aria-expanded","false")},f=i=>{if(!i||"1"===i.dataset.ulpEngagementBound)return;i.dataset.ulpEngagementBound="1";const s=i.getAttribute("data-ulp-engagement-kind"),o=i.getAttribute("data-ulp-engagement-id"),r=i.getAttribute("data-ulp-engagement-type"),a=i.getAttribute("data-ulp-engagement-nonce"),p=i.getAttribute("data-ulp-engagement-template"),f=i.getAttribute("data-ulp-picker-style"),v={id:o,type:r,nonce:a,engagement_kind:s};p&&(v.engagement_template=p),f&&(v.engagement_picker_style=f),"emoji"===s&&((e,i)=>{const n=e.getAttribute("data-ulp-picker-style")||"hover",s=t=>g(e,{dismiss:!!t}),o=()=>(e=>{if(!e)return;t.querySelectorAll(".wpulike-engagements-emoji.ulp-picker-open").forEach(t=>{t!==e&&g(t)}),e.classList.remove("ulp-picker-dismissed"),e.classList.add("ulp-picker-open");const i=e.querySelector(".ulp-engagement-trigger");i&&i.setAttribute("aria-expanded","true")})(e),r=()=>{e.querySelectorAll(".ulp-engagement-reaction").forEach(t=>{t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),"hover"===n&&s(!0),m(e,{...i,engagement_key:t.getAttribute("data-ulp-engagement-key")})})}),(e=>{const i=e.querySelectorAll(".ulp-engagement-reactions");if(!i.length)return;const n=e.querySelector(".ulp-engagement-reaction.is-active");l(e,n?n.getAttribute("data-ulp-engagement-key"):""),i.forEach(e=>{e.addEventListener("keydown",i=>{const n=Array.from(e.querySelectorAll(".ulp-engagement-reaction")),s=n.indexOf(t.activeElement);if(s<0)return;let o=s;if("ArrowRight"===i.key||"ArrowDown"===i.key)o=Math.min(s+1,n.length-1);else if("ArrowLeft"===i.key||"ArrowUp"===i.key)o=Math.max(s-1,0);else if("Home"===i.key)o=0;else{if("End"!==i.key)return;o=n.length-1}o!==s&&(i.preventDefault(),n.forEach((e,t)=>{e.tabIndex=t===o?0:-1}),n[o].focus())})})})(e)};if("inline"===n)return void r();const a=e.querySelector(".ulp-engagement-anchor"),u=e.querySelector(".ulp-engagement-trigger");if(u){const t=450,n=10;let r=null,a=null,l=!1,c=0,d=0;const p=()=>{r&&(clearTimeout(r),r=null)},g=()=>{l=!0,clearTimeout(a),a=setTimeout(()=>{l=!1,a=null},400)},f=()=>!!l&&(l=!1,clearTimeout(a),a=null,!0);u.addEventListener("pointerdown",e=>{h()||"number"==typeof e.button&&0!==e.button||(f(),c=e.clientX,d=e.clientY,p(),r=setTimeout(()=>{r=null,g(),o(),"undefined"!=typeof navigator&&"function"==typeof navigator.vibrate&&navigator.vibrate(12)},t))}),u.addEventListener("pointermove",e=>
1{r&&!h()&&(Math.abs(e.clientX-c)>n||Math.abs(e.clientY-d)>n)&&p()}),u.addEventListener("pointerup",p),u.addEventListener("pointercancel",p),u.addEventListener("lostpointercapture",p),u.addEventListener("contextmenu",e=>{h()||e.preventDefault()}),u.addEventListener("click",t=>{if(t.preventDefault(),t.stopPropagation(),!h()&&f())return;s(!0);const n=(()=>{const t=e.querySelector(".ulp-engagement-reaction.is-active");if(t)return t.getAttribute("data-ulp-engagement-key");const i=e.querySelector(".ulp-engagement-reaction");return i?i.getAttribute("data-ulp-engagement-key"):null})();n&&m(e,{...i,engagement_key:n})})}if(a){let t=null;const i=()=>{h()&&(clearTimeout(t),t=setTimeout(()=>{s(),e.classList.remove("ulp-picker-dismissed")},180))},n=()=>{h()&&(clearTimeout(t),o())};a.addEventListener("mouseenter",n),a.addEventListener("mouseleave",i),a.addEventListener("focusin",n),a.addEventListener("focusout",i)}r()})(i,v),"star"===s&&((i,n)=>{const s=i.querySelector(".ulp-engagement-stars"),o=u(i);if(!s||!o.length)return;let r=0;const a=t=>{("function"==typeof e.matchMedia&&e.matchMedia("(hover: hover) and (pointer: fine)").matches||t.matches(":focus-visible"))&&d(i,t.getAttribute("data-ulp-engagement-value"))};o.forEach(t=>{t.addEventListener("pointerenter",e=>{"touch"!==e.pointerType&&a(t)}),t.addEventListener("focus",()=>a(t)),t.addEventListener("click",s=>{s.preventDefault(),(t=>{c(i),r&&e.clearTimeout(r),t.classList.add("is-commit"),r=e.setTimeout(()=>{t.classList.remove("is-commit"),r=0},420),m(i,{...n,engagement_key:"overall",value:t.getAttribute("data-ulp-engagement-value")})})(t)})}),s.addEventListener("keydown",e=>{const i=o.indexOf(t.activeElement);if(i<0)return;let n=i;if("ArrowRight"===e.key||"ArrowUp"===e.key)n=Math.min(i+1,o.length-1);else if("ArrowLeft"===e.key||"ArrowDown"===e.key)n=Math.max(i-1,0);else if("Home"===e.key)n=0;else{if("End"!==e.key)return;n=o.length-1}n!==i&&(e.preventDefault(),o.forEach((e,t)=>{e.tabIndex=t===n?0:-1}),o[n].focus())}),s.addEventListener("pointerleave",e=>{if("touch"===e.pointerType)return;const n=t.activeElement;n&&s.contains(n)&&n.matches&&n.matches(".ulp-engagement-star:focus-visible")?d(i,n.getAttribute("data-ulp-engagement-value")):c(i)}),s.addEventListener("focusout",e=>{s.contains(e.relatedTarget)||c(i)})})(i,v),(t=>{if(n())return;if(!t||"1"===t.getAttribute("data-ulp-view-tracked"))return;const i=t.getAttribute("data-ulp-engagement-id"),s=t.getAttribute("data-ulp-engagement-type");if(!i||!s)return;const o="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.ViewTracking?UlikeProCommonConfig.ViewTracking:null;if(!o||!Array.isArray(o.enabledTypes)||!o.enabledTypes.includes(s))return;
1const r=e.WP_Ulike_ViewTracking;if(!r||"function"!=typeof r.queueView)return;if(r.isTracked(i,s))return void t.setAttribute("data-ulp-view-tracked","1");const a="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.AjaxUrl?UlikeProCommonConfig.AjaxUrl:"",l="undefined"!=typeof UlikeProCommonConfig&&UlikeProCommonConfig.Nonce?UlikeProCommonConfig.Nonce:"";if(!a||!l)return;const u=()=>{n()||(r.queueView(i,s,a,l),t.setAttribute("data-ulp-view-tracked","1"))};if("IntersectionObserver"in e){const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>0&&(u(),e.disconnect())})},{threshold:.5,rootMargin:"0px"});return void e.observe(t)}u()})(i),(t=>{if(!t||"popover"!==t.getAttribute("data-ulp-likers-style"))return;if("undefined"==typeof WordpressUlikeTooltipPlugin)return;const i=(e=>e?e.querySelector("[data-ulp-engagers-popover-trigger]"):null)(t);if(!i||"1"===i.dataset.ulpPopoverBound)return;i.dataset.ulpPopoverBound="1";const n=t.getAttribute("data-ulp-engagement-id"),s=`engagement-${t.getAttribute("data-ulp-engagement-type")}-${n}-engagers`,o=t.getAttribute("data-ulp-engagers-popover-url");e.WordpressUlikeTooltip&&"function"==typeof e.WordpressUlikeTooltip.getInstanceByElement&&e.WordpressUlikeTooltip.getInstanceByElement(i)||new WordpressUlikeTooltipPlugin(i,{id:s,position:"bottom",theme:"white",size:"tiny",trigger:"hover",dataFetcher:()=>{o&&fetch(o,{credentials:"same-origin"}).then(e=>e.json()).then(e=>{const t=e&&e.success&&e.data&&e.data.template?e.data.template:"";i.dispatchEvent(new CustomEvent("tooltip-content-updated",{bubbles:!0,detail:{element:i,
1content:t}}))}).catch(()=>{i.dispatchEvent(new CustomEvent("tooltip-content-updated",{bubbles:!0,detail:{element:i,content:""}}))})}})})(i)},v=e=>{(e&&e.querySelectorAll?e:t).querySelectorAll(".wpulike-engagements").forEach(f)};t.addEventListener("DOMContentLoaded",()=>v(t)),t.addEventListener("pointerdown",e=>{h()||t.querySelectorAll(".wpulike-engagements-emoji.ulp-picker-open").forEach(t=>{const i=t.querySelector(".ulp-engagement-anchor");i&&i.contains(e.target)||g(t)})},!0),t.addEventListener("keydown",e=>{"Escape"===e.key&&t.querySelectorAll(".wpulike-engagements-emoji.ulp-picker-open").forEach(e=>{g(e,{dismiss:!0})})}),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{1===e.nodeType&&(e.matches&&e.matches(".wpulike-engagements")&&f(e),e.querySelectorAll&&v(e))})})}).observe(t.documentElement,{childList:!0,subtree:!0}),e.WP_Ulike_Pro_Engagements={init:v}}(window,document),function(e,t,i){"use strict";const n=(e,t)=>{const n=t.replace(/-([a-z])/g,e=>e[1].toUpperCase());if(e.dataset&&e.dataset[n]!==i)return e.dataset[n];const s=e.getAttribute(`data-${t}`);return null===s?i:"true"===s||"false"!==s&&(""===s||"null"===s?null:isNaN(s)||""===s?s:Number(s))},s=e=>{!e||e.length!==i&&0===e.length||(e.length!==i?Array.from(e):[e]).forEach(e=>{e&&1===e.nodeType&&"undefined"!=typeof WordpressUlikeAjaxForms&&"function"==typeof WordpressUlikeAjaxForms&&new WordpressUlikeAjaxForms(e)})},o=t=>{!t||t.length!==i&&0===t.length||(t.length!==i?Array.from(t):[t]).forEach(t=>{if(t&&1===t.nodeType){if(t.hasAttribute&&t.hasAttribute("data-ulike-initialized"))return;if("undefined"!=typeof WordpressUlike&&"function"==typeof WordpressUlike)try{new WordpressUlike(t)}catch(i){e.console&&"function"==typeof e.console.error&&e.console.error("WP ULike Pro: failed to initialize button",t,i)}t.setAttribute&&t.setAttribute("data-ulike-initialized","true")}})},r=new WeakSet;function a(e){const i=e||t,n=i.querySelector?i.querySelector("#ulp-2fa-code"):"ulp-2fa-code"===i.id?i:null;n?r.has(n)||l(n):t.querySelectorAll("#ulp-2fa-code").forEach(e=>{r.has(e)||l(e)})}function l(t){const i=Array.from(t.querySelectorAll("input.ulp-digit-input"));if(!i||0===i.length)return;r.add(t);const n=()=>{t.classList.remove("ulp-otp-error"),i.forEach(e=>e.classList.remove("ulp-digit-error"))};t.addEventListener("paste",s=>{s.preventDefault(),n();const o=(s.clipboardData||e.clipboardData).getData("text").trim().replace(/\D/g,"").slice(0,i.length);if(t.classList.add("ulp-otp-pasting"),setTimeout(()=>t.classList.remove("ulp-otp-pasting"),300),o.split("").forEach((e,t)=>{i[t]&&(i[t].value=e,i[t].classList.add("ulp-digit-filled"))}),o.length===i.length){const e=i[i.length-1];e&&(e.blur(),t.classList.add("ulp-otp-complete"),setTimeout(()=>{const t=e.closest("form");t&&t.requestSubmit()},400))}else{const e=Math.min(o.length,i.length-1);i[e]&&i[e].focus()}}
1),i.forEach((e,s)=>{const o=()=>{e.value?e.classList.add("ulp-digit-filled"):e.classList.remove("ulp-digit-filled")};e.addEventListener("keydown",r=>{if("Backspace"===r.key)return t.classList.remove("ulp-otp-complete"),n(),e.value?(e.value="",o()):s>0&&(i[s-1].focus(),i[s-1].value="",o()),void r.preventDefault();if("ArrowLeft"===r.key&&s>0)return i[s-1].focus(),void r.preventDefault();if("ArrowRight"===r.key&&s<i.length-1)return i[s+1].focus(),void r.preventDefault();if("Delete"===r.key)return e.value="",o(),void r.preventDefault();if("Enter"!==r.key)/^[0-9]$/.test(r.key)?(n(),e.value=r.key,o(),s<i.length-1?i[s+1].focus():(e.blur(),t.classList.add("ulp-otp-complete"),i.every(e=>e.value)&&setTimeout(()=>{const t=e.closest("form");t&&t.requestSubmit()},400)),r.preventDefault()):/^(Backspace|Delete|ArrowLeft|ArrowRight|Tab|Enter)$/.test(r.key)||r.ctrlKey||r.metaKey||r.preventDefault();else{if(i.every(e=>e.value)){const t=e.closest("form");t&&t.requestSubmit()}r.preventDefault()}}),e.addEventListener("input",t=>{n();const r=t.target.value;if(r.length>1){const t=r.slice(-1);e.value=/^[0-9]$/.test(t)?t:""}else r&&!/^[0-9]$/.test(r)&&(e.value="");o(),e.value&&s<i.length-1&&i[s+1].focus()}),e.addEventListener("focus",()=>{e.select(),e.classList.add("ulp-digit-focused"),t.classList.remove("ulp-otp-complete"),n()}),e.addEventListener("blur",()=>{e.classList.remove("ulp-digit-focused")}),o()}),i.every(e=>!e.value)&&i[0]&&setTimeout(()=>{i[0].focus()},100)}function u(n,s,o){const r=t.querySelector(n);if(!r)return;const a=e.MutationObserver||e.WebKitMutationObserver;a&&new a(e=>{e.forEach(e=>{e.addedNodes.length&&((e,t)=>{const n=[],s=e.length!==i?e:[e];for(let e=0;e<s.length;e++){const i=s[e];if(1===i.nodeType){i.matches&&i.matches(t)&&n.push(i);const e=i.querySelectorAll?i.querySelectorAll(t):[];for(let t=0;t<e.length;t++)n.push(e[t])}}return n})(e.addedNodes,s).forEach(e=>{o(e)})})}).observe(r,{childList:!0,subtree:!0})}const c=()=>{const i=t.querySelectorAll(".ulp-ajax-form");s(i),void 0!==e._goodshare&&e._goodshare.reNewAllInstance&&e._goodshare.reNewAllInstance();const n=t.querySelectorAll(".wpulike");o(n),a()};"loading"===t.readyState?t.addEventListener("DOMContentLoaded",c):c(),u("body",".wpulike",function(e){o(e)}),u("body",".ulp-social-wrapper",function(t){void 0!==e._goodshare&&e._goodshare.reNewAllInstance&&e._goodshare.reNewAllInstance()}),u("body",".ulp-ajax-form",function(e){s(e),a(e)}),t.addEventListener("UlpAjaxFormEnded",e=>{const t=e.detail?.[1];if(!t||t.success)return;const i=t.data?.message?.toLowerCase()||"";if(!["otp","one-time password","tfa","two factor","verification code","incorrect"].some(e=>i.includes(e)))return;const n=e.detail?.[0];n&&n.querySelectorAll("#ulp-2fa-code").forEach(e=>{e.classList.remove("ulp-otp-complete"),e.classList.add("ulp-otp-error"),e.querySelectorAll("input.ulp-digit-input").forEach(e=>{e.classList.add("ulp-digit-error"),e.classList.remove("ulp-digit-filled","ulp-digit-success")})})}),u("body",".ulp-recaptcha-field",function(e){((e,t,i)=>{const n=new CustomEvent("UlpRecaptchaReload",{bubbles:!0,cancelable:!0,detail:i});e.dispatchEvent(n)})(t,0,e)}),u("body","#ulp-2fa-code",function(e){a(e)}),t.addEventListener("click",e=>{const i=e.target.closest(".ulp-2fa-remove");if(i&&(e.preventDefault(),confirm("Are you sure you want to make this change?"))){const e=i.closest(".ulp-2fa-item"),s=n(i,"nonce"),o=n(i,"key"),r=new FormData;r.append("action","ulp_two_factor_remove"),r.append("nonce",s),r.append("key",o),fetch(UlikeProCommonConfig.AjaxUrl,{method:"POST",body:r}).then(e=>e.json()).then(i=>{var n;i.success&&e&&(n=e)&&(n.style.transition="opacity 300ms",n.style.opacity="0",setTimeout(()=>{n.style.display="none"},300)),"undefined"!=typeof WordpressUlikeNotifications&&new WordpressUlikeNotifications(t.body,{messageType:i.data.status,messageText:i.data.message})}).catch(e=>{})}}),t.addEventListener("click",e=>{const i=e.target.closest("a[data-form-toggle]");if(!i)return;e.preventDefault();const o=i.closest(".ulp-ajax-form");if(!o)return;const r=o.querySelector("form");if(!r)return;r.classList.add("ulp-loading");const l=n(i,"form-toggle"),u=new FormData;u.append("action","ulp_forms_toggle"),u.append("request",l),fetch(UlikeProCommonConfig.AjaxUrl,{method:"POST",body:u}).then(e=>e.json()).then(e=>{if(r.classList.remove("ulp-loading"),e.success){const i=t.createElement("div");i.innerHTML=e.data.content;const n=i.firstElementChild;n&&(s(n),o.parentNode&&o.parentNode.replaceChild(n,o),setTimeout(()=>{a(n)},50))}else"undefined"!=typeof WordpressUlikeNotifications&&new WordpressUlikeNotifications(t.body,{messageType:e.data.status,messageText:e.data.message})}).catch(e=>{r.classList.remove("ulp-loading")})}),e.ulpOtpInput=a}(window,document);
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.