@formfeed/engine 0.3.21 → 0.3.23
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/index.cjs +170 -21
- package/index.js +170 -21
- package/package.json +1 -1
- package/types/frame/paged-print.d.cts +3 -2
- package/types/frame/paged-print.d.ts +3 -2
- package/types/index.d.cts +2 -0
- package/types/index.d.ts +2 -0
- package/types/lib/assemble.d.cts +8 -0
- package/types/lib/assemble.d.ts +8 -0
- package/types/lib/codes/epc.d.cts +5 -1
- package/types/lib/codes/epc.d.ts +5 -1
- package/types/lib/generated/frames.d.cts +2 -2
- package/types/lib/generated/frames.d.ts +2 -2
- package/types/lib/pdfa/index.d.cts +112 -0
- package/types/lib/pdfa/index.d.ts +112 -0
|
@@ -5,6 +5,6 @@ export declare const fitRuntime = "\"use strict\";(()=>{function a(t,e,n){if(e==
|
|
|
5
5
|
/** Bundled from src/frame/stage.entry.ts. */
|
|
6
6
|
export declare const stageRuntime = "\"use strict\";(()=>{var W=`\nhtml.ff-edit-mode [data-ff-edit] { cursor: text; }\nhtml.ff-edit-mode [data-ff-edit]:hover { outline: 1px dashed rgba(37,99,235,.85); outline-offset: 2px; }\nhtml.ff-edit-mode [data-ff-edit=\"t\"]:hover { outline-color: rgba(147,51,234,.9); }\n.ff-editing { outline: 2px solid #2563eb !important; outline-offset: 2px; cursor: text; }\n.ff-editing .ff-chip { background: rgba(37,99,235,.14) !important; box-shadow: inset 0 0 0 1px rgba(37,99,235,.45) !important; border-radius: 3px !important; padding: 0 1px !important; cursor: default; }\n.ff-edit-badge { position: absolute; z-index: 2147483647; font: 500 11px/1.4 system-ui, sans-serif !important; color: #fff !important; background: #2563eb !important; padding: 1px 6px !important; border-radius: 4px !important; pointer-events: none; white-space: nowrap; }\n`;function H(a,l={}){let f=l.clicks!==!1,p=l.live===!0,n=a.document,o=null,d=null,u=e=>{try{a.parent.postMessage(e,\"*\")}catch{}},m=f?n.querySelector('meta[name=\"formfeed:document\"]')?.getAttribute(\"content\")??null:null,s=!1;a.addEventListener(\"blur\",()=>{s=!0}),a.addEventListener(\"focus\",()=>{s=!1});let g=n.createElement(\"style\");g.setAttribute(\"data-formfeed\",\"edit\"),g.setAttribute(\"data-pagedjs-ignore\",\"\"),g.textContent=W,(n.head??n.documentElement).appendChild(g),f&&n.documentElement.classList.add(\"ff-edit-mode\");let x=e=>(e&&typeof e.closest==\"function\"?e:null)?.closest(\"[data-ff-edit]\")??null;n.addEventListener(\"click\",e=>{if(!f)return;if(o&&!o.done&&o.element.contains(e.target)){e.stopImmediatePropagation();return}let t=x(e.target);t&&(e.preventDefault(),e.stopImmediatePropagation(),v(t,{x:e.clientX,y:e.clientY}))},!0);function v(e,t){o&&!o.done&&L();let r=e.getAttribute(\"data-ff-src\")??\"\",i=e.getBoundingClientRect(),b=Array.from(n.querySelectorAll(`[data-ff-src=\"${r.replace(/\"/g,\"\")}\"]`));d={src:r,element:e,point:t},u({type:\"formfeed:edit-request\",src:r,doc:m,edit:e.getAttribute(\"data-ff-edit\"),text:e.textContent??\"\",elements:e.childElementCount,count:b.length,index:Math.max(0,b.indexOf(e)),split:e.hasAttribute(\"data-split-from\")||e.hasAttribute(\"data-split-to\"),rect:{left:i.left,top:i.top,width:i.width,height:i.height}})}n.addEventListener(\"keydown\",e=>{if(!f||o&&!o.done||!(e.ctrlKey||e.metaKey)||e.altKey)return;let t=e.key.toLowerCase();(t===\"z\"||t===\"y\")&&(e.preventDefault(),u({type:t===\"y\"||e.shiftKey?\"formfeed:redo\":\"formfeed:undo\"}))}),a.addEventListener(\"message\",e=>{if(e.source!==a.parent)return;let t=e.data;!t||typeof t.type!=\"string\"||(t.type===\"formfeed:edit-begin\"?B(t):t.type===\"formfeed:edit-refuse\"||t.type===\"formfeed:edit-end\"?(d=null,o&&!o.done&&S(!1)):t.type===\"formfeed:edit-open\"&&E(t))});function E(e){if(!f||typeof e.src!=\"string\"||o&&!o.done)return;let t=Array.from(n.querySelectorAll(`[data-ff-src=\"${e.src.replace(/\"/g,\"\")}\"][data-ff-edit]`)),r=Number.isInteger(e.index)?Number(e.index):0,i=t[r]??t[0];i&&v(i,null)}if(f){let e=()=>u({type:\"formfeed:edit-ready\",doc:m}),t=a;t.PagedConfig?t.formfeedEditReady=e:n.readyState===\"loading\"?n.addEventListener(\"DOMContentLoaded\",e):e()}function B(e){o&&!o.done&&S(!1);let t=e.layer?n.querySelector(`[data-ff-layer=\"${String(e.layer).replace(/\"/g,\"\")}\"] > .ff-text`):d&&d.src===e.src?d.element:n.querySelector(`[data-ff-src=\"${String(e.src).replace(/\"/g,\"\")}\"]`),r=e.at,i=e.layer?r&&Number.isFinite(r.x)&&Number.isFinite(r.y)?{x:Number(r.x),y:Number(r.y)}:null:d&&d.src===e.src?d.point:null;d=null;let b=s&&!n.hasFocus();if(!t||!Array.isArray(e.items)||b){u({type:\"formfeed:edit-cancel\",token:String(e.token)});return}let y=Array.from(t.childNodes),k=n.createDocumentFragment();for(let c of e.items)if(c.kind===\"text\")k.appendChild(n.createTextNode(String(c.text)));else if(c.kind===\"break\")k.appendChild(n.createElement(\"br\"));else if(c.kind===\"chip\"){let h=n.createElement(\"span\");h.className=\"ff-chip\",h.setAttribute(\"data-ff-chip\",String(c.index)),h.setAttribute(\"contenteditable\",\"false\"),c.title&&(h.title=String(c.title)),h.textContent=String(c.text),k.appendChild(h)}for(let c of y)t.removeChild(c);t.appendChild(k),t.contentEditable=\"true\",t.classList.add(\"ff-editing\"),t.setAttribute(\"role\",\"textbox\"),e.label&&t.setAttribute(\"aria-label\",String(e.label)),t.spellcheck=!0,o={token:String(e.token),element:t,saved:y,allowBreaks:e.allowBreaks===!0,badge:e.note?I(t,String(e.note)):null,done:!1},t.addEventListener(\"keydown\",T),t.addEventListener(\"beforeinput\",N),t.addEventListener(\"paste\",w),t.addEventListener(\"drop\",R),t.addEventListener(\"focusout\",F),p&&t.addEventListener(\"input\",C),t.focus(),e.select===\"all\"?q(t):K(t,i),u({type:\"formfeed:edit-started\",token:o.token}),typeof e.insert==\"string\"&&e.insert&&A(e.insert.replace(/\\r\\n?|\\n/g,\" \"))}function A(e){if(typeof n.execCommand==\"function\"&&n.execCommand(\"insertText\",!1,e))return;let t=a.getSelection(),r=t&&t.rangeCount?t.getRangeAt(0):null;r&&(r.deleteContents(),r.insertNode(n.createTextNode(e)),r.collapse(!1),p&&C())}function C(){o&&!o.done&&u({type:\"formfeed:edit-input\",token:o.token,items:D(o.element)})}function I(e,t){let r=n.createElement(\"div\");r.className=\"ff-edit-badge\",r.textContent=t;let i=e.getBoundingClientRect();return r.style.left=`${i.left+a.scrollX}px`,r.style.top=`${Math.max(0,i.top+a.scrollY-22)}px`,n.body.appendChild(r),r}function q(e){let t=a.getSelection();if(!t)return;let r=n.createRange();r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r)}function K(e,t){let r=a.getSelection();if(!r)return;let i=null,b=n;if(t){if(b.caretRangeFromPoint)i=b.caretRangeFromPoint(t.x,t.y);else if(b.caretPositionFromPoint){let y=b.caretPositionFromPoint(t.x,t.y);y&&(i=n.createRange(),i.setStart(y.offsetNode,y.offset))}}if(!i||!e.contains(i.startContainer))i=n.createRange(),i.selectNodeContents(e),i.collapse(!1);else if(t){let y=i.startContainer,c=(y.nodeType===1?y:y.parentElement)?.closest(\"[data-ff-chip]\")??null;if(c&&c!==e&&e.contains(c)){let h=c.getBoundingClientRect();i=n.createRange(),t.x<h.left+h.width/2?i.setStartBefore(c):i.setStartAfter(c),i.collapse(!0)}}r.removeAllRanges(),r.addRange(i)}function T(e){let t=e.key;t===\"Escape\"?(e.preventDefault(),S(!0)):t===\"Enter\"&&!e.shiftKey?(e.preventDefault(),L()):t===\"Enter\"?(e.preventDefault(),o?.allowBreaks&&$()):t===\"Tab\"?(e.preventDefault(),L()):(e.ctrlKey||e.metaKey)&&[\"b\",\"i\",\"u\"].includes(t.toLowerCase())&&(e.preventDefault(),p&&o&&!e.altKey&&u({type:\"formfeed:edit-style\",token:o.token,key:t.toLowerCase()}))}function N(e){let t=e.inputType??\"\";(t.startsWith(\"format\")||t===\"insertFromDrop\"||t===\"insertParagraph\"||t===\"insertLineBreak\")&&e.preventDefault()}function w(e){e.preventDefault(),A((e.clipboardData?.getData(\"text/plain\")??\"\").replace(/\\r\\n?|\\n/g,\" \"))}function R(e){e.preventDefault()}function F(){a.setTimeout(()=>{o&&!o.done&&(!n.hasFocus()||!o.element.contains(n.activeElement))&&L()},0)}function $(){let e=a.getSelection();if(!e||!e.rangeCount)return;let t=e.getRangeAt(0);t.deleteContents();let r=n.createElement(\"br\");t.insertNode(r),r.nextSibling||r.parentNode?.appendChild(n.createElement(\"br\"));let i=n.createRange();i.setStartAfter(r),i.collapse(!0),e.removeAllRanges(),e.addRange(i)}function M(e){e.done=!0;let t=e.element;t.removeEventListener(\"keydown\",T),t.removeEventListener(\"beforeinput\",N),t.removeEventListener(\"paste\",w),t.removeEventListener(\"drop\",R),t.removeEventListener(\"focusout\",F),t.removeEventListener(\"input\",C),t.removeAttribute(\"contenteditable\"),t.removeAttribute(\"role\"),t.removeAttribute(\"aria-label\"),t.classList.remove(\"ff-editing\"),e.badge?.remove(),o===e&&(o=null)}function L(){let e=o;if(!e||e.done)return;let t=D(e.element);M(e),u({type:\"formfeed:edit-commit\",token:e.token,items:t})}function S(e){let t=o;if(!t||t.done)return;let r=t.element;for(;r.firstChild;)r.removeChild(r.firstChild);for(let i of t.saved)r.appendChild(i);M(t),e&&u({type:\"formfeed:edit-cancel\",token:t.token})}}function D(a){let l=[],f=n=>{let o=l[l.length-1];o?.kind===\"text\"?o.text+=n:n&&l.push({kind:\"text\",text:n})},p=n=>{for(let o of Array.from(n.childNodes))if(o.nodeType===3)f(o.data);else if(o.nodeType===1){let d=o,u=d.getAttribute(\"data-ff-chip\");u!==null?l.push({kind:\"chip\",index:Number(u)}):d.tagName===\"BR\"?l.push({kind:\"break\"}):((d.tagName===\"DIV\"||d.tagName===\"P\")&&l.length&&l.push({kind:\"break\"}),p(d))}};for(p(a);l[l.length-1]?.kind===\"break\";)l.pop();return l}function O(a,l){return Array.from(a.querySelectorAll(\"[data-ff-layer]\")).map(f=>{let p=f.querySelector(\":scope > .ff-text\"),n=!1;if(p&&f.style.height!==\"auto\"){let o=l.getComputedStyle(f),d=f.clientHeight-(parseFloat(o.paddingTop)||0)-(parseFloat(o.paddingBottom)||0);n=o.overflow===\"hidden\"&&(p.scrollHeight>d+1||p.scrollWidth>p.clientWidth+1)}return{id:f.getAttribute(\"data-ff-layer\")??\"\",width:f.offsetWidth,height:f.offsetHeight,overflow:n}})}function P(a){let l=a.document,f=m=>{try{a.parent.postMessage(m,\"*\")}catch{}},p=m=>typeof m==\"string\"?l.querySelector(`[data-ff-layer=\"${m.replace(/\"/g,\"\")}\"]`):null,n=()=>{for(let m of Array.from(l.querySelectorAll(\"[data-ff-layer]\")))for(let s of[\"left\",\"top\",\"width\",\"height\",\"transform\"])m.style.removeProperty(s)},o=()=>{a.formfeedFit?.(),f({type:\"formfeed:ready\",layers:O(l,a)})};a.addEventListener(\"message\",m=>{if(m.source!==a.parent)return;let s=m.data;if(!(!s||typeof s.type!=\"string\")){if(s.type===\"formfeed:layer-style\"){let g=p(s.id);if(!g)return;let x=(v,E)=>{typeof E==\"number\"&&Number.isFinite(E)&&g.style.setProperty(v,`${E}px`)};x(\"left\",s.left),x(\"top\",s.top),x(\"width\",s.width),x(\"height\",s.height),typeof s.rotation==\"number\"&&Number.isFinite(s.rotation)&&g.style.setProperty(\"transform\",s.rotation?`rotate(${s.rotation}deg)`:\"none\")}else if(s.type===\"formfeed:layer-style-clear\")n();else if(s.type===\"formfeed:css\"&&typeof s.css==\"string\"){let g=l.querySelector('style[data-formfeed=\"template\"]');g&&(g.textContent=s.css),n(),o()}}}),H(a,{clicks:!1,live:!0});let d=l.fonts,u=()=>d?void d.ready.then(o):o();l.readyState===\"complete\"?u():a.addEventListener(\"load\",u)}P(window);})();";
|
|
7
7
|
/** Bundled from src/frame/audit.entry.ts. */
|
|
8
|
-
export declare const auditRuntime = "\"use strict\";(()=>{var I={\"document-title\":\"error\",\"image-alt\":\"error\",\"figure-name\":\"error\",\"heading-order\":\"error\",\"table-rows\":\"error\",\"table-cell-empty\":\"error\",\"masked-text\":\"error\",\"filtered-text\":\"warning\",\"document-language\":\"warning\",\"table-headers\":\"warning\",\"link-name\":\"warning\",\"generated-text\":\"warning\",\"fixed-text\":\"warning\",\"running-text\":\"warning\"};var S=120;var O=\".formfeed-chrome, .ff-running-header, .ff-running-footer\",_=\".pageNumber, .totalPages, .date, .title, .url, .ff-page-no, .ff-page-total\",k=new Set([\"script\",\"style\",\"template\",\"noscript\",\"head\"]),j=2e4,q=10,B=new Set([\"page\",\"pages\",\"of\",\"seite\",\"seiten\",\"von\",\"p\",\"s\"]),u=t=>(t??\"\").replace(/\\s+/g,\" \").trim(),D=t=>t.replace(/\\s+/g,\"\").toLowerCase(),$=t=>/[\\p{L}\\p{N}]/u.test(t),Y=/^data-(ref|id|split-(from|to|original)|(previous-|next-)?break-(before|after|inside)|(align-)?last-split-element|nth-of-type|counter-.+|page(-number)?|undisplayed|after-page|following|has-notes|children|item-num)$/;function X(t){let n=t.cloneNode(!1);n.removeAttribute(\"data-ff-src\"),n.removeAttribute(\"data-ff-edit\");let i=t.closest(\".pagedjs_page\")!==null;for(let s of Array.from(n.attributes))i&&Y.test(s.name)?n.removeAttribute(s.name):s.value.length>48&&n.setAttribute(s.name,`${s.value.slice(0,40)}\\u2026`);let o=n.outerHTML.replace(new RegExp(`</${t.tagName}>$`,\"i\"),\"\");return o.length>S?`${o.slice(0,S-1)}\\u2026`:o}function F(t,n={}){let i=t.document,o=i.body,s=[],d=new Set,a=n.findings!==!1,c=(e,r,l={})=>{if(!a)return;let m=r?.closest(\"[data-ff-src]\")?.getAttribute(\"data-ff-src\")??null,h=r?X(r):\"\",g=`${e}|${m??h}|${JSON.stringify(l)}`;d.has(g)||(d.add(g),s.push({code:e,severity:I[e],src:m,snippet:h,args:l}))},f=new WeakMap,A=e=>{let r=f.get(e);if(r!==void 0)return r;let l=t.getComputedStyle(e),m=l.display===\"none\"||l.visibility===\"hidden\"||l.visibility===\"collapse\"||e.parentElement!==null&&e.parentElement!==i.documentElement&&A(e.parentElement);return f.set(e,m),m},p=e=>e.closest('[aria-hidden=\"true\"]')!==null,E=e=>/^(presentation|none)$/.test(e.getAttribute(\"role\")??\"\"),H=e=>e.closest(O)!==null,y=e=>$(e.textContent??\"\"),x=e=>{let r=u(e.getAttribute(\"aria-label\"));return r||u((e.getAttribute(\"aria-labelledby\")??\"\").split(/\\s+/).filter(Boolean).map(l=>e.ownerDocument.getElementById(l)?.textContent??\"\").join(\" \"))},P=e=>x(e)||u(e.textContent)||u(Array.from(e.querySelectorAll(\"img[alt]\")).map(r=>r.getAttribute(\"alt\")).join(\" \"))||u(e.getAttribute(\"title\")),T=e=>{let r=e.getAttribute(\"href\")??\"\";return{href:r.startsWith(\"#\")?r:e.href??r,name:P(e)}};u(i.title)||c(\"document-title\",null),!u(i.documentElement.getAttribute(\"lang\"))&&!n.locale&&c(\"document-language\",null);let M=n.pages??(n.pageHeight&&n.pageHeight>0?Math.ceil(i.documentElement.scrollHeight/n.pageHeight):1),C=[],v=[],R={\"masked-text\":[],\"filtered-text\":[],\"fixed-text\":[]},w=(e,r)=>{R[e].some(l=>l.contains(r))||(R[e].push(r),c(e,r))},V=a&&ne(i),G=o?Array.from(o.querySelectorAll(\"*\")).slice(0,j):[];for(let e of G){let r=e.tagName.toLowerCase();if(k.has(r)||H(e)||A(e))continue;if(r===\"a\"&&e.hasAttribute(\"href\")){let g=T(e);C.push(g),!g.name&&!p(e)&&c(\"link-name\",e)}if(!a)continue;let l=t.getComputedStyle(e),m=l.getPropertyValue(\"mask-image\")||l.getPropertyValue(\"-webkit-mask-image\");if(m&&m!==\"none\"&&y(e)&&w(\"masked-text\",e),l.filter&&l.filter!==\"none\"&&y(e)&&w(\"filtered-text\",e),l.position===\"fixed\"&&M>1&&y(e)&&w(\"fixed-text\",e),V)for(let g of[\"::before\",\"::after\"]){let U=re(t.getComputedStyle(e,g).content);U&&c(\"generated-text\",e,{text:U})}if(p(e))continue;r===\"img\"&&!E(e)?e.hasAttribute(\"alt\")||x(e)||u(e.getAttribute(\"title\"))||c(\"image-alt\",e):(r===\"canvas\"||e.getAttribute(\"role\")===\"img\"&&r!==\"img\")&&(x(e)||u(e.getAttribute(\"title\"))||u(e.querySelector(\":scope > title\")?.textContent)||c(\"figure-name\",e,{tag:r}));let h=/^h[1-6]$/.test(r)?Number(r[1]):e.getAttribute(\"role\")===\"heading\"?Number(e.getAttribute(\"aria-level\"))||2:0;h&&v.push({element:e,level:h}),r===\"table\"&&!E(e)&&Q(e,c)}let b=0;for(let{element:e,level:r}of v)(b===0?r!==1:r>b+1)&&c(\"heading-order\",e,{level:r,previous:b}),b=r;let N=[],W=a&&o?D(J(o)):\"\",L=0;for(let e of[\"header\",\"footer\"])for(let r of z(i,e,n[e])){for(let l of Array.from(r.querySelectorAll(\"a[href]\")))N.push(T(l));if(a)for(let{text:l,element:m}of K(r)){if(L>=q||W.includes(D(l)))continue;let h=s.length;c(\"running-text\",m,{text:l.slice(0,80),part:e}),s.length>h&&L++}}return{findings:s,links:C,templateLinks:N}}function z(t,n,i){if(i!==void 0){if(!i.trim())return[];let o=new DOMParser().parseFromString(`<!doctype html><body>${i}</body>`,\"text/html\");return o.body?[o.body]:[]}return Array.from(t.querySelectorAll(`.ff-running-${n}, .formfeed-chrome[data-ff-chrome=\"${n}\"]`))}function J(t){let n=[],i=o=>{if(o.nodeType===3){n.push(o.nodeValue??\"\");return}if(o.nodeType!==1)return;let s=o;if(!(k.has(s.tagName.toLowerCase())||s.matches(O)))for(let d of Array.from(o.childNodes))i(d)};return i(t),n.join(\" \")}function K(t){let n=[],i=o=>{let s=o.tagName.toLowerCase();if(k.has(s)||o.matches(_))return;let d=Array.from(o.children).some(a=>a.matches(_));for(let a of Array.from(o.childNodes))if(a.nodeType===1)i(a);else if(a.nodeType===3&&!d)for(let c of(a.nodeValue??\"\").split(/\\s*[\u00B7\u2022|]\\s*|\\s{2,}|\\n/)){let f=u(c);(f.toLowerCase().match(/[\\p{L}\\p{N}]+/gu)??[]).some(p=>!B.has(p))&&n.push({text:f,element:o})}};return i(t),n}function Q(t,n){let i=Array.from(t.rows);if(!(t.querySelector('th, [role=\"columnheader\"], [role=\"rowheader\"]')!==null)){i.length>=2&&n(\"table-headers\",t);return}let s=te(i),d=s.find(c=>c!==s[0]);d!==void 0&&n(\"table-rows\",t,{first:s[0]??0,other:d});let a=i.flatMap(c=>Array.from(c.cells).filter(f=>f.tagName===\"TD\"&&ee(f)));a[0]&&n(\"table-cell-empty\",a[0],{count:a.length})}var Z='img[alt]:not([alt=\"\"]), svg, canvas, input, select, textarea, button, meter, progress';function ee(t){return!/[^ \\t\\n\\r\\f]/.test(t.textContent??\"\")&&t.querySelector(Z)===null}function te(t){let n=[];return t.map(i=>{let o=[],s=0,d=()=>{for(;(n[s]??0)>0;)o[s]=n[s]-1,s++};for(let a of Array.from(i.cells)){d();let c=Math.max(1,a.rowSpan||1)-1;for(let f=Math.max(1,a.colSpan||1);f>0;f--)o[s++]=c}d();for(let a=s;a<n.length;a++)(n[a]??0)>0&&(o[a]=n[a]-1,s=a+1);return n=o,s})}function ne(t){let n=i=>{for(let o of Array.from(i??[])){let s=o;if(s.selectorText&&/::?(before|after)/.test(s.selectorText)&&s.style?.content||o.cssRules&&n(o.cssRules))return!0}return!1};for(let i of Array.from(t.styleSheets))try{if(n(i.cssRules))return!0}catch{return!0}return!1}function re(t){if(!t||t===\"none\"||t===\"normal\")return\"\";let n=(t.match(/\"(?:[^\"\\\\]|\\\\.)*\"/g)??[]).map(o=>o.slice(1,-1).replace(/\\\\(.)/g,\"$1\"));if(/\\bcounters?\\(/.test(t))return u(t).slice(0,80);let i=u(n.join(\"\"));return $(i)?i.slice(0,80):\"\"}window.formfeedAudit=t=>F(window,t);})();";
|
|
8
|
+
export declare const auditRuntime = "\"use strict\";(()=>{var I={\"document-title\":\"error\",\"image-alt\":\"error\",\"figure-name\":\"error\",\"heading-order\":\"error\",\"table-rows\":\"error\",\"table-cell-empty\":\"error\",\"masked-text\":\"error\",\"filtered-text\":\"warning\",\"document-language\":\"warning\",\"table-headers\":\"warning\",\"link-name\":\"warning\",\"generated-text\":\"warning\",\"fixed-text\":\"warning\",\"running-text\":\"warning\"};var S=120;var O=\".formfeed-chrome, .ff-running-header, .ff-running-footer\",_=\".pageNumber, .totalPages, .date, .title, .url, .ff-page-no, .ff-page-total\",k=new Set([\"script\",\"style\",\"template\",\"noscript\",\"head\"]),j=2e4,q=10,B=new Set([\"page\",\"pages\",\"of\",\"seite\",\"seiten\",\"von\",\"p\",\"s\"]),u=t=>(t??\"\").replace(/\\s+/g,\" \").trim(),D=t=>t.replace(/\\s+/g,\"\").toLowerCase(),$=t=>/[\\p{L}\\p{N}]/u.test(t),Y=/^data-(ref|id|split-(from|to|original)|(previous-|next-)?break-(before|after|inside)|(align-)?last-split-element|nth-of-type|counter-.+|page(-number)?|undisplayed|after-page|following|has-notes|children|item-num)$/;function X(t){let n=t.cloneNode(!1);n.removeAttribute(\"data-ff-src\"),n.removeAttribute(\"data-ff-edit\"),n.removeAttribute(\"data-ff-break\");let i=t.closest(\".pagedjs_page\")!==null;for(let s of Array.from(n.attributes))i&&Y.test(s.name)?n.removeAttribute(s.name):s.value.length>48&&n.setAttribute(s.name,`${s.value.slice(0,40)}\\u2026`);let o=n.outerHTML.replace(new RegExp(`</${t.tagName}>$`,\"i\"),\"\");return o.length>S?`${o.slice(0,S-1)}\\u2026`:o}function F(t,n={}){let i=t.document,o=i.body,s=[],d=new Set,a=n.findings!==!1,c=(e,r,l={})=>{if(!a)return;let m=r?.closest(\"[data-ff-src]\")?.getAttribute(\"data-ff-src\")??null,h=r?X(r):\"\",g=`${e}|${m??h}|${JSON.stringify(l)}`;d.has(g)||(d.add(g),s.push({code:e,severity:I[e],src:m,snippet:h,args:l}))},f=new WeakMap,A=e=>{let r=f.get(e);if(r!==void 0)return r;let l=t.getComputedStyle(e),m=l.display===\"none\"||l.visibility===\"hidden\"||l.visibility===\"collapse\"||e.parentElement!==null&&e.parentElement!==i.documentElement&&A(e.parentElement);return f.set(e,m),m},p=e=>e.closest('[aria-hidden=\"true\"]')!==null,E=e=>/^(presentation|none)$/.test(e.getAttribute(\"role\")??\"\"),H=e=>e.closest(O)!==null,y=e=>$(e.textContent??\"\"),x=e=>{let r=u(e.getAttribute(\"aria-label\"));return r||u((e.getAttribute(\"aria-labelledby\")??\"\").split(/\\s+/).filter(Boolean).map(l=>e.ownerDocument.getElementById(l)?.textContent??\"\").join(\" \"))},P=e=>x(e)||u(e.textContent)||u(Array.from(e.querySelectorAll(\"img[alt]\")).map(r=>r.getAttribute(\"alt\")).join(\" \"))||u(e.getAttribute(\"title\")),T=e=>{let r=e.getAttribute(\"href\")??\"\";return{href:r.startsWith(\"#\")?r:e.href??r,name:P(e)}};u(i.title)||c(\"document-title\",null),!u(i.documentElement.getAttribute(\"lang\"))&&!n.locale&&c(\"document-language\",null);let M=n.pages??(n.pageHeight&&n.pageHeight>0?Math.ceil(i.documentElement.scrollHeight/n.pageHeight):1),C=[],v=[],R={\"masked-text\":[],\"filtered-text\":[],\"fixed-text\":[]},w=(e,r)=>{R[e].some(l=>l.contains(r))||(R[e].push(r),c(e,r))},V=a&&ne(i),G=o?Array.from(o.querySelectorAll(\"*\")).slice(0,j):[];for(let e of G){let r=e.tagName.toLowerCase();if(k.has(r)||H(e)||A(e))continue;if(r===\"a\"&&e.hasAttribute(\"href\")){let g=T(e);C.push(g),!g.name&&!p(e)&&c(\"link-name\",e)}if(!a)continue;let l=t.getComputedStyle(e),m=l.getPropertyValue(\"mask-image\")||l.getPropertyValue(\"-webkit-mask-image\");if(m&&m!==\"none\"&&y(e)&&w(\"masked-text\",e),l.filter&&l.filter!==\"none\"&&y(e)&&w(\"filtered-text\",e),l.position===\"fixed\"&&M>1&&y(e)&&w(\"fixed-text\",e),V)for(let g of[\"::before\",\"::after\"]){let U=re(t.getComputedStyle(e,g).content);U&&c(\"generated-text\",e,{text:U})}if(p(e))continue;r===\"img\"&&!E(e)?e.hasAttribute(\"alt\")||x(e)||u(e.getAttribute(\"title\"))||c(\"image-alt\",e):(r===\"canvas\"||e.getAttribute(\"role\")===\"img\"&&r!==\"img\")&&(x(e)||u(e.getAttribute(\"title\"))||u(e.querySelector(\":scope > title\")?.textContent)||c(\"figure-name\",e,{tag:r}));let h=/^h[1-6]$/.test(r)?Number(r[1]):e.getAttribute(\"role\")===\"heading\"?Number(e.getAttribute(\"aria-level\"))||2:0;h&&v.push({element:e,level:h}),r===\"table\"&&!E(e)&&Q(e,c)}let b=0;for(let{element:e,level:r}of v)(b===0?r!==1:r>b+1)&&c(\"heading-order\",e,{level:r,previous:b}),b=r;let N=[],W=a&&o?D(J(o)):\"\",L=0;for(let e of[\"header\",\"footer\"])for(let r of z(i,e,n[e])){for(let l of Array.from(r.querySelectorAll(\"a[href]\")))N.push(T(l));if(a)for(let{text:l,element:m}of K(r)){if(L>=q||W.includes(D(l)))continue;let h=s.length;c(\"running-text\",m,{text:l.slice(0,80),part:e}),s.length>h&&L++}}return{findings:s,links:C,templateLinks:N}}function z(t,n,i){if(i!==void 0){if(!i.trim())return[];let o=new DOMParser().parseFromString(`<!doctype html><body>${i}</body>`,\"text/html\");return o.body?[o.body]:[]}return Array.from(t.querySelectorAll(`.ff-running-${n}, .formfeed-chrome[data-ff-chrome=\"${n}\"]`))}function J(t){let n=[],i=o=>{if(o.nodeType===3){n.push(o.nodeValue??\"\");return}if(o.nodeType!==1)return;let s=o;if(!(k.has(s.tagName.toLowerCase())||s.matches(O)))for(let d of Array.from(o.childNodes))i(d)};return i(t),n.join(\" \")}function K(t){let n=[],i=o=>{let s=o.tagName.toLowerCase();if(k.has(s)||o.matches(_))return;let d=Array.from(o.children).some(a=>a.matches(_));for(let a of Array.from(o.childNodes))if(a.nodeType===1)i(a);else if(a.nodeType===3&&!d)for(let c of(a.nodeValue??\"\").split(/\\s*[\u00B7\u2022|]\\s*|\\s{2,}|\\n/)){let f=u(c);(f.toLowerCase().match(/[\\p{L}\\p{N}]+/gu)??[]).some(p=>!B.has(p))&&n.push({text:f,element:o})}};return i(t),n}function Q(t,n){let i=Array.from(t.rows);if(!(t.querySelector('th, [role=\"columnheader\"], [role=\"rowheader\"]')!==null)){i.length>=2&&n(\"table-headers\",t);return}let s=te(i),d=s.find(c=>c!==s[0]);d!==void 0&&n(\"table-rows\",t,{first:s[0]??0,other:d});let a=i.flatMap(c=>Array.from(c.cells).filter(f=>f.tagName===\"TD\"&&ee(f)));a[0]&&n(\"table-cell-empty\",a[0],{count:a.length})}var Z='img[alt]:not([alt=\"\"]), svg, canvas, input, select, textarea, button, meter, progress';function ee(t){return!/[^ \\t\\n\\r\\f]/.test(t.textContent??\"\")&&t.querySelector(Z)===null}function te(t){let n=[];return t.map(i=>{let o=[],s=0,d=()=>{for(;(n[s]??0)>0;)o[s]=n[s]-1,s++};for(let a of Array.from(i.cells)){d();let c=Math.max(1,a.rowSpan||1)-1;for(let f=Math.max(1,a.colSpan||1);f>0;f--)o[s++]=c}d();for(let a=s;a<n.length;a++)(n[a]??0)>0&&(o[a]=n[a]-1,s=a+1);return n=o,s})}function ne(t){let n=i=>{for(let o of Array.from(i??[])){let s=o;if(s.selectorText&&/::?(before|after)/.test(s.selectorText)&&s.style?.content||o.cssRules&&n(o.cssRules))return!0}return!1};for(let i of Array.from(t.styleSheets))try{if(n(i.cssRules))return!0}catch{return!0}return!1}function re(t){if(!t||t===\"none\"||t===\"normal\")return\"\";let n=(t.match(/\"(?:[^\"\\\\]|\\\\.)*\"/g)??[]).map(o=>o.slice(1,-1).replace(/\\\\(.)/g,\"$1\"));if(/\\bcounters?\\(/.test(t))return u(t).slice(0,80);let i=u(n.join(\"\"));return $(i)?i.slice(0,80):\"\"}window.formfeedAudit=t=>F(window,t);})();";
|
|
9
9
|
/** Bundled from src/frame/paged-print.entry.ts. */
|
|
10
|
-
export declare const pagedPrintRuntime = "\"use strict\";(()=>{var
|
|
10
|
+
export declare const pagedPrintRuntime = "\"use strict\";(()=>{var A=t=>!!t&&t.nodeType===1,E=t=>A(t)?t:t?.parentElement??null;function g(t,r){for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.nodeName===r)return e;return null}var T=t=>Array.from(t.querySelectorAll(\":scope > tbody > tr, :scope > tr\"));function S(t,r){for(let e=t.parentElement;e&&!e.classList.contains(\"pagedjs_page_content\");e=e.parentElement)if(r.getComputedStyle(e).display.startsWith(\"inline\"))return!0;return!1}function O(t,r){for(let e=t;e&&e!==r;e=e.parentElement)for(let o=e.previousSibling;o;o=o.previousSibling)if(A(o)||(o.textContent??\"\").trim())return!0;return!1}function P(t){let r=t.cloneNode(!0);for(let e of[r,...Array.from(r.querySelectorAll(\"[id]\"))])e.id&&(e.setAttribute(\"data-id\",e.id),e.removeAttribute(\"id\"));return r.setAttribute(\"data-ff-repeated\",\"\"),r}function w(t,r){for(let e of Array.from(t.querySelectorAll(\"table > tfoot\"))){let o=e.nextElementSibling;for(;o&&o.nodeName!==\"TBODY\"&&o.nodeName!==\"TR\";)o=o.nextElementSibling;o&&r.getComputedStyle(e).display===\"table-footer-group\"&&e.parentNode?.appendChild(e)}}function H(t,r,e){let o=E(t),n=o?.closest(\"table\");if(!o||!n||!n.hasAttribute(\"data-split-from\")||n.hasAttribute(\"data-ff-head\")||(n.setAttribute(\"data-ff-head\",\"\"),g(n,\"THEAD\")))return;let a=E(r)?.closest(\"table\"),s=a&&g(a,\"THEAD\");if(!a||!s||S(n,e))return;let d=P(s),i=n.firstChild;for(;i&&(i.nodeName===\"CAPTION\"||i.nodeName===\"COLGROUP\");)i=i.nextSibling;if(n.insertBefore(d,i),e.getComputedStyle(d).display!==\"table-header-group\"){d.remove();return}for(let f=a.firstElementChild;f;f=f.nextElementSibling)f.nodeName===\"COLGROUP\"&&n.insertBefore(f.cloneNode(!0),d);let l=o.closest(\"tr\"),u=l?.parentElement;l&&u&&u.parentElement===n&&u.nodeName!==\"THEAD\"&&(l.style.breakInside=\"auto\",l.removeAttribute(\"data-break-inside\"))}function R(t,r,e,o,n){let a=t.startContainer,s=A(a)?a.childNodes[t.startOffset]??a:a,d=E(s);if(!d)return;let i=d.nodeName===\"TBODY\"?d.querySelector(\"tr\"):d.closest(\"tr\"),l=i?.closest(\"table\"),u=i?.parentElement;if(!i||!l||!u||u.nodeName===\"THEAD\"||u.nodeName===\"TFOOT\"||S(l,n))return;let f=T(l),h=f.indexOf(i);if(h<0)return;let m=h,y=0;if(h>0&&(s===i||s===u)){let p=o.querySelector(`[data-ref=\"${l.getAttribute(\"data-ref\")??\"\"}\"]`),b=p&&g(p,\"TFOOT\");if(b){let c=b.cloneNode(!0);l.appendChild(c),n.getComputedStyle(c).display===\"table-footer-group\"&&(y=c.getBoundingClientRect().height),c.remove()}let x=Math.round(e),k=c=>!c||Math.floor(c.getBoundingClientRect().bottom)+y<=x;for(;m>0&&!k(f[m-1]);)m--}if(m===0){if(l.hasAttribute(\"data-split-from\")||!g(l,\"THEAD\"))return;let p=l.previousElementSibling,b=l.getAttribute(\"data-previous-break-after\")===\"avoid\"&&p?p:l;return O(b,r)?(t.setStartBefore(b),t):void 0}let v=f[m];return m<h&&v&&t.setStartBefore(v),y&&l.setAttribute(\"data-ff-foot\",\"\"),t}function q(t,r){let e=t.querySelector(\"table[data-ff-foot]\");if(!e)return;e.removeAttribute(\"data-ff-foot\");let o=r.querySelector(`[data-ref=\"${e.getAttribute(\"data-ref\")??\"\"}\"]`),n=o&&g(o,\"TFOOT\");n&&e.appendChild(P(n))}function B(t){let r=t.querySelector(\".pagedjs_pagebox\");if(!r)return;let e=Array.from(r.children).filter(n=>!(n.getAttribute(\"class\")??\"\").includes(\"pagedjs_\")&&!n.hasAttribute(\"data-ff-fixed\"));if(!e.length)return;let o=r.ownerDocument.createElement(\"div\");o.setAttribute(\"data-ff-fixed\",\"\"),o.setAttribute(\"style\",\"grid-column: center; grid-row: page; position: relative; pointer-events: none;\");for(let n of e)\"style\"in n&&(n.style.pointerEvents=\"auto\"),o.appendChild(n);r.appendChild(o)}var N=\".ff-running-header, .ff-running-footer\";function D(t){let{head:r,body:e}=t;for(let a of Array.from(e.querySelectorAll(\"style\")))a.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&!a.closest(N)&&r.appendChild(a);let o=[];for(let a of Array.from(e.querySelectorAll(\"[style]\"))){if(a.closest(N))continue;let s=[\"break-before\",\"break-after\",\"page\"].flatMap(d=>{let i=a.style.getPropertyValue(d);return!/^[\\w-]+$/.test(i)||i===\"auto\"?[]:(a.style.removeProperty(d),[`${d}: ${i};`])});s.length&&(a.style.length||a.removeAttribute(\"style\"),a.setAttribute(\"data-ff-break\",String(o.length)),o.push(`[data-ff-break=\"${o.length}\"] { ${s.join(\" \")} }`))}if(!o.length)return;let n=t.createElement(\"style\");n.textContent=o.join(`\n`),r.appendChild(n)}function F(t){for(let r of[\"data-break-before\",\"data-break-after\",\"data-next-break-before\",\"data-previous-break-after\"])for(let e of Array.from(t.querySelectorAll(`[${r}]`)))/^(left|right|recto|verso)$/.test(e.getAttribute(r)??\"\")&&e.setAttribute(r,\"page\")}function C(t){t.formfeedMoveTableFeet=()=>w(t.document,t),t.formfeedShowStyles=()=>D(t.document);let r=t.Paged;if(!r?.Handler)return;class e extends r.Handler{afterParsed(n){F(n)}renderNode(n,a){H(n,a,t)}onOverflow(n,a,s){return n?R(n,a,s.bottom,this.chunker.source,t):void 0}afterOverflowRemoved(n,a){q(a,this.chunker.source)}afterPageLayout(n){B(n)}}r.registerHandlers(e)}C(window);})();";
|
|
@@ -5,6 +5,6 @@ export declare const fitRuntime = "\"use strict\";(()=>{function a(t,e,n){if(e==
|
|
|
5
5
|
/** Bundled from src/frame/stage.entry.ts. */
|
|
6
6
|
export declare const stageRuntime = "\"use strict\";(()=>{var W=`\nhtml.ff-edit-mode [data-ff-edit] { cursor: text; }\nhtml.ff-edit-mode [data-ff-edit]:hover { outline: 1px dashed rgba(37,99,235,.85); outline-offset: 2px; }\nhtml.ff-edit-mode [data-ff-edit=\"t\"]:hover { outline-color: rgba(147,51,234,.9); }\n.ff-editing { outline: 2px solid #2563eb !important; outline-offset: 2px; cursor: text; }\n.ff-editing .ff-chip { background: rgba(37,99,235,.14) !important; box-shadow: inset 0 0 0 1px rgba(37,99,235,.45) !important; border-radius: 3px !important; padding: 0 1px !important; cursor: default; }\n.ff-edit-badge { position: absolute; z-index: 2147483647; font: 500 11px/1.4 system-ui, sans-serif !important; color: #fff !important; background: #2563eb !important; padding: 1px 6px !important; border-radius: 4px !important; pointer-events: none; white-space: nowrap; }\n`;function H(a,l={}){let f=l.clicks!==!1,p=l.live===!0,n=a.document,o=null,d=null,u=e=>{try{a.parent.postMessage(e,\"*\")}catch{}},m=f?n.querySelector('meta[name=\"formfeed:document\"]')?.getAttribute(\"content\")??null:null,s=!1;a.addEventListener(\"blur\",()=>{s=!0}),a.addEventListener(\"focus\",()=>{s=!1});let g=n.createElement(\"style\");g.setAttribute(\"data-formfeed\",\"edit\"),g.setAttribute(\"data-pagedjs-ignore\",\"\"),g.textContent=W,(n.head??n.documentElement).appendChild(g),f&&n.documentElement.classList.add(\"ff-edit-mode\");let x=e=>(e&&typeof e.closest==\"function\"?e:null)?.closest(\"[data-ff-edit]\")??null;n.addEventListener(\"click\",e=>{if(!f)return;if(o&&!o.done&&o.element.contains(e.target)){e.stopImmediatePropagation();return}let t=x(e.target);t&&(e.preventDefault(),e.stopImmediatePropagation(),v(t,{x:e.clientX,y:e.clientY}))},!0);function v(e,t){o&&!o.done&&L();let r=e.getAttribute(\"data-ff-src\")??\"\",i=e.getBoundingClientRect(),b=Array.from(n.querySelectorAll(`[data-ff-src=\"${r.replace(/\"/g,\"\")}\"]`));d={src:r,element:e,point:t},u({type:\"formfeed:edit-request\",src:r,doc:m,edit:e.getAttribute(\"data-ff-edit\"),text:e.textContent??\"\",elements:e.childElementCount,count:b.length,index:Math.max(0,b.indexOf(e)),split:e.hasAttribute(\"data-split-from\")||e.hasAttribute(\"data-split-to\"),rect:{left:i.left,top:i.top,width:i.width,height:i.height}})}n.addEventListener(\"keydown\",e=>{if(!f||o&&!o.done||!(e.ctrlKey||e.metaKey)||e.altKey)return;let t=e.key.toLowerCase();(t===\"z\"||t===\"y\")&&(e.preventDefault(),u({type:t===\"y\"||e.shiftKey?\"formfeed:redo\":\"formfeed:undo\"}))}),a.addEventListener(\"message\",e=>{if(e.source!==a.parent)return;let t=e.data;!t||typeof t.type!=\"string\"||(t.type===\"formfeed:edit-begin\"?B(t):t.type===\"formfeed:edit-refuse\"||t.type===\"formfeed:edit-end\"?(d=null,o&&!o.done&&S(!1)):t.type===\"formfeed:edit-open\"&&E(t))});function E(e){if(!f||typeof e.src!=\"string\"||o&&!o.done)return;let t=Array.from(n.querySelectorAll(`[data-ff-src=\"${e.src.replace(/\"/g,\"\")}\"][data-ff-edit]`)),r=Number.isInteger(e.index)?Number(e.index):0,i=t[r]??t[0];i&&v(i,null)}if(f){let e=()=>u({type:\"formfeed:edit-ready\",doc:m}),t=a;t.PagedConfig?t.formfeedEditReady=e:n.readyState===\"loading\"?n.addEventListener(\"DOMContentLoaded\",e):e()}function B(e){o&&!o.done&&S(!1);let t=e.layer?n.querySelector(`[data-ff-layer=\"${String(e.layer).replace(/\"/g,\"\")}\"] > .ff-text`):d&&d.src===e.src?d.element:n.querySelector(`[data-ff-src=\"${String(e.src).replace(/\"/g,\"\")}\"]`),r=e.at,i=e.layer?r&&Number.isFinite(r.x)&&Number.isFinite(r.y)?{x:Number(r.x),y:Number(r.y)}:null:d&&d.src===e.src?d.point:null;d=null;let b=s&&!n.hasFocus();if(!t||!Array.isArray(e.items)||b){u({type:\"formfeed:edit-cancel\",token:String(e.token)});return}let y=Array.from(t.childNodes),k=n.createDocumentFragment();for(let c of e.items)if(c.kind===\"text\")k.appendChild(n.createTextNode(String(c.text)));else if(c.kind===\"break\")k.appendChild(n.createElement(\"br\"));else if(c.kind===\"chip\"){let h=n.createElement(\"span\");h.className=\"ff-chip\",h.setAttribute(\"data-ff-chip\",String(c.index)),h.setAttribute(\"contenteditable\",\"false\"),c.title&&(h.title=String(c.title)),h.textContent=String(c.text),k.appendChild(h)}for(let c of y)t.removeChild(c);t.appendChild(k),t.contentEditable=\"true\",t.classList.add(\"ff-editing\"),t.setAttribute(\"role\",\"textbox\"),e.label&&t.setAttribute(\"aria-label\",String(e.label)),t.spellcheck=!0,o={token:String(e.token),element:t,saved:y,allowBreaks:e.allowBreaks===!0,badge:e.note?I(t,String(e.note)):null,done:!1},t.addEventListener(\"keydown\",T),t.addEventListener(\"beforeinput\",N),t.addEventListener(\"paste\",w),t.addEventListener(\"drop\",R),t.addEventListener(\"focusout\",F),p&&t.addEventListener(\"input\",C),t.focus(),e.select===\"all\"?q(t):K(t,i),u({type:\"formfeed:edit-started\",token:o.token}),typeof e.insert==\"string\"&&e.insert&&A(e.insert.replace(/\\r\\n?|\\n/g,\" \"))}function A(e){if(typeof n.execCommand==\"function\"&&n.execCommand(\"insertText\",!1,e))return;let t=a.getSelection(),r=t&&t.rangeCount?t.getRangeAt(0):null;r&&(r.deleteContents(),r.insertNode(n.createTextNode(e)),r.collapse(!1),p&&C())}function C(){o&&!o.done&&u({type:\"formfeed:edit-input\",token:o.token,items:D(o.element)})}function I(e,t){let r=n.createElement(\"div\");r.className=\"ff-edit-badge\",r.textContent=t;let i=e.getBoundingClientRect();return r.style.left=`${i.left+a.scrollX}px`,r.style.top=`${Math.max(0,i.top+a.scrollY-22)}px`,n.body.appendChild(r),r}function q(e){let t=a.getSelection();if(!t)return;let r=n.createRange();r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r)}function K(e,t){let r=a.getSelection();if(!r)return;let i=null,b=n;if(t){if(b.caretRangeFromPoint)i=b.caretRangeFromPoint(t.x,t.y);else if(b.caretPositionFromPoint){let y=b.caretPositionFromPoint(t.x,t.y);y&&(i=n.createRange(),i.setStart(y.offsetNode,y.offset))}}if(!i||!e.contains(i.startContainer))i=n.createRange(),i.selectNodeContents(e),i.collapse(!1);else if(t){let y=i.startContainer,c=(y.nodeType===1?y:y.parentElement)?.closest(\"[data-ff-chip]\")??null;if(c&&c!==e&&e.contains(c)){let h=c.getBoundingClientRect();i=n.createRange(),t.x<h.left+h.width/2?i.setStartBefore(c):i.setStartAfter(c),i.collapse(!0)}}r.removeAllRanges(),r.addRange(i)}function T(e){let t=e.key;t===\"Escape\"?(e.preventDefault(),S(!0)):t===\"Enter\"&&!e.shiftKey?(e.preventDefault(),L()):t===\"Enter\"?(e.preventDefault(),o?.allowBreaks&&$()):t===\"Tab\"?(e.preventDefault(),L()):(e.ctrlKey||e.metaKey)&&[\"b\",\"i\",\"u\"].includes(t.toLowerCase())&&(e.preventDefault(),p&&o&&!e.altKey&&u({type:\"formfeed:edit-style\",token:o.token,key:t.toLowerCase()}))}function N(e){let t=e.inputType??\"\";(t.startsWith(\"format\")||t===\"insertFromDrop\"||t===\"insertParagraph\"||t===\"insertLineBreak\")&&e.preventDefault()}function w(e){e.preventDefault(),A((e.clipboardData?.getData(\"text/plain\")??\"\").replace(/\\r\\n?|\\n/g,\" \"))}function R(e){e.preventDefault()}function F(){a.setTimeout(()=>{o&&!o.done&&(!n.hasFocus()||!o.element.contains(n.activeElement))&&L()},0)}function $(){let e=a.getSelection();if(!e||!e.rangeCount)return;let t=e.getRangeAt(0);t.deleteContents();let r=n.createElement(\"br\");t.insertNode(r),r.nextSibling||r.parentNode?.appendChild(n.createElement(\"br\"));let i=n.createRange();i.setStartAfter(r),i.collapse(!0),e.removeAllRanges(),e.addRange(i)}function M(e){e.done=!0;let t=e.element;t.removeEventListener(\"keydown\",T),t.removeEventListener(\"beforeinput\",N),t.removeEventListener(\"paste\",w),t.removeEventListener(\"drop\",R),t.removeEventListener(\"focusout\",F),t.removeEventListener(\"input\",C),t.removeAttribute(\"contenteditable\"),t.removeAttribute(\"role\"),t.removeAttribute(\"aria-label\"),t.classList.remove(\"ff-editing\"),e.badge?.remove(),o===e&&(o=null)}function L(){let e=o;if(!e||e.done)return;let t=D(e.element);M(e),u({type:\"formfeed:edit-commit\",token:e.token,items:t})}function S(e){let t=o;if(!t||t.done)return;let r=t.element;for(;r.firstChild;)r.removeChild(r.firstChild);for(let i of t.saved)r.appendChild(i);M(t),e&&u({type:\"formfeed:edit-cancel\",token:t.token})}}function D(a){let l=[],f=n=>{let o=l[l.length-1];o?.kind===\"text\"?o.text+=n:n&&l.push({kind:\"text\",text:n})},p=n=>{for(let o of Array.from(n.childNodes))if(o.nodeType===3)f(o.data);else if(o.nodeType===1){let d=o,u=d.getAttribute(\"data-ff-chip\");u!==null?l.push({kind:\"chip\",index:Number(u)}):d.tagName===\"BR\"?l.push({kind:\"break\"}):((d.tagName===\"DIV\"||d.tagName===\"P\")&&l.length&&l.push({kind:\"break\"}),p(d))}};for(p(a);l[l.length-1]?.kind===\"break\";)l.pop();return l}function O(a,l){return Array.from(a.querySelectorAll(\"[data-ff-layer]\")).map(f=>{let p=f.querySelector(\":scope > .ff-text\"),n=!1;if(p&&f.style.height!==\"auto\"){let o=l.getComputedStyle(f),d=f.clientHeight-(parseFloat(o.paddingTop)||0)-(parseFloat(o.paddingBottom)||0);n=o.overflow===\"hidden\"&&(p.scrollHeight>d+1||p.scrollWidth>p.clientWidth+1)}return{id:f.getAttribute(\"data-ff-layer\")??\"\",width:f.offsetWidth,height:f.offsetHeight,overflow:n}})}function P(a){let l=a.document,f=m=>{try{a.parent.postMessage(m,\"*\")}catch{}},p=m=>typeof m==\"string\"?l.querySelector(`[data-ff-layer=\"${m.replace(/\"/g,\"\")}\"]`):null,n=()=>{for(let m of Array.from(l.querySelectorAll(\"[data-ff-layer]\")))for(let s of[\"left\",\"top\",\"width\",\"height\",\"transform\"])m.style.removeProperty(s)},o=()=>{a.formfeedFit?.(),f({type:\"formfeed:ready\",layers:O(l,a)})};a.addEventListener(\"message\",m=>{if(m.source!==a.parent)return;let s=m.data;if(!(!s||typeof s.type!=\"string\")){if(s.type===\"formfeed:layer-style\"){let g=p(s.id);if(!g)return;let x=(v,E)=>{typeof E==\"number\"&&Number.isFinite(E)&&g.style.setProperty(v,`${E}px`)};x(\"left\",s.left),x(\"top\",s.top),x(\"width\",s.width),x(\"height\",s.height),typeof s.rotation==\"number\"&&Number.isFinite(s.rotation)&&g.style.setProperty(\"transform\",s.rotation?`rotate(${s.rotation}deg)`:\"none\")}else if(s.type===\"formfeed:layer-style-clear\")n();else if(s.type===\"formfeed:css\"&&typeof s.css==\"string\"){let g=l.querySelector('style[data-formfeed=\"template\"]');g&&(g.textContent=s.css),n(),o()}}}),H(a,{clicks:!1,live:!0});let d=l.fonts,u=()=>d?void d.ready.then(o):o();l.readyState===\"complete\"?u():a.addEventListener(\"load\",u)}P(window);})();";
|
|
7
7
|
/** Bundled from src/frame/audit.entry.ts. */
|
|
8
|
-
export declare const auditRuntime = "\"use strict\";(()=>{var I={\"document-title\":\"error\",\"image-alt\":\"error\",\"figure-name\":\"error\",\"heading-order\":\"error\",\"table-rows\":\"error\",\"table-cell-empty\":\"error\",\"masked-text\":\"error\",\"filtered-text\":\"warning\",\"document-language\":\"warning\",\"table-headers\":\"warning\",\"link-name\":\"warning\",\"generated-text\":\"warning\",\"fixed-text\":\"warning\",\"running-text\":\"warning\"};var S=120;var O=\".formfeed-chrome, .ff-running-header, .ff-running-footer\",_=\".pageNumber, .totalPages, .date, .title, .url, .ff-page-no, .ff-page-total\",k=new Set([\"script\",\"style\",\"template\",\"noscript\",\"head\"]),j=2e4,q=10,B=new Set([\"page\",\"pages\",\"of\",\"seite\",\"seiten\",\"von\",\"p\",\"s\"]),u=t=>(t??\"\").replace(/\\s+/g,\" \").trim(),D=t=>t.replace(/\\s+/g,\"\").toLowerCase(),$=t=>/[\\p{L}\\p{N}]/u.test(t),Y=/^data-(ref|id|split-(from|to|original)|(previous-|next-)?break-(before|after|inside)|(align-)?last-split-element|nth-of-type|counter-.+|page(-number)?|undisplayed|after-page|following|has-notes|children|item-num)$/;function X(t){let n=t.cloneNode(!1);n.removeAttribute(\"data-ff-src\"),n.removeAttribute(\"data-ff-edit\");let i=t.closest(\".pagedjs_page\")!==null;for(let s of Array.from(n.attributes))i&&Y.test(s.name)?n.removeAttribute(s.name):s.value.length>48&&n.setAttribute(s.name,`${s.value.slice(0,40)}\\u2026`);let o=n.outerHTML.replace(new RegExp(`</${t.tagName}>$`,\"i\"),\"\");return o.length>S?`${o.slice(0,S-1)}\\u2026`:o}function F(t,n={}){let i=t.document,o=i.body,s=[],d=new Set,a=n.findings!==!1,c=(e,r,l={})=>{if(!a)return;let m=r?.closest(\"[data-ff-src]\")?.getAttribute(\"data-ff-src\")??null,h=r?X(r):\"\",g=`${e}|${m??h}|${JSON.stringify(l)}`;d.has(g)||(d.add(g),s.push({code:e,severity:I[e],src:m,snippet:h,args:l}))},f=new WeakMap,A=e=>{let r=f.get(e);if(r!==void 0)return r;let l=t.getComputedStyle(e),m=l.display===\"none\"||l.visibility===\"hidden\"||l.visibility===\"collapse\"||e.parentElement!==null&&e.parentElement!==i.documentElement&&A(e.parentElement);return f.set(e,m),m},p=e=>e.closest('[aria-hidden=\"true\"]')!==null,E=e=>/^(presentation|none)$/.test(e.getAttribute(\"role\")??\"\"),H=e=>e.closest(O)!==null,y=e=>$(e.textContent??\"\"),x=e=>{let r=u(e.getAttribute(\"aria-label\"));return r||u((e.getAttribute(\"aria-labelledby\")??\"\").split(/\\s+/).filter(Boolean).map(l=>e.ownerDocument.getElementById(l)?.textContent??\"\").join(\" \"))},P=e=>x(e)||u(e.textContent)||u(Array.from(e.querySelectorAll(\"img[alt]\")).map(r=>r.getAttribute(\"alt\")).join(\" \"))||u(e.getAttribute(\"title\")),T=e=>{let r=e.getAttribute(\"href\")??\"\";return{href:r.startsWith(\"#\")?r:e.href??r,name:P(e)}};u(i.title)||c(\"document-title\",null),!u(i.documentElement.getAttribute(\"lang\"))&&!n.locale&&c(\"document-language\",null);let M=n.pages??(n.pageHeight&&n.pageHeight>0?Math.ceil(i.documentElement.scrollHeight/n.pageHeight):1),C=[],v=[],R={\"masked-text\":[],\"filtered-text\":[],\"fixed-text\":[]},w=(e,r)=>{R[e].some(l=>l.contains(r))||(R[e].push(r),c(e,r))},V=a&&ne(i),G=o?Array.from(o.querySelectorAll(\"*\")).slice(0,j):[];for(let e of G){let r=e.tagName.toLowerCase();if(k.has(r)||H(e)||A(e))continue;if(r===\"a\"&&e.hasAttribute(\"href\")){let g=T(e);C.push(g),!g.name&&!p(e)&&c(\"link-name\",e)}if(!a)continue;let l=t.getComputedStyle(e),m=l.getPropertyValue(\"mask-image\")||l.getPropertyValue(\"-webkit-mask-image\");if(m&&m!==\"none\"&&y(e)&&w(\"masked-text\",e),l.filter&&l.filter!==\"none\"&&y(e)&&w(\"filtered-text\",e),l.position===\"fixed\"&&M>1&&y(e)&&w(\"fixed-text\",e),V)for(let g of[\"::before\",\"::after\"]){let U=re(t.getComputedStyle(e,g).content);U&&c(\"generated-text\",e,{text:U})}if(p(e))continue;r===\"img\"&&!E(e)?e.hasAttribute(\"alt\")||x(e)||u(e.getAttribute(\"title\"))||c(\"image-alt\",e):(r===\"canvas\"||e.getAttribute(\"role\")===\"img\"&&r!==\"img\")&&(x(e)||u(e.getAttribute(\"title\"))||u(e.querySelector(\":scope > title\")?.textContent)||c(\"figure-name\",e,{tag:r}));let h=/^h[1-6]$/.test(r)?Number(r[1]):e.getAttribute(\"role\")===\"heading\"?Number(e.getAttribute(\"aria-level\"))||2:0;h&&v.push({element:e,level:h}),r===\"table\"&&!E(e)&&Q(e,c)}let b=0;for(let{element:e,level:r}of v)(b===0?r!==1:r>b+1)&&c(\"heading-order\",e,{level:r,previous:b}),b=r;let N=[],W=a&&o?D(J(o)):\"\",L=0;for(let e of[\"header\",\"footer\"])for(let r of z(i,e,n[e])){for(let l of Array.from(r.querySelectorAll(\"a[href]\")))N.push(T(l));if(a)for(let{text:l,element:m}of K(r)){if(L>=q||W.includes(D(l)))continue;let h=s.length;c(\"running-text\",m,{text:l.slice(0,80),part:e}),s.length>h&&L++}}return{findings:s,links:C,templateLinks:N}}function z(t,n,i){if(i!==void 0){if(!i.trim())return[];let o=new DOMParser().parseFromString(`<!doctype html><body>${i}</body>`,\"text/html\");return o.body?[o.body]:[]}return Array.from(t.querySelectorAll(`.ff-running-${n}, .formfeed-chrome[data-ff-chrome=\"${n}\"]`))}function J(t){let n=[],i=o=>{if(o.nodeType===3){n.push(o.nodeValue??\"\");return}if(o.nodeType!==1)return;let s=o;if(!(k.has(s.tagName.toLowerCase())||s.matches(O)))for(let d of Array.from(o.childNodes))i(d)};return i(t),n.join(\" \")}function K(t){let n=[],i=o=>{let s=o.tagName.toLowerCase();if(k.has(s)||o.matches(_))return;let d=Array.from(o.children).some(a=>a.matches(_));for(let a of Array.from(o.childNodes))if(a.nodeType===1)i(a);else if(a.nodeType===3&&!d)for(let c of(a.nodeValue??\"\").split(/\\s*[\u00B7\u2022|]\\s*|\\s{2,}|\\n/)){let f=u(c);(f.toLowerCase().match(/[\\p{L}\\p{N}]+/gu)??[]).some(p=>!B.has(p))&&n.push({text:f,element:o})}};return i(t),n}function Q(t,n){let i=Array.from(t.rows);if(!(t.querySelector('th, [role=\"columnheader\"], [role=\"rowheader\"]')!==null)){i.length>=2&&n(\"table-headers\",t);return}let s=te(i),d=s.find(c=>c!==s[0]);d!==void 0&&n(\"table-rows\",t,{first:s[0]??0,other:d});let a=i.flatMap(c=>Array.from(c.cells).filter(f=>f.tagName===\"TD\"&&ee(f)));a[0]&&n(\"table-cell-empty\",a[0],{count:a.length})}var Z='img[alt]:not([alt=\"\"]), svg, canvas, input, select, textarea, button, meter, progress';function ee(t){return!/[^ \\t\\n\\r\\f]/.test(t.textContent??\"\")&&t.querySelector(Z)===null}function te(t){let n=[];return t.map(i=>{let o=[],s=0,d=()=>{for(;(n[s]??0)>0;)o[s]=n[s]-1,s++};for(let a of Array.from(i.cells)){d();let c=Math.max(1,a.rowSpan||1)-1;for(let f=Math.max(1,a.colSpan||1);f>0;f--)o[s++]=c}d();for(let a=s;a<n.length;a++)(n[a]??0)>0&&(o[a]=n[a]-1,s=a+1);return n=o,s})}function ne(t){let n=i=>{for(let o of Array.from(i??[])){let s=o;if(s.selectorText&&/::?(before|after)/.test(s.selectorText)&&s.style?.content||o.cssRules&&n(o.cssRules))return!0}return!1};for(let i of Array.from(t.styleSheets))try{if(n(i.cssRules))return!0}catch{return!0}return!1}function re(t){if(!t||t===\"none\"||t===\"normal\")return\"\";let n=(t.match(/\"(?:[^\"\\\\]|\\\\.)*\"/g)??[]).map(o=>o.slice(1,-1).replace(/\\\\(.)/g,\"$1\"));if(/\\bcounters?\\(/.test(t))return u(t).slice(0,80);let i=u(n.join(\"\"));return $(i)?i.slice(0,80):\"\"}window.formfeedAudit=t=>F(window,t);})();";
|
|
8
|
+
export declare const auditRuntime = "\"use strict\";(()=>{var I={\"document-title\":\"error\",\"image-alt\":\"error\",\"figure-name\":\"error\",\"heading-order\":\"error\",\"table-rows\":\"error\",\"table-cell-empty\":\"error\",\"masked-text\":\"error\",\"filtered-text\":\"warning\",\"document-language\":\"warning\",\"table-headers\":\"warning\",\"link-name\":\"warning\",\"generated-text\":\"warning\",\"fixed-text\":\"warning\",\"running-text\":\"warning\"};var S=120;var O=\".formfeed-chrome, .ff-running-header, .ff-running-footer\",_=\".pageNumber, .totalPages, .date, .title, .url, .ff-page-no, .ff-page-total\",k=new Set([\"script\",\"style\",\"template\",\"noscript\",\"head\"]),j=2e4,q=10,B=new Set([\"page\",\"pages\",\"of\",\"seite\",\"seiten\",\"von\",\"p\",\"s\"]),u=t=>(t??\"\").replace(/\\s+/g,\" \").trim(),D=t=>t.replace(/\\s+/g,\"\").toLowerCase(),$=t=>/[\\p{L}\\p{N}]/u.test(t),Y=/^data-(ref|id|split-(from|to|original)|(previous-|next-)?break-(before|after|inside)|(align-)?last-split-element|nth-of-type|counter-.+|page(-number)?|undisplayed|after-page|following|has-notes|children|item-num)$/;function X(t){let n=t.cloneNode(!1);n.removeAttribute(\"data-ff-src\"),n.removeAttribute(\"data-ff-edit\"),n.removeAttribute(\"data-ff-break\");let i=t.closest(\".pagedjs_page\")!==null;for(let s of Array.from(n.attributes))i&&Y.test(s.name)?n.removeAttribute(s.name):s.value.length>48&&n.setAttribute(s.name,`${s.value.slice(0,40)}\\u2026`);let o=n.outerHTML.replace(new RegExp(`</${t.tagName}>$`,\"i\"),\"\");return o.length>S?`${o.slice(0,S-1)}\\u2026`:o}function F(t,n={}){let i=t.document,o=i.body,s=[],d=new Set,a=n.findings!==!1,c=(e,r,l={})=>{if(!a)return;let m=r?.closest(\"[data-ff-src]\")?.getAttribute(\"data-ff-src\")??null,h=r?X(r):\"\",g=`${e}|${m??h}|${JSON.stringify(l)}`;d.has(g)||(d.add(g),s.push({code:e,severity:I[e],src:m,snippet:h,args:l}))},f=new WeakMap,A=e=>{let r=f.get(e);if(r!==void 0)return r;let l=t.getComputedStyle(e),m=l.display===\"none\"||l.visibility===\"hidden\"||l.visibility===\"collapse\"||e.parentElement!==null&&e.parentElement!==i.documentElement&&A(e.parentElement);return f.set(e,m),m},p=e=>e.closest('[aria-hidden=\"true\"]')!==null,E=e=>/^(presentation|none)$/.test(e.getAttribute(\"role\")??\"\"),H=e=>e.closest(O)!==null,y=e=>$(e.textContent??\"\"),x=e=>{let r=u(e.getAttribute(\"aria-label\"));return r||u((e.getAttribute(\"aria-labelledby\")??\"\").split(/\\s+/).filter(Boolean).map(l=>e.ownerDocument.getElementById(l)?.textContent??\"\").join(\" \"))},P=e=>x(e)||u(e.textContent)||u(Array.from(e.querySelectorAll(\"img[alt]\")).map(r=>r.getAttribute(\"alt\")).join(\" \"))||u(e.getAttribute(\"title\")),T=e=>{let r=e.getAttribute(\"href\")??\"\";return{href:r.startsWith(\"#\")?r:e.href??r,name:P(e)}};u(i.title)||c(\"document-title\",null),!u(i.documentElement.getAttribute(\"lang\"))&&!n.locale&&c(\"document-language\",null);let M=n.pages??(n.pageHeight&&n.pageHeight>0?Math.ceil(i.documentElement.scrollHeight/n.pageHeight):1),C=[],v=[],R={\"masked-text\":[],\"filtered-text\":[],\"fixed-text\":[]},w=(e,r)=>{R[e].some(l=>l.contains(r))||(R[e].push(r),c(e,r))},V=a&&ne(i),G=o?Array.from(o.querySelectorAll(\"*\")).slice(0,j):[];for(let e of G){let r=e.tagName.toLowerCase();if(k.has(r)||H(e)||A(e))continue;if(r===\"a\"&&e.hasAttribute(\"href\")){let g=T(e);C.push(g),!g.name&&!p(e)&&c(\"link-name\",e)}if(!a)continue;let l=t.getComputedStyle(e),m=l.getPropertyValue(\"mask-image\")||l.getPropertyValue(\"-webkit-mask-image\");if(m&&m!==\"none\"&&y(e)&&w(\"masked-text\",e),l.filter&&l.filter!==\"none\"&&y(e)&&w(\"filtered-text\",e),l.position===\"fixed\"&&M>1&&y(e)&&w(\"fixed-text\",e),V)for(let g of[\"::before\",\"::after\"]){let U=re(t.getComputedStyle(e,g).content);U&&c(\"generated-text\",e,{text:U})}if(p(e))continue;r===\"img\"&&!E(e)?e.hasAttribute(\"alt\")||x(e)||u(e.getAttribute(\"title\"))||c(\"image-alt\",e):(r===\"canvas\"||e.getAttribute(\"role\")===\"img\"&&r!==\"img\")&&(x(e)||u(e.getAttribute(\"title\"))||u(e.querySelector(\":scope > title\")?.textContent)||c(\"figure-name\",e,{tag:r}));let h=/^h[1-6]$/.test(r)?Number(r[1]):e.getAttribute(\"role\")===\"heading\"?Number(e.getAttribute(\"aria-level\"))||2:0;h&&v.push({element:e,level:h}),r===\"table\"&&!E(e)&&Q(e,c)}let b=0;for(let{element:e,level:r}of v)(b===0?r!==1:r>b+1)&&c(\"heading-order\",e,{level:r,previous:b}),b=r;let N=[],W=a&&o?D(J(o)):\"\",L=0;for(let e of[\"header\",\"footer\"])for(let r of z(i,e,n[e])){for(let l of Array.from(r.querySelectorAll(\"a[href]\")))N.push(T(l));if(a)for(let{text:l,element:m}of K(r)){if(L>=q||W.includes(D(l)))continue;let h=s.length;c(\"running-text\",m,{text:l.slice(0,80),part:e}),s.length>h&&L++}}return{findings:s,links:C,templateLinks:N}}function z(t,n,i){if(i!==void 0){if(!i.trim())return[];let o=new DOMParser().parseFromString(`<!doctype html><body>${i}</body>`,\"text/html\");return o.body?[o.body]:[]}return Array.from(t.querySelectorAll(`.ff-running-${n}, .formfeed-chrome[data-ff-chrome=\"${n}\"]`))}function J(t){let n=[],i=o=>{if(o.nodeType===3){n.push(o.nodeValue??\"\");return}if(o.nodeType!==1)return;let s=o;if(!(k.has(s.tagName.toLowerCase())||s.matches(O)))for(let d of Array.from(o.childNodes))i(d)};return i(t),n.join(\" \")}function K(t){let n=[],i=o=>{let s=o.tagName.toLowerCase();if(k.has(s)||o.matches(_))return;let d=Array.from(o.children).some(a=>a.matches(_));for(let a of Array.from(o.childNodes))if(a.nodeType===1)i(a);else if(a.nodeType===3&&!d)for(let c of(a.nodeValue??\"\").split(/\\s*[\u00B7\u2022|]\\s*|\\s{2,}|\\n/)){let f=u(c);(f.toLowerCase().match(/[\\p{L}\\p{N}]+/gu)??[]).some(p=>!B.has(p))&&n.push({text:f,element:o})}};return i(t),n}function Q(t,n){let i=Array.from(t.rows);if(!(t.querySelector('th, [role=\"columnheader\"], [role=\"rowheader\"]')!==null)){i.length>=2&&n(\"table-headers\",t);return}let s=te(i),d=s.find(c=>c!==s[0]);d!==void 0&&n(\"table-rows\",t,{first:s[0]??0,other:d});let a=i.flatMap(c=>Array.from(c.cells).filter(f=>f.tagName===\"TD\"&&ee(f)));a[0]&&n(\"table-cell-empty\",a[0],{count:a.length})}var Z='img[alt]:not([alt=\"\"]), svg, canvas, input, select, textarea, button, meter, progress';function ee(t){return!/[^ \\t\\n\\r\\f]/.test(t.textContent??\"\")&&t.querySelector(Z)===null}function te(t){let n=[];return t.map(i=>{let o=[],s=0,d=()=>{for(;(n[s]??0)>0;)o[s]=n[s]-1,s++};for(let a of Array.from(i.cells)){d();let c=Math.max(1,a.rowSpan||1)-1;for(let f=Math.max(1,a.colSpan||1);f>0;f--)o[s++]=c}d();for(let a=s;a<n.length;a++)(n[a]??0)>0&&(o[a]=n[a]-1,s=a+1);return n=o,s})}function ne(t){let n=i=>{for(let o of Array.from(i??[])){let s=o;if(s.selectorText&&/::?(before|after)/.test(s.selectorText)&&s.style?.content||o.cssRules&&n(o.cssRules))return!0}return!1};for(let i of Array.from(t.styleSheets))try{if(n(i.cssRules))return!0}catch{return!0}return!1}function re(t){if(!t||t===\"none\"||t===\"normal\")return\"\";let n=(t.match(/\"(?:[^\"\\\\]|\\\\.)*\"/g)??[]).map(o=>o.slice(1,-1).replace(/\\\\(.)/g,\"$1\"));if(/\\bcounters?\\(/.test(t))return u(t).slice(0,80);let i=u(n.join(\"\"));return $(i)?i.slice(0,80):\"\"}window.formfeedAudit=t=>F(window,t);})();";
|
|
9
9
|
/** Bundled from src/frame/paged-print.entry.ts. */
|
|
10
|
-
export declare const pagedPrintRuntime = "\"use strict\";(()=>{var
|
|
10
|
+
export declare const pagedPrintRuntime = "\"use strict\";(()=>{var A=t=>!!t&&t.nodeType===1,E=t=>A(t)?t:t?.parentElement??null;function g(t,r){for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.nodeName===r)return e;return null}var T=t=>Array.from(t.querySelectorAll(\":scope > tbody > tr, :scope > tr\"));function S(t,r){for(let e=t.parentElement;e&&!e.classList.contains(\"pagedjs_page_content\");e=e.parentElement)if(r.getComputedStyle(e).display.startsWith(\"inline\"))return!0;return!1}function O(t,r){for(let e=t;e&&e!==r;e=e.parentElement)for(let o=e.previousSibling;o;o=o.previousSibling)if(A(o)||(o.textContent??\"\").trim())return!0;return!1}function P(t){let r=t.cloneNode(!0);for(let e of[r,...Array.from(r.querySelectorAll(\"[id]\"))])e.id&&(e.setAttribute(\"data-id\",e.id),e.removeAttribute(\"id\"));return r.setAttribute(\"data-ff-repeated\",\"\"),r}function w(t,r){for(let e of Array.from(t.querySelectorAll(\"table > tfoot\"))){let o=e.nextElementSibling;for(;o&&o.nodeName!==\"TBODY\"&&o.nodeName!==\"TR\";)o=o.nextElementSibling;o&&r.getComputedStyle(e).display===\"table-footer-group\"&&e.parentNode?.appendChild(e)}}function H(t,r,e){let o=E(t),n=o?.closest(\"table\");if(!o||!n||!n.hasAttribute(\"data-split-from\")||n.hasAttribute(\"data-ff-head\")||(n.setAttribute(\"data-ff-head\",\"\"),g(n,\"THEAD\")))return;let a=E(r)?.closest(\"table\"),s=a&&g(a,\"THEAD\");if(!a||!s||S(n,e))return;let d=P(s),i=n.firstChild;for(;i&&(i.nodeName===\"CAPTION\"||i.nodeName===\"COLGROUP\");)i=i.nextSibling;if(n.insertBefore(d,i),e.getComputedStyle(d).display!==\"table-header-group\"){d.remove();return}for(let f=a.firstElementChild;f;f=f.nextElementSibling)f.nodeName===\"COLGROUP\"&&n.insertBefore(f.cloneNode(!0),d);let l=o.closest(\"tr\"),u=l?.parentElement;l&&u&&u.parentElement===n&&u.nodeName!==\"THEAD\"&&(l.style.breakInside=\"auto\",l.removeAttribute(\"data-break-inside\"))}function R(t,r,e,o,n){let a=t.startContainer,s=A(a)?a.childNodes[t.startOffset]??a:a,d=E(s);if(!d)return;let i=d.nodeName===\"TBODY\"?d.querySelector(\"tr\"):d.closest(\"tr\"),l=i?.closest(\"table\"),u=i?.parentElement;if(!i||!l||!u||u.nodeName===\"THEAD\"||u.nodeName===\"TFOOT\"||S(l,n))return;let f=T(l),h=f.indexOf(i);if(h<0)return;let m=h,y=0;if(h>0&&(s===i||s===u)){let p=o.querySelector(`[data-ref=\"${l.getAttribute(\"data-ref\")??\"\"}\"]`),b=p&&g(p,\"TFOOT\");if(b){let c=b.cloneNode(!0);l.appendChild(c),n.getComputedStyle(c).display===\"table-footer-group\"&&(y=c.getBoundingClientRect().height),c.remove()}let x=Math.round(e),k=c=>!c||Math.floor(c.getBoundingClientRect().bottom)+y<=x;for(;m>0&&!k(f[m-1]);)m--}if(m===0){if(l.hasAttribute(\"data-split-from\")||!g(l,\"THEAD\"))return;let p=l.previousElementSibling,b=l.getAttribute(\"data-previous-break-after\")===\"avoid\"&&p?p:l;return O(b,r)?(t.setStartBefore(b),t):void 0}let v=f[m];return m<h&&v&&t.setStartBefore(v),y&&l.setAttribute(\"data-ff-foot\",\"\"),t}function q(t,r){let e=t.querySelector(\"table[data-ff-foot]\");if(!e)return;e.removeAttribute(\"data-ff-foot\");let o=r.querySelector(`[data-ref=\"${e.getAttribute(\"data-ref\")??\"\"}\"]`),n=o&&g(o,\"TFOOT\");n&&e.appendChild(P(n))}function B(t){let r=t.querySelector(\".pagedjs_pagebox\");if(!r)return;let e=Array.from(r.children).filter(n=>!(n.getAttribute(\"class\")??\"\").includes(\"pagedjs_\")&&!n.hasAttribute(\"data-ff-fixed\"));if(!e.length)return;let o=r.ownerDocument.createElement(\"div\");o.setAttribute(\"data-ff-fixed\",\"\"),o.setAttribute(\"style\",\"grid-column: center; grid-row: page; position: relative; pointer-events: none;\");for(let n of e)\"style\"in n&&(n.style.pointerEvents=\"auto\"),o.appendChild(n);r.appendChild(o)}var N=\".ff-running-header, .ff-running-footer\";function D(t){let{head:r,body:e}=t;for(let a of Array.from(e.querySelectorAll(\"style\")))a.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&!a.closest(N)&&r.appendChild(a);let o=[];for(let a of Array.from(e.querySelectorAll(\"[style]\"))){if(a.closest(N))continue;let s=[\"break-before\",\"break-after\",\"page\"].flatMap(d=>{let i=a.style.getPropertyValue(d);return!/^[\\w-]+$/.test(i)||i===\"auto\"?[]:(a.style.removeProperty(d),[`${d}: ${i};`])});s.length&&(a.style.length||a.removeAttribute(\"style\"),a.setAttribute(\"data-ff-break\",String(o.length)),o.push(`[data-ff-break=\"${o.length}\"] { ${s.join(\" \")} }`))}if(!o.length)return;let n=t.createElement(\"style\");n.textContent=o.join(`\n`),r.appendChild(n)}function F(t){for(let r of[\"data-break-before\",\"data-break-after\",\"data-next-break-before\",\"data-previous-break-after\"])for(let e of Array.from(t.querySelectorAll(`[${r}]`)))/^(left|right|recto|verso)$/.test(e.getAttribute(r)??\"\")&&e.setAttribute(r,\"page\")}function C(t){t.formfeedMoveTableFeet=()=>w(t.document,t),t.formfeedShowStyles=()=>D(t.document);let r=t.Paged;if(!r?.Handler)return;class e extends r.Handler{afterParsed(n){F(n)}renderNode(n,a){H(n,a,t)}onOverflow(n,a,s){return n?R(n,a,s.bottom,this.chunker.source,t):void 0}afterOverflowRemoved(n,a){q(a,this.chunker.source)}afterPageLayout(n){B(n)}}r.registerHandlers(e)}C(window);})();";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { EinvoiceValidation } from '../einvoice/report.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* `@formfeed/engine/pdfa` (plan 26): what `pdf.pdfa` asks for, what it cannot go with, and the
|
|
4
|
+
* report a render keeps of what the validator said. No template engine is imported here and nothing
|
|
5
|
+
* of Node, so the gateway Worker, the render-worker, the editor and the CLI all read the same names.
|
|
6
|
+
*
|
|
7
|
+
* PDF/A is ISO 19005, a file format for keeping documents: the fonts embedded, the colours defined,
|
|
8
|
+
* nothing that needs the network or a password. Whether an archive keeps them as a law asks (the
|
|
9
|
+
* GoBD, for one) is a matter of how the archive is run, not of the file, so nothing here or on any
|
|
10
|
+
* page says "revisionssicher", "GoBD-konform", "certified" or "archive-compliant": the report says
|
|
11
|
+
* which part and level a file was held to, and by which validator.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The levels a render can ask for. 3b is the default and what an e-invoice is; 2b is for archives
|
|
15
|
+
* that take PDF/A-2 and not PDF/A-3, which may carry any file as an attachment. PDF/A-1 forbids the
|
|
16
|
+
* transparency Chromium writes, so it is not offered.
|
|
17
|
+
*/
|
|
18
|
+
export declare const PDFA_LEVELS: readonly ["2b", "3b"];
|
|
19
|
+
export type PdfaLevel = (typeof PDFA_LEVELS)[number];
|
|
20
|
+
/** What `true` stands for. */
|
|
21
|
+
export declare const PDFA_DEFAULT_LEVEL: PdfaLevel;
|
|
22
|
+
/** The standard a level names, as the report and the `X-Formfeed-PDF-A` header write it. */
|
|
23
|
+
export declare const PDFA_STANDARDS: {
|
|
24
|
+
readonly '2b': "PDF/A-2b";
|
|
25
|
+
readonly '3b': "PDF/A-3b";
|
|
26
|
+
};
|
|
27
|
+
export type PdfaStandard = (typeof PDFA_STANDARDS)[PdfaLevel];
|
|
28
|
+
/** `pdf.pdfa` as a template's settings or a request write it. */
|
|
29
|
+
export type PdfaSetting = PdfaLevel | boolean | null;
|
|
30
|
+
/**
|
|
31
|
+
* `pdf.pdfa` as a render takes it: a level, `true` for the default level, and anything else off.
|
|
32
|
+
* There is no check to choose (plan 26, decision 2): a file that fails PDF/A fails the render.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolvePdfa(setting: unknown): PdfaLevel | null;
|
|
35
|
+
/** Whether a `pdf.pdfa` value is one the API takes: a level, a boolean, or null. */
|
|
36
|
+
export declare function isPdfaSetting(value: unknown): value is PdfaSetting;
|
|
37
|
+
export declare function pdfaStandard(level: PdfaLevel): PdfaStandard;
|
|
38
|
+
/**
|
|
39
|
+
* What `pdf.pdfa` cannot go with, in the words every place that refuses it uses (the gateway before
|
|
40
|
+
* a render costs anything, the worker for whoever calls it directly, `formfeed validate`, the API's
|
|
41
|
+
* template validation). A merge, a watermark and Word and PowerPoint templates go with it, since all
|
|
42
|
+
* of them come before the conversion.
|
|
43
|
+
*/
|
|
44
|
+
export declare const PDFA_REFUSALS: {
|
|
45
|
+
readonly password: "pdf.pdfa cannot be combined with post.password: PDF/A does not allow encryption";
|
|
46
|
+
readonly einvoice: "pdf.pdfa \"2b\" cannot be combined with an e-invoice: the invoice XML is an attachment, which PDF/A-2 does not allow. An e-invoice is a PDF/A-3b already; ask for \"3b\" or leave pdf.pdfa out";
|
|
47
|
+
readonly invalid: "settings.pdf.pdfa is \"2b\", \"3b\", true, false or null";
|
|
48
|
+
};
|
|
49
|
+
/** How many findings a render keeps; a render row travels in every list and webhook. */
|
|
50
|
+
export declare const PDFA_MAX_MESSAGES = 50;
|
|
51
|
+
/** One rule of PDF/A the file failed, as the validator reports it. */
|
|
52
|
+
export interface PdfaMessage {
|
|
53
|
+
severity: 'error' | 'warning';
|
|
54
|
+
/** A clause of ISO 19005 and veraPDF's test number, `6.2.11.4.1-1`. */
|
|
55
|
+
rule: string | null;
|
|
56
|
+
message: string;
|
|
57
|
+
/** veraPDF's path to the object of the PDF. */
|
|
58
|
+
location: string | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* `pdfa` on a render (plan 26): `null` unless the render asked for PDF/A or is an e-invoice with
|
|
62
|
+
* `pdf.pdfa` beside it. `conformant` is the validator's word on the file it judged; a render that
|
|
63
|
+
* succeeded delivered exactly that file, and one that failed delivered nothing.
|
|
64
|
+
*/
|
|
65
|
+
export interface PdfaResult {
|
|
66
|
+
standard: PdfaStandard;
|
|
67
|
+
conformant: boolean;
|
|
68
|
+
/** The validator and its version: its rule set moves between releases. */
|
|
69
|
+
validator: string;
|
|
70
|
+
/** The validator's own id for this report, which its log names too. */
|
|
71
|
+
id: string;
|
|
72
|
+
/** The versions of what converted and judged the file: `verapdf`, `pdfbox` (and `mustang` for an e-invoice). */
|
|
73
|
+
versions: Record<string, string>;
|
|
74
|
+
/** SHA-256 of the PDF that was judged: the delivered file when the render succeeded. */
|
|
75
|
+
pdf_sha256: string | null;
|
|
76
|
+
messages: PdfaMessage[];
|
|
77
|
+
/** More findings than the render keeps. */
|
|
78
|
+
truncated?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/** The sidecar's report of `POST /pdf/pdfa` (`ArchiveReport` in `apps/conformance`). */
|
|
81
|
+
export interface PdfaValidatorReport {
|
|
82
|
+
id: string;
|
|
83
|
+
valid: boolean;
|
|
84
|
+
pdfa: string;
|
|
85
|
+
validator: string;
|
|
86
|
+
messages: Array<{
|
|
87
|
+
severity?: string;
|
|
88
|
+
rule?: string | null;
|
|
89
|
+
message?: string;
|
|
90
|
+
location?: string | null;
|
|
91
|
+
}>;
|
|
92
|
+
truncated?: boolean;
|
|
93
|
+
versions?: Record<string, string>;
|
|
94
|
+
}
|
|
95
|
+
/** The report a render keeps, from the sidecar's, with the hash of the file it judged. */
|
|
96
|
+
export declare function pdfaResult(level: PdfaLevel, report: PdfaValidatorReport, pdfSha256: string | null): PdfaResult;
|
|
97
|
+
/**
|
|
98
|
+
* The `pdfa` block of an e-invoice that asked for PDF/A too (plan 26, decision 8): an e-invoice is
|
|
99
|
+
* a PDF/A-3b, converted and judged once, so the block is made from the e-invoice's own validation
|
|
100
|
+
* and its PDF findings. Null while that validation ended at the XML, before there was a file.
|
|
101
|
+
*/
|
|
102
|
+
export declare function pdfaFromEinvoice(validation: EinvoiceValidation | null | undefined): PdfaResult | null;
|
|
103
|
+
/** Whether a stored value is a report: the API shows it, and null otherwise. */
|
|
104
|
+
export declare function isPdfaResult(value: unknown): value is PdfaResult;
|
|
105
|
+
/** How long the report may be as a header value: proxies refuse a response whose headers grow past a few kilobytes. */
|
|
106
|
+
export declare const PDFA_HEADER_LENGTH = 2000;
|
|
107
|
+
/**
|
|
108
|
+
* The report as the worker's binary answer carries it in `x-formfeed-pdfa`, percent-encoded: the
|
|
109
|
+
* gateway records it with the render and `preview-render` shows it. A file that was delivered
|
|
110
|
+
* passed, so its report is short; one that is too long anyway loses its findings and says so.
|
|
111
|
+
*/
|
|
112
|
+
export declare function pdfaHeaderValue(result: PdfaResult, limit?: number): string;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { EinvoiceValidation } from '../einvoice/report.js';
|
|
2
|
+
/**
|
|
3
|
+
* `@formfeed/engine/pdfa` (plan 26): what `pdf.pdfa` asks for, what it cannot go with, and the
|
|
4
|
+
* report a render keeps of what the validator said. No template engine is imported here and nothing
|
|
5
|
+
* of Node, so the gateway Worker, the render-worker, the editor and the CLI all read the same names.
|
|
6
|
+
*
|
|
7
|
+
* PDF/A is ISO 19005, a file format for keeping documents: the fonts embedded, the colours defined,
|
|
8
|
+
* nothing that needs the network or a password. Whether an archive keeps them as a law asks (the
|
|
9
|
+
* GoBD, for one) is a matter of how the archive is run, not of the file, so nothing here or on any
|
|
10
|
+
* page says "revisionssicher", "GoBD-konform", "certified" or "archive-compliant": the report says
|
|
11
|
+
* which part and level a file was held to, and by which validator.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The levels a render can ask for. 3b is the default and what an e-invoice is; 2b is for archives
|
|
15
|
+
* that take PDF/A-2 and not PDF/A-3, which may carry any file as an attachment. PDF/A-1 forbids the
|
|
16
|
+
* transparency Chromium writes, so it is not offered.
|
|
17
|
+
*/
|
|
18
|
+
export declare const PDFA_LEVELS: readonly ["2b", "3b"];
|
|
19
|
+
export type PdfaLevel = (typeof PDFA_LEVELS)[number];
|
|
20
|
+
/** What `true` stands for. */
|
|
21
|
+
export declare const PDFA_DEFAULT_LEVEL: PdfaLevel;
|
|
22
|
+
/** The standard a level names, as the report and the `X-Formfeed-PDF-A` header write it. */
|
|
23
|
+
export declare const PDFA_STANDARDS: {
|
|
24
|
+
readonly '2b': "PDF/A-2b";
|
|
25
|
+
readonly '3b': "PDF/A-3b";
|
|
26
|
+
};
|
|
27
|
+
export type PdfaStandard = (typeof PDFA_STANDARDS)[PdfaLevel];
|
|
28
|
+
/** `pdf.pdfa` as a template's settings or a request write it. */
|
|
29
|
+
export type PdfaSetting = PdfaLevel | boolean | null;
|
|
30
|
+
/**
|
|
31
|
+
* `pdf.pdfa` as a render takes it: a level, `true` for the default level, and anything else off.
|
|
32
|
+
* There is no check to choose (plan 26, decision 2): a file that fails PDF/A fails the render.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolvePdfa(setting: unknown): PdfaLevel | null;
|
|
35
|
+
/** Whether a `pdf.pdfa` value is one the API takes: a level, a boolean, or null. */
|
|
36
|
+
export declare function isPdfaSetting(value: unknown): value is PdfaSetting;
|
|
37
|
+
export declare function pdfaStandard(level: PdfaLevel): PdfaStandard;
|
|
38
|
+
/**
|
|
39
|
+
* What `pdf.pdfa` cannot go with, in the words every place that refuses it uses (the gateway before
|
|
40
|
+
* a render costs anything, the worker for whoever calls it directly, `formfeed validate`, the API's
|
|
41
|
+
* template validation). A merge, a watermark and Word and PowerPoint templates go with it, since all
|
|
42
|
+
* of them come before the conversion.
|
|
43
|
+
*/
|
|
44
|
+
export declare const PDFA_REFUSALS: {
|
|
45
|
+
readonly password: "pdf.pdfa cannot be combined with post.password: PDF/A does not allow encryption";
|
|
46
|
+
readonly einvoice: "pdf.pdfa \"2b\" cannot be combined with an e-invoice: the invoice XML is an attachment, which PDF/A-2 does not allow. An e-invoice is a PDF/A-3b already; ask for \"3b\" or leave pdf.pdfa out";
|
|
47
|
+
readonly invalid: "settings.pdf.pdfa is \"2b\", \"3b\", true, false or null";
|
|
48
|
+
};
|
|
49
|
+
/** How many findings a render keeps; a render row travels in every list and webhook. */
|
|
50
|
+
export declare const PDFA_MAX_MESSAGES = 50;
|
|
51
|
+
/** One rule of PDF/A the file failed, as the validator reports it. */
|
|
52
|
+
export interface PdfaMessage {
|
|
53
|
+
severity: 'error' | 'warning';
|
|
54
|
+
/** A clause of ISO 19005 and veraPDF's test number, `6.2.11.4.1-1`. */
|
|
55
|
+
rule: string | null;
|
|
56
|
+
message: string;
|
|
57
|
+
/** veraPDF's path to the object of the PDF. */
|
|
58
|
+
location: string | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* `pdfa` on a render (plan 26): `null` unless the render asked for PDF/A or is an e-invoice with
|
|
62
|
+
* `pdf.pdfa` beside it. `conformant` is the validator's word on the file it judged; a render that
|
|
63
|
+
* succeeded delivered exactly that file, and one that failed delivered nothing.
|
|
64
|
+
*/
|
|
65
|
+
export interface PdfaResult {
|
|
66
|
+
standard: PdfaStandard;
|
|
67
|
+
conformant: boolean;
|
|
68
|
+
/** The validator and its version: its rule set moves between releases. */
|
|
69
|
+
validator: string;
|
|
70
|
+
/** The validator's own id for this report, which its log names too. */
|
|
71
|
+
id: string;
|
|
72
|
+
/** The versions of what converted and judged the file: `verapdf`, `pdfbox` (and `mustang` for an e-invoice). */
|
|
73
|
+
versions: Record<string, string>;
|
|
74
|
+
/** SHA-256 of the PDF that was judged: the delivered file when the render succeeded. */
|
|
75
|
+
pdf_sha256: string | null;
|
|
76
|
+
messages: PdfaMessage[];
|
|
77
|
+
/** More findings than the render keeps. */
|
|
78
|
+
truncated?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/** The sidecar's report of `POST /pdf/pdfa` (`ArchiveReport` in `apps/conformance`). */
|
|
81
|
+
export interface PdfaValidatorReport {
|
|
82
|
+
id: string;
|
|
83
|
+
valid: boolean;
|
|
84
|
+
pdfa: string;
|
|
85
|
+
validator: string;
|
|
86
|
+
messages: Array<{
|
|
87
|
+
severity?: string;
|
|
88
|
+
rule?: string | null;
|
|
89
|
+
message?: string;
|
|
90
|
+
location?: string | null;
|
|
91
|
+
}>;
|
|
92
|
+
truncated?: boolean;
|
|
93
|
+
versions?: Record<string, string>;
|
|
94
|
+
}
|
|
95
|
+
/** The report a render keeps, from the sidecar's, with the hash of the file it judged. */
|
|
96
|
+
export declare function pdfaResult(level: PdfaLevel, report: PdfaValidatorReport, pdfSha256: string | null): PdfaResult;
|
|
97
|
+
/**
|
|
98
|
+
* The `pdfa` block of an e-invoice that asked for PDF/A too (plan 26, decision 8): an e-invoice is
|
|
99
|
+
* a PDF/A-3b, converted and judged once, so the block is made from the e-invoice's own validation
|
|
100
|
+
* and its PDF findings. Null while that validation ended at the XML, before there was a file.
|
|
101
|
+
*/
|
|
102
|
+
export declare function pdfaFromEinvoice(validation: EinvoiceValidation | null | undefined): PdfaResult | null;
|
|
103
|
+
/** Whether a stored value is a report: the API shows it, and null otherwise. */
|
|
104
|
+
export declare function isPdfaResult(value: unknown): value is PdfaResult;
|
|
105
|
+
/** How long the report may be as a header value: proxies refuse a response whose headers grow past a few kilobytes. */
|
|
106
|
+
export declare const PDFA_HEADER_LENGTH = 2000;
|
|
107
|
+
/**
|
|
108
|
+
* The report as the worker's binary answer carries it in `x-formfeed-pdfa`, percent-encoded: the
|
|
109
|
+
* gateway records it with the render and `preview-render` shows it. A file that was delivered
|
|
110
|
+
* passed, so its report is short; one that is too long anyway loses its findings and says so.
|
|
111
|
+
*/
|
|
112
|
+
export declare function pdfaHeaderValue(result: PdfaResult, limit?: number): string;
|