@univer-cli/resource-library 1.6.0 → 1.6.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0xf2a169=_0x1cf8;(function(_0xe419f5,_0x54cd01){const _0x70b55c=_0x1cf8,_0x474f46=_0xe419f5();while(!![]){try{const _0x33bffd=-parseInt(_0x70b55c(0x285))/0x1*(-parseInt(_0x70b55c(0x214))/0x2)+parseInt(_0x70b55c(0x1fa))/0x3+-parseInt(_0x70b55c(0x231))/0x4*(parseInt(_0x70b55c(0x252))/0x5)+-parseInt(_0x70b55c(0x236))/0x6*(-parseInt(_0x70b55c(0x282))/0x7)+parseInt(_0x70b55c(0x1dc))/0x8*(parseInt(_0x70b55c(0x268))/0x9)+-parseInt(_0x70b55c(0x207))/0xa*(parseInt(_0x70b55c(0x230))/0xb)+parseInt(_0x70b55c(0x277))/0xc*(-parseInt(_0x70b55c(0x25d))/0xd);if(_0x33bffd===_0x54cd01)break;else _0x474f46['push'](_0x474f46['shift']());}catch(_0x12f817){_0x474f46['push'](_0x474f46['shift']());}}}(_0x4f8c,0x6ae32));import{randomUUID as _0x89b9db}from'node:crypto';import{mkdir as _0x49fddc,readFile as _0x3f4410,readdir as _0x3fb8b7,rename as _0x487434,rm as _0x521d8b,stat as _0x186c3a,unlink as _0x281b1c,writeFile as _0x5dca0c}from'node:fs/promises';import{dirname as _0x26b452,isAbsolute as _0x2a291b,join as _0xa7664b,parse as _0x2bfb15,resolve as _0x39db9b}from'node:path';import{readFileSync as _0x4f5d48}from'node:fs';var h=class extends Error{[_0xf2a169(0x1d9)];[_0xf2a169(0x280)];constructor(_0x8d1ff4,_0xf1a06f,_0x5b691b,_0x4863af){const _0xd855d9=_0xf2a169;super(_0xf1a06f,_0x4863af),this[_0xd855d9(0x1d9)]=_0x8d1ff4,this['handle']=_0x5b691b,this[_0xd855d9(0x1bc)]='ResourceLibraryError';}};function g(_0xb34ad7){return _0xb34ad7 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x3e93c9){const _0x2d6129=_0xf2a169;return _[_0x2d6129(0x1fc)](_0x3e93c9)&&_0x3e93c9!=='.'&&_0x3e93c9!=='..';}function x(_0x58dabf){const _0x1fd338=_0xf2a169;if(!b(_0x58dabf)||_0x58dabf[_0x1fd338(0x1ff)]('-')||_0x58dabf[_0x1fd338(0x1dd)]('--')||_0x58dabf[_0x1fd338(0x25e)]>v)throw new h(_0x1fd338(0x26a),_0x1fd338(0x1d2)+_0x58dabf+_0x1fd338(0x27d));}function S(_0xca55e2){const _0x5230c8=_0xf2a169;if(!b(_0xca55e2)||_0xca55e2[_0x5230c8(0x25e)]+y>v)throw new h('resource-invalid-resource-id','Invalid\x20resource\x20ID\x20\x22'+_0xca55e2+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x5512fb){const _0x43bd22=_0xf2a169;let _0x50f2ff=_0x5512fb[_0x43bd22(0x242)]('/');if(_0x50f2ff[_0x43bd22(0x25e)]!==0x2||_0x50f2ff[0x0]===''||_0x50f2ff[0x1]==='')throw new h(_0x43bd22(0x24d),_0x43bd22(0x222)+_0x5512fb+_0x43bd22(0x272),_0x5512fb);let _0x46eb05=_0x50f2ff[0x0],_0x27acdc=_0x50f2ff[0x1];return x(_0x46eb05),S(_0x27acdc),{'registryId':_0x46eb05,'resourceId':_0x27acdc};}function ee(_0x679c37,_0x214f4c){return x(_0x679c37),S(_0x214f4c),_0x679c37+'/'+_0x214f4c;}function _0x4f8c(){const _0x554a09=['join','Duplicate\x20export\x20filename\x20\x22','isInteger','.intrinsicSize.height','keywords','set','.source','registryId','.source.value\x20must\x20use\x20HTTPS.','2479911ApfkZr','utf-8','test','timeoutMs','source','startsWith','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','get','utf8','resource-download-insecure','.payload','downloader','entries','15110XIWJZQ','resource-cache-root-invalid','push','].input.registryId','\x20ms.','resource-download-too-many-redirects','en-US','queries','width','cache','].input.defaultLocale','write','Unknown\x20resource\x20\x22','1592VHMXSK','boolean','type','registrations','destination','root','tags','.payload.colorEditable','Cannot\x20read\x20resource\x20manifest\x20at\x20','].label','registrations[','payload','resources','trim','Invalid\x20resource\x20handle\x20\x22','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','https:','Resource\x20URL\x20must\x20use\x20HTTPS.','resource-download-invalid-svg','.groupId','fetchImpl','resource','path','normalize','.source.value','clear','abort','\x22:\x20','2134uZEPGz','550476opbpMZ','colorEditable','globalIndex','.id','body','3102fagRIa','\x20must\x20be\x20a\x20finite\x20number.','storagePolicy','resource-download-http','location','ENOENT','isDirectory','resource-not-found','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','height','registrations\x20must\x20not\x20be\x20empty.','.source.value\x20must\x20be\x20a\x20URL.','split','localeCompare','resource-download-insecure-redirect','group','byteLength','manifest.registrations','tagIds','download','.tagIds','read','.resource-','resource-invalid-handle','has','text','export','Resource\x20server\x20returned\x20HTTP\x20','25vngEhZ','input','\x20bytes.','groups','manual','resource-limit-invalid','status','registries','Invalid\x20resource\x20manifest:\x20','options','].id','13cvBraC','length','sourceUrl','defaultLocale','getReader','done','].input','clearCache','intrinsicSize','aborted','url','999LgvDFc','resourceCount','resource-invalid-registry-id','filter','isFile','].input.groups','manifest','resource-manifest-read-failed','value',']\x20must\x20be\x20a\x20string.','\x22;\x20expected\x20<registryId>/<resourceId>.','\x22\x20is\x20not\x20an\x20SVG\x20document.','maxRedirects','protocol','manifestPath','10588848SIaknb','fetch','\x20must\x20be\x20a\x20non-empty\x20string.','].input.tags','map','resource-export-failed','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','resource-registry-not-found','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','handle','searchText','3661CAnrDw','string','signal','833KgXSYs','\x20without\x20a\x20Location\x20header.','endsWith','\x20must\x20be\x20a\x20boolean.','.tagIds\x20references\x20unknown\x20tag\x20\x22','Downloaded\x20resource\x20\x22','name','resource-invalid-svg','limit','\x20must\x20be\x20an\x20object.','cancel','resource-download-failed','resource-manifest-invalid','add','isArray','decode','.type\x20must\x20be\x20\x22image\x22.','concat','size','catch','values','.groupId\x20references\x20unknown\x20group\x20\x22','\x20contains\x20no\x20usable\x20localized\x20text.','number','reference','parse','label','.intrinsicSize','Invalid\x20registry\x20ID\x20\x22','catalog','output','.storagePolicy\x20must\x20be\x20\x22reference\x22.','Resource\x20export\x20filename\x20exceeds\x20','isFinite','.intrinsicSize\x20must\x20be\x20positive.','code','description','order','39016TqkYTn','includes','Resource\x20download\x20timed\x20out\x20after\x20','\x22;\x20try\x20resources\x20find\x20<query>.','registryById','.tmp','message','.source.type\x20must\x20be\x20\x22url\x22.','maxBytes','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','releaseLock','Duplicate\x20resource\x20handle\x20\x22','resourceByHandle','.svg','.description','resource-download-too-large','resource-download-timeout','resourceIndex','find','groupId','\x20must\x20be\x20an\x20array.'];_0x4f8c=function(){return _0x554a09;};return _0x4f8c();}function w(_0xc42794){const _0x3f4354=_0xf2a169;let {registryId:_0xe34a96,resourceId:_0x301b89}=C(_0xc42794),_0x355327=_0xe34a96+'--'+_0x301b89+_0x3f4354(0x1e9);if(_0x355327[_0x3f4354(0x25e)]>v)throw new h('resource-export-filename-too-long',_0x3f4354(0x1d6)+v+'\x20bytes.',_0xc42794);return _0x355327;}function T(_0xd3ae7){const _0x192e0e=_0xf2a169;return new h(_0x192e0e(0x1c2),_0x192e0e(0x25a)+_0xd3ae7);}function E(_0x411f07,_0x25cb09){const _0x212f70=_0xf2a169;if(typeof _0x411f07!='object'||!_0x411f07||Array[_0x212f70(0x1c4)](_0x411f07))throw T(_0x25cb09+_0x212f70(0x1bf));return _0x411f07;}function D(_0x325639,_0x22efbe,_0x10e55b=!0x1){const _0x710c85=_0xf2a169;if(_0x10e55b&&_0x325639===void 0x0)return[];if(!Array['isArray'](_0x325639))throw T(_0x22efbe+_0x710c85(0x1f0));return _0x325639;}function O(_0x24c25d,_0x3a95c6){const _0x1ae08b=_0xf2a169;if(typeof _0x24c25d!=_0x1ae08b(0x283)||_0x24c25d==='')throw T(_0x3a95c6+_0x1ae08b(0x279));return _0x24c25d;}function k(_0x34615d,_0x44b224,_0x2d20e4=!0x1){const _0x4e87f3=_0xf2a169;return D(_0x34615d,_0x44b224,_0x2d20e4)[_0x4e87f3(0x27b)]((_0x29a080,_0x1d0ffc)=>O(_0x29a080,_0x44b224+'['+_0x1d0ffc+']'));}function A(_0x3bdddd,_0x472fa){const _0x4d2353=_0xf2a169;return D(_0x3bdddd,_0x472fa,!0x0)[_0x4d2353(0x27b)]((_0x1cdbb7,_0x22bdb4)=>{const _0x112a27=_0x4d2353;if(typeof _0x1cdbb7!=_0x112a27(0x283))throw T(_0x472fa+'['+_0x22bdb4+_0x112a27(0x271));return _0x1cdbb7;})[_0x4d2353(0x26b)](_0xb56516=>_0xb56516!=='');}function j(_0xde688e,_0x1d1711){const _0x4d379f=_0xf2a169;if(typeof _0xde688e!=_0x4d379f(0x1cd)||!Number['isFinite'](_0xde688e))throw T(_0x1d1711+_0x4d379f(0x237));return _0xde688e;}function M(_0x334b4d,_0x432a95){const _0x1093a0=_0xf2a169;if(typeof _0x334b4d!=_0x1093a0(0x215))throw T(_0x432a95+_0x1093a0(0x1b9));return _0x334b4d;}function _0x1cf8(_0x15c7fa,_0x56829d){_0x15c7fa=_0x15c7fa-0x1b9;const _0x4f8cc3=_0x4f8c();let _0x1cf8ab=_0x4f8cc3[_0x15c7fa];return _0x1cf8ab;}function N(_0x4fae5e,_0x55320d,_0x1dd9b1){const _0x410f5e=_0xf2a169;if(typeof _0x4fae5e==_0x410f5e(0x283)&&_0x4fae5e!=='')return _0x4fae5e;let _0x1e63bd=E(_0x4fae5e,_0x55320d),_0x4e1d09=_0x1dd9b1===void 0x0?void 0x0:_0x1e63bd[_0x1dd9b1];if(typeof _0x4e1d09==_0x410f5e(0x283)&&_0x4e1d09!=='')return _0x4e1d09;let _0x33f8cd=_0x1e63bd[_0x410f5e(0x20d)];if(typeof _0x33f8cd==_0x410f5e(0x283)&&_0x33f8cd!=='')return _0x33f8cd;let _0x1c9ce5=Object[_0x410f5e(0x1ca)](_0x1e63bd)[_0x410f5e(0x1ee)](_0x3cc928=>typeof _0x3cc928==_0x410f5e(0x283)&&_0x3cc928!=='');if(_0x1c9ce5!==void 0x0)return _0x1c9ce5;throw T(_0x55320d+_0x410f5e(0x1cc));}function P(_0x5ee1ba,_0x582689,_0x3cb1df){const _0x580d21=_0xf2a169;try{_0x3cb1df==='registry'?x(_0x5ee1ba):S(_0x5ee1ba);}catch(_0x68aee7){throw T(_0x582689+':\x20'+(_0x68aee7 instanceof Error?_0x68aee7[_0x580d21(0x1e2)]:String(_0x68aee7)));}}function F(_0x323611,_0xf21800,_0x290e9b){const _0x1b590d=_0xf2a169;let _0x431155=new Map();for(let [_0x119c88,_0x127779]of D(_0x323611,_0xf21800,!0x0)[_0x1b590d(0x206)]()){let _0x4f9832=E(_0x127779,_0xf21800+'['+_0x119c88+']'),_0x52cee2=O(_0x4f9832['id'],_0xf21800+'['+_0x119c88+_0x1b590d(0x25c));if(P(_0x52cee2,_0xf21800+'['+_0x119c88+'].id',_0x1b590d(0x229)),_0x431155[_0x1b590d(0x24e)](_0x52cee2))throw T('Duplicate\x20'+_0xf21800+'\x20ID\x20\x22'+_0x52cee2+'\x22.');_0x431155['set'](_0x52cee2,N(_0x4f9832['label'],_0xf21800+'['+_0x119c88+_0x1b590d(0x21d),_0x290e9b));}return _0x431155;}function I(_0xa06ad9,_0x56fe53){const _0x1a2ea2=_0xf2a169;let _0x95a6c1=E(_0xa06ad9[_0x1a2ea2(0x265)],_0x56fe53+_0x1a2ea2(0x1d1)),_0x31a96e=j(_0x95a6c1[_0x1a2ea2(0x20f)],_0x56fe53+'.intrinsicSize.width'),_0x48d457=j(_0x95a6c1[_0x1a2ea2(0x23f)],_0x56fe53+_0x1a2ea2(0x1f4));if(_0x31a96e<=0x0||_0x48d457<=0x0)throw T(_0x56fe53+_0x1a2ea2(0x1d8));return{'width':_0x31a96e,'height':_0x48d457};}function L(_0x3cae31,_0x3852aa){const _0x1de048=_0xf2a169;if(_0x3cae31[_0x1de048(0x216)]!=='image')throw T(_0x3852aa+_0x1de048(0x1c6));if(_0x3cae31[_0x1de048(0x238)]!==_0x1de048(0x1ce))throw T(_0x3852aa+_0x1de048(0x1d5));let _0x15ba17=E(_0x3cae31[_0x1de048(0x1fe)],_0x3852aa+_0x1de048(0x1f7));if(_0x15ba17[_0x1de048(0x216)]!==_0x1de048(0x267))throw T(_0x3852aa+_0x1de048(0x1e3));let _0xc1ae6c=O(_0x15ba17[_0x1de048(0x270)],_0x3852aa+_0x1de048(0x22c)),_0xce581;try{_0xce581=new URL(_0xc1ae6c);}catch{throw T(_0x3852aa+_0x1de048(0x241));}if(_0xce581[_0x1de048(0x275)]!==_0x1de048(0x224))throw T(_0x3852aa+_0x1de048(0x1f9));return _0xc1ae6c;}function R(_0x5d7360){const _0x194223=_0xf2a169;return _0x5d7360[_0x194223(0x22b)]('NFKC')['toLowerCase']()[_0x194223(0x221)]()['replace'](/\s+/gu,'\x20');}function z(_0x41a51d){const _0x32aa43=_0xf2a169;let _0x49231a=E(_0x41a51d,_0x32aa43(0x26e)),_0x5a11f4=new Map(),_0x4bf930=new Map(),_0x25eab0=[],_0x523040=[],_0x26ba1a=new Set(),_0x5ef4a1=0x0;for(let [_0x554ff2,_0x289bff]of D(_0x49231a[_0x32aa43(0x217)],_0x32aa43(0x247))[_0x32aa43(0x206)]()){let _0x41a3ca=E(E(_0x289bff,'registrations['+_0x554ff2+']')[_0x32aa43(0x253)],_0x32aa43(0x21e)+_0x554ff2+_0x32aa43(0x263)),_0x21f2a6=O(_0x41a3ca['registryId'],_0x32aa43(0x21e)+_0x554ff2+_0x32aa43(0x20a));if(P(_0x21f2a6,'registrations['+_0x554ff2+_0x32aa43(0x20a),'registry'),_0x5a11f4[_0x32aa43(0x24e)](_0x21f2a6))throw T('Duplicate\x20registry\x20ID\x20\x22'+_0x21f2a6+'\x22.');let _0x598878=_0x41a3ca['defaultLocale']===void 0x0?void 0x0:O(_0x41a3ca[_0x32aa43(0x260)],'registrations['+_0x554ff2+_0x32aa43(0x211)),_0x531dbc=F(_0x41a3ca[_0x32aa43(0x255)],_0x32aa43(0x21e)+_0x554ff2+_0x32aa43(0x26d),_0x598878),_0x31ffb0=F(_0x41a3ca['tags'],_0x32aa43(0x21e)+_0x554ff2+_0x32aa43(0x27a),_0x598878),_0x30565b=[];for(let [_0x4ffef9,_0x25dc52]of D(_0x41a3ca[_0x32aa43(0x220)],_0x32aa43(0x21e)+_0x554ff2+'].input.resources')['entries']()){let _0x2a3acb=_0x32aa43(0x21e)+_0x554ff2+'].input.resources['+_0x4ffef9+']',_0x445a0b=E(_0x25dc52,_0x2a3acb),_0x4b0ea8=O(_0x445a0b['id'],_0x2a3acb+_0x32aa43(0x234));P(_0x4b0ea8,_0x2a3acb+_0x32aa43(0x234),_0x32aa43(0x229));let _0x4f0ce9=ee(_0x21f2a6,_0x4b0ea8);if(_0x4bf930[_0x32aa43(0x24e)](_0x4f0ce9))throw T(_0x32aa43(0x1e7)+_0x4f0ce9+'\x22.');let _0x208304;try{_0x208304=w(_0x4f0ce9);}catch(_0x1788ca){throw T(_0x2a3acb+':\x20'+(_0x1788ca instanceof Error?_0x1788ca[_0x32aa43(0x1e2)]:String(_0x1788ca)));}if(_0x26ba1a[_0x32aa43(0x24e)](_0x208304))throw T(_0x32aa43(0x1f2)+_0x208304+'\x22.');_0x26ba1a[_0x32aa43(0x1c3)](_0x208304);let _0x2940d3=_0x445a0b[_0x32aa43(0x1ef)]===void 0x0?void 0x0:O(_0x445a0b[_0x32aa43(0x1ef)],_0x2a3acb+_0x32aa43(0x227));if(_0x2940d3!==void 0x0&&!_0x531dbc[_0x32aa43(0x24e)](_0x2940d3))throw T(_0x2a3acb+_0x32aa43(0x1cb)+_0x2940d3+'\x22.');let _0x35a368=k(_0x445a0b[_0x32aa43(0x248)],_0x2a3acb+_0x32aa43(0x24a),!0x0);for(let _0x38a9e1 of _0x35a368)if(!_0x31ffb0['has'](_0x38a9e1))throw T(_0x2a3acb+_0x32aa43(0x1ba)+_0x38a9e1+'\x22.');let _0x42cdd4=A(_0x445a0b[_0x32aa43(0x1f5)],_0x2a3acb+'.keywords'),_0x520f31=N(_0x445a0b[_0x32aa43(0x1bc)],_0x2a3acb+'.name',_0x598878),_0x3b79e4=_0x445a0b['description']===void 0x0?void 0x0:N(_0x445a0b[_0x32aa43(0x1da)],_0x2a3acb+_0x32aa43(0x1ea),_0x598878),_0x1a9e1d=_0x2940d3===void 0x0?null:{'id':_0x2940d3,'label':_0x531dbc[_0x32aa43(0x201)](_0x2940d3)},_0x2eff3c=_0x35a368['map'](_0xb51a6d=>({'id':_0xb51a6d,'label':_0x31ffb0[_0x32aa43(0x201)](_0xb51a6d)})),_0x25e118=E(_0x445a0b[_0x32aa43(0x21f)],_0x2a3acb+_0x32aa43(0x204)),_0x4eb390=_0x445a0b[_0x32aa43(0x1db)]===void 0x0?null:j(_0x445a0b[_0x32aa43(0x1db)],_0x2a3acb+'.order'),_0x1b1ef9=M(_0x25e118[_0x32aa43(0x232)],_0x2a3acb+_0x32aa43(0x21b)),_0x176b44={'handle':_0x4f0ce9,'registryId':_0x21f2a6,'id':_0x4b0ea8,'name':_0x520f31,..._0x3b79e4===void 0x0?{}:{'description':_0x3b79e4},'group':_0x1a9e1d,'tags':_0x2eff3c,'keywords':_0x42cdd4,'order':_0x4eb390,'intrinsicSize':I(_0x25e118,_0x2a3acb+_0x32aa43(0x204)),'colorEditable':_0x1b1ef9,'sourceUrl':L(_0x25e118,_0x2a3acb+_0x32aa43(0x204)),'registrationIndex':_0x554ff2,'resourceIndex':_0x4ffef9,'globalIndex':_0x5ef4a1,'searchText':R([_0x520f31,_0x3b79e4,_0x1a9e1d?.[_0x32aa43(0x1d0)],..._0x2eff3c[_0x32aa43(0x27b)](_0x2bb6ef=>_0x2bb6ef['label']),..._0x42cdd4][_0x32aa43(0x26b)](_0x38f5ca=>_0x38f5ca!==void 0x0)[_0x32aa43(0x1f1)]('\x20'))};_0x5ef4a1++,_0x30565b[_0x32aa43(0x209)](_0x176b44),_0x523040[_0x32aa43(0x209)](_0x176b44),_0x4bf930[_0x32aa43(0x1f6)](_0x4f0ce9,_0x176b44);}let _0x434aa5={'id':_0x21f2a6,'groups':_0x531dbc,'tags':_0x31ffb0,'resources':_0x30565b};_0x25eab0[_0x32aa43(0x209)](_0x434aa5),_0x5a11f4['set'](_0x21f2a6,_0x434aa5);}if(_0x25eab0['length']===0x0)throw T(_0x32aa43(0x240));return{'registries':_0x25eab0,'registryById':_0x5a11f4,'resourceByHandle':_0x4bf930,'resources':_0x523040};}function B(_0x244224,_0x67eb20){const _0x556688=_0xf2a169;C(_0x67eb20);let _0x38bd23=_0x244224[_0x556688(0x1e8)][_0x556688(0x201)](_0x67eb20);if(_0x38bd23===void 0x0)throw new h(_0x556688(0x23d),_0x556688(0x213)+_0x67eb20+_0x556688(0x1df),_0x67eb20);return _0x38bd23;}function te(_0x6a7dc6){const _0x520b87=_0xf2a169;return _0x6a7dc6[_0x520b87(0x259)]['map'](_0x42cfb8=>({'id':_0x42cfb8['id'],'resourceCount':_0x42cfb8['resources'][_0x520b87(0x25e)],'groupCount':_0x42cfb8[_0x520b87(0x255)]['size'],'tagCount':_0x42cfb8[_0x520b87(0x21a)][_0x520b87(0x1c8)],'colorEditableCount':_0x42cfb8[_0x520b87(0x220)][_0x520b87(0x26b)](_0x20a64f=>_0x20a64f[_0x520b87(0x232)])[_0x520b87(0x25e)]}));}function ne(_0x568d8a){const _0x580a11=_0xf2a169;return{'handle':_0x568d8a[_0x580a11(0x280)],'registryId':_0x568d8a[_0x580a11(0x1f8)],'id':_0x568d8a['id'],'name':_0x568d8a[_0x580a11(0x1bc)],'group':_0x568d8a[_0x580a11(0x245)],'tags':_0x568d8a['tags'],'keywords':_0x568d8a[_0x580a11(0x1f5)],'order':_0x568d8a[_0x580a11(0x1db)],'intrinsicSize':_0x568d8a[_0x580a11(0x265)],'colorEditable':_0x568d8a[_0x580a11(0x232)]};}function re(_0x5a3f88,_0x5307c7){const _0x5665c8=_0xf2a169;let _0x4c3945=(_0x5a3f88[_0x5665c8(0x1db)]??_0x5a3f88[_0x5665c8(0x233)])-(_0x5307c7[_0x5665c8(0x1db)]??_0x5307c7[_0x5665c8(0x233)]);if(_0x4c3945!==0x0)return _0x4c3945;let _0x43ce59=_0x5a3f88['registrationIndex']-_0x5307c7['registrationIndex'];if(_0x43ce59!==0x0)return _0x43ce59;let _0x2a271b=_0x5a3f88[_0x5665c8(0x1ed)]-_0x5307c7[_0x5665c8(0x1ed)];return _0x2a271b===0x0?_0x5a3f88['handle'][_0x5665c8(0x243)](_0x5307c7[_0x5665c8(0x280)]):_0x2a271b;}function ie(_0x31c594,_0x415f86){const _0x1123b6=_0xf2a169;let _0x424e9c=_0x415f86[_0x1123b6(0x20e)]['map'](R)[_0x1123b6(0x26b)](_0x28eed6=>_0x28eed6!=='');if(_0x424e9c[_0x1123b6(0x25e)]===0x0)throw new h('resource-query-empty','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.');let _0x33564a=new Set(_0x415f86[_0x1123b6(0x259)]??[]);for(let _0x488caf of _0x33564a)if(!_0x31c594[_0x1123b6(0x1e0)][_0x1123b6(0x24e)](_0x488caf))throw new h(_0x1123b6(0x27e),'Unknown\x20resource\x20registry\x20\x22'+_0x488caf+'\x22.');let _0x3088aa=_0x415f86[_0x1123b6(0x1be)]??_0x31c594[_0x1123b6(0x220)]['length'];if(!Number[_0x1123b6(0x1f3)](_0x3088aa)||_0x3088aa<0x1)throw new h(_0x1123b6(0x257),'Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22'+_0x3088aa+'\x22.');let _0x355d22=_0x31c594[_0x1123b6(0x220)]['filter'](_0x5b1527=>_0x33564a[_0x1123b6(0x1c8)]===0x0||_0x33564a['has'](_0x5b1527[_0x1123b6(0x1f8)]))['filter'](_0xcb62fa=>_0x424e9c['some'](_0x4cbdbb=>_0xcb62fa[_0x1123b6(0x281)][_0x1123b6(0x1dd)](_0x4cbdbb)))['sort'](re);return{'resources':_0x355d22['slice'](0x0,_0x3088aa)['map'](ne),'total':_0x355d22[_0x1123b6(0x25e)]};}function V(_0x397c72){const _0x575cb7=_0xf2a169;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x575cb7(0x1fc)](_0x397c72);}function H(_0x21f080,_0x102633){const _0x376ce2=_0xf2a169;return g(_0x102633)?{'handle':_0x21f080,'code':_0x102633['code'],'message':_0x102633[_0x376ce2(0x1e2)]}:{'handle':_0x21f080,'code':_0x376ce2(0x27c),'message':_0x102633 instanceof Error?_0x102633[_0x376ce2(0x1e2)]:String(_0x102633)};}var U=class{[_0xf2a169(0x25b)];[_0xf2a169(0x1d3)];constructor(_0x84293){const _0x4b77a=_0xf2a169;this[_0x4b77a(0x25b)]=_0x84293,this[_0x4b77a(0x1d3)]=z(_0x84293[_0x4b77a(0x26e)]);}get['cacheLocation'](){const _0x366b7d=_0xf2a169;return this[_0x366b7d(0x25b)][_0x366b7d(0x210)][_0x366b7d(0x23a)];}['listRegistries'](){const _0x58817e=_0xf2a169;return te(this[_0x58817e(0x1d3)]);}['find'](_0x3996f4){const _0x171d8e=_0xf2a169;return ie(this[_0x171d8e(0x1d3)],_0x3996f4);}async[_0xf2a169(0x24b)](_0xfa2860){const _0x24b33b=_0xf2a169;let _0x10603a=B(this[_0x24b33b(0x1d3)],_0xfa2860['handle']),_0x3d2635=await this[_0x24b33b(0x25b)]['cache']['read'](_0xfa2860[_0x24b33b(0x280)]);if(_0x3d2635!==void 0x0&&V(_0x3d2635))return{'handle':_0xfa2860[_0x24b33b(0x280)],'svg':_0x3d2635};let _0x4f533c;try{_0x4f533c=await this[_0x24b33b(0x25b)][_0x24b33b(0x205)][_0x24b33b(0x249)](_0x10603a[_0x24b33b(0x25f)]);}catch(_0x8bbd1b){throw g(_0x8bbd1b)?_0x8bbd1b:new h(_0x24b33b(0x1c1),'Failed\x20to\x20download\x20\x22'+_0xfa2860[_0x24b33b(0x280)]+_0x24b33b(0x22f)+(_0x8bbd1b instanceof Error?_0x8bbd1b[_0x24b33b(0x1e2)]:String(_0x8bbd1b)),_0xfa2860[_0x24b33b(0x280)],{'cause':_0x8bbd1b});}if(!V(_0x4f533c))throw new h(_0x24b33b(0x1bd),_0x24b33b(0x1bb)+_0xfa2860[_0x24b33b(0x280)]+_0x24b33b(0x273),_0xfa2860[_0x24b33b(0x280)]);return await this[_0x24b33b(0x25b)]['cache']['write'](_0xfa2860['handle'],_0x4f533c),{'handle':_0xfa2860[_0x24b33b(0x280)],'svg':_0x4f533c};}async[_0xf2a169(0x250)](_0x1322d7){const _0x49e6db=_0xf2a169;let _0x1aae36=[],_0x2c6ce5=[];for(let _0x105189 of _0x1322d7['handles'])try{let {svg:_0x196abe}=await this[_0x49e6db(0x24b)]({'handle':_0x105189}),_0x48bfe0=await this[_0x49e6db(0x25b)][_0x49e6db(0x1d4)][_0x49e6db(0x212)](_0x1322d7[_0x49e6db(0x218)],w(_0x105189),_0x196abe);_0x1aae36[_0x49e6db(0x209)]({'handle':_0x105189,'path':_0x48bfe0});}catch(_0x7bba25){_0x2c6ce5[_0x49e6db(0x209)](H(_0x105189,_0x7bba25));}return{'exported':_0x1aae36,'failed':_0x2c6ce5};}async[_0xf2a169(0x264)](){const _0x33647e=_0xf2a169;return await this[_0x33647e(0x25b)]['cache'][_0x33647e(0x22d)]();}};function W(_0x3ce8e3){return new U(_0x3ce8e3);}function G(_0x67e08e){const _0x5441bc=_0xf2a169;return _0x67e08e instanceof Error&&_0x5441bc(0x1d9)in _0x67e08e;}function K(_0x99ad0c){const _0x176ce5=_0xf2a169;let _0x533246=_0x39db9b(_0x99ad0c);if(!_0x2a291b(_0x99ad0c)||_0x533246===_0x2bfb15(_0x533246)[_0x176ce5(0x219)])throw new h(_0x176ce5(0x208),'Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22'+_0x99ad0c+'\x22.');return _0x533246;}async function q(_0x11bbe6){const _0x1d7189=_0xf2a169;let _0x28b888;try{_0x28b888=await _0x3fb8b7(_0x11bbe6,{'withFileTypes':!0x0});}catch(_0x110bd7){if(G(_0x110bd7)&&_0x110bd7[_0x1d7189(0x1d9)]===_0x1d7189(0x23b))return{'resourceCount':0x0,'byteCount':0x0};throw _0x110bd7;}let _0x34dbdb=0x0,_0x3deae7=0x0;for(let _0x57e98a of _0x28b888){let _0x44df80=_0xa7664b(_0x11bbe6,_0x57e98a[_0x1d7189(0x1bc)]);if(_0x57e98a[_0x1d7189(0x23c)]()){let _0x1d3993=await q(_0x44df80);_0x34dbdb+=_0x1d3993[_0x1d7189(0x269)],_0x3deae7+=_0x1d3993['byteCount'];}else{if(_0x57e98a[_0x1d7189(0x26c)]()&&_0x57e98a[_0x1d7189(0x1bc)][_0x1d7189(0x287)]('.svg')){let _0x14ce07=await _0x186c3a(_0x44df80);_0x34dbdb++,_0x3deae7+=_0x14ce07[_0x1d7189(0x1c8)];}}}return{'resourceCount':_0x34dbdb,'byteCount':_0x3deae7};}var J=class{[_0xf2a169(0x23a)];constructor(_0x4ce570){const _0x107505=_0xf2a169;this[_0x107505(0x23a)]=K(_0x4ce570);}[_0xf2a169(0x22a)](_0x1a1b21){const _0x304a81=_0xf2a169;let {registryId:_0x325fa1,resourceId:_0x2daf8c}=C(_0x1a1b21);return _0xa7664b(this[_0x304a81(0x23a)],_0x325fa1,_0x2daf8c+_0x304a81(0x1e9));}async[_0xf2a169(0x24b)](_0x2b43a4){const _0x360cad=_0xf2a169;try{return await _0x3f4410(this[_0x360cad(0x22a)](_0x2b43a4),_0x360cad(0x202));}catch(_0x49399b){if(G(_0x49399b)&&_0x49399b[_0x360cad(0x1d9)]===_0x360cad(0x23b))return;throw _0x49399b;}}async[_0xf2a169(0x212)](_0x35d58d,_0x59fe33){const _0x4c040e=_0xf2a169;let _0x1c92e7=this[_0x4c040e(0x22a)](_0x35d58d);await _0x49fddc(_0x26b452(_0x1c92e7),{'recursive':!0x0});let _0x3da910=_0xa7664b(_0x26b452(_0x1c92e7),_0x4c040e(0x24c)+process['pid']+'-'+_0x89b9db()+_0x4c040e(0x1e1));try{await _0x5dca0c(_0x3da910,_0x59fe33,{'encoding':'utf8','mode':0x180}),await _0x487434(_0x3da910,_0x1c92e7);}catch(_0x269763){throw await _0x281b1c(_0x3da910)[_0x4c040e(0x1c9)](()=>void 0x0),_0x269763;}}async[_0xf2a169(0x22d)](){const _0x35b920=_0xf2a169;let _0x446e1d=await q(this[_0x35b920(0x23a)]);return await _0x521d8b(this[_0x35b920(0x23a)],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x446e1d};}},Y=class{async[_0xf2a169(0x212)](_0x1e18a4,_0x9abd6f,_0x9caa4b){const _0x258d98=_0xf2a169;await _0x49fddc(_0x1e18a4,{'recursive':!0x0});let _0x4a5608=_0xa7664b(_0x1e18a4,_0x9abd6f);return await _0x5dca0c(_0x4a5608,_0x9caa4b,_0x258d98(0x202)),_0x4a5608;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x12835d){const _0x1075f3=_0xf2a169;return new h(_0x1075f3(0x1eb),_0x1075f3(0x1e5)+_0x12835d+_0x1075f3(0x254));}async function ce(_0x1f2ec6,_0x1cc165){const _0x22fa6d=_0xf2a169;let _0x58d868=Number(_0x1f2ec6['headers']['get']('content-length'));if(Number[_0x22fa6d(0x1d7)](_0x58d868)&&_0x58d868>_0x1cc165)throw Z(_0x1cc165);if(_0x1f2ec6['body']===null){let _0x1f2afd=await _0x1f2ec6[_0x22fa6d(0x24f)]();if(Buffer[_0x22fa6d(0x246)](_0x1f2afd)>_0x1cc165)throw Z(_0x1cc165);return _0x1f2afd;}let _0x3d1d22=_0x1f2ec6[_0x22fa6d(0x235)][_0x22fa6d(0x261)](),_0x205202=[],_0x5f3e76=0x0;try{for(;;){let _0x1e79d8=await _0x3d1d22['read']();if(_0x1e79d8[_0x22fa6d(0x262)])break;if(_0x5f3e76+=_0x1e79d8['value'][_0x22fa6d(0x246)],_0x5f3e76>_0x1cc165)throw await _0x3d1d22[_0x22fa6d(0x1c0)]()['catch'](()=>void 0x0),Z(_0x1cc165);_0x205202['push'](_0x1e79d8[_0x22fa6d(0x270)]);}}finally{_0x3d1d22[_0x22fa6d(0x1e6)]();}try{return new TextDecoder(_0x22fa6d(0x1fb),{'fatal':!0x0})[_0x22fa6d(0x1c5)](Buffer[_0x22fa6d(0x1c7)](_0x205202,_0x5f3e76));}catch{throw new h('resource-download-invalid-utf8','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.');}}var Q=class{[_0xf2a169(0x228)];[_0xf2a169(0x1fd)];[_0xf2a169(0x1e4)];[_0xf2a169(0x274)];constructor(_0x5b1a2e={}){const _0x1208d4=_0xf2a169;this[_0x1208d4(0x228)]=_0x5b1a2e[_0x1208d4(0x278)]??fetch,this[_0x1208d4(0x1fd)]=_0x5b1a2e[_0x1208d4(0x1fd)]??X,this[_0x1208d4(0x1e4)]=_0x5b1a2e[_0x1208d4(0x1e4)]??ae,this['maxRedirects']=_0x5b1a2e['maxRedirects']??oe;}async[_0xf2a169(0x249)](_0x1807eb){const _0x28c8be=_0xf2a169;let _0xa6187b=new URL(_0x1807eb);if(_0xa6187b[_0x28c8be(0x275)]!==_0x28c8be(0x224))throw new h(_0x28c8be(0x203),_0x28c8be(0x225));let _0x5544ee=new AbortController(),_0x1b2a0e=setTimeout(()=>_0x5544ee[_0x28c8be(0x22e)](),this['timeoutMs']);try{let _0x2b63ce=_0xa6187b;for(let _0x592c3c=0x0;;_0x592c3c++){let _0x5b84d6=await this['fetchImpl'](_0x2b63ce,{'redirect':_0x28c8be(0x256),'signal':_0x5544ee[_0x28c8be(0x284)]});if(se[_0x28c8be(0x24e)](_0x5b84d6[_0x28c8be(0x258)])){if(_0x592c3c>=this[_0x28c8be(0x274)])throw new h(_0x28c8be(0x20c),_0x28c8be(0x27f)+this[_0x28c8be(0x274)]+'.');let _0x177eb9=_0x5b84d6['headers'][_0x28c8be(0x201)]('location');if(_0x177eb9===null)throw new h('resource-download-invalid-redirect',_0x28c8be(0x251)+_0x5b84d6[_0x28c8be(0x258)]+_0x28c8be(0x286));let _0x3c2a3;try{_0x3c2a3=new URL(_0x177eb9,_0x2b63ce);}catch{throw new h('resource-download-invalid-redirect',_0x28c8be(0x223));}if(_0x3c2a3[_0x28c8be(0x275)]!==_0x28c8be(0x224))throw new h(_0x28c8be(0x244),_0x28c8be(0x200));_0x2b63ce=_0x3c2a3;continue;}if(!_0x5b84d6['ok'])throw new h(_0x28c8be(0x239),_0x28c8be(0x251)+_0x5b84d6[_0x28c8be(0x258)]+'.');if(_0x5b84d6['url']!==''&&new URL(_0x5b84d6['url'])[_0x28c8be(0x275)]!==_0x28c8be(0x224))throw new h(_0x28c8be(0x244),_0x28c8be(0x200));let _0x469522=await ce(_0x5b84d6,this[_0x28c8be(0x1e4)]);if(!V(_0x469522))throw new h(_0x28c8be(0x226),_0x28c8be(0x23e));return _0x469522;}}catch(_0x34b180){throw _0x5544ee[_0x28c8be(0x284)][_0x28c8be(0x266)]?new h(_0x28c8be(0x1ec),_0x28c8be(0x1de)+this[_0x28c8be(0x1fd)]+_0x28c8be(0x20b)):_0x34b180;}finally{clearTimeout(_0x1b2a0e);}}};function $(_0x1bdb37){const _0x1b3a4b=_0xf2a169;try{return JSON[_0x1b3a4b(0x1cf)](_0x4f5d48(_0x1bdb37,_0x1b3a4b(0x202)));}catch(_0x185c1f){throw new h(_0x1b3a4b(0x26f),_0x1b3a4b(0x21c)+_0x1bdb37+':\x20'+(_0x185c1f instanceof Error?_0x185c1f[_0x1b3a4b(0x1e2)]:String(_0x185c1f)),void 0x0,{'cause':_0x185c1f});}}function le(_0x36f6c2){const _0x5b0a8e=_0xf2a169;let _0x177be0;return()=>(_0x177be0??=W({'manifest':$(_0x36f6c2[_0x5b0a8e(0x276)]),'cache':new J(_0x36f6c2['cacheRoot']),'downloader':new Q(_0x36f6c2[_0x5b0a8e(0x205)]),'output':new Y()}),_0x177be0);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
1
+ const _0x21b277=_0x1cb0;(function(_0x198d6f,_0x46a218){const _0x2c7861=_0x1cb0,_0x3a5490=_0x198d6f();while(!![]){try{const _0x585a5f=-parseInt(_0x2c7861(0x163))/0x1*(-parseInt(_0x2c7861(0x11e))/0x2)+parseInt(_0x2c7861(0x15a))/0x3+parseInt(_0x2c7861(0x1b0))/0x4+parseInt(_0x2c7861(0x1bd))/0x5*(-parseInt(_0x2c7861(0x178))/0x6)+-parseInt(_0x2c7861(0x1e8))/0x7*(-parseInt(_0x2c7861(0x197))/0x8)+-parseInt(_0x2c7861(0x171))/0x9*(-parseInt(_0x2c7861(0x179))/0xa)+-parseInt(_0x2c7861(0x124))/0xb*(parseInt(_0x2c7861(0x14e))/0xc);if(_0x585a5f===_0x46a218)break;else _0x3a5490['push'](_0x3a5490['shift']());}catch(_0x572525){_0x3a5490['push'](_0x3a5490['shift']());}}}(_0x48ca,0xd1394));import{randomUUID as _0x568d4c}from'node:crypto';import{mkdir as _0x229735,readFile as _0x327b2b,readdir as _0x23a838,rename as _0x18e241,rm as _0x3a1ba3,stat as _0x338b48,unlink as _0xb6b66e,writeFile as _0x5bca69}from'node:fs/promises';import{dirname as _0x3a2a08,isAbsolute as _0x37d03e,join as _0x594d1b,parse as _0x26b40e,resolve as _0x395d44}from'node:path';import{readFileSync as _0x1fcc03}from'node:fs';var h=class extends Error{[_0x21b277(0x1af)];[_0x21b277(0x15b)];constructor(_0x743bdf,_0x29b91d,_0x562aa3,_0x2f0347){const _0x181a5c=_0x21b277;super(_0x29b91d,_0x2f0347),this[_0x181a5c(0x1af)]=_0x743bdf,this[_0x181a5c(0x15b)]=_0x562aa3,this[_0x181a5c(0x127)]=_0x181a5c(0x1de);}};function g(_0x1a8121){return _0x1a8121 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x3ffe41){const _0xa9e824=_0x21b277;return _[_0xa9e824(0x15f)](_0x3ffe41)&&_0x3ffe41!=='.'&&_0x3ffe41!=='..';}function x(_0x35f9dc){const _0x5c7ba9=_0x21b277;if(!b(_0x35f9dc)||_0x35f9dc[_0x5c7ba9(0x19f)]('-')||_0x35f9dc[_0x5c7ba9(0x1e5)]('--')||_0x35f9dc[_0x5c7ba9(0x1b4)]>v)throw new h(_0x5c7ba9(0x143),_0x5c7ba9(0x166)+_0x35f9dc+'\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.');}function S(_0x41072c){const _0x38ff78=_0x21b277;if(!b(_0x41072c)||_0x41072c[_0x38ff78(0x1b4)]+y>v)throw new h(_0x38ff78(0x1c5),_0x38ff78(0x151)+_0x41072c+_0x38ff78(0x1e1));}function _0x1cb0(_0x24f1aa,_0x514f49){_0x24f1aa=_0x24f1aa-0x11d;const _0x48ca62=_0x48ca();let _0x1cb0d5=_0x48ca62[_0x24f1aa];return _0x1cb0d5;}function C(_0x435b92){const _0x295b7f=_0x21b277;let _0x11120b=_0x435b92['split']('/');if(_0x11120b[_0x295b7f(0x1b4)]!==0x2||_0x11120b[0x0]===''||_0x11120b[0x1]==='')throw new h(_0x295b7f(0x17a),_0x295b7f(0x16a)+_0x435b92+'\x22;\x20expected\x20<registryId>/<resourceId>.',_0x435b92);let _0x1af40e=_0x11120b[0x0],_0x307032=_0x11120b[0x1];return x(_0x1af40e),S(_0x307032),{'registryId':_0x1af40e,'resourceId':_0x307032};}function ee(_0x463b1d,_0x5c0b96){return x(_0x463b1d),S(_0x5c0b96),_0x463b1d+'/'+_0x5c0b96;}function w(_0x519380){const _0x288ce1=_0x21b277;let {registryId:_0x701a12,resourceId:_0x1789fa}=C(_0x519380),_0x4ef26c=_0x701a12+'--'+_0x1789fa+_0x288ce1(0x1b2);if(_0x4ef26c[_0x288ce1(0x1b4)]>v)throw new h(_0x288ce1(0x1ea),_0x288ce1(0x1df)+v+'\x20bytes.',_0x519380);return _0x4ef26c;}function T(_0xf6e894){const _0x56dd67=_0x21b277;return new h(_0x56dd67(0x1e7),_0x56dd67(0x1a4)+_0xf6e894);}function _0x48ca(){const _0xae9f23=['Cannot\x20read\x20resource\x20manifest\x20at\x20','tags','group','resource-download-too-many-redirects','aborted','3381507haxQPG','handle','reference','cancel','type','test','globalIndex','utf8','\x20ID\x20\x22','1xmRXNk','resource-manifest-read-failed','resource-limit-invalid','Invalid\x20registry\x20ID\x20\x22','maxBytes','body','listRegistries','Invalid\x20resource\x20handle\x20\x22','en-US','location','resource-download-invalid-utf8','.description','cache','map','9EnIfOP','catch','set','has','\x20bytes.','isFinite','].input.registryId','2311734jQmoVj','1386020Hdlzgi','resource-invalid-handle','isArray','\x20without\x20a\x20Location\x20header.','\x20must\x20be\x20a\x20boolean.','.id','resource-invalid-svg','message','headers','.payload','intrinsicSize','\x20must\x20be\x20an\x20array.','cacheLocation','byteLength','registrations[','image','queries','\x20must\x20be\x20a\x20finite\x20number.','resources','registryById','\x22:\x20','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','.intrinsicSize.width','source','byteCount','\x20must\x20be\x20a\x20non-empty\x20string.','replace','utf-8','Duplicate\x20resource\x20handle\x20\x22','Resource\x20URL\x20must\x20use\x20HTTPS.','223480riTCjO','downloader','Resource\x20server\x20returned\x20HTTP\x20','description','manifest.registrations','registrationIndex','colorEditable','.name','startsWith','resource-download-insecure','Duplicate\x20','decode','.intrinsicSize.height','Invalid\x20resource\x20manifest:\x20','resource-download-invalid-svg','export','slice','catalog','\x20must\x20be\x20an\x20object.','Duplicate\x20registry\x20ID\x20\x22','.intrinsicSize\x20must\x20be\x20positive.','filter','https:','clear','code','1271904btNaOI',']\x20must\x20be\x20a\x20string.','.svg','resource-download-invalid-redirect','length','fetch','write','NFKC','].input.resources[','maxRedirects','.type\x20must\x20be\x20\x22image\x22.','text','keywords','20JSbpGW','width','output','order','status','value','done','resource','resource-invalid-resource-id','isInteger','\x20contains\x20no\x20usable\x20localized\x20text.','searchText','values','].input','size','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','isFile','label','abort','.resource-','protocol','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','concat','toLowerCase','number','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','entries','.source','download','boolean','manifest','string','resource-not-found','ResourceLibraryError','Resource\x20export\x20filename\x20exceeds\x20','object','\x22:\x20expected\x20filesystem-safe\x20characters.','read','.source.type\x20must\x20be\x20\x22url\x22.','.storagePolicy\x20must\x20be\x20\x22reference\x22.','includes','resourceByHandle','resource-manifest-invalid','7DPHbAs','join','resource-export-filename-too-long','.tmp','pid','manual','isDirectory','.groupId\x20references\x20unknown\x20group\x20\x22','2986004kTfcPV','normalize','resourceCount','resourceIndex','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','resource-export-failed','33CqwZcu','].input.tags','options','name','.source.value\x20must\x20use\x20HTTPS.','groupId','handles','resource-registry-not-found','ENOENT','input','tagIds','registries','.groupId','Failed\x20to\x20download\x20\x22','timeoutMs','].input.groups','.source.value\x20must\x20be\x20a\x20URL.','registry','push','height','].input.resources','registryId','trim','clearCache','some','groups','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','.keywords','defaultLocale','get','signal','resource-invalid-registry-id','\x20ms.','registrations\x20must\x20not\x20be\x20empty.','.tagIds','fetchImpl','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','.tagIds\x20references\x20unknown\x20tag\x20\x22','path','find','].id','Unknown\x20resource\x20\x22','2826192ZumIkT','url','Duplicate\x20export\x20filename\x20\x22','Invalid\x20resource\x20ID\x20\x22','Unknown\x20resource\x20registry\x20\x22','root','getReader'];_0x48ca=function(){return _0xae9f23;};return _0x48ca();}function E(_0xa85802,_0x2716c8){const _0x2eb61f=_0x21b277;if(typeof _0xa85802!=_0x2eb61f(0x1e0)||!_0xa85802||Array[_0x2eb61f(0x17b)](_0xa85802))throw T(_0x2716c8+_0x2eb61f(0x1a9));return _0xa85802;}function D(_0x90c69f,_0x2bf337,_0x10a850=!0x1){const _0x25a3a8=_0x21b277;if(_0x10a850&&_0x90c69f===void 0x0)return[];if(!Array[_0x25a3a8(0x17b)](_0x90c69f))throw T(_0x2bf337+_0x25a3a8(0x184));return _0x90c69f;}function O(_0x10a338,_0x35149b){const _0x52f34d=_0x21b277;if(typeof _0x10a338!=_0x52f34d(0x1dc)||_0x10a338==='')throw T(_0x35149b+_0x52f34d(0x192));return _0x10a338;}function k(_0x3af8b2,_0x11d466,_0x2e6057=!0x1){const _0x5e5601=_0x21b277;return D(_0x3af8b2,_0x11d466,_0x2e6057)[_0x5e5601(0x170)]((_0x1db9d4,_0x261e5e)=>O(_0x1db9d4,_0x11d466+'['+_0x261e5e+']'));}function A(_0x34d2f3,_0x538845){const _0x24afec=_0x21b277;return D(_0x34d2f3,_0x538845,!0x0)[_0x24afec(0x170)]((_0x1a54d9,_0x23c37b)=>{const _0x577a02=_0x24afec;if(typeof _0x1a54d9!='string')throw T(_0x538845+'['+_0x23c37b+_0x577a02(0x1b1));return _0x1a54d9;})[_0x24afec(0x1ac)](_0xa4cf8f=>_0xa4cf8f!=='');}function j(_0x1f1eda,_0x91c572){const _0x58ebb7=_0x21b277;if(typeof _0x1f1eda!=_0x58ebb7(0x1d5)||!Number[_0x58ebb7(0x176)](_0x1f1eda))throw T(_0x91c572+_0x58ebb7(0x18a));return _0x1f1eda;}function M(_0x4a2db0,_0x23d608){const _0x2f3b77=_0x21b277;if(typeof _0x4a2db0!=_0x2f3b77(0x1da))throw T(_0x23d608+_0x2f3b77(0x17d));return _0x4a2db0;}function N(_0x404e53,_0x130f90,_0x4db35b){const _0x5c2a97=_0x21b277;if(typeof _0x404e53=='string'&&_0x404e53!=='')return _0x404e53;let _0x49253c=E(_0x404e53,_0x130f90),_0x1ee734=_0x4db35b===void 0x0?void 0x0:_0x49253c[_0x4db35b];if(typeof _0x1ee734==_0x5c2a97(0x1dc)&&_0x1ee734!=='')return _0x1ee734;let _0x236fd4=_0x49253c[_0x5c2a97(0x16b)];if(typeof _0x236fd4==_0x5c2a97(0x1dc)&&_0x236fd4!=='')return _0x236fd4;let _0x2fb988=Object[_0x5c2a97(0x1c9)](_0x49253c)[_0x5c2a97(0x14b)](_0x3be431=>typeof _0x3be431=='string'&&_0x3be431!=='');if(_0x2fb988!==void 0x0)return _0x2fb988;throw T(_0x130f90+_0x5c2a97(0x1c7));}function P(_0x1835d2,_0x105db4,_0x5a657f){const _0x2757b1=_0x21b277;try{_0x5a657f==='registry'?x(_0x1835d2):S(_0x1835d2);}catch(_0x2edfc3){throw T(_0x105db4+':\x20'+(_0x2edfc3 instanceof Error?_0x2edfc3[_0x2757b1(0x180)]:String(_0x2edfc3)));}}function F(_0x45ebb4,_0x404e27,_0xfc89c8){const _0x173b93=_0x21b277;let _0x5655c7=new Map();for(let [_0x1c090d,_0x346c82]of D(_0x45ebb4,_0x404e27,!0x0)[_0x173b93(0x1d7)]()){let _0xf00ba=E(_0x346c82,_0x404e27+'['+_0x1c090d+']'),_0x493705=O(_0xf00ba['id'],_0x404e27+'['+_0x1c090d+_0x173b93(0x14c));if(P(_0x493705,_0x404e27+'['+_0x1c090d+_0x173b93(0x14c),'resource'),_0x5655c7[_0x173b93(0x174)](_0x493705))throw T(_0x173b93(0x1a1)+_0x404e27+_0x173b93(0x162)+_0x493705+'\x22.');_0x5655c7[_0x173b93(0x173)](_0x493705,N(_0xf00ba['label'],_0x404e27+'['+_0x1c090d+'].label',_0xfc89c8));}return _0x5655c7;}function I(_0x3dfcec,_0xf18a94){const _0x3b4255=_0x21b277;let _0x4a43ec=E(_0x3dfcec[_0x3b4255(0x183)],_0xf18a94+'.intrinsicSize'),_0x29c8b5=j(_0x4a43ec[_0x3b4255(0x1be)],_0xf18a94+_0x3b4255(0x18f)),_0x584875=j(_0x4a43ec[_0x3b4255(0x137)],_0xf18a94+_0x3b4255(0x1a3));if(_0x29c8b5<=0x0||_0x584875<=0x0)throw T(_0xf18a94+_0x3b4255(0x1ab));return{'width':_0x29c8b5,'height':_0x584875};}function L(_0x24d6e9,_0x382cab){const _0xc8815e=_0x21b277;if(_0x24d6e9['type']!==_0xc8815e(0x188))throw T(_0x382cab+_0xc8815e(0x1ba));if(_0x24d6e9['storagePolicy']!==_0xc8815e(0x15c))throw T(_0x382cab+_0xc8815e(0x1e4));let _0x2da962=E(_0x24d6e9[_0xc8815e(0x190)],_0x382cab+_0xc8815e(0x1d8));if(_0x2da962[_0xc8815e(0x15e)]!==_0xc8815e(0x14f))throw T(_0x382cab+_0xc8815e(0x1e3));let _0x53a96d=O(_0x2da962['value'],_0x382cab+'.source.value'),_0x2bac46;try{_0x2bac46=new URL(_0x53a96d);}catch{throw T(_0x382cab+_0xc8815e(0x134));}if(_0x2bac46[_0xc8815e(0x1d1)]!==_0xc8815e(0x1ad))throw T(_0x382cab+_0xc8815e(0x128));return _0x53a96d;}function R(_0x404cb5){const _0x47dfe8=_0x21b277;return _0x404cb5[_0x47dfe8(0x11f)](_0x47dfe8(0x1b7))[_0x47dfe8(0x1d4)]()[_0x47dfe8(0x13a)]()[_0x47dfe8(0x193)](/\s+/gu,'\x20');}function z(_0x44ca81){const _0x65c4cc=_0x21b277;let _0x3c878b=E(_0x44ca81,_0x65c4cc(0x1db)),_0x23a565=new Map(),_0x2d82e7=new Map(),_0x3f0d03=[],_0x1178fc=[],_0x1d15e5=new Set(),_0x4061d1=0x0;for(let [_0x5d626d,_0x1dadf6]of D(_0x3c878b['registrations'],_0x65c4cc(0x19b))['entries']()){let _0x39337b=E(E(_0x1dadf6,'registrations['+_0x5d626d+']')[_0x65c4cc(0x12d)],'registrations['+_0x5d626d+_0x65c4cc(0x1ca)),_0x15041c=O(_0x39337b[_0x65c4cc(0x139)],'registrations['+_0x5d626d+'].input.registryId');if(P(_0x15041c,_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x177),_0x65c4cc(0x135)),_0x23a565[_0x65c4cc(0x174)](_0x15041c))throw T(_0x65c4cc(0x1aa)+_0x15041c+'\x22.');let _0x253bee=_0x39337b[_0x65c4cc(0x140)]===void 0x0?void 0x0:O(_0x39337b['defaultLocale'],_0x65c4cc(0x187)+_0x5d626d+'].input.defaultLocale'),_0x5894d6=F(_0x39337b[_0x65c4cc(0x13d)],'registrations['+_0x5d626d+_0x65c4cc(0x133),_0x253bee),_0x59c40e=F(_0x39337b[_0x65c4cc(0x156)],_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x125),_0x253bee),_0x39e26c=[];for(let [_0x2b42eb,_0x4167c7]of D(_0x39337b[_0x65c4cc(0x18b)],_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x138))[_0x65c4cc(0x1d7)]()){let _0x2d8247=_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x1b8)+_0x2b42eb+']',_0x1b7479=E(_0x4167c7,_0x2d8247),_0x2aa883=O(_0x1b7479['id'],_0x2d8247+_0x65c4cc(0x17e));P(_0x2aa883,_0x2d8247+_0x65c4cc(0x17e),_0x65c4cc(0x1c4));let _0x3a2a73=ee(_0x15041c,_0x2aa883);if(_0x2d82e7['has'](_0x3a2a73))throw T(_0x65c4cc(0x195)+_0x3a2a73+'\x22.');let _0x27e414;try{_0x27e414=w(_0x3a2a73);}catch(_0xcc406e){throw T(_0x2d8247+':\x20'+(_0xcc406e instanceof Error?_0xcc406e[_0x65c4cc(0x180)]:String(_0xcc406e)));}if(_0x1d15e5[_0x65c4cc(0x174)](_0x27e414))throw T(_0x65c4cc(0x150)+_0x27e414+'\x22.');_0x1d15e5['add'](_0x27e414);let _0x30727f=_0x1b7479['groupId']===void 0x0?void 0x0:O(_0x1b7479[_0x65c4cc(0x129)],_0x2d8247+_0x65c4cc(0x130));if(_0x30727f!==void 0x0&&!_0x5894d6[_0x65c4cc(0x174)](_0x30727f))throw T(_0x2d8247+_0x65c4cc(0x11d)+_0x30727f+'\x22.');let _0x5c72a5=k(_0x1b7479[_0x65c4cc(0x12e)],_0x2d8247+_0x65c4cc(0x146),!0x0);for(let _0x2c1eae of _0x5c72a5)if(!_0x59c40e[_0x65c4cc(0x174)](_0x2c1eae))throw T(_0x2d8247+_0x65c4cc(0x149)+_0x2c1eae+'\x22.');let _0x534f67=A(_0x1b7479[_0x65c4cc(0x1bc)],_0x2d8247+_0x65c4cc(0x13f)),_0x3e4953=N(_0x1b7479[_0x65c4cc(0x127)],_0x2d8247+_0x65c4cc(0x19e),_0x253bee),_0x169b76=_0x1b7479['description']===void 0x0?void 0x0:N(_0x1b7479[_0x65c4cc(0x19a)],_0x2d8247+_0x65c4cc(0x16e),_0x253bee),_0x1dd320=_0x30727f===void 0x0?null:{'id':_0x30727f,'label':_0x5894d6[_0x65c4cc(0x141)](_0x30727f)},_0x450ae6=_0x5c72a5[_0x65c4cc(0x170)](_0x4e1a6e=>({'id':_0x4e1a6e,'label':_0x59c40e[_0x65c4cc(0x141)](_0x4e1a6e)})),_0x20716d=E(_0x1b7479['payload'],_0x2d8247+_0x65c4cc(0x182)),_0x7cdc4c=_0x1b7479['order']===void 0x0?null:j(_0x1b7479['order'],_0x2d8247+'.order'),_0x1c737c=M(_0x20716d[_0x65c4cc(0x19d)],_0x2d8247+'.payload.colorEditable'),_0x1450e3={'handle':_0x3a2a73,'registryId':_0x15041c,'id':_0x2aa883,'name':_0x3e4953,..._0x169b76===void 0x0?{}:{'description':_0x169b76},'group':_0x1dd320,'tags':_0x450ae6,'keywords':_0x534f67,'order':_0x7cdc4c,'intrinsicSize':I(_0x20716d,_0x2d8247+_0x65c4cc(0x182)),'colorEditable':_0x1c737c,'sourceUrl':L(_0x20716d,_0x2d8247+_0x65c4cc(0x182)),'registrationIndex':_0x5d626d,'resourceIndex':_0x2b42eb,'globalIndex':_0x4061d1,'searchText':R([_0x3e4953,_0x169b76,_0x1dd320?.[_0x65c4cc(0x1ce)],..._0x450ae6[_0x65c4cc(0x170)](_0x531e85=>_0x531e85[_0x65c4cc(0x1ce)]),..._0x534f67][_0x65c4cc(0x1ac)](_0x38c307=>_0x38c307!==void 0x0)[_0x65c4cc(0x1e9)]('\x20'))};_0x4061d1++,_0x39e26c['push'](_0x1450e3),_0x1178fc[_0x65c4cc(0x136)](_0x1450e3),_0x2d82e7[_0x65c4cc(0x173)](_0x3a2a73,_0x1450e3);}let _0x330842={'id':_0x15041c,'groups':_0x5894d6,'tags':_0x59c40e,'resources':_0x39e26c};_0x3f0d03['push'](_0x330842),_0x23a565[_0x65c4cc(0x173)](_0x15041c,_0x330842);}if(_0x3f0d03['length']===0x0)throw T(_0x65c4cc(0x145));return{'registries':_0x3f0d03,'registryById':_0x23a565,'resourceByHandle':_0x2d82e7,'resources':_0x1178fc};}function B(_0x35669d,_0x5dd396){const _0x391b24=_0x21b277;C(_0x5dd396);let _0x59a809=_0x35669d[_0x391b24(0x1e6)]['get'](_0x5dd396);if(_0x59a809===void 0x0)throw new h(_0x391b24(0x1dd),_0x391b24(0x14d)+_0x5dd396+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x5dd396);return _0x59a809;}function te(_0x23ce7a){const _0x23277e=_0x21b277;return _0x23ce7a[_0x23277e(0x12f)]['map'](_0x14b5c6=>({'id':_0x14b5c6['id'],'resourceCount':_0x14b5c6[_0x23277e(0x18b)][_0x23277e(0x1b4)],'groupCount':_0x14b5c6[_0x23277e(0x13d)]['size'],'tagCount':_0x14b5c6[_0x23277e(0x156)]['size'],'colorEditableCount':_0x14b5c6['resources'][_0x23277e(0x1ac)](_0x37f80d=>_0x37f80d['colorEditable'])[_0x23277e(0x1b4)]}));}function ne(_0x3fc505){const _0x500361=_0x21b277;return{'handle':_0x3fc505[_0x500361(0x15b)],'registryId':_0x3fc505[_0x500361(0x139)],'id':_0x3fc505['id'],'name':_0x3fc505[_0x500361(0x127)],'group':_0x3fc505[_0x500361(0x157)],'tags':_0x3fc505['tags'],'keywords':_0x3fc505[_0x500361(0x1bc)],'order':_0x3fc505['order'],'intrinsicSize':_0x3fc505[_0x500361(0x183)],'colorEditable':_0x3fc505[_0x500361(0x19d)]};}function re(_0xc9217f,_0x6f6f55){const _0x2d1d1b=_0x21b277;let _0x5562a3=(_0xc9217f[_0x2d1d1b(0x1c0)]??_0xc9217f['globalIndex'])-(_0x6f6f55[_0x2d1d1b(0x1c0)]??_0x6f6f55[_0x2d1d1b(0x160)]);if(_0x5562a3!==0x0)return _0x5562a3;let _0x4a619a=_0xc9217f['registrationIndex']-_0x6f6f55[_0x2d1d1b(0x19c)];if(_0x4a619a!==0x0)return _0x4a619a;let _0x3bf6c0=_0xc9217f['resourceIndex']-_0x6f6f55[_0x2d1d1b(0x121)];return _0x3bf6c0===0x0?_0xc9217f[_0x2d1d1b(0x15b)]['localeCompare'](_0x6f6f55[_0x2d1d1b(0x15b)]):_0x3bf6c0;}function ie(_0x3db298,_0xac730a){const _0x39f72e=_0x21b277;let _0x4ce6f4=_0xac730a[_0x39f72e(0x189)][_0x39f72e(0x170)](R)[_0x39f72e(0x1ac)](_0x170cb5=>_0x170cb5!=='');if(_0x4ce6f4['length']===0x0)throw new h('resource-query-empty',_0x39f72e(0x1cc));let _0x1df9d2=new Set(_0xac730a[_0x39f72e(0x12f)]??[]);for(let _0x165643 of _0x1df9d2)if(!_0x3db298[_0x39f72e(0x18c)]['has'](_0x165643))throw new h(_0x39f72e(0x12b),_0x39f72e(0x152)+_0x165643+'\x22.');let _0x1b498a=_0xac730a['limit']??_0x3db298[_0x39f72e(0x18b)][_0x39f72e(0x1b4)];if(!Number[_0x39f72e(0x1c6)](_0x1b498a)||_0x1b498a<0x1)throw new h(_0x39f72e(0x165),_0x39f72e(0x13e)+_0x1b498a+'\x22.');let _0x42372b=_0x3db298[_0x39f72e(0x18b)]['filter'](_0x4e0b28=>_0x1df9d2[_0x39f72e(0x1cb)]===0x0||_0x1df9d2[_0x39f72e(0x174)](_0x4e0b28[_0x39f72e(0x139)]))['filter'](_0x47df9d=>_0x4ce6f4[_0x39f72e(0x13c)](_0x501ab4=>_0x47df9d[_0x39f72e(0x1c8)]['includes'](_0x501ab4)))['sort'](re);return{'resources':_0x42372b[_0x39f72e(0x1a7)](0x0,_0x1b498a)[_0x39f72e(0x170)](ne),'total':_0x42372b['length']};}function V(_0x3247af){const _0x146d28=_0x21b277;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x146d28(0x15f)](_0x3247af);}function H(_0x51adf4,_0x4562c2){const _0x4addd2=_0x21b277;return g(_0x4562c2)?{'handle':_0x51adf4,'code':_0x4562c2[_0x4addd2(0x1af)],'message':_0x4562c2[_0x4addd2(0x180)]}:{'handle':_0x51adf4,'code':_0x4addd2(0x123),'message':_0x4562c2 instanceof Error?_0x4562c2[_0x4addd2(0x180)]:String(_0x4562c2)};}var U=class{[_0x21b277(0x126)];[_0x21b277(0x1a8)];constructor(_0x3b461e){const _0x14b952=_0x21b277;this[_0x14b952(0x126)]=_0x3b461e,this[_0x14b952(0x1a8)]=z(_0x3b461e[_0x14b952(0x1db)]);}get[_0x21b277(0x185)](){const _0x37cce5=_0x21b277;return this['options'][_0x37cce5(0x16f)][_0x37cce5(0x16c)];}[_0x21b277(0x169)](){const _0x4699a=_0x21b277;return te(this[_0x4699a(0x1a8)]);}['find'](_0x1e76e2){return ie(this['catalog'],_0x1e76e2);}async['read'](_0x3a3322){const _0x200bf6=_0x21b277;let _0x401e3e=B(this['catalog'],_0x3a3322[_0x200bf6(0x15b)]),_0x498013=await this[_0x200bf6(0x126)][_0x200bf6(0x16f)][_0x200bf6(0x1e2)](_0x3a3322[_0x200bf6(0x15b)]);if(_0x498013!==void 0x0&&V(_0x498013))return{'handle':_0x3a3322[_0x200bf6(0x15b)],'svg':_0x498013};let _0x5e5967;try{_0x5e5967=await this[_0x200bf6(0x126)][_0x200bf6(0x198)][_0x200bf6(0x1d9)](_0x401e3e['sourceUrl']);}catch(_0x4df8fb){throw g(_0x4df8fb)?_0x4df8fb:new h('resource-download-failed',_0x200bf6(0x131)+_0x3a3322['handle']+_0x200bf6(0x18d)+(_0x4df8fb instanceof Error?_0x4df8fb[_0x200bf6(0x180)]:String(_0x4df8fb)),_0x3a3322[_0x200bf6(0x15b)],{'cause':_0x4df8fb});}if(!V(_0x5e5967))throw new h(_0x200bf6(0x17f),'Downloaded\x20resource\x20\x22'+_0x3a3322[_0x200bf6(0x15b)]+'\x22\x20is\x20not\x20an\x20SVG\x20document.',_0x3a3322['handle']);return await this[_0x200bf6(0x126)][_0x200bf6(0x16f)]['write'](_0x3a3322[_0x200bf6(0x15b)],_0x5e5967),{'handle':_0x3a3322[_0x200bf6(0x15b)],'svg':_0x5e5967};}async[_0x21b277(0x1a6)](_0x37fa4a){const _0x28ae5f=_0x21b277;let _0x81d449=[],_0x4150bf=[];for(let _0x413c21 of _0x37fa4a[_0x28ae5f(0x12a)])try{let {svg:_0xa76e99}=await this['read']({'handle':_0x413c21}),_0x2b0c87=await this['options'][_0x28ae5f(0x1bf)][_0x28ae5f(0x1b6)](_0x37fa4a['destination'],w(_0x413c21),_0xa76e99);_0x81d449[_0x28ae5f(0x136)]({'handle':_0x413c21,'path':_0x2b0c87});}catch(_0x3b2d86){_0x4150bf[_0x28ae5f(0x136)](H(_0x413c21,_0x3b2d86));}return{'exported':_0x81d449,'failed':_0x4150bf};}async[_0x21b277(0x13b)](){const _0x2fbf2f=_0x21b277;return await this[_0x2fbf2f(0x126)][_0x2fbf2f(0x16f)][_0x2fbf2f(0x1ae)]();}};function W(_0x589368){return new U(_0x589368);}function G(_0x33eb6f){return _0x33eb6f instanceof Error&&'code'in _0x33eb6f;}function K(_0x543def){const _0x9ad95=_0x21b277;let _0x32f0bc=_0x395d44(_0x543def);if(!_0x37d03e(_0x543def)||_0x32f0bc===_0x26b40e(_0x32f0bc)[_0x9ad95(0x153)])throw new h('resource-cache-root-invalid',_0x9ad95(0x1d2)+_0x543def+'\x22.');return _0x32f0bc;}async function q(_0x9a0f73){const _0x2281bd=_0x21b277;let _0x632cf0;try{_0x632cf0=await _0x23a838(_0x9a0f73,{'withFileTypes':!0x0});}catch(_0x12a781){if(G(_0x12a781)&&_0x12a781[_0x2281bd(0x1af)]===_0x2281bd(0x12c))return{'resourceCount':0x0,'byteCount':0x0};throw _0x12a781;}let _0x21042f=0x0,_0x79df33=0x0;for(let _0x261dbb of _0x632cf0){let _0x55ba84=_0x594d1b(_0x9a0f73,_0x261dbb['name']);if(_0x261dbb[_0x2281bd(0x1ee)]()){let _0x2c7a14=await q(_0x55ba84);_0x21042f+=_0x2c7a14[_0x2281bd(0x120)],_0x79df33+=_0x2c7a14[_0x2281bd(0x191)];}else{if(_0x261dbb[_0x2281bd(0x1cd)]()&&_0x261dbb[_0x2281bd(0x127)]['endsWith'](_0x2281bd(0x1b2))){let _0x534893=await _0x338b48(_0x55ba84);_0x21042f++,_0x79df33+=_0x534893[_0x2281bd(0x1cb)];}}}return{'resourceCount':_0x21042f,'byteCount':_0x79df33};}var J=class{[_0x21b277(0x16c)];constructor(_0x21b49e){this['location']=K(_0x21b49e);}[_0x21b277(0x14a)](_0x45fbe9){const _0x7c6ed7=_0x21b277;let {registryId:_0x15de7b,resourceId:_0x1999fe}=C(_0x45fbe9);return _0x594d1b(this[_0x7c6ed7(0x16c)],_0x15de7b,_0x1999fe+_0x7c6ed7(0x1b2));}async[_0x21b277(0x1e2)](_0x307a2e){const _0x44ae2c=_0x21b277;try{return await _0x327b2b(this['path'](_0x307a2e),_0x44ae2c(0x161));}catch(_0x1a06b7){if(G(_0x1a06b7)&&_0x1a06b7[_0x44ae2c(0x1af)]===_0x44ae2c(0x12c))return;throw _0x1a06b7;}}async[_0x21b277(0x1b6)](_0x47e4f0,_0x1ce930){const _0x403efe=_0x21b277;let _0x4534fd=this[_0x403efe(0x14a)](_0x47e4f0);await _0x229735(_0x3a2a08(_0x4534fd),{'recursive':!0x0});let _0x37bf04=_0x594d1b(_0x3a2a08(_0x4534fd),_0x403efe(0x1d0)+process[_0x403efe(0x1ec)]+'-'+_0x568d4c()+_0x403efe(0x1eb));try{await _0x5bca69(_0x37bf04,_0x1ce930,{'encoding':_0x403efe(0x161),'mode':0x180}),await _0x18e241(_0x37bf04,_0x4534fd);}catch(_0x287ee6){throw await _0xb6b66e(_0x37bf04)[_0x403efe(0x172)](()=>void 0x0),_0x287ee6;}}async['clear'](){const _0x1b6b24=_0x21b277;let _0x466bed=await q(this[_0x1b6b24(0x16c)]);return await _0x3a1ba3(this[_0x1b6b24(0x16c)],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x466bed};}},Y=class{async[_0x21b277(0x1b6)](_0x345079,_0x46821d,_0x500335){const _0x4c125d=_0x21b277;await _0x229735(_0x345079,{'recursive':!0x0});let _0x1c6594=_0x594d1b(_0x345079,_0x46821d);return await _0x5bca69(_0x1c6594,_0x500335,_0x4c125d(0x161)),_0x1c6594;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x53a11e){const _0x782de5=_0x21b277;return new h('resource-download-too-large',_0x782de5(0x122)+_0x53a11e+_0x782de5(0x175));}async function ce(_0x1d77e5,_0x49392e){const _0x48362a=_0x21b277;let _0x4b87b3=Number(_0x1d77e5[_0x48362a(0x181)]['get']('content-length'));if(Number['isFinite'](_0x4b87b3)&&_0x4b87b3>_0x49392e)throw Z(_0x49392e);if(_0x1d77e5[_0x48362a(0x168)]===null){let _0x2d827d=await _0x1d77e5[_0x48362a(0x1bb)]();if(Buffer[_0x48362a(0x186)](_0x2d827d)>_0x49392e)throw Z(_0x49392e);return _0x2d827d;}let _0x2c9438=_0x1d77e5[_0x48362a(0x168)][_0x48362a(0x154)](),_0x505acd=[],_0xbea7a4=0x0;try{for(;;){let _0x473e8f=await _0x2c9438[_0x48362a(0x1e2)]();if(_0x473e8f[_0x48362a(0x1c3)])break;if(_0xbea7a4+=_0x473e8f[_0x48362a(0x1c2)][_0x48362a(0x186)],_0xbea7a4>_0x49392e)throw await _0x2c9438[_0x48362a(0x15d)]()['catch'](()=>void 0x0),Z(_0x49392e);_0x505acd['push'](_0x473e8f[_0x48362a(0x1c2)]);}}finally{_0x2c9438['releaseLock']();}try{return new TextDecoder(_0x48362a(0x194),{'fatal':!0x0})[_0x48362a(0x1a2)](Buffer[_0x48362a(0x1d3)](_0x505acd,_0xbea7a4));}catch{throw new h(_0x48362a(0x16d),_0x48362a(0x1d6));}}var Q=class{[_0x21b277(0x147)];['timeoutMs'];[_0x21b277(0x167)];['maxRedirects'];constructor(_0x490091={}){const _0x215b9d=_0x21b277;this[_0x215b9d(0x147)]=_0x490091[_0x215b9d(0x1b5)]??fetch,this[_0x215b9d(0x132)]=_0x490091[_0x215b9d(0x132)]??X,this[_0x215b9d(0x167)]=_0x490091[_0x215b9d(0x167)]??ae,this['maxRedirects']=_0x490091[_0x215b9d(0x1b9)]??oe;}async[_0x21b277(0x1d9)](_0x158e63){const _0x10bd92=_0x21b277;let _0x5cbb2f=new URL(_0x158e63);if(_0x5cbb2f[_0x10bd92(0x1d1)]!=='https:')throw new h(_0x10bd92(0x1a0),_0x10bd92(0x196));let _0x4d122f=new AbortController(),_0x28ebed=setTimeout(()=>_0x4d122f[_0x10bd92(0x1cf)](),this[_0x10bd92(0x132)]);try{let _0x201315=_0x5cbb2f;for(let _0x5575f4=0x0;;_0x5575f4++){let _0x22af4e=await this[_0x10bd92(0x147)](_0x201315,{'redirect':_0x10bd92(0x1ed),'signal':_0x4d122f[_0x10bd92(0x142)]});if(se[_0x10bd92(0x174)](_0x22af4e[_0x10bd92(0x1c1)])){if(_0x5575f4>=this[_0x10bd92(0x1b9)])throw new h(_0x10bd92(0x158),'Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20'+this[_0x10bd92(0x1b9)]+'.');let _0x7a9937=_0x22af4e['headers'][_0x10bd92(0x141)](_0x10bd92(0x16c));if(_0x7a9937===null)throw new h(_0x10bd92(0x1b3),_0x10bd92(0x199)+_0x22af4e[_0x10bd92(0x1c1)]+_0x10bd92(0x17c));let _0x11af56;try{_0x11af56=new URL(_0x7a9937,_0x201315);}catch{throw new h('resource-download-invalid-redirect',_0x10bd92(0x148));}if(_0x11af56['protocol']!==_0x10bd92(0x1ad))throw new h('resource-download-insecure-redirect',_0x10bd92(0x18e));_0x201315=_0x11af56;continue;}if(!_0x22af4e['ok'])throw new h('resource-download-http',_0x10bd92(0x199)+_0x22af4e['status']+'.');if(_0x22af4e[_0x10bd92(0x14f)]!==''&&new URL(_0x22af4e['url'])[_0x10bd92(0x1d1)]!==_0x10bd92(0x1ad))throw new h('resource-download-insecure-redirect','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x52b4d2=await ce(_0x22af4e,this[_0x10bd92(0x167)]);if(!V(_0x52b4d2))throw new h(_0x10bd92(0x1a5),'Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.');return _0x52b4d2;}}catch(_0x22c394){throw _0x4d122f[_0x10bd92(0x142)][_0x10bd92(0x159)]?new h('resource-download-timeout','Resource\x20download\x20timed\x20out\x20after\x20'+this[_0x10bd92(0x132)]+_0x10bd92(0x144)):_0x22c394;}finally{clearTimeout(_0x28ebed);}}};function $(_0x239c11){const _0x441ac9=_0x21b277;try{return JSON['parse'](_0x1fcc03(_0x239c11,'utf8'));}catch(_0x6e539b){throw new h(_0x441ac9(0x164),_0x441ac9(0x155)+_0x239c11+':\x20'+(_0x6e539b instanceof Error?_0x6e539b['message']:String(_0x6e539b)),void 0x0,{'cause':_0x6e539b});}}function le(_0x32f136){const _0x26d202=_0x21b277;let _0x1f1509;return()=>(_0x1f1509??=W({'manifest':$(_0x32f136['manifestPath']),'cache':new J(_0x32f136['cacheRoot']),'downloader':new Q(_0x32f136[_0x26d202(0x198)]),'output':new Y()}),_0x1f1509);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/resource-library",
3
3
  "type": "module",
4
- "version": "1.6.0",
4
+ "version": "1.6.2",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",