first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
/**
|
||||
* This file is generated by Webpack, do not edit it directly.
|
||||
*/
|
||||
return [
|
||||
'handle' => 'elementor-v2-utils',
|
||||
'deps' => [
|
||||
'react',
|
||||
],
|
||||
];
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,87 @@
|
||||
/*! ./create-error */
|
||||
|
||||
/*! ./debounce */
|
||||
|
||||
/*! ./elementor-error */
|
||||
|
||||
/*! ./encoding */
|
||||
|
||||
/*! ./ensure-error */
|
||||
|
||||
/*! ./errors */
|
||||
|
||||
/*! ./generate-unique-id */
|
||||
|
||||
/*! ./hash */
|
||||
|
||||
/*! ./string-helpers */
|
||||
|
||||
/*! ./throttle */
|
||||
|
||||
/*! ./use-debounce-state */
|
||||
|
||||
/*! ./use-search-state */
|
||||
|
||||
/*! ./version */
|
||||
|
||||
/*! react */
|
||||
|
||||
/*!**************************!*\
|
||||
!*** external ["React"] ***!
|
||||
\**************************/
|
||||
|
||||
/*!**************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/hash.ts ***!
|
||||
\**************************************************/
|
||||
|
||||
/*!***************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/index.ts ***!
|
||||
\***************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/version.ts ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/debounce.ts ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/encoding.ts ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/throttle.ts ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!**********************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/errors/index.ts ***!
|
||||
\**********************************************************/
|
||||
|
||||
/*!************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/string-helpers.ts ***!
|
||||
\************************************************************/
|
||||
|
||||
/*!**************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/use-search-state.ts ***!
|
||||
\**************************************************************/
|
||||
|
||||
/*!****************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/generate-unique-id.ts ***!
|
||||
\****************************************************************/
|
||||
|
||||
/*!****************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/use-debounce-state.ts ***!
|
||||
\****************************************************************/
|
||||
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/errors/create-error.ts ***!
|
||||
\*****************************************************************/
|
||||
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/errors/ensure-error.ts ***!
|
||||
\*****************************************************************/
|
||||
|
||||
/*!********************************************************************!*\
|
||||
!*** ./packages/packages/libs/utils/src/errors/elementor-error.ts ***!
|
||||
\********************************************************************/
|
||||
1
wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
vendored
Normal file
1
wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e={d:function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{ElementorError:function(){return t},capitalize:function(){return h},compareVersions:function(){return m},createError:function(){return r},debounce:function(){return c},decodeString:function(){return s},encodeString:function(){return l},ensureError:function(){return o},generateUniqueId:function(){return g},hash:function(){return f},isVersionGreaterOrEqual:function(){return y},isVersionLessThan:function(){return p},throttle:function(){return a},useDebounceState:function(){return i},useSearchState:function(){return d}});class t extends Error{constructor(e,{code:n,context:t=null,cause:r=null}){super(e,{cause:r}),this.context=t,this.code=n}}const r=({code:e,message:n})=>class extends t{constructor({cause:t,context:r}={}){super(n,{cause:t,code:e,context:r})}},o=e=>{if(e instanceof Error)return e;let n,t=null;try{n=JSON.stringify(e)}catch(e){t=e,n="Unable to stringify the thrown value"}return new Error(`Unexpected non-error thrown: ${n}`,{cause:t})};var u=window.React;function c(e,n){let t=null;const r=()=>{t&&(clearTimeout(t),t=null)},o=(...o)=>{r(),t=setTimeout(()=>{e(...o),t=null},n)};return o.flush=(...n)=>{r(),e(...n)},o.cancel=r,o.pending=()=>!!t,o}function i(e={}){const{delay:n=300,initialValue:t=""}=e,[r,o]=(0,u.useState)(t),[i,a]=(0,u.useState)(t),l=(0,u.useRef)(null);(0,u.useEffect)(()=>()=>{l.current?.cancel?.()},[]);const s=(0,u.useCallback)(e=>{l.current?.cancel?.(),l.current=c(()=>{o(e)},n),l.current()},[n]);return{debouncedValue:r,inputValue:i,handleChange:e=>{a(e),s(e)},setInputValue:a}}function a(e,n,t=!1){let r=null,o=!1;const u=()=>{r&&(clearTimeout(r),r=null)},c=(...u)=>{r?o=!0:(e(...u),r=setTimeout(()=>{r=null,o&&t&&e(...u),o=!1},n))};return c.flush=(...n)=>{u(),e(...n)},c.cancel=u,c.pending=()=>!!r,c}const l=e=>{const n=Array.from((new TextEncoder).encode(e),e=>String.fromCharCode(e)).join("");return btoa(n)},s=(e,n)=>{try{const n=atob(e),t=new Uint8Array(Array.from(n,e=>e.charCodeAt(0)));return(new TextDecoder).decode(t)}catch{return void 0!==n?n:""}};function f(e){return JSON.stringify(e,(e,n)=>function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}(n)?Object.keys(n).sort().reduce((e,t)=>(e[t]=n[t],e),{}):n)}function d({localStorageKey:e}){const{debouncedValue:n,inputValue:t,handleChange:r}=i({delay:300,initialValue:(()=>{if(e){const n=localStorage.getItem(e);if(n)return localStorage.removeItem(e),n}return""})()});return{debouncedValue:n,inputValue:t,handleChange:r}}function g(e=""){return`${e?`${e}-`:""}${Date.now()}-${Math.random().toString(36).substring(2,9)}`}const h=e=>e.charAt(0).toUpperCase()+e.slice(1),m=(e,n)=>{const t=String(e||"0.0.0").split(".").map(Number),r=String(n||"0.0.0").split(".").map(Number);for(let e=0;e<Math.max(t.length,r.length);e++){const n=t[e]||0,o=r[e]||0;if(n!==o)return n-o}return 0},p=(e,n)=>m(e,n)<0,y=(e,n)=>m(e,n)>=0;(window.elementorV2=window.elementorV2||{}).utils=n}(),window.elementorV2.utils?.init?.();
|
||||
Reference in New Issue
Block a user