File: /home/xluilhul/public_html/wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
!function(){"use strict";var e={52927:function(e,t,r){var n,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(s,{ElementorError:()=>i,capitalize:()=>capitalize,compareVersions:()=>compareVersions,createError:()=>createError,createTranslate:()=>createTranslate,debounce:()=>debounce,decodeString:()=>decodeString,encodeString:()=>encodeString,ensureError:()=>ensureError,generateUniqueId:()=>generateUniqueId,hasProInstalled:()=>hasProInstalled,hash:()=>hash,hashString:()=>hashString,isProActive:()=>isProActive,isProAtLeast:()=>isProAtLeast,isVersionGreaterOrEqual:()=>isVersionGreaterOrEqual,isVersionLessThan:()=>isVersionLessThan,throttle:()=>throttle,useDebounceState:()=>useDebounceState,useDebouncedCallback:()=>useDebouncedCallback,useSearchState:()=>useSearchState}),e.exports=(n=s,((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of u(t))c.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e})(o({},"__esModule",{value:!0}),n));var i=class extends Error{context;code;constructor(e,{code:t,context:r=null,cause:n=null}){super(e,{cause:n}),this.context=r,this.code=t}},createError=({code:e,message:t})=>class extends i{constructor({cause:r,context:n}={}){super(t,{cause:r,code:e,context:n})}},ensureError=e=>{if(e instanceof Error)return e;let t,r=null;try{t=JSON.stringify(e)}catch(e){r=e,t="Unable to stringify the thrown value"}return new Error(`Unexpected non-error thrown: ${t}`,{cause:r})},l=r(97557);function debounce(e,t){let r=null;const cancel=()=>{r&&(clearTimeout(r),r=null)},run=(...n)=>{cancel(),r=setTimeout(()=>{e(...n),r=null},t)};return run.flush=(...t)=>{cancel(),e(...t)},run.cancel=cancel,run.pending=()=>!!r,run}function useDebounceState(e={}){const{delay:t=300,initialValue:r=""}=e,[n,o]=(0,l.useState)(r),[a,u]=(0,l.useState)(r),c=(0,l.useRef)(null);(0,l.useEffect)(()=>()=>{c.current?.cancel?.()},[]);const s=(0,l.useCallback)(e=>{c.current?.cancel?.(),c.current=debounce(()=>{o(e)},t),c.current()},[t]);return{debouncedValue:n,inputValue:a,handleChange:e=>{u(e),s(e)},setInputValue:u}}var d=r(97557);function useDebouncedCallback(e,t){const r=(0,d.useRef)(e);(0,d.useEffect)(()=>{r.current=e},[e]);const n=(0,d.useMemo)(()=>debounce((...e)=>r.current(...e),t),[t]);return(0,d.useEffect)(()=>()=>{n.cancel()},[n]),n}function throttle(e,t,r=!1){let n=null,o=!1;const cancel=()=>{n&&(clearTimeout(n),n=null)},run=(...a)=>{n?o=!0:(e(...a),n=setTimeout(()=>{n=null,o&&r&&e(...a),o=!1},t))};return run.flush=(...t)=>{cancel(),e(...t)},run.cancel=cancel,run.pending=()=>!!n,run}var encodeString=e=>{const t=Array.from((new TextEncoder).encode(e),e=>String.fromCharCode(e)).join("");return btoa(t)},decodeString=(e,t)=>{try{const t=atob(e),r=new Uint8Array(Array.from(t,e=>e.charCodeAt(0)));return(new TextDecoder).decode(r)}catch{return void 0!==t?t:""}};function hash(e){return JSON.stringify(e,(e,t)=>function isPlainObject(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function hashString(e,t){let r=5381,n=e.length;for(;n;)r=33*r^e.charCodeAt(--n);const o=(r>>>0).toString(36);if(void 0===t)return o;return o.slice(-t).padStart(t,"0")}function useSearchState({localStorageKey:e}){const{debouncedValue:t,inputValue:r,handleChange:n}=useDebounceState({delay:300,initialValue:(()=>{if(e){const t=localStorage.getItem(e);if(t)return localStorage.removeItem(e),t}return""})()});return{debouncedValue:t,inputValue:r,handleChange:n}}function generateUniqueId(e=""){return`${e?`${e}-`:""}${Date.now()}-${Math.random().toString(36).substring(2,9)}`}var capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1),compareVersions=(e,t)=>{const r=String(e||"0.0.0").split(".").map(Number),n=String(t||"0.0.0").split(".").map(Number);for(let e=0;e<Math.max(r.length,n.length);e++){const t=r[e]||0,o=n[e]||0;if(t!==o)return t-o}return 0},isVersionLessThan=(e,t)=>compareVersions(e,t)<0,isVersionGreaterOrEqual=(e,t)=>compareVersions(e,t)>=0;function hasProInstalled(){return window.elementor?.helpers?.hasPro?.()??!1}function isProActive(){return!!hasProInstalled()&&(window.elementorPro?.config?.isActive??!1)}function isProAtLeast(e){const t=function getProVersion(){return window.elementorPro?.config?.version??"0.0"}();if(!t)return!1;const[r,n]=t.split(".").map(Number),[o,a]=e.split(".").map(Number);return r>o||r===o&&n>=a}function createTranslate({configKey:e,defaultStrings:t={}}){return(r,...n)=>{const o=window.elementorAppConfig,a=o?.[e]?.translations;let u={...t,...a}[r];if(!u)return r;for(let e=0;e<n.length;e++)u=u.replace(`%${e+1}$s`,n[e]),u=u.replace("%s",n[e]);return u}}},97557:function(e){e.exports=window.React}},t={};var r=function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,__webpack_require__),o.exports}(52927);(window.elementorV2=window.elementorV2||{}).utils=r}(),window.elementorV2.utils?.init?.();