PageSourceSearch

https://www.deta.studio/_next/static/chunks/edbcb3c6710771b6.js

js deta.studio collected 2026-09-24 14:29:18 UTC 48,675 bytes, 4 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,888709,737604,e=>{"use strict";e.i(373373);var t=e.i(372396),n=e.i(755956);let r=new Set(["Square","Polygon","PolyLine","Line","Ink","Circle","Stamp","FreeText","Text"]),a=new Set([...r,"Highlight","Underline","StrikeOut","Squiggly","FileAttachment"]),o=new Set([...a,"Popup"]),i=new Set(["Popup"]),l=new Set(["M","ModDate","CreationDate","NM","P","AP"]),s=new Set([...l].filter(e=>"AP"!==e));async function f(e){let t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(e),Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>e.toString(16).padStart(2,"0")).join("")}function u(e,t=new Set,n="v1-accessor-bug"){if(null==e)return"null";let r=e.constructor?.name||typeof e;switch(r){case"PDFRef":return"ref(*)";case"PDFNull":return"null";case"PDFBool":return e.value?"true":"false";case"PDFNumber":if("numeric"===n)return`num(${Math.round(10*e.numberValue)/10})`;return`num(${e.value})`;case"PDFString":case"PDFHexString":return`str(${e.value||e.asString?.()||""})`;case"PDFName":{let t=e.encodedName??(e.asString?.()||"");return`name(${t})`}case"PDFArray":{let r=[];for(let a=0;a<e.size();a++)r.push(u(e.get(a),t,n));return`[${r.join(",")}]`}case"PDFDict":{let r=[],a=Array.from(e.keys()).map(e=>{let t=e.encodedName??(e.asString?.()||String(e));return{key:e,name:t.startsWith("/")?t.slice(1):t}});for(let{key:o,name:i}of(a.sort((e,t)=>e.name.localeCompare(t.name)),a))t.has(i)||r.push(`${i}:${u(e.get(o),t,n)}`);return`{${r.join(",")}}`}case"PDFStream":case"PDFRawStream":case"PDFContentStream":{let r=e.dict?u(e.dict,t,n):"{}",a=Array.from(e.contents||e.getContents?.()||new Uint8Array(0)).map(e=>e.toString(16).padStart(2,"0")).join("");return`stream(${r},content=${a})`}default:if(e.toString)return`other(${r}:${e.toString().substring(0,50)})`;return`unknown(${r})`}}function c(e,n,r){let a=n.get(t.PDFName.of(r)),o=a instanceof t.PDFRef?e.context.lookup(a):a;return o instanceof t.PDFDict?o:void 0}async function m(e){let{hash:t}=await p(e,"v2");return t}async function d(e){try{let t=await n.PDFDocument.load(e,{ignoreEncryption:!0,updateMetadata:!1});return await m(t)}catch{return null}}async function p(e,n){let o=e.getPages(),m=[],d=[],p=[],g=[],h=[];for(let P=0;P<o.length;P++){let F=o[P],{width:N,height:y}=F.getSize(),b=F.node.Contents();if(b){if("PDFArray"===b.constructor?.name)for(let e=0;e<b.size();e++){let t=b.lookup(e);t?.contents&&(t.contents.length,m.push(t.contents))}else if(b.contents){let e=b.contents;e.length,m.push(e)}}let S=F.node.Annots();if(S&&S instanceof t.PDFArray){let e="v1"===n?r:a;for(let r=0;r<S.size();r++){let a=S.lookup(r);if(a&&a instanceof t.PDFDict){let r=function(e){let n=e.get(t.PDFName.of("Subtype"));if(!n||!(n instanceof t.PDFName))return null;let r=n.encodedName??(n.asString?.()||"");return r.startsWith("/")?r.slice(1):r}(a);if(r&&!e.has(r)&&!i.has(r)){let e="v1"===n?"v1-accessor-bug":"numeric";d.push({page:P,subtype:r,serialized:u(a,l,e),serializedLegacy:u(a,s,e)})}}}}let k="v2"===n?`${Math.round(10*N)/10}x${Math.round(10*y)/10}`:`${N}x${y}`;if(p.push(`page${P}:${k}`),"v2"===n)try{var D;g.push(`rot${P}:${(D=F.getRotation().angle??0,(Math.round(D)%360+360)%360)}`);let n=F.node.Resources();if(n){let r=[];!function e(n,r,a,o,i){if(i>8)return;let l=c(n,r,"XObject");if(l)for(let[,r]of l.entries()){let l=r;if(r instanceof t.PDFRef){let e=r.toString();if(o.has(e))continue;o.add(e),l=n.context.lookup(r)}if(!(l instanceof t.PDFRawStream))continue;let s=l.dict.lookup(t.PDFName.of("Subtype")),f=s instanceof t.PDFName?s.toString():"";if("/Image"===f)a.push(l.contents??new Uint8Array(0));else if("/Form"===f){let t=c(n,l.dict,"Resources");t&&e(n,t,a,o,i+1)}}}(e,n,r,new Set,0);let a=await Promise.all(r.map(e=>f(e)));for(let e of(a.sort(),a))h.push(`img${P}:${e}`)}}catch{}}let P=t=>{let r=[...d].sort((e,n)=>e.page!==n.page?e.page-n.page:e.subtype!==n.subtype?e.subtype.localeCompare(n.subtype):t(e).localeCompare(t(n))),a=[`pages=${e.getPageCount()}`,...p];if("v2"===n&&(g.length>0&&a.push("rotations",...g),h.length>0&&a.push("images",...h)),r.length>0)for(let e of(a.push(`unsupported_annotations=${r.length}`),r))a.push(`annot:page${e.page}:${e.subtype}:${t(e)}`);return a.join("\n")},F=e=>{let t=m.reduce((e,t)=>
1e+t.length,0),n=new TextEncoder().encode(e),r=new Uint8Array(n.length+t);r.set(n,0);let a=n.length;for(let e of m)r.set(e,a),a+=e.length;return f(r)},N=e=>"v1"===n?e:`${n}:${e}`,y=N(await F(P(e=>e.serialized))),b=d.some(e=>e.serialized!==e.serializedLegacy)?N(await F(P(e=>e.serializedLegacy))):y;return{hash:y,legacyHash:b}}e.s(["IMPORT_SUPPORTED_ANNOTATION_SUBTYPES",0,o,"computeDeterministicPdfHashesForVersion",()=>p,"computeExportedPdfBaseHash",()=>d],888709);var g=e.i(426020);function h(e,n,r,a=2){let o=e.obj({});return o.set(t.PDFName.of("U"),t.PDFString.of(n)),o.set(t.PDFName.of("C"),t.PDFNumber.of(r)),o.set(t.PDFName.of("D"),t.PDFNumber.of(a)),o}function D(e,n,r="imperial-fractional"){let{width:a,height:o}=e.getSize(),i=e.doc.context,l=(0,g.isMetricSystem)(r)?`1:${n}`:`1 in = ${n} ft`,s=function(e,n,r,a="imperial-fractional",o){let i=e.obj({});i.set(t.PDFName.of("Type"),t.PDFName.of("Viewport")),i.set(t.PDFName.of("BBox"),e.obj([t.PDFNumber.of(n[0]),t.PDFNumber.of(n[1]),t.PDFNumber.of(n[2]),t.PDFNumber.of(n[3])])),o&&i.set(t.PDFName.of("Name"),t.PDFString.of(o));let l=function(e,n,r="imperial-fractional"){let a=e.obj({});if(a.set(t.PDFName.of("Type"),t.PDFName.of("Measure")),a.set(t.PDFName.of("Subtype"),t.PDFName.of("RL")),(0,g.isMetricSystem)(r)){let r=.0254*n,o=`1:${n}`;a.set(t.PDFName.of("R"),t.PDFString.of(o));let i=h(e,"m",r/72);a.set(t.PDFName.of("X"),e.obj([i]));let l=h(e,"m",1);a.set(t.PDFName.of("D"),e.obj([l]));let s=h(e,"m²",1);a.set(t.PDFName.of("A"),e.obj([s]))}else{let r=`1 in = ${n} ft`;a.set(t.PDFName.of("R"),t.PDFString.of(r));let o=h(e,"ft",n/72);a.set(t.PDFName.of("X"),e.obj([o]));let i=h(e,"ft",1);a.set(t.PDFName.of("D"),e.obj([i]));let l=h(e,"sq ft",1);a.set(t.PDFName.of("A"),e.obj([l]))}return a}(e,r,a);return i.set(t.PDFName.of("Measure"),l),i}(i,[0,0,a,o],n,r,l),f=i.register(s),u=e.node,c=u.get(t.PDFName.of("VP"));if(c instanceof t.PDFArray)c.push(f);else{let e=i.obj([f]),n=i.register(e);u.set(t.PDFName.of("VP"),n)}}function P(e){let n={},r=e.getPageCount();for(let a=0;a<r;a++){let r=function(e,n){let r=e.get(t.PDFName.of("VP"));if(r instanceof t.PDFRef&&(r=n.lookup(r)),!(r instanceof t.PDFArray)||0===r.size())return null;let a=r.get(r.size()-1),o=a instanceof t.PDFRef?n.lookup(a):a;if(!(o instanceof t.PDFDict))return null;let i=o.get(t.PDFName.of("Measure")),l=i instanceof t.PDFRef?n.lookup(i):i;if(!(l instanceof t.PDFDict))return null;let s=l.get(t.PDFName.of("R"));if(s instanceof t.PDFString){let e=function(e){let t=e.match(/^1:(\d+(?:\.\d+)?)$/);if(t)return parseFloat(t[1]);let n=e.match(/(\d+(?:\.\d+)?)\s*in\s*=\s*(\d+(?:\.\d+)?)\s*ft/i);if(n){let e=parseFloat(n[1]),t=parseFloat(n[2]);if(e>0)return t/e}let r=e.match(/1\/(\d+)\s*in\s*=\s*1\s*ft/i);return r?parseFloat(r[1]):null}(s.decodeText());if(null!==e)return e}let f=l.get(t.PDFName.of("X")),u=f instanceof t.PDFRef?n.lookup(f):f;if(u instanceof t.PDFArray&&u.size()>0){let e=u.get(0),r=e instanceof t.PDFRef?n.lookup(e):e;if(r instanceof t.PDFDict){let e=r.get(t.PDFName.of("C"));if(e instanceof t.PDFNumber)return 72*e.asNumber()}}return null}(e.getPage(a).node,e.context);null!==r&&(n[a+1]=r)}return n}e.s(["addViewportToPage",()=>D,"extractPageScales",()=>P],737604)},166810,778331,90078,e=>{"use strict";e.i(373373);var t=e.i(372396),n=e.i(755956),r=e.i(622416),a=e.i(91573),o=e.i(303474);function i(e){let t=o.default.inflate(e);if(t)return t;let n=new o.default.Inflate,r=[];if(n.onData=e=>{e instanceof Uint8Array&&r.push(e)},n.push(e,!0),n.err)throw Error(String(n.msg||n.err));let a=n.strm;a?.output&&a.next_out&&r.push(a.output.slice(0,a.next_out));let i=r.reduce((e,t)=>e+t.length,0);if(!i)throw Error("inflate produced no output");let l=new Uint8Array(i),s=0;for(let e of r)l.set(e,s),s+=e.length;return l}function l(e,n){let r=e.lookup(n.get(t.PDFName.of("Resources")));return r instanceof t.PDFDict?r:void 0}function s(e){let n=e.dict.get(t.PDFName.of("Filter")),r=n instanceof t.PDFName?[n.asString()]:n instanceof t.PDFArray?n.asArray().map(e=>e instanceof t.PDFName?e.asString():""):[];if(!r.length)return e.contents;if(r.some(e=>e.includes("Flate")))try{return i(e.contents)}catch{}return null}let f=(e,n)=>n instanceof t.PDFRef?e.lookup(n):n;function u(e,n,r=0){let a=f(e,n);return a instanceof t.PDFNumber?a.asNumber():r}function c(e,n){let r=f(e,n);return r instanceof t.PDFArray?r.asArray().map(t=>u(e,t)):void 0}function m(e,n){let r=f(e,n),a=r instanceof t.PDFRawStream?r.dict:r instanceof t.PDFDict?r:null;if(!a)return null;let o=u(e,a.get(t.PDFName.of("FunctionType")),-1);if(2===o){let n=c(e,a.get(t.PDFName.of("C0")))??[0],r=c(e,a.get(t.PDFName.of("C1")))??[1],o=u(e,a.get(t.PDFName.of("N")),1);return e=>{let t=Math.pow(e[0]??0,o);return n.map((e,n)=>e+t*((r[n]??0)-e))}}if(0===o&&r instanceof t.PDFRawStream){let n=c(e,a.get(t.PDFName.of("Size")))??[2],o=u(e,a.get(t.PDFName.of("BitsPerSample")),8),i=c(e,a.get(t.PDFName.of("Domain")))??[0,1],l=c(e,a.get(t.PDFName.of("Range")))??[],f=l.length/2;if(f<1)return null;let m=n[0]??2,d=c(e,a.get(t.PDFName.of("Encode")))??[0,m-1],p=c(e,a.get(t.PDFName.of("Decode")))??l,g=s(r)??r.contents,h=Math.pow(2,o)-1,D=(e,t)=>
1(e=>{let t=0;for(let n=0;n<o;n++){let r=e+n;t=t<<1|(g[r>>3]??0)>>7-(7&r)&1}return t})((e*f+t)*o);return e=>{let t=i[0]??0,n=i[1]??1,r=Math.max(t,Math.min(n,e[0]??0)),a=(d[0]??0)+(r-t)*((d[1]??m-1)-(d[0]??0))/(n-t||1),o=Math.floor(a=Math.max(0,Math.min(m-1,a))),l=Math.min(m-1,o+1),s=a-o,u=[];for(let e=0;e<f;e++){let t=(D(o,e)+(D(l,e)-D(o,e))*s)/h,n=p[2*e]??0,r=p[2*e+1]??1;u.push(n+t*(r-n))}return u}}if(3===o){let n=f(e,a.get(t.PDFName.of("Functions"))),r=n instanceof t.PDFArray?n.asArray().map(t=>m(e,t)):[],o=c(e,a.get(t.PDFName.of("Bounds")))??[],i=c(e,a.get(t.PDFName.of("Domain")))??[0,1],l=c(e,a.get(t.PDFName.of("Encode")))??[];return r.length?e=>{let t=Math.max(i[0]??0,Math.min(i[1]??1,e[0]??0)),n=0;for(;n<o.length&&t>=o[n];)n++;let a=r[n];if(!a)return[0];let s=0===n?i[0]:o[n-1],f=n===o.length?i[1]:o[n],u=l[2*n]??0,c=l[2*n+1]??1;return a([f-s?u+(t-s)*(c-u)/(f-s):u])}:null}return null}let d=e=>Math.max(0,Math.min(1,e)),p=e=>[d((1-(e[0]??0))*(1-(e[3]??0))),d((1-(e[1]??0))*(1-(e[3]??0))),d((1-(e[2]??0))*(1-(e[3]??0)))],g=e=>[d(e[0]??0),d(e[0]??0),d(e[0]??0)],h=e=>[d(e[0]??0),d(e[1]??0),d(e[2]??0)];function D(e,n,r=0){if(r>8)return null;let a=f(e,n);if(a instanceof t.PDFName){let e=a.asString();return e.includes("DeviceGray")||e.includes("CalGray")||"/G"===e?g:e.includes("DeviceRGB")||e.includes("CalRGB")||"/RGB"===e?h:e.includes("DeviceCMYK")||"/CMYK"===e?p:null}if(a instanceof t.PDFArray){let n=a.asArray().map(t=>f(e,t)),o=(n[0]instanceof t.PDFName?n[0].asString():"").replace(/^\//,"");if("ICCBased"===o){let r,a=n[1];return 1===(r=a instanceof t.PDFRawStream?u(e,a.dict.get(t.PDFName.of("N")),3):3)?g:4===r?p:h}if("CalRGB"===o||"Lab"===o)return h;if("CalGray"===o)return g;if("Separation"===o){let t=D(e,n[2],r+1),a=m(e,n[3]);if(t&&a)return e=>t(a([e[0]??0]))}if("DeviceN"===o){let t=D(e,n[2],r+1),a=m(e,n[3]);if(t&&a)return e=>t(a(e))}}return null}let P=(e,t=0,n=e.length)=>String.fromCharCode(...e.subarray(t,n)),F=new Set([0,9,10,12,13,32]),N=new Set([40,41,60,62,91,93,123,125,47,37]),y=e=>F.has(e),b=e=>F.has(e)||N.has(e);var S=e.i(475094);let k=e=>Math.max(0,Math.min(1,e));function x(e,t){let n=k(e);return{r:n,g:n,b:n,a:t}}function A(e,t,n,r){return{r:k(e),g:k(t),b:k(n),a:r}}function T(e,t,n,r,a){return{r:k((1-e)*(1-r)),g:k((1-t)*(1-r)),b:k((1-n)*(1-r)),a:a}}function C(e,t,n){if(t){let[r,a,o]=t(e);return A(r,a,o,n)}return 1===e.length?x(e[0],n):4===e.length?T(e[0],e[1],e[2],e[3],n):A(e[0]??0,e[1]??0,e[2]??0,n)}function M(e){return{ctm:[...e.ctm],fill:{...e.fill},stroke:{...e.stroke},fillCs:e.fillCs,strokeCs:e.strokeCs,lineWidth:e.lineWidth,dash:[...e.dash],lineCap:e.lineCap,lineJoin:e.lineJoin,fillAlpha:e.fillAlpha,strokeAlpha:e.strokeAlpha,blend:e.blend,clip:e.clip,text:{...e.text,tm:[...e.text.tm],tlm:[...e.text.tlm]}}}function v(e){return Math.sqrt(Math.abs(e[0]*e[3]-e[1]*e[2]))||1}function w(e){let n=e.dict.get(t.PDFName.of("Filter"));return n instanceof t.PDFName?[n.asString()]:n instanceof t.PDFArray?n.asArray().map(e=>e instanceof t.PDFName?e.asString():""):[]}function R(e,n){let r=e.get(t.PDFName.of(n));return r instanceof t.PDFNumber?r.asNumber():null}let I=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?0xedb88320^n>>>1:n>>>1;e[t]=n>>>0}return e})();function B(e,t){let n=new Uint8Array(12+t.length),r=new DataView(n.buffer);r.setUint32(0,t.length);for(let t=0;t<4;t++)n[4+t]=e.charCodeAt(t);n.set(t,8);let a=n.subarray(4,8+t.length);return r.setUint32(8+t.length,function(e){let t=0xffffffff;for(let n=0;n<e.length;n++)t=I[(t^e[n])&255]^t>>>8;return(0xffffffff^t)>>>0}(a)),n}function $(e,t,n,r){let a=new Uint8Array(13),i=new DataView(a.buffer);i.setUint32(0,e),i.setUint32(4,t),a[8]=8,a[9]=n;let l=new Uint8Array([137,80,78,71,13,10,26,10]),s=o.default.deflate(r),f=[l,B("IHDR",a),B("IDAT",s),B("IEND",new Uint8Array(0))],u=new Uint8Array(f.reduce((e,t)=>e+t.length,0)),c=0;for(let e of f)u.set(e,c),c+=e.length;return u}function z(e){let n=e.dict.get(t.PDFName.of("SMask"));if(!n||n instanceof t.PDFName&&n.asString().includes("None"))return null;let r=n instanceof t.PDFRef?e.dict.context.lookup(n):n;return r instanceof t.PDFRawStream?r:"unresolvable"}let j=e=>"number"==typeof e,U=e=>!!e&&"object"==typeof e&&"n"in e,W=e=>!!e&&"object"==typeof e&&"str"in e,E=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y);function O(e){return e.filter(e=>"number"==typeof e)}function L(e){let n=e.get(t.PDFName.of("Matrix")),r=n?.asArray?.();if(!r||r.length<6)return null;let a=r.map(e=>e instanceof t.PDFNumber?e.asNumber():NaN);return a.some(e=>!isFinite(e))?null:[a[0],a[1],a[2],a[3],a[4],a[5]]}let G=e=>{if(e.length>=2&&254===e[0]&&255===e[1]){let t="";for(let n=2;n+1<e.length;n+=2)t+=String.fromCharCode(e[n]<<8|e[n+1]);return t}if(e.length>=2&&e.length%2==0){let t=!0;for(let n=0;n<e.length;n+=2)if(0!==e[n]){t=!1;break}if(t){let t="";for(let n=0;n+1<e.length;n+=2)t+=String.fromCharCode(e[n]<<8|e[n+1]);return t}}let t="";for(let n=0;n<e.length;n+=4096)t+=String.fromCharCode(...e.subarray(n,n+4096));return t};function H(e){let n=[];for(let r=0;r<e.size();r++){let a=e.get(r);n.push(a instanceof t.PDFNumber?a.asNumber():0)}return n}function J(e,n){let r=e.lookup(n);if(r instanceof t.PDFRawStream)return{form:r,ref:n instanceof t.PDFRef?n:void 0}}function q(e,n,{ambiguousState:r="first"}={}){let a=e.lookup(n.get(t.PDFName.of("AP")));if(!(a instanceof t.PDFDict))return;let o=a.get(t.PDFName.of("N")),i=J(e,o);if(i)return i;let l=e.lookup(o);if(!(l instanceof t.PDFDict))return;let s=n.get(t.PDFName.of("AS"));if(s instanceof t.PDFName){let t=J(e,l.get(s));if(t)return t}let f=l.entries();if("skip"!==r||1===f.length)for(let[,t]of f){let n=J(e,t);if(n)return n}}function K(e,n){let r=e.lookup(n.dict.get(t.PDFName.of("BBox")));if(!(r instanceof t.PDFArray)||4>r.size())return null;let a=H(r),o=[1,0,0,1,0,0],i=e.lookup(n.dict.get(t.PDFName.of("Matrix")));if(i instanceof t.PDFArray&&i.size()>=6){let e=H(i);o=[e[0],e[1],e[2],e[3],e[4],e[5]]}return{bbox:[a[0],a[1],a[2],a[3]],matrix:o}}function V(e,t){let n=q(e,t);if(!n)return null;let r=n.form,a=s(r),o=a??new Uint8Array(0),i=K(e,r);return i?{stream:o,bbox:i.bbox,matrix:i.matrix,resources:l(e,r.dict),decodeFailed:null==a}
1:{stream:new Uint8Array(0),bbox:[0,0,1,1],matrix:[1,0,0,1,0,0],resources:void 0,decodeFailed:!0}}e.s(["locateAppearance",()=>V,"readAppearanceGeometry",()=>K,"resolveNormalAppearance",()=>q],778331);let X=(e,n)=>n instanceof t.PDFRef?e.lookup(n):n;function Y(e){return e instanceof t.PDFNumber?e.asNumber():null}function _(e,n){let r=X(e,n);if(!(r instanceof t.PDFArray))return;let a=[];for(let e=0;e<r.size();e++)a.push(Y(r.get(e))??0);return a}function Q(e){return e instanceof t.PDFString||e instanceof t.PDFHexString?e.decodeText():null}function Z(e){if(!(e instanceof t.PDFName))return null;let n=e.decodeText();return n.startsWith("/")?n.slice(1):n}function ee(e,t){let n=_(e,t);if(!n||0===n.length)return null;if(1===n.length)return{r:n[0],g:n[0],b:n[0],a:1};if(4===n.length){let[e,t,r,a]=n;return{r:(1-e)*(1-a),g:(1-t)*(1-a),b:(1-r)*(1-a),a:1}}return{r:n[0],g:n[1]??0,b:n[2]??0,a:1}}function et(e,n){let r=X(e,n);if(!(r instanceof t.PDFArray))return null;let a=[];for(let n=0;n<r.size();n++){let o=function(e,n){let r=X(e,n);if(!(r instanceof t.PDFDict))return null;let a=Q(r.get(t.PDFName.of("U"))),o=Y(r.get(t.PDFName.of("C")));return null===a||null===o?null:{unit:a,conversion:o,denominator:Y(r.get(t.PDFName.of("D")))??100,fractional:"F"===Z(r.get(t.PDFName.of("F")))}}(e,r.get(n));o&&a.push(o)}return a.length?a:null}let en=new Set(["FreeText","Line","Polygon","PolyLine"]);async function er(e,o={}){return function(e,n={}){let o=e.context,f=[],u=e.getPages();for(let e=0;e<u.length;e++){let c=e+1;if(n.page&&n.page!==c)continue;let m=u[e],d=(0,a.normalizeRotation)(m.getRotation().angle??0),p="raw"===n.frame?0:d,g=m.getCropBox(),h=g.width,F=g.height,N=(0,a.displayedPageHeight)(p,h,F),k=90===p||270===p?F:h,I=m.node.get(t.PDFName.of("Annots")),B=o.lookup(I);if(B instanceof t.PDFArray)for(let e=0;e<B.size();e++){let n=B.get(e),u=n instanceof t.PDFRef?o.lookup(n):n;if(!(u instanceof t.PDFDict))continue;let m=function(e){let n=e.get(t.PDFName.of("Subtype"));if(!(n instanceof t.PDFName))return null;let r=n.decodeText();return r.startsWith("/")?r.slice(1):r}(u);if(!m)continue;let I=function(e,n,r){let a,o=_(e,n.get(t.PDFName.of("Rect")))??[0,0,0,0],i=[o[0],o[1],o[2],o[3]],l=e=>Y(n.get(t.PDFName.of(e))),s=_(e,n.get(t.PDFName.of("L"))),f=function(e,n){let r=X(e,n.get(t.PDFName.of("Measure")));if(!(r instanceof t.PDFDict))return{hasMeasure:!1,scale:null,spec:null};let a=Q(r.get(t.PDFName.of("R"))),o=et(e,r.get(t.PDFName.of("X"))),i=et(e,r.get(t.PDFName.of("D"))),l=et(e,r.get(t.PDFName.of("A")));return{hasMeasure:!0,scale:a,spec:a&&o&&i&&l?{ratio:a,x:o,distance:i,area:l}:null}}(e,n),u=_(e,n.get(t.PDFName.of("C"))),c=_(e,n.get(t.PDFName.of("IC"))),m=Q(n.get(t.PDFName.of("State")))??Z(n.get(t.PDFName.of("State"))),d=Q(n.get(t.PDFName.of("StateModel")))??Z(n.get(t.PDFName.of("StateModel"))),p="FreeText"===r,g=p?Q(n.get(t.PDFName.of("DA"))):null,h=p?function(e){if(!e)return null;let t=/(?:^|[\s)])((?:[\d.]+\s+){0,3}[\d.]+)\s+(RG|G|K)(?=\s|$)/.exec(e);if(!t)return null;let n=t[1].trim().split(/\s+/).map(Number);if(n.some(e=>!Number.isFinite(e)))return null;let r=t[2];if("G"===r&&1===n.length)return{r:n[0],g:n[0],b:n[0],a:1};if("RG"===r&&3===n.length)return{r:n[0],g:n[1],b:n[2],a:1};if("K"===r&&4===n.length){let[e,t,r,a]=n;return{r:(1-e)*(1-a),g:(1-t)*(1-a),b:(1-r)*(1-a),a:1}}return null}(g):null;return{rect:i,strokeColor:ee(e,n.get(t.PDFName.of("C"))),interiorColor:ee(e,n.get(t.PDFName.of("IC"))),rawColor:u&&u.length?u:null,rawInteriorColor:c&&c.length?c:null,borderWidth:function(e,n){let r=X(e,n.get(t.PDFName.of("BS")));if(r instanceof t.PDFDict){let e=Y(r.get(t.PDFName.of("W")));if(null!==e)return e}let a=X(e,n.get(t.PDFName.of("Border")));return a instanceof t.PDFArray&&a.size()>=3?Y(a.get(2)):null}(e,n),borderDash:function(e,n){let r=e=>{let t=[];for(let n=0;n<e.size();n++){let r=Y(e.get(n));if(null===r||r<0)return null;t.push(r)}return t.length>0&&t.some(e=>e>0)?t:null},a=X(e,n.get(t.PDFName.of("BS")));if(a instanceof t.PDFDict){let n=a.get(t.PDFName.of("S"));if(!(n instanceof t.PDFName)||"/D"!==n.asString())return null;let o=X(e,a.get(t.PDFName.of("D")));return o instanceof t.PDFArray?r(o):[3]}let o=X(e,n.get(t.PDFName.of("Border")));if(o instanceof t.PDFArray&&o.size()>=4){let n=X(e,o.get(3));return n instanceof t.PDFArray?r(n):null}return null}(e,n),borderEffect:function(e,n){let r=X(e,n.get(t.PDFName.of("BE")));if(!(r instanceof t.PDFDict))return null;let a=Z(r.get(t.PDFName.of("S")));return a&&"S"!==a?{style:a,intensity:Y(r.get(t.PDFName.of("I")))??0}:null}(e,n),opacity:l("CA")??l("ca"),contents:Q(n.get(t.PDFName.of("Contents"))),inkList:function(e,n){let r=X(e,n.get(t.PDFName.of("InkList")));if(!(r instanceof t.PDFArray))return;let a=[];for(let n=0;n<r.size();n++){let o=X(e,r.get(n));if(o instanceof t.PDFArray){let e=[];for(let t=0;t<o.size();t++)e.push(Y(o.get(t))??0);e.length>=4&&a.push(e)}}return a.length?a:void 0}(e,n),vertices:_(e,n.get(t.PDFName.of("Vertices"))),line:s&&s.length>=4?[s[0],s[1],s[2],s[3]]:void 0,lineEndings:(a=X(e,n.get(t.PDFName.of("LE"))))instanceof t.PDFArray&&a.size()>=2?[Z(a.get(0))??"None",Z(a.get(1))??"None"]:a instanceof t.PDFName?["None",Z(a)??"None"]:void 0,quadPoints:_(e,n.get(t.PDFName.of("QuadPoints"))),da:g,rc:p?Q(n.get(t.PDFName.of("RC"))):null,ds:p?Q(n.get(t.PDFName.of("DS"))):null,quadding:p?Y(n.get(t.PDFName.of("Q"))):null,borderColor:h,rawBorderColor:h?[h.r,h.g,h.b]:null,rotate:p?Y(n.get(t.PDFName.of("Rotate"))):null,callout:_(e,n.get(t.PDFName.of("CL"))),rd:_(e,n.get(t.PDFName.of("RD"))),intent:function(e,n){if(!en.has(n))return null;let r=Z(e.get(t.PDFName.of("IT")));return r&&"undefined"!==r?r:null}(n,r),hasMeasure:f.hasMeasure,measureScale:f.scale,measure:f.spec,deta:function(e,n){let r=X(e,n.get(t.PDFName.of("Deta")));if(!(r instanceof t.PDFDict))return null;let a={};for(let[n,o]of r.entries()){let r=n.decodeText().replace(/^\//,""),i=X(e,o);i instanceof t.PDFNumber?a[r]=i.asNumber():i instanceof t.PDFBool?a[r]=i===t.PDFB
1ool.True:i instanceof t.PDFString||i instanceof t.PDFHexString?a[r]=i.decodeText():i instanceof t.PDFName?a[r]=Z(i):a[r]=i?.toString?.()??null}return a}(e,n),author:Q(n.get(t.PDFName.of("T"))),creationDate:Q(n.get(t.PDFName.of("CreationDate"))),modDate:Q(n.get(t.PDFName.of("M"))),inReplyTo:function(e,n){let r=n.get(t.PDFName.of("IRT"));if(r instanceof t.PDFRef){let n=e.lookup(r);if(n instanceof t.PDFDict)return Q(n.get(t.PDFName.of("NM")))}return null}(e,n),state:m,stateModel:m?d:null}}(o,u,m),H=function(e,t,n){let r=n.hasMeasure||!!t?.endsWith("Dimension");switch(e){case"Ink":return{kind:"freehand",stampForever:!1};case"Square":return{kind:"rectangle",stampForever:!1};case"Circle":let a;return{kind:(a=n.deta)&&(a.Numbered??a.numbered??a.Point??a.point)?"point":"ellipse",stampForever:!1};case"Stamp":return{kind:"picture",stampForever:!0};case"FreeText":return{kind:"text",stampForever:!1};case"Highlight":case"Underline":case"StrikeOut":case"Squiggly":return{kind:"highlight",stampForever:!1};case"Text":return{kind:"comment",stampForever:!1};case"Line":case"PolyLine":return r?{kind:"measurement",stampForever:!1}:{kind:"polyline",stampForever:!1};case"Polygon":if("PolygonCloud"===t)return{kind:"cloud",stampForever:!1};if("PolygonDimension"===t||r)return{kind:"area-measurement",stampForever:!1};if(function(e){if(!e||8!==e.length)return!1;let t=[[e[0],e[1]],[e[2],e[3]],[e[4],e[5]],[e[6],e[7]]];for(let e=0;e<4;e++){let n=t[(e+3)%4],r=t[e],a=t[(e+1)%4],o=n[0]-r[0],i=n[1]-r[1],l=a[0]-r[0],s=a[1]-r[1],f=o*l+i*s,u=Math.hypot(o,i),c=Math.hypot(l,s);if(u<1e-6||c<1e-6||Math.abs(f/(u*c))>.08)return!1}return!0}(n.vertices))return{kind:"rectangle",stampForever:!1};return{kind:"polyline",stampForever:!1};default:return null}}(m,I.intent??null,I);if(!H)continue;let J=null,q=null,K=!1,er=V(o,u);if(er?.decodeFailed)K=!0;else if(er){let e=(0,r.computeApToCanvas)({rect:I.rect,bbox:er.bbox,matrix:er.matrix,rotation:p,mediaWidth:h,mediaHeight:F,cropX:g.x,cropY:g.y}),n=function(e,n,r,a){let o=[],f=!1,u=1/0,c=1/0,m=-1/0,d=-1/0,p=(e,t)=>{e<u&&(u=e),t<c&&(c=t),e>m&&(m=e),t>d&&(d=t)};return function e(n,a,u,c){if(c>8){f=!0;return}let m=[u],d=m[0],D=[...u.ctm],k=null,I=[],B=null,H=null,J=[],q=[],K=0,V=e=>{K>0||(q.length?q[q.length-1].push(e):J.push(e))},X=(e,t)=>{let[n,r]=(0,S.applyPt)(e,t,d.ctm);return{x:n,y:r}},Y=(e,t)=>{H=B=X(e,t),I.push({pts:[B],closed:!1})},_=(e,t)=>{let n=X(e,t),r=I[I.length-1];r?r.closed?I.push({pts:B?[B,n]:[n],closed:!1}):r.pts.push(n):I.push({pts:[n],closed:!1}),B=n},Q=(e,t,n)=>{var r,a,o,i;B||(H=B=e,I.push({pts:[B],closed:!1})),(!I.length||I[I.length-1].closed)&&I.push({pts:[B],closed:!1});let l=B,s=(r=l,a=e,o=t,i=n,Math.max(4,Math.min(64,Math.ceil((E(r,a)+E(a,o)+E(o,i)||E(r,i)||1)/3)))),f=I[I.length-1];for(let r=1;r<=s;r++)f.pts.push(function(e,t,n,r,a){let o=1-a,i=o*o*o,l=3*o*o*a,s=3*o*a*a,f=a*a*a;return{x:i*e.x+l*t.x+s*n.x+f*r.x,y:i*e.y+l*t.y+s*n.y+f*r.y}}(l,e,t,n,r/s));B=n},Z=(e,t,n,r)=>{let a=[X(e,t),X(e+n,t),X(e+n,t+r),X(e,t+r)];I.push({pts:a,closed:!0}),H=B=a[0]},ee=()=>{I.length&&(I[I.length-1].closed=!0),H&&(B=H)},et=["butt","round","square"],en=["miter","round","bevel"],er=null,ea=(n,a,i,u=!1)=>{i&&ee();let m=I.filter(e=>e.pts.length>0),h=d.clip.length?d.clip:void 0,P=a&&k?k:null;if(m.length)for(let e of m)for(let t of e.pts)p(t.x,t.y);if(P&&m.length&&function(n,a,o,i){let u=s(n);if(!u){f=!0;return}let c=L(n.dict)??S.ID,m=g(n.dict,"XStep"),p=g(n.dict,"YStep");if(!m||!p){f=!0;return}let h=(0,S.mul)(c,D),P=(0,S.invert)(h),F=1/0,N=-1/0,y=1/0,b=-1/0;for(let e of a)for(let t of e.pts){let[e,n]=(0,S.applyPt)(t.x,t.y,P);e<F&&(F=e),e>N&&(N=e),n<y&&(y=n),n>b&&(b=n)}if(!isFinite(F))return;let k=function(e,n){let a=r.lookup(e.get(t.PDFName.of(n)));if(!(a instanceof t.PDFArray)||4>a.size())return null;let o=e=>{let n=r.lookup(a.get(e));return n instanceof t.PDFNumber?n.asNumber():NaN},i=Math.abs(o(2)-o(0)),l=Math.abs(o(3)-o(1));return Number.isFinite(i)&&Number.isFinite(l)?{w:i,h:l}:null}(n.dict,"BBox"),x=k?Math.ceil(Math.max(0,k.w-m)/m):0,A=k?Math.ceil(Math.max(0,k.h-p)/p):0,T=Math.floor(F/m)-x,C=Math.ceil(N/m)-1,v=Math.floor(y/p)-A,w=Math.ceil(b/p)-1,R=(C-T+1)*(w-v+1);if(R<=0)return;if(R>2e4){f=!0;return}let I=[...d.clip,{subpaths:a.map(e=>({pts:e.pts,closed:e.closed})),fillRule:o?"evenodd":void 0}],B=l(r,n.dict);for(let t=T;t<=C;t++)for(let n=v;n<=w;n++){let r=M(d);r.ctm=(0,S.mul)((0,S.translate)(t*m,n*p),h),r.clip=I,e(u,B,r,i+1)}}(P,m,u,c),m.length&&!(P&&!n)){let e=n?Math.max(d.lineWidth*v(d.ctm),.4):void 0,t=d.dash.length?d.dash.map(e=>e*v(d.ctm)):void 0;o.push({op:"path",subpaths:m.map(e=>({pts:e.pts,closed:e.closed})),fill:a&&!P?{...d.fill}:void 0,fillRule:a&&!P&&u?"evenodd":void 0,stroke:n?{...d.stroke}:void 0,strokeWidth:e,dash:t,lineCap:n&&d.lineCap?et[d.lineCap]:void 0,lineJoin:n&&d.lineJoin?en[d.lineJoin]:void 0,blend:d.blend,clip:h})}er&&m.length&&(d.clip=[...d.clip,{subpaths:m.map(e=>({pts:e.pts,closed:e.closed})),fillRule:"evenodd"===er?"evenodd":void 0}]),er=null,I=[],B=null,H=null},eo=e=>{let n=d.text;if(3===n.renderMode||7===n.renderMode)return;e.length&&!function(e,n,a){if(!n)return!1;let o=h(e,"Font"),i=o?r.lookup(o.get(t.PDFName.of(n))):void 0;if(!(i instanceof t.PDFDict))return!1;let l=r.lookup(i.get(t.PDFName.of("Subtype")));if(!(l instanceof t.PDFName)||!["Type1","TrueType"].includes(l.decodeText()))return!1;let s=r.lookup(i.get(t.PDFName.of("Encoding")));if(s instanceof t.PDFDict){let e=r.lookup(s.get(t.PDFName.of("Differences")));if(e instanceof t.PDFArray){let n=0;for(let o of e.asArray()){let e=r.lookup(o);if(e instanceof t.PDFNumber)n=e.asNumber();else{if(!(e instanceof t.PDFName)||a.includes(n))return!1;n++}}}s=r.lookup(s.get(t.PDFName.of("BaseEncoding")))}if(s&&(!(s instanceof t.PDFName)||!["WinAnsiEncoding","MacRomanEncoding","StandardEncoding"].includes(s.decodeText())))return!1;let f=N(e,n);if(!f||/\+|Symbol|Dingbats/i.test(f))return!1;let u=h(i,"FontDescriptor"),c=u&&g(u,"Flags");return!(c&&(4&c)!=0||i.has(t.PDFName.of("ToUnicode")))&&a.every(e=>e>=32&&e<=126)}(a,n.font,e)&&(f=!0);let i=(0,S.mul)(n.tm,d.ctm),[l,s]=(0,S.applyPt)(0,n.rise,i),u=Math.hypot(i[2],i[3])||v(i),c=n.fontSize*u,m=G(e).replace(/\u0000/g,"");if(!m||c<=0)return;d.blend&&(f=!0);let D=1===n.renderMode||5===n.renderMode?d.stroke:d.fill,[P,F]=(0,S.applyPt)(0,n.rise,i),[y,b]=(0,S.applyPt)(1,n.rise,i),k=y-P,x=b-F,A=Math.hypot(k,x)>1e-9?Math.atan2(x,k):0,T=(180*A/Math.PI%360+360)%360,C=Math.cos(A),M=Math.sin(A);o.push({op:"text",clip:d.clip.length?d.clip:void 0,runs:[{text:m,x:l,y:s,fontSize:c,color:{...D},...T?{angle:T}:{}}],fontFamilyHint:n.font?N(a,n.font):void 0});let w=c*m.length*.6,R=M*c,I=-C*c;p(l,s),p(l+C*w,s+M*w),p(l+R,s+I),p(l+C*w+R,s+M*w+I);let B=0;for(let e of m)" "===e&&B++;let $=(m.length*n.fontSize*.6+m.length*n.charSpace+B*n.wordSpace)*(n.hScale/100);n.tm=(0,S.mul)((0,S.translate)($,0),n.tm)},ei=n=>{let u=h(a,"XObject"),m=u?r.lookup(u.get(t.PDFName.of(n))):void 0;if(!(m instanceof t.PDFRawStream)){f=!0;return}let g=m.dict.get(t.PDFName.of("Subtype")),D=g instanceof t.PDFName?g.asString():"";if(D.includes("Image")){d.blend&&(f=!0);let e=function(e){let n=w(e);if(n.some(e=>e.includes("DCTDecode")))return n.length>1||z(e)?null:{format:"jpeg",bytes:e.contents};if(!n.length||1===n.length&&n[0].includes("Flate")){let r,a,o=R(e.dict,"Width")??R(e.dict,"W"),l=R(e.dict,"Height")??R(e.dict,"H"),s=R(e.dict,"BitsPerComponent")??R(e.dict,"BPC")??8,f=function(e){let n=e.dict.get(t.PDFName.of("ColorSpace"))??e.dict.get(t.PDFName.of("CS")),r=e.dict.context;n instanceof t.PDFRef&&(n=r.lookup(n));let a=n instanceof t.PDFName?n.asString():"";if(/RGB/.test(a))return 3;if(/Gray/.test(a))return 1;if(n instanceof t.PDFArray){let e=n.get(0);if(e instanceof t.PDFName&&e.asString().includes("ICCBased")){let e=n.get(1);if(e instanceof t.PDFRef&&(e=r.lookup(e)),e instanceof t.PDFRawStream){let t=R(e.dict,"N");if(1===t||3===t)return t}}}return null}(e);if(!o||!l||8!==s||!f)return null;try{r=n.length?i(e.contents):e.contents}catch{return null}let u=o*f,c=e.dict.get(t.PDFName.of("DecodeParms"))??e.dict.get(t.PDFName.of("DP"));c instanceof t.PDFArray&&(c=c.get(0));let m=c instanceof t.PDFDict?R(c,"Predictor")??1:1;if(1!==m&&m<10)return null;let d=z(e);if("unresolvable"===d)return null;if(d){if(m>=10||r.length<u*l)return null;let e=function(e,n,r){let a=w(e);if(a.some(e=>!e.includes("Flate")))return null;let o=R(e.dict,"BitsPerComponent")??R(e.dict,"BPC")??8,l=R(e.dict,"Width")??R(e.dict,"W"),s=R(e.dict,"Height")??R(e.dict,"H");if(8!==o||l!==n||s!==r)return null;let f=e.dict.get(t.PDFName.of("DecodeParms"))??e.dict.get(t.PDFName.of("DP"));if(f instanceof t.PDFArray&&(f=f.get(0)),1!==(f instanceof t.PDFDict?R(f,"Predictor")??1:1))return null;try{let t=a.length?i(e.contents):e.contents;return t.length>=n*r?t:null}catch{return null}}(d,o,l);if(!e)return null;let n=o*(f+1),a=new Uint8Array((n+1)*l);for(let t=0;t<l;t++){let i=t*(n+1);a[i]=0;for(let n=0;n<o;n++){for(let e=0;e<f;e++)a[i+1+n*(f+1)+e]=r[t*u+n*f+e];a[i+1+n*(f+1)+f]=e[t*o+n]}}try{return{format:"png",bytes:$(o,l,1===f?4:6,a)}}catch{return null}}if(m>=10)a=r;else{if(r.length<u*l)return null;a=new Uint8Array((u+1)*l);for(let e=0;e<l;e++)a[e*(u+1)]=0,a.set(r.subarray(e*u,(e+1)*u),e*(u+1)+1)}try{return{format:"png",bytes:$(o,l,2*(1!==f),a)}}catch{}}return null}(m);if(!e){f=!0;return}let n=(0,S.applyPt)(0,0,d.ctm),r=(0,S.applyPt)(1,0,d.ctm),a=(0,S.applyPt)(0,1,d.ctm);p(n[0],n[1]),p(r[0],r[1]),p(a[0],a[1]),p(r[0]+(a[0]-n[0]),r[1]+(a[1]-n[1])),o.push({op:"image",clip:d.clip.length?d.clip:void 0,format:e.format,bytes:e.bytes,x:n[0],y:n[1],ux:r[0]-n[0],uy:r[1]-n[1],vx:a[0]-n[0],vy:a[1]-n[1]});return}if(D.includes("Form")){let t=s(m);if(!t){f=!0;return}let n=L(m.dict),o=l(r,m.dict)??a,i=M(d);n&&(i.ctm=(0,S.mul)(n,d.ctm)),e(t,o,i,c+1);return}f=!0};for(let e of function*(e){let t=0,n=e.length;for(;t<n;){let r=e[t];if(y(r)){t++;continue}if(37===r){for(;t<n&&10!==e[t]&&13!==e[t];)t++;continue}let a=t;if(47===r){for(t++;t<n&&!b(e[t]);)t++;yield{s:a,e:t,t:"name"};continue}if(40===r){t++;let r=1;for(;t<n&&r>0;){let n=e[t];if(92===n){t+=2;continue}40===n?r++:41===n&&r--,t++}yield{s:a,e:t,t:"str"};continue}if(60===r){if(60===e[t+1]){t+=2,yield{s:a,e:t,t:"<<"};continue}for(t++;t<n&&62!==e[t];)t++;t++,yield{s:a,e:t,t:"hex"};continue}if(62===r){if(62===e[t+1]){t+=2,yield{s:a,e:t,t:">>"};continue}t++;continue}if(91===r){t++,yield{s:a,e:t,t:"["};continue}if(93===r){t++,yield{s:a,e:t,t:"]"};continue}if(123===r||125===r){t++;continue}for(t++;t<n&&!b(e[t]);)t++;let o=P(e,a,t);if("ID"===o){yield{s:a,e:t,t:"op",op:"ID"};let r=t+1;for(;r<n&&!(69===e[r]&&73===e[r+1]&&y(e[r-1])&&(r+2>=n||b(e[r+2])));)r++;t=Math.min(n,r+2);continue}/^[+-]?(\d+\.?\d*|\.\d+)$/.test(o)?yield{s:a,e:t,t:"num"}:yield{s:a,e:t,t:"op",op:o}}}(n)){switch(e.t){case"num":V(parseFloat(P(n,e.s,e.e)));continue;case"name":V({n:P(n,e.s+1,e.e)});continue;case"str":V({str:function(e,t,n){let r=[];for(let a=t;a<n;a++){let t=e[a];if(92===t){let t=e[a+1];switch(a++,t){case 110:r.push(10);break;case 114:r.push(13);break;case 116:r.push(9);break;case 98:r.push(8);break;case 102:r.push(12);break;case 40:r.push(40);break;case 41:r.push(41);break;case 92:r.push(92);break;default:if(13===t||10===t)13===t&&10===e[a+1]&&a++;else if(t>=48&&t<=55){let n=t-48,o=0;for(;o<2&&e[a+1]>=48&&e[a+1]<=55;)n=8*n+(e[a+1]-48),a++,o++;r.push(255&n)}else r.push(t)}}else r.push(t)}return Uint8Array.from(r)}(n,e.s+1,e.e-1)});continue;case"hex":V({str:function(e,t,n){let r=[];for(let a=t;a<n;a++){let t=e[a];t>
1=48&&t<=57?r.push(t-48):t>=65&&t<=70?r.push(t-55):t>=97&&t<=102&&r.push(t-87)}r.length%2&&r.push(0);let a=[];for(let e=0;e<r.length;e+=2)a.push(r[e]<<4|r[e+1]);return Uint8Array.from(a)}(n,e.s+1,e.e-1)});continue;case"[":q.push([]);continue;case"]":V(q.pop()??[]);continue;case"<<":K++;continue;case">>":0===(K=Math.max(0,K-1))&&V({});continue;case"op":break;default:continue}let o=J,i=e=>j(o[e])?o[e]:0,l=e=>j(o[o.length-e])?o[o.length-e]:0;switch(e.op){case"m":Y(i(0),i(1));break;case"l":_(i(0),i(1));break;case"c":Q(X(i(0),i(1)),X(i(2),i(3)),X(i(4),i(5)));break;case"v":Q(B??X(i(0),i(1)),X(i(0),i(1)),X(i(2),i(3)));break;case"y":Q(X(i(0),i(1)),X(i(2),i(3)),X(i(2),i(3)));break;case"re":Z(i(0),i(1),i(2),i(3));break;case"h":ee();break;case"S":ea(!0,!1,!1);break;case"s":ea(!0,!1,!0);break;case"f":case"F":ea(!1,!0,!1);break;case"f*":ea(!1,!0,!1,!0);break;case"B":ea(!0,!0,!1);break;case"B*":ea(!0,!0,!1,!0);break;case"b":ea(!0,!0,!0);break;case"b*":ea(!0,!0,!0,!0);break;case"n":ea(!1,!1,!1);break;case"W":er="nonzero";break;case"W*":er="evenodd";break;case"g":d.fill=x(i(0),d.fillAlpha),d.fillCs=null;break;case"G":d.stroke=x(i(0),d.strokeAlpha),d.strokeCs=null;break;case"rg":d.fill=A(i(0),i(1),i(2),d.fillAlpha),d.fillCs=null;break;case"RG":d.stroke=A(i(0),i(1),i(2),d.strokeAlpha),d.strokeCs=null;break;case"k":d.fill=T(i(0),i(1),i(2),i(3),d.fillAlpha),d.fillCs=null;break;case"K":d.stroke=T(i(0),i(1),i(2),i(3),d.strokeAlpha),d.strokeCs=null;break;case"cs":d.fillCs=F(o[0],a),d.fill={r:0,g:0,b:0,a:d.fillAlpha};break;case"CS":d.strokeCs=F(o[0],a),d.stroke={r:0,g:0,b:0,a:d.strokeAlpha};break;case"sc":case"scn":{let e=o.find(U);if(e){(k=function(e,n){let a=h(n,"Pattern"),o=a?r.lookup(a.get(t.PDFName.of(e))):void 0;if(!(o instanceof t.PDFRawStream))return null;let i=o.dict.get(t.PDFName.of("PatternType"));return i instanceof t.PDFNumber&&1===i.asNumber()?o:null}(e.n,a))||(f=!0);break}k=null,d.fill=C(O(o),d.fillCs,d.fillAlpha);break}case"SC":case"SCN":if(o.some(U)){f=!0;break}d.stroke=C(O(o),d.strokeCs,d.strokeAlpha);break;case"w":d.lineWidth=i(0);break;case"J":d.lineCap=i(0);break;case"j":d.lineJoin=i(0);break;case"d":d.dash=Array.isArray(o[0])?o[0].filter(j):[];break;case"gs":U(o[0])&&function(e,n,a){let o=h(n,"ExtGState"),i=o?r.lookup(o.get(t.PDFName.of(a))):void 0;if(!(i instanceof t.PDFDict))return;let l=i.get(t.PDFName.of("ca")),s=i.get(t.PDFName.of("CA")),u=i.get(t.PDFName.of("LW"));l instanceof t.PDFNumber&&(e.fillAlpha=l.asNumber(),e.fill={...e.fill,a:e.fillAlpha}),s instanceof t.PDFNumber&&(e.strokeAlpha=s.asNumber(),e.stroke={...e.stroke,a:e.strokeAlpha}),u instanceof t.PDFNumber&&(e.lineWidth=u.asNumber());let c=i.get(t.PDFName.of("BM")),m=c instanceof t.PDFName?c.asString().replace(/^\//,""):void 0;"Multiply"===m?e.blend="multiply":"Normal"===m||"Compatible"===m?e.blend=void 0:c&&(f=!0);let d=i.get(t.PDFName.of("SMask"));d&&!(d instanceof t.PDFName&&d.asString().includes("None"))&&(f=!0)}(d,a,o[0].n);break;case"ri":case"i":case"M":case"d0":case"d1":case"ET":break;case"cm":d.ctm=(0,S.mul)([i(0),i(1),i(2),i(3),i(4),i(5)],d.ctm);break;case"q":m.push(M(d)),d=m[m.length-1];break;case"Q":m.length>1&&(m.pop(),d=m[m.length-1]);break;case"BT":d.text.tm=[1,0,0,1,0,0],d.text.tlm=[1,0,0,1,0,0];break;case"Tf":U(o[0])&&(d.text.font=o[0].n),d.text.fontSize=l(1);break;case"Td":d.text.tlm=(0,S.mul)((0,S.translate)(i(0),i(1)),d.text.tlm),d.text.tm=[...d.text.tlm];break;case"TD":d.text.leading=-i(1),d.text.tlm=(0,S.mul)((0,S.translate)(i(0),i(1)),d.text.tlm),d.text.tm=[...d.text.tlm];break;case"Tm":d.text.tlm=[i(0),i(1),i(2),i(3),i(4),i(5)],d.text.tm=[...d.text.tlm];break;case"T*":d.text.tlm=(0,S.mul)((0,S.translate)(0,-d.text.leading),d.text.tlm),d.text.tm=[...d.text.tlm];break;case"Tc":d.text.charSpace=i(0);break;case"Tw":d.text.wordSpace=i(0);break;case"Tz":d.text.hScale=i(0);break;case"TL":d.text.leading=i(0);break;case"Ts":d.text.rise=i(0);break;case"Tr":d.text.renderMode=i(0);break;case"Tj":W(o[0])&&eo(o[0].str);break;case"TJ":if(Array.isArray(o[0])){for(let e of o[0])if(W(e))eo(e.str);else if(j(e)){let t=-e/1e3*d.text.fontSize*d.text.hScale/100;d.text.tm=(0,S.mul)((0,S.translate)(t,0),d.text.tm)}}break;case"'":d.text.tlm=(0,S.mul)((0,S.translate)(0,-d.text.leading),d.text.tlm),d.text.tm=[...d.text.tlm],W(o[0])&&eo(o[0].str);break;case'"':d.text.wordSpace=i(0),d.text.charSpace=i(1),d.text.tlm=(0,S.mul)((0,S.translate)(0,-d.text.leading),d.text.tlm),d.text.tm=[...d.text.tlm],W(o[2])&&eo(o[2].str);break;case"Do":U(o[0])&&ei(o[0].n);break;case"sh":case"BI":f=!0}J=[]}}(e,n,{ctm:a,fill:{r:0,g:0,b:0,a:1},stroke:{r:0,g:0,b:0,a:1},fillCs:null,strokeCs:null,lineWidth:1,dash:[],lineCap:0,lineJoin:0,fillAlpha:1,strokeAlpha:1,clip:[],text:{tm:[1,0,0,1,0,0],tlm:[1,0,0,1,0,0],fontSize:0,leading:0,charSpace:0,wordSpace:0,hScale:100,rise:0,renderMode:0}}
1,0),{ops:o,bbox:isFinite(u)?{x:u,y:c,width:m-u,height:d-c}:{x:0,y:0,width:0,height:0},unsupported:f};function g(e,n){let r=e.get(t.PDFName.of(n));return r instanceof t.PDFNumber&&Number.isFinite(r.asNumber())?r.asNumber():null}function h(e,n){if(!e)return;let a=r.lookup(e.get(t.PDFName.of(n)));return a instanceof t.PDFDict?a:void 0}function F(e,n){if(!U(e))return null;let a=e.n;if("DeviceGray"===a||"G"===a)return D(r,t.PDFName.of("DeviceGray"));if("DeviceRGB"===a||"RGB"===a)return D(r,t.PDFName.of("DeviceRGB"));if("DeviceCMYK"===a||"CMYK"===a)return D(r,t.PDFName.of("DeviceCMYK"));if("Pattern"===a)return null;let o=h(n,"ColorSpace");return o?D(r,o.get(t.PDFName.of(a))):null}function N(e,n){let a=h(e,"Font"),o=a?r.lookup(a.get(t.PDFName.of(n))):void 0;if(!(o instanceof t.PDFDict))return;let i=o.get(t.PDFName.of("BaseFont"));return i instanceof t.PDFName?i.asString().replace(/^\//,""):void 0}}(er.stream,er.resources,o,e);K=n.unsupported,J={ops:n.ops,bbox:n.bbox},q={stream:er.stream,bbox:er.bbox,matrix:er.matrix}}let ea=function(e,t,n,r,o,i){let l,s,f=(e,l)=>(0,a.rotatePdfPoint)(e-o,l-i,t,n,r),u=e=>{if(!e)return e;let t=e.slice();for(let e=0;e+1<t.length;e+=2){let[n,r]=f(t[e],t[e+1]);t[e]=n,t[e+1]=r}return t},[c,m]=f(e.rect[0],e.rect[1]),[d,p]=f(e.rect[2],e.rect[3]);return{...e,rect:[c,m,d,p],vertices:u(e.vertices),inkList:e.inkList?.map(e=>u(e)),line:e.line?(l=f(e.line[0],e.line[1]),s=f(e.line[2],e.line[3]),[l[0],l[1],s[0],s[1]]):void 0,quadPoints:u(e.quadPoints),callout:u(e.callout)}}(I,p,h,F,g.x,g.y);f.push({id:function(e){let n=e.get(t.PDFName.of("NM"));return n instanceof t.PDFString||n instanceof t.PDFHexString?n.decodeText():null}(u)??`auto_${c}_${e}`,page:c,annotIndex:e,pageHeight:N,pageWidth:k,subtype:m,kind:H.kind,appearance:J,apStream:q,fields:ea,stampForever:H.stampForever,apUnsupported:K,pageRotation:d})}}return f}(await n.PDFDocument.load(e,{ignoreEncryption:!0}),o)}e.s(["importAnnotations",()=>er],90078),e.s([],166810)},966905,e=>{"use strict";function t(e){try{let t=JSON.parse(e);if(!Array.isArray(t.points)||t.points.length<6||!Array.isArray(t.arrowPoints)||t.arrowPoints.length<6||![...t.points,...t.arrowPoints].every(e=>"number"==typeof e&&isFinite(e)))return null;return{points:t.points,arrowPoints:t.arrowPoints,arrowSize:"number"==typeof t.arrowSize&&isFinite(t.arrowSize)&&t.arrowSize>=0?t.arrowSize:10,stroke:"string"==typeof t.stroke&&t.stroke?t.stroke:null,strokeWidth:"number"==typeof t.strokeWidth&&isFinite(t.strokeWidth)&&t.strokeWidth>0?t.strokeWidth:null,strokeOpacity:"number"==typeof t.strokeOpacity&&t.strokeOpacity>=0&&t.strokeOpacity<=1?t.strokeOpacity:null,cloudShapeId:"string"==typeof t.cloudShapeId&&t.cloudShapeId?t.cloudShapeId:null,anchorMode:"string"==typeof t.anchorMode?t.anchorMode:null,anchorPoint:t.anchorPoint&&"number"==typeof t.anchorPoint.x&&"number"==typeof t.anchorPoint.y?t.anchorPoint:null}}catch{return null}}function n(e){return JSON.stringify(e)}function r(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return null;let r=[];for(let e of n){let n=t(JSON.stringify(e));n&&r.push(n)}return r.length>0?r:null}catch{return null}}function a(e,t){return{id:t.id,type:"leader",x:e.points[0],y:e.points[1],rotation:0,page:t.page,stroke:e.stroke??t.stroke,strokeWidth:e.strokeWidth??t.strokeWidth,opacity:t.opacity,...null!==e.strokeOpacity?{strokeOpacity:e.strokeOpacity}:{},points:e.points,arrowPoints:e.arrowPoints,arrowSize:e.arrowSize,textShapeId:t.textShapeId,...e.cloudShapeId?{cloudShapeId:e.cloudShapeId}:{},...e.anchorMode?{anchorMode:e.anchorMode}:{},...e.anchorPoint?{anchorPoint:e.anchorPoint}:{}}}function o(e,t){let n=t.arrowPoints[0],r=t.arrowPoints[1],a=(e,t,n)=>"number"==typeof e&&isFinite(e)&&n>0?Math.max(0,Math.min(1,(e-t)/n)):.5;return{textShapeId:t.textShapeId,anchorX:a(n,e.x,e.width),anchorY:a(r,e.y,e.height)}}e.s(["cloudLabelFromLeader",()=>o,"leaderShapeFromPayload",()=>a,"parseLeaderPayload",()=>t,"parseLeaderPayloads",()=>r,"serializeLeaderPayloads",()=>n])},525460,821475,e=>{"use strict";e.i(373373);var t=e.i(372396);e.i(144118);var n=e.i(708933),r=e.i(721874),a=e.i(896845);function o(e){let t=new Map;for(let n of e)for(let e of[n.attachments??[],...(n.responses??[]).map(e=>e.attachments??[])])for(let n of e)!n.storagePath||t.has(n.storagePath)||t.set(n.storagePath,{storagePath:n.storagePath,fileName:n.fileName??"attachment",mimeType:n.mimeType??"application/octet-stream"});return[...t.values()]}function i(e,r,o,i){let l=i.get(r.storagePath);if(l)return l;let s=o.get(r.storagePath);if(!s)return null;let f=e.doc.context,u=r.fileName??s.fileName??"attachment",c=r.mimeType??s.mimeType,m=ne
1w Uint8Array(s.bytes),d=f.flateStream(m,{Type:"EmbeddedFile",Subtype:t.PDFName.of(c),Params:f.obj({Size:m.length})}),p=f.register(d),g=f.obj({});g.set(t.PDFName.of("F"),p),g.set(t.PDFName.of("UF"),p);let h=f.obj({});h.set(t.PDFName.of("Type"),t.PDFName.of("Filespec")),h.set(t.PDFName.of("F"),(0,n.pdfTextString)(u)),h.set(t.PDFName.of("UF"),(0,n.pdfTextString)(u)),h.set(t.PDFName.of("EF"),g),h.set(t.PDFName.of("Desc"),(0,n.pdfTextString)(u)),h.set(t.PDFName.of("AFRelationship"),t.PDFName.of("Supplement"));let D=(0,a.buildAttachmentDetaDict)(f,{authorId:r.authorId??void 0});D&&h.set(t.PDFName.of("Deta"),f.register(D));let P=f.register(h);return i.set(r.storagePath,P),!function(e,r,a){let o=e.doc.context,i=e.doc.catalog,l=i.lookupMaybe(t.PDFName.of("Names"),t.PDFDict);l||(l=o.obj({}),i.set(t.PDFName.of("Names"),l));let s=l.lookupMaybe(t.PDFName.of("EmbeddedFiles"),t.PDFDict);s||(s=o.obj({}),l.set(t.PDFName.of("EmbeddedFiles"),s));let f=s.lookupMaybe(t.PDFName.of("Names"),t.PDFArray);f||(f=o.obj([]),s.set(t.PDFName.of("Names"),f));let u=new Set;for(let e=0;e<f.size();e+=2){let n=f.get(e);(n instanceof t.PDFString||n instanceof t.PDFHexString)&&u.add(n.decodeText())}let c=r,m=1;for(;u.has(c);)c=`${r} (${m++})`;f.push((0,n.pdfTextString)(c)),f.push(a)}(e,u,P),P}function l(e,n,r){let a;if(0===r.length)return;let o=n.get(t.PDFName.of("AF"));for(let i of(o instanceof t.PDFArray?a=o:(a=e.obj([]),n.set(t.PDFName.of("AF"),a)),r))a.push(i)}function s(e,t,n){if(!n||0===t.length)return e;let r=t.map(e=>{let t=e.fileName??"attachment";return`📎 ${t}: ${n}${e.id}`}),a=e?`${e}
2
3`:"";return`${a}Attachments:
4${r.join("\n")}`}function f(e,o,u,c,m,d,p,g,h="embed",D){if(0===c.length&&0===m.length)return;let P=e.doc.context,F=e.node.Annots();for(let f of(F||(F=P.obj([]),e.node.set(t.PDFName.of("Annots"),F)),function(e,t){let n=[];for(let t of e){let e=t.createdAt instanceof Date?t.createdAt.getTime():new Date(t.createdAt).getTime();n.push({kind:"response",entry:t,time:e})}for(let e of t){let t=e.createdAt instanceof Date?e.createdAt.getTime():new Date(e.createdAt).getTime();n.push({kind:"status",entry:e,time:t})}n.sort((e,t)=>e.time-t.time);let r=[],a=-1/0;for(let e of n){let t=1e3*Math.floor(e.time/1e3);t<=a&&(t=a+1e3),a=t,r.push({kind:e.kind,entry:e.entry,exportDate:new Date(t)})}return r}(c,m))){let c=(0,r.formatPdfDate)(f.exportDate);if("response"===f.kind){let r=f.entry,m="link"===h?s(r.text,r.attachments??[],D):r.text,N=P.obj({Type:"Annot",Subtype:"Text",Rect:u,Contents:(0,n.pdfTextString)(m),T:(0,n.pdfTextString)(r.authorName||"User"),C:[1,.84,0],Name:"Comment",NM:(0,n.pdfTextString)(r.id),Open:!1,CreationDate:(0,n.pdfTextString)(c),M:(0,n.pdfTextString)(c),IRT:o,RT:t.PDFName.of("R")});if(r.authorId||d){let e=(0,a.buildCommentDetaDict)(P,{authorId:r.authorId||void 0,threadReply:d||void 0});e&&N.set(t.PDFName.of("Deta"),P.register(e))}if("embed"===h&&p&&r.attachments&&r.attachments.length){let t=[];for(let n of r.attachments){let r=i(e,n,p,g);r&&t.push(r)}l(P,N,t)}F.push(P.register(N))}else{let e=f.entry,r=e.authorName||"User",i=e.status?e.status.charAt(0).toUpperCase()+e.status.slice(1):"None",l=P.obj({Type:"Annot",Subtype:"Text",Rect:u,Contents:(0,n.pdfTextString)(`${i} set by ${r}`),T:(0,n.pdfTextString)(r),C:[.59,.26,.99],Name:"Comment",NM:(0,n.pdfTextString)(e.id),Subj:(0,n.pdfTextString)("Sticky Note"),F:30,CreationDate:(0,n.pdfTextString)(c),M:(0,n.pdfTextString)(c),IRT:o});if(l.set(t.PDFName.of("StateModel"),(0,n.pdfTextString)("Review")),l.set(t.PDFName.of("State"),(0,n.pdfTextString)(i)),e.authorId){let n=(0,a.buildCommentDetaDict)(P,{authorId:e.authorId});n&&l.set(t.PDFName.of("Deta"),P.register(n))}let s=P.register(l),m=P.obj({Type:"Annot",Subtype:"Popup",Parent:s,Open:!1,Rect:[u[0]+30,u[1],u[0]+230,u[1]+120],M:(0,n.pdfTextString)(c)}),d=P.register(m);l.set(t.PDFName.of("Popup"),d),F.push(s),F.push(d)}}}function u(e,o,c,m,d,p,g="embed",h){if(!o.text)return;let D=(o.attachments??[]).filter(e=>!e.responseId),{x:P,y:F,textOffset:N}=o,y=N?.x||0,b=N?.y||0,S=P+y,k=c-(F+b),x=[S-12,k-12,S+12,k+12],A=e.doc.context,T=(0,r.formatPdfDate)(o.createdAt instanceof Date?o.createdAt:new Date),C="link"===g?s(o.text,D,h):o.text,M=A.obj({Type:"Annot",Subtype:"Text",Rect:x,Contents:(0,n.pdfTextString)(C),T:(0,n.pdfTextString)(o.createdByName||"User"),C:[1,.84,0],Name:"Comment",NM:(0,n.pdfTextString)(o.id),Subj:(0,n.pdfTextString)("Sticky Note"),Open:!1,CreationDate:(0,n.pdfTextString)(T),M:(0,n.pdfTextString)(T)});m&&(M.set(t.PDFName.of("IRT"),m),M.set(t.PDFName.of("RT"),t.PDFName.of("R")));let v=o.createdBy;if(v){let e=(0,a.buildCommentDetaDict)(A,{authorId:v});e&&M.set(t.PDFName.of("Deta"),A.register(e))}if("embed"===g&&d&&D.length){let t=[];for(let n of D){let r=i(e,n,d,p);r&&t.push(r)}l(A,M,t)}let w=A.register(M),R=[x[0]+30,x[1],x[0]+230,x[1]+120],I=A.obj({Type:"Annot",Subtype:"Popup",Parent:w,Open:!1,Rect:R,M:(0,n.pdfTextString)(T)}),B=A.register(I);M.set(t.PDFName.of("Popup"),B);let $=e.node.Annots();$||($=A.obj([]),e.node.set(t.PDFName.of("Annots"),$)),$.push(w),$.push(B),f(e,w,x,function(e,t){let n=new Map;for(let e of t){if(!e.responseId)continue;let t=n.get(e.responseId)??[];t.push(e),n.set(e.responseId,t)}return 0===n.size?e:e.map(e=>{let t=n.get(e.id);if(!t)return e;let r=new Set((e.attachments??[]).map(e=>e.id)),a=[...e.attachments??[],...t.filter(e=>!r.has(e.id))];return{...e,attachments:a}})}(o.responses??[],o.attachments??[]),o.statusEvents??[],!1,d,p,g,h)}function c(e){if("Text"!==e.subtype||!e.contents)return null;let[t,n,r,a]=e.rect;if(void 0===t||void 0===n||void 0===r||void 0===a)return null;let o=e.pageHeight-(n+a)/2,i=e.creationDate?new Date(e.creationDate):e.modificationDate?new Date(e.modificationDate):void 0;return{id:"",type:"comment",x:(t+r)/2,y:o,rotation:0,page:e.page,text:e.contents.split("\0").join("").trim(),createdBy:e.authorId??null,createdByName:e.author??null,textOffset:{x:0,y:0},markerType:"dot",responses:[],statusEvents:[],status:null,stroke:"#FFDB00",strokeWidth:1,opacity:1,createdAt:i}}e.s(["attachFilesToAnnot",()=>l,"buildAttachmentFilespec",()=>i,"collectAttachmentRefs",()=>o],821475),e.s(["exportComment",()=>u,"exportShapeThread",()=>f,"importTextAnnotation",()=>c],525460)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.