uxlib
Version:
A clean and powerful utility library by Subrata
2 lines (1 loc) • 25.1 kB
JavaScript
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).uxlib={})}(this,function(t){"use strict";function n(){const t=["delete","string","currentScript","function","2Ijqsmu","→ [","173703BYXXAp","2300095VctLFm","error","false","location","NODE_ENV","[UXLIB]","object","ULIB_DEBUG","env","isArray","113082ejtSHY","UXLIB_DEBUG","search","6449193cKHbmX","[Circular]","5883432oBPEHZ","log","collapsed","length","groupEnd","undefined","forEach","setItem","getAttribute","debug","2480256vNOmas","get","add","warn","[Function]","true","getItem","[UXLIB Group]","28rXrIVO","5381985nrDMOe","boolean","slice","has"];return(n=function(){return t})()}!function(t){const n=p,e=t();for(;;)try{if(583043===parseInt(n(138))/1*(-parseInt(n(125))/2)+-parseInt(n(127))/3*(-parseInt(n(161))/4)+-parseInt(n(162))/5+-parseInt(n(153))/6+parseInt(n(128))/7+parseInt(n(143))/8+parseInt(n(141))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(n);const e=(()=>{const t=p;if(typeof window!==t(148)){const n=new URLSearchParams(window[t(131)][t(140)]),e=n[t(154)](t(152));return""===e||e===t(158)||null===e&&n.has(t(152))}return!1})(),r=(()=>{const t=p;return typeof localStorage!==t(148)&&"true"===localStorage[t(159)](t(139))})(),o=(()=>{const t=p;if(typeof document!==t(148)){const n=document[t(123)],e=n?.[t(151)]("debug");return""===e||e===t(158)}return!1})(),s=(()=>{const t=p;return typeof process!==t(148)&&"development"===process[t(136)]?.[t(132)]})(),a=(()=>{const t=p;return typeof process!==t(148)&&void 0!==process.env?.[t(139)]&&process[t(136)][t(139)]===t(158)})();function i(t){const n=p;if(typeof window===n(148))return;typeof t===n(163)&&(localStorage[n(150)](n(139),n(t?158:130)),window.ULIB_DEBUG=t);return localStorage[n(159)]("UXLIB_DEBUG")===n(158)||!0===window[n(135)]||e||o}function u(){return i()||a||s||r||e||o||"undefined"!=typeof window&&!0===window.UXLIB_DEBUG}const c=new Set;function l(t){const n=p;try{const e=function(t){const n=new WeakSet;return JSON.stringify(t,function(t,e){const r=p;if(typeof e===r(134)&&null!==e){if(n[r(120)](e))return r(142);n[r(155)](e)}return"function"==typeof e?r(157):e})}(t);return!c[n(120)](e)&&(c[n(155)](e),setTimeout(()=>c[n(121)](e),500),!0)}catch(t){return!0}}function f(...t){setTimeout(()=>{const n=p;if(!u()||typeof l===n(124)&&!l(t))return;const e=t[0];let r=!1,o=n(133),s=t;typeof e===n(134)&&!Array[n(137)](e)&&e?.[n(145)]&&(r=!0,o=typeof t[1]===n(122)?t[1]:n(160),s=t[n(164)](2)),r&&s[n(146)]&&s[n(149)]((t,n)=>{})},0)}function p(t,e){const r=n();return(p=function(t,n){return r[t-=120]})(t,e)}function d(...t){setTimeout(()=>{u()&&l(t)},0)}function m(...t){setTimeout(()=>{u()&&l(t)},0)}var g=Object.freeze({__proto__:null,DEBUG:i,isDev:u,devLog:f,devWarn:d,devError:m});function h(t,n){const e=y();return(h=function(t,n){return e[t-=486]})(t,n)}function y(){const t=["636074TioVEw","location","search","1.0.3","3450672SXXkYm","1827348jSCJtu","readyState","DOMContentLoaded","author","https://subratap.gitlab.io/signature/","text","344985LNdgwd","createElement","addEventListener","1238691ucjZOd","loading","replaceChild","11242294KiQgEW","undefined","body","documentElement","✅ uxlib initialized Version: ","734100qkoIJr"];return(y=function(){return t})()}async function I(){const t=h;if(new URLSearchParams(window[t(501)][t(502)]).has(t(508))){const n=await fetch(t(486)),e=await n[t(487)](),r=document[t(489)](t(496));r.innerHTML=e,document[t(497)][t(493)](r,document.body)}}function w(){const t=["entries","2jsatBX","get","3580108YwoHfH","searchParams","object","9VLXZfL","pushState","trim","10640880TOySwv","27401605bgTXtp","log","en-IN","location","11896728BDDZXy","isArray","set","116273zlyJtP","9028995WFeCJr","toLocaleDateString","search","keys","string","6gIMPOR","just now","test","onLine","303otihAG","href","toString","16112nLwLPc"," ago","floor"];return(w=function(){return t})()}function b(t){const n=v;return t&&typeof t===n(197)&&!Array[n(207)](t)}function v(t,n){const e=w();return(v=function(t,n){return e[t-=175]})(t,n)}!function(t){const n=h,e=t();for(;;)try{if(459141===parseInt(n(499))/1+-parseInt(n(500))/2+parseInt(n(491))/3+parseInt(n(504))/4+parseInt(n(488))/5+parseInt(n(505))/6+-parseInt(n(494))/7)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(y),function(t){const n=v,e=t();for(;;)try{if(943676===-parseInt(n(176))/1*(-parseInt(n(193))/2)+parseInt(n(186))/3*(-parseInt(n(189))/4)+parseInt(n(177))/5+-parseInt(n(182))/6*(parseInt(n(195))/7)+-parseInt(n(206))/8+parseInt(n(198))/9*(-parseInt(n(201))/10)+parseInt(n(202))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(w);var x=Object.freeze({__proto__:null,formatDate:function(t){const n=v;return new Date(t)[n(178)](n(204))},timeAgo:function(t){const n=v,e=Math[n(191)]((new Date-new Date(t))/1e3),r={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60,second:1};for(let[t,o]of Object[n(192)](r)){const r=Math.floor(e/o);if(r>=1)return r+" "+t+(r>1?"s":"")+n(190)}return n(183)},isObject:b,isArray:function(t){return Array[v(207)](t)},isString:function(t){return typeof t===v(181)},isEmpty:function(t){const n=v;return null==t||typeof t===n(181)&&""===t[n(200)]()||Array[n(207)](t)&&0===t.length||b(t)&&0===Object[n(180)](t).length},isMobile:function(){return/Mobi|Android/i[v(184)](navigator.userAgent)},isOnline:function(){return navigator[v(185)]},getQueryParams:function(t){const n=v,e=new URLSearchParams(window[n(205)][n(179)]);return t?e[n(194)](t):Object.fromEntries(e.entries())},updateQueryParam:function(t,n){const e=v,r=new URL(window[e(205)][e(187)]);r[e(196)][e(175)](t,n),window.history[e(199)]({},"",r)},randomId:function(t=6){const n=v;return Math.random()[n(188)](36).substr(2,t)},randomColor:function(){const t=v;return"#"+Math[t(191)](16777215*Math.random())[t(188)](16).padStart(6,"0")}});function E(t){const n=S,e={type:null,value:null,element:null};try{const r="string"==typeof t?t[n(174)]():String(t);if(typeof t===n(163)){const r=t[n(174)]();if(r[n(180)]("#")){const t=document[n(165)](r.slice(1));return e[n(158)]="id",t?(e[n(175)]=t,e[n(161)]=n(161)in t?t[n(161)]:t[n(155)]||t[n(168)]||""):e.value=r,e}if(r[n(180)](".")){const t=document[n(177)](r);return e[n(158)]=n(167),t?(e[n(175)]=t,e[n(161)]=n(161)in t?t[n(161)]:t[n(155)]||t[n(168)]||""):e[n(161)]=r,e}if(/^[a-zA-Z][a-zA-Z0-9-]*$/[n(176)](r))try{const t=document[n(177)](r);if(t)return e.type=n(154),e[n(175)]=t,e[n(161)]="value"in t?t[n(161)]:t.textContent||t[n(155)]||"",e}catch(t){}const o=document[n(177)](r);return e[n(158)]="query",o?(e.element=o,e[n(161)]=n(161)in o?o[n(161)]:o[n(155)]||o.textContent||""):e[n(161)]=r,e}return t instanceof HTMLElement?(e[n(158)]="element",e[n(175)]=t,e[n(161)]="value"in t?t.value:t.innerText||t[n(168)]||"",e):typeof t===n(156)&&null!==t?(e.type="object",e[n(161)]=JSON[n(178)](t,null,2),e):(e[n(158)]=n(160),e[n(161)]=r,e)}catch(t){return{type:n(159),value:t[n(162)],element:null}}}function S(t,n){const e=k();return(S=function(t,n){return e[t-=154]})(t,n)}function k(){const t=["47356300tvXqxq","5PCyNpT","6200956qLjEHn","9795753wlQvPf","trim","element","test","querySelector","stringify","1682592NTnpPn","startsWith","10712QGkYvG","tag","innerText","object","3379296veRgmP","type","error","unknown","value","message","string","3jvcyhK","getElementById","7610478MSHhMD","class","textContent","8057nohtfc"];return(k=function(){return t})()}!function(t){const n=S,e=t();for(;;)try{if(984390===parseInt(n(179))/1+parseInt(n(157))/2+parseInt(n(164))/3*(-parseInt(n(172))/4)+parseInt(n(171))/5*(parseInt(n(166))/6)+parseInt(n(169))/7*(parseInt(n(181))/8)+parseInt(n(173))/9+-parseInt(n(170))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(k);const T=_;function _(t,n){const e=L();return(_=function(t,n){return e[t-=136]})(t,n)}function L(){const t=["134505XEerdP","transitionend","success","getElementById","createElement","891284kscCNM","now","string","2541490ubTtcb","appendChild","div","32480qCLMlJ","remove","fade-out","728877KHVQYm","top-right","__uxlib_toast_css","inverse","classList","error","object","uxlib-toast-inverse","className","⏱️ Duplicate toast skipped:","\n .uxlib-toast-container {\n position: fixed;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding: 1rem;\n pointer-events: none;\n }\n .top-right { top: 1rem; right: 1rem; align-items: flex-end; }\n .top-left { top: 1rem; left: 1rem; align-items: flex-start; }\n .bottom-right { bottom: 1rem; right: 1rem; align-items: flex-end; }\n .bottom-left { bottom: 1rem; left: 1rem; align-items: flex-start; }\n\n .uxlib-toast {\n background: #333;\n color: #fff;\n padding: 0.75rem 1.25rem;\n border-radius: 8px;\n min-width: 200px;\n max-width: 300px;\n box-shadow: 0 4px 10px rgba(0,0,0,0.2);\n font-size: 14px;\n pointer-events: all;\n opacity: 1;\n transition: opacity 0.4s ease, transform 0.4s ease;\n }\n\n .fade-out {\n opacity: 0;\n transform: translateY(-10px);\n }\n\n .uxlib-toast-default { background: #333; }\n .uxlib-toast-success { background: #00c853; }\n .uxlib-toast-error { background: #d50000; }\n .uxlib-toast-warning { background: #ffab00; color: #000; }\n .uxlib-toast-info { background: #2196f3; }\n .uxlib-toast-inverse { background: #fff; color: #333; border: 1px solid #ccc; }\n ","uxlib-toast-warning","addEventListener","innerText","add","uxlib-toast-info","14198968fGufuj","426xmYgsV","✅ Default Toast","default","1583876bvmBYj","❌ Invalid toast config:","head","info","uxlib-toast "];return(L=function(){return t})()}!function(t){const n=_,e=t();for(;;)try{if(476470===-parseInt(n(170))/1+-parseInt(n(165))/2+parseInt(n(145))/3+parseInt(n(136))/4+-parseInt(n(139))/5+-parseInt(n(162))/6*(parseInt(n(142))/7)+parseInt(n(161))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(L);let A=null,j=null,D=0;const O={default:"uxlib-toast-default",success:"uxlib-toast-success",error:"uxlib-toast-error",warning:T(156),info:T(160),inverse:T(152)};function C(t,{duration:n=3e3,position:e=T(146),preset:r=T(164)}={}){const o=T,s=Date[o(137)](),a=t+"-"+r;if(a===j&&s-D<300)return void f(o(154),t);j=a,D=s,function(t){const n=T;if(A)return;if(A=document[n(174)](n(141)),A.className="uxlib-toast-container "+t,document.body[n(140)](A),!document[n(173)](n(147))){const t=document[n(174)]("style");t.id=n(147),t.innerHTML=n(155),document[n(167)][n(140)](t)}}(e);const i=document[o(174)](o(141));i[o(153)]=o(169)+(O[r]||O[o(164)]),i[o(158)]=t,A[o(140)](i),setTimeout(()=>{const t=o;i[t(149)][t(159)](t(144)),i[t(157)](t(171),()=>i[t(143)]())},n),f("🔔 Toast shown:",{message:t,duration:n,position:e,preset:r})}function B(t){const n=T;if(t){if(typeof t===n(138))return C(t);if(typeof t===n(151)){const{message:e,duration:r,position:o,preset:s}=t;return C(e||n(163),{duration:r,position:o,preset:s})}f(n(166),t)}}const P=B;var U=Object.freeze({__proto__:null,toaster:B,showToast:P,toastSuccess:(t,n={})=>C(t,{...n,preset:T(172)}),toastError:(t,n={})=>C(t,{...n,preset:T(150)}),toastWarning:(t,n={})=>C(t,{...n,preset:"warning"}),toastInfo:(t,n={})=>C(t,{...n,preset:T(168)}),toastInverse:(t,n={})=>C(t,{...n,preset:T(148)}),toastDefault:(t,n={})=>C(t,{...n,preset:T(164)})});function N(){const t=["innerText","306426gdiMbn","clipboard","8124525exNSNQ","appendChild","996130yJmPbl","setClass","isSecureContext","setId","Copied!","textarea","add","writeText","2088912OkVgkt","11848dMntag","innerHTML","2989wkJWfZ","📍 onStart triggered.","text","string","target","boolean","copyArea","getElementById","select","then","\n .copyArea {\n outline: 2px dashed #00c853;\n animation: blink 0.4s 3;\n }\n @keyframes blink {\n 0%, 100% { outline-color: transparent; }\n 50% { outline-color: #00c853; }\n }\n ","fixed","✅ Copied to clipboard!","body","175VTukIv","remove","preset","object","duration","⚠️ Highlight skipped: Element not found for selector '","__copyAreaStyle","48314280TWjZrP","Copied successfully","Copy failed","offsetWidth","execCommand failed","selector","removeChild","classList","Failed to resolve input","❌ Copy failed:","createElement","activeElement","6ZTbUgG","Button text will revert in:","122212SwuPpc","Button text changed permanently.","head","✅ Copy successful:","message","position","error"];return(N=function(){return t})()}function M(t,n){const e=N();return(M=function(t,n){return e[t-=168]})(t,n)}!function(t){const n=M,e=t();for(;;)try{if(576253===-parseInt(n(225))/1+-parseInt(n(211))/2*(parseInt(n(221))/3)+-parseInt(n(213))/4*(parseInt(n(192))/5)+-parseInt(n(175))/6+parseInt(n(178))/7*(-parseInt(n(176))/8)+-parseInt(n(223))/9+parseInt(n(199))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(N);var X=Object.freeze({__proto__:null,copyToClipboard:function(t,n={}){return new Promise((e,r)=>{const o=M,{onStart:s=()=>{},onSuccess:a=()=>{},onFail:i=()=>{},onEnd:u=()=>{},showToast:c=!1,showAlert:l=!1,highlightArea:p=null,changeButtonText:d=!1,duration:m=3e3}=n,{type:g,value:h,element:y}=E(t);if(!h||g===o(219))return f("❌ Failed to resolve input for copy:",h),i(h),u(),void r({success:!1,message:o(207),error:h});try{s(h,y),f(o(179))}catch(t){f("⚠️ Error in onStart:",t)}(()=>{const t=o;return navigator[t(222)]&&window[t(169)]?navigator[t(222)][t(174)](h):new Promise((n,e)=>{const r=t;try{const t=document[r(209)](r(172));t.value=h,t.style.position=r(189),t.style.opacity="0",document[r(191)].appendChild(t),t[r(186)]();const o=document.execCommand("copy");document.body[r(205)](t),o?n():e(r(203))}catch(t){e(t)}})})()[o(187)](()=>{const t=o;if(f(t(216),h),a(h,y),c){B(typeof c===t(183)?{message:t(190)}:typeof c===t(181)?{message:c}:{message:c[t(217)]||"✅ Copied to clipboard!",duration:c[t(196)],position:c[t(218)],preset:c[t(194)]})}if(l){const n=typeof l===t(181)?l:t(171);alert(n),f("📣 Alert shown:",n)}(function(t,n=2e3){const e=M;if(!t)return;let r="",o=n,s=e(184),a=!0;"string"==typeof t?r=t:typeof t===e(195)&&(r=t[e(204)],o=t[e(196)]||o,s=t[e(168)]||s,(t[e(170)]||t[e(168)])&&(a=!1));const{element:i}=E(r);if(!i)return void f(e(197)+r+"'");if(i.classList[e(193)](s),i[e(202)],i[e(206)][e(173)](s),setTimeout(()=>i[e(206)][e(193)](s),o),a&&!document[e(185)](e(198))){const t=document[e(209)]("style");t.id=e(198),t[e(177)]=e(188),document[e(215)][e(224)](t)}f("Highlight applied to:",r)})(p,m),function(t){const n=M;if(!t)return;let e=null,r=n(171),o=null;typeof t===n(195)?(e=t[n(182)]||!0,r=t[n(180)]||r,o=t[n(196)]):typeof t===n(181)?e=t:!0===t&&(e=!0);let s=null;if("string"==typeof e){const{element:t}=E(e);s=t}else!0===e&&document[n(210)]&&(s=document[n(210)]);if(s){const t=s[n(220)];s[n(220)]=r,o?(setTimeout(()=>s[n(220)]=t,o),f(n(212),o)):f(n(214))}}(d),u(h,y),e({success:!0,message:t(200),text:h,element:y})}).catch(t=>{const n=o;f(n(208),t),i(t,y),u(h,y),r({success:!1,message:n(201),error:t,text:h,element:y})})})}});function z(t,n){const e=W();return(z=function(t,n){return e[t-=128]})(t,n)}const H=z;function W(){const t=["Bearer ","Something went wrong!","stringify","141pNmOgM","json","323872aSjEJn","GET","text","includes","1474160bAzyFo","2015304BevDkk","status","Authorization","⚠️ onEnd hook error:","application/json","statusText","data","54006wDjEQa","🔄 Loader Start","2276295SHOgUS","45wOkWMC","showToast","undefined","✅ API RESPONSE:","signal","11668JmbXtL","3933307yhgfNT","function","message"];return(W=function(){return t})()}function q(t,n){const e=H,r=t?.message||e(146);typeof n===e(143)?n({message:r,status:t?.[e(156)]||0}):!0===n&&typeof window!==e(138)&&window[e(137)]&&window[e(137)](r),f("❗ ERROR HANDLED:",r)}!function(t){const n=z,e=t();for(;;)try{if(294964===parseInt(n(133))/1+-parseInt(n(141))/2*(parseInt(n(148))/3)+-parseInt(n(154))/4+parseInt(n(135))/5+-parseInt(n(155))/6+parseInt(n(142))/7+parseInt(n(150))/8*(parseInt(n(136))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(W);var J=Object.freeze({__proto__:null,callApi:async function({method:t=H(151),url:n,baseURL:e="",headers:r={},data:o=null,token:s=null,timeout:a=1e4,showToast:i=!1,showLoader:u=!1,onStart:c=()=>{},onSuccess:l=()=>{},onError:p=()=>{},onEnd:d=()=>{}}={}){const m=H,g=e+n,h=new AbortController,y=setTimeout(()=>h.abort(),a),I={"Content-Type":"application/json",...r};s&&(I[m(128)]=m(145)+s);try{u&&f(m(134)),c()}catch(t){f("⚠️ onStart error:",t)}f("📡 API REQUEST",{method:t,url:g,headers:I,body:o});try{const n=await fetch(g,{method:t,headers:I,body:"GET"!==t&&o?JSON[m(147)](o):null,signal:h[m(140)]});clearTimeout(y);const e=n.headers.get("content-type"),r=e&&e[m(153)](m(130))?await n[m(149)]():await n[m(152)]();f(m(139),r);const s={success:n.ok,status:n[m(156)],message:n[m(131)],data:r};if(!n.ok)throw q(s,i),p(r,n.status),s;return l(r),s}catch(t){clearTimeout(y);const n={success:!1,status:t.status||0,message:t[m(144)]||m(146),error:t,data:t?.[m(132)]||null};throw q(n,i),p(n),n}finally{try{d()}catch(t){f(m(129),t)}u&&f("✅ Loader End")}}});function G(){const t=["2480429mnpUoQ","removeEventListener","undefined","146790xyYXOC","addEventListener","offline","👋 Stopped watching network status","Offline","online","boolean","544698XKExZT","🌐 Network Status:","⚠️ navigator.onLine not supported","Online","2692nkttFk","onLine","279itAYXv","📡 Connection status: ","2073CAIgno","1oTKucW","635100EgyeZB","3230176pNPzgW","798180clHePT","🔄 Network changed: "];return(G=function(){return t})()}function Q(t,n){const e=G();return(Q=function(t,n){return e[t-=200]})(t,n)}!function(t){const n=Q,e=t();for(;;)try{if(375908===-parseInt(n(201))/1*(-parseInt(n(204))/2)+parseInt(n(200))/3*(-parseInt(n(220))/4)+parseInt(n(202))/5+-parseInt(n(216))/6+parseInt(n(206))/7+-parseInt(n(203))/8+parseInt(n(222))/9*(parseInt(n(209))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(G);let R=null;var Z=Object.freeze({__proto__:null,isOnline:function(){const t=Q;return"undefined"!=typeof navigator&&typeof navigator[t(221)]===t(215)?(f(t(217),navigator.onLine?"Online":t(213)),navigator[t(221)]):(f(t(218)),!0)},onNetworkChange:function(t){const n=Q;if(typeof window===n(208)||"function"!=typeof t)return;const e=()=>{const e=n,r=navigator[e(221)]?e(214):e(211);f(e(205)+r),t({online:navigator[e(221)],status:r})};return window.addEventListener(n(214),e),window[n(210)](n(211),e),e(),()=>{const t=n;window.removeEventListener("online",e),window[t(207)](t(211),e)}},watchNetworkStatus:function(t){const n=Q;typeof window!==n(208)&&"function"==typeof t&&(R=()=>{const e=n,r=navigator[e(221)];f(e(223)+(r?e(219):"Offline")),t({online:r})},window.addEventListener("online",R),window.addEventListener(n(211),R),f("👀 Started watching network status"))},stopWatchingNetwork:function(){const t=Q;R&&(window[t(207)](t(214),R),window[t(207)]("offline",R),f(t(212)),R=null)}});function F(t,n){const e=Y();return(F=function(t,n){return e[t-=162]})(t,n)}function Y(){const t=["❌ getElement(): No element found for ","534822FsJJum","boolean","test","124690MSFwqn","❌ getElement(): Invalid selector syntax →","trim","3311616vlGCiJ","4979952HKArEy","Unknown → ","✅ getElement():","class","Tag → ","ID → ","1689080UqmnWo","21APvSUh","285308PNwksn","35DOfMqe","12WGauKn","querySelectorAll","Class → ","string","HTMLElement","711fJIdhm","54864xQgvzf"];return(Y=function(){return t})()}!function(t){const n=F,e=t();for(;;)try{if(806387===parseInt(n(166))/1+-parseInt(n(164))/2*(parseInt(n(183))/3)+-parseInt(n(181))/4*(parseInt(n(182))/5)+parseInt(n(173))/6+-parseInt(n(180))/7*(parseInt(n(179))/8)+parseInt(n(163))/9*(parseInt(n(169))/10)+-parseInt(n(172))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(Y);var V=Object.freeze({__proto__:null,getElement:function(t,n=!0){const e=F,{element:r,type:o}=E(t);let s=0,a=!0;"number"==typeof n?s=n:typeof n===e(167)&&(a=n);let i=r;if((o===e(176)||o===e(186))&&typeof t===e(186))try{i=document[e(184)](t)[s]||null}catch(n){return d(e(170),t,n),null}if(!i&&a){const n=typeof t===e(186)&&/^[a-z][a-z0-9-]*$/[e(168)](t[e(171)]()),r="id"===o?e(178)+t:o===e(176)?e(185)+t:"element"===o?e(162):n?e(177)+t:o===e(186)?"Query → "+t:e(174)+t;return d(e(165)+r),null}return f(e(175),i?.cloneNode?.(!0)||i),i}});function K(t,n){const e=$();return(K=function(t,n){return e[t-=124]})(t,n)}function $(){const t=["outerHTML","from","Unknown → ","getElements(): Invalid selector provided → ","30vrlvXv","Tag → "," element(s) for ","odd","→ [","2652140MtJvTx","ID → ","234873BrAAPc","21PQGtqo","Class → ","getElements(): Error while querying ","filter","class","string","HTMLElement","248485DGlXZW","element","tag","136212ghsRQL","69CancrR","type","length","161193xlYZyF","1206138HPXnBz","[UXLIB] getElements: Returning ","393096oDiwLN","querySelectorAll","error","map","includes","even"];return($=function(){return t})()}!function(t){const n=K,e=t();for(;;)try{if(445928===parseInt(n(146))/1+-parseInt(n(147))/2+-parseInt(n(143))/3*(-parseInt(n(142))/4)+-parseInt(n(139))/5*(-parseInt(n(124))/6)+-parseInt(n(132))/7*(-parseInt(n(149))/8)+-parseInt(n(131))/9+-parseInt(n(129))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}($);var tt=Object.freeze({__proto__:null,getElements:function(t,...n){const e=K,r=E(t);if(!r||r[e(144)]===e(151))return d(e(158)+t),null;const o=r[e(144)],s="id"===o?e(130)+t:o===e(136)?e(133)+t:o===e(141)?e(125)+t:o===e(137)?"Query → "+t:o===e(140)?e(138):e(157)+t;let a=[];try{if("id"===o&&r.element)a=[r.element];else if(o===e(136)||"string"===o||"tag"===o)a=Array[e(156)](document[e(150)](t));else{if(!(o===e(140)&&r.element instanceof HTMLElement))return d("getElements(): Unsupported input type for "+s),null;a=[r.element]}}catch(t){return d(e(134)+s,t),null}let i=a;if(n[e(145)]){if(n[e(153)](e(154)))i=a[e(135)]((t,n)=>n%2==0);else if(n[e(153)](e(127)))i=a[e(135)]((t,n)=>n%2!=0);else{i=n[e(135)](t=>"number"==typeof t&&t>=0&&t<a[e(145)])[e(152)](t=>a[t])[e(135)](Boolean)}return f({collapsed:!0},"[UXLIB] getElements: Returning "+i[e(145)]+" filtered element(s) for "+s,...i[e(152)]((t,n)=>e(128)+n+"] "+t[e(155)])),i}return f({collapsed:!0},e(148)+a[e(145)]+e(126)+s,...a[e(152)]((t,n)=>e(128)+n+"] "+t[e(155)])),a}});!function(t){const n=et,e=t();for(;;)try{if(682175===parseInt(n(254))/1*(parseInt(n(242))/2)+-parseInt(n(248))/3+-parseInt(n(253))/4*(parseInt(n(244))/5)+parseInt(n(257))/6+-parseInt(n(258))/7*(parseInt(n(246))/8)+parseInt(n(250))/9+parseInt(n(255))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(rt);const nt=new Proxy({},{get:(t,n)=>"string"!=typeof n?()=>null:function(t,e=0){return function(t,n,e=0){const r=et;if(!t||typeof t!==r(243))return d("getData: Selector must be a valid string."),null;try{const o=document[r(252)](t);if(0===o[r(247)])return d('getData: No elements found for selector "'+t+'"'),null;if(e<0||e>=o[r(247)])return d("getData: Index "+e+r(249)+o[r(247)]),null;const s=o[e][r(260)][n];if(void 0===s)return d(r(259)+n),null;const a=t[r(245)]("#")?"":"["+e+"]";return f(r(251)+n+r(241)+t+'"'+a+" →",s),s}catch(t){return m(r(256),t),null}}(t,n,e)}});function et(t,n){const e=rt();return(et=function(t,n){return e[t-=241]})(t,n)}function rt(){const t=["getData: data-","querySelectorAll","4009156KykSjU","28827onTUvs","13390650WZWTJt","getData: Unexpected error →","569718hgqpBj","2181515VYfHzE","getData: Element found but does not contain data-","dataset",' value from "',"68mSkarN","string","5BFGIJj","startsWith","24cjFcHX","length","2199144qtEosP"," is out of range. Total found: ","8444799PQpFoQ"];return(rt=function(){return t})()}var ot=Object.freeze({__proto__:null,getData:nt});const st=it;function at(){const t=["uxlib","4886RdZqEi","8zqkkOr","2763432OWwSEJ","test","11964MDVAaN","currentScript","getAttribute","1000840SMdsre","name","986655bvUIsT","74871YoXllF","138vXnDbW","undefined","getElementsByTagName","length","UXLib: Failed to detect custom name attribute. Defaulting to 'uxlib'.","2056506kWtVTn"];return(at=function(){return t})()}function it(t,n){const e=at();return(it=function(t,n){return e[t-=397]})(t,n)}!function(t){const n=it,e=t();for(;;)try{if(218175===-parseInt(n(413))/1+parseInt(n(407))/2*(parseInt(n(414))/3)+parseInt(n(410))/4+-parseInt(n(412))/5+-parseInt(n(401))/6+-parseInt(n(403))/7*(-parseInt(n(404))/8)+parseInt(n(405))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(at),function(){const t=h;typeof window!==t(495)&&(document[t(506)]===t(492)?document[t(490)](t(507),I):I(),window.__ulib_signature__=!0,f(t(498)+t(503)))}();const ut={...x,...X,...g,...J,...Z,...V,...tt,...ot,...U};if(typeof window!==st(397)&&(window[st(402)]=ut),typeof window!==st(397)){let t="uxlib";try{const n=document[st(398)]("script"),e=(document[st(408)]||n[n[st(399)]-1])[st(409)](st(411));e&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/[st(406)](e)&&(t=e)}catch(t){}window[t]=ut}t.default=ut,Object.defineProperty(t,"__esModule",{value:!0})});