@filteringdev/namulink 20.2.1 → 20.3.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.
- package/dist/NamuLink.user.js +10 -6
- package/package.json +1 -1
package/dist/NamuLink.user.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// @downloadURL https://cdn.jsdelivr.net/npm/@filteringdev/namulink@latest/dist/NamuLink.user.js
|
|
9
9
|
// @license MPL-2.0
|
|
10
10
|
//
|
|
11
|
-
// @version 20.
|
|
11
|
+
// @version 20.3.0
|
|
12
12
|
// @author PiQuark6046 and contributors
|
|
13
13
|
//
|
|
14
14
|
// @grant unsafeWindow
|
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
//
|
|
21
21
|
// @match *://namu.wiki/*
|
|
22
22
|
// ==/UserScript==
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(()=>{function b(e,o={}){let n=o.QuietMs??120,t=o.EventName??"vue:settled",a=o.ChangeEventName??"vue:dom-changed",m=o.UrlChange??"vue:url-changed";if(!(e instanceof HTMLElement))throw new TypeError("TargetEl must be an HTMLElement");let s=-1,u=0,c=!1,g=performance.now(),E=new URL(location.href),S=f=>{e.dispatchEvent(new CustomEvent(a,{detail:{Seq:u,At:g,MutationCount:f.length,Mutations:f}}))},v=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{c||e.dispatchEvent(new CustomEvent(t,{detail:{Seq:u,QuietMs:n,SettledAt:performance.now(),ElapsedSinceLastMutation:performance.now()-g,Target:e}}))})})},p=()=>{let f=new URL(location.href);f.href!==E.href&&(E=f,e.dispatchEvent(new CustomEvent(m,{detail:{Seq:u,At:performance.now(),URL:f}})))},i=()=>{clearTimeout(s),s=setTimeout(v,n)},h=new MutationObserver(f=>{u+=1,g=performance.now(),S(f),f.flatMap(d=>[...d.addedNodes,...d.removedNodes,...d.nextSibling?[d.nextSibling]:[],...d.previousSibling?[d.previousSibling]:[],...d.target?[d.target]:[]]).length>=15&&(i(),setTimeout(i,n*3)),p()});return h.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),i(),{Disconnect(){c=!0,clearTimeout(s),h.disconnect(),e.dispatchEvent(new CustomEvent("vue:observer-disconnected",{detail:{Target:e}}))}}}function L(e,o=document.documentElement){return new Promise(n=>{let t=o.querySelector(e);if(t&&t instanceof HTMLElement){n(t);return}let a=new MutationObserver(()=>{let m=o.querySelector(e);m&&m instanceof HTMLElement&&(a.disconnect(),n(m))});a.observe(o,{subtree:!0,childList:!0,attributes:!0})})}function x(e){let o=e.trim();if(!o||o==="none")return null;let n=o.match(/^url\((.*)\)$/i);if(!n)return null;let t=n[1].trim();return(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),t}function T(e,o){let n=o;for(;n;){let t=e.getComputedStyle(n).backgroundColor;if(t&&t!=="transparent"&&t!=="rgba(0, 0, 0, 0)")return t;n=n.parentElement}return"rgb(255, 255, 255)"}function M(e,o,n){let t=new Set;function a(s){s&&(s==="transparent"||s==="rgba(0, 0, 0, 0)"||t.add(s))}a(n);let m=e.getComputedStyle(o);if(a(m.backgroundColor),a(m.color),a(e.getComputedStyle(e.document.documentElement).backgroundColor),e.document.body){let s=e.getComputedStyle(e.document.body);a(s.backgroundColor),a(s.color)}return a("rgb(255, 255, 255)"),a("rgb(0, 0, 0)"),[...t]}function I(e,o){if(o instanceof e.HTMLImageElement)return o.currentSrc||o.src||""||null;let n=e.getComputedStyle(o).backgroundImage;return x(n)}function H(e,o){let n=0,t=new Map;o.addEventListener("message",u=>{let c=u.data;if(!c||!("RequestId"in c))return;let g=t.get(c.RequestId);if(g){if(t.delete(c.RequestId),c.Kind==="detect-result"){g.Resolve(c.Result);return}g.Reject(new Error(c.Error))}});function a(u){let c=`ocr-${Date.now()}-${n++}`,g={Kind:"detect",RequestId:c,...u};return new Promise((E,S)=>{t.set(c,{Resolve:E,Reject:S}),o.postMessage(g)})}async function m(u,c){let g=I(e,u);if(!g)return null;let E=await R(e,u,g),S=T(e,u),v=M(e,u,S);return a({ImageData:E,BackgroundCandidates:v,FontCandidates:c?.FontCandidates,ScoreThreshold:c?.ScoreThreshold})}async function s(u){let c=await R(e,u.HostElement,u.SourceUrl),g=T(e,u.HostElement),E=M(e,u.HostElement,g);return a({ImageData:c,BackgroundCandidates:E,FontCandidates:u.FontCandidates,ScoreThreshold:u.ScoreThreshold})}return{DetectFromElement:m,DetectFromSource:s,Terminate(){for(let u of t.values())u.Reject(new Error("OCR worker terminated"));t.clear(),o.terminate()}}}function k(e){return/^data:image\/svg\+xml(?:[;,]|$)/i.test(e)}function V(e,o){let n=e.atob(o),t=new Uint8Array(n.length);for(let a=0;a<n.length;a++)t[a]=n.charCodeAt(a);return new TextDecoder().decode(t)}function q(e,o){let n=o.indexOf(",");if(n<0)throw new Error("Invalid SVG data URL");let t=o.slice(0,n).toLowerCase(),a=o.slice(n+1);return t.includes(";base64")?V(e,a):decodeURIComponent(a)}function z(e,o,n,t){let m=new e.DOMParser().parseFromString(o,"image/svg+xml");if(m.querySelector("parsererror"))throw new Error("Failed to parse SVG markup");let s=m.documentElement;if(!s||s.nodeName.toLowerCase()!=="svg")throw new Error("SVG root element not found");return s.getAttribute("xmlns")||s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.getAttribute("width")||s.setAttribute("width",String(n)),s.getAttribute("height")||s.setAttribute("height",String(t)),new e.XMLSerializer().serializeToString(m)}function U(e){return e.complete&&e.naturalWidth>0?Promise.resolve():new Promise((o,n)=>{function t(){e.removeEventListener("load",a),e.removeEventListener("error",m)}function a(){t(),o()}function m(){t(),n(new Error("Failed to load SVG image"))}e.addEventListener("load",a),e.addEventListener("error",m)})}async function N(e,o){let n=new e.Image;n.decoding="async",n.src=o;try{if(await n.decode(),n.naturalWidth>0)return n}catch{}return await U(n),n}function w(e){return typeof e=="string"&&/^image\/svg\+xml(?:\s*;|$)/i.test(e)}function O(e,o){let n=o.getBoundingClientRect(),t=Math.max(1,e.devicePixelRatio||1);return{Width:Math.max(1,Math.round((n.width||o.clientWidth||96)*t)),Height:Math.max(1,Math.round((n.height||o.clientHeight||32)*t))}}async function P(e,o,n){let{Width:t,Height:a}=O(e,o),m=z(e,n,t,a),s=e.URL.createObjectURL(new e.Blob([m],{type:"image/svg+xml"}));try{let u=await N(e,s),c=e.document.createElement("canvas");c.width=t,c.height=a;let g=c.getContext("2d",{willReadFrequently:!0});if(!g)throw new Error("2D context unavailable");return g.clearRect(0,0,t,a),g.drawImage(u,0,0,t,a),g.getImageData(0,0,t,a)}finally{e.URL.revokeObjectURL(s)}}async function Z(e,o){let n=await e.createImageBitmap(o);try{let t=e.document.createElement("canvas");t.width=n.width,t.height=n.height;let a=t.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("2D context unavailable");return a.drawImage(n,0,0),a.getImageData(0,0,t.width,t.height)}finally{n.close()}}async function R(e,o,n){if(k(n)){let a=q(e,n);return await P(e,o,a)}let t=await new Promise((a,m)=>{GM.xmlHttpRequest({url:n,method:"GET",responseType:"blob",onload:s=>{if(s.status<200||s.status>=300){m(new Error(`Failed to fetch image: ${s.status} ${s.statusText}`));return}let u=s.response;if(!(u instanceof Blob)){m(new Error("Failed to fetch image: invalid blob response"));return}let c=s.responseHeaders.match(/^content-type:\s*(.+)$/im),g=c?c[1].trim():null;a({BlobData:u,ContentTypeHeader:g})},onerror:m,ontimeout:m})});if(w(t.BlobData.type)||w(t.ContentTypeHeader)){let a=await t.BlobData.text();return await P(e,o,a)}return await Z(e,t.BlobData)}var $=typeof unsafeWindow<"u"?unsafeWindow:window;async function _(e,o="NamuLink"){let n=e.Reflect.apply,t=[[/function *[A-Za-z0-9]+ *\([A-Za-z0-9]+ * *\) *{ *function *[A-Za-z0-9]+ *\( *[a-zA-Z]+ *, *[A-Za-z]+ *\) *{ *return *[A-Za-z0-9]+ *\( */,/{ *return *[A-Za-z0-9]+ *\( *[a-zA-Z]+[- ]*0x[a-f0-9]+ *, *[a-zA-Z]+ *\) *; *\} *[A-Za-z0-9]+ *\( *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+/,/\( *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *\( *0x[a-f0-9]+ *, *0x[a-f0-9]+ *\) *, *[A-Za-z0-9]+ *\) *;/]];e.Promise.prototype.then=new Proxy(e.Promise.prototype.then,{apply(p,i,h){if(typeof h[0]!="function"||typeof h[1]!="function")return n(p,i,h);let f=[String(h[0]),String(h[1])];if(f.every(d=>t.filter(r=>r.filter(y=>y.test(d)).length===r.length).length===1)){console.debug(`[${o}] Detected PL2 Promise.then`,f,h),setTimeout(()=>{let d=[...document.querySelectorAll("#app div[class] div[class] ~ div[class]")].filter(r=>r instanceof HTMLElement);d=d.filter(r=>parseFloat(getComputedStyle(r).getPropertyValue("margin-bottom"))>=12.5),d=d.filter(r=>r.innerText.trim().length===0),d=d.filter(r=>[...r.querySelectorAll("*")].filter(y=>y instanceof HTMLElement).some(y=>{let l=y.getBoundingClientRect().height;return l>0&&l<=5})),console.debug(`[${o}] Detected PL2 Promise.then Targeted`,d),d.forEach(r=>{r.style.setProperty("display","none","important")})},250);return}return n(p,i,h)}});let a=await L("#app",e.document);b(a,{QuietMs:75,EventName:"vue:settled",ChangeEventName:"vue:change",UrlChange:"vue:url-changed"});let c=H(e,new Worker(URL.createObjectURL(new Blob(['(()=>{var b=["\\uD30C\\uC6CC\\uB9C1\\uD06C","\\uAD11\\uACE0","\\uAD11\\uACE0\\uB4F1\\uB85D"],k=["Pretendard JP, sans-serif","Pretendard, sans-serif","system-ui, sans-serif","Apple SD Gothic Neo, sans-serif","Nanum Gothic, sans-serif","Noto Sans KR, sans-serif","Arial, sans-serif"],H=new Map;function T(t,n){return new OffscreenCanvas(Math.max(1,Math.floor(t)),Math.max(1,Math.floor(n)))}function C(t){let n=t.getContext("2d",{willReadFrequently:!0});if(!n)throw new Error("2D context unavailable");return n}function Y(t){let n=C(t),{width:a,height:e}=t,r=n.getImageData(0,0,a,e).data,o=new Uint8ClampedArray(a*e);for(let i=0,s=0;i<r.length;i+=4,s++){let l=r[i],h=r[i+1],g=r[i+2];o[s]=Math.round(.299*l+.587*h+.114*g)}return{Width:a,Height:e,Data:o}}function A(t){let n=new Uint32Array(256);for(let l=0;l<t.Data.length;l++)n[t.Data[l]]++;let a=t.Data.length,e=0;for(let l=0;l<256;l++)e+=l*n[l];let r=0,o=0,i=-1,s=127;for(let l=0;l<256;l++){if(o+=n[l],o===0)continue;let h=a-o;if(h===0)break;r+=l*n[l];let g=r/o,d=(e-r)/h,c=o*h*(g-d)*(g-d);c>i&&(i=c,s=l)}return s}function M(t){let n=A(t),a=0,e=0;for(let i=0;i<t.Data.length;i++)t.Data[i]<n?a++:e++;let r=a<e,o=new Uint8Array(t.Width*t.Height);for(let i=0;i<t.Data.length;i++){let s=r?t.Data[i]<n:t.Data[i]>n;o[i]=s?1:0}return{Width:t.Width,Height:t.Height,Data:o}}function O(t){let n=new Uint8Array(t.Width*t.Height);for(let a=1;a<t.Height-1;a++)for(let e=1;e<t.Width-1;e++){let r=1;for(let o=-1;o<=1&&r;o++)for(let i=-1;i<=1;i++)if(t.Data[(a+o)*t.Width+(e+i)]===0){r=0;break}n[a*t.Width+e]=r}return{Width:t.Width,Height:t.Height,Data:n}}function w(t){let n=new Uint8Array(t.Width*t.Height);for(let a=1;a<t.Height-1;a++)for(let e=1;e<t.Width-1;e++){let r=0;for(let o=-1;o<=1&&!r;o++)for(let i=-1;i<=1;i++)if(t.Data[(a+o)*t.Width+(e+i)]===1){r=1;break}n[a*t.Width+e]=r}return{Width:t.Width,Height:t.Height,Data:n}}function N(t){return w(O(w(t)))}function U(t,n=20){let a=new Uint8Array(t.Width*t.Height),e=[],r=new Int32Array(t.Width*t.Height),o=new Int32Array(t.Width*t.Height);for(let i=0;i<t.Height;i++)for(let s=0;s<t.Width;s++){let l=i*t.Width+s;if(a[l]||t.Data[l]===0)continue;let h=0,g=0;r[g]=s,o[g]=i,g++,a[l]=1;let d=s,c=i,u=s,f=i,X=0;for(;h<g;){let m=r[h],D=o[h];h++,X++,m<d&&(d=m),D<c&&(c=D),m>u&&(u=m),D>f&&(f=D);for(let I=-1;I<=1;I++)for(let y=-1;y<=1;y++){if(y===0&&I===0)continue;let W=m+y,B=D+I;if(W<0||B<0||W>=t.Width||B>=t.Height)continue;let x=B*t.Width+W;a[x]||t.Data[x]===0||(a[x]=1,r[g]=W,o[g]=B,g++)}}X>=n&&e.push({X:d,Y:c,Width:u-d+1,Height:f-c+1})}return e}function v(t,n=8,a=4){let e=[...t],r=!0;function o(i,s){let l=i.X+i.Width,h=i.Y+i.Height,g=s.X+s.Width,d=s.Y+s.Height;return!(l+n<s.X||g+n<i.X||h+a<s.Y||d+a<i.Y)}for(;r;){r=!1;t:for(let i=0;i<e.length;i++)for(let s=i+1;s<e.length;s++){if(!o(e[i],e[s]))continue;let l=e[i],h=e[s];e[i]={X:Math.min(l.X,h.X),Y:Math.min(l.Y,h.Y),Width:Math.max(l.X+l.Width,h.X+h.Width)-Math.min(l.X,h.X),Height:Math.max(l.Y+l.Height,h.Y+h.Height)-Math.min(l.Y,h.Y)},e.splice(s,1),r=!0;break t}}return e}function R(t,n){let a=new Uint8Array(n.Width*n.Height);for(let e=0;e<n.Height;e++)for(let r=0;r<n.Width;r++)a[e*n.Width+r]=t.Data[(n.Y+e)*t.Width+(n.X+r)];return{Width:n.Width,Height:n.Height,Data:a}}function E(t){let n=t.Width,a=t.Height,e=-1,r=-1;for(let o=0;o<t.Height;o++)for(let i=0;i<t.Width;i++)t.Data[o*t.Width+i]!==0&&(i<n&&(n=i),o<a&&(a=o),i>e&&(e=i),o>r&&(r=o));return e<n||r<a?{Width:1,Height:1,Data:new Uint8Array([0])}:R(t,{X:n,Y:a,Width:e-n+1,Height:r-a+1})}function P(t,n,a){let e=new Uint8Array(n*a);for(let r=0;r<a;r++)for(let o=0;o<n;o++){let i=Math.min(t.Width-1,Math.floor(o/n*t.Width)),s=Math.min(t.Height-1,Math.floor(r/a*t.Height));e[r*n+o]=t.Data[s*t.Width+i]}return{Width:n,Height:a,Data:e}}function p(t,n=64){let a=E(t),e=Math.max(a.Width,a.Height),r=new Uint8Array(e*e),o=Math.floor((e-a.Width)/2),i=Math.floor((e-a.Height)/2);for(let s=0;s<a.Height;s++)for(let l=0;l<a.Width;l++)r[(s+i)*e+(l+o)]=a.Data[s*a.Width+l];return P({Width:e,Height:e,Data:r},n,n)}function F(t,n){if(t.Width!==n.Width||t.Height!==n.Height)throw new Error("Image size mismatch");let a=0;for(let e=0;e<t.Data.length;e++)t.Data[e]!==n.Data[e]&&a++;return a/t.Data.length}function K(t,n){let a=`${t}__${n}`,e=H.get(a);if(e)return e;let r=256,o=96,i=T(r,o),s=C(i);s.fillStyle="white",s.fillRect(0,0,r,o);let l=Math.floor(o*.72);for(;l>8;){s.clearRect(0,0,r,o),s.fillStyle="white",s.fillRect(0,0,r,o),s.fillStyle="black",s.textAlign="center",s.textBaseline="middle",s.font=`700 ${l}px ${n}`;let g=s.measureText(t),d=g.width,c=(g.actualBoundingBoxAscent||l*.8)+(g.actualBoundingBoxDescent||l*.2);if(d<=r*.9&&c<=o*.9){s.fillText(t,r/2,o/2);let u=Y(i),f=p(M(u));return H.set(a,f),f}l--}s.font=`700 12px ${n}`,s.fillStyle="black",s.textAlign="center",s.textBaseline="middle",s.fillText(t,r/2,o/2);let h=p(M(Y(i)));return H.set(a,h),h}function V(t,n,a){let e=p(t),r=Number.POSITIVE_INFINITY;for(let o of a){let i=K(n,o),s=F(e,i);s<r&&(r=s)}return r}function z(t){let n=U(t,16);return v(n,10,6).filter(e=>{if(e.Width<8||e.Height<8)return!1;let r=e.Width/e.Height;return r>.5&&r<12})}async function $(t){let a=q(t.ImageData)?t.BackgroundCandidates:t.BackgroundCandidates.slice(0,1),e=t.FontCandidates??k,r=t.ScoreThreshold??.32,o=null;for(let i of a){let s=_(t.ImageData,i),l=G(s),h=N(M(l)),g=z(h);if(g.length!==0)for(let d of g){let c=R(h,d);for(let u of b){let f=V(c,u,e);(!o||f<o.Score)&&(o={Label:u,Score:f,Box:d})}}}return!o||o.Score>r?null:o}function G(t){let{width:n,height:a,data:e}=t,r=new Uint8ClampedArray(n*a);for(let o=0,i=0;o<e.length;o+=4,i++){let s=e[o],l=e[o+1],h=e[o+2];r[i]=Math.round(.299*s+.587*l+.114*h)}return{Width:n,Height:a,Data:r}}function q(t){let n=t.data;for(let a=3;a<n.length;a+=4)if(n[a]<255)return!0;return!1}function _(t,n){let a=T(t.width,t.height),e=C(a);return e.fillStyle=n,e.fillRect(0,0,t.width,t.height),e.putImageData(t,0,0),e.getImageData(0,0,t.width,t.height)}self.addEventListener("message",t=>{t.origin===""&&(async()=>{let n=t.data;if(!(!n||n.Kind!=="detect"))try{let a=await $(n),e={Kind:"detect-result",RequestId:n.RequestId,Result:a};self.postMessage(e)}catch(a){let e=a instanceof Error?a.message:String(a),r={Kind:"detect-error",RequestId:n.RequestId,Error:e};self.postMessage(r)}})()});})();\n'],{type:"application/javascript"}))));async function g(p){let i=[];for(let h of p){let f=[...h.querySelectorAll("*")].filter(r=>r instanceof HTMLElement).filter(r=>r instanceof HTMLImageElement||getComputedStyle(r).backgroundImage!=="none").filter(r=>parseFloat(getComputedStyle(r).getPropertyValue("width"))>=5&&parseFloat(getComputedStyle(r).getPropertyValue("height"))>=5).filter(r=>parseFloat(getComputedStyle(r).getPropertyValue("width"))<=50&&parseFloat(getComputedStyle(r).getPropertyValue("height"))<=50),d=0;for(let r of f)if(await c.DetectFromElement(r,{ScoreThreshold:.32})!==null&&(d+=1),d>=1){i.push(h);break}}return i}function E(p){let i=new Set([p]);for(let h=0;;h++){let f=[...i][h].parentElement;if(f===null)break;i.add(f)}return i}async function S(p){let i=[...document.querySelectorAll("#app div[class] div[class] ~ div[class]")].filter(r=>r instanceof HTMLElement);i=i.filter(r=>parseFloat(getComputedStyle(r).getPropertyValue("padding-top"))>=20||parseFloat(getComputedStyle(r).getPropertyValue("margin-top"))>=20||parseFloat(getComputedStyle(r).getPropertyValue("margin-bottom"))>=12.5),i=i.filter(r=>{let y=[...r.querySelectorAll("*")].filter(l=>l instanceof HTMLElement);return y.filter(l=>parseFloat(getComputedStyle(l).getPropertyValue("padding-top"))>=5&&parseFloat(getComputedStyle(l).getPropertyValue("border-bottom-width"))>=.1).length===1?!0:y.filter(l=>(l instanceof HTMLTableElement||l instanceof HTMLTableCellElement)&&parseFloat(getComputedStyle(l).getPropertyValue("padding-top"))>=5&&parseFloat(getComputedStyle(l).getPropertyValue("padding-bottom"))>=5).length>=2}),i=i.filter(r=>![...r.querySelectorAll("*")].filter(l=>l instanceof HTMLElement).some(l=>parseFloat(getComputedStyle(l).getPropertyValue("margin-bottom"))>=10&&parseFloat(getComputedStyle(l).getPropertyValue("padding-bottom"))>=1&&parseFloat(getComputedStyle(l).getPropertyValue("padding-top"))>=1&&parseFloat(getComputedStyle(l).getPropertyValue("border-top-width"))>=.25&&parseFloat(getComputedStyle(l).getPropertyValue("border-bottom-width"))>=.25)),i=i.filter(r=>{let y=[...r.querySelectorAll("*")].filter(l=>l instanceof HTMLElement);return y=y.filter(l=>parseFloat(getComputedStyle(l).getPropertyValue("padding-right"))>=10&&parseFloat(getComputedStyle(l).getPropertyValue("padding-bottom"))>=10),y=y.filter(l=>parseFloat(getComputedStyle(l).getPropertyValue("margin-left"))>=2.5),y.length===0}),i=i.filter(r=>r.getBoundingClientRect().width<500&&e.document.body.getBoundingClientRect().width>500?!1:[...r.querySelectorAll("*[style]")].filter(l=>l instanceof HTMLElement&&l.style.length>0).filter(l=>{if(!(l instanceof HTMLElement))return!1;let F=getComputedStyle(l);return[...l.style].filter(C=>{let D=l.style.getPropertyValue(C).trim(),A=F.getPropertyValue(C).trim();return D!==A}).length<=1}).length<5),i=await g(i),i.forEach(r=>i.push(...new Set([...r.querySelectorAll("*")].filter(y=>y instanceof HTMLElement)))),i=[...new Set(i)];let h=i.filter(r=>parseFloat(getComputedStyle(r).getPropertyValue("padding-left"))>=5&&parseFloat(getComputedStyle(r).getPropertyValue("border-right-width"))>=.1);console.debug(`[${o}] ${p.type} RealTargeted`,h,p),h.forEach(r=>{r.style.setProperty("display","none","important")});let f=i.filter(r=>!(r instanceof HTMLElement)||!(r instanceof HTMLTableElement)?!1:[...r.querySelectorAll("*")].filter(l=>l instanceof HTMLElement).some(l=>parseFloat(getComputedStyle(l).getPropertyValue("padding-top"))>=5&&parseFloat(getComputedStyle(l).getPropertyValue("padding-bottom"))>=5));console.debug(`[${o}] ${p.type} RealTabletTargeted`,f,p),f.forEach(r=>{r.style.setProperty("display","none","important")});let d=new Set([...h,...f]);d.forEach(r=>{[...E(r)].filter(l=>l.innerText.trim().length===0).forEach(l=>d.add(l))}),console.debug(`[${o}] ${p.type} PlaceHolderCandidated`,d,p),[...d].forEach(r=>{r.style.setProperty("display","none","important")})}a.addEventListener("vue:settled",p=>S(p)),a.addEventListener("vue:url-changed",p=>setTimeout(()=>S(p),250)),["https://fonts.googleapis.com/css2?family=Nanum Gothic&display=swap"].forEach(p=>{let i=e.document.createElement("link");i.rel="stylesheet",i.href=p,e.document.head.appendChild(i)})}_($);})();
|
|
26
|
-
|
|
23
|
+
(()=>{"use strict";var t={},e={};// The require function
|
|
24
|
+
function r(n){// Check if module is in cache
|
|
25
|
+
var a=e[n];if(void 0!==a)return a.exports;// Create a new module (and put it into the cache)
|
|
26
|
+
var o=e[n]={exports:{}};// Return the exports of the module
|
|
27
|
+
return(// Execute the module function
|
|
28
|
+
t[n](o,o.exports,r),o.exports)}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t){if(t){if("string"==typeof t)return n(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){return null!=e&&"u">typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e,r,n,a,o,i){try{var l=t[o](i),u=l.value}catch(t){r(t);return}l.done?e(u):Promise.resolve(u).then(n,a)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function i(t){l(o,n,a,i,u,"next",t)}function u(t){l(o,n,a,i,u,"throw",t)}i(void 0)})}}function c(t,e){return null!=e&&"u">typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function f(t,e){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:u(0)}),l(i,"throw",{value:u(1)}),l(i,"return",{value:u(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(t){c=[6,t],n=0}finally{r=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function s(t,e){for(var r=e;r;){var n=t.getComputedStyle(r).backgroundColor;if(n&&"transparent"!==n&&"rgba(0, 0, 0, 0)"!==n)return n;r=r.parentElement}return"rgb(255, 255, 255)"}function h(t,e,r){var n=new Set;function a(t){t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&n.add(t)}a(r);var o=t.getComputedStyle(e);if(a(o.backgroundColor),a(o.color),a(t.getComputedStyle(t.document.documentElement).backgroundColor),t.document.body){var l=t.getComputedStyle(t.document.body);a(l.backgroundColor),a(l.color)}return a("rgb(255, 255, 255)"),a("rgb(0, 0, 0)"),function(t){if(Array.isArray(t))return i(t)}(n)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t){if(t){if("string"==typeof t)return i(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t){return"string"==typeof t&&/^image\/svg\+xml(?:\s*;|$)/i.test(t)}function g(t,e,r){return u(function(){var n,a,o,i,l,c,s,h;return f(this,function(d){var g,m,p;switch(d.label){case 0:g=e.getBoundingClientRect(),m=Math.max(1,t.devicePixelRatio||1),a=(n={Width:Math.max(1,Math.round((g.width||e.clientWidth||96)*m)),Height:Math.max(1,Math.round((g.height||e.clientHeight||32)*m))}).Width,o=n.Height,i=function(t,e,r,n){var a=new t.DOMParser().parseFromString(e,"image/svg+xml");if(a.querySelector("parsererror"))throw Error("Failed to parse SVG markup");var o=a.documentElement;if(!o||"svg"!==o.nodeName.toLowerCase())throw Error("SVG root element not found");return o.getAttribute("xmlns")||o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.getAttribute("width")||o.setAttribute("width",String(r)),o.getAttribute("height")||o.setAttribute("height",String(n)),new t.XMLSerializer().serializeToString(a)}(t,r,a,o),l=t.URL.createObjectURL(new t.Blob([i],{type:"image/svg+xml"})),d.label=1;case 1:return d.trys.push([1,,3,4]),[4,(p=l,u(function(){var e;return f(this,function(r){switch(r.label){case 0:(e=new t.Image).decoding="async",e.src=p,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.decode()];case 2:if(r.sent(),e.naturalWidth>0)return[2,e];return[3,4];case 3:return r.sent(),[3,4];case 4:var n;return[4,(n=e).complete&&n.naturalWidth>0?Promise.resolve():new Promise(function(t,e){var r=function(){n.removeEventListener("load",a),n.removeEventListener("error",o)},a=function(){r(),t()},o=function(){r(),e(Error("Failed to load SVG image"))};n.addEventListener("load",a),n.addEventListener("error",o)})];case 5:return r.sent(),[2,e]}})})())];case 2:if(c=d.sent(),(s=t.document.createElement("canvas")).width=a,s.height=o,!(h=s.getContext("2d",{willReadFrequently:!0})))throw Error("2D context unavailable");return h.clearRect(0,0,a,o),h.drawImage(c,0,0,a,o),[2,h.getImageData(0,0,a,o)];case 3:return t.URL.revokeObjectURL(l),[7];case 4:return[2]}})})()}function m(t,e,r){return u(function(){var n,a;return f(this,function(o){var i;switch(o.label){case 0:if(!/^data:image\/svg\+xml(?:[;,]|$)/i.test(r))return[3,2];return n=function(t,e){var r=e.indexOf(",");if(r<0)throw Error("Invalid SVG data URL");var n=e.slice(0,r).toLowerCase(),a=e.slice(r+1);if(n.includes(";base64")){for(var o=t.atob(a),i=new Uint8Array(o.length),l=0;l<o.length;l++)i[l]=o.charCodeAt(l);return new TextDecoder().decode(i)}return decodeURIComponent(a)}(t,r),[4,g(t,e,n)];case 1:case 5:case 7:return[2,o.sent()];case 2:return[4,new Promise(function(t,e){GM.xmlHttpRequest({url:r,method:"GET",responseType:"blob",onload:function(r){if(r.status<200||r.status>=300)return void e(Error("Failed to fetch image: ".concat(r.status," ").concat(r.statusText)));var n=r.response;if(!c(n,Blob))return void e(Error("Failed to fetch image: invalid blob response"));var a=r.responseHeaders.match(/^content-type:\s*(.+)$/im);t({BlobData:n,ContentTypeHeader:a?a[1].trim():null})},onerror:e,ontimeout:e})})];case 3:if(!(d((a=o.sent()).BlobData.type)||d(a.ContentTypeHeader)))return[3,6];return[4,a.BlobData.text()];case 4:return[4,g(t,e,o.sent())];case 6:return[4,(i=a.BlobData,u(function(){var e,r,n;return f(this,function(a){switch(a.label){case 0:return[4,t.createImageBitmap(i)];case 1:e=a.sent();try{if((r=t.document.createElement("canvas")).width=e.width,r.height=e.height,!(n=r.getContext("2d",{willReadFrequently:!0})))throw Error("2D context unavailable");return n.drawImage(e,0,0),[2,n.getImageData(0,0,r.width,r.height)]}finally{e.close()}}})})())]}})})()}/*!
|
|
27
29
|
* @license MPL-2.0
|
|
28
30
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
29
31
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
@@ -31,4 +33,6 @@
|
|
|
31
33
|
*
|
|
32
34
|
* Contributors:
|
|
33
35
|
* - See Git history at https://github.com/FilteringDev/NamuLink for detailed authorship information.
|
|
34
|
-
*/
|
|
36
|
+
*/function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function y(t,e,r,n,a,o,i){try{var l=t[o](i),u=l.value}catch(t){r(t);return}l.done?e(u):Promise.resolve(u).then(n,a)}function v(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function i(t){y(o,n,a,i,l,"next",t)}function l(t){y(o,n,a,i,l,"throw",t)}i(void 0)})}}function b(t,e){return null!=e&&"u">typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function w(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t){if(t){if("string"==typeof t)return p(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return p(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:u(0)}),l(i,"throw",{value:u(1)}),l(i,"return",{value:u(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(t){c=[6,t],n=0}finally{r=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}r.rv=()=>"1.7.11",r.ruid="bundler=rspack@1.7.11",!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NamuLink";v(function(){var r,n,i,l;function d(r){return v(function(){var n,a,o,i,u;return S(this,function(c){switch(c.label){case 0:var f;return[4,(f=a=(a=(a=(a=(a=(a=w(document.querySelectorAll("#app div[class] div[class] ~ div[class]")).filter(function(t){return b(t,HTMLElement)})).filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("padding-top"))>=20||parseFloat(getComputedStyle(t).getPropertyValue("margin-top"))>=20||parseFloat(getComputedStyle(t).getPropertyValue("margin-bottom"))>=12.5})).filter(function(t){var e=w(t.querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)});return(// non-HTMLTableElement
|
|
37
|
+
1===e.filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("padding-top"))>=5&&parseFloat(getComputedStyle(t).getPropertyValue("border-bottom-width"))>=.1}).length||e.filter(function(t){return(b(t,HTMLTableElement)||b(t,HTMLTableCellElement))&&parseFloat(getComputedStyle(t).getPropertyValue("padding-top"))>=5&&parseFloat(getComputedStyle(t).getPropertyValue("padding-bottom"))>=5}).length>=2)})).filter(function(t){return!w(t.querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)}).some(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("margin-bottom"))>=10&&parseFloat(getComputedStyle(t).getPropertyValue("padding-bottom"))>=1&&parseFloat(getComputedStyle(t).getPropertyValue("padding-top"))>=1&&parseFloat(getComputedStyle(t).getPropertyValue("border-top-width"))>=.25&&parseFloat(getComputedStyle(t).getPropertyValue("border-bottom-width"))>=.25})})).filter(function(t){var e=w(t.querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)});return 0===(e=(e=e.filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("padding-right"))>=10&&parseFloat(getComputedStyle(t).getPropertyValue("padding-bottom"))>=10})).filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("margin-left"))>=2.5})).length})).filter(function(e){return(!(e.getBoundingClientRect().width<500)||!(t.document.body.getBoundingClientRect().width>500))&&w(e.querySelectorAll("*[style]")).filter(function(t){return b(t,HTMLElement)&&t.style.length>0}).filter(function(t){if(!b(t,HTMLElement))return!1;var e=getComputedStyle(t);return w(t.style).filter(function(r){return t.style.getPropertyValue(r).trim()!==e.getPropertyValue(r).trim()}).length<=1}).length<5}),v(function(){var t,e,r,n,a,o,i,u,c,s,h,d,g,m,p,y;return S(this,function(v){switch(v.label){case 0:t=[],e=!0,r=!1,n=void 0,v.label=1;case 1:v.trys.push([1,12,13,14]),a=f[Symbol.iterator](),v.label=2;case 2:if(e=(o=a.next()).done)return[3,11];u=w((i=o.value).querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)}).filter(function(t){return b(t,HTMLImageElement)||"none"!==getComputedStyle(t).backgroundImage}).filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("width"))>=5&&parseFloat(getComputedStyle(t).getPropertyValue("height"))>=5}).filter(function(t){return 50>=parseFloat(getComputedStyle(t).getPropertyValue("width"))&&50>=parseFloat(getComputedStyle(t).getPropertyValue("height"))}),c=0,s=!0,h=!1,d=void 0,v.label=3;case 3:v.trys.push([3,8,9,10]),g=u[Symbol.iterator](),v.label=4;case 4:if(s=(m=g.next()).done)return[3,7];return p=m.value,[4,l.DetectFromElement(p,{ScoreThreshold:.32})];case 5:if(null!==v.sent()&&(c+=1),c>=1)return t.push(i),[3,7];v.label=6;case 6:return s=!0,[3,4];case 7:return[3,10];case 8:return y=v.sent(),h=!0,d=y,[3,10];case 9:try{s||null==g.return||g.return()}finally{if(h)throw d}return[7];case 10:return e=!0,[3,2];case 11:return[3,14];case 12:return y=v.sent(),r=!0,n=y,[3,14];case 13:try{e||null==a.return||a.return()}finally{if(r)throw n}return[7];case 14:return[2,t]}})})())];case 1:return(a=c.sent()).forEach(function(t){return(n=a).push.apply(n,w(new Set(w(t.querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)}))))}),o=(a=w(new Set(a))).filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("padding-left"))>=5&&parseFloat(getComputedStyle(t).getPropertyValue("border-right-width"))>=.1}),console.debug("[".concat(e,"] ").concat(r.type," RealTargeted"),o,r),o.forEach(function(t){t.style.setProperty("display","none","important")}),i=a.filter(function(t){return!!b(t,HTMLElement)&&!!b(t,HTMLTableElement)&&w(t.querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)}).some(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("padding-top"))>=5&&parseFloat(getComputedStyle(t).getPropertyValue("padding-bottom"))>=5})}),console.debug("[".concat(e,"] ").concat(r.type," RealTabletTargeted"),i,r),i.forEach(function(t){t.style.setProperty("display","none","important")}),// leftover
|
|
38
|
+
(u=new Set(w(o).concat(w(i)))).forEach(function(t){w(function(t){for(var e=new Set([t]),r=0;;r++){var n=w(e)[r].parentElement;if(null===n)break;e.add(n)}return e}(t)).filter(function(t){return 0===t.innerText.trim().length}).forEach(function(t){return u.add(t)})}),console.debug("[".concat(e,"] ").concat(r.type," PlaceHolderCandidated"),u,r),w(u).forEach(function(t){t.style.setProperty("display","none","important")}),[2]}})})()}return S(this,function(g){switch(g.label){case 0:return r=t.Reflect.apply,n=[[/function *[A-Za-z0-9]+ *\([A-Za-z0-9]+ * *\) *{ *function *[A-Za-z0-9]+ *\( *[a-zA-Z]+ *, *[A-Za-z]+ *\) *{ *return *[A-Za-z0-9]+ *\( */,/{ *return *[A-Za-z0-9]+ *\( *[a-zA-Z]+[- ]*0x[a-f0-9]+ *, *[a-zA-Z]+ *\) *; *\} *[A-Za-z0-9]+ *\( *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+/,/\( *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *, *[A-Za-z0-9]+ *\( *0x[a-f0-9]+ *, *0x[a-f0-9]+ *\) *, *[A-Za-z0-9]+ *\) *;/]],t.Promise.prototype.then=new Proxy(t.Promise.prototype.then,{apply:function(t,a,o){if("function"!=typeof o[0]||"function"!=typeof o[1])return r(t,a,o);var i=[String(o[0]),String(o[1])];if(i.every(function(t){return 1===n.filter(function(e){return e.filter(function(e){return e.test(t)}).length===e.length}).length})){console.debug("[".concat(e,"] Detected PL2 Promise.then"),i,o),setTimeout(function(){var t=w(document.querySelectorAll("#app div[class] div[class] ~ div[class]")).filter(function(t){return b(t,HTMLElement)});t=(t=(t=t.filter(function(t){return parseFloat(getComputedStyle(t).getPropertyValue("margin-bottom"))>=12.5})).filter(function(t){return 0===t.innerText.trim().length})).filter(function(t){return w(t.querySelectorAll("*")).filter(function(t){return b(t,HTMLElement)}).some(function(t){var e=t.getBoundingClientRect().height;return e>0&&e<=5})}),console.debug("[".concat(e,"] Detected PL2 Promise.then Targeted"),t),t.forEach(function(t){t.style.setProperty("display","none","important")})},250);return}return r(t,a,o)}}),[4,function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return new Promise(function(r){var n=e.querySelector(t);if(n&&o(n,HTMLElement))return void r(n);var a=new MutationObserver(function(){var n=e.querySelector(t);n&&o(n,HTMLElement)&&(a.disconnect(),r(n))});a.observe(e,{subtree:!0,childList:!0,attributes:!0})})}("#app",t.document)];case 1:return!function(t){var e,r,n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=null!=(r=l.QuietMs)?r:120,c=null!=(n=l.EventName)?n:"vue:settled",f=null!=(o=l.ChangeEventName)?o:"vue:dom-changed",s=null!=(i=l.UrlChange)?i:"vue:url-changed";if(null!=(e=HTMLElement)&&"u">typeof Symbol&&e[Symbol.hasInstance]?!e[Symbol.hasInstance](t):!(t instanceof e))throw TypeError("TargetEl must be an HTMLElement");var h=-1,d=0,g=performance.now(),m=new URL(location.href),p=function(e){t.dispatchEvent(new CustomEvent(f,{detail:{Seq:d,At:g,MutationCount:e.length,Mutations:e}}))},y=function(){requestAnimationFrame(function(){requestAnimationFrame(function(){t.dispatchEvent(new CustomEvent(c,{detail:{Seq:d,QuietMs:u,SettledAt:performance.now(),ElapsedSinceLastMutation:performance.now()-g,Target:t}}))})})},v=function(){var e=new URL(location.href);e.href!==m.href&&(m=e,t.dispatchEvent(new CustomEvent(s,{detail:{Seq:d,At:performance.now(),URL:e}})))},b=function(){clearTimeout(h),h=setTimeout(y,u)};new MutationObserver(function(t){d+=1,g=performance.now(),p(t),t.flatMap(function(t){return a(t.addedNodes).concat(a(t.removedNodes),a(t.nextSibling?[t.nextSibling]:[]),a(t.previousSibling?[t.previousSibling]:[]),a(t.target?[t.target]:[]))}).length>=15&&(b(),setTimeout(b,3*u)),v()}).observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),b()}(i=g.sent(),{QuietMs:75,EventName:"vue:settled",ChangeEventName:"vue:change",UrlChange:"vue:url-changed"}),l=function(t,e){var r=0,n=new Map;function a(t){var a="ocr-".concat(Date.now(),"-").concat(r++),o=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){var n;n=r[e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return t}({Kind:"detect",RequestId:a},t);return new Promise(function(t,r){n.set(a,{Resolve:t,Reject:r}),e.postMessage(o)})}return e.addEventListener("message",function(t){var e=t.data;if(e&&"RequestId"in e){var r=n.get(e.RequestId);if(r){if(n.delete(e.RequestId),"detect-result"===e.Kind)return void r.Resolve(e.Result);r.Reject(Error(e.Error))}}}),{DetectFromElement:function(e,r){return u(function(){var n,o,i;return f(this,function(l){switch(l.label){case 0:if(!(n=function(t,e){if(c(e,t.HTMLImageElement))return e.currentSrc||e.src||null;var r=t.getComputedStyle(e).backgroundImage.trim();if(!r||"none"===r)return null;var n=r.match(/^url\((.*)\)$/i);if(!n)return null;var a=n[1].trim();return(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1)),a}(t,e)))return[2,null];return[4,m(t,e,n)];case 1:return o=l.sent(),i=s(t,e),[2,a({ImageData:o,BackgroundCandidates:h(t,e,i),FontCandidates:null==r?void 0:r.FontCandidates,ScoreThreshold:null==r?void 0:r.ScoreThreshold})]}})})()},DetectFromSource:function(e){return u(function(){var r,n;return f(this,function(o){switch(o.label){case 0:return[4,m(t,e.HostElement,e.SourceUrl)];case 1:return r=o.sent(),n=s(t,e.HostElement),[2,a({ImageData:r,BackgroundCandidates:h(t,e.HostElement,n),FontCandidates:e.FontCandidates,ScoreThreshold:e.ScoreThreshold})]}})})()},Terminate:function(){var t=!0,r=!1,a=void 0;try{for(var o,i=n.values()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)o.value.Reject(Error("OCR worker terminated"))}catch(t){r=!0,a=t}finally{try{t||null==i.return||i.return()}finally{if(r)throw a}}n.clear(),e.terminate()}}}(t,new Worker(URL.createObjectURL(new Blob(['(()=>{"use strict";var t={},r={};function e(a){var n=r[a];if(void 0!==n)return n.exports;var i=r[a]={exports:{}};return t[a](i,i.exports,e),i.exports}function a(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,a=Array(r);e<r;e++)a[e]=t[e];return a}function n(t,r,e,a,n,i,o){try{var h=t[i](o),l=h.value}catch(t){e(t);return}h.done?r(l):Promise.resolve(l).then(a,n)}function i(t){return function(){var r=this,e=arguments;return new Promise(function(a,i){var o=t.apply(r,e);function h(t){n(o,a,i,h,l,"next",t)}function l(t){n(o,a,i,h,l,"throw",t)}h(void 0)})}}function o(t,r){var e,a,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),h=Object.defineProperty;return h(o,"next",{value:l(0)}),h(o,"throw",{value:l(1)}),h(o,"return",{value:l(2)}),"function"==typeof Symbol&&h(o,Symbol.iterator,{value:function(){return this}}),o;function l(h){return function(l){var f=[h,l];if(e)throw TypeError("Generator is already executing.");for(;o&&(o=0,f[0]&&(i=0)),i;)try{if(e=1,a&&(n=2&f[0]?a.return:f[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,f[1])).done)return n;switch(a=0,n&&(f=[2&f[0],n.value]),f[0]){case 0:case 1:n=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,a=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===f[0]||2===f[0])){i=0;continue}if(3===f[0]&&(!n||f[1]>n[0]&&f[1]<n[3])){i.label=f[1];break}if(6===f[0]&&i.label<n[1]){i.label=n[1],n=f;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(f);break}n[2]&&i.ops.pop(),i.trys.pop();continue}f=r.call(t,i)}catch(t){f=[6,t],a=0}finally{e=n=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}}e.rv=()=>"1.7.11",e.ruid="bundler=rspack@1.7.11";var h=["파워링크","광고","광고등록"],l=["Pretendard JP, sans-serif","Pretendard, sans-serif","system-ui, sans-serif","Apple SD Gothic Neo, sans-serif","Nanum Gothic, sans-serif","Noto Sans KR, sans-serif","Arial, sans-serif"],f=new Map;function u(t,r){return new OffscreenCanvas(Math.max(1,Math.floor(t)),Math.max(1,Math.floor(r)))}function c(t){var r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw Error("2D context unavailable");return r}function d(t){for(var r=c(t),e=t.width,a=t.height,n=r.getImageData(0,0,e,a).data,i=new Uint8ClampedArray(e*a),o=0,h=0;o<n.length;o+=4,h++){var l=n[o],f=n[o+1],u=n[o+2];i[h]=Math.round(.299*l+.587*f+.114*u)}return{Width:e,Height:a,Data:i}}function s(t){for(var r=function(t){for(var r=new Uint32Array(256),e=0;e<t.Data.length;e++)r[t.Data[e]]++;for(var a=t.Data.length,n=0,i=0;i<256;i++)n+=i*r[i];for(var o=0,h=0,l=-1,f=127,u=0;u<256;u++)if(0!==(h+=r[u])){var c=a-h;if(0===c)break;var d=(o+=u*r[u])/h,s=(n-o)/c,v=h*c*(d-s)*(d-s);v>l&&(l=v,f=u)}return f}(t),e=0,a=0,n=0;n<t.Data.length;n++)t.Data[n]<r?e++:a++;for(var i=e<a,o=new Uint8Array(t.Width*t.Height),h=0;h<t.Data.length;h++){var l=i?t.Data[h]<r:t.Data[h]>r;o[h]=+!!l}return{Width:t.Width,Height:t.Height,Data:o}}function v(t){for(var r=new Uint8Array(t.Width*t.Height),e=1;e<t.Height-1;e++)for(var a=1;a<t.Width-1;a++){for(var n=0,i=-1;i<=1&&!n;i++)for(var o=-1;o<=1;o++)if(1===t.Data[(e+i)*t.Width+(a+o)]){n=1;break}r[e*t.Width+a]=n}return{Width:t.Width,Height:t.Height,Data:r}}function g(t,r){for(var e=new Uint8Array(r.Width*r.Height),a=0;a<r.Height;a++)for(var n=0;n<r.Width;n++)e[a*r.Width+n]=t.Data[(r.Y+a)*t.Width+(r.X+n)];return{Width:r.Width,Height:r.Height,Data:e}}function y(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,e=function(t){for(var r=t.Width,e=t.Height,a=-1,n=-1,i=0;i<t.Height;i++)for(var o=0;o<t.Width;o++)0!==t.Data[i*t.Width+o]&&(o<r&&(r=o),i<e&&(e=i),o>a&&(a=o),i>n&&(n=i));return a<r||n<e?{Width:1,Height:1,Data:new Uint8Array([0])}:g(t,{X:r,Y:e,Width:a-r+1,Height:n-e+1})}(t),a=Math.max(e.Width,e.Height),n=new Uint8Array(a*a),i=Math.floor((a-e.Width)/2),o=Math.floor((a-e.Height)/2),h=0;h<e.Height;h++)for(var l=0;l<e.Width;l++)n[(h+o)*a+(l+i)]=e.Data[h*e.Width+l];return function(t,r,e){for(var a=new Uint8Array(r*e),n=0;n<e;n++)for(var i=0;i<r;i++){var o=Math.min(t.Width-1,Math.floor(i/r*t.Width)),h=Math.min(t.Height-1,Math.floor(n/e*t.Height));a[n*r+i]=t.Data[h*t.Width+o]}return{Width:r,Height:e,Data:a}}({Width:a,Height:a,Data:n},r,r)}self.addEventListener("message",function(t){""===t.origin&&i(function(){var r,e,n,W,m,p;return o(this,function(b){var H,w,D;switch(b.label){case 0:if(!(r=t.data)||"detect"!==r.Kind)return[2];b.label=1;case 1:return b.trys.push([1,3,,4]),[4,(H=r,i(function(){var t,r,e,n,i,W,m,p,b,w,D,x,S,A,M,I,X,Y,k,U,R,B,C,E,j,O,P,T,q,K;return o(this,function(o){e=!function(t){for(var r=t.data,e=3;e<r.length;e+=4)if(r[e]<255)return!0;return!1}(H.ImageData)?H.BackgroundCandidates.slice(0,1):H.BackgroundCandidates,n=null!=(t=H.FontCandidates)?t:l,i=null!=(r=H.ScoreThreshold)?r:.32,W=null,m=!0,p=!1,b=void 0;try{for(w=e[Symbol.iterator]();!(m=(D=w.next()).done);m=!0){var G,N;if(x=D.value,S=function(t,r){var e=c(u(t.width,t.height));return e.fillStyle=r,e.fillRect(0,0,t.width,t.height),e.putImageData(t,0,0),e.getImageData(0,0,t.width,t.height)}(H.ImageData,x),A=function(t){for(var r=t.width,e=t.height,a=t.data,n=new Uint8ClampedArray(r*e),i=0,o=0;i<a.length;i+=4,o++){var h=a[i],l=a[i+1],f=a[i+2];n[o]=Math.round(.299*h+.587*l+.114*f)}return{Width:r,Height:e,Data:n}}(S),G=s(A),N=M=v(function(t){for(var r=new Uint8Array(t.Width*t.Height),e=1;e<t.Height-1;e++)for(var a=1;a<t.Width-1;a++){for(var n=1,i=-1;i<=1&&n;i++)for(var o=-1;o<=1;o++)if(0===t.Data[(e+i)*t.Width+(a+o)]){n=0;break}r[e*t.Width+a]=n}return{Width:t.Width,Height:t.Height,Data:r}}(v(G))),I=(function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t){if(t){if("string"==typeof t)return a(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=!0;i;){i=!1;t:for(var o=0;o<n.length;o++)for(var h=o+1;h<n.length;h++)if(function(t,a){var n=t.X+t.Width,i=t.Y+t.Height,o=a.X+a.Width,h=a.Y+a.Height;return!(n+r<a.X||o+r<t.X||i+e<a.Y||h+e<t.Y)}(n[o],n[h])){var l=n[o],f=n[h];n[o]={X:Math.min(l.X,f.X),Y:Math.min(l.Y,f.Y),Width:Math.max(l.X+l.Width,f.X+f.Width)-Math.min(l.X,f.X),Height:Math.max(l.Y+l.Height,f.Y+f.Height)-Math.min(l.Y,f.Y)},n.splice(h,1),i=!0;break t}}return n})(function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,e=new Uint8Array(t.Width*t.Height),a=[],n=new Int32Array(t.Width*t.Height),i=new Int32Array(t.Width*t.Height),o=0;o<t.Height;o++)for(var h=0;h<t.Width;h++){var l=o*t.Width+h;if(!e[l]&&0!==t.Data[l]){var f=0,u=0;n[0]=h,i[u]=o,u++,e[l]=1;for(var c=h,d=o,s=h,v=o,g=0;f<u;){var y=n[f],W=i[f];f++,g++,y<c&&(c=y),W<d&&(d=W),y>s&&(s=y),W>v&&(v=W);for(var m=-1;m<=1;m++)for(var p=-1;p<=1;p++){if(0!==p||0!==m){var b=y+p,H=W+m;if(!(b<0)&&!(H<0)&&!(b>=t.Width)&&!(H>=t.Height)){var w=H*t.Width+b;!e[w]&&0!==t.Data[w]&&(e[w]=1,n[u]=b,i[u]=H,u++)}}}}g>=r&&a.push({X:c,Y:d,Width:s-c+1,Height:v-d+1})}}return a}(N,16),10,6).filter(function(t){if(t.Width<8||t.Height<8)return!1;var r=t.Width/t.Height;return r>.5&&r<12}),0!==I.length){X=!0,Y=!1,k=void 0;try{for(U=I[Symbol.iterator]();!(X=(R=U.next()).done);X=!0){B=R.value,C=g(M,B),E=!0,j=!1,O=void 0;try{for(P=h[Symbol.iterator]();!(E=(T=P.next()).done);E=!0)q=T.value,K=function(t,r,e){var a=y(t),n=1/0,i=!0,o=!1,h=void 0;try{for(var l,v=e[Symbol.iterator]();!(i=(l=v.next()).done);i=!0){var g=l.value,W=function(t,r){var e="".concat(t,"__").concat(r),a=f.get(e);if(a)return a;var n=u(256,96),i=c(n);i.fillStyle="white",i.fillRect(0,0,256,96);for(var o=Math.floor(69.12);o>8;){i.clearRect(0,0,256,96),i.fillStyle="white",i.fillRect(0,0,256,96),i.fillStyle="black",i.textAlign="center",i.textBaseline="middle",i.font="700 ".concat(o,"px ").concat(r);var h=i.measureText(t),l=h.width,v=(h.actualBoundingBoxAscent||.8*o)+(h.actualBoundingBoxDescent||.2*o);if(l<=230.4&&v<=86.4){i.fillText(t,128,48);var g=y(s(d(n)));return f.set(e,g),g}o--}i.font="700 12px ".concat(r),i.fillStyle="black",i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,48);var W=y(s(d(n)));return f.set(e,W),W}(r,g),m=function(t,r){if(t.Width!==r.Width||t.Height!==r.Height)throw Error("Image size mismatch");for(var e=0,a=0;a<t.Data.length;a++)t.Data[a]!==r.Data[a]&&e++;return e/t.Data.length}(a,W);m<n&&(n=m)}}catch(t){o=!0,h=t}finally{try{i||null==v.return||v.return()}finally{if(o)throw h}}return n}(C,q,n),(!W||K<W.Score)&&(W={Label:q,Score:K,Box:B})}catch(t){j=!0,O=t}finally{try{E||null==P.return||P.return()}finally{if(j)throw O}}}}catch(t){Y=!0,k=t}finally{try{X||null==U.return||U.return()}finally{if(Y)throw k}}}}}catch(t){p=!0,b=t}finally{try{m||null==w.return||w.return()}finally{if(p)throw b}}return!W||W.Score>i?[2,null]:[2,W]})})())];case 2:return e=b.sent(),n={Kind:"detect-result",RequestId:r.RequestId,Result:e},self.postMessage(n),[3,4];case 3:return w=W=b.sent(),m=(null!=(D=Error)&&"u">typeof Symbol&&D[Symbol.hasInstance]?!!D[Symbol.hasInstance](w):w instanceof D)?W.message:String(W),p={Kind:"detect-error",RequestId:r.RequestId,Error:m},self.postMessage(p),[3,4];case 4:return[2]}})})()})})();'],{type:"application/javascript"})))),i.addEventListener("vue:settled",function(t){return d(t)}),i.addEventListener("vue:url-changed",function(t){return setTimeout(function(){return d(t)},250)}),["https://fonts.googleapis.com/css2?family=Nanum Gothic&display=swap"].forEach(function(e){var r=t.document.createElement("link");r.rel="stylesheet",r.href=e,t.document.head.appendChild(r)}),[2]}})})()}("u">typeof unsafeWindow?unsafeWindow:window)})();
|