domquery-com 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,45 @@
1
+ $.Kcolor=function(H,y,g){function T(){function a(b){b&&(b.setAttribute("title",""),b.removeAttribute("title"),b.style.webkitTouchCallout="none",b.style.webkitUserSelect="none",b.style.webkitTapHighlightColor="rgba(0,0,0,0)",b.style.outline="none","INPUT"===b.tagName&&(b.style.webkitUserSelect="text",b.style.userSelect="text"),Array.from(b.children).forEach(c=>{a(c)}))}a(e);a(l);e.addEventListener("mouseover",function(b){b.target&&b.target.removeAttribute("title")},!0)}function G(){if("undefined"!==
2
+ typeof $&&$.isMobile){const a=$.isMobile();return!0===a.isMobile||!0===a.isTablet}return!1}function fa(a){return"number"===typeof a?a:"object"===typeof a&&null!==a?G()?a.mobile||300:a.pc||300:300}function qa(a){return"number"===typeof a?a:"object"===typeof a&&null!==a?G()?a.mobile||0:a.pc||0:0}function za(a){const b=[];for(a=a&&a.parentElement;a;){const c=window.getComputedStyle(a).overflowY;("auto"===c||"scroll"===c)&&a.scrollHeight>a.clientHeight&&b.push(a);a=a.parentElement}return b}function ra(a){if(a&&
3
+ "function"===typeof a.focus){var b=window.pageYOffset||document.documentElement.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||0,f=za(a).map(k=>({el:k,top:k.scrollTop,left:k.scrollLeft}));try{a.focus({preventScroll:!0})}catch(k){a.focus()}setTimeout(()=>{window.scrollTo(c,b);f.forEach(({el:k,top:m,left:n})=>{k.scrollTop=m;k.scrollLeft=n})},0)}}function ha(){console.log("Kcolor: clearColor \ud638\ucd9c - \ud3ec\uc778\ud130 \uc81c\uac70 \ubaa8\ub4dc");r=!0;p.style.display="none";
4
+ v.value=0;w.value=0;x.value=0;t.value="";p.style.left="50%";p.style.top="50%";C=D=.5;U()}function Aa(){sa.innerHTML="";ta.forEach((a,b)=>{const c=document.createElement("div");c.setAttribute("tabindex","0");c.setAttribute("title","");c.removeAttribute("title");c.style.webkitTouchCallout="none";c.style.webkitUserSelect="none";c.style.webkitTapHighlightColor="rgba(0,0,0,0)";c.style.outline="none";b===ta.length-1?(c.className="fixed-color cancel-color",c.addEventListener("click",function(f){f.preventDefault();
5
+ f.stopPropagation();ha();G()&&h.keepKeyboard&&setTimeout(()=>z.focus(),0);this.focus()},!1)):(c.className="fixed-color",c.style.backgroundColor=a,c.setAttribute("data-color",a),c.addEventListener("click",function(f){f.preventDefault();f.stopPropagation();f=this.getAttribute("data-color");ia(f);G()&&h.keepKeyboard&&setTimeout(()=>z.focus(),0);this.focus()},!1));sa.appendChild(c)})}function ja(){ka.innerHTML="";for(var a=0;6>a;a++){var b=document.createElement("div");b.setAttribute("tabindex","0");
6
+ b.setAttribute("title","");b.removeAttribute("title");b.style.webkitTouchCallout="none";b.style.webkitUserSelect="none";b.style.webkitTapHighlightColor="rgba(0,0,0,0)";b.style.outline="none";if(5===a)b.className="recent-color reset-color",b.style.backgroundColor="white",b.style.position="relative",b.addEventListener("click",function(c){c.preventDefault();c.stopPropagation();try{localStorage.removeItem("kcolor_recent_colors")}catch(f){console.warn("Kcolor: \ub85c\uceec \uc2a4\ud1a0\ub9ac\uc9c0 \uc811\uadfc \uc624\ub958")}A=
7
+ [];ja();ha()},!1);else if(a<A.length){const c=A[a];b.className="recent-color filled";""===c?(b.style.backgroundColor="white",b.style.backgroundImage="repeating-linear-gradient(45deg, #ccc, #ccc 5px, #fff 5px, #fff 10px)",b.setAttribute("data-color","")):(b.style.backgroundColor=c,b.style.backgroundImage="none",b.setAttribute("data-color",c));b.addEventListener("click",function(f){f.preventDefault();f.stopPropagation();f=this.getAttribute("data-color");""===f?ha():(ia(f),G()&&h.keepKeyboard&&setTimeout(()=>
8
+ z.focus(),0),this.focus())},!1)}else b.className="recent-color",b.style.backgroundColor="#ffffff";ka.appendChild(b)}if(a=ka.querySelector(".reset-color"))b=document.createElement("div"),b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.background="linear-gradient(to bottom right, transparent 45%, #ccc 45%, #ccc 55%, transparent 55%)",b.style.borderRadius="10px",a.appendChild(b)}function la(a){const b=A.indexOf(a);-1!==b&&A.splice(b,1);
9
+ A.unshift(a);6<A.length&&A.pop();try{localStorage.setItem("kcolor_recent_colors",JSON.stringify(A))}catch(c){console.warn("Kcolor: \ub85c\uceec \uc2a4\ud1a0\ub9ac\uc9c0 \uc800\uc7a5 \uc624\ub958")}ja()}function ua(a,b,c){let f,k,m,n=Math.floor(a/60)%6,V=a/60-n;a=c*(1-b);let I=c*(1-V*b);b=c*(1-(1-V)*b);switch(n){case 0:f=c;k=b;m=a;break;case 1:f=I;k=c;m=a;break;case 2:f=a;k=c;m=b;break;case 3:f=a;k=I;m=c;break;case 4:f=b;k=a;m=c;break;case 5:f=c,k=a,m=I}return{r:Math.round(255*f),g:Math.round(255*
10
+ k),b:Math.round(255*m)}}function J(a,b,c){a=Math.max(0,Math.min(255,Math.round(a)));b=Math.max(0,Math.min(255,Math.round(b)));c=Math.max(0,Math.min(255,Math.round(c)));return"#"+a.toString(16).padStart(2,"0")+b.toString(16).padStart(2,"0")+c.toString(16).padStart(2,"0")}function ma(a){if("transparent"===a)return{r:0,g:0,b:0,a:0};a=a.replace("#","");3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);if(!/^[0-9A-Fa-f]{6}$/.test(a))return{r:0,g:0,b:0};try{return{r:parseInt(a.substring(0,2),16),g:parseInt(a.substring(2,
11
+ 4),16),b:parseInt(a.substring(4,6),16)}}catch(b){return console.warn("Kcolor: \uc0c9\uc0c1 \ubcc0\ud658 \uc624\ub958",b),{r:0,g:0,b:0}}}function na(a,b,c){a/=255;b/=255;c/=255;const f=Math.max(a,b,c),k=Math.min(a,b,c);let m;const n=f-k;if(f===k)m=0;else{switch(f){case a:m=(b-c)/n+(b<c?6:0);break;case b:m=(c-a)/n+2;break;case c:m=(a-b)/n+4}m/=6}return{h:Math.round(360*m),s:0===f?0:n/f,v:f}}function P(){var a=ua(E,1,1);a=J(a.r,a.g,a.b);W.style.backgroundImage=`\n\t\tlinear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1)),\n\t\tlinear-gradient(to right, rgba(255,255,255,1), ${a})\n\t\t`}
12
+ function Ba(a,b,c){const [f,k,m]=[a,b,c].map(n=>{n/=255;return.03928>=n?n/12.92:Math.pow((n+.055)/1.055,2.4)});return.2126*f+.7152*k+.0722*m}function K(a){r||"transparent"===a||""===a?u.classList.add("light-background"):(a=ma(a),.5<Ba(a.r,a.g,a.b)?u.classList.add("light-background"):u.classList.remove("light-background"))}function U(){const a=ua(E,D,C),b=J(a.r,a.g,a.b);r?(u.style.backgroundColor="transparent",u.style.backgroundImage="repeating-linear-gradient(45deg, #ccc, #ccc 5px, #fff 5px, #fff 10px)"):
13
+ (u.style.backgroundColor=b,u.style.backgroundImage="none");v.value=a.r;w.value=a.g;x.value=a.b;t.value=b.toUpperCase();r||(p.style.backgroundColor=b);K(b)}function X(a){a&&a.preventDefault&&a.preventDefault();r&&(r=!1,p.style.display="block");var b=W.getBoundingClientRect();if(a.type.startsWith("touch")){var c=a.touches[0].clientX-b.left;a=a.touches[0].clientY-b.top}else c=a.clientX-b.left,a=a.clientY-b.top;c=Math.max(0,Math.min(b.width,c));a=Math.max(0,Math.min(b.height,a));c/=b.width;b=1-a/b.height;
14
+ D=c;C=b;p.style.left=`${100*c}%`;p.style.top=`${100*(1-b)}%`;U()}function Y(a){a&&a.preventDefault&&a.preventDefault();r&&(r=!1,p.style.display="block");var b=oa.getBoundingClientRect();a=a.type.startsWith("touch")?a.touches[0].clientX-b.left:a.clientX-b.left;a=Math.max(0,Math.min(b.width,a));b=a/b.width;E=360*b;Q.style.left=`${100*b}%`;P();U()}function Z(){r&&(r=!1,p.style.display="block");var a=parseInt(v.value)||0;let b=parseInt(w.value)||0,c=parseInt(x.value)||0;a=Math.max(0,Math.min(255,a));
15
+ b=Math.max(0,Math.min(255,b));c=Math.max(0,Math.min(255,c));v.value=a;w.value=b;x.value=c;const f=J(a,b,c);t.value=f.toUpperCase();a=na(a,b,c);E=a.h;D=a.s;C=a.v;Q.style.left=`${E/360*100}%`;P();p.style.left=`${100*D}%`;p.style.top=`${100*(1-C)}%`;u.style.backgroundColor=f;p.style.backgroundColor=f;K(f)}function va(){r&&(r=!1,p.style.display="block");let a=t.value;a.startsWith("#")||(a="#"+a);if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(a)){var b=ma(a);v.value=b.r;w.value=b.g;x.value=b.b;b=na(b.r,b.g,b.b);E=
16
+ b.h;D=b.s;C=b.v;Q.style.left=`${E/360*100}%`;P();p.style.left=`${100*D}%`;p.style.top=`${100*(1-C)}%`;u.style.backgroundColor=a;p.style.backgroundColor=a;t.value=a.toUpperCase();K(a)}}function ia(a){r&&""!==a&&"transparent"!==a&&(r=!1,p.style.display="block");if("transparent"===a||""===a)v.value=0,w.value=0,x.value=0,t.value=""===a?"":"transparent",u.style.backgroundColor=""===a?"#ffffff":"transparent",u.style.backgroundImage="repeating-linear-gradient(45deg, #ccc, #ccc 5px, #fff 5px, #fff 10px)",
17
+ u.style.color="#000000";else{u.style.backgroundImage="none";var b=ma(a);v.value=b.r;w.value=b.g;x.value=b.b;t.value=a.toUpperCase();b=na(b.r,b.g,b.b);E=b.h;D=b.s;C=b.v;Q.style.left=`${E/360*100}%`;P();p.style.left=`${100*D}%`;p.style.top=`${100*(1-C)}%`;u.style.backgroundColor=a;p.style.backgroundColor=a}K(a)}function Ca(a=t.value){console.log("Kcolor: applySelectedColor \ud638\ucd9c",{hex:a,hexInputValue:t.value,isPointerRemoved:r});if(r){var b=t.value.trim();b&&""!==b&&"transparent"!==b||(a="")}"transparent"===
18
+ a?("INPUT"===d.tagName?d.value="transparent":d.style.backgroundColor="transparent",la("transparent"),R(!0),"function"===typeof y&&y.call(d,"transparent")):""===a?("INPUT"===d.tagName?d.value="":d.style.backgroundColor="",la(""),R(!0),"function"===typeof y&&y.call(d,"")):("INPUT"===d.tagName?(d.value=a,b=new Event("change"),d.dispatchEvent(b)):d.style.backgroundColor=a,d._kcolorUserSelected=!0,B=a,la(a),R(!0),"function"===typeof y&&y.call(d,a))}function Da(){if("INPUT"===d.tagName)B=d.value||"";else if(B=
19
+ window.getComputedStyle(d).backgroundColor,"transparent"===B||"rgba(0, 0, 0, 0)"===B)B="transparent";else{var a=B.match(/\d+/g);if(a&&3<=a.length){const b=parseInt(a[0]),c=parseInt(a[1]);a=parseInt(a[2]);B=J(b,c,a)}}}function L(a){a&&a.preventDefault&&a.preventDefault();d.hasAttribute("data-kcolor")&&"true"===d.getAttribute("data-kcolor")&&(d._kcolorActive=!1);e.parentNode?"none"===e.style.display&&(e.style.display="block",!1!==h.overlay&&(l.style.display="block")):(!1!==h.overlay&&document.body.appendChild(l),
20
+ document.body.appendChild(e));l._kcolorEventAdded||(l.addEventListener("click",function(m){m.target===l&&(R(),m=fa(h.closeDuration),setTimeout(()=>{if(d&&"function"===typeof d.focus&&(d.focus(),"INPUT"===d.tagName&&"text"===d.type)){const n=d.value.length;d.setSelectionRange(n,n)}},m))}),l._kcolorEventAdded=!0);h.onOpen();var b=fa(h.openDuration)/1E3+"s";e.style.transition=`transform ${b} ease, opacity ${b} ease`;!1!==h.overlay&&(l.style.transition=`opacity ${b} ease`);Da();r=!1;p.style.display="block";
21
+ Aa();ja();var c=null;if(!0!==d._kcolorUserSelected&&H)c=H;else if("INPUT"===d.tagName&&d.value)c=d.value;else if(b=window.getComputedStyle(d).backgroundColor,"transparent"!==b&&"rgba(0, 0, 0, 0)"!==b&&(b=b.match(/\d+/g))&&3<=b.length){c=parseInt(b[0]);var f=parseInt(b[1]);b=parseInt(b[2]);c=J(c,f,b)}c||(c=H||"#FFFFFF");c?ia(c):K("#FFFFFF");if(G()){!1!==h.overlay&&(l.style.display="block",l.style.opacity="0");let m=0;h.preserveScroll&&"auto"===h.mobileMode&&(m=window.pageYOffset||document.documentElement.scrollTop||
22
+ 0);a=d.getBoundingClientRect();const n=a.top,V=a.left;e.style.display="block";e.style.position="absolute";e.style.width="262px";e.style.maxWidth="400px";I();requestAnimationFrame(()=>{!1!==h.overlay&&(l.style.opacity="1");e.classList.add("active");T();h.keepKeyboard&&setTimeout(()=>z.focus(),0);h.preserveScroll&&"auto"===h.mobileMode&&window.scrollTo({top:m,left:0,behavior:"auto"})});setTimeout(I,150);setTimeout(I,300);function I(){const M=window.pageYOffset||document.documentElement.scrollTop,aa=
23
+ window.pageXOffset||document.documentElement.scrollLeft;let ba=null!=h.anchorX?h.anchorX:V,ca=null!=h.anchorY?h.anchorY:n,da=aa+ba-e.offsetWidth,ea=M+ca-e.offsetHeight-10;switch(h.align){case "bottom-right":da=aa+ba-e.offsetWidth;ea=M+ca+10;break;case "top-left":da=aa+ba;ea=M+ca-e.offsetHeight-10;break;case "bottom-left":da=aa+ba,ea=M+ca+10}e.style.left=da+"px";e.style.top=ea+"px";0>parseInt(e.style.left)&&(e.style.left="10px");parseInt(e.style.left)+e.offsetWidth>document.documentElement.clientWidth&&
24
+ (e.style.left=document.documentElement.clientWidth-e.offsetWidth-10+"px");parseInt(e.style.top)<M&&(e.style.top=M+n+40+"px")}}else{e.style.position="absolute";e.style.width="245px";b=window.pageXOffset||document.documentElement.scrollLeft||0;c=window.pageYOffset||document.documentElement.scrollTop||0;f=window.innerWidth||document.documentElement.clientWidth;const m=window.innerHeight||document.documentElement.clientHeight;if(null!=h.anchorX&&null!=h.anchorY){switch(h.align){case "bottom-right":a=
25
+ b+h.anchorX-245;var k=c+h.anchorY+10;break;case "top-left":a=b+h.anchorX;k=c+h.anchorY-250-10;break;case "bottom-left":a=b+h.anchorX;k=c+h.anchorY+10;break;default:a=b+h.anchorX-245,k=c+h.anchorY-250-10}a+245>b+f&&(a=b+f-245-10);k+250>c+m&&(k=c+m-250-10);a=Math.max(b+10,a);k=Math.max(c+10,k);e.style.left=a+"px";e.style.top=k+"px"}else if(a)k=a.pageX||a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft),a=a.pageY||a.clientY+(document.documentElement.scrollTop||document.body.scrollTop),
26
+ k+245>b+f&&(k=b+f-245-10),a+250>c+m&&(a=c+m-250-10),k=Math.max(b+10,k),a=Math.max(c+10,a),e.style.left=k+"px",e.style.top=a+"px";else{a=d.getBoundingClientRect();k=a.left+b;let n=a.bottom+c+5;k+245>b+f&&(k=b+f-245-10);n+250>c+m&&(n=a.top+c-250-5);k=Math.max(b+10,k);n=Math.max(c+10,n);e.style.left=k+"px";e.style.top=n+"px"}e.style.display="block";!1!==h.overlay&&(l.style.display="block");requestAnimationFrame(()=>{!1!==h.overlay&&(l.style.opacity="1");e.classList.add("active");T()})}}function R(a=
27
+ !1){const b=fa(h.closeDuration),c=b/1E3+"s";e.style.transition=`transform ${c} ease, opacity ${c} ease`;!1!==h.overlay&&(l.style.transition=`opacity ${c} ease`);e.classList.remove("active");l.style.opacity="0";if(a)h.onClose("ok");else h.onClose("cancel");a||("INPUT"===d.tagName?d.value=B:d.style.backgroundColor=B);setTimeout(()=>{d.hasAttribute("data-kcolor")&&"true"===d.getAttribute("data-kcolor")?(e.style.display="none",!1!==h.overlay&&(l.style.display="none")):(e&&e.parentNode&&e.parentNode.removeChild(e),
28
+ l&&l.parentNode&&l.parentNode.removeChild(l));d&&(d._kcolorActive=!1,d._hasColorPicker=!1,d._kcolorInitialized=!1,d._kcolorInitialColor=null);if(d&&"function"===typeof d.focus&&(d.focus(),"INPUT"===d.tagName&&"text"===d.type)){const f=d.value.length;d.setSelectionRange(f,f)}},b)}function S(a,b){a.value.length>b&&(a.value=a.value.slice(0,b))}function wa(){"none"!==pa.style.display?(pa.style.display="none",xa.style.display="flex"):(xa.style.display="none",pa.style.display="flex");setTimeout(()=>{G()&&
29
+ h.keepKeyboard&&z&&z.focus&&z.focus({preventScroll:!0});const a=document.activeElement;a!==t&&a!==v&&a!==w&&a!==x||a.blur()},0)}const h=$.extend({onOpen:function(){},onClose:function(){},anchorX:null,anchorY:null,align:"top-right",mobileMode:"auto",overlay:!0,keepKeyboard:!1,preserveScroll:!1,openDuration:300,closeDuration:300,openDelay:0},g||{});if(!this.elements||0===this.elements.length)return console.warn("Kcolor: \uc120\ud0dd\ub41c \uc694\uc18c\uac00 \uc5c6\uc2b5\ub2c8\ub2e4."),this;const d=
30
+ this.elements[0];if(!d||!d.nodeType||1!==d.nodeType)return console.warn("Kcolor: \uc120\ud0dd\ub41c \uc694\uc18c\uac00 \uc720\ud6a8\ud55c DOM \uc694\uc18c\uac00 \uc544\ub2d9\ub2c8\ub2e4."),this;if(document.querySelector(".color-picker-container.active"))return this;g=d.hasAttribute("data-kcolor")&&"true"===d.getAttribute("data-kcolor");if(d._kcolorInitialized){if(d._kcolorActive&&!g)return this;d._kcolorActive=!1}else d._kcolorInitialized=!0;d._kcolorActive=!0;if(!d._kcolorInitialColor){var F=null;
31
+ if(H)F=H;else if("INPUT"===d.tagName&&d.value)F=d.value;else if(g=window.getComputedStyle(d).backgroundColor,"transparent"===g||"rgba(0, 0, 0, 0)"===g)F="transparent";else if((g=g&&g.match(/\d+/g))&&3<=g.length){F=parseInt(g[0]);const a=parseInt(g[1]);g=parseInt(g[2]);F=J(F,a,g)}F||(F="transparent");d._kcolorInitialColor=F}const ya=y;y=function(a){d._kcolorActive=!1;h.onClose();"function"===typeof ya&&ya.call(d,a)};"undefined"!==typeof $&&$.isMobile&&$.isMobile();g=Date.now();d._hasColorPicker=!0;
32
+ let B="",r=!1,A=[];try{var q=localStorage.getItem("kcolor_recent_colors");q&&(A=JSON.parse(q))}catch(a){console.warn("Kcolor: \ub85c\uceec \uc2a4\ud1a0\ub9ac\uc9c0 \uc811\uadfc \uc624\ub958")}const ta="#F1A1A1 #8BBCF2 #CEAEFC #B7E3A8 #FFFF7C transparent".split(" "),l=document.createElement("div");l.className="color-picker-overlay";l.style.display="none";l.style.position="fixed";l.style.top="0";l.style.left="0";l.style.right="0";l.style.bottom="0";l.style.backgroundColor="rgba(0, 0, 0, 0)";l.style.zIndex=
33
+ "999999";l.style.opacity="0";l.setAttribute("title","");l.removeAttribute("title");const e=document.createElement("div");e.className="color-picker-container";e.style.display="none";e._kcolorElement=d;e.style.position="absolute";e.style.zIndex="1000000";e.setAttribute("title","");e.removeAttribute("title");q=document.createElement("style");q.textContent='\n\t\t.color-picker-container {\n\t\t\twidth: 245px;\n\t\t\tbox-sizing: border-box;\n\t\t\tborder-radius: 10px;\n\t\t\toverflow: hidden;\n\t\t\tbox-shadow: 0 8px 30px rgba(0,0,0,0.35);\n\t\t\tborder: 1px solid rgba(0,0,0,0.3);\n\t\t\tfont-family: \'Arial\', sans-serif;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground-color: white;\n\t\t\ttransform-origin: top left;\n\t\t\ttransform: scale(0.5);\n\t\t\topacity: 0;\n\t\t\ttransition: transform 0.3s ease, opacity 0.3s ease;\n\t\t\tborder-top: 5px solid white !important;\n\t\t}\n\n\t\t.color-picker-container.active {\n\t\t\ttransform: scale(1);\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.color-picker-container,\n\t\t.color-picker-container *,\n\t\t.color-area,\n\t\t.color-slider,\n\t\t.fixed-color,\n\t\t.recent-color,\n\t\t.current-color {\n\t\t\t-webkit-touch-callout: none !important;\n\t\t\t-webkit-user-select: none !important;\n\t\t\t-khtml-user-select: none !important;\n\t\t\t-moz-user-select: none !important;\n\t\t\t-ms-user-select: none !important;\n\t\t\tuser-select: none !important;\n\t\t\t-webkit-tap-highlight-color: rgba(0,0,0,0) !important;\n\t\t\toutline: none !important;\n\t\t\tcursor: default !important;\n\t\t}\n\n\t\t.color-area {\n\t\t\tcursor: crosshair !important;\n\t\t}\n\n\t\t.color-slider {\n\t\t\tcursor: pointer !important;\n\t\t}\n\n\t\t.fixed-color, .recent-color, .current-color {\n\t\t\tcursor: pointer !important;\n\t\t}\n\n\t\t.input-group input {\n\t\t\tcursor: text !important;\n\t\t\t-webkit-user-select: text !important;\n\t\t\t-moz-user-select: text !important;\n\t\t\t-ms-user-select: text !important;\n\t\t\tuser-select: text !important;\n\t\t}\n\n\t\t@media (max-width: 600px),\n\t\t(max-device-width: 600px),\n\t\t(orientation: portrait and max-width: 600px),\n\t\t(orientation: landscape and max-device-height: 600px) {\n\t\t\t.color-picker-container {\n\t\t\t\twidth: 262px !important;\n\t\t\t\tmax-width: 400px !important;\n\t\t\t\tmargin: 0 auto !important;\n\t\t\t\tleft: 0 !important;\n\t\t\t\tright: 0 !important;\n\t\t\tbox-shadow: 0 8px 30px rgba(0,0,0,0.25);\n\t\t\tborder: 1px solid rgba(0,0,0,0.2);\n\t\t\t\tposition: fixed !important;\n\t\t\t\ttop: 0 !important;\n\t\t\t\tbottom: auto !important;\n\t\t\t\ttransform: translateY(-100%);\n\t\t\t\ttransform-origin: top center;\n\t\t\t\ttransition: transform 0.3s ease;\n\t\t\t\tborder-top: none !important;\n\t\t\t}\n\t\t\t.color-controls {\n\t\t\t\tmargin-top: 0 !important;\n\t\t\t}\n\t\t\t.color-picker-container.active {\n\t\t\t\ttransform: translateY(0);\n\t\t\t}\n\n\t\t\t.color-area {\n\t\t\t\theight: 152px !important;\n\t\t\t}\n\n\t\t\t.color-left-panel, .color-right-panel {\n\t\t\t\theight: 152px !important;\n\t\t\t}\n\n\t\t\t.color-left-panel {\n\t\t\t\tjustify-content: flex-start !important;\n\t\t\t\tpadding-top: 5px !important;\n\t\t\t}\n\n\t\t\t.color-right-panel {\n\t\t\t\tjustify-content: flex-start !important;\n\t\t\t\tpadding-top: 5px !important;\n\t\t\t}\n\n\t\t\t.fixed-color, .recent-color {\n\t\t\t\tmargin-bottom: 4px !important;\n\t\t\t}\n\t\t}\n\n\t\t.color-main-area {\n\t\t\tdisplay: flex;\n\t\t\tpadding: 0;\n\t\t\tmargin: 0;\n\t\t\tbackground-color: white;\n\t\t}\n\n\t\t.color-left-panel {\n\t\t\twidth: 32px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: flex-start;\n\t\t\tpadding: 4px;\n\t\t\tpadding-top: 5px;\n\t\t\tbackground-color: white;\n\t\t\theight: 180px;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t.color-center-panel {\n\t\t\tflex: 1;\n\t\t}\n\n\t\t.color-right-panel {\n\t\t\twidth: 32px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: flex-start;\n\t\t\tpadding: 4px;\n\t\t\tpadding-top: 5px;\n\t\t\tbackground-color: white;\n\t\t\theight: 180px;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t.color-left-panel::-webkit-scrollbar,\n\t\t.color-right-panel::-webkit-scrollbar {\n\t\t\twidth: 0;\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.color-left-panel, .color-right-panel {\n\t\t\t-ms-overflow-style: none;\n\t\t\tscrollbar-width: none;\n\t\t}\n\n\t\t.color-area {\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 160px;\n\t\t\tbackground-image:\n\t\t\tlinear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1)),\n\t\t\tlinear-gradient(to right, rgba(255,255,255,1), rgba(255,0,255,1));\n\t\t\tcursor: crosshair;\n\t\t\ttouch-action: none;\n\t\t\tmargin: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t.color-pointer {\n\t\t\tposition: absolute;\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 2px solid white;\n\t\t\tbox-shadow: 0 0 3px rgba(0,0,0,0.5);\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\tz-index: 2;\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\t.color-controls {\n\t\t\tbackground-color: white;\n\t\t\tpadding: 5px 10px;\n\t\t\tmargin-top: -20px;\n\t\t}\n\n\t\t.color-preview {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tmargin-bottom: 6px;\n\t\t\tpadding-left: 0;\n\t\t\tmargin-left: -5px;\n\t\t}\n\n\t\t.current-color {\n\t\t\tposition: relative;\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t\tborder-radius: 50%;\n\t\t\tmargin-left: 10px;\n\t\t\tborder: 1px solid #ddd;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: #097969;\n\t\t}\n\n\t\t.current-color::after {\n\t\t\tcontent: "OK";\n\t\t\tcolor: white;\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: bold;\n\t\t\ttext-shadow: 0 0 3px rgba(0,0,0,0.7);\n\t\t}\n\n\t\t.current-color.light-background::after {\n\t\t\tcolor: black;\n\t\t\ttext-shadow: 0 0 3px rgba(255,255,255,0.7);\n\t\t}\n\n\t\t.color-slider {\n\t\t\tflex-grow: 1;\n\t\t\theight: 16px;\n\t\t\tposition: relative;\n\t\t\tbackground: linear-gradient(to right,\n\t\t\t#ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000\n\t\t\t);\n\t\t\tborder-radius: 8px;\n\t\t\tcursor: pointer;\n\t\t\ttouch-action: none;\n\t\t\tmargin-left: 28px;\n\t\t\twidth: calc(100% - 80px);\n\t\t}\n\n\t\t.color-slider-thumb {\n\t\t\tposition: absolute;\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tbackground-color: white;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 2px solid white;\n\t\t\tbox-shadow: 0 0 3px rgba(0,0,0,0.5);\n\t\t\ttransform: translateX(-50%);\n\t\t\ttop: 0;\n\t\t}\n\n\t\t.rgb-inputs {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\tmargin-top: 10px;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.input-group {\n\t\t\ttext-align: center;\n\t\t\tflex-grow: 1;\n\t\t}\n\n\t\t.input-group input {\n\t\t\twidth: 90%;\n\t\t\tpadding: 5px;\n\t\t\ttext-align: center;\n\t\t\tborder: 1px solid #ddd;\n\t\t\tborder-radius: 4px;\n\t\t\tbox-sizing: border-box;\n\t\t\tfont-size: 12px;\n\t\t}\n\n\t\t.input-group label {\n\t\t\tdisplay: block;\n\t\t\tmargin-top: 3px;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: #333;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t.hex-input {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t.fixed-color:hover {\n\t\t\ttransform: scale(1.1);\n\t\t}\n\n\t\t.fixed-color:focus {\n\t\t\toutline: 2px solid #0078d7;\n\t\t\ttransform: scale(1.1);\n\t\t\tbox-shadow: 0 0 5px rgba(0,120,215,0.5);\n\t\t}\n\n\t\t.fixed-color.cancel-color {\n\t\t\tbackground-color: white;\n\t\t\tposition: relative;\n\t\t}\n\n\t\t.fixed-color.cancel-color::before {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground: linear-gradient(to bottom right, transparent 45%, red 45%, red 55%, transparent 55%);\n\t\t\tborder-radius: 6px;\n\t\t}\n\n\t\t.fixed-color {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tborder-radius: 10px;\n\t\t\tmargin-bottom: 7px;\n\t\t\tborder: 1px solid #FFD8D8;\n\t\t\tcursor: pointer;\n\t\t\ttransition: transform 0.2s;\n\t\t\tbox-sizing: border-box;\n\t\t\tdisplay: block;\n\t\t\tflex-shrink: 0;\n\t\t\ttransform: translateZ(0);\n\t\t\taspect-ratio: 1/1;\n\t\t}\n\n\t\t.recent-color {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tborder-radius: 10px;\n\t\t\tmargin-bottom: 7px;\n\t\t\tborder: 1px solid #ccc;\n\t\t\tcursor: pointer;\n\t\t\ttransition: transform 0.2s;\n\t\t\tbackground-color: white;\n\t\t\tbox-sizing: border-box;\n\t\t\tdisplay: block;\n\t\t\tflex-shrink: 0;\n\t\t\ttransform: translateZ(0);\n\t\t\taspect-ratio: 1/1;\n\t\t}\n\n\t\t.recent-color:hover {\n\t\t\ttransform: scale(1.1);\n\t\t}\n\n\t\t.recent-color:focus {\n\t\t\toutline: 2px solid #0078d7;\n\t\t\ttransform: scale(1.1);\n\t\t\tbox-shadow: 0 0 5px rgba(0,120,215,0.5);\n\t\t}\n\n\t\t.recent-color.filled {\n\t\t\tborder: 1px solid #bbb;\n\t\t}\n\n\t\t#keyboardMaintainer {\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\theight: 1px;\n\t\t\twidth: 1px;\n\t\t\ttop: -9999px;\n\t\t\tleft: -9999px;\n\t\t\tz-index: -1;\n\t\t}\n\t\t.recent-color.cancel-color {\n\t\t\tbackground-color: white;\n\t\t\tposition: relative;\n\t\t}\n\t';
34
+ document.querySelector("style[data-kcolor-style]")||(q.setAttribute("data-kcolor-style","true"),document.head.appendChild(q));e.innerHTML=`\n\t<div class="color-main-area">\n\t<div class="color-left-panel" id="colorLeftPanel_${g}">\n\t\x3c!-- \uace0\uc815 \uc0c9\uc0c1\ub4e4\uc774 \uc5ec\uae30\uc5d0 \ub3d9\uc801\uc73c\ub85c \ucd94\uac00\ub429\ub2c8\ub2e4 --\x3e\n\t</div>\n\t<div class="color-center-panel">\n\t<div class="color-area" id="colorArea_${g}">\n\t<div class="color-pointer" id="colorPointer_${g}"></div>\n\t</div>\n\t</div>\n\t<div class="color-right-panel" id="colorRightPanel_${g}">\n\t\x3c!-- \ucd5c\uadfc \uc0c9\uc0c1\ub4e4\uc774 \uc5ec\uae30\uc5d0 \ub3d9\uc801\uc73c\ub85c \ucd94\uac00\ub429\ub2c8\ub2e4 --\x3e\n\t</div>\n\t</div>\n\n\t<div class="color-controls">\n\t<div class="color-preview">\n\t<div class="color-slider" id="hueSlider_${g}">\n\t<div class="color-slider-thumb" id="hueThumb_${g}"></div>\n\t</div>\n\t<div class="current-color" id="currentColor_${g}"></div>\n\t</div>\n\n\t<div class="rgb-inputs" id="rgb-mode_${g}">\n\t<div class="input-group">\n\t<input type="number" id="redInput_${g}" min="0" max="255" value="0" maxlength="3">\n\t<label class="mode-toggle-label">R</label>\n\t</div>\n\t<div class="input-group">\n\t<input type="number" id="greenInput_${g}" min="0" max="255" value="0" maxlength="3">\n\t<label class="mode-toggle-label">G</label>\n\t</div>\n\t<div class="input-group">\n\t<input type="number" id="blueInput_${g}" min="0" max="255" value="0" maxlength="3">\n\t<label class="mode-toggle-label">B</label>\n\t</div>\n\t</div>\n\n\t<div class="rgb-inputs" id="hex-mode_${g}" style="display: none;">\n\t<div class="input-group" style="width: 100%;">\n\t<input type="text" id="hexInput_${g}" class="hex-input" value="#000000" maxlength="7">\n\t<label class="mode-toggle-label">HEX</label>\n\t</div>\n\t</div>\n\t</div>\n\n\t\x3c!-- \ud0a4\ubcf4\ub4dc \uc720\uc9c0\ub97c \uc704\ud55c \ubcf4\uc774\uc9c0 \uc54a\ub294 \uc785\ub825 \ud544\ub4dc --\x3e\n <input type="text" id="keyboardMaintainer_${g}" class="keyboard-maintainer"\n style="position: fixed; opacity: 0; height: 1px; width: 1px; top: 0; left: 0; z-index: -1;">\n\t`;
35
+ !1!==h.overlay&&document.body.appendChild(l);document.body.appendChild(e);const W=e.querySelector(`#colorArea_${g}`),p=e.querySelector(`#colorPointer_${g}`),u=e.querySelector(`#currentColor_${g}`),v=e.querySelector(`#redInput_${g}`),w=e.querySelector(`#greenInput_${g}`),x=e.querySelector(`#blueInput_${g}`),t=e.querySelector(`#hexInput_${g}`),oa=e.querySelector(`#hueSlider_${g}`),Q=e.querySelector(`#hueThumb_${g}`),pa=e.querySelector(`#rgb-mode_${g}`),xa=e.querySelector(`#hex-mode_${g}`),sa=e.querySelector(`#colorLeftPanel_${g}`),
36
+ ka=e.querySelector(`#colorRightPanel_${g}`),z=e.querySelector(`#keyboardMaintainer_${g}`);q=e.querySelector(`#rgb-mode_${g}`).querySelectorAll(".mode-toggle-label");g=e.querySelector(`#hex-mode_${g}`).querySelector(".mode-toggle-label");T();e.addEventListener("click",function(a){a.stopPropagation();var b=a.target&&a.target.tagName?a.target.tagName.toUpperCase():"";b="INPUT"===b||"TEXTAREA"===b||"SELECT"===b;a=!(!a.target||"function"!==typeof a.target.closest||!a.target.closest(".mode-toggle-label"));
37
+ !b&&!a&&G()&&h.keepKeyboard&&setTimeout(()=>z&&z.focus&&z.focus({preventScroll:!0}),0)},!1);e.addEventListener("touchstart",function(a){a.stopPropagation()},{passive:!0});let E=0,D=0,C=1;p.style.left="0%";p.style.top="0%";Q.style.left="0%";d._kcolorClickHandler&&d.removeEventListener("click",d._kcolorClickHandler);d._kcolorClickHandler=function(a){a.stopPropagation();const b=d.hasAttribute("data-kcolor")&&"true"===d.getAttribute("data-kcolor");if(!d._kcolorActive||b){if(!b){var c=window.getSelection();
38
+ if(!c.rangeCount)return;const f=c.toString(),k=/\S/.test(f);if(!f||!k)return;c=c.getRangeAt(0);if(c.collapsed)return;c=c.toString();if(!c||0===c.length)return}c=qa(h.openDelay);0<c?setTimeout(()=>{b?L():L(a)},c):b?L():L(a)}};d.addEventListener("click",d._kcolorClickHandler);let N=!1;W.addEventListener("mousedown",function(a){N=!0;X(a)});W.addEventListener("touchstart",function(a){N=!0;X(a);a.preventDefault()},{passive:!1});let O=!1;oa.addEventListener("mousedown",function(a){O=!0;Y(a)});oa.addEventListener("touchstart",
39
+ function(a){O=!0;Y(a);a.preventDefault()},{passive:!1});window.addEventListener("mousemove",function(a){N?X(a):O&&Y(a)});window.addEventListener("touchmove",function(a){N?(X(a),a.preventDefault()):O&&(Y(a),a.preventDefault())},{passive:!1});window.addEventListener("mouseup",function(){O=N=!1});window.addEventListener("touchend",function(){O=N=!1});v.addEventListener("input",function(){S(this,3);this.value=this.value.replace(/[^0-9]/g,"");255<parseInt(this.value)&&(this.value="255")});w.addEventListener("input",
40
+ function(){S(this,3);this.value=this.value.replace(/[^0-9]/g,"");255<parseInt(this.value)&&(this.value="255")});x.addEventListener("input",function(){S(this,3);this.value=this.value.replace(/[^0-9]/g,"");255<parseInt(this.value)&&(this.value="255")});t.addEventListener("input",function(){"transparent"!==this.value&&(S(this,7),this.value.startsWith("#")||(this.value="#"+this.value,S(this,7)),this.value=this.value.replace(/[^#0-9A-Fa-f]/g,""))});v.addEventListener("change",Z);w.addEventListener("change",
41
+ Z);x.addEventListener("change",Z);t.addEventListener("change",va);t.addEventListener("input",va);q.forEach(a=>{a.addEventListener("click",function(b){b.stopPropagation();b.preventDefault();wa()})});g&&g.addEventListener("click",function(a){a.stopPropagation();a.preventDefault();wa()});v.addEventListener("click",a=>a.stopPropagation());w.addEventListener("click",a=>a.stopPropagation());x.addEventListener("click",a=>a.stopPropagation());t.addEventListener("click",a=>a.stopPropagation());q=a=>{if(a){var b=
42
+ ()=>setTimeout(()=>ra(a),0);a.addEventListener("mousedown",b,{passive:!0});a.addEventListener("touchstart",b,{passive:!0});a.addEventListener("focus",()=>ra(a))}};q(v);q(w);q(x);q(t);u.addEventListener("click",function(a){a.stopPropagation();a.preventDefault();d&&"input"===d.tagName.toLowerCase()&&d._kcolorFocusHandler&&(d.removeEventListener("focus",d._kcolorFocusHandler),d._focusHandlerPaused=!0);Ca();setTimeout(function(){if(d&&"function"===typeof d.focus){d.focus();if("INPUT"===d.tagName&&"text"===
43
+ d.type){const b=d.value.length;d.setSelectionRange(b,b)}setTimeout(function(){d&&d._focusHandlerPaused&&d._kcolorFocusHandler&&(d.addEventListener("focus",d._kcolorFocusHandler),d._focusHandlerPaused=!1)},1E3)}},0)},!1);document._kcolorEscHandler||(document._kcolorEscHandler=function(a){"Escape"===a.key&&(a=document.querySelector(".color-picker-container.active"))&&a._kcolorElement&&(a=a._kcolorElement)&&a._kcolorHideFunction&&a._kcolorHideFunction()},document.addEventListener("keydown",document._kcolorEscHandler));
44
+ d._kcolorHideFunction=R;P();U();v.value=255;w.value=255;x.value=255;Z();K("#FFFFFF");T();(q=d.hasAttribute("data-kcolor")&&"true"===d.getAttribute("data-kcolor"))||"function"!==typeof y?q&&(d._kcolorActive=!1):(q=qa(h.openDelay),0<q?setTimeout(()=>{L()},q):L());window.closeKcolorPicker||(window.closeKcolorPicker=function(){document.querySelectorAll(".color-picker-container.active").forEach(function(a){a._kcolorElement&&a._kcolorElement._kcolorHideFunction&&a._kcolorElement._kcolorHideFunction()})});
45
+ return this};$.fn.Kcolor=function(H,y,g){return $.Kcolor.call(this,H,y,g)};
@@ -0,0 +1,61 @@
1
+ const AJAX_CONFIG={VERSION:"5.0",DEFAULT_TIMEOUT:3E4,TEST_URL_PATTERN:"http://host",CALLBACK_PREFIX:"ajax_callback_",REQUEST_PREFIX:"req_",JSONP_CALLBACK_PREFIX:"jsonp_callback_",SUCCESS_CALLBACK_PREFIX:"ajax_success_",ERROR_CALLBACK_PREFIX:"ajax_error_",HTTP_RESPONSE_PREFIX:"httpResponse_",HTTP_ERROR_PREFIX:"httpError_",MAX_CALLBACK_RETRY:3,BRIDGE_FALLBACK_DELAY:100,DEFAULT_CONTENT_TYPE:"application/x-www-form-urlencoded; charset=UTF-8",FILE_URL_HANDLING:{FORCE_WEBVIEW_BRIDGE:!0,DISABLE_FALLBACK:!0,
2
+ IMMEDIATE_BRIDGE_CHECK:!0,ENHANCED_TIMEOUT:6E4,LOG_ALL_STEPS:!0},DETECTION:{URL_SCHEME_PRIORITY:1,BRIDGE_EXISTENCE_PRIORITY:2,USER_AGENT_PRIORITY:3,URL_SCHEMES:{"file://":"webview_bridge","content://":"webview_bridge","android_asset://":"webview_bridge","http://":"auto","https://":"auto"}},BRIDGE:{ANDROID_BRIDGES:[{name:"AndroidBridge",method:"httpRequest",priority:1},{name:"Android",method:"httpRequest",priority:2}],IOS_BRIDGE:{name:"webkit.messageHandlers.httpRequest",priority:1},FILE_URL_CONFIG:{timeout:6E4,
3
+ retries:2,immediate_execution:!0}},DEBUG:{ENABLED:!1,FILE_URL_VERBOSE:!0,BRIDGE_CALL_TRACE:!0,STEP_BY_STEP_LOG:!0,CONSOLE_PREFIX:"[AJAX5-FILE]"}},customBridges=new Map,bridgePriority={custom:1,android:2,ios:3,web:4},domquery_SCRIPT_STORAGE_PREFIX="ajax_script_",domquery_SCRIPT_STORAGE_EXPIRY=864E5,domquery_hashString=a=>{let b=0;if(!a)return"0";for(let d=0;d<a.length;d++){const c=a.charCodeAt(d);b=(b<<5)-b+c;b&=b}return Math.abs(b).toString(36)},domquery_scriptRegistry=new Map,domquery_SCRIPT_STATES=
4
+ {STORED:"stored",LOADED:"loaded",EXECUTED:"executed",ERROR:"error",REMOVED:"removed"},domquery_isScriptAlreadyLoaded=(a,b)=>{for(const [,d]of domquery_scriptRegistry.entries())if(d.state===domquery_SCRIPT_STATES.EXECUTED&&(a&&d.src===a||!a&&b&&d.content===b))return!0;return!1},domquery_extractAndStoreScripts=(a,b)=>{if(!a||"string"!==typeof a)return a;if("undefined"===typeof DOMParser)return{cleanHtml:a,storageKeys:[],skippedCount:0};a=(new DOMParser).parseFromString(a,"text/html");const d=[];let c=
5
+ 0;a.querySelectorAll("script").forEach((e,f)=>{var h=e.src||null;const g=e.textContent||null;if(domquery_isScriptAlreadyLoaded(h,g))c++;else{var l=h?`${domquery_SCRIPT_STORAGE_PREFIX}src_${domquery_hashString(h)}`:g?`${domquery_SCRIPT_STORAGE_PREFIX}content_${domquery_hashString(g)}`:`${domquery_SCRIPT_STORAGE_PREFIX}${f}_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;h={src:h,content:g,type:e.type||"text/javascript",async:e.async||!1,defer:e.defer||!1,timestamp:Date.now(),originalUrl:b||
6
+ null};try{if("undefined"!==typeof localStorage){const k=localStorage.getItem(l);if(k)try{const r=JSON.parse(k);r.timestamp=Date.now();localStorage.setItem(l,JSON.stringify(r))}catch(r){localStorage.setItem(l,JSON.stringify(h))}else localStorage.setItem(l,JSON.stringify(h))}}catch(k){}d.push(l);domquery_scriptRegistry.set(l,{...h,state:domquery_SCRIPT_STATES.STORED,registeredAt:Date.now(),index:f})}e.remove()});return{cleanHtml:a.documentElement.outerHTML,storageKeys:d,skippedCount:c}},domquery_processScriptWithFunctionCall=
7
+ (a,b)=>{if(!a||"string"!==typeof a||!b)return{processedContent:a,extractedTexts:[]};const d=new Map;var c=a.split("\n");const e=[...c];let f=!1,h=0;c.forEach((g,l)=>{if(g.includes("// domqGLG")&&(!g.match(/\/\/\s*domqGLG_(\w+)/)||g.match(/\/\/\s*domqGLG\s+(\[[^\]]+\])/))){var k=null,r=[],t=g.match(/\/\/\s*domqGLG(?:_\w+)?\s+(\[[^\]]+\])/);if(t){t=t[1];const u=[];try{var m=t.replace(/'/g,'"');const v=JSON.parse(m);Array.isArray(v)&&0<v.length&&v.forEach(q=>{"string"===typeof q&&u.push(q)})}catch(v){(m=
8
+ t.match(/['"]([^'"]+)['"]/g))&&m.forEach(q=>{u.push(q.replace(/^['"]|['"]$/g,""))})}if(0<u.length){for(var n of u){d.has(n)||(d.set(n,h++),r.push(n));const v=d.get(n);g=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");let q=!1;k=new RegExp(`(title\\s*:\\s*)(['"])${g}\\2`,"gi");m=new RegExp(`(title\\s*:\\s*)(\`)${g}\\2`,"gi");k.test(e[l])?e[l]=e[l].replace(k,(w,x,y)=>{q=f=!0;return`${x}${b}(${v})`}):m.test(e[l])&&(e[l]=e[l].replace(m,(w,x,y)=>{q=f=!0;return`${x}${b}(${v})`}));if(!q){g=[new RegExp(`(["'])${g}\\1`,
9
+ "g"),new RegExp(`(\`)${g}\\1`,"g")];for(var p of g)if(p.test(e[l])&&(e[l]=e[l].replace(p,(w,x)=>{q=f=!0;return`${b}(${v})`}),q))break}}return}}k||(n=g.match(/^\s*([\[\{].+?[\]\}])\s*,?\s*\/\/\s*domqGLG/))&&(k=n[1].trim());k||(n=g.match(/^\s*"[^"]+":\s*(.+?)\s*,?\s*\/\/\s*domqGLG/))&&(k=n[1].trim().replace(/,\s*$/,""));k||(n=g.indexOf("// domqGLG"),0<n&&(n=g.substring(0,n).trim(),p=n.indexOf("="),0<=p&&(k=n.substring(p+1).trim(),k=k.replace(/[;,]\s*$/,""),k=k.startsWith("[")||k.startsWith("{")?k:k.replace(/^["'`]|["'`]$/g,
10
+ ""))),k||!(n=g.match(/=\s*(.+?)\s*[;,]?\s*\/\/\s*domqGLG/)))||(k=n[1].trim().replace(/[;,]\s*$/,""),k=k.startsWith("[")||k.startsWith("{")?k:k.replace(/^["'`]|["'`]$/g,""));k||(n=g.match(/(["'`])(.+?)\1/))&&(k=n[2]);k||(n=g.indexOf("// domqGLG"),0<n&&(g=g.substring(0,n).match(/['"]([^'"]+)['"][^'"]*$/))&&(k=g[1]));if(k&&!k.startsWith("[")&&!k.startsWith("{")){d.has(k)||(d.set(k,h++),r.push(k));const u=d.get(k);r=k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");g=new RegExp(`(title\\s*:\\s*)(['"])${r}\\2`,
11
+ "gi");k=new RegExp(`(title\\s*:\\s*)(\`)${r}\\2`,"gi");let v=!1;g.test(e[l])?e[l]=e[l].replace(g,(q,w,x)=>{v=f=!0;return`${w}${b}(${u})`}):k.test(e[l])&&(e[l]=e[l].replace(k,(q,w,x)=>{v=f=!0;return`${w}${b}(${u})`}));v||[new RegExp(`(["'])${r}\\1`,"g"),new RegExp(`(\`)${r}\\1`,"g")].forEach(q=>{q.test(e[l])&&(e[l]=e[l].replace(q,()=>{f=!0;return`${b}(${u})`}))})}}});c=Array.from(d.keys());return{processedContent:f?e.join("\n"):a,extractedTexts:c}},domquery_generateArrayVarName=a=>{if(!a||"string"!==
12
+ typeof a)return"script_txt";try{const b=(new URL(a,window.location.origin)).pathname.split("/").pop();if(!b)return"script_txt";const d=b.split(".")[0].replace(/[^a-zA-Z0-9_]/g,"_");return d?`${d}_script_txt`:"script_txt"}catch(b){return"script_txt"}},domquery_generateTranslationKey=a=>a&&"string"===typeof a?"Gong_"+a.replace(/\s+/g,"_").replace(/[^\uac00-\ud7a3a-zA-Z0-9_]/g,""):"",domquery_createTranslationDiv=(a,b)=>{if(!a||0===a.length)return null;if(b&&"string"===typeof b){var d=b.trim();d&&(domquery_urlToDivMap[d]=
13
+ !0)}b=domquery_generateArrayVarName(b);const c=`domquery-${b}-data`;(d=document.getElementById(c))&&d.remove();d=a.map(h=>({text:h,key:domquery_generateTranslationKey(h)}));const e=document.createElement("div");e.id=c;e.style.display="none";e.setAttribute("data-array-name",b);e.setAttribute("data-texts",JSON.stringify(a));e.setAttribute("data-text-keys",JSON.stringify(d));if(document.body)document.body.appendChild(e);else{const h=()=>{document.body?document.body.appendChild(e):setTimeout(h,10)};h()}d=
14
+ `${b}_fun`;const f=`${b}_data`;window[f]||(window[f]=a);window[d]=function(h){var g=document.getElementById(c);if(g&&(g=g.getAttribute("data-texts")))try{const l=JSON.parse(g);return void 0!==l[h]?l[h]:""}catch(l){}return window[f]&&void 0!==window[f][h]?window[f][h]:""};return{divId:c,arrayVarName:b,funName:d,dataArrayName:f}},domquery_updateTranslationDiv=(a,b)=>{if(!a||!b||!Array.isArray(b))return!1;var d=domquery_generateArrayVarName(a);a=`${d}_data`;d=document.getElementById(`domquery-${d}-data`);
15
+ if(!d)return!1;d.setAttribute("data-texts",JSON.stringify(b));window[a]&&(window[a]=b);if(window._domqGLGTranslationCache&&(a=d.getAttribute("data-text-keys")))try{JSON.parse(a).forEach((c,e)=>{c.key&&void 0!==b[e]&&(c=c.key.startsWith("Gong_")?c.key:`Gong_${c.key}`,window._domqGLGTranslationCache[c]=b[e])})}catch(c){}return!0},domquery_updateTranslationDivFromJSON=(a,b)=>{if(!a||!b||"object"!==typeof b)return!1;var d=domquery_generateArrayVarName(a);d=document.getElementById(`domquery-${d}-data`);
16
+ if(!d)return!1;d=d.getAttribute("data-text-keys");if(!d)return!1;d=JSON.parse(d).map(({text:f,key:h})=>{if(h=b[h]){if("string"===typeof h&&h.startsWith("[")&&h.endsWith("]"))try{const g=JSON.parse(h.replace(/'/g,'"'));return Array.isArray(g)&&0<g.length?g[0]:h}catch(g){}return h}return f});if(!domquery_updateTranslationDiv(a,d))return!1;let c=0;const e=()=>{"function"===typeof window.domquery_convertDataArrayPropertiesAfterTranslation?window.domquery_convertDataArrayPropertiesAfterTranslation():10>
17
+ c&&(c++,setTimeout(e,50))};setTimeout(e,50);return!0},domquery_updateAllTranslationDivs=a=>{if(!a||"object"!==typeof a)return!1;let b=0,d=0;Object.keys(a).forEach(c=>{domquery_updateTranslationDiv(c,a[c])?b++:d++});return{success:b,failed:d}};window.domquery_updateTranslationDiv=domquery_updateTranslationDiv;window.domquery_updateAllTranslationDivs=domquery_updateAllTranslationDivs;window.domquery_updateTranslationDivFromJSON=domquery_updateTranslationDivFromJSON;
18
+ window.domquery_loadTranslationAndUpdate=function(a,b){$.ajax({url:b,dataType:"json",success:function(d){domquery_updateTranslationDivFromJSON(a,d)},error:function(d,c,e){}})};
19
+ const domquery_loadAndExecuteScripts=(a,b)=>{if(a&&Array.isArray(a)){var d=[],c=[];a.forEach(e=>{try{if("undefined"!==typeof localStorage){var f=localStorage.getItem(e);if(f){const g=JSON.parse(f);if(Date.now()-g.timestamp>domquery_SCRIPT_STORAGE_EXPIRY)localStorage.removeItem(e);else{try{localStorage.removeItem(e)}catch(l){}if(g.content){const l=domquery_generateArrayVarName(b||g.originalUrl||"");f=`${l}_fun`;var h=domquery_processScriptWithFunctionCall(g.content,f);d.push(...h.extractedTexts);let k=
20
+ h.processedContent;const r=k.split("\n");h=[];for(let t=0;t<r.length;t++){const m=r[t],n=m.match(/(?:const|let|var)\s+(\w+Data)\s*=\s*\[/);if(n){const p=n[1];(new RegExp(`window\\.${p}\\s*=`,"g")).test(k)||h.push({lineIndex:t,varName:p,line:m})}if(0<h.length){const p=h[h.length-1];m.includes("];")&&t>p.lineIndex&&(r.splice(t+1,0,` window.${p.varName} = ${p.varName};`),h.pop(),t++)}}k=r.join("\n");c.push({storageKey:e,scriptData:g,processedContent:k,arrayVarName:l,funName:f,originalContent:g.content})}else g.src&&
21
+ c.push({storageKey:e,scriptData:g,processedContent:null,arrayVarName:null,funName:null,originalContent:null})}}}}catch(g){}});0<d.length&&(a=[...(new Set(d))],domquery_createTranslationDiv(a,b));c.forEach(({storageKey:e,scriptData:f,processedContent:h,funName:g,originalContent:l})=>{try{const k=document.createElement("script");k.type=f.type;k.async=f.async;k.defer=f.defer;f.src?k.src=f.src:null!==h&&(k.textContent=h);k.onload=()=>{var t=domquery_scriptRegistry.get(e);t&&(t.state=domquery_SCRIPT_STATES.EXECUTED,
22
+ t.executedAt=Date.now());if(h&&g&&l){t=new RegExp(`title:\\s*${g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\((\\d+)\\)`,"g");const m=[...h.matchAll(t)];0<m.length&&setTimeout(()=>{try{for(const n in window)if(n.endsWith("Data")&&Array.isArray(window[n])){const p=window[n];m.forEach(u=>{const v=parseInt(u[1]);if(v<p.length&&p[v]&&"object"===typeof p[v]&&(u=p[v],"title"in u)){const q=u.title;Object.defineProperty(u,"title",{get:function(){if("function"===typeof window[g])try{return window[g](v)||q}catch(w){}return q},
23
+ enumerable:!0,configurable:!0})}})}}catch(n){}},100)}};k.onerror=()=>{const t=domquery_scriptRegistry.get(e);t&&(t.state=domquery_SCRIPT_STATES.ERROR,t.errorAt=Date.now())};document.head.appendChild(k);let r=domquery_scriptRegistry.get(e);r&&(r.state=domquery_SCRIPT_STATES.LOADED,r.loadedAt=Date.now())}catch(k){}})}},domquery_cleanupExpiredScripts=()=>{if("undefined"!==typeof localStorage)try{const a=Object.keys(localStorage).filter(e=>e.startsWith(domquery_SCRIPT_STORAGE_PREFIX));let b=0;const d=
24
+ Date.now();a.forEach(e=>{try{if(e.includes("_src_")||e.includes("_content_")){var f=localStorage.getItem(e);if(f){const h=JSON.parse(f);d-h.timestamp>domquery_SCRIPT_STORAGE_EXPIRY&&(localStorage.removeItem(e),b++)}else localStorage.removeItem(e),b++}else localStorage.removeItem(e),b++}catch(h){localStorage.removeItem(e),b++}});0<b&&a.forEach(e=>{localStorage.getItem(e)||domquery_scriptRegistry.delete(e)});const c=Date.now();for(const [e,f]of domquery_scriptRegistry.entries())f.state===domquery_SCRIPT_STATES.EXECUTED&&
25
+ f.executedAt?36E5<c-f.executedAt&&domquery_scriptRegistry.delete(e):f.state===domquery_SCRIPT_STATES.ERROR&&f.errorAt?36E5<c-f.errorAt&&domquery_scriptRegistry.delete(e):f.registeredAt&&36E5<c-f.registeredAt&&domquery_scriptRegistry.delete(e)}catch(a){}},generateUUID=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){const b=16*Math.random()|0;return("x"===a?b:b&3|8).toString(16)}),generateCallbackName=(a=AJAX_CONFIG.CALLBACK_PREFIX)=>a+Date.now()+"_"+generateUUID().substring(0,
26
+ 8),parseXML=a=>(new DOMParser).parseFromString(a,"text/xml"),callAjaxEvent=(a,b,d,c)=>{if(a&&"function"===typeof a)try{a(b,d,c)}catch(e){}},createXhrData=(a,b)=>a||b?{readyState:a?4:0,status:a?a.status:0,statusText:a?a.statusText:b?b.message:"",responseText:a&&a.text?a.text:"",responseXML:a&&a.text&&a.headers&&a.headers.get("content-type")?.includes("xml")?parseXML(a.text):null,getResponseHeader:d=>a?a.headers.get(d):null,getAllResponseHeaders:()=>{if(!a||!a.headers)return"";let d="";for(const [c,
27
+ e]of a.headers.entries())d+=`${c}: ${e}\r\n`;return d},setRequestHeader:()=>{},overrideMimeType:()=>{}}:null,isFileUrl=a=>a?["file://","content://","android_asset://"].some(b=>a.toLowerCase().startsWith(b)):!1,detectAvailableBridges=()=>{const a=[];for(const b of AJAX_CONFIG.BRIDGE.ANDROID_BRIDGES)window[b.name]&&window[b.name][b.method]&&a.push({type:"android",name:b.name,method:b.method,priority:b.priority,available:!0});window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.httpRequest&&
28
+ a.push({type:"ios",name:"webkit.messageHandlers",method:"httpRequest",priority:AJAX_CONFIG.BRIDGE.IOS_BRIDGE.priority,available:!0});return a.sort((b,d)=>b.priority-d.priority)},detectEnvironmentAjax=(a,b=null)=>{if(isFileUrl(a))return a=detectAvailableBridges(),0<a.length?{type:"webview_bridge",bridges:a,reason:"file_url_detected"}:{type:"webview_bridge_required",bridges:[],reason:"file_url_no_bridge"};if(b&&("android"===b||"ios"===b))return{type:"webview_bridge",bridges:detectAvailableBridges().filter(d=>
29
+ d.type===b),reason:"forced_app_setting"};a=detectAvailableBridges();return 0<a.length?{type:"webview_bridge",bridges:a,reason:"bridge_available"}:{type:"web",bridges:[],reason:"no_bridge_detected"}},prepareBridgeData=a=>({url:a.url,method:a.method||"GET",data:a.data||{},headers:a.headers||{},timeout:isFileUrl(a.url)?AJAX_CONFIG.FILE_URL_HANDLING.ENHANCED_TIMEOUT:a.timeout,dataType:a.dataType||"text"}),executeAndroidBridge=(a,b)=>new Promise((d,c)=>{const e=window[a.name];let f=setTimeout(()=>{c(Error("Android bridge timeout"))},
30
+ b.timeout||AJAX_CONFIG.DEFAULT_TIMEOUT);try{if("AndroidBridge"===a.name&&e.httpRequest){const h=generateCallbackName(AJAX_CONFIG.SUCCESS_CALLBACK_PREFIX),g=generateCallbackName(AJAX_CONFIG.ERROR_CALLBACK_PREFIX);window[h]=function(l){f&&(clearTimeout(f),f=null);try{const k="string"===typeof l?JSON.parse(l):l;delete window[h];delete window[g];d(k.data||k)}catch(k){c(k)}};window[g]=function(l){f&&(clearTimeout(f),f=null);delete window[h];delete window[g];c(Error(l.message||l))};e.httpRequest(JSON.stringify(b),
31
+ h,g)}else if("Android"===a.name&&e.httpRequest){const h=e.httpRequest(JSON.stringify(b));f&&(clearTimeout(f),f=null);const g=JSON.parse(h);d(g.data||g)}else f&&(clearTimeout(f),f=null),c(Error(`Android bridge method not found: ${a.name}.${a.method}`))}catch(h){f&&(clearTimeout(f),f=null),c(h)}}),executeIosBridge=(a,b)=>new Promise((d,c)=>{const e=b.timeout||AJAX_CONFIG.DEFAULT_TIMEOUT,f=generateCallbackName(AJAX_CONFIG.REQUEST_PREFIX);let h=setTimeout(()=>{g();c(Error("iOS bridge timeout"))},e);const g=
32
+ ()=>{h&&(clearTimeout(h),h=null);delete window[AJAX_CONFIG.HTTP_RESPONSE_PREFIX+f];delete window[AJAX_CONFIG.HTTP_ERROR_PREFIX+f]};try{window[AJAX_CONFIG.HTTP_RESPONSE_PREFIX+f]=function(l){g();try{const k="string"===typeof l?JSON.parse(l):l;d(k.data||k)}catch(k){c(k)}},window[AJAX_CONFIG.HTTP_ERROR_PREFIX+f]=function(l){g();c(Error(l.message||l))},window.webkit.messageHandlers.httpRequest.postMessage({...b,requestId:f})}catch(l){g(),c(l)}}),executeWebViewBridge=async(a,b)=>{const d=isFileUrl(a.url);
33
+ if(!b.bridges||0===b.bridges.length){if(d)throw Error("No WebView bridges available. File URL requires WebView bridge.");throw Error("No WebView bridges available");}a=prepareBridgeData(a);for(const c of b.bridges)try{let e;if("android"===c.type)e=await executeAndroidBridge(c,a);else if("ios"===c.type)e=await executeIosBridge(c,a);else throw Error(`Unsupported bridge type: ${c.type}`);return e}catch(e){if(!d)throw e;}throw Error(`All WebView bridges failed for ${d?"file":"HTTP"} URL`);},handleCustomBridge=
34
+ (a,b)=>{const d=customBridges.get(a);return d&&d.ajax?new Promise((c,e)=>{let f=null;0<b.timeout&&(f=setTimeout(()=>{e(Error("Custom bridge timeout"))},b.timeout));try{callAjaxEvent(b.ajaxStart,null,null,b);callAjaxEvent(b.ajaxSend,null,null,b);const h=d.ajax(b);h&&"function"===typeof h.then?h.then(g=>{f&&(clearTimeout(f),f=null);const l=createXhrData({status:g.status||200,statusText:g.statusText||"OK",text:g.data||g,headers:new Headers(g.headers||{})},null);callAjaxEvent(b.ajaxSuccess,g.data||g,
35
+ "success",l);callAjaxEvent(b.success,g.data||g,"success",l);callAjaxEvent(b.complete,l,"success");callAjaxEvent(b.ajaxStop);c(g.data||g)}).catch(g=>{f&&(clearTimeout(f),f=null);const l=createXhrData(null,g);callAjaxEvent(b.ajaxError,l,"error",g);callAjaxEvent(b.error,l,"error",g);callAjaxEvent(b.complete,l,"error");callAjaxEvent(b.ajaxStop);e(g)}):(f&&(clearTimeout(f),f=null),e(Error("Custom bridge must return a Promise")))}catch(h){f&&(clearTimeout(f),f=null),e(h)}}):Promise.reject(Error(`Custom bridge ${a} not available`))};
36
+ $.ajax=function(a,b){function d(){callAjaxEvent(c.ajaxStart,null,null,c);return"jsonp"===c.dataType?(callAjaxEvent(c.ajaxSend,null,null,c),new Promise((f,h)=>{const g=(new URLSearchParams(c.data)).toString(),l="function"===typeof c.jsonpCallback?c.jsonpCallback():c.jsonpCallback,k=encodeURIComponent(l),r=window[l],t="function"===typeof r,m=document.createElement("script"),n=c.url.includes("?")?"&":"?";m.src=`${c.url}${n}${g}&callback=${k}`;let p=null;0<c.timeout&&(p=setTimeout(()=>{u(Error("Timeout"),
37
+ "timeout")},c.timeout));const u=(q,w)=>{p&&clearTimeout(p);const x=createXhrData(null,q);callAjaxEvent(c.ajaxError,x,w||"error",q);callAjaxEvent(c.error,x,w||"error",q);v();callAjaxEvent(c.complete,x,w||"error");callAjaxEvent(c.ajaxStop);h(q)},v=()=>{try{t?window[l]=r:delete window[l],m.parentNode&&m.parentNode.removeChild(m)}catch(q){}};window[l]=function(q){try{t&&r(q);p&&clearTimeout(p);const w=createXhrData({status:200,statusText:"OK",text:"string"===typeof q?q:JSON.stringify(q),headers:new Headers},
38
+ null);callAjaxEvent(c.ajaxSuccess,q,"success",w);callAjaxEvent(c.success,q,"success",w);v();callAjaxEvent(c.complete,w,"success");callAjaxEvent(c.ajaxStop);f(q)}catch(w){u(w,"error")}};m.onerror=function(q){u(Error("Script loading error"),"error")};document.head.appendChild(m)})):new Promise((f,h)=>{var g=c.method;let l=c.url,k={method:g,headers:new Headers(c.headers),cache:c.cache?"default":"no-store",credentials:c.crossDomain?"omit":"same-origin"};!1!==c.contentType&&k.headers.set("Content-Type",
39
+ c.contentType);if("GET"===g&&c.data)if("string"===typeof c.data)l+=(l.includes("?")?"&":"?")+c.data;else{if("object"===typeof c.data){g=new URLSearchParams;for(const [m,n]of Object.entries(c.data))g.append(m,n);l+=(l.includes("?")?"&":"?")+g.toString()}}else if("POST"===g||"PUT"===g||"PATCH"===g||"DELETE"===g){if(c.url.includes(AJAX_CONFIG.TEST_URL_PATTERN)){setTimeout(()=>{let m="";this.elements&&this.elements.length?this.elements.forEach(function(p,u){p&&p.files&&p.files[0]&&(m&&(m+="\n\n"),m+=
40
+ `file_name: file${u}\nfile_value: ${p.files[0].name}`)}):m="Demo response data";const n={readyState:4,status:200,statusText:"OK",responseText:m,responseXML:null,getResponseHeader:()=>null,getAllResponseHeaders:()=>""};callAjaxEvent(c.ajaxSuccess,m,"success",n);callAjaxEvent(c.success,m,"success",n);f(m);callAjaxEvent(c.complete,n,"success");callAjaxEvent(c.ajaxStop)},AJAX_CONFIG.BRIDGE_FALLBACK_DELAY);return}if(c.data instanceof FormData)k.body=c.data,k.headers.delete("Content-Type");else if("string"===
41
+ typeof c.data)k.body=c.data;else if("object"===typeof c.data)if(!1!==c.processData){g=new URLSearchParams;for(const [m,n]of Object.entries(c.data))g.append(m,n);k.body=g.toString()}else{g=new FormData;for(const [m,n]of Object.entries(c.data))g.append(m,n);k.body=g;k.headers.delete("Content-Type")}}callAjaxEvent(c.ajaxSend,null,null,k);let r=null;const t=new AbortController;k.signal=t.signal;0<c.timeout&&(r=setTimeout(()=>{t.abort()},c.timeout));fetch(l,k).then(m=>{r&&clearTimeout(r);if(!m.ok)throw Error(`HTTP error! status: ${m.status}`);
42
+ const n=m.headers.get("content-type")||"";return("json"===c.dataType||n.includes("application/json")?m.text().then(p=>{try{return p?JSON.parse(p):null}catch(u){throw Error(`JSON parse error: ${u.message}`);}}).catch(p=>{throw p;}):"xml"===c.dataType||n.includes("xml")?m.text().then(p=>parseXML(p)):m.text()).then(p=>({data:p,response:m}))}).then(({data:m,response:n})=>{let p=m,u=null;c.script&&"string"===typeof m&&m.includes("<script")&&(m=domquery_extractAndStoreScripts(m,c.url),p=m.cleanHtml,u=m.storageKeys);
43
+ n=createXhrData(n,null);n.responseText="string"===typeof p?p:JSON.stringify(p);callAjaxEvent(c.ajaxSuccess,p,"success",n);callAjaxEvent(c.success,p,"success",n);callAjaxEvent(c.complete,n,"success");callAjaxEvent(c.ajaxStop);u&&0<u.length&&setTimeout(()=>{domquery_loadAndExecuteScripts(u,c.url)},0);f(p)}).catch(m=>{r&&clearTimeout(r);const n="AbortError"===m.name?"timeout":"error",p=createXhrData(null,m);callAjaxEvent(c.ajaxError,p,n,m);callAjaxEvent(c.error,p,n,m);callAjaxEvent(c.complete,p,n);callAjaxEvent(c.ajaxStop);
44
+ h(m)})})}const c={url:a.url||"",method:(a.method||(1===b?"POST":2===b?"GET":"POST")).toUpperCase(),dataType:(a.dataType||"*").toLowerCase(),data:a.data||{},headers:a.headers||{},processData:void 0!==a.processData?a.processData:!0,contentType:void 0!==a.contentType?a.contentType:AJAX_CONFIG.DEFAULT_CONTENT_TYPE,async:void 0!==a.async?a.async:!0,cache:void 0!==a.cache?a.cache:!0,jsonpCallback:a.jsonpCallback||AJAX_CONFIG.JSONP_CALLBACK_PREFIX+Math.round(1E5*Math.random()),timeout:a.timeout||AJAX_CONFIG.DEFAULT_TIMEOUT,
45
+ crossDomain:void 0!==a.crossDomain?a.crossDomain:!0,app:a.app,script:a.script||!1,ajaxStart:a.ajaxStart,ajaxSend:a.ajaxSend,ajaxSuccess:a.ajaxSuccess,ajaxError:a.ajaxError,ajaxComplete:a.ajaxComplete||a.complete,ajaxStop:a.ajaxStop,success:a.success,error:a.error,complete:a.complete},e=isFileUrl(c.url);a=detectEnvironmentAjax(c.url,c.app);return 0<customBridges.size&&(b=Array.from(customBridges.keys()).filter(f=>(f=customBridges.get(f))&&f.isAvailable&&f.isAvailable()),0<b.length)?handleCustomBridge(b[0],
46
+ c):"webview_bridge"===a.type||"webview_bridge_required"===a.type?(callAjaxEvent(c.ajaxStart,null,null,c),callAjaxEvent(c.ajaxSend,null,null,c),executeWebViewBridge(c,a).then(f=>{let h=f,g=null;c.script&&"string"===typeof f&&f.includes("<script")&&(f=domquery_extractAndStoreScripts(f,c.url),h=f.cleanHtml,g=f.storageKeys);f=createXhrData({status:200,statusText:"OK",text:h,headers:new Headers},null);callAjaxEvent(c.ajaxSuccess,h,"success",f);callAjaxEvent(c.success,h,"success",f);callAjaxEvent(c.complete,
47
+ f,"success");callAjaxEvent(c.ajaxStop);g&&0<g.length&&setTimeout(()=>{domquery_loadAndExecuteScripts(g,c.url)},0);return h}).catch(f=>{const h=createXhrData(null,f);callAjaxEvent(c.ajaxError,h,"error",f);callAjaxEvent(c.error,h,"error",f);callAjaxEvent(c.complete,h,"error");callAjaxEvent(c.ajaxStop);if(e&&AJAX_CONFIG.FILE_URL_HANDLING.DISABLE_FALLBACK)throw Error(`File URL access failed: ${f.message}. WebView Bridge required.`);if(!e)return d();throw f;})):d()};
48
+ $.registerCustomBridge=function(a,b){if(!a||"string"!==typeof a)throw Error("Bridge name must be a non-empty string");if(!b||"object"!==typeof b)throw Error("Bridge interface must be an object");if(!b.ajax||"function"!==typeof b.ajax)throw Error("Bridge interface must have an ajax function");b.isAvailable||(b.isAvailable=()=>!0);customBridges.set(a,b);return!0};$.unregisterCustomBridge=function(a){return customBridges.has(a)?(customBridges.delete(a),!0):!1};$.getCustomBridges=function(){return Array.from(customBridges.keys())};
49
+ $.getCustomBridgeInfo=function(a){const b=customBridges.get(a);return b?{name:a,available:b.isAvailable?b.isAvailable():!0,hasAjax:"function"===typeof b.ajax,description:b.description||"No description provided"}:null};$.getAllBridgesStatus=function(){const a=detectAvailableBridges(),b=[];for(const [d,c]of customBridges.entries())b.push({name:d,available:c.isAvailable?c.isAvailable():!0,priority:bridgePriority.custom});return{environment:0<a.length?"webview":"web",standardBridges:a,customBridges:b}};
50
+ $.post=function(a,b,d,c){let e="text";if("string"===typeof a){let f="";if(a.includes("?")){const [h,g]=a.split("?");a=h;f=g}"function"===typeof b?(c=d,d=b,b=f):"object"===typeof b&&null!==b?b={...b,...$.parseQueryString(f)}:"string"!==typeof b&&b||(b=b?b+"&"+f:f);b={url:a,method:"POST",data:b,success:d,error:c,dataType:e}}else b=a,e=b.dataType||"text";b.dataType=e;"json"===e&&(b.contentType="application/json");return $.ajax(b)};
51
+ $.parseQueryString=function(a){return a?a.split("&").reduce((b,d)=>{const [c,e]=d.split("=");c&&(b[decodeURIComponent(c)]=e?decodeURIComponent(e):"");return b},{}):{}};$.getJSON=function(a,b,d){return $.ajax({url:a,data:b,dataType:"json",success:d,method:"GET"})};
52
+ $.get=function(){if(0===arguments.length||"number"===typeof arguments[0]){if(this.elements)return 0===arguments.length?this.elements:this.elements[arguments[0]]}else{if("string"===typeof arguments[0]){var a=arguments[0];if(a.includes("?")){var b=a.split("?");a=b[0];b=b[1]}if("function"===typeof arguments[1])var d=arguments[1],c=arguments[2];else"object"===typeof arguments[1]&&null!==arguments[1]&&(b=arguments[1],d=arguments[2],c=arguments[3])}else if("object"===typeof arguments[0]){var e=arguments[0];
53
+ a=e.url;b=e.data;d=e.success;c=e.dataType;var f=e.error;e=e.jsonpCallback}return"function"===typeof $.ajax?(a={url:a,method:"GET",data:b,dataType:c,success:d,error:f},"jsonp"===c&&e?a.jsonpCallback=e:"json"===c&&(a.contentType="application/json"),$.ajax(a)):null}};$.gets=$.get;
54
+ $.fn.load=function(a,b,d){if("string"!==typeof a)return this.on("load",a);var c=null,e=a;0<a.indexOf(" ")&&(a=a.split(" "),2<=a.length&&(e=a[0],c=a.slice(1).join(" ")));var f=this;$.ajax({url:e,data:b,success:function(h){var g=h;if(c&&"string"===typeof h)try{var l=(new DOMParser).parseFromString(h,"text/html").querySelector(c);l&&(g=l.innerHTML)}catch(k){}f.each(function(){this.innerHTML=g});d&&"function"===typeof d&&d.call(f,g,"success",null)},error:function(h,g,l){d&&"function"===typeof d&&d.call(f,
55
+ null,g,l)}});return this};$.fn.unload=function(a){if("function"===typeof a){var b=function(d){try{a.call(this,d)}catch(c){}};window.addEventListener?window.addEventListener("beforeunload",b):window.attachEvent&&window.attachEvent("onbeforeunload",b);this.removeUnload=function(){window.removeEventListener?window.removeEventListener("beforeunload",b):window.detachEvent&&window.detachEvent("onbeforeunload",b)}}return this};$.load=function(a,b,d){return $(document.body).load(a,b,d)};
56
+ $.unload=function(a){return $(window).on("beforeunload",a)};$.fn.ajax=function(a,b){return $.ajax.call(this,a,b)};$.fn.post=function(a,b,d,c){return $.post.apply(this,arguments)};$.fn.getJSON=function(a,b,d){return $.getJSON.apply(this,arguments)};$.fn.get=function(){return $.get.apply(this,arguments)};$.fn.gets=$.fn.get;
57
+ $.ajaxDebug=function(a){if(void 0===a)return window.AJAX_DEBUG||AJAX_CONFIG.DEBUG.ENABLED||!1;window.AJAX_DEBUG=!!a;AJAX_CONFIG.DEBUG.ENABLED=!!a;"undefined"!==typeof localStorage&&(a?localStorage.setItem("ajax_debug","true"):localStorage.removeItem("ajax_debug"));return a};$.detectWebView=function(){return 0<detectAvailableBridges().length?"webview":"web"};$.checkWebViewBridge=function(){return $.getAllBridgesStatus()};
58
+ $.ajaxConstants=function(a,b){if(0===arguments.length)return{...AJAX_CONFIG};if(1===arguments.length)return AJAX_CONFIG[a];if(2===arguments.length)return AJAX_CONFIG.hasOwnProperty(a)?AJAX_CONFIG[a]=b:null};$.getBridgePriority=function(){return{...bridgePriority}};$.ajaxStatus=function(){const a=detectEnvironmentAjax("http://test.com");return{version:AJAX_CONFIG.VERSION,environment:a,bridges:detectAvailableBridges(),customBridges:$.getCustomBridges(),config:AJAX_CONFIG,debugMode:$.ajaxDebug(),fileUrlHandling:AJAX_CONFIG.FILE_URL_HANDLING}};
59
+ $.ajaxConfig=function(a,b){if(0===arguments.length)return AJAX_CONFIG;if(1===arguments.length){var d=a.split("."),c=AJAX_CONFIG,e;for(e of d){if(void 0===c[e])return;c=c[e]}return c}if(2===arguments.length){d=a.split(".");c=AJAX_CONFIG;for(e=0;e<d.length-1;e++)c[d[e]]||(c[d[e]]={}),c=c[d[e]];e=c[d[d.length-1]];c[d[d.length-1]]=b;return e}};
60
+ $.testFileUrl=function(a){return $.ajax({url:a||"./test.txt",method:"GET",success:function(b){console.log("File URL test successful",{dataLength:b?b.length:0})},error:function(b){console.error("File URL test failed",b)}})};"file:"===location.protocol&&(AJAX_CONFIG.FILE_URL_HANDLING.FORCE_WEBVIEW_BRIDGE=!0,AJAX_CONFIG.DEBUG.FILE_URL_VERBOSE=!0);const domquery_urlToDivMap={},domqueryTranslationInterface={urlToDivMap:domquery_urlToDivMap,updateTranslationDivFromJSON:domquery_updateTranslationDivFromJSON};
61
+ window.domqueryTranslationInterface=domqueryTranslationInterface;(function(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){domquery_cleanupExpiredScripts()}):domquery_cleanupExpiredScripts();setInterval(function(){domquery_cleanupExpiredScripts()},6E5)})();