UNPKG

@digasystems/ipp-browser

Version:

ipp-browser is a powerful library that brings the power of Internet Printing Protocol (IPP) directly into the browser. With this library, you can easily integrate printing to IPP-compatible network devices directly from your web applications without havin

6 lines 109 kB
(function(re,V){typeof exports=="object"&&typeof module<"u"?V(exports):typeof define=="function"&&define.amd?define(["exports"],V):(re=typeof globalThis<"u"?globalThis:re||self,V(re["@digasystems/ipp-browser"]={}))})(this,function(re){"use strict";var Nt=Object.defineProperty;var Pt=(re,V,pe)=>V in re?Nt(re,V,{enumerable:!0,configurable:!0,writable:!0,value:pe}):re[V]=pe;var Be=(re,V,pe)=>(Pt(re,typeof V!="symbol"?V+"":V,pe),pe);var V={},pe={};pe.byteLength=ut,pe.toByteArray=pt,pe.fromByteArray=mt;for(var le=[],oe=[],at=typeof Uint8Array<"u"?Uint8Array:Array,Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e=0,st=Ce.length;_e<st;++_e)le[_e]=Ce[_e],oe[Ce.charCodeAt(_e)]=_e;oe["-".charCodeAt(0)]=62,oe["_".charCodeAt(0)]=63;function Ge(c){var m=c.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var x=h===m?0:4-h%4;return[h,x]}function ut(c){var m=Ge(c),h=m[0],x=m[1];return(h+x)*3/4-x}function ct(c,m,h){return(m+h)*3/4-h}function pt(c){var m,h=Ge(c),x=h[0],w=h[1],j=new at(ct(c,x,w)),_=0,u=w>0?x-4:x,C;for(C=0;C<u;C+=4)m=oe[c.charCodeAt(C)]<<18|oe[c.charCodeAt(C+1)]<<12|oe[c.charCodeAt(C+2)]<<6|oe[c.charCodeAt(C+3)],j[_++]=m>>16&255,j[_++]=m>>8&255,j[_++]=m&255;return w===2&&(m=oe[c.charCodeAt(C)]<<2|oe[c.charCodeAt(C+1)]>>4,j[_++]=m&255),w===1&&(m=oe[c.charCodeAt(C)]<<10|oe[c.charCodeAt(C+1)]<<4|oe[c.charCodeAt(C+2)]>>2,j[_++]=m>>8&255,j[_++]=m&255),j}function lt(c){return le[c>>18&63]+le[c>>12&63]+le[c>>6&63]+le[c&63]}function dt(c,m,h){for(var x,w=[],j=m;j<h;j+=3)x=(c[j]<<16&16711680)+(c[j+1]<<8&65280)+(c[j+2]&255),w.push(lt(x));return w.join("")}function mt(c){for(var m,h=c.length,x=h%3,w=[],j=16383,_=0,u=h-x;_<u;_+=j)w.push(dt(c,_,_+j>u?u:_+j));return x===1?(m=c[h-1],w.push(le[m>>2]+le[m<<4&63]+"==")):x===2&&(m=(c[h-2]<<8)+c[h-1],w.push(le[m>>10]+le[m>>4&63]+le[m<<2&63]+"=")),w.join("")}var Re={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Re.read=function(c,m,h,x,w){var j,_,u=w*8-x-1,C=(1<<u)-1,Q=C>>1,G=-7,M=h?w-1:0,ie=h?-1:1,W=c[m+M];for(M+=ie,j=W&(1<<-G)-1,W>>=-G,G+=u;G>0;j=j*256+c[m+M],M+=ie,G-=8);for(_=j&(1<<-G)-1,j>>=-G,G+=x;G>0;_=_*256+c[m+M],M+=ie,G-=8);if(j===0)j=1-Q;else{if(j===C)return _?NaN:(W?-1:1)*(1/0);_=_+Math.pow(2,x),j=j-Q}return(W?-1:1)*_*Math.pow(2,j-x)},Re.write=function(c,m,h,x,w,j){var _,u,C,Q=j*8-w-1,G=(1<<Q)-1,M=G>>1,ie=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,W=x?0:j-1,fe=x?1:-1,ce=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(u=isNaN(m)?1:0,_=G):(_=Math.floor(Math.log(m)/Math.LN2),m*(C=Math.pow(2,-_))<1&&(_--,C*=2),_+M>=1?m+=ie/C:m+=ie*Math.pow(2,1-M),m*C>=2&&(_++,C/=2),_+M>=G?(u=0,_=G):_+M>=1?(u=(m*C-1)*Math.pow(2,w),_=_+M):(u=m*Math.pow(2,M-1)*Math.pow(2,w),_=0));w>=8;c[h+W]=u&255,W+=fe,u/=256,w-=8);for(_=_<<w|u,Q+=w;Q>0;c[h+W]=_&255,W+=fe,_/=256,Q-=8);c[h+W-fe]|=ce*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */(function(c){const m=pe,h=Re,x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;c.Buffer=u,c.SlowBuffer=y,c.INSPECT_MAX_BYTES=50;const w=2147483647;c.kMaxLength=w,u.TYPED_ARRAY_SUPPORT=j(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function j(){try{const r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function _(r){if(r>w)throw new RangeError('The value "'+r+'" is invalid for option "size"');const e=new Uint8Array(r);return Object.setPrototypeOf(e,u.prototype),e}function u(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return M(r)}return C(r,e,t)}u.poolSize=8192;function C(r,e,t){if(typeof r=="string")return ie(r,e);if(ArrayBuffer.isView(r))return fe(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(be(r,ArrayBuffer)||r&&be(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(be(r,SharedArrayBuffer)||r&&be(r.buffer,SharedArrayBuffer)))return ce(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return u.from(i,e,t);const s=he(r);if(s)return s;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return u.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}u.from=function(r,e,t){return C(r,e,t)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function Q(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function G(r,e,t){return Q(r),r<=0?_(r):e!==void 0?typeof t=="string"?_(r).fill(e,t):_(r).fill(e):_(r)}u.alloc=function(r,e,t){return G(r,e,t)};function M(r){return Q(r),_(r<0?0:F(r)|0)}u.allocUnsafe=function(r){return M(r)},u.allocUnsafeSlow=function(r){return M(r)};function ie(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=k(r,e)|0;let i=_(t);const s=i.write(r,e);return s!==t&&(i=i.slice(0,s)),i}function W(r){const e=r.length<0?0:F(r.length)|0,t=_(e);for(let i=0;i<e;i+=1)t[i]=r[i]&255;return t}function fe(r){if(be(r,Uint8Array)){const e=new Uint8Array(r);return ce(e.buffer,e.byteOffset,e.byteLength)}return W(r)}function ce(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&t===void 0?i=new Uint8Array(r):t===void 0?i=new Uint8Array(r,e):i=new Uint8Array(r,e,t),Object.setPrototypeOf(i,u.prototype),i}function he(r){if(u.isBuffer(r)){const e=F(r.length)|0,t=_(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||$e(r.length)?_(0):W(r);if(r.type==="Buffer"&&Array.isArray(r.data))return W(r.data)}function F(r){if(r>=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return r|0}function y(r){return+r!=r&&(r=0),u.alloc(+r)}u.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==u.prototype},u.compare=function(e,t){if(be(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),be(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,s=t.length;for(let l=0,f=Math.min(i,s);l<f;++l)if(e[l]!==t[l]){i=e[l],s=t[l];break}return i<s?-1:s<i?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return u.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const s=u.allocUnsafe(t);let l=0;for(i=0;i<e.length;++i){let f=e[i];if(be(f,Uint8Array))l+f.length>s.length?(u.isBuffer(f)||(f=u.from(f)),f.copy(s,l)):Uint8Array.prototype.set.call(s,f,l);else if(u.isBuffer(f))f.copy(s,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=f.length}return s};function k(r,e){if(u.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||be(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const t=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let s=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return ze(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return nt(r).length;default:if(s)return i?-1:ze(r).length;e=(""+e).toLowerCase(),s=!0}}u.byteLength=k;function T(r,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Ut(this,e,t);case"utf8":case"utf-8":return Xe(this,e,t);case"ascii":return At(this,e,t);case"latin1":case"binary":return Ft(this,e,t);case"base64":return It(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return St(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}u.prototype._isBuffer=!0;function q(r,e,t){const i=r[e];r[e]=r[t],r[t]=i}u.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)q(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)q(this,t,t+3),q(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)q(this,t,t+7),q(this,t+1,t+6),q(this,t+2,t+5),q(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?Xe(this,0,e):T.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:u.compare(this,e)===0},u.prototype.inspect=function(){let e="";const t=c.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},x&&(u.prototype[x]=u.prototype.inspect),u.prototype.compare=function(e,t,i,s,l){if(be(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),s===void 0&&(s=0),l===void 0&&(l=this.length),t<0||i>e.length||s<0||l>this.length)throw new RangeError("out of range index");if(s>=l&&t>=i)return 0;if(s>=l)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,s>>>=0,l>>>=0,this===e)return 0;let f=l-s,S=i-t;const z=Math.min(f,S),N=this.slice(s,l),$=e.slice(t,i);for(let L=0;L<z;++L)if(N[L]!==$[L]){f=N[L],S=$[L];break}return f<S?-1:S<f?1:0};function H(r,e,t,i,s){if(r.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,$e(t)&&(t=s?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(s)return-1;t=r.length-1}else if(t<0)if(s)t=0;else return-1;if(typeof e=="string"&&(e=u.from(e,i)),u.isBuffer(e))return e.length===0?-1:ee(r,e,t,i,s);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?s?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):ee(r,[e],t,i,s);throw new TypeError("val must be string, number or Buffer")}function ee(r,e,t,i,s){let l=1,f=r.length,S=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return-1;l=2,f/=2,S/=2,t/=2}function z($,L){return l===1?$[L]:$.readUInt16BE(L*l)}let N;if(s){let $=-1;for(N=t;N<f;N++)if(z(r,N)===z(e,$===-1?0:N-$)){if($===-1&&($=N),N-$+1===S)return $*l}else $!==-1&&(N-=N-$),$=-1}else for(t+S>f&&(t=f-S),N=t;N>=0;N--){let $=!0;for(let L=0;L<S;L++)if(z(r,N+L)!==z(e,L)){$=!1;break}if($)return N}return-1}u.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},u.prototype.indexOf=function(e,t,i){return H(this,e,t,i,!0)},u.prototype.lastIndexOf=function(e,t,i){return H(this,e,t,i,!1)};function ge(r,e,t,i){t=Number(t)||0;const s=r.length-t;i?(i=Number(i),i>s&&(i=s)):i=s;const l=e.length;i>l/2&&(i=l/2);let f;for(f=0;f<i;++f){const S=parseInt(e.substr(f*2,2),16);if($e(S))return f;r[t+f]=S}return f}function Pe(r,e,t,i){return Je(ze(e,r.length-t),r,t,i)}function Se(r,e,t,i){return Je(qt(e),r,t,i)}function Ie(r,e,t,i){return Je(nt(e),r,t,i)}function Et(r,e,t,i){return Je(Dt(e,r.length-t),r,t,i)}u.prototype.write=function(e,t,i,s){if(t===void 0)s="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")s=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,s===void 0&&(s="utf8")):(s=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const l=this.length-t;if((i===void 0||i>l)&&(i=l),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let f=!1;for(;;)switch(s){case"hex":return ge(this,e,t,i);case"utf8":case"utf-8":return Pe(this,e,t,i);case"ascii":case"latin1":case"binary":return Se(this,e,t,i);case"base64":return Ie(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et(this,e,t,i);default:if(f)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),f=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function It(r,e,t){return e===0&&t===r.length?m.fromByteArray(r):m.fromByteArray(r.slice(e,t))}function Xe(r,e,t){t=Math.min(r.length,t);const i=[];let s=e;for(;s<t;){const l=r[s];let f=null,S=l>239?4:l>223?3:l>191?2:1;if(s+S<=t){let z,N,$,L;switch(S){case 1:l<128&&(f=l);break;case 2:z=r[s+1],(z&192)===128&&(L=(l&31)<<6|z&63,L>127&&(f=L));break;case 3:z=r[s+1],N=r[s+2],(z&192)===128&&(N&192)===128&&(L=(l&15)<<12|(z&63)<<6|N&63,L>2047&&(L<55296||L>57343)&&(f=L));break;case 4:z=r[s+1],N=r[s+2],$=r[s+3],(z&192)===128&&(N&192)===128&&($&192)===128&&(L=(l&15)<<18|(z&63)<<12|(N&63)<<6|$&63,L>65535&&L<1114112&&(f=L))}}f===null?(f=65533,S=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|f&1023),i.push(f),s+=S}return Tt(i)}const Ke=4096;function Tt(r){const e=r.length;if(e<=Ke)return String.fromCharCode.apply(String,r);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=Ke));return t}function At(r,e,t){let i="";t=Math.min(r.length,t);for(let s=e;s<t;++s)i+=String.fromCharCode(r[s]&127);return i}function Ft(r,e,t){let i="";t=Math.min(r.length,t);for(let s=e;s<t;++s)i+=String.fromCharCode(r[s]);return i}function Ut(r,e,t){const i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let s="";for(let l=e;l<t;++l)s+=Lt[r[l]];return s}function St(r,e,t){const i=r.slice(e,t);let s="";for(let l=0;l<i.length-1;l+=2)s+=String.fromCharCode(i[l]+i[l+1]*256);return s}u.prototype.slice=function(e,t){const i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);const s=this.subarray(e,t);return Object.setPrototypeOf(s,u.prototype),s};function X(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||X(e,t,this.length);let s=this[e],l=1,f=0;for(;++f<t&&(l*=256);)s+=this[e+f]*l;return s},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||X(e,t,this.length);let s=this[e+--t],l=1;for(;t>0&&(l*=256);)s+=this[e+--t]*l;return s},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e=e>>>0,t||X(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||X(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||X(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||X(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||X(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=xe(function(e){e=e>>>0,ke(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Te(e,this.length-8);const s=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,l=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(s)+(BigInt(l)<<BigInt(32))}),u.prototype.readBigUInt64BE=xe(function(e){e=e>>>0,ke(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Te(e,this.length-8);const s=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],l=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(s)<<BigInt(32))+BigInt(l)}),u.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||X(e,t,this.length);let s=this[e],l=1,f=0;for(;++f<t&&(l*=256);)s+=this[e+f]*l;return l*=128,s>=l&&(s-=Math.pow(2,8*t)),s},u.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||X(e,t,this.length);let s=t,l=1,f=this[e+--s];for(;s>0&&(l*=256);)f+=this[e+--s]*l;return l*=128,f>=l&&(f-=Math.pow(2,8*t)),f},u.prototype.readInt8=function(e,t){return e=e>>>0,t||X(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},u.prototype.readInt16LE=function(e,t){e=e>>>0,t||X(e,2,this.length);const i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},u.prototype.readInt16BE=function(e,t){e=e>>>0,t||X(e,2,this.length);const i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},u.prototype.readInt32LE=function(e,t){return e=e>>>0,t||X(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e=e>>>0,t||X(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=xe(function(e){e=e>>>0,ke(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Te(e,this.length-8);const s=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(s)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),u.prototype.readBigInt64BE=xe(function(e){e=e>>>0,ke(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Te(e,this.length-8);const s=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(s)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),u.prototype.readFloatLE=function(e,t){return e=e>>>0,t||X(e,4,this.length),h.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e=e>>>0,t||X(e,4,this.length),h.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||X(e,8,this.length),h.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||X(e,8,this.length),h.read(this,e,!1,52,8)};function te(r,e,t,i,s,l){if(!u.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||e<l)throw new RangeError('"value" argument is out of bounds');if(t+i>r.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,i,s){if(e=+e,t=t>>>0,i=i>>>0,!s){const S=Math.pow(2,8*i)-1;te(this,e,t,i,S,0)}let l=1,f=0;for(this[t]=e&255;++f<i&&(l*=256);)this[t+f]=e/l&255;return t+i},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,i,s){if(e=+e,t=t>>>0,i=i>>>0,!s){const S=Math.pow(2,8*i)-1;te(this,e,t,i,S,0)}let l=i-1,f=1;for(this[t+l]=e&255;--l>=0&&(f*=256);)this[t+l]=e/f&255;return t+i},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,1,255,0),this[t]=e&255,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Ze(r,e,t,i,s){ot(e,i,s,r,t,7);let l=Number(e&BigInt(4294967295));r[t++]=l,l=l>>8,r[t++]=l,l=l>>8,r[t++]=l,l=l>>8,r[t++]=l;let f=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=f,f=f>>8,r[t++]=f,f=f>>8,r[t++]=f,f=f>>8,r[t++]=f,t}function Qe(r,e,t,i,s){ot(e,i,s,r,t,7);let l=Number(e&BigInt(4294967295));r[t+7]=l,l=l>>8,r[t+6]=l,l=l>>8,r[t+5]=l,l=l>>8,r[t+4]=l;let f=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=f,f=f>>8,r[t+2]=f,f=f>>8,r[t+1]=f,f=f>>8,r[t]=f,t+8}u.prototype.writeBigUInt64LE=xe(function(e,t=0){return Ze(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=xe(function(e,t=0){return Qe(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,i,s){if(e=+e,t=t>>>0,!s){const z=Math.pow(2,8*i-1);te(this,e,t,i,z-1,-z)}let l=0,f=1,S=0;for(this[t]=e&255;++l<i&&(f*=256);)e<0&&S===0&&this[t+l-1]!==0&&(S=1),this[t+l]=(e/f>>0)-S&255;return t+i},u.prototype.writeIntBE=function(e,t,i,s){if(e=+e,t=t>>>0,!s){const z=Math.pow(2,8*i-1);te(this,e,t,i,z-1,-z)}let l=i-1,f=1,S=0;for(this[t+l]=e&255;--l>=0&&(f*=256);)e<0&&S===0&&this[t+l+1]!==0&&(S=1),this[t+l]=(e/f>>0)-S&255;return t+i},u.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},u.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},u.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||te(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},u.prototype.writeBigInt64LE=xe(function(e,t=0){return Ze(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=xe(function(e,t=0){return Qe(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function et(r,e,t,i,s,l){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function tt(r,e,t,i,s){return e=+e,t=t>>>0,s||et(r,e,t,4),h.write(r,e,t,i,23,4),t+4}u.prototype.writeFloatLE=function(e,t,i){return tt(this,e,t,!0,i)},u.prototype.writeFloatBE=function(e,t,i){return tt(this,e,t,!1,i)};function rt(r,e,t,i,s){return e=+e,t=t>>>0,s||et(r,e,t,8),h.write(r,e,t,i,52,8),t+8}u.prototype.writeDoubleLE=function(e,t,i){return rt(this,e,t,!0,i)},u.prototype.writeDoubleBE=function(e,t,i){return rt(this,e,t,!1,i)},u.prototype.copy=function(e,t,i,s){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!s&&s!==0&&(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<i&&(s=i),s===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-i&&(s=e.length-t+i);const l=s-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,s):Uint8Array.prototype.set.call(e,this.subarray(i,s),t),l},u.prototype.fill=function(e,t,i,s){if(typeof e=="string"){if(typeof t=="string"?(s=t,t=0,i=this.length):typeof i=="string"&&(s=i,i=this.length),s!==void 0&&typeof s!="string")throw new TypeError("encoding must be a string");if(typeof s=="string"&&!u.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(e.length===1){const f=e.charCodeAt(0);(s==="utf8"&&f<128||s==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let l;if(typeof e=="number")for(l=t;l<i;++l)this[l]=e;else{const f=u.isBuffer(e)?e:u.from(e,s),S=f.length;if(S===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(l=0;l<i-t;++l)this[l+t]=f[l%S]}return this};const je={};function Oe(r,e,t){je[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(s){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}Oe("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Oe("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),Oe("ERR_OUT_OF_RANGE",function(r,e,t){let i=`The value of "${r}" is out of range.`,s=t;return Number.isInteger(t)&&Math.abs(t)>2**32?s=it(String(t)):typeof t=="bigint"&&(s=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(s=it(s)),s+="n"),i+=` It must be ${e}. Received ${s}`,i},RangeError);function it(r){let e="",t=r.length;const i=r[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function Jt(r,e,t){ke(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&Te(e,r.length-(t+1))}function ot(r,e,t,i,s,l){if(r>t||r<e){const f=typeof e=="bigint"?"n":"";let S;throw l>3?e===0||e===BigInt(0)?S=`>= 0${f} and < 2${f} ** ${(l+1)*8}${f}`:S=`>= -(2${f} ** ${(l+1)*8-1}${f}) and < 2 ** ${(l+1)*8-1}${f}`:S=`>= ${e}${f} and <= ${t}${f}`,new je.ERR_OUT_OF_RANGE("value",S,r)}Jt(i,s,l)}function ke(r,e){if(typeof r!="number")throw new je.ERR_INVALID_ARG_TYPE(e,"number",r)}function Te(r,e,t){throw Math.floor(r)!==r?(ke(r,t),new je.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new je.ERR_BUFFER_OUT_OF_BOUNDS:new je.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}const Ct=/[^+/0-9A-Za-z-_]/g;function Rt(r){if(r=r.split("=")[0],r=r.trim().replace(Ct,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ze(r,e){e=e||1/0;let t;const i=r.length;let s=null;const l=[];for(let f=0;f<i;++f){if(t=r.charCodeAt(f),t>55295&&t<57344){if(!s){if(t>56319){(e-=3)>-1&&l.push(239,191,189);continue}else if(f+1===i){(e-=3)>-1&&l.push(239,191,189);continue}s=t;continue}if(t<56320){(e-=3)>-1&&l.push(239,191,189),s=t;continue}t=(s-55296<<10|t-56320)+65536}else s&&(e-=3)>-1&&l.push(239,191,189);if(s=null,t<128){if((e-=1)<0)break;l.push(t)}else if(t<2048){if((e-=2)<0)break;l.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;l.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;l.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return l}function qt(r){const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function Dt(r,e){let t,i,s;const l=[];for(let f=0;f<r.length&&!((e-=2)<0);++f)t=r.charCodeAt(f),i=t>>8,s=t%256,l.push(s),l.push(i);return l}function nt(r){return m.toByteArray(Rt(r))}function Je(r,e,t,i){let s;for(s=0;s<i&&!(s+t>=e.length||s>=r.length);++s)e[s+t]=r[s];return s}function be(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function $e(r){return r!==r}const Lt=function(){const r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let s=0;s<16;++s)e[i+s]=r[t]+r[s]}return e}();function xe(r){return typeof BigInt>"u"?Mt:r}function Mt(){throw new Error("BigInt not supported")}})(V);function ae(c){let m={};return c.forEach(function(h,x){m[h]=x}),m.lookup=c,m}function We(c,m){for(let h in m)m[h]&&m[h].constructor===Object?(c[h]=c[h]||{},We(c[h],m[h])):c[h]=m[h];return c}let P={"document-state":ae([,,,"pending",,"processing",,"canceled","aborted","completed"]),finishings:ae([,,,"none","staple","punch","cover","bind","saddle-stitch","edge-stitch","fold","trim","bale","booklet-maker","jog-offset",,,,,,"staple-top-left","staple-bottom-left","staple-top-right","staple-bottom-right","edge-stitch-left","edge-stitch-top","edge-stitch-right","edge-stitch-bottom","staple-dual-left","staple-dual-top","staple-dual-right","staple-dual-bottom",,,,,,,,,,,,,,,,,,,"bind-left","bind-top","bind-right","bind-bottom",,,,,,,"trim-after-pages","trim-after-documents","trim-after-copies","trim-after-job"]),"operations-supported":ae([,,"Print-Job","Print-URI","Validate-Job","Create-Job","Send-Document","Send-URI","Cancel-Job","Get-Job-Attributes","Get-Jobs","Get-Printer-Attributes","Hold-Job","Release-Job","Restart-Job",,"Pause-Printer","Resume-Printer","Purge-Jobs","Set-Printer-Attributes","Set-Job-Attributes","Get-Printer-Supported-Values","Create-Printer-Subscriptions","Create-Job-Subscription","Get-Subscription-Attributes","Get-Subscriptions","Renew-Subscription","Cancel-Subscription","Get-Notifications","ipp-indp-method","Get-Resource-Attributes","Get-Resource-Data","Get-Resources","ipp-install","Enable-Printer","Disable-Printer","Pause-Printer-After-Current-Job","Hold-New-Jobs","Release-Held-New-Jobs","Deactivate-Printer","Activate-Printer","Restart-Printer","Shutdown-Printer","Startup-Printer","Reprocess-Job","Cancel-Current-Job","Suspend-Current-Job","Resume-Job","Promote-Job","Schedule-Job-After",,"Cancel-Document","Get-Document-Attributes","Get-Documents","Delete-Document","Set-Document-Attributes","Cancel-Jobs","Cancel-My-Jobs","Resubmit-Job","Close-Job","Identify-Printer","Validate-Document"]),"job-collation-type":ae(["other","unknown","uncollated-documents","collated-documents","uncollated-documents"]),"job-state":ae([,,,"pending","pending-held","processing","processing-stopped","canceled","aborted","completed"]),"orientation-requested":ae([,,,"portrait","landscape","reverse-landscape","reverse-portrait","none"]),"print-quality":ae([,,,"draft","normal","high"]),"printer-state":ae([,,,"idle","processing","stopped"])};P["finishings-default"]=P.finishings,P["finishings-ready"]=P.finishings,P["finishings-supported"]=P.finishings,P["media-source-feed-orientation"]=P["orientation-requested"],P["orientation-requested-default"]=P["orientation-requested"],P["orientation-requested-supported"]=P["orientation-requested"],P["print-quality-default"]=P["print-quality"],P["print-quality-supported"]=P["print-quality"];let E=[];E[0]="successful-ok",E[1]="successful-ok-ignored-or-substituted-attributes",E[2]="successful-ok-conflicting-attributes",E[3]="successful-ok-ignored-subscriptions",E[4]="successful-ok-ignored-notifications",E[5]="successful-ok-too-many-events",E[6]="successful-ok-but-cancel-subscription",E[7]="successful-ok-events-complete",E[1024]="client-error-bad-request",E[1025]="client-error-forbidden",E[1026]="client-error-not-authenticated",E[1027]="client-error-not-authorized",E[1028]="client-error-not-possible",E[1029]="client-error-timeout",E[1030]="client-error-not-found",E[1031]="client-error-gone",E[1032]="client-error-request-entity-too-large",E[1033]="client-error-request-value-too-long",E[1034]="client-error-document-format-not-supported",E[1035]="client-error-attributes-or-values-not-supported",E[1036]="client-error-uri-scheme-not-supported",E[1037]="client-error-charset-not-supported",E[1038]="client-error-conflicting-attributes",E[1039]="client-error-compression-not-supported",E[1040]="client-error-compression-error",E[1041]="client-error-document-format-error",E[1042]="client-error-document-access-error",E[1043]="client-error-attributes-not-settable",E[1044]="client-error-ignored-all-subscriptions",E[1045]="client-error-too-many-subscriptions",E[1046]="client-error-ignored-all-notifications",E[1047]="client-error-client-print-support-file-not-found",E[1048]="client-error-document-password-error",E[1049]="client-error-document-permission-error",E[1050]="client-error-document-security-error",E[1051]="client-error-document-unprintable-error",E[1280]="server-error-internal-error",E[1281]="server-error-operation-not-supported",E[1282]="server-error-service-unavailable",E[1283]="server-error-version-not-supported",E[1284]="server-error-device-error",E[1285]="server-error-temporary-error",E[1286]="server-error-not-accepting-jobs",E[1287]="server-error-busy",E[1288]="server-error-job-canceled",E[1289]="server-error-multiple-document-jobs-not-supported",E[1290]="server-error-printer-is-deactivated",E[1291]="server-error-too-many-jobs",E[1292]="server-error-too-many-documents";const Ve=ae(E);let He=[,"operation-attributes-tag","job-attributes-tag","end-of-attributes-tag","printer-attributes-tag","unsupported-attributes-tag","subscription-attributes-tag","event-notification-attributes-tag","resource-attributes-tag","document-attributes-tag",,,,,,,"unsupported","default","unknown","no-value",,"not-settable","delete-attribute","admin-define",,,,,,,,,,"integer","boolean","enum",,,,,,,,,,,,,"octetString","dateTime","resolution","rangeOfInteger","begCollection","textWithLanguage","nameWithLanguage","endCollection",,,,,,,,,,"textWithoutLanguage","nameWithoutLanguage",,"keyword","uri","uriScheme","charset","naturalLanguage","mimeMediaType","memberAttrName"];He[127]="extension";const v=ae(He);let ft=P["operations-supported"],ht="";function bt(c){let m={},h=0,x="utf8";function w(){return c[h++]}function j(){let F=c.readInt16BE(h,!0);return h+=2,F}function _(){let F=c.readInt32BE(h,!0);return h+=4,F}function u(F,y){return F==0?"":c.toString(y||x,h,h+=F)}function C(){let F;for(;h<c.length&&(F=w())!==3;)Q(F)}function Q(F){let y=v.lookup[F];for(F={},m[y]?(Array.isArray(m[y])||(m[y]=[m[y]]),m[y].push(F)):m[y]=F;c[h]>=15;)G(F)}function G(F){let y=w();y===127&&(y=_());let k=u(j());F[k]=ie(y,k)}function M(){let F=c[h];return F!==74&&F!==55&&F!==3&&c[h+1]===0&&c[h+2]===0}function ie(F,y){let k=W(F,y);if(M()){k=[k];do F=w(),j(),k.push(W(F,y));while(M())}return k}function W(F,y){let k=j();switch(F){case v.enum:let T=_();return P[y]&&P[y].lookup[T]||T;case v.integer:return _();case v.boolean:return!!w();case v.rangeOfInteger:return[_(),_()];case v.resolution:return[_(),_(),w()===3?"dpi":"dpcm"];case v.dateTime:let q=new Date(j(),w(),w(),w(),w(),w(),w());return new Date(q.toISOString().substr(0,23).replace("T",",")+","+String.fromCharCode(u(1))+u(1)+":"+u(1));case v.textWithLanguage:case v.nameWithLanguage:let H=u(j()),ee=u(j());return H+ht+ee;case v.nameWithoutLanguage:case v.textWithoutLanguage:case v.octetString:case v.memberAttrName:return u(k);case v.keyword:case v.uri:case v.uriScheme:case v.charset:case v.naturalLanguage:case v.mimeMediaType:return u(k,"ascii");case v.begCollection:return u(k),fe();case v["no-value"]:}}function fe(){let F,y={};for(;(F=w())!==55;){if(F!==74){console.log("unexpected:",v.lookup[F]);return}u(j());let k=W(74),T=ce();y[k]=T}return u(j()),u(j()),y}function ce(F){let y=w();return y===127&&(y=_()),u(j()),ie(y,F)}m.version=w()+"."+w();let he=j();return(he>=2||he<=61)&&(m.operation=ft.lookup[he]),(he<=7||he>=1024)&&(m.statusCode=Ve.lookup[he]),m.id=_(),C(),h<c.length&&(m.data=c.toString(x,h)),m}function gt(c){const m=bt(V.Buffer.from(c.data));return delete m.operation,m}function I(c){return c||(c=1023),{type:"text",max:c}}function p(c,m){return(m==d||m===void 0)&&(m=2147483647),c===void 0&&(c=-2147483648),{type:"integer",tag:v.integer,min:c,max:m}}function J(c,m){return(m==d||m===void 0)&&(m=2147483647),c===void 0&&(c=-2147483648),{type:"rangeOfInteger",tag:v.rangeOfInteger,min:c,max:m}}function O(){return{type:"boolean",tag:v.boolean}}function se(){return{type:"charset",tag:v.charset,max:63}}function n(){return{type:"keyword",tag:v.keyword,min:1,max:1023}}function ne(){return{type:"naturalLanguage",tag:v.naturalLanguage,max:63}}function ue(){return{type:"dateTime",tag:v.dateTime}}function de(){return{type:"mimeMediaType",tag:v.mimeMediaType,max:255}}function U(c){return{type:"uri",tag:v.uri,max:c||1023}}function qe(){return{type:"uriScheme",tag:v.uriScheme,max:63}}function R(){return{type:"enumeration",tag:v.enum}}function we(){return{type:"resolution",tag:v.resolution}}function yt(){return{type:"unknown",tag:v.unknown}}function ve(c){return{type:"name",max:c||1023}}function Y(){return{type:"novalue",tag:v["no-value"]}}function ye(c){return{type:"octetString",tag:v.octetString,max:c||1023}}function b(c,m,h){let x=Array.prototype.slice.call(arguments);x.lookup={};const w=Ae(function(){return x.forEach(function(j,_){var u;typeof j=="function"&&(x[_]=j()),x.lookup[(u=x[_])==null?void 0:u.type]=x[_]}),x.alts=Object.keys(x.lookup).sort().join(),x});return x.some(function(j){return Fe(j)})?w:w()}const Ae=function(c){return c.isDeferred=!0,c},Fe=function(c){return typeof c=="function"&&c.isDeferred};function o(c){return Fe(c)?Ae(function(){return c=c(),c.setof=!0,c}):(typeof c=="function"&&!Fe(c)&&(c=c()),c)}function g(c,m){if(!arguments.length)return{type:"collection",tag:v.begCollection};if(typeof c=="string")return Ae(function(){return{type:"collection",tag:v.begCollection,members:K[c][m].members}});let h=Object.keys(c).some(function(w){return Fe(c[w])});const x=Ae(function(){return{type:"collection",tag:v.begCollection,members:De(c)}});return h?x:x()}let d={},K={};K["Document Description"]={"attributes-charset":se,"attributes-natural-language":ne,compression:n,"copies-actual":o(p(1,d)),"cover-back-actual":o(g("Job Template","cover-back")),"cover-front-actual":o(g("Job Template","cover-front")),"current-page-order":n,"date-time-at-completed":b(ue,Y,null),"date-time-at-creation":ue,"date-time-at-processing":b(ue,Y,null),"detailed-status-messages":o(I),"document-access-errors":o(I),"document-charset":se,"document-digital-signature":n,"document-format":de,"document-format-details":o(g("Operation","document-format-details")),"document-format-details-detected":o(g("Operation","document-format-details")),"document-format-detected":de,"document-format-version":I(127),"document-format-version-detected":I(127),"document-job-id":p(1,d),"document-job-uri":U,"document-message":I,"document-metadata":o(ye),"document-name":name,"document-natural-language":ne,"document-number":p(1,d),"document-printer-uri":U,"document-state":R,"document-state-message":I,"document-state-reasons":o(n),"document-uri":U,"document-uuid":U(45),"errors-count":p(0,d),"finishings-actual":o(R),"finishings-col-actual":o(g("Job Template","finishings-col")),"force-front-side-actual":o(p(1,d)),"imposition-template-actual":o(b(n,name,null)),impressions:p(0,d),"impressions-completed":p(0,d),"impressions-completed-current-copy":p(0,d),"insert-sheet-actual":o(g("Job Template","insert-sheet")),"k-octets":p(0,d),"k-octets-processed":p(0,d),"last-document":O,"media-actual":o(b(n,name,null)),"media-col-actual":o(g("Job Template","media-col")),"media-input-tray-check-actual":o(b(n,name,null)),"media-sheets":p(0,d),"media-sheets-completed":p(0,d),"more-info":U,"number-up-actual":o(p),"orientation-requested-actual":o(R),"output-bin-actual":o(name),"output-device-assigned":ve(127),"overrides-actual":o(g("Document Template","overrides")),"page-delivery-actual":o(n),"page-order-received-actual":o(n),"page-ranges-actual":o(J(1,d)),pages:p(0,d),"pages-completed":p(0,d),"pages-completed-current-copy":p(0,d),"presentation-direction-number-up-actual":o(n),"print-content-optimize-actual":o(n),"print-quality-actual":o(R),"printer-resolution-actual":o(we),"printer-up-time":p(1,d),"separator-sheets-actual":o(g("Job Template","separator-sheets")),"sheet-completed-copy-number":p(0,d),"sides-actual":o(n),"time-at-completed":b(p,Y,null),"time-at-creation":p,"time-at-processing":b(p,Y,null),"x-image-position-actual":o(n),"x-image-shift-actual":o(p),"x-side1-image-shift-actual":o(p),"x-side2-image-shift-actual":o(p),"y-image-position-actual":o(n),"y-image-shift-actual":o(p),"y-side1-image-shift-actual":o(p),"y-side2-image-shift-actual":o(p)},K["Document Template"]={copies:p(1,d),"cover-back":g("Job Template","cover-back"),"cover-front":g("Job Template","cover-front"),"feed-orientation":n,finishings:o(R),"finishings-col":g("Job Template","finishings-col"),"font-name-requested":name,"font-size-requested":p(1,d),"force-front-side":o(p(1,d)),"imposition-template":b(n,name,null),"insert-sheet":o(g("Job Template","insert-sheet")),media:b(n,name,null),"media-col":g("Job Template","media-col"),"media-input-tray-check":b(n,name,null),"number-up":p(1,d),"orientation-requested":R,overrides:o(g({"document-copies":o(J),"document-numbers":o(J),pages:o(J)},null)),"page-delivery":n,"page-order-received":n,"page-ranges":o(J(1,d)),"pdl-init-file":o(g("Job Template","pdl-init-file")),"presentation-direction-number-up":n,"print-color-mode":n,"print-content-optimize":n,"print-quality":R,"print-rendering-intent":n,"printer-resolution":we,"separator-sheets":g("Job Template","separator-sheets"),"sheet-collate":n,sides:n,"x-image-position":n,"x-image-shift":p,"x-side1-image-shift":p,"x-side2-image-shift":p,"y-image-position":n,"y-image-shift":p,"y-side1-image-shift":p,"y-side2-image-shift":p},K["Event Notifications"]={"notify-subscribed-event":n,"notify-text":I},K["Job Description"]={"attributes-charset":se,"attributes-natural-language":ne,"compression-supplied":n,"copies-actual":o(p(1,d)),"cover-back-actual":o(g("Job Template","cover-back")),"cover-front-actual":o(g("Job Template","cover-front")),"current-page-order":n,"date-time-at-completed":b(ue,Y),"date-time-at-creation":ue,"date-time-at-processing":b(ue,Y),"document-charset-supplied":se,"document-digital-signature-supplied":n,"document-format-details-supplied":o(g("Operation","document-format-details")),"document-format-supplied":de,"document-format-version-supplied":I(127),"document-message-supplied":I,"document-metadata":o(ye),"document-name-supplied":name,"document-natural-language-supplied":ne,"document-overrides-actual":o(g),"errors-count":p(0,d),"finishings-actual":o(R),"finishings-col-actual":o(g("Job Template","finishings-col")),"force-front-side-actual":o(o(p(1,d))),"imposition-template-actual":o(b(n,name)),"impressions-completed-current-copy":p(0,d),"insert-sheet-actual":o(g("Job Template","insert-sheet")),"job-account-id-actual":o(name),"job-accounting-sheets-actual":o(g("Job Template","job-accounting-sheets")),"job-accounting-user-id-actual":o(name),"job-attribute-fidelity":O,"job-collation-type":R,"job-collation-type-actual":o(n),"job-copies-actual":o(p(1,d)),"job-cover-back-actual":o(g("Job Template","cover-back")),"job-cover-front-actual":o(g("Job Template","cover-front")),"job-detailed-status-messages":o(I),"job-document-access-errors":o(I),"job-error-sheet-actual":o(g("Job Template","job-error-sheet")),"job-finishings-actual":o(R),"job-finishings-col-actual":o(g("Job Template","media-col")),"job-hold-until-actual":o(b(n,name)),"job-id":p(1,d),"job-impressions":p(0,d),"job-impressions-completed":p(0,d),"job-k-octets":p(0,d),"job-k-octets-processed":p(0,d),"job-mandatory-attributes":o(n),"job-media-sheets":p(0,d),"job-media-sheets-completed":p(0,d),"job-message-from-operator":I(127),"job-message-to-operator-actual":o(I),"job-more-info":U,"job-name":name,"job-originating-user-name":name,"job-originating-user-uri":U,"job-pages":p(0,d),"job-pages-completed":p(0,d),"job-pages-completed-current-copy":p(0,d),"job-printer-up-time":p(1,d),"job-printer-uri":U,"job-priority-actual":o(p(1,100)),"job-save-printer-make-and-model":I(127),"job-sheet-message-actual":o(I),"job-sheets-actual":o(b(n,name)),"job-sheets-col-actual":o(g("Job Template","job-sheets-col")),"job-state":b(R,yt),"job-state-message":I,"job-state-reasons":o(n),"job-uri":U,"job-uuid":U(45),"media-actual":o(b(n,name)),"media-col-actual":o(g("Job Template","media-col")),"media-input-tray-check-actual":o(b(n,name)),"multiple-document-handling-actual":o(n),"number-of-documents":p(0,d),"number-of-intervening-jobs":p(0,d),"number-up-actual":o(p(1,d)),"orientation-requested-actual":o(R),"original-requesting-user-name":name,"output-bin-actual":o(b(n,name)),"output-device-actual":o(ve(127)),"output-device-assigned":ve(127),"overrides-actual":o(g("Job Template","overrides")),"page-delivery-actual":o(n),"page-order-received-actual":o(n),"page-ranges-actual":o(J(1,d)),"presentation-direction-number-up-actual":o(n),"print-content-optimize-actual":o(n),"print-quality-actual":o(R),"printer-resolution-actual":o(we),"separator-sheets-actual":o(g("Job Template","separator-sheets")),"sheet-collate-actual":o(n),"sheet-completed-copy-number":p(0,d),"sheet-completed-document-number":p(0,d),"sides-actual":o(n),"time-at-completed":b(p,Y),"time-at-creation":p,"time-at-processing":b(p,Y),"warnings-count":p(0,d),"x-image-position-actual":o(n),"x-image-shift-actual":o(p),"x-side1-image-shift-actual":o(p),"x-side2-image-shift-actual":o(p),"y-image-position-actual":o(n),"y-image-shift-actual":o(p),"y-side1-image-shift-actual":o(p),"y-side2-image-shift-actual":o(p)},K["Job Template"]={copies:p(1,d),"cover-back":g({"cover-type":n,media:b(n,name),"media-col":g("Job Template","media-col")}),"cover-front":g({"cover-type":n,media:b(n,name),"media-col":g("Job Template","media-col")}),"feed-orientation":n,finishings:o(R),"finishings-col":g({"finishing-template":name,stitching:g({"stitching-locations":o(p(0,d)),"stitching-offset":p(0,d),"stitching-reference-edge":n})}),"font-name-requested":name,"font-size-requested":p(1,d),"force-front-side":o(p(1,d)),"imposition-template":b(n,name),"insert-sheet":o(g({"insert-after-page-number":p(0,d),"insert-count":p(0,d),media:b(n,name),"media-col":g("Job Template","media-col")})),"job-account-id":name,"job-accounting-sheets":g({"job-accounting-output-bin":b(n,name),"job-accounting-sheets-type":b(n,name),media:b(n,name),"media-col":g("Job Template","media-col")}),"job-accounting-user-id":name,"job-copies":p(1,d),"job-cover-back":g("Job Template","cover-back"),"job-cover-front":g("Job Template","cover-front"),"job-delay-output-until":b(n,name),"job-delay-output-until-time":ue,"job-error-action":n,"job-error-sheet":g({"job-error-sheet-type":b(n,name),"job-error-sheet-when":n,media:b(n,name),"media-col":g("Job Template","media-col")}),"job-finishings":o(R),"job-finishings-col":g("Job Template","finishings-col"),"job-hold-until":b(n,name),"job-hold-until-time":ue,"job-message-to-operator":I,"job-phone-number":U,"job-priority":p(1,100),"job-recipient-name":name,"job-save-disposition":g({"save-disposition":n,"save-info":o(g({"save-document-format":de,"save-location":U,"save-name":name}))}),"job-sheet-message":I,"job-sheets":b(n,name),"job-sheets-col":g({"job-sheets":b(n,name),media:b(n,name),"media-col":g("Job Template","media-col")}),media:b(n,name),"media-col":g({"media-back-coating":b(n,name),"media-bottom-margin":p(0,d),"media-color":b(n,name),"media-front-coating":b(n,name),"media-grain":b(n,name),"media-hole-count":p(0,d),"media-info":I(255),"media-key":b(n,name),"media-left-margin":p(0,d),"media-order-count":p(1,d),"media-pre-printed":b(n,name),"media-recycled":b(n,name),"media-right-margin":p(0,d),"media-size":g({"x-dimension":p(0,d),"y-dimension":p(0,d)}),"media-size-name":b(n,name),"media-source":b(n,name),"media-thickness":p(1,d),"media-tooth":b(n,name),"media-top-margin":p(0,d),"media-type":b(n,name),"media-weight-metric":p(0,d)}),"media-input-tray-check":b(n,name),"multiple-document-handling":n,"number-up":p(1,d),"orientation-requested":R,"output-bin":b(n,name),"output-device":ve(127),overrides:o(g({"document-copies":o(J),"document-numbers":o(J),pages:o(J)})),"page-delivery":n,"page-order-received":n,"page-ranges":o(J(1,d)),"pages-per-subset":o(p(1,d)),"pdl-init-file":g({"pdl-init-file-entry":name,"pdl-init-file-location":U,"pdl-init-file-name":name}),"presentation-direction-number-up":n,"print-color-mode":n,"print-content-optimize":n,"print-quality":R,"print-rendering-intent":n,"printer-resolution":we,"print-scaling":n,"proof-print":g({media:b(n,name),"media-col":g("Job Template","media-col"),"proof-print-copies":p(0,d)}),"separator-sheets":g({media:b(n,name),"media-col":g("Job Template","media-col"),"separator-sheets-type":o(n)}),"sheet-collate":n,sides:n,"x-image-position":n,"x-image-shift":p,"x-side1-image-shift":p,"x-side2-image-shift":p,"y-image-position":n,"y-image-shift":p,"y-side1-image-shift":p,"y-side2-image-shift":p},K.Operation={"attributes-charset":se,"attributes-natural-language":ne,compression:n,"detailed-status-message":I,"document-access-error":I,"document-charset":se,"document-digital-signature":n,"document-format":de,"document-format-details":o(g({"document-format":de,"document-format-device-id":I(127),"document-format-version":I(127),"document-natural-language":o(ne),"document-source-application-name":name,"document-source-application-version":I(127),"document-source-os-name":ve(40),"document-source-os-version":I(40)})),"document-message":I,"document-metadata":o(ye),"document-name":name,"document-natural-language":ne,"document-password":ye,"document-uri":U,"first-index":p(1,d),"identify-actions":o(n),"ipp-attribute-fidelity":O,"job-hold-until":b(n,name),"job-id":p(1,d),"job-ids":o(p(1,d)),"job-impressions":p(0,d),"job-k-octets":p(0,d),"job-mandatory-attributes":o(n),"job-media-sheets":p(0,d),"job-message-from-operator":I(127),"job-name":name,"job-password":ye(255),"job-password-encryption":b(n,name),"job-state":R,"job-state-message":I,"job-state-reasons":o(n),"job-uri":U,"last-document":O,limit:p(1,d),message:I(12