@univer-cli/resource-library 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2b7f(_0x5ecc42,_0x271a6c){_0x5ecc42=_0x5ecc42-0x1ae;const _0x54fd31=_0x54fd();let _0x2b7f7c=_0x54fd31[_0x5ecc42];return _0x2b7f7c;}const _0x19c91c=_0x2b7f;(function(_0x5abb1a,_0x254e1d){const _0x43f1bd=_0x2b7f,_0x6c601d=_0x5abb1a();while(!![]){try{const _0x461ba4=-parseInt(_0x43f1bd(0x207))/0x1*(parseInt(_0x43f1bd(0x22c))/0x2)+-parseInt(_0x43f1bd(0x237))/0x3+-parseInt(_0x43f1bd(0x20a))/0x4*(parseInt(_0x43f1bd(0x24d))/0x5)+parseInt(_0x43f1bd(0x20c))/0x6+-parseInt(_0x43f1bd(0x1e7))/0x7+-parseInt(_0x43f1bd(0x228))/0x8+parseInt(_0x43f1bd(0x273))/0x9*(parseInt(_0x43f1bd(0x217))/0xa);if(_0x461ba4===_0x254e1d)break;else _0x6c601d['push'](_0x6c601d['shift']());}catch(_0x9b2e43){_0x6c601d['push'](_0x6c601d['shift']());}}}(_0x54fd,0x8292f));function _0x54fd(){const _0x282fa8=['tags','en-US','length','manifest.registrations','body','number','catalog','concat','protocol','.source.value\x20must\x20use\x20HTTPS.','.tagIds','split','byteLength','.resource-','resource','Invalid\x20resource\x20manifest:\x20','\x20must\x20be\x20a\x20non-empty\x20string.','Failed\x20to\x20download\x20\x22','searchText','groups','].input.resources','ResourceLibraryError','get','queries','resource-registry-not-found','.groupId\x20references\x20unknown\x20group\x20\x22','\x20ms.','intrinsicSize','pid','resource-not-found','18424242WeGfiB','join','content-length','tagIds','name','filter','.groupId','].input.groups','isDirectory','\x22\x20is\x20not\x20an\x20SVG\x20document.','resource-invalid-registry-id','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','size','NFKC','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','\x20ID\x20\x22','image','maxBytes','string','label','read','find','.payload.colorEditable','resource-export-filename-too-long','options','resource-download-too-many-redirects','registrationIndex','.order','isFile','manual','width','values','resource-cache-root-invalid','aborted','.id','resource-invalid-svg','catch','listRegistries','\x20contains\x20no\x20usable\x20localized\x20text.','Invalid\x20registry\x20ID\x20\x22','Unknown\x20resource\x20registry\x20\x22','getReader','cacheRoot','resource-manifest-invalid','registry','destination','defaultLocale','].label','Unknown\x20resource\x20\x22','isArray','.tagIds\x20references\x20unknown\x20tag\x20\x22','replace','toLowerCase','resourceIndex','].input.registryId','Resource\x20server\x20returned\x20HTTP\x20','.description','.intrinsicSize.width','https:','resource-export-failed','isFinite','.intrinsicSize.height','registries','.keywords','headers','handles','4474799AxvVhv','byteCount','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','].id','.name','Duplicate\x20registry\x20ID\x20\x22','payload','resources','cache','Invalid\x20resource\x20ID\x20\x22','includes','.tmp','download','some','registrations','height','\x20bytes.','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','resource-manifest-read-failed','.intrinsicSize\x20must\x20be\x20positive.','url','map','timeoutMs','\x20without\x20a\x20Location\x20header.','Resource\x20URL\x20must\x20use\x20HTTPS.','location','description','maxRedirects','set','Invalid\x20resource\x20handle\x20\x22','ENOENT','signal','1627BCSsTI','resource-limit-invalid','\x20must\x20be\x20an\x20array.','15536mcphLC','\x20must\x20be\x20an\x20object.','563964IiRwnG','reference','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','resource-query-empty','\x20must\x20be\x20a\x20finite\x20number.','fetchImpl','startsWith','.payload','resource-invalid-handle','].input.resources[','20hzDntu','globalIndex','code','registryById','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','clear','type','output','Cannot\x20read\x20resource\x20manifest\x20at\x20','registrations\x20must\x20not\x20be\x20empty.','input','colorEditable','clearCache','\x22;\x20try\x20resources\x20find\x20<query>.','message','.source.value\x20must\x20be\x20a\x20URL.','export','3459792VAqXWG','registrations[','slice','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','1036xBetMQ','status','keywords','value','resource-download-too-large','.type\x20must\x20be\x20\x22image\x22.','storagePolicy','endsWith','.source.type\x20must\x20be\x20\x22url\x22.','registryId','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','3177666hMdANU','resource-download-insecure-redirect','test','.source','sort','Resource\x20download\x20timed\x20out\x20after\x20','root','.svg','manifest','push','resource-download-invalid-redirect','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','downloader','path','text','handle','entries','has','write','utf8','add','order','875sKCojS','].input.tags','manifestPath','resourceCount','groupId','.storagePolicy\x20must\x20be\x20\x22reference\x22.','fetch','resource-download-invalid-svg'];_0x54fd=function(){return _0x282fa8;};return _0x54fd();}import{randomUUID as _0x2f2b18}from'node:crypto';import{mkdir as _0x147b1b,readFile as _0x2f8c48,readdir as _0x1777e5,rename as _0x3a8b8c,rm as _0x54c064,stat as _0x223d32,unlink as _0x2037ed,writeFile as _0x2c7421}from'node:fs/promises';import{dirname as _0x2f664c,isAbsolute as _0x8095c8,join as _0x29feae,parse as _0x4ce26a,resolve as _0x1f582e}from'node:path';import{readFileSync as _0x3422d9}from'node:fs';var h=class extends Error{[_0x19c91c(0x219)];[_0x19c91c(0x246)];constructor(_0x3312ec,_0x7ec013,_0xfc5f90,_0x48a711){const _0x1491f0=_0x19c91c;super(_0x7ec013,_0x48a711),this[_0x1491f0(0x219)]=_0x3312ec,this[_0x1491f0(0x246)]=_0xfc5f90,this[_0x1491f0(0x277)]=_0x1491f0(0x26a);}};function g(_0x2144f0){return _0x2144f0 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x2c9315){const _0x51ac93=_0x19c91c;return _[_0x51ac93(0x239)](_0x2c9315)&&_0x2c9315!=='.'&&_0x2c9315!=='..';}function x(_0x88aa52){const _0x348cf8=_0x19c91c;if(!b(_0x88aa52)||_0x88aa52[_0x348cf8(0x213)]('-')||_0x88aa52[_0x348cf8(0x1f1)]('--')||_0x88aa52[_0x348cf8(0x257)]>v)throw new h(_0x348cf8(0x1af),_0x348cf8(0x1cc)+_0x88aa52+_0x348cf8(0x236));}function S(_0xa24fff){const _0x1b1d7a=_0x19c91c;if(!b(_0xa24fff)||_0xa24fff[_0x1b1d7a(0x257)]+y>v)throw new h('resource-invalid-resource-id',_0x1b1d7a(0x1f0)+_0xa24fff+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x5b9717){const _0x31c88c=_0x19c91c;let _0x4f54c0=_0x5b9717[_0x31c88c(0x260)]('/');if(_0x4f54c0['length']!==0x2||_0x4f54c0[0x0]===''||_0x4f54c0[0x1]==='')throw new h(_0x31c88c(0x215),_0x31c88c(0x204)+_0x5b9717+'\x22;\x20expected\x20<registryId>/<resourceId>.',_0x5b9717);let _0x49c433=_0x4f54c0[0x0],_0x527032=_0x4f54c0[0x1];return x(_0x49c433),S(_0x527032),{'registryId':_0x49c433,'resourceId':_0x527032};}function ee(_0x5b1308,_0x1b2308){return x(_0x5b1308),S(_0x1b2308),_0x5b1308+'/'+_0x1b2308;}function w(_0x540fb2){const _0x547c1e=_0x19c91c;let {registryId:_0x2ef445,resourceId:_0x4090f0}=C(_0x540fb2),_0x57b762=_0x2ef445+'--'+_0x4090f0+_0x547c1e(0x23e);if(_0x57b762[_0x547c1e(0x257)]>v)throw new h(_0x547c1e(0x1bc),'Resource\x20export\x20filename\x20exceeds\x20'+v+_0x547c1e(0x1f7),_0x540fb2);return _0x57b762;}function T(_0x349904){const _0x575688=_0x19c91c;return new h(_0x575688(0x1d0),_0x575688(0x264)+_0x349904);}function E(_0x21944c,_0x2c3a45){const _0x4569eb=_0x19c91c;if(typeof _0x21944c!='object'||!_0x21944c||Array[_0x4569eb(0x1d6)](_0x21944c))throw T(_0x2c3a45+_0x4569eb(0x20b));return _0x21944c;}function D(_0x21dbd7,_0x16e1a5,_0x49a9d1=!0x1){const _0xcde75c=_0x19c91c;if(_0x49a9d1&&_0x21dbd7===void 0x0)return[];if(!Array[_0xcde75c(0x1d6)](_0x21dbd7))throw T(_0x16e1a5+_0xcde75c(0x209));return _0x21dbd7;}function O(_0x4fc67b,_0x270539){const _0x3ba532=_0x19c91c;if(typeof _0x4fc67b!=_0x3ba532(0x1b7)||_0x4fc67b==='')throw T(_0x270539+_0x3ba532(0x265));return _0x4fc67b;}function k(_0x2c961f,_0x1ff26e,_0x53f9f8=!0x1){const _0x23ccee=_0x19c91c;return D(_0x2c961f,_0x1ff26e,_0x53f9f8)[_0x23ccee(0x1fc)]((_0x49159b,_0x284ca9)=>O(_0x49159b,_0x1ff26e+'['+_0x284ca9+']'));}function A(_0x1d5217,_0x299d63){const _0x20e396=_0x19c91c;return D(_0x1d5217,_0x299d63,!0x0)[_0x20e396(0x1fc)]((_0x547d30,_0x260797)=>{if(typeof _0x547d30!='string')throw T(_0x299d63+'['+_0x260797+']\x20must\x20be\x20a\x20string.');return _0x547d30;})[_0x20e396(0x278)](_0x5b4704=>_0x5b4704!=='');}function j(_0x27d851,_0xbed9b){const _0x3be18b=_0x19c91c;if(typeof _0x27d851!=_0x3be18b(0x25a)||!Number[_0x3be18b(0x1e1)](_0x27d851))throw T(_0xbed9b+_0x3be18b(0x211));return _0x27d851;}function M(_0x2f1a41,_0x1fb5b3){if(typeof _0x2f1a41!='boolean')throw T(_0x1fb5b3+'\x20must\x20be\x20a\x20boolean.');return _0x2f1a41;}function N(_0x28e873,_0x57a5de,_0x178f3d){const _0x406d64=_0x19c91c;if(typeof _0x28e873=='string'&&_0x28e873!=='')return _0x28e873;let _0x4987b9=E(_0x28e873,_0x57a5de),_0x3e36b=_0x178f3d===void 0x0?void 0x0:_0x4987b9[_0x178f3d];if(typeof _0x3e36b==_0x406d64(0x1b7)&&_0x3e36b!=='')return _0x3e36b;let _0x2f8d93=_0x4987b9[_0x406d64(0x256)];if(typeof _0x2f8d93==_0x406d64(0x1b7)&&_0x2f8d93!=='')return _0x2f8d93;let _0x33bc6f=Object[_0x406d64(0x1c4)](_0x4987b9)[_0x406d64(0x1ba)](_0x222740=>typeof _0x222740=='string'&&_0x222740!=='');if(_0x33bc6f!==void 0x0)return _0x33bc6f;throw T(_0x57a5de+_0x406d64(0x1cb));}function P(_0x4d4afe,_0x4f9879,_0x431c7b){const _0x40be61=_0x19c91c;try{_0x431c7b===_0x40be61(0x1d1)?x(_0x4d4afe):S(_0x4d4afe);}catch(_0x1b9163){throw T(_0x4f9879+':\x20'+(_0x1b9163 instanceof Error?_0x1b9163[_0x40be61(0x225)]:String(_0x1b9163)));}}function F(_0x5a8434,_0x2e70c2,_0x1fd145){const _0x5cb2c6=_0x19c91c;let _0x389667=new Map();for(let [_0x2c053a,_0x488d24]of D(_0x5a8434,_0x2e70c2,!0x0)[_0x5cb2c6(0x247)]()){let _0x2fe00c=E(_0x488d24,_0x2e70c2+'['+_0x2c053a+']'),_0x4b39ea=O(_0x2fe00c['id'],_0x2e70c2+'['+_0x2c053a+_0x5cb2c6(0x1ea));if(P(_0x4b39ea,_0x2e70c2+'['+_0x2c053a+_0x5cb2c6(0x1ea),'resource'),_0x389667[_0x5cb2c6(0x248)](_0x4b39ea))throw T('Duplicate\x20'+_0x2e70c2+_0x5cb2c6(0x1b4)+_0x4b39ea+'\x22.');_0x389667['set'](_0x4b39ea,N(_0x2fe00c['label'],_0x2e70c2+'['+_0x2c053a+_0x5cb2c6(0x1d4),_0x1fd145));}return _0x389667;}function I(_0x118717,_0x71a2b5){const _0x1eccd6=_0x19c91c;let _0x5abf64=E(_0x118717[_0x1eccd6(0x270)],_0x71a2b5+'.intrinsicSize'),_0x3f1bfd=j(_0x5abf64[_0x1eccd6(0x1c3)],_0x71a2b5+_0x1eccd6(0x1de)),_0x491e6d=j(_0x5abf64[_0x1eccd6(0x1f6)],_0x71a2b5+_0x1eccd6(0x1e2));if(_0x3f1bfd<=0x0||_0x491e6d<=0x0)throw T(_0x71a2b5+_0x1eccd6(0x1fa));return{'width':_0x3f1bfd,'height':_0x491e6d};}function L(_0x599e62,_0x2da2ce){const _0x1ecc23=_0x19c91c;if(_0x599e62[_0x1ecc23(0x21d)]!==_0x1ecc23(0x1b5))throw T(_0x2da2ce+_0x1ecc23(0x231));if(_0x599e62[_0x1ecc23(0x232)]!==_0x1ecc23(0x20d))throw T(_0x2da2ce+_0x1ecc23(0x252));let _0x32b3bc=E(_0x599e62['source'],_0x2da2ce+_0x1ecc23(0x23a));if(_0x32b3bc[_0x1ecc23(0x21d)]!=='url')throw T(_0x2da2ce+_0x1ecc23(0x234));let _0x48e51a=O(_0x32b3bc[_0x1ecc23(0x22f)],_0x2da2ce+'.source.value'),_0x16a766;try{_0x16a766=new URL(_0x48e51a);}catch{throw T(_0x2da2ce+_0x1ecc23(0x226));}if(_0x16a766[_0x1ecc23(0x25d)]!==_0x1ecc23(0x1df))throw T(_0x2da2ce+_0x1ecc23(0x25e));return _0x48e51a;}function R(_0x1a1005){const _0x56fb23=_0x19c91c;return _0x1a1005['normalize'](_0x56fb23(0x1b2))[_0x56fb23(0x1d9)]()['trim']()[_0x56fb23(0x1d8)](/\s+/gu,'\x20');}function z(_0x2b973e){const _0x12911b=_0x19c91c;let _0x4455d0=E(_0x2b973e,_0x12911b(0x23f)),_0x22d1e3=new Map(),_0x284c4e=new Map(),_0x10906c=[],_0x5a6c67=[],_0x23d4e5=new Set(),_0x3dfab2=0x0;for(let [_0x130fa0,_0x515cba]of D(_0x4455d0[_0x12911b(0x1f5)],_0x12911b(0x258))[_0x12911b(0x247)]()){let _0x4f376e=E(E(_0x515cba,_0x12911b(0x229)+_0x130fa0+']')[_0x12911b(0x221)],'registrations['+_0x130fa0+'].input'),_0x183d30=O(_0x4f376e['registryId'],_0x12911b(0x229)+_0x130fa0+_0x12911b(0x1db));if(P(_0x183d30,_0x12911b(0x229)+_0x130fa0+_0x12911b(0x1db),_0x12911b(0x1d1)),_0x22d1e3[_0x12911b(0x248)](_0x183d30))throw T(_0x12911b(0x1ec)+_0x183d30+'\x22.');let _0x6d3087=_0x4f376e[_0x12911b(0x1d3)]===void 0x0?void 0x0:O(_0x4f376e[_0x12911b(0x1d3)],_0x12911b(0x229)+_0x130fa0+'].input.defaultLocale'),_0x1201d5=F(_0x4f376e[_0x12911b(0x268)],_0x12911b(0x229)+_0x130fa0+_0x12911b(0x27a),_0x6d3087),_0x1fe1e3=F(_0x4f376e['tags'],'registrations['+_0x130fa0+_0x12911b(0x24e),_0x6d3087),_0x52176f=[];for(let [_0x5e58c5,_0x29ba2b]of D(_0x4f376e['resources'],_0x12911b(0x229)+_0x130fa0+_0x12911b(0x269))[_0x12911b(0x247)]()){let _0x1d65fe=_0x12911b(0x229)+_0x130fa0+_0x12911b(0x216)+_0x5e58c5+']',_0x569d76=E(_0x29ba2b,_0x1d65fe),_0xa06dee=O(_0x569d76['id'],_0x1d65fe+'.id');P(_0xa06dee,_0x1d65fe+_0x12911b(0x1c7),_0x12911b(0x263));let _0x4bcdba=ee(_0x183d30,_0xa06dee);if(_0x284c4e[_0x12911b(0x248)](_0x4bcdba))throw T('Duplicate\x20resource\x20handle\x20\x22'+_0x4bcdba+'\x22.');let _0x5ab815;try{_0x5ab815=w(_0x4bcdba);}catch(_0x44bd3e){throw T(_0x1d65fe+':\x20'+(_0x44bd3e instanceof Error?_0x44bd3e[_0x12911b(0x225)]:String(_0x44bd3e)));}if(_0x23d4e5[_0x12911b(0x248)](_0x5ab815))throw T('Duplicate\x20export\x20filename\x20\x22'+_0x5ab815+'\x22.');_0x23d4e5[_0x12911b(0x24b)](_0x5ab815);let _0x417848=_0x569d76['groupId']===void 0x0?void 0x0:O(_0x569d76[_0x12911b(0x251)],_0x1d65fe+_0x12911b(0x279));if(_0x417848!==void 0x0&&!_0x1201d5[_0x12911b(0x248)](_0x417848))throw T(_0x1d65fe+_0x12911b(0x26e)+_0x417848+'\x22.');let _0x533cb3=k(_0x569d76[_0x12911b(0x276)],_0x1d65fe+_0x12911b(0x25f),!0x0);for(let _0x3f5f11 of _0x533cb3)if(!_0x1fe1e3[_0x12911b(0x248)](_0x3f5f11))throw T(_0x1d65fe+_0x12911b(0x1d7)+_0x3f5f11+'\x22.');let _0x1513ac=A(_0x569d76['keywords'],_0x1d65fe+_0x12911b(0x1e4)),_0x295c94=N(_0x569d76['name'],_0x1d65fe+_0x12911b(0x1eb),_0x6d3087),_0x3189=_0x569d76[_0x12911b(0x201)]===void 0x0?void 0x0:N(_0x569d76[_0x12911b(0x201)],_0x1d65fe+_0x12911b(0x1dd),_0x6d3087),_0x507a47=_0x417848===void 0x0?null:{'id':_0x417848,'label':_0x1201d5[_0x12911b(0x26b)](_0x417848)},_0x4458f6=_0x533cb3[_0x12911b(0x1fc)](_0x27d830=>({'id':_0x27d830,'label':_0x1fe1e3[_0x12911b(0x26b)](_0x27d830)})),_0x11a277=E(_0x569d76[_0x12911b(0x1ed)],_0x1d65fe+_0x12911b(0x214)),_0x178057=_0x569d76[_0x12911b(0x24c)]===void 0x0?null:j(_0x569d76['order'],_0x1d65fe+_0x12911b(0x1c0)),_0x418530=M(_0x11a277[_0x12911b(0x222)],_0x1d65fe+_0x12911b(0x1bb)),_0x115a12={'handle':_0x4bcdba,'registryId':_0x183d30,'id':_0xa06dee,'name':_0x295c94,..._0x3189===void 0x0?{}:{'description':_0x3189},'group':_0x507a47,'tags':_0x4458f6,'keywords':_0x1513ac,'order':_0x178057,'intrinsicSize':I(_0x11a277,_0x1d65fe+'.payload'),'colorEditable':_0x418530,'sourceUrl':L(_0x11a277,_0x1d65fe+_0x12911b(0x214)),'registrationIndex':_0x130fa0,'resourceIndex':_0x5e58c5,'globalIndex':_0x3dfab2,'searchText':R([_0x295c94,_0x3189,_0x507a47?.[_0x12911b(0x1b8)],..._0x4458f6['map'](_0x1ad7a9=>_0x1ad7a9[_0x12911b(0x1b8)]),..._0x1513ac]['filter'](_0x5d3ad9=>_0x5d3ad9!==void 0x0)[_0x12911b(0x274)]('\x20'))};_0x3dfab2++,_0x52176f['push'](_0x115a12),_0x5a6c67[_0x12911b(0x240)](_0x115a12),_0x284c4e['set'](_0x4bcdba,_0x115a12);}let _0x47660f={'id':_0x183d30,'groups':_0x1201d5,'tags':_0x1fe1e3,'resources':_0x52176f};_0x10906c['push'](_0x47660f),_0x22d1e3[_0x12911b(0x203)](_0x183d30,_0x47660f);}if(_0x10906c[_0x12911b(0x257)]===0x0)throw T(_0x12911b(0x220));return{'registries':_0x10906c,'registryById':_0x22d1e3,'resourceByHandle':_0x284c4e,'resources':_0x5a6c67};}function B(_0x578571,_0x19dcce){const _0x4a0070=_0x19c91c;C(_0x19dcce);let _0x584714=_0x578571['resourceByHandle'][_0x4a0070(0x26b)](_0x19dcce);if(_0x584714===void 0x0)throw new h(_0x4a0070(0x272),_0x4a0070(0x1d5)+_0x19dcce+_0x4a0070(0x224),_0x19dcce);return _0x584714;}function te(_0x50472e){const _0x43c980=_0x19c91c;return _0x50472e[_0x43c980(0x1e3)][_0x43c980(0x1fc)](_0x102c7b=>({'id':_0x102c7b['id'],'resourceCount':_0x102c7b['resources']['length'],'groupCount':_0x102c7b[_0x43c980(0x268)][_0x43c980(0x1b1)],'tagCount':_0x102c7b[_0x43c980(0x255)][_0x43c980(0x1b1)],'colorEditableCount':_0x102c7b[_0x43c980(0x1ee)][_0x43c980(0x278)](_0x5a2490=>_0x5a2490[_0x43c980(0x222)])['length']}));}function ne(_0xc67f93){const _0xb3800a=_0x19c91c;return{'handle':_0xc67f93[_0xb3800a(0x246)],'registryId':_0xc67f93[_0xb3800a(0x235)],'id':_0xc67f93['id'],'name':_0xc67f93[_0xb3800a(0x277)],'group':_0xc67f93['group'],'tags':_0xc67f93[_0xb3800a(0x255)],'keywords':_0xc67f93[_0xb3800a(0x22e)],'order':_0xc67f93['order'],'intrinsicSize':_0xc67f93[_0xb3800a(0x270)],'colorEditable':_0xc67f93[_0xb3800a(0x222)]};}function re(_0x1eb7e1,_0x20085a){const _0x30a735=_0x19c91c;let _0x2f2ec5=(_0x1eb7e1[_0x30a735(0x24c)]??_0x1eb7e1[_0x30a735(0x218)])-(_0x20085a[_0x30a735(0x24c)]??_0x20085a[_0x30a735(0x218)]);if(_0x2f2ec5!==0x0)return _0x2f2ec5;let _0x281922=_0x1eb7e1[_0x30a735(0x1bf)]-_0x20085a['registrationIndex'];if(_0x281922!==0x0)return _0x281922;let _0x128658=_0x1eb7e1[_0x30a735(0x1da)]-_0x20085a[_0x30a735(0x1da)];return _0x128658===0x0?_0x1eb7e1[_0x30a735(0x246)]['localeCompare'](_0x20085a[_0x30a735(0x246)]):_0x128658;}function ie(_0x5e24c0,_0x8e82c4){const _0x5c7ec6=_0x19c91c;let _0x4e0663=_0x8e82c4[_0x5c7ec6(0x26c)][_0x5c7ec6(0x1fc)](R)[_0x5c7ec6(0x278)](_0x30a5c4=>_0x30a5c4!=='');if(_0x4e0663[_0x5c7ec6(0x257)]===0x0)throw new h(_0x5c7ec6(0x210),_0x5c7ec6(0x1b3));let _0x4242e4=new Set(_0x8e82c4['registries']??[]);for(let _0x2ba7e2 of _0x4242e4)if(!_0x5e24c0[_0x5c7ec6(0x21a)][_0x5c7ec6(0x248)](_0x2ba7e2))throw new h(_0x5c7ec6(0x26d),_0x5c7ec6(0x1cd)+_0x2ba7e2+'\x22.');let _0x28dd0f=_0x8e82c4['limit']??_0x5e24c0[_0x5c7ec6(0x1ee)][_0x5c7ec6(0x257)];if(!Number['isInteger'](_0x28dd0f)||_0x28dd0f<0x1)throw new h(_0x5c7ec6(0x208),_0x5c7ec6(0x242)+_0x28dd0f+'\x22.');let _0x5458f8=_0x5e24c0[_0x5c7ec6(0x1ee)][_0x5c7ec6(0x278)](_0x13d7a9=>_0x4242e4['size']===0x0||_0x4242e4[_0x5c7ec6(0x248)](_0x13d7a9[_0x5c7ec6(0x235)]))[_0x5c7ec6(0x278)](_0x575ccc=>_0x4e0663[_0x5c7ec6(0x1f4)](_0x43b9f4=>_0x575ccc[_0x5c7ec6(0x267)][_0x5c7ec6(0x1f1)](_0x43b9f4)))[_0x5c7ec6(0x23b)](re);return{'resources':_0x5458f8[_0x5c7ec6(0x22a)](0x0,_0x28dd0f)['map'](ne),'total':_0x5458f8[_0x5c7ec6(0x257)]};}function V(_0x31855b){return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu['test'](_0x31855b);}function H(_0x283137,_0x40ab9c){const _0x639676=_0x19c91c;return g(_0x40ab9c)?{'handle':_0x283137,'code':_0x40ab9c[_0x639676(0x219)],'message':_0x40ab9c['message']}:{'handle':_0x283137,'code':_0x639676(0x1e0),'message':_0x40ab9c instanceof Error?_0x40ab9c[_0x639676(0x225)]:String(_0x40ab9c)};}var U=class{[_0x19c91c(0x1bd)];[_0x19c91c(0x25b)];constructor(_0x9ece37){const _0x1b52e0=_0x19c91c;this['options']=_0x9ece37,this[_0x1b52e0(0x25b)]=z(_0x9ece37[_0x1b52e0(0x23f)]);}get['cacheLocation'](){const _0x675322=_0x19c91c;return this[_0x675322(0x1bd)]['cache']['location'];}[_0x19c91c(0x1ca)](){const _0x313c4f=_0x19c91c;return te(this[_0x313c4f(0x25b)]);}[_0x19c91c(0x1ba)](_0x1288a1){return ie(this['catalog'],_0x1288a1);}async[_0x19c91c(0x1b9)](_0x1a1f1b){const _0x340764=_0x19c91c;let _0x130c0d=B(this[_0x340764(0x25b)],_0x1a1f1b['handle']),_0x2a3810=await this[_0x340764(0x1bd)][_0x340764(0x1ef)]['read'](_0x1a1f1b[_0x340764(0x246)]);if(_0x2a3810!==void 0x0&&V(_0x2a3810))return{'handle':_0x1a1f1b['handle'],'svg':_0x2a3810};let _0x7acbdc;try{_0x7acbdc=await this[_0x340764(0x1bd)][_0x340764(0x243)][_0x340764(0x1f3)](_0x130c0d['sourceUrl']);}catch(_0x46295d){throw g(_0x46295d)?_0x46295d:new h('resource-download-failed',_0x340764(0x266)+_0x1a1f1b[_0x340764(0x246)]+'\x22:\x20'+(_0x46295d instanceof Error?_0x46295d['message']:String(_0x46295d)),_0x1a1f1b[_0x340764(0x246)],{'cause':_0x46295d});}if(!V(_0x7acbdc))throw new h(_0x340764(0x1c8),'Downloaded\x20resource\x20\x22'+_0x1a1f1b['handle']+_0x340764(0x1ae),_0x1a1f1b[_0x340764(0x246)]);return await this['options'][_0x340764(0x1ef)][_0x340764(0x249)](_0x1a1f1b[_0x340764(0x246)],_0x7acbdc),{'handle':_0x1a1f1b[_0x340764(0x246)],'svg':_0x7acbdc};}async[_0x19c91c(0x227)](_0x11cb35){const _0x4946e0=_0x19c91c;let _0x573117=[],_0x53dbc4=[];for(let _0x4501ac of _0x11cb35[_0x4946e0(0x1e6)])try{let {svg:_0x38f2c0}=await this[_0x4946e0(0x1b9)]({'handle':_0x4501ac}),_0x2235e5=await this[_0x4946e0(0x1bd)][_0x4946e0(0x21e)][_0x4946e0(0x249)](_0x11cb35[_0x4946e0(0x1d2)],w(_0x4501ac),_0x38f2c0);_0x573117[_0x4946e0(0x240)]({'handle':_0x4501ac,'path':_0x2235e5});}catch(_0x32f7e8){_0x53dbc4['push'](H(_0x4501ac,_0x32f7e8));}return{'exported':_0x573117,'failed':_0x53dbc4};}async[_0x19c91c(0x223)](){const _0x2d608e=_0x19c91c;return await this[_0x2d608e(0x1bd)][_0x2d608e(0x1ef)][_0x2d608e(0x21c)]();}};function W(_0x286d2a){return new U(_0x286d2a);}function G(_0x7032ac){return _0x7032ac instanceof Error&&'code'in _0x7032ac;}function K(_0x35016b){const _0x53e10d=_0x19c91c;let _0x424446=_0x1f582e(_0x35016b);if(!_0x8095c8(_0x35016b)||_0x424446===_0x4ce26a(_0x424446)[_0x53e10d(0x23d)])throw new h(_0x53e10d(0x1c5),_0x53e10d(0x22b)+_0x35016b+'\x22.');return _0x424446;}async function q(_0x3c678e){const _0x17e229=_0x19c91c;let _0x27b93d;try{_0x27b93d=await _0x1777e5(_0x3c678e,{'withFileTypes':!0x0});}catch(_0x150a8f){if(G(_0x150a8f)&&_0x150a8f[_0x17e229(0x219)]===_0x17e229(0x205))return{'resourceCount':0x0,'byteCount':0x0};throw _0x150a8f;}let _0x21b2ec=0x0,_0x5ad8d7=0x0;for(let _0x487b35 of _0x27b93d){let _0x2ab7d3=_0x29feae(_0x3c678e,_0x487b35[_0x17e229(0x277)]);if(_0x487b35[_0x17e229(0x27b)]()){let _0x2709d3=await q(_0x2ab7d3);_0x21b2ec+=_0x2709d3[_0x17e229(0x250)],_0x5ad8d7+=_0x2709d3[_0x17e229(0x1e8)];}else{if(_0x487b35[_0x17e229(0x1c1)]()&&_0x487b35[_0x17e229(0x277)][_0x17e229(0x233)](_0x17e229(0x23e))){let _0x59f8f9=await _0x223d32(_0x2ab7d3);_0x21b2ec++,_0x5ad8d7+=_0x59f8f9[_0x17e229(0x1b1)];}}}return{'resourceCount':_0x21b2ec,'byteCount':_0x5ad8d7};}var J=class{[_0x19c91c(0x200)];constructor(_0x33b1bc){const _0x112a08=_0x19c91c;this[_0x112a08(0x200)]=K(_0x33b1bc);}[_0x19c91c(0x244)](_0x56d153){const _0x1a4c28=_0x19c91c;let {registryId:_0x3c9cf2,resourceId:_0x2f84e0}=C(_0x56d153);return _0x29feae(this[_0x1a4c28(0x200)],_0x3c9cf2,_0x2f84e0+_0x1a4c28(0x23e));}async[_0x19c91c(0x1b9)](_0x43e7c4){const _0xbed78c=_0x19c91c;try{return await _0x2f8c48(this['path'](_0x43e7c4),_0xbed78c(0x24a));}catch(_0xe1f71){if(G(_0xe1f71)&&_0xe1f71[_0xbed78c(0x219)]===_0xbed78c(0x205))return;throw _0xe1f71;}}async[_0x19c91c(0x249)](_0x51e7d4,_0x56a884){const _0x131dc8=_0x19c91c;let _0x7534eb=this['path'](_0x51e7d4);await _0x147b1b(_0x2f664c(_0x7534eb),{'recursive':!0x0});let _0x4860d8=_0x29feae(_0x2f664c(_0x7534eb),_0x131dc8(0x262)+process[_0x131dc8(0x271)]+'-'+_0x2f2b18()+_0x131dc8(0x1f2));try{await _0x2c7421(_0x4860d8,_0x56a884,{'encoding':_0x131dc8(0x24a),'mode':0x180}),await _0x3a8b8c(_0x4860d8,_0x7534eb);}catch(_0x5e52a3){throw await _0x2037ed(_0x4860d8)[_0x131dc8(0x1c9)](()=>void 0x0),_0x5e52a3;}}async[_0x19c91c(0x21c)](){const _0x56d12c=_0x19c91c;let _0x86a72f=await q(this[_0x56d12c(0x200)]);return await _0x54c064(this[_0x56d12c(0x200)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x56d12c(0x200)],..._0x86a72f};}},Y=class{async[_0x19c91c(0x249)](_0x28ac3c,_0x32c4be,_0x4c100d){const _0xf04f5=_0x19c91c;await _0x147b1b(_0x28ac3c,{'recursive':!0x0});let _0x1e53a7=_0x29feae(_0x28ac3c,_0x32c4be);return await _0x2c7421(_0x1e53a7,_0x4c100d,_0xf04f5(0x24a)),_0x1e53a7;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x44b768){const _0x1eaf14=_0x19c91c;return new h(_0x1eaf14(0x230),_0x1eaf14(0x20e)+_0x44b768+_0x1eaf14(0x1f7));}async function ce(_0x1f7f54,_0x3f0eec){const _0x3f3351=_0x19c91c;let _0x5df6ad=Number(_0x1f7f54[_0x3f3351(0x1e5)]['get'](_0x3f3351(0x275)));if(Number[_0x3f3351(0x1e1)](_0x5df6ad)&&_0x5df6ad>_0x3f0eec)throw Z(_0x3f0eec);if(_0x1f7f54['body']===null){let _0x6ea9aa=await _0x1f7f54[_0x3f3351(0x245)]();if(Buffer[_0x3f3351(0x261)](_0x6ea9aa)>_0x3f0eec)throw Z(_0x3f0eec);return _0x6ea9aa;}let _0x31a277=_0x1f7f54[_0x3f3351(0x259)][_0x3f3351(0x1ce)](),_0x11cd20=[],_0x52ffdf=0x0;try{for(;;){let _0x17b6f1=await _0x31a277[_0x3f3351(0x1b9)]();if(_0x17b6f1['done'])break;if(_0x52ffdf+=_0x17b6f1[_0x3f3351(0x22f)][_0x3f3351(0x261)],_0x52ffdf>_0x3f0eec)throw await _0x31a277['cancel']()[_0x3f3351(0x1c9)](()=>void 0x0),Z(_0x3f0eec);_0x11cd20['push'](_0x17b6f1[_0x3f3351(0x22f)]);}}finally{_0x31a277['releaseLock']();}try{return new TextDecoder('utf-8',{'fatal':!0x0})['decode'](Buffer[_0x3f3351(0x25c)](_0x11cd20,_0x52ffdf));}catch{throw new h('resource-download-invalid-utf8',_0x3f3351(0x1e9));}}var Q=class{[_0x19c91c(0x212)];[_0x19c91c(0x1fd)];[_0x19c91c(0x1b6)];['maxRedirects'];constructor(_0x95daa9={}){const _0x501924=_0x19c91c;this['fetchImpl']=_0x95daa9[_0x501924(0x253)]??fetch,this[_0x501924(0x1fd)]=_0x95daa9[_0x501924(0x1fd)]??X,this[_0x501924(0x1b6)]=_0x95daa9[_0x501924(0x1b6)]??ae,this['maxRedirects']=_0x95daa9[_0x501924(0x202)]??oe;}async['download'](_0x129849){const _0x462e29=_0x19c91c;let _0x4803e9=new URL(_0x129849);if(_0x4803e9[_0x462e29(0x25d)]!=='https:')throw new h('resource-download-insecure',_0x462e29(0x1ff));let _0x278c69=new AbortController(),_0x3a41da=setTimeout(()=>_0x278c69['abort'](),this['timeoutMs']);try{let _0x576d5a=_0x4803e9;for(let _0x3a6560=0x0;;_0x3a6560++){let _0xee2293=await this[_0x462e29(0x212)](_0x576d5a,{'redirect':_0x462e29(0x1c2),'signal':_0x278c69[_0x462e29(0x206)]});if(se[_0x462e29(0x248)](_0xee2293[_0x462e29(0x22d)])){if(_0x3a6560>=this[_0x462e29(0x202)])throw new h(_0x462e29(0x1be),_0x462e29(0x1f8)+this[_0x462e29(0x202)]+'.');let _0x5d4c53=_0xee2293['headers']['get'](_0x462e29(0x200));if(_0x5d4c53===null)throw new h(_0x462e29(0x241),_0x462e29(0x1dc)+_0xee2293[_0x462e29(0x22d)]+_0x462e29(0x1fe));let _0x567ffd;try{_0x567ffd=new URL(_0x5d4c53,_0x576d5a);}catch{throw new h(_0x462e29(0x241),_0x462e29(0x20f));}if(_0x567ffd['protocol']!==_0x462e29(0x1df))throw new h(_0x462e29(0x238),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');_0x576d5a=_0x567ffd;continue;}if(!_0xee2293['ok'])throw new h('resource-download-http','Resource\x20server\x20returned\x20HTTP\x20'+_0xee2293['status']+'.');if(_0xee2293[_0x462e29(0x1fb)]!==''&&new URL(_0xee2293[_0x462e29(0x1fb)])[_0x462e29(0x25d)]!==_0x462e29(0x1df))throw new h(_0x462e29(0x238),_0x462e29(0x1b0));let _0x38061f=await ce(_0xee2293,this[_0x462e29(0x1b6)]);if(!V(_0x38061f))throw new h(_0x462e29(0x254),_0x462e29(0x21b));return _0x38061f;}}catch(_0x1697a1){throw _0x278c69[_0x462e29(0x206)][_0x462e29(0x1c6)]?new h('resource-download-timeout',_0x462e29(0x23c)+this[_0x462e29(0x1fd)]+_0x462e29(0x26f)):_0x1697a1;}finally{clearTimeout(_0x3a41da);}}};function $(_0x19498){const _0x24587e=_0x19c91c;try{return JSON['parse'](_0x3422d9(_0x19498,_0x24587e(0x24a)));}catch(_0x79b721){throw new h(_0x24587e(0x1f9),_0x24587e(0x21f)+_0x19498+':\x20'+(_0x79b721 instanceof Error?_0x79b721[_0x24587e(0x225)]:String(_0x79b721)),void 0x0,{'cause':_0x79b721});}}function le(_0x38563d){const _0x260b34=_0x19c91c;let _0xcf51c;return()=>(_0xcf51c??=W({'manifest':$(_0x38563d[_0x260b34(0x24f)]),'cache':new J(_0x38563d[_0x260b34(0x1cf)]),'downloader':new Q(_0x38563d[_0x260b34(0x243)]),'output':new Y()}),_0xcf51c);}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 _0x10a363=_0x2349;(function(_0x2544df,_0x11741d){const _0x49e280=_0x2349,_0x12db7c=_0x2544df();while(!![]){try{const _0x205708=-parseInt(_0x49e280(0x1a7))/0x1+parseInt(_0x49e280(0x1d6))/0x2+parseInt(_0x49e280(0x1dd))/0x3*(parseInt(_0x49e280(0x164))/0x4)+-parseInt(_0x49e280(0x175))/0x5+parseInt(_0x49e280(0x16e))/0x6+-parseInt(_0x49e280(0x182))/0x7+parseInt(_0x49e280(0x146))/0x8*(parseInt(_0x49e280(0x1cd))/0x9);if(_0x205708===_0x11741d)break;else _0x12db7c['push'](_0x12db7c['shift']());}catch(_0x27378b){_0x12db7c['push'](_0x12db7c['shift']());}}}(_0x10a2,0xdcf21));import{randomUUID as _0x311077}from'node:crypto';import{mkdir as _0x4b2f34,readFile as _0x857f97,readdir as _0x495ffd,rename as _0x32a4b3,rm as _0x1b6ad8,stat as _0x1cb600,unlink as _0x47a113,writeFile as _0x4e3aa9}from'node:fs/promises';import{dirname as _0xe8ba2c,isAbsolute as _0x30918f,join as _0x175002,parse as _0x34d254,resolve as _0x5a3a0d}from'node:path';import{readFileSync as _0x2873a9}from'node:fs';var h=class extends Error{[_0x10a363(0x1ce)];['handle'];constructor(_0x3d6a81,_0x275ee9,_0x2959f9,_0x2c6370){const _0x3bd077=_0x10a363;super(_0x275ee9,_0x2c6370),this[_0x3bd077(0x1ce)]=_0x3d6a81,this[_0x3bd077(0x1cb)]=_0x2959f9,this['name']=_0x3bd077(0x17a);}};function g(_0x5cd463){return _0x5cd463 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x279c42){const _0x303772=_0x10a363;return _[_0x303772(0x138)](_0x279c42)&&_0x279c42!=='.'&&_0x279c42!=='..';}function x(_0x37edf4){const _0x7b7d7b=_0x10a363;if(!b(_0x37edf4)||_0x37edf4[_0x7b7d7b(0x126)]('-')||_0x37edf4['includes']('--')||_0x37edf4[_0x7b7d7b(0x171)]>v)throw new h(_0x7b7d7b(0x165),_0x7b7d7b(0x131)+_0x37edf4+'\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.');}function S(_0x4b944c){const _0x28894a=_0x10a363;if(!b(_0x4b944c)||_0x4b944c[_0x28894a(0x171)]+y>v)throw new h(_0x28894a(0x16b),_0x28894a(0x1bf)+_0x4b944c+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x21cffe){const _0x501c0c=_0x10a363;let _0x520ed7=_0x21cffe['split']('/');if(_0x520ed7[_0x501c0c(0x171)]!==0x2||_0x520ed7[0x0]===''||_0x520ed7[0x1]==='')throw new h('resource-invalid-handle','Invalid\x20resource\x20handle\x20\x22'+_0x21cffe+_0x501c0c(0x16f),_0x21cffe);let _0x429ae9=_0x520ed7[0x0],_0x87ab3a=_0x520ed7[0x1];return x(_0x429ae9),S(_0x87ab3a),{'registryId':_0x429ae9,'resourceId':_0x87ab3a};}function ee(_0x835c1e,_0x84c79f){return x(_0x835c1e),S(_0x84c79f),_0x835c1e+'/'+_0x84c79f;}function w(_0x650c8e){const _0x5cea77=_0x10a363;let {registryId:_0x139af7,resourceId:_0x49b94c}=C(_0x650c8e),_0xec2c58=_0x139af7+'--'+_0x49b94c+_0x5cea77(0x1c1);if(_0xec2c58['length']>v)throw new h(_0x5cea77(0x161),_0x5cea77(0x144)+v+_0x5cea77(0x14e),_0x650c8e);return _0xec2c58;}function T(_0x5d526c){const _0x4eeef1=_0x10a363;return new h(_0x4eeef1(0x172),'Invalid\x20resource\x20manifest:\x20'+_0x5d526c);}function E(_0x5a480e,_0x14011c){const _0x5d5b9f=_0x10a363;if(typeof _0x5a480e!=_0x5d5b9f(0x1ba)||!_0x5a480e||Array[_0x5d5b9f(0x1ac)](_0x5a480e))throw T(_0x14011c+_0x5d5b9f(0x158));return _0x5a480e;}function D(_0xb045dd,_0x3ce14d,_0x5a87ce=!0x1){const _0x37b471=_0x10a363;if(_0x5a87ce&&_0xb045dd===void 0x0)return[];if(!Array[_0x37b471(0x1ac)](_0xb045dd))throw T(_0x3ce14d+_0x37b471(0x194));return _0xb045dd;}function O(_0x69272c,_0x500ec3){const _0x104892=_0x10a363;if(typeof _0x69272c!=_0x104892(0x129)||_0x69272c==='')throw T(_0x500ec3+'\x20must\x20be\x20a\x20non-empty\x20string.');return _0x69272c;}function k(_0x2f06f6,_0x57150e,_0x2a585b=!0x1){const _0x54a9d8=_0x10a363;return D(_0x2f06f6,_0x57150e,_0x2a585b)[_0x54a9d8(0x139)]((_0x4e148f,_0x4a25f5)=>O(_0x4e148f,_0x57150e+'['+_0x4a25f5+']'));}function A(_0x48d1e3,_0x447330){const _0x5435e3=_0x10a363;return D(_0x48d1e3,_0x447330,!0x0)[_0x5435e3(0x139)]((_0x509bbe,_0x39996a)=>{const _0xf2a755=_0x5435e3;if(typeof _0x509bbe!=_0xf2a755(0x129))throw T(_0x447330+'['+_0x39996a+_0xf2a755(0x141));return _0x509bbe;})[_0x5435e3(0x1c7)](_0x32996f=>_0x32996f!=='');}function j(_0x3edabd,_0x1da6aa){const _0x47372a=_0x10a363;if(typeof _0x3edabd!=_0x47372a(0x1e9)||!Number[_0x47372a(0x1bd)](_0x3edabd))throw T(_0x1da6aa+_0x47372a(0x12c));return _0x3edabd;}function M(_0x86ed99,_0x2b1cab){const _0x20909f=_0x10a363;if(typeof _0x86ed99!='boolean')throw T(_0x2b1cab+_0x20909f(0x1a1));return _0x86ed99;}function N(_0x308a4d,_0x2e58e2,_0x2e7d57){const _0x221c5b=_0x10a363;if(typeof _0x308a4d==_0x221c5b(0x129)&&_0x308a4d!=='')return _0x308a4d;let _0x41bd49=E(_0x308a4d,_0x2e58e2),_0x173581=_0x2e7d57===void 0x0?void 0x0:_0x41bd49[_0x2e7d57];if(typeof _0x173581==_0x221c5b(0x129)&&_0x173581!=='')return _0x173581;let _0x2b58ee=_0x41bd49[_0x221c5b(0x1c9)];if(typeof _0x2b58ee==_0x221c5b(0x129)&&_0x2b58ee!=='')return _0x2b58ee;let _0x53cd39=Object[_0x221c5b(0x174)](_0x41bd49)[_0x221c5b(0x16a)](_0x32d36e=>typeof _0x32d36e=='string'&&_0x32d36e!=='');if(_0x53cd39!==void 0x0)return _0x53cd39;throw T(_0x2e58e2+'\x20contains\x20no\x20usable\x20localized\x20text.');}function _0x10a2(){const _0xaf2ba1=['filter','storagePolicy','en-US','protocol','handle','abort','78903fzWYVh','code','Duplicate\x20registry\x20ID\x20\x22','description','join','status','.source.value\x20must\x20use\x20HTTPS.','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','912582WFFllH','name','parse','includes','].input.registryId','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','tags','1458579zGJbNW','registrations[','resourceIndex','replace','\x20ID\x20\x22','localeCompare','manifest.registrations','set','sort','Duplicate\x20export\x20filename\x20\x22','groupId','isDirectory','number','done','catch','].input.tags','fetch','resource-download-too-large','resourceByHandle','.intrinsicSize.height','downloader','Resource\x20server\x20returned\x20HTTP\x20','Unknown\x20resource\x20\x22','startsWith','].input.resources[','destination','string','registries','].input','\x20must\x20be\x20a\x20finite\x20number.','cacheRoot','resource-export-failed','payload','push','Invalid\x20registry\x20ID\x20\x22','fetchImpl','.source.type\x20must\x20be\x20\x22url\x22.','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','get','Failed\x20to\x20download\x20\x22','].id','test','map','some','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','\x20ms.','\x22;\x20try\x20resources\x20find\x20<query>.','clearCache','cacheLocation','location',']\x20must\x20be\x20a\x20string.','Duplicate\x20','tagIds','Resource\x20export\x20filename\x20exceeds\x20','concat','1304ovrPrw','download','maxBytes','group','text','\x20without\x20a\x20Location\x20header.','resource-query-empty','resource-limit-invalid','\x20bytes.','resource-manifest-read-failed','catalog','.description','endsWith','Unknown\x20resource\x20registry\x20\x22','resource-download-http','.source.value\x20must\x20be\x20a\x20URL.','resource-download-too-many-redirects','export','\x20must\x20be\x20an\x20object.','.keywords','resources','colorEditable','resource-download-insecure','.type\x20must\x20be\x20\x22image\x22.','resource-download-failed','defaultLocale','Resource\x20URL\x20must\x20use\x20HTTPS.','resource-export-filename-too-long','headers','intrinsicSize','12dRWEBV','resource-invalid-registry-id','input','root','groups','resource','find','resource-invalid-resource-id','registrationIndex','manual','4906926vDEmdJ','\x22;\x20expected\x20<registryId>/<resourceId>.','registry','length','resource-manifest-invalid','].label','values','7414180VsQhUa','body','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','entries','resource-download-invalid-utf8','ResourceLibraryError','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','read','getReader','ENOENT','listRegistries','limit','queries','1751519FhgQev','trim','\x22:\x20','value','Duplicate\x20resource\x20handle\x20\x22','normalize','toLowerCase','resource-invalid-svg','height','handles','utf8','output','.tagIds','.intrinsicSize.width','has','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','].input.defaultLocale','globalIndex','\x20must\x20be\x20an\x20array.','.source','options','write','source','cache','.groupId','searchText','utf-8','manifest','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','add','manifestPath','\x20must\x20be\x20a\x20boolean.','Resource\x20download\x20timed\x20out\x20after\x20','Downloaded\x20resource\x20\x22','.payload.colorEditable','resource-download-invalid-redirect','signal','1523666GpVQRC','.intrinsicSize\x20must\x20be\x20positive.','clear','byteLength','url','isArray','.name','https:','registryId','maxRedirects','.id','.storagePolicy\x20must\x20be\x20\x22reference\x22.','isInteger','pid','resource-download-insecure-redirect','sourceUrl','.payload','label','order','object','resource-registry-not-found','path','isFinite','type','Invalid\x20resource\x20ID\x20\x22','message','.svg','size','keywords','releaseLock','timeoutMs','reference'];_0x10a2=function(){return _0xaf2ba1;};return _0x10a2();}function P(_0x3040f7,_0x11daf5,_0x495891){const _0x396e8b=_0x10a363;try{_0x495891===_0x396e8b(0x170)?x(_0x3040f7):S(_0x3040f7);}catch(_0x21a9d9){throw T(_0x11daf5+':\x20'+(_0x21a9d9 instanceof Error?_0x21a9d9[_0x396e8b(0x1c0)]:String(_0x21a9d9)));}}function F(_0x4ad68f,_0x2b2926,_0x1add4a){const _0x4d419c=_0x10a363;let _0x4150a6=new Map();for(let [_0x495ea3,_0x30ff18]of D(_0x4ad68f,_0x2b2926,!0x0)['entries']()){let _0x5eb580=E(_0x30ff18,_0x2b2926+'['+_0x495ea3+']'),_0x1b97c9=O(_0x5eb580['id'],_0x2b2926+'['+_0x495ea3+_0x4d419c(0x137));if(P(_0x1b97c9,_0x2b2926+'['+_0x495ea3+_0x4d419c(0x137),_0x4d419c(0x169)),_0x4150a6[_0x4d419c(0x190)](_0x1b97c9))throw T(_0x4d419c(0x142)+_0x2b2926+_0x4d419c(0x1e1)+_0x1b97c9+'\x22.');_0x4150a6[_0x4d419c(0x1e4)](_0x1b97c9,N(_0x5eb580[_0x4d419c(0x1b8)],_0x2b2926+'['+_0x495ea3+_0x4d419c(0x173),_0x1add4a));}return _0x4150a6;}function I(_0x335d9c,_0x34a36d){const _0xcc5d4=_0x10a363;let _0x4952ee=E(_0x335d9c[_0xcc5d4(0x163)],_0x34a36d+'.intrinsicSize'),_0xeb6409=j(_0x4952ee['width'],_0x34a36d+_0xcc5d4(0x18f)),_0x35e8e1=j(_0x4952ee[_0xcc5d4(0x18a)],_0x34a36d+_0xcc5d4(0x122));if(_0xeb6409<=0x0||_0x35e8e1<=0x0)throw T(_0x34a36d+_0xcc5d4(0x1a8));return{'width':_0xeb6409,'height':_0x35e8e1};}function L(_0x540e07,_0x4c4188){const _0x2adae7=_0x10a363;if(_0x540e07[_0x2adae7(0x1be)]!=='image')throw T(_0x4c4188+_0x2adae7(0x15d));if(_0x540e07[_0x2adae7(0x1c8)]!==_0x2adae7(0x1c6))throw T(_0x4c4188+_0x2adae7(0x1b2));let _0x5e81ba=E(_0x540e07[_0x2adae7(0x198)],_0x4c4188+_0x2adae7(0x195));if(_0x5e81ba['type']!==_0x2adae7(0x1ab))throw T(_0x4c4188+_0x2adae7(0x133));let _0x1e5c54=O(_0x5e81ba[_0x2adae7(0x185)],_0x4c4188+'.source.value'),_0x162bc6;try{_0x162bc6=new URL(_0x1e5c54);}catch{throw T(_0x4c4188+_0x2adae7(0x155));}if(_0x162bc6['protocol']!=='https:')throw T(_0x4c4188+_0x2adae7(0x1d3));return _0x1e5c54;}function R(_0x51ae58){const _0x2f84ac=_0x10a363;return _0x51ae58[_0x2f84ac(0x187)]('NFKC')[_0x2f84ac(0x188)]()[_0x2f84ac(0x183)]()[_0x2f84ac(0x1e0)](/\s+/gu,'\x20');}function z(_0x4e84ae){const _0x5d3412=_0x10a363;let _0x11fe55=E(_0x4e84ae,_0x5d3412(0x19d)),_0x6ccc69=new Map(),_0x5d0d38=new Map(),_0x5e5635=[],_0x386a14=[],_0x590b16=new Set(),_0x1bb8f5=0x0;for(let [_0x1cc1d3,_0x5d453f]of D(_0x11fe55['registrations'],_0x5d3412(0x1e3))['entries']()){let _0x22908c=E(E(_0x5d453f,_0x5d3412(0x1de)+_0x1cc1d3+']')[_0x5d3412(0x166)],'registrations['+_0x1cc1d3+_0x5d3412(0x12b)),_0x89e43c=O(_0x22908c['registryId'],_0x5d3412(0x1de)+_0x1cc1d3+_0x5d3412(0x1da));if(P(_0x89e43c,_0x5d3412(0x1de)+_0x1cc1d3+_0x5d3412(0x1da),_0x5d3412(0x170)),_0x6ccc69[_0x5d3412(0x190)](_0x89e43c))throw T(_0x5d3412(0x1cf)+_0x89e43c+'\x22.');let _0xf443d9=_0x22908c[_0x5d3412(0x15f)]===void 0x0?void 0x0:O(_0x22908c['defaultLocale'],_0x5d3412(0x1de)+_0x1cc1d3+_0x5d3412(0x192)),_0x116687=F(_0x22908c[_0x5d3412(0x168)],_0x5d3412(0x1de)+_0x1cc1d3+'].input.groups',_0xf443d9),_0x3064c8=F(_0x22908c[_0x5d3412(0x1dc)],'registrations['+_0x1cc1d3+_0x5d3412(0x11e),_0xf443d9),_0x470cd3=[];for(let [_0x12a5d3,_0x52fd6c]of D(_0x22908c[_0x5d3412(0x15a)],'registrations['+_0x1cc1d3+'].input.resources')[_0x5d3412(0x178)]()){let _0x1c0ef5='registrations['+_0x1cc1d3+_0x5d3412(0x127)+_0x12a5d3+']',_0x21275d=E(_0x52fd6c,_0x1c0ef5),_0x43cbfd=O(_0x21275d['id'],_0x1c0ef5+_0x5d3412(0x1b1));P(_0x43cbfd,_0x1c0ef5+'.id','resource');let _0x68dadf=ee(_0x89e43c,_0x43cbfd);if(_0x5d0d38[_0x5d3412(0x190)](_0x68dadf))throw T(_0x5d3412(0x186)+_0x68dadf+'\x22.');let _0x4aa070;try{_0x4aa070=w(_0x68dadf);}catch(_0x2c2126){throw T(_0x1c0ef5+':\x20'+(_0x2c2126 instanceof Error?_0x2c2126[_0x5d3412(0x1c0)]:String(_0x2c2126)));}if(_0x590b16[_0x5d3412(0x190)](_0x4aa070))throw T(_0x5d3412(0x1e6)+_0x4aa070+'\x22.');_0x590b16[_0x5d3412(0x19f)](_0x4aa070);let _0x48129b=_0x21275d[_0x5d3412(0x1e7)]===void 0x0?void 0x0:O(_0x21275d['groupId'],_0x1c0ef5+_0x5d3412(0x19a));if(_0x48129b!==void 0x0&&!_0x116687[_0x5d3412(0x190)](_0x48129b))throw T(_0x1c0ef5+'.groupId\x20references\x20unknown\x20group\x20\x22'+_0x48129b+'\x22.');let _0x2b0677=k(_0x21275d[_0x5d3412(0x143)],_0x1c0ef5+_0x5d3412(0x18e),!0x0);for(let _0xf847a1 of _0x2b0677)if(!_0x3064c8[_0x5d3412(0x190)](_0xf847a1))throw T(_0x1c0ef5+'.tagIds\x20references\x20unknown\x20tag\x20\x22'+_0xf847a1+'\x22.');let _0x4f3ba7=A(_0x21275d['keywords'],_0x1c0ef5+_0x5d3412(0x159)),_0xb70f2c=N(_0x21275d[_0x5d3412(0x1d7)],_0x1c0ef5+_0x5d3412(0x1ad),_0xf443d9),_0x1ae4cf=_0x21275d[_0x5d3412(0x1d0)]===void 0x0?void 0x0:N(_0x21275d[_0x5d3412(0x1d0)],_0x1c0ef5+_0x5d3412(0x151),_0xf443d9),_0xee870e=_0x48129b===void 0x0?null:{'id':_0x48129b,'label':_0x116687[_0x5d3412(0x135)](_0x48129b)},_0x11a8f1=_0x2b0677[_0x5d3412(0x139)](_0x2e2595=>({'id':_0x2e2595,'label':_0x3064c8[_0x5d3412(0x135)](_0x2e2595)})),_0x1e3f6f=E(_0x21275d[_0x5d3412(0x12f)],_0x1c0ef5+'.payload'),_0x263103=_0x21275d['order']===void 0x0?null:j(_0x21275d[_0x5d3412(0x1b9)],_0x1c0ef5+'.order'),_0x2aefc1=M(_0x1e3f6f[_0x5d3412(0x15b)],_0x1c0ef5+_0x5d3412(0x1a4)),_0x48a7d1={'handle':_0x68dadf,'registryId':_0x89e43c,'id':_0x43cbfd,'name':_0xb70f2c,..._0x1ae4cf===void 0x0?{}:{'description':_0x1ae4cf},'group':_0xee870e,'tags':_0x11a8f1,'keywords':_0x4f3ba7,'order':_0x263103,'intrinsicSize':I(_0x1e3f6f,_0x1c0ef5+_0x5d3412(0x1b7)),'colorEditable':_0x2aefc1,'sourceUrl':L(_0x1e3f6f,_0x1c0ef5+_0x5d3412(0x1b7)),'registrationIndex':_0x1cc1d3,'resourceIndex':_0x12a5d3,'globalIndex':_0x1bb8f5,'searchText':R([_0xb70f2c,_0x1ae4cf,_0xee870e?.[_0x5d3412(0x1b8)],..._0x11a8f1[_0x5d3412(0x139)](_0x684b3d=>_0x684b3d[_0x5d3412(0x1b8)]),..._0x4f3ba7][_0x5d3412(0x1c7)](_0x27f8ea=>_0x27f8ea!==void 0x0)[_0x5d3412(0x1d1)]('\x20'))};_0x1bb8f5++,_0x470cd3['push'](_0x48a7d1),_0x386a14['push'](_0x48a7d1),_0x5d0d38[_0x5d3412(0x1e4)](_0x68dadf,_0x48a7d1);}let _0x149381={'id':_0x89e43c,'groups':_0x116687,'tags':_0x3064c8,'resources':_0x470cd3};_0x5e5635[_0x5d3412(0x130)](_0x149381),_0x6ccc69['set'](_0x89e43c,_0x149381);}if(_0x5e5635[_0x5d3412(0x171)]===0x0)throw T('registrations\x20must\x20not\x20be\x20empty.');return{'registries':_0x5e5635,'registryById':_0x6ccc69,'resourceByHandle':_0x5d0d38,'resources':_0x386a14};}function _0x2349(_0x12dd40,_0x234735){_0x12dd40=_0x12dd40-0x11e;const _0x10a242=_0x10a2();let _0x234932=_0x10a242[_0x12dd40];return _0x234932;}function B(_0x5df1b4,_0x36414f){const _0x52b079=_0x10a363;C(_0x36414f);let _0x540afb=_0x5df1b4[_0x52b079(0x121)][_0x52b079(0x135)](_0x36414f);if(_0x540afb===void 0x0)throw new h('resource-not-found',_0x52b079(0x125)+_0x36414f+_0x52b079(0x13d),_0x36414f);return _0x540afb;}function te(_0x22cdd2){const _0x1b7b70=_0x10a363;return _0x22cdd2[_0x1b7b70(0x12a)][_0x1b7b70(0x139)](_0x2a6269=>({'id':_0x2a6269['id'],'resourceCount':_0x2a6269[_0x1b7b70(0x15a)][_0x1b7b70(0x171)],'groupCount':_0x2a6269['groups'][_0x1b7b70(0x1c2)],'tagCount':_0x2a6269['tags'][_0x1b7b70(0x1c2)],'colorEditableCount':_0x2a6269['resources'][_0x1b7b70(0x1c7)](_0x1321da=>_0x1321da[_0x1b7b70(0x15b)])[_0x1b7b70(0x171)]}));}function ne(_0x58764d){const _0xc9357e=_0x10a363;return{'handle':_0x58764d[_0xc9357e(0x1cb)],'registryId':_0x58764d[_0xc9357e(0x1af)],'id':_0x58764d['id'],'name':_0x58764d[_0xc9357e(0x1d7)],'group':_0x58764d[_0xc9357e(0x149)],'tags':_0x58764d['tags'],'keywords':_0x58764d[_0xc9357e(0x1c3)],'order':_0x58764d[_0xc9357e(0x1b9)],'intrinsicSize':_0x58764d[_0xc9357e(0x163)],'colorEditable':_0x58764d[_0xc9357e(0x15b)]};}function re(_0x27ea0e,_0x977553){const _0x255d74=_0x10a363;let _0x1f3869=(_0x27ea0e[_0x255d74(0x1b9)]??_0x27ea0e['globalIndex'])-(_0x977553[_0x255d74(0x1b9)]??_0x977553[_0x255d74(0x193)]);if(_0x1f3869!==0x0)return _0x1f3869;let _0xd0cbf0=_0x27ea0e[_0x255d74(0x16c)]-_0x977553[_0x255d74(0x16c)];if(_0xd0cbf0!==0x0)return _0xd0cbf0;let _0x30a39b=_0x27ea0e[_0x255d74(0x1df)]-_0x977553['resourceIndex'];return _0x30a39b===0x0?_0x27ea0e[_0x255d74(0x1cb)][_0x255d74(0x1e2)](_0x977553[_0x255d74(0x1cb)]):_0x30a39b;}function ie(_0x287d40,_0x1e587c){const _0x136201=_0x10a363;let _0xf0791b=_0x1e587c[_0x136201(0x181)]['map'](R)[_0x136201(0x1c7)](_0x4226c9=>_0x4226c9!=='');if(_0xf0791b[_0x136201(0x171)]===0x0)throw new h(_0x136201(0x14c),_0x136201(0x13b));let _0x4ec397=new Set(_0x1e587c[_0x136201(0x12a)]??[]);for(let _0x192a6c of _0x4ec397)if(!_0x287d40['registryById']['has'](_0x192a6c))throw new h(_0x136201(0x1bb),_0x136201(0x153)+_0x192a6c+'\x22.');let _0x446f17=_0x1e587c[_0x136201(0x180)]??_0x287d40[_0x136201(0x15a)][_0x136201(0x171)];if(!Number[_0x136201(0x1b3)](_0x446f17)||_0x446f17<0x1)throw new h(_0x136201(0x14d),_0x136201(0x17b)+_0x446f17+'\x22.');let _0x4108ec=_0x287d40['resources'][_0x136201(0x1c7)](_0x3a932d=>_0x4ec397['size']===0x0||_0x4ec397['has'](_0x3a932d[_0x136201(0x1af)]))[_0x136201(0x1c7)](_0x30dace=>_0xf0791b[_0x136201(0x13a)](_0x245325=>_0x30dace[_0x136201(0x19b)][_0x136201(0x1d9)](_0x245325)))[_0x136201(0x1e5)](re);return{'resources':_0x4108ec['slice'](0x0,_0x446f17)['map'](ne),'total':_0x4108ec[_0x136201(0x171)]};}function V(_0x521642){return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu['test'](_0x521642);}function H(_0x8ec3e1,_0x570ac8){const _0x46fe45=_0x10a363;return g(_0x570ac8)?{'handle':_0x8ec3e1,'code':_0x570ac8[_0x46fe45(0x1ce)],'message':_0x570ac8[_0x46fe45(0x1c0)]}:{'handle':_0x8ec3e1,'code':_0x46fe45(0x12e),'message':_0x570ac8 instanceof Error?_0x570ac8['message']:String(_0x570ac8)};}var U=class{[_0x10a363(0x196)];[_0x10a363(0x150)];constructor(_0x26184e){const _0x40015a=_0x10a363;this[_0x40015a(0x196)]=_0x26184e,this[_0x40015a(0x150)]=z(_0x26184e['manifest']);}get[_0x10a363(0x13f)](){const _0x569cd7=_0x10a363;return this[_0x569cd7(0x196)][_0x569cd7(0x199)]['location'];}[_0x10a363(0x17f)](){const _0x433a07=_0x10a363;return te(this[_0x433a07(0x150)]);}[_0x10a363(0x16a)](_0x4e555a){const _0x30a709=_0x10a363;return ie(this[_0x30a709(0x150)],_0x4e555a);}async['read'](_0x368577){const _0x8b143e=_0x10a363;let _0x21f2a5=B(this[_0x8b143e(0x150)],_0x368577['handle']),_0x309d73=await this['options']['cache']['read'](_0x368577[_0x8b143e(0x1cb)]);if(_0x309d73!==void 0x0&&V(_0x309d73))return{'handle':_0x368577[_0x8b143e(0x1cb)],'svg':_0x309d73};let _0x49d9f0;try{_0x49d9f0=await this[_0x8b143e(0x196)][_0x8b143e(0x123)][_0x8b143e(0x147)](_0x21f2a5[_0x8b143e(0x1b6)]);}catch(_0x31baea){throw g(_0x31baea)?_0x31baea:new h(_0x8b143e(0x15e),_0x8b143e(0x136)+_0x368577['handle']+_0x8b143e(0x184)+(_0x31baea instanceof Error?_0x31baea[_0x8b143e(0x1c0)]:String(_0x31baea)),_0x368577['handle'],{'cause':_0x31baea});}if(!V(_0x49d9f0))throw new h(_0x8b143e(0x189),_0x8b143e(0x1a3)+_0x368577['handle']+'\x22\x20is\x20not\x20an\x20SVG\x20document.',_0x368577['handle']);return await this[_0x8b143e(0x196)][_0x8b143e(0x199)][_0x8b143e(0x197)](_0x368577['handle'],_0x49d9f0),{'handle':_0x368577[_0x8b143e(0x1cb)],'svg':_0x49d9f0};}async[_0x10a363(0x157)](_0x1c4b66){const _0x594898=_0x10a363;let _0x44f97b=[],_0x5bd48e=[];for(let _0x59415d of _0x1c4b66[_0x594898(0x18b)])try{let {svg:_0x20beab}=await this[_0x594898(0x17c)]({'handle':_0x59415d}),_0x128296=await this[_0x594898(0x196)][_0x594898(0x18d)][_0x594898(0x197)](_0x1c4b66[_0x594898(0x128)],w(_0x59415d),_0x20beab);_0x44f97b['push']({'handle':_0x59415d,'path':_0x128296});}catch(_0x38297){_0x5bd48e[_0x594898(0x130)](H(_0x59415d,_0x38297));}return{'exported':_0x44f97b,'failed':_0x5bd48e};}async[_0x10a363(0x13e)](){const _0x47aadf=_0x10a363;return await this[_0x47aadf(0x196)]['cache'][_0x47aadf(0x1a9)]();}};function W(_0x3dd887){return new U(_0x3dd887);}function G(_0x32a77b){return _0x32a77b instanceof Error&&'code'in _0x32a77b;}function K(_0x1c15d9){const _0x19e651=_0x10a363;let _0xf52b61=_0x5a3a0d(_0x1c15d9);if(!_0x30918f(_0x1c15d9)||_0xf52b61===_0x34d254(_0xf52b61)[_0x19e651(0x167)])throw new h('resource-cache-root-invalid',_0x19e651(0x1d5)+_0x1c15d9+'\x22.');return _0xf52b61;}async function q(_0x2587ba){const _0x36b104=_0x10a363;let _0xde84e2;try{_0xde84e2=await _0x495ffd(_0x2587ba,{'withFileTypes':!0x0});}catch(_0x30e84c){if(G(_0x30e84c)&&_0x30e84c['code']===_0x36b104(0x17e))return{'resourceCount':0x0,'byteCount':0x0};throw _0x30e84c;}let _0x4f4f68=0x0,_0x38a434=0x0;for(let _0x48443e of _0xde84e2){let _0x40ba80=_0x175002(_0x2587ba,_0x48443e['name']);if(_0x48443e[_0x36b104(0x1e8)]()){let _0x13196e=await q(_0x40ba80);_0x4f4f68+=_0x13196e['resourceCount'],_0x38a434+=_0x13196e['byteCount'];}else{if(_0x48443e['isFile']()&&_0x48443e[_0x36b104(0x1d7)][_0x36b104(0x152)](_0x36b104(0x1c1))){let _0x2f911c=await _0x1cb600(_0x40ba80);_0x4f4f68++,_0x38a434+=_0x2f911c[_0x36b104(0x1c2)];}}}return{'resourceCount':_0x4f4f68,'byteCount':_0x38a434};}var J=class{[_0x10a363(0x140)];constructor(_0x1edbdf){const _0x1a8582=_0x10a363;this[_0x1a8582(0x140)]=K(_0x1edbdf);}[_0x10a363(0x1bc)](_0x527944){let {registryId:_0x5cfbbb,resourceId:_0x2fe659}=C(_0x527944);return _0x175002(this['location'],_0x5cfbbb,_0x2fe659+'.svg');}async['read'](_0x56774d){const _0x5bae2d=_0x10a363;try{return await _0x857f97(this[_0x5bae2d(0x1bc)](_0x56774d),_0x5bae2d(0x18c));}catch(_0x53723f){if(G(_0x53723f)&&_0x53723f[_0x5bae2d(0x1ce)]===_0x5bae2d(0x17e))return;throw _0x53723f;}}async[_0x10a363(0x197)](_0x487648,_0x3de400){const _0x144c84=_0x10a363;let _0x4bd4b3=this[_0x144c84(0x1bc)](_0x487648);await _0x4b2f34(_0xe8ba2c(_0x4bd4b3),{'recursive':!0x0});let _0x26cf27=_0x175002(_0xe8ba2c(_0x4bd4b3),'.resource-'+process[_0x144c84(0x1b4)]+'-'+_0x311077()+'.tmp');try{await _0x4e3aa9(_0x26cf27,_0x3de400,{'encoding':_0x144c84(0x18c),'mode':0x180}),await _0x32a4b3(_0x26cf27,_0x4bd4b3);}catch(_0x297295){throw await _0x47a113(_0x26cf27)['catch'](()=>void 0x0),_0x297295;}}async[_0x10a363(0x1a9)](){const _0x4ef5dc=_0x10a363;let _0x5b0845=await q(this[_0x4ef5dc(0x140)]);return await _0x1b6ad8(this['location'],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x5b0845};}},Y=class{async[_0x10a363(0x197)](_0x19436c,_0x55392b,_0x1f069c){const _0x5a0d80=_0x10a363;await _0x4b2f34(_0x19436c,{'recursive':!0x0});let _0x24feb5=_0x175002(_0x19436c,_0x55392b);return await _0x4e3aa9(_0x24feb5,_0x1f069c,_0x5a0d80(0x18c)),_0x24feb5;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x313ec0){const _0x32a505=_0x10a363;return new h(_0x32a505(0x120),_0x32a505(0x134)+_0x313ec0+_0x32a505(0x14e));}async function ce(_0x276de6,_0x25c3f4){const _0x59a28d=_0x10a363;let _0x46b719=Number(_0x276de6[_0x59a28d(0x162)][_0x59a28d(0x135)]('content-length'));if(Number[_0x59a28d(0x1bd)](_0x46b719)&&_0x46b719>_0x25c3f4)throw Z(_0x25c3f4);if(_0x276de6[_0x59a28d(0x176)]===null){let _0x58255d=await _0x276de6[_0x59a28d(0x14a)]();if(Buffer[_0x59a28d(0x1aa)](_0x58255d)>_0x25c3f4)throw Z(_0x25c3f4);return _0x58255d;}let _0x3f3f63=_0x276de6[_0x59a28d(0x176)][_0x59a28d(0x17d)](),_0x1a4fd8=[],_0x40e88f=0x0;try{for(;;){let _0x478b84=await _0x3f3f63[_0x59a28d(0x17c)]();if(_0x478b84[_0x59a28d(0x1ea)])break;if(_0x40e88f+=_0x478b84[_0x59a28d(0x185)][_0x59a28d(0x1aa)],_0x40e88f>_0x25c3f4)throw await _0x3f3f63['cancel']()[_0x59a28d(0x1eb)](()=>void 0x0),Z(_0x25c3f4);_0x1a4fd8[_0x59a28d(0x130)](_0x478b84[_0x59a28d(0x185)]);}}finally{_0x3f3f63[_0x59a28d(0x1c4)]();}try{return new TextDecoder(_0x59a28d(0x19c),{'fatal':!0x0})['decode'](Buffer[_0x59a28d(0x145)](_0x1a4fd8,_0x40e88f));}catch{throw new h(_0x59a28d(0x179),_0x59a28d(0x191));}}var Q=class{[_0x10a363(0x132)];['timeoutMs'];[_0x10a363(0x148)];[_0x10a363(0x1b0)];constructor(_0x4ba0b5={}){const _0x3ac3c7=_0x10a363;this[_0x3ac3c7(0x132)]=_0x4ba0b5[_0x3ac3c7(0x11f)]??fetch,this[_0x3ac3c7(0x1c5)]=_0x4ba0b5['timeoutMs']??X,this[_0x3ac3c7(0x148)]=_0x4ba0b5[_0x3ac3c7(0x148)]??ae,this[_0x3ac3c7(0x1b0)]=_0x4ba0b5[_0x3ac3c7(0x1b0)]??oe;}async[_0x10a363(0x147)](_0x18011c){const _0x518e8d=_0x10a363;let _0x26f393=new URL(_0x18011c);if(_0x26f393[_0x518e8d(0x1ca)]!==_0x518e8d(0x1ae))throw new h(_0x518e8d(0x15c),_0x518e8d(0x160));let _0x310c86=new AbortController(),_0x464dff=setTimeout(()=>_0x310c86[_0x518e8d(0x1cc)](),this[_0x518e8d(0x1c5)]);try{let _0x23be30=_0x26f393;for(let _0xcf686d=0x0;;_0xcf686d++){let _0x4245b5=await this[_0x518e8d(0x132)](_0x23be30,{'redirect':_0x518e8d(0x16d),'signal':_0x310c86[_0x518e8d(0x1a6)]});if(se[_0x518e8d(0x190)](_0x4245b5[_0x518e8d(0x1d2)])){if(_0xcf686d>=this[_0x518e8d(0x1b0)])throw new h(_0x518e8d(0x156),_0x518e8d(0x1db)+this[_0x518e8d(0x1b0)]+'.');let _0x2c8ef1=_0x4245b5[_0x518e8d(0x162)][_0x518e8d(0x135)](_0x518e8d(0x140));if(_0x2c8ef1===null)throw new h('resource-download-invalid-redirect',_0x518e8d(0x124)+_0x4245b5[_0x518e8d(0x1d2)]+_0x518e8d(0x14b));let _0x2f4f6b;try{_0x2f4f6b=new URL(_0x2c8ef1,_0x23be30);}catch{throw new h(_0x518e8d(0x1a5),_0x518e8d(0x177));}if(_0x2f4f6b[_0x518e8d(0x1ca)]!==_0x518e8d(0x1ae))throw new h(_0x518e8d(0x1b5),_0x518e8d(0x19e));_0x23be30=_0x2f4f6b;continue;}if(!_0x4245b5['ok'])throw new h(_0x518e8d(0x154),'Resource\x20server\x20returned\x20HTTP\x20'+_0x4245b5[_0x518e8d(0x1d2)]+'.');if(_0x4245b5[_0x518e8d(0x1ab)]!==''&&new URL(_0x4245b5[_0x518e8d(0x1ab)])['protocol']!==_0x518e8d(0x1ae))throw new h(_0x518e8d(0x1b5),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x3aeb9b=await ce(_0x4245b5,this[_0x518e8d(0x148)]);if(!V(_0x3aeb9b))throw new h('resource-download-invalid-svg',_0x518e8d(0x1d4));return _0x3aeb9b;}}catch(_0x15b96e){throw _0x310c86[_0x518e8d(0x1a6)]['aborted']?new h('resource-download-timeout',_0x518e8d(0x1a2)+this['timeoutMs']+_0x518e8d(0x13c)):_0x15b96e;}finally{clearTimeout(_0x464dff);}}};function $(_0x3e511d){const _0x9d9fb2=_0x10a363;try{return JSON[_0x9d9fb2(0x1d8)](_0x2873a9(_0x3e511d,'utf8'));}catch(_0x5da01f){throw new h(_0x9d9fb2(0x14f),'Cannot\x20read\x20resource\x20manifest\x20at\x20'+_0x3e511d+':\x20'+(_0x5da01f instanceof Error?_0x5da01f[_0x9d9fb2(0x1c0)]:String(_0x5da01f)),void 0x0,{'cause':_0x5da01f});}}function le(_0x2a26d6){const _0x4807ae=_0x10a363;let _0x55b5a2;return()=>(_0x55b5a2??=W({'manifest':$(_0x2a26d6[_0x4807ae(0x1a0)]),'cache':new J(_0x2a26d6[_0x4807ae(0x12d)]),'downloader':new Q(_0x2a26d6[_0x4807ae(0x123)]),'output':new Y()}),_0x55b5a2);}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};
|