@lovrabet/lovrabet-cli 2.3.6-beta.1 → 2.3.6-beta.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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +3 -3
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +1 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +5 -3
- package/skills/lovrabet/guides/app-resolution.md +2 -0
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +10 -1
- package/skills/lovrabet/references/dataset-discovery-workflow.md +14 -1
- package/skills/lovrabet/references/instant-api-workflow.md +2 -0
- package/skills/lovrabet/references/lovrabet-app.md +2 -0
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2a9c0c,_0x5c3ea9){const _0x4dbb1c=a140_0x52b6,_0x49fcf1=_0x2a9c0c();while(!![]){try{const _0x4af515=-parseInt(_0x4dbb1c(0x1da))/0x1*(-parseInt(_0x4dbb1c(0x1cd))/0x2)+-parseInt(_0x4dbb1c(0x1c9))/0x3*(parseInt(_0x4dbb1c(0x1e0))/0x4)+-parseInt(_0x4dbb1c(0x1c2))/0x5+parseInt(_0x4dbb1c(0x1bc))/0x6+-parseInt(_0x4dbb1c(0x1a4))/0x7+-parseInt(_0x4dbb1c(0x1a9))/0x8*(-parseInt(_0x4dbb1c(0x1df))/0x9)+parseInt(_0x4dbb1c(0x1d8))/0xa*(parseInt(_0x4dbb1c(0x1c8))/0xb);if(_0x4af515===_0x5c3ea9)break;else _0x49fcf1['push'](_0x49fcf1['shift']());}catch(_0x1b651a){_0x49fcf1['push'](_0x49fcf1['shift']());}}}(a140_0x1bc2,0x59768));function a140_0x1bc2(){const _0x297190=['Truncated\x20JPEG.','image/gif','Invalid\x20PNG\x20decoded\x20scanline\x20size.','9731890yqWgdL','sync','189731lrjpjR','isSafeInteger','Truncated\x20or\x20incomplete\x20GIF\x20LZW\x20pixels.','Truncated\x20GIF.','push','204723zymHoj','4SUuHOe','3777585fKEVAT','Missing\x20GIF\x20trailer.','Missing\x20PNG\x20data/end.','max','image/png','8CMwJmy','includes','GIF\x20image\x20has\x20no\x20palette.','readUInt16LE','jpeg-js','subarray','Invalid\x20image:\x20','toString','GIF87a','update','acTL','Animated\x20PNG\x20is\x20not\x20supported.','width','height','Invalid\x20GIF\x20LZW\x20code\x20size.','equals','Invalid\x20GIF\x20LZW\x20dictionary\x20reference.','hex','omggif','3669546ECCzRs','GIF89a','Invalid\x20PNG\x20color/depth/interlace.','GIF\x20cumulative\x20frame\x20pixels\x20exceed\x2040\x20million.','decode','numFrames','1013060Beqiga','Invalid\x20PNG\x20end.','Truncated\x20PNG\x20data.','Truncated\x20PNG\x20chunk.','digest','image/jpeg','11MzfAPH','2065653jQDXkf','Invalid\x20GIF\x20block.','concat','read','2EJLqev','Unsupported\x20image\x20format;\x20only\x20PNG,\x20JPEG\x20and\x20GIF\x20are\x20supported.\x20WebP\x20is\x20not\x20supported.','readUInt32BE','length','ascii','from','ceil','GIF\x20frame\x20exceeds\x20canvas.'];a140_0x1bc2=function(){return _0x297190;};return a140_0x1bc2();}import{createRequire}from'node:module';import{createHash}from'node:crypto';import{inflateSync}from'node:zlib';const require=createRequire(import.meta.url),MAX_PIXELS=0x2625a00;function dimensions(_0x6410f3,_0x420dcd){const _0x3f418d=a140_0x52b6;if(!Number['isSafeInteger'](_0x6410f3)||!Number[_0x3f418d(0x1db)](_0x420dcd)||_0x6410f3<0x1||_0x420dcd<0x1||_0x6410f3*_0x420dcd>MAX_PIXELS)throw Error('Image\x20dimensions\x20exceed\x2040\x20million\x20pixels.');}function a140_0x52b6(_0x326789,_0x765eac){_0x326789=_0x326789-0x1a4;const _0x1bc2de=a140_0x1bc2();let _0x52b67c=_0x1bc2de[_0x326789];return _0x52b67c;}function validateGif(_0x2054a2){const _0x565696=a140_0x52b6;let _0x7f0699=0xd,_0x17d8a9=0x0,_0x5c6b54=0x0;const _0x316097=_0x2054a2[_0x565696(0x1ac)](0x6),_0x45f319=_0x2054a2[_0x565696(0x1ac)](0x8),_0x519806=_0x2054a2[0xa]&0x80?0x1<<(_0x2054a2[0xa]&0x7)+0x1:0x0,_0x985b19=_0x42d863=>{if(_0x7f0699+_0x42d863>_0x2054a2['length'])throw Error('Truncated\x20GIF\x20data.');};_0x7f0699+=_0x519806*0x3,_0x985b19(0x0);const _0x21fac2=()=>{const _0x5a7f9f=[];while(!![]){_0x985b19(0x1);const _0xce127f=_0x2054a2[_0x7f0699++];if(!_0xce127f)break;_0x985b19(_0xce127f),_0x5a7f9f['push'](_0x2054a2['subarray'](_0x7f0699,_0x7f0699+_0xce127f)),_0x7f0699+=_0xce127f;}return Buffer['concat'](_0x5a7f9f);};while(_0x7f0699<_0x2054a2[_0x565696(0x1d0)]){const _0x251059=_0x2054a2[_0x7f0699++];if(_0x251059===0x3b){if(!_0x17d8a9||_0x7f0699!==_0x2054a2[_0x565696(0x1d0)])throw Error('Invalid\x20GIF\x20trailer.');return;}if(_0x251059===0x21){_0x985b19(0x1),_0x7f0699++,_0x21fac2();continue;}if(_0x251059!==0x2c)throw Error(_0x565696(0x1ca));_0x985b19(0x9);const _0x366394=_0x2054a2['readUInt16LE'](_0x7f0699),_0x1f770b=_0x2054a2[_0x565696(0x1ac)](_0x7f0699+0x2),_0x46a21e=_0x2054a2['readUInt16LE'](_0x7f0699+0x4),_0x28651d=_0x2054a2[_0x565696(0x1ac)](_0x7f0699+0x6),_0x19fb94=_0x2054a2[_0x7f0699+0x8];_0x7f0699+=0x9,dimensions(_0x46a21e,_0x28651d);if(_0x366394+_0x46a21e>_0x316097||_0x1f770b+_0x28651d>_0x45f319||++_0x17d8a9>0x2710||(_0x5c6b54+=_0x316097*_0x45f319)>MAX_PIXELS)throw Error(_0x565696(0x1bf));const _0x37fc04=_0x19fb94&0x80?0x1<<(_0x19fb94&0x7)+0x1:_0x519806;if(!_0x37fc04)throw Error(_0x565696(0x1ab));_0x19fb94&0x80&&(_0x985b19(_0x37fc04*0x3),_0x7f0699+=_0x37fc04*0x3);_0x985b19(0x1);const _0x27c7be=_0x2054a2[_0x7f0699++];if(_0x27c7be<0x2||_0x27c7be>0x8)throw Error(_0x565696(0x1b7));const _0x2ecb8e=_0x21fac2(),_0x3d295f=0x1<<_0x27c7be,_0x53dfcd=_0x3d295f+0x1;let _0x156402=_0x27c7be+0x1,_0x24f960=_0x53dfcd+0x1,_0x2b7578=0x0,_0x2deaf6=-0x1,_0x3f4e14=0x0,_0x1970e0=![];const _0x3b5270=new Uint32Array(0x1000),_0x5676a3=new Uint16Array(0x1000);for(let _0x292e6c=0x0;_0x292e6c<_0x3d295f;_0x292e6c++){_0x3b5270[_0x292e6c]=0x1,_0x5676a3[_0x292e6c]=_0x292e6c;}while(_0x2b7578+_0x156402<=_0x2ecb8e[_0x565696(0x1d0)]*0x8){let _0x256f22=0x0;for(let _0x407d99=0x0;_0x407d99<_0x156402;_0x407d99++,_0x2b7578++)_0x256f22|=(_0x2ecb8e[_0x2b7578>>0x3]>>(_0x2b7578&0x7)&0x1)<<_0x407d99;if(_0x256f22===_0x3d295f){_0x156402=_0x27c7be+0x1,_0x24f960=_0x53dfcd+0x1,_0x2deaf6=-0x1;continue;}if(_0x256f22===_0x53dfcd){_0x1970e0=!![];break;}if(_0x256f22>_0x24f960||_0x256f22===_0x24f960&&_0x2deaf6<0x0||_0x2deaf6<0x0&&_0x256f22>=_0x3d295f)throw Error(_0x565696(0x1b9));const _0x36ca73=_0x256f22===_0x24f960?_0x3b5270[_0x2deaf6]+0x1:_0x3b5270[_0x256f22],_0x166132=_0x256f22===_0x24f960?_0x5676a3[_0x2deaf6]:_0x5676a3[_0x256f22];if(!_0x36ca73||_0x166132>=_0x37fc04||(_0x3f4e14+=_0x36ca73)>_0x46a21e*_0x28651d)throw Error('Invalid\x20GIF\x20LZW\x20pixel\x20data.');if(_0x2deaf6>=0x0&&_0x24f960<0x1000){_0x3b5270[_0x24f960]=_0x3b5270[_0x2deaf6]+0x1,_0x5676a3[_0x24f960]=Math['max'](_0x5676a3[_0x2deaf6],_0x166132),_0x24f960++;if(_0x24f960===0x1<<_0x156402&&_0x156402<0xc)_0x156402++;}_0x2deaf6=_0x256f22;}if(!_0x1970e0||_0x3f4e14!==_0x46a21e*_0x28651d)throw Error(_0x565696(0x1dc));}throw Error(_0x565696(0x1a5));}export function validateImageBytes(_0x4dc7e0){const _0x7a8c1f=a140_0x52b6;if(!_0x4dc7e0[_0x7a8c1f(0x1d0)]||_0x4dc7e0['length']>0xa*0x400*0x400)throw Error('Image\x20must\x20be\x20non-empty\x20and\x20no\x20larger\x20than\x2010\x20MB.');let _0x3f5ce2;try{if(_0x4dc7e0['subarray'](0x0,0x8)[_0x7a8c1f(0x1b8)](Buffer[_0x7a8c1f(0x1d2)]([0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa]))){if(_0x4dc7e0[_0x7a8c1f(0x1d0)]<0x21||_0x4dc7e0[_0x7a8c1f(0x1b0)]('ascii',0xc,0x10)!=='IHDR')throw Error('Invalid\x20PNG\x20header.');dimensions(_0x4dc7e0[_0x7a8c1f(0x1cf)](0x10),_0x4dc7e0[_0x7a8c1f(0x1cf)](0x14));const _0x539eb9=_0x4dc7e0[_0x7a8c1f(0x1cf)](0x10),_0x255e66=_0x4dc7e0['readUInt32BE'](0x14),_0x22bef7=_0x4dc7e0[0x18],_0x56d824=_0x4dc7e0[0x19],_0x3636e9=_0x4dc7e0[0x1c],_0x220bfa={0x0:0x1,0x2:0x3,0x3:0x1,0x4:0x2,0x6:0x4}[_0x56d824];if(!_0x220bfa||![0x1,0x2,0x4,0x8,0x10][_0x7a8c1f(0x1aa)](_0x22bef7)||_0x3636e9>0x1)throw Error(_0x7a8c1f(0x1be));const _0x543603=_0x148585=>Math[_0x7a8c1f(0x1d3)](_0x148585*_0x220bfa*_0x22bef7/0x8)+0x1;let _0x5e9471=_0x543603(_0x539eb9)*_0x255e66;if(_0x3636e9){_0x5e9471=0x0;for(const [_0x222e22,_0x592916,_0x2c232a,_0x2bddf8]of[[0x0,0x0,0x8,0x8],[0x4,0x0,0x8,0x8],[0x0,0x4,0x4,0x8],[0x2,0x0,0x4,0x4],[0x0,0x2,0x2,0x4],[0x1,0x0,0x2,0x2],[0x0,0x1,0x1,0x2]]){const _0x5e82cc=Math[_0x7a8c1f(0x1a7)](0x0,Math[_0x7a8c1f(0x1d3)]((_0x539eb9-_0x222e22)/_0x2c232a)),_0x24b75b=Math[_0x7a8c1f(0x1a7)](0x0,Math[_0x7a8c1f(0x1d3)]((_0x255e66-_0x592916)/_0x2bddf8));if(_0x5e82cc&&_0x24b75b)_0x5e9471+=_0x543603(_0x5e82cc)*_0x24b75b;}}let _0x33ef03=0x8,_0x43fbb7=![];const _0x37ea3c=[];while(_0x33ef03<_0x4dc7e0[_0x7a8c1f(0x1d0)]){if(_0x33ef03+0xc>_0x4dc7e0['length'])throw Error(_0x7a8c1f(0x1c5));const _0x4d5bba=_0x4dc7e0['readUInt32BE'](_0x33ef03),_0x58eba2=_0x4dc7e0[_0x7a8c1f(0x1b0)](_0x7a8c1f(0x1d1),_0x33ef03+0x4,_0x33ef03+0x8);if(_0x58eba2===_0x7a8c1f(0x1b3))throw Error(_0x7a8c1f(0x1b4));if(_0x33ef03+_0x4d5bba+0xc>_0x4dc7e0[_0x7a8c1f(0x1d0)])throw Error(_0x7a8c1f(0x1c4));if(_0x58eba2==='IDAT')_0x37ea3c[_0x7a8c1f(0x1de)](_0x4dc7e0[_0x7a8c1f(0x1ae)](_0x33ef03+0x8,_0x33ef03+0x8+_0x4d5bba));_0x33ef03+=_0x4d5bba+0xc;if(_0x58eba2==='IEND'){if(_0x4d5bba||_0x33ef03!==_0x4dc7e0['length'])throw Error(_0x7a8c1f(0x1c3));_0x43fbb7=!![];break;}}if(!_0x43fbb7||!_0x37ea3c['length'])throw Error(_0x7a8c1f(0x1a6));if(inflateSync(Buffer[_0x7a8c1f(0x1cb)](_0x37ea3c),{'maxOutputLength':_0x5e9471+0x1})['length']!==_0x5e9471)throw Error(_0x7a8c1f(0x1d7));const {PNG:_0x12f696}=require('pngjs'),_0x233c4b=_0x12f696[_0x7a8c1f(0x1d9)][_0x7a8c1f(0x1cc)](_0x4dc7e0,{'checkCRC':!![]});dimensions(_0x233c4b[_0x7a8c1f(0x1b5)],_0x233c4b[_0x7a8c1f(0x1b6)]),_0x3f5ce2=_0x7a8c1f(0x1a8);}else{if(_0x4dc7e0[0x0]===0xff&&_0x4dc7e0[0x1]===0xd8){if(_0x4dc7e0['at'](-0x2)!==0xff||_0x4dc7e0['at'](-0x1)!==0xd9)throw Error(_0x7a8c1f(0x1d5));const _0x5a259d=require(_0x7a8c1f(0x1ad)),_0x234ae0=_0x5a259d[_0x7a8c1f(0x1c0)](_0x4dc7e0,{'useTArray':!![],'formatAsRGBA':![],'tolerantDecoding':![],'maxResolutionInMP':0x28,'maxMemoryUsageInMB':0x100});dimensions(_0x234ae0['width'],_0x234ae0['height']),_0x3f5ce2=_0x7a8c1f(0x1c7);}else{if([_0x7a8c1f(0x1b1),_0x7a8c1f(0x1bd)][_0x7a8c1f(0x1aa)](_0x4dc7e0[_0x7a8c1f(0x1b0)](_0x7a8c1f(0x1d1),0x0,0x6))){if(_0x4dc7e0[_0x7a8c1f(0x1d0)]<0xe||_0x4dc7e0['at'](-0x1)!==0x3b)throw Error(_0x7a8c1f(0x1dd));dimensions(_0x4dc7e0[_0x7a8c1f(0x1ac)](0x6),_0x4dc7e0[_0x7a8c1f(0x1ac)](0x8)),validateGif(_0x4dc7e0);const {GifReader:_0x1816b7}=require(_0x7a8c1f(0x1bb)),_0x27a959=new _0x1816b7(_0x4dc7e0);dimensions(_0x27a959['width'],_0x27a959[_0x7a8c1f(0x1b6)]);const _0x5caaa4=_0x27a959[_0x7a8c1f(0x1c1)]();if(!_0x5caaa4||_0x5caaa4>0x2710||_0x5caaa4*_0x27a959[_0x7a8c1f(0x1b5)]*_0x27a959[_0x7a8c1f(0x1b6)]>MAX_PIXELS)throw Error(_0x7a8c1f(0x1bf));const _0x6f2811=new Uint8Array(_0x27a959[_0x7a8c1f(0x1b5)]*_0x27a959[_0x7a8c1f(0x1b6)]*0x4);for(let _0x1fb780=0x0;_0x1fb780<_0x5caaa4;_0x1fb780++){const _0x3e2922=_0x27a959['frameInfo'](_0x1fb780);if(_0x3e2922['x']+_0x3e2922[_0x7a8c1f(0x1b5)]>_0x27a959[_0x7a8c1f(0x1b5)]||_0x3e2922['y']+_0x3e2922[_0x7a8c1f(0x1b6)]>_0x27a959['height'])throw Error(_0x7a8c1f(0x1d4));_0x27a959['decodeAndBlitFrameRGBA'](_0x1fb780,_0x6f2811);}_0x3f5ce2=_0x7a8c1f(0x1d6);}else throw Error(_0x7a8c1f(0x1ce));}}}catch(_0x20ae78){throw Error(_0x7a8c1f(0x1af)+_0x20ae78['message']);}return{'contentHash':createHash('sha256')[_0x7a8c1f(0x1b2)](_0x4dc7e0)[_0x7a8c1f(0x1c6)](_0x7a8c1f(0x1ba)),'type':_0x3f5ce2,'size':_0x4dc7e0[_0x7a8c1f(0x1d0)],'bytes':_0x4dc7e0};}
|
|
1
|
+
function a140_0xb46e(){const _0x568910=['259qMKtfs','Truncated\x20or\x20incomplete\x20GIF\x20LZW\x20pixels.','subarray','Missing\x20PNG\x20data/end.','Truncated\x20PNG\x20data.','95176ljwgzo','1124469BXbzkS','equals','GIF87a','4dyHagT','sha256','decodeAndBlitFrameRGBA','923dlHNXg','Missing\x20GIF\x20trailer.','image/png','Invalid\x20GIF\x20trailer.','Invalid\x20GIF\x20LZW\x20code\x20size.','numFrames','IEND','acTL','GIF\x20frame\x20exceeds\x20canvas.','push','12853971WlwlRG','image/jpeg','omggif','89477DuJLqV','ascii','510uGxqMB','Invalid\x20PNG\x20decoded\x20scanline\x20size.','digest','pngjs','Unsupported\x20image\x20format;\x20only\x20PNG,\x20JPEG\x20and\x20GIF\x20are\x20supported.\x20WebP\x20is\x20not\x20supported.','GIF\x20cumulative\x20frame\x20pixels\x20exceed\x2040\x20million.','read','toString','GIF89a','decode','sync','frameInfo','length','max','Image\x20dimensions\x20exceed\x2040\x20million\x20pixels.','Truncated\x20JPEG.','height','10bzUpmI','readUInt32BE','hex','width','Image\x20must\x20be\x20non-empty\x20and\x20no\x20larger\x20than\x2010\x20MB.','Invalid\x20PNG\x20header.','Animated\x20PNG\x20is\x20not\x20supported.','3085fgZKhk','includes','update','Invalid\x20GIF\x20LZW\x20pixel\x20data.','11ufnaIc','isSafeInteger','concat','9015910TPDPYj','message','jpeg-js','250980vcejww','IDAT','Invalid\x20PNG\x20end.','ceil','readUInt16LE'];a140_0xb46e=function(){return _0x568910;};return a140_0xb46e();}(function(_0x3ab528,_0x52ce6e){const _0x35d47c=a140_0xd312,_0x3a0797=_0x3ab528();while(!![]){try{const _0x554419=-parseInt(_0x35d47c(0xc4))/0x1*(parseInt(_0x35d47c(0xd7))/0x2)+-parseInt(_0x35d47c(0xf3))/0x3*(parseInt(_0x35d47c(0xb4))/0x4)+parseInt(_0x35d47c(0xde))/0x5*(parseInt(_0x35d47c(0xc6))/0x6)+parseInt(_0x35d47c(0xed))/0x7*(-parseInt(_0x35d47c(0xf2))/0x8)+parseInt(_0x35d47c(0xc1))/0x9+-parseInt(_0x35d47c(0xe5))/0xa*(parseInt(_0x35d47c(0xe2))/0xb)+-parseInt(_0x35d47c(0xe8))/0xc*(-parseInt(_0x35d47c(0xb7))/0xd);if(_0x554419===_0x52ce6e)break;else _0x3a0797['push'](_0x3a0797['shift']());}catch(_0x315a6b){_0x3a0797['push'](_0x3a0797['shift']());}}}(a140_0xb46e,0xc3b69));import{createRequire}from'node:module';import{createHash}from'node:crypto';import{inflateSync}from'node:zlib';const require=createRequire(import.meta.url),MAX_PIXELS=0x2625a00;function dimensions(_0x1eb3ba,_0xd85604){const _0xe7f62f=a140_0xd312;if(!Number['isSafeInteger'](_0x1eb3ba)||!Number[_0xe7f62f(0xe3)](_0xd85604)||_0x1eb3ba<0x1||_0xd85604<0x1||_0x1eb3ba*_0xd85604>MAX_PIXELS)throw Error(_0xe7f62f(0xd4));}function validateGif(_0xa7b6b6){const _0x4e56e7=a140_0xd312;let _0x1afcd6=0xd,_0x34d102=0x0,_0x122307=0x0;const _0x3fd9fb=_0xa7b6b6[_0x4e56e7(0xec)](0x6),_0x2cacb8=_0xa7b6b6[_0x4e56e7(0xec)](0x8),_0x15a421=_0xa7b6b6[0xa]&0x80?0x1<<(_0xa7b6b6[0xa]&0x7)+0x1:0x0,_0x2601bc=_0x4bc5da=>{const _0xc1a19c=_0x4e56e7;if(_0x1afcd6+_0x4bc5da>_0xa7b6b6[_0xc1a19c(0xd2)])throw Error('Truncated\x20GIF\x20data.');};_0x1afcd6+=_0x15a421*0x3,_0x2601bc(0x0);const _0x379886=()=>{const _0x238fe9=_0x4e56e7,_0x349a4c=[];while(!![]){_0x2601bc(0x1);const _0x561317=_0xa7b6b6[_0x1afcd6++];if(!_0x561317)break;_0x2601bc(_0x561317),_0x349a4c[_0x238fe9(0xc0)](_0xa7b6b6[_0x238fe9(0xef)](_0x1afcd6,_0x1afcd6+_0x561317)),_0x1afcd6+=_0x561317;}return Buffer[_0x238fe9(0xe4)](_0x349a4c);};while(_0x1afcd6<_0xa7b6b6[_0x4e56e7(0xd2)]){const _0xa464e8=_0xa7b6b6[_0x1afcd6++];if(_0xa464e8===0x3b){if(!_0x34d102||_0x1afcd6!==_0xa7b6b6[_0x4e56e7(0xd2)])throw Error(_0x4e56e7(0xba));return;}if(_0xa464e8===0x21){_0x2601bc(0x1),_0x1afcd6++,_0x379886();continue;}if(_0xa464e8!==0x2c)throw Error('Invalid\x20GIF\x20block.');_0x2601bc(0x9);const _0x4579a0=_0xa7b6b6[_0x4e56e7(0xec)](_0x1afcd6),_0x316697=_0xa7b6b6[_0x4e56e7(0xec)](_0x1afcd6+0x2),_0x1c872f=_0xa7b6b6[_0x4e56e7(0xec)](_0x1afcd6+0x4),_0x4f7319=_0xa7b6b6[_0x4e56e7(0xec)](_0x1afcd6+0x6),_0x1cc33c=_0xa7b6b6[_0x1afcd6+0x8];_0x1afcd6+=0x9,dimensions(_0x1c872f,_0x4f7319);if(_0x4579a0+_0x1c872f>_0x3fd9fb||_0x316697+_0x4f7319>_0x2cacb8||++_0x34d102>0x2710||(_0x122307+=_0x3fd9fb*_0x2cacb8)>MAX_PIXELS)throw Error('GIF\x20cumulative\x20frame\x20pixels\x20exceed\x2040\x20million.');const _0x213b2a=_0x1cc33c&0x80?0x1<<(_0x1cc33c&0x7)+0x1:_0x15a421;if(!_0x213b2a)throw Error('GIF\x20image\x20has\x20no\x20palette.');_0x1cc33c&0x80&&(_0x2601bc(_0x213b2a*0x3),_0x1afcd6+=_0x213b2a*0x3);_0x2601bc(0x1);const _0x483129=_0xa7b6b6[_0x1afcd6++];if(_0x483129<0x2||_0x483129>0x8)throw Error(_0x4e56e7(0xbb));const _0x54e9c6=_0x379886(),_0x580546=0x1<<_0x483129,_0x185887=_0x580546+0x1;let _0x38be45=_0x483129+0x1,_0x57d478=_0x185887+0x1,_0x2d793d=0x0,_0x40c232=-0x1,_0x288c92=0x0,_0xcfe580=![];const _0x1c66ee=new Uint32Array(0x1000),_0x554fb1=new Uint16Array(0x1000);for(let _0x1d9f2e=0x0;_0x1d9f2e<_0x580546;_0x1d9f2e++){_0x1c66ee[_0x1d9f2e]=0x1,_0x554fb1[_0x1d9f2e]=_0x1d9f2e;}while(_0x2d793d+_0x38be45<=_0x54e9c6['length']*0x8){let _0x2bd916=0x0;for(let _0x145a3c=0x0;_0x145a3c<_0x38be45;_0x145a3c++,_0x2d793d++)_0x2bd916|=(_0x54e9c6[_0x2d793d>>0x3]>>(_0x2d793d&0x7)&0x1)<<_0x145a3c;if(_0x2bd916===_0x580546){_0x38be45=_0x483129+0x1,_0x57d478=_0x185887+0x1,_0x40c232=-0x1;continue;}if(_0x2bd916===_0x185887){_0xcfe580=!![];break;}if(_0x2bd916>_0x57d478||_0x2bd916===_0x57d478&&_0x40c232<0x0||_0x40c232<0x0&&_0x2bd916>=_0x580546)throw Error('Invalid\x20GIF\x20LZW\x20dictionary\x20reference.');const _0x1c4cae=_0x2bd916===_0x57d478?_0x1c66ee[_0x40c232]+0x1:_0x1c66ee[_0x2bd916],_0x5f39f6=_0x2bd916===_0x57d478?_0x554fb1[_0x40c232]:_0x554fb1[_0x2bd916];if(!_0x1c4cae||_0x5f39f6>=_0x213b2a||(_0x288c92+=_0x1c4cae)>_0x1c872f*_0x4f7319)throw Error(_0x4e56e7(0xe1));if(_0x40c232>=0x0&&_0x57d478<0x1000){_0x1c66ee[_0x57d478]=_0x1c66ee[_0x40c232]+0x1,_0x554fb1[_0x57d478]=Math[_0x4e56e7(0xd3)](_0x554fb1[_0x40c232],_0x5f39f6),_0x57d478++;if(_0x57d478===0x1<<_0x38be45&&_0x38be45<0xc)_0x38be45++;}_0x40c232=_0x2bd916;}if(!_0xcfe580||_0x288c92!==_0x1c872f*_0x4f7319)throw Error(_0x4e56e7(0xee));}throw Error(_0x4e56e7(0xb8));}function a140_0xd312(_0x88a500,_0x281645){_0x88a500=_0x88a500-0xb2;const _0xb46ecb=a140_0xb46e();let _0xd31206=_0xb46ecb[_0x88a500];return _0xd31206;}export function validateImageBytes(_0x5c7529){const _0xd923c2=a140_0xd312;if(!_0x5c7529[_0xd923c2(0xd2)]||_0x5c7529[_0xd923c2(0xd2)]>0xa*0x400*0x400)throw Error(_0xd923c2(0xdb));let _0x21348b;try{if(_0x5c7529[_0xd923c2(0xef)](0x0,0x8)[_0xd923c2(0xb2)](Buffer['from']([0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa]))){if(_0x5c7529[_0xd923c2(0xd2)]<0x21||_0x5c7529[_0xd923c2(0xcd)](_0xd923c2(0xc5),0xc,0x10)!=='IHDR')throw Error(_0xd923c2(0xdc));dimensions(_0x5c7529['readUInt32BE'](0x10),_0x5c7529['readUInt32BE'](0x14));const _0x166fe0=_0x5c7529[_0xd923c2(0xd8)](0x10),_0x484800=_0x5c7529[_0xd923c2(0xd8)](0x14),_0x1e19a2=_0x5c7529[0x18],_0x4b69ef=_0x5c7529[0x19],_0x4ebb45=_0x5c7529[0x1c],_0x4d6985={0x0:0x1,0x2:0x3,0x3:0x1,0x4:0x2,0x6:0x4}[_0x4b69ef];if(!_0x4d6985||![0x1,0x2,0x4,0x8,0x10][_0xd923c2(0xdf)](_0x1e19a2)||_0x4ebb45>0x1)throw Error('Invalid\x20PNG\x20color/depth/interlace.');const _0x289534=_0x45e93c=>Math[_0xd923c2(0xeb)](_0x45e93c*_0x4d6985*_0x1e19a2/0x8)+0x1;let _0x2c321d=_0x289534(_0x166fe0)*_0x484800;if(_0x4ebb45){_0x2c321d=0x0;for(const [_0x5d4cac,_0x43b97d,_0x3d2c42,_0x4cceb3]of[[0x0,0x0,0x8,0x8],[0x4,0x0,0x8,0x8],[0x0,0x4,0x4,0x8],[0x2,0x0,0x4,0x4],[0x0,0x2,0x2,0x4],[0x1,0x0,0x2,0x2],[0x0,0x1,0x1,0x2]]){const _0x38c076=Math[_0xd923c2(0xd3)](0x0,Math[_0xd923c2(0xeb)]((_0x166fe0-_0x5d4cac)/_0x3d2c42)),_0x3690e3=Math[_0xd923c2(0xd3)](0x0,Math[_0xd923c2(0xeb)]((_0x484800-_0x43b97d)/_0x4cceb3));if(_0x38c076&&_0x3690e3)_0x2c321d+=_0x289534(_0x38c076)*_0x3690e3;}}let _0x54b755=0x8,_0x10c4fa=![];const _0x37f912=[];while(_0x54b755<_0x5c7529[_0xd923c2(0xd2)]){if(_0x54b755+0xc>_0x5c7529[_0xd923c2(0xd2)])throw Error('Truncated\x20PNG\x20chunk.');const _0x2c60b8=_0x5c7529['readUInt32BE'](_0x54b755),_0x54f730=_0x5c7529[_0xd923c2(0xcd)](_0xd923c2(0xc5),_0x54b755+0x4,_0x54b755+0x8);if(_0x54f730===_0xd923c2(0xbe))throw Error(_0xd923c2(0xdd));if(_0x54b755+_0x2c60b8+0xc>_0x5c7529[_0xd923c2(0xd2)])throw Error(_0xd923c2(0xf1));if(_0x54f730===_0xd923c2(0xe9))_0x37f912[_0xd923c2(0xc0)](_0x5c7529[_0xd923c2(0xef)](_0x54b755+0x8,_0x54b755+0x8+_0x2c60b8));_0x54b755+=_0x2c60b8+0xc;if(_0x54f730===_0xd923c2(0xbd)){if(_0x2c60b8||_0x54b755!==_0x5c7529['length'])throw Error(_0xd923c2(0xea));_0x10c4fa=!![];break;}}if(!_0x10c4fa||!_0x37f912[_0xd923c2(0xd2)])throw Error(_0xd923c2(0xf0));if(inflateSync(Buffer[_0xd923c2(0xe4)](_0x37f912),{'maxOutputLength':_0x2c321d+0x1})[_0xd923c2(0xd2)]!==_0x2c321d)throw Error(_0xd923c2(0xc7));const {PNG:_0x42a933}=require(_0xd923c2(0xc9)),_0x20611b=_0x42a933[_0xd923c2(0xd0)][_0xd923c2(0xcc)](_0x5c7529,{'checkCRC':!![]});dimensions(_0x20611b[_0xd923c2(0xda)],_0x20611b['height']),_0x21348b=_0xd923c2(0xb9);}else{if(_0x5c7529[0x0]===0xff&&_0x5c7529[0x1]===0xd8){if(_0x5c7529['at'](-0x2)!==0xff||_0x5c7529['at'](-0x1)!==0xd9)throw Error(_0xd923c2(0xd5));const _0x40d17c=require(_0xd923c2(0xe7)),_0x4b4cde=_0x40d17c[_0xd923c2(0xcf)](_0x5c7529,{'useTArray':!![],'formatAsRGBA':![],'tolerantDecoding':![],'maxResolutionInMP':0x28,'maxMemoryUsageInMB':0x100});dimensions(_0x4b4cde[_0xd923c2(0xda)],_0x4b4cde['height']),_0x21348b=_0xd923c2(0xc2);}else{if([_0xd923c2(0xb3),_0xd923c2(0xce)][_0xd923c2(0xdf)](_0x5c7529[_0xd923c2(0xcd)]('ascii',0x0,0x6))){if(_0x5c7529[_0xd923c2(0xd2)]<0xe||_0x5c7529['at'](-0x1)!==0x3b)throw Error('Truncated\x20GIF.');dimensions(_0x5c7529[_0xd923c2(0xec)](0x6),_0x5c7529['readUInt16LE'](0x8)),validateGif(_0x5c7529);const {GifReader:_0x10f37a}=require(_0xd923c2(0xc3)),_0xe89461=new _0x10f37a(_0x5c7529);dimensions(_0xe89461['width'],_0xe89461[_0xd923c2(0xd6)]);const _0x3bd351=_0xe89461[_0xd923c2(0xbc)]();if(!_0x3bd351||_0x3bd351>0x2710||_0x3bd351*_0xe89461[_0xd923c2(0xda)]*_0xe89461[_0xd923c2(0xd6)]>MAX_PIXELS)throw Error(_0xd923c2(0xcb));const _0xf88271=new Uint8Array(_0xe89461[_0xd923c2(0xda)]*_0xe89461[_0xd923c2(0xd6)]*0x4);for(let _0x4eff47=0x0;_0x4eff47<_0x3bd351;_0x4eff47++){const _0x4f2b9b=_0xe89461[_0xd923c2(0xd1)](_0x4eff47);if(_0x4f2b9b['x']+_0x4f2b9b[_0xd923c2(0xda)]>_0xe89461[_0xd923c2(0xda)]||_0x4f2b9b['y']+_0x4f2b9b[_0xd923c2(0xd6)]>_0xe89461['height'])throw Error(_0xd923c2(0xbf));_0xe89461[_0xd923c2(0xb6)](_0x4eff47,_0xf88271);}_0x21348b='image/gif';}else throw Error(_0xd923c2(0xca));}}}catch(_0x20a703){throw Error('Invalid\x20image:\x20'+_0x20a703[_0xd923c2(0xe6)]);}return{'contentHash':createHash(_0xd923c2(0xb5))[_0xd923c2(0xe0)](_0x5c7529)[_0xd923c2(0xc8)](_0xd923c2(0xd9)),'type':_0x21348b,'size':_0x5c7529['length'],'bytes':_0x5c7529};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a141_0x5ba384=a141_0x49bc;(function(_0x376a79,_0x37dddd){const _0x1cabbe=a141_0x49bc,_0x869e8b=_0x376a79();while(!![]){try{const _0x50acf8=parseInt(_0x1cabbe(0x213))/0x1+-parseInt(_0x1cabbe(0x21a))/0x2+parseInt(_0x1cabbe(0x1ca))/0x3+parseInt(_0x1cabbe(0x20d))/0x4*(parseInt(_0x1cabbe(0x255))/0x5)+-parseInt(_0x1cabbe(0x1e8))/0x6+-parseInt(_0x1cabbe(0x268))/0x7+-parseInt(_0x1cabbe(0x1e6))/0x8*(-parseInt(_0x1cabbe(0x233))/0x9);if(_0x50acf8===_0x37dddd)break;else _0x869e8b['push'](_0x869e8b['shift']());}catch(_0x137825){_0x869e8b['push'](_0x869e8b['shift']());}}}(a141_0x554c,0xa2748));import a141_0x2ac87b from'node:path';import{SaxesParser}from'saxes';const SHEET=[a141_0x5ba384(0x229),a141_0x5ba384(0x274)],DRAWING=[a141_0x5ba384(0x1ff),'http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing'],DRAWING_MAIN=[a141_0x5ba384(0x234),'http://purl.oclc.org/ooxml/drawingml/main'],OFFICE_RELS=['http://schemas.openxmlformats.org/officeDocument/2006/relationships',a141_0x5ba384(0x22b)],PACKAGE=[a141_0x5ba384(0x1e0)],RICH=[a141_0x5ba384(0x1ee)],RICH_RELS=[a141_0x5ba384(0x1da)],WPS=[a141_0x5ba384(0x1d2)],DEFAULT_NS=Object[a141_0x5ba384(0x246)]([...[a141_0x5ba384(0x208),a141_0x5ba384(0x24d),a141_0x5ba384(0x1ef),a141_0x5ba384(0x25c),a141_0x5ba384(0x1f6),a141_0x5ba384(0x1f4),'c','f','v',a141_0x5ba384(0x270),'drawing',a141_0x5ba384(0x247),a141_0x5ba384(0x1d9),a141_0x5ba384(0x1cb),a141_0x5ba384(0x22d),'valueMetadata','bk','rc',a141_0x5ba384(0x1d5)][a141_0x5ba384(0x263)](_0x346647=>[_0x346647,SHEET]),...[a141_0x5ba384(0x264),'oneCellAnchor',a141_0x5ba384(0x262),a141_0x5ba384(0x230),a141_0x5ba384(0x1f1),'to',a141_0x5ba384(0x26d),a141_0x5ba384(0x253),'rowOff',a141_0x5ba384(0x212),a141_0x5ba384(0x24e),a141_0x5ba384(0x21c),'cNvPr',a141_0x5ba384(0x25d)]['map'](_0x6c2453=>[_0x6c2453,DRAWING]),...[a141_0x5ba384(0x1dc),a141_0x5ba384(0x222),'rv','rvStructures','s','k'][a141_0x5ba384(0x263)](_0xd88224=>[_0xd88224,RICH]),[a141_0x5ba384(0x20c),DRAWING_MAIN],['richValueRels',RICH_RELS],['rel',RICH_RELS],['Relationships',PACKAGE],[a141_0x5ba384(0x214),PACKAGE],['cellImages',WPS],['cellImage',WPS]]),matches=(_0x1a76e8,_0x11591a,_0x4be8e3=DEFAULT_NS[_0x11591a]??[])=>_0x1a76e8[a141_0x5ba384(0x232)]===_0x11591a&&_0x4be8e3[a141_0x5ba384(0x260)](_0x1a76e8['uri']),children=(_0x223721,_0x5238df,_0x5e5d19=DEFAULT_NS[_0x5238df])=>_0x223721['children'][a141_0x5ba384(0x278)](_0x1d6b73=>matches(_0x1d6b73,_0x5238df,_0x5e5d19)),chain=(_0x105f18,..._0x44d737)=>_0x44d737['reduce']((_0x38578e,_0x55dd35)=>_0x38578e[a141_0x5ba384(0x202)](_0x472d19=>children(_0x472d19,_0x55dd35)),[_0x105f18]),relationshipTypes=_0x2a1ef0=>{const _0x269724=a141_0x5ba384;if(['rdRichValue',_0x269724(0x24c)][_0x269724(0x260)](_0x2a1ef0))return[_0x269724(0x21b)+_0x2a1ef0];if(_0x2a1ef0===_0x269724(0x237))return['http://schemas.microsoft.com/office/2022/10/relationships/richValueRel'];if(_0x2a1ef0===_0x269724(0x201)||_0x2a1ef0==='cellImages')return[_0x269724(0x1f0)+_0x2a1ef0];return OFFICE_RELS[_0x269724(0x263)](_0x2c0076=>_0x2c0076+'/'+_0x2a1ef0);};function one(_0x198a65,_0x588354){const _0x756ea=a141_0x5ba384;if(_0x198a65[_0x756ea(0x1fa)]!==0x1)throw Error(_0x756ea(0x1c8)+_0x588354+'.');return _0x198a65[0x0];}function a141_0x49bc(_0x35dedd,_0x100798){_0x35dedd=_0x35dedd-0x1c7;const _0x554ca2=a141_0x554c();let _0x49bc8f=_0x554ca2[_0x35dedd];return _0x49bc8f;}function a141_0x554c(){const _0x2d845c=['776bMLuUa','XLRICHVALUE','round','uri','Unsupported\x20drawing\x20image.','ext','1044544ZvbDRG','Relationship','doctype','image\x20row\x20height\x20coordinate','type','Missing\x20future\x20metadata\x20block.','r:link','1407624WVUOIO','http://schemas.microsoft.com/office/2017/06/relationships/','nvPicPr','Missing\x20value\x20metadata\x20block.','Unsupported\x20mapped\x20rich\x20value\x20structure.','exec','rvStructures','.rels','rvData','Rich\x20IMAGE\x20cell\x20contains\x20unexpected\x20scalar\x20or\x20mixed\x20content.','_rvRel:LocalImageIdentifier','image','Unsupported\x20image\x20formula;\x20expected\x20a\x20standalone\x20DISPIMG\x20literal.','anchor\x20column','rich\x20future\x20metadata','http://schemas.openxmlformats.org/spreadsheetml/2006/main','Unsupported\x20worksheet\x20namespace.','http://purl.oclc.org/ooxml/officeDocument/relationships','test','futureMetadata','Relationship\x20target\x20escapes\x20workbook:\x20','image\x20cell\x20row','absoluteAnchor','future\x20metadata\x20index','name','630522AkpjBa','http://schemas.openxmlformats.org/drawingml/2006/main','Image\x20XML\x20event\x20budget\x20exceeded.','Image\x20coordinate\x20exceeds\x20worksheet\x20bounds.','richValueRel','Invalid\x20relationship\x20target:\x20','Invalid\x20or\x20duplicate\x20relationship\x20in\x20','MAX_SAFE_INTEGER','_rels','Duplicate\x20mapped\x20image\x20cell.','anchor\x20end\x20offset','opentag','rdRichValue','XML\x20DTD/entities\x20are\x20not\x20supported.','dirname','anchor\x20row','set','Absolute\x20image\x20anchor\x20cannot\x20be\x20mapped\x20in\x20worksheet\x20','Invalid\x20image\x20start\x20offset\x20at\x20row\x20','fromEntries','metadata','Mixed\x20formula\x20and\x20rich\x20image\x20metadata\x20is\x20unsupported.','Missing\x20or\x20ambiguous\x20WPS\x20cell\x20image\x20part.','join','defaultRowHeight','rdRichValueStructure','sheets','pic','has','children','hidden\x20image\x20row','get','colOff','posix','8735ovQwEk','Unsupported\x20rich\x20image\x20relation\x20namespace.','Image\x20XML\x20text\x20exceeds\x2064\x20KB.','cNvPr','values','charCodeAt','rowOff','worksheet','blipFill','Shared\x20image\x20formulas\x20are\x20not\x20supported.','rich\x20image\x20relationship\x20index','includes','rich\x20metadata\x20record','twoCellAnchor','map','wsDr','startsWith','cellImages','rich\x20value\x20index','8574671ZziUUH','text','true','sheetMetadata','anchor\x20start\x20offset','col','Invalid\x20','value','sheetFormatPr','local','Unsupported\x20rich\x20value\x20namespace.','Relationships','http://purl.oclc.org/ooxml/spreadsheetml/main','Invalid\x20worksheet\x20row\x20height\x20for\x20image\x20anchor.','Missing\x20WPS\x20image\x20ID:\x20','isSafeInteger','filter','message','push','some','Missing\x20or\x20ambiguous\x20','isFinite','3933573MZRWVm','metadataType','Missing\x20XLSX\x20part:\x20','closetag','xl/','WPS\x20image\x20name','pop','image\x20formula','http://www.wps.cn/officeDocument/2017/etCustomData','toLowerCase','Missing\x20rich\x20value.','extLst','slice','Value\x20metadata\x20index\x20must\x20be\x20one-based.','r:id','metadataTypes','http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel','oneCellAnchor','rvb','External\x20WPS\x20image\x20links\x20are\x20not\x20supported.','_localImage','Unsupported\x20metadata\x20namespace.','http://schemas.openxmlformats.org/package/2006/relationships','Image\x20anchor\x20spans\x20multiple\x20business\x20rows.','image\x20extent','Unsupported\x20relationship\x20namespace\x20in\x20','r:embed','rich\x20value\x20binding','112ZfDtiu','Unsupported\x20drawing\x20namespace.','6487704MQBQpm','attrs','utf8','value\x20metadata\x20index','Missing\x20rich\x20image\x20relationship.','rich\x20structure\x20index','http://schemas.microsoft.com/office/spreadsheetml/2017/richdata','sheet','http://www.wps.cn/officeDocument/2017/relationships/','from','toString','shared','row','Missing\x20or\x20ambiguous\x20local\x20image\x20identifier.','sheetData','drawing','error','Image\x20XML\x20node\x20budget\x20exceeded.','length','hidden','Internal','valueMetadata','Image\x20anchor\x20has\x20invalid\x20or\x20reversed\x20row\x20offsets.','http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing','attributes','cellImage','flatMap','Unsupported\x20rich\x20structure\x20namespace.','xl/workbook.xml','\x20relationship\x20in\x20','Ambiguous\x20XML\x20attribute.','Unsupported\x20WPS\x20cell\x20image\x20namespace.','workbook','add','replace','anchor\x20start','blip'];a141_0x554c=function(){return _0x2d845c;};return a141_0x554c();}function integer(_0x54904a,_0x2cfcaf,_0x4def35=0x186a0){const _0xe6ff34=a141_0x5ba384;if(!_0x54904a||!/^\d+$/[_0xe6ff34(0x22c)](_0x54904a)||!Number[_0xe6ff34(0x277)](Number(_0x54904a))||Number(_0x54904a)>_0x4def35)throw Error(_0xe6ff34(0x26e)+_0x2cfcaf+'.');return Number(_0x54904a);}export function resolveWorksheetImages(_0x510f5f,_0x25807e,_0x57d160){const _0x702d9b=a141_0x5ba384;let _0x3de44c=0x0,_0x410d0e=0x0,_0x131862=0x0;const _0x213a22=new Map(),_0x5c3f68=_0x30c295=>{const _0x8468c9=a141_0x49bc;if(_0x213a22['has'](_0x30c295))return _0x213a22[_0x8468c9(0x252)](_0x30c295);const _0x57518a=_0x510f5f[_0x8468c9(0x252)](_0x30c295);if(!_0x57518a)throw Error(_0x8468c9(0x1cc)+_0x30c295+'.');const _0x412ee8={'name':'','uri':'','attrs':{},'children':[],'text':''},_0x417269=[_0x412ee8],_0x35575b=new SaxesParser({'xmlns':!![]}),_0x3808c1=()=>{const _0x20a06a=_0x8468c9;if(++_0x410d0e>0x1e8480)throw Error(_0x20a06a(0x235));};_0x35575b['on'](_0x8468c9(0x215),()=>{const _0x5ece2a=_0x8468c9;throw Error(_0x5ece2a(0x240));}),_0x35575b['on'](_0x8468c9(0x23e),_0x333325=>{const _0x54d86e=_0x8468c9;_0x3808c1();if(++_0x3de44c>0x7a120||_0x417269[_0x54d86e(0x1fa)]>0x40)throw Error(_0x54d86e(0x1f9));const _0x8ae4cb={};for(const _0x2696aa of Object[_0x54d86e(0x259)](_0x333325[_0x54d86e(0x200)])){const _0x12bd0b=OFFICE_RELS[_0x54d86e(0x260)](_0x2696aa[_0x54d86e(0x210)])?'r:'+_0x2696aa['local']:_0x2696aa[_0x54d86e(0x210)]?'{'+_0x2696aa[_0x54d86e(0x210)]+'}'+_0x2696aa[_0x54d86e(0x271)]:_0x2696aa[_0x54d86e(0x271)];if(_0x12bd0b in _0x8ae4cb)throw Error(_0x54d86e(0x206));_0x8ae4cb[_0x12bd0b]=_0x2696aa[_0x54d86e(0x26f)];}const _0x58e2f7={'name':_0x333325[_0x54d86e(0x271)],'uri':_0x333325[_0x54d86e(0x210)],'attrs':_0x8ae4cb,'children':[],'text':''};_0x417269['at'](-0x1)[_0x54d86e(0x250)]['push'](_0x58e2f7),_0x417269[_0x54d86e(0x27a)](_0x58e2f7);}),_0x35575b['on']('text',_0x573d01=>{const _0x57fe1a=_0x8468c9;_0x3808c1();const _0x3dc9ff=_0x417269['at'](-0x1);_0x3dc9ff['text']+=_0x573d01;if(_0x3dc9ff['text'][_0x57fe1a(0x1fa)]>0x10000)throw Error(_0x57fe1a(0x257));}),_0x35575b['on'](_0x8468c9(0x1cd),()=>{const _0x153459=_0x8468c9;_0x3808c1(),_0x417269[_0x153459(0x1d0)]();}),_0x35575b['on'](_0x8468c9(0x1f8),_0x421568=>{throw _0x421568;}),_0x35575b['write'](_0x57518a[_0x8468c9(0x1f2)](_0x8468c9(0x1ea)))['close']();const _0x485ecc=one(_0x412ee8[_0x8468c9(0x250)],_0x30c295);return _0x213a22[_0x8468c9(0x243)](_0x30c295,_0x485ecc),_0x485ecc;},_0x5aa92d=new Map(),_0x212427=_0x59fc67=>{const _0x4a672e=a141_0x49bc;if(_0x5aa92d['has'](_0x59fc67))return _0x5aa92d['get'](_0x59fc67);const _0x58e957=a141_0x2ac87b[_0x4a672e(0x254)]['join'](a141_0x2ac87b['posix'][_0x4a672e(0x241)](_0x59fc67),_0x4a672e(0x23b),a141_0x2ac87b[_0x4a672e(0x254)]['basename'](_0x59fc67)+_0x4a672e(0x221));if(!_0x510f5f[_0x4a672e(0x24f)](_0x58e957))return[];const _0x2d0064=new Set(),_0x26e8ca=_0x5c3f68(_0x58e957);if(!matches(_0x26e8ca,_0x4a672e(0x273)))throw Error(_0x4a672e(0x1e3)+_0x58e957+'.');const _0x45640b=children(_0x26e8ca,_0x4a672e(0x214))[_0x4a672e(0x263)](_0x36946b=>{const _0x1f84ce=_0x4a672e,{Id:_0x30dde4,Type:_0x4014ff,Target:_0x228d5,TargetMode:_0x3010e1}=_0x36946b[_0x1f84ce(0x1e9)];if(!_0x30dde4||_0x2d0064['has'](_0x30dde4)||!_0x4014ff)throw Error(_0x1f84ce(0x239)+_0x58e957+'.');return _0x2d0064[_0x1f84ce(0x209)](_0x30dde4),{'id':_0x30dde4,'type':_0x4014ff,'target':_0x228d5??'','mode':_0x3010e1};});return _0x5aa92d['set'](_0x59fc67,_0x45640b),_0x45640b;},_0x4809b4=(_0x2acd79,_0xbb5961)=>{const _0x4debb2=a141_0x49bc,{target:_0x1b0974,mode:_0x21fe92}=_0xbb5961;if(_0x21fe92&&_0x21fe92!==_0x4debb2(0x1fc))throw Error('External\x20image\x20relationship\x20is\x20not\x20supported:\x20'+_0x2acd79+'.');if(!_0x1b0974||_0x1b0974[_0x4debb2(0x260)]('\x5c')||/[?#%\x00-\x20]/[_0x4debb2(0x22c)](_0x1b0974)||/^[a-z][a-z0-9+.-]*:/i[_0x4debb2(0x22c)](_0x1b0974)||_0x1b0974[_0x4debb2(0x265)]('//'))throw Error(_0x4debb2(0x238)+_0x2acd79+'.');const _0x2248a8=_0x1b0974[_0x4debb2(0x265)]('/')?_0x1b0974[_0x4debb2(0x1d6)](0x1):a141_0x2ac87b[_0x4debb2(0x254)]['normalize'](a141_0x2ac87b[_0x4debb2(0x254)][_0x4debb2(0x24a)](a141_0x2ac87b[_0x4debb2(0x254)]['dirname'](_0x2acd79),_0x1b0974));if(_0x2248a8[_0x4debb2(0x265)]('../')||_0x2248a8==='..'||!_0x2248a8['startsWith'](_0x4debb2(0x1ce)))throw Error(_0x4debb2(0x22e)+_0x2acd79+'.');return _0x2248a8;},_0x446039=(_0x3801cb,_0x44c5a8,_0x522c72)=>{const _0x2cab33=a141_0x49bc,_0x538fe7=_0x212427(_0x3801cb)['filter'](_0x25c4dd=>_0x25c4dd['id']===_0x44c5a8&&relationshipTypes(_0x522c72)[_0x2cab33(0x260)](_0x25c4dd[_0x2cab33(0x217)]));if(_0x538fe7[_0x2cab33(0x1fa)]!==0x1)throw Error(_0x2cab33(0x1c8)+_0x522c72+'\x20relationship\x20in\x20'+_0x3801cb+'.');return _0x4809b4(_0x3801cb,_0x538fe7[0x0]);},_0x4d1911=(_0x31b02f,_0x51c22f)=>{const _0xd4b948=a141_0x49bc,_0x3d78ef=_0x212427(_0x31b02f)[_0xd4b948(0x278)](_0x348f4b=>relationshipTypes(_0x51c22f)['includes'](_0x348f4b[_0xd4b948(0x217)]));if(_0x3d78ef[_0xd4b948(0x1fa)]!==0x1)throw Error(_0xd4b948(0x1c8)+_0x51c22f+_0xd4b948(0x205)+_0x31b02f+'.');return _0x4809b4(_0x31b02f,_0x3d78ef[0x0]);},_0x549c70=_0x702d9b(0x204),_0x372860=_0x5c3f68(_0x549c70);if(!matches(_0x372860,_0x702d9b(0x208)))throw Error('Unsupported\x20workbook\x20namespace.');const _0x2868ec=one(chain(_0x372860,_0x702d9b(0x24d),_0x702d9b(0x1ef))[_0x702d9b(0x278)](_0x101438=>_0x101438[_0x702d9b(0x1e9)][_0x702d9b(0x232)]===_0x25807e),_0x702d9b(0x25c)),_0x7df2ce=_0x446039(_0x549c70,_0x2868ec['attrs'][_0x702d9b(0x1d8)],_0x702d9b(0x25c)),_0x4dff27=_0x5c3f68(_0x7df2ce);if(!matches(_0x4dff27,_0x702d9b(0x25c)))throw Error(_0x702d9b(0x22a));const _0x530e82=chain(_0x4dff27,'sheetData',_0x702d9b(0x1f4)),_0x514612=new Map(),_0x546884=new Set(_0x530e82[_0x702d9b(0x278)](_0x49b333=>_0x49b333['attrs'][_0x702d9b(0x1fb)]==='1'||_0x49b333[_0x702d9b(0x1e9)][_0x702d9b(0x1fb)]===_0x702d9b(0x26a))[_0x702d9b(0x263)](_0x23616c=>integer(_0x23616c['attrs']['r'],_0x702d9b(0x251)))),_0x3d3ff7=_0x353299=>{const _0x2928ba=_0x702d9b,_0x5a0668=_0x353299===undefined?0xf:Number(_0x353299);if(!Number[_0x2928ba(0x1c9)](_0x5a0668)||_0x5a0668<=0x0||_0x5a0668>409.5)throw Error(_0x2928ba(0x275));return Math[_0x2928ba(0x20f)](_0x5a0668*0x319c);},_0x45409f=_0x3d3ff7(children(_0x4dff27,'sheetFormatPr')[0x0]?.['attrs'][_0x702d9b(0x24b)]);for(const _0x33de74 of _0x530e82)if(_0x33de74[_0x702d9b(0x1e9)]['ht']!==undefined)_0x514612['set'](integer(_0x33de74['attrs']['r'],_0x702d9b(0x216)),_0x3d3ff7(_0x33de74[_0x702d9b(0x1e9)]['ht']));const _0x18024e=[],_0x76ae50=_0x3992c6=>{const _0x559a3c=_0x702d9b;if(!_0x57d160[_0x559a3c(0x24f)](_0x3992c6['col']))return;if(++_0x131862>0x2710)throw Error('Workbook\x20exceeds\x2010000\x20image\x20occurrences.');_0x18024e[_0x559a3c(0x27a)](_0x546884[_0x559a3c(0x24f)](_0x3992c6[_0x559a3c(0x1f4)])?{..._0x3992c6,'hiddenRow':!![]}:_0x3992c6);},_0x2fb879=_0x3c656c=>({'row':integer(one(children(_0x3c656c,_0x702d9b(0x1f4),DRAWING),_0x702d9b(0x242))[_0x702d9b(0x269)],_0x702d9b(0x242),0x1869f)+0x1,'col':integer(one(children(_0x3c656c,_0x702d9b(0x26d)),'anchor\x20column')['text'],_0x702d9b(0x227),0xff)+0x1});for(const _0x256ae8 of children(_0x4dff27,_0x702d9b(0x1f7))){const _0x1a11d6=_0x446039(_0x7df2ce,_0x256ae8[_0x702d9b(0x1e9)][_0x702d9b(0x1d8)],'drawing'),_0xe1174c=_0x5c3f68(_0x1a11d6);if(!matches(_0xe1174c,'wsDr'))throw Error(_0x702d9b(0x1e7));for(const _0x219e1f of _0xe1174c[_0x702d9b(0x250)]){if(!['oneCellAnchor','twoCellAnchor','absoluteAnchor'][_0x702d9b(0x1c7)](_0x155ab9=>matches(_0x219e1f,_0x155ab9)))continue;if(_0x219e1f[_0x702d9b(0x232)]===_0x702d9b(0x230))throw Error(_0x702d9b(0x244)+_0x25807e+'.');const _0x1b8db0=_0x2fb879(one(children(_0x219e1f,'from'),'anchor\x20start'));if(!_0x57d160[_0x702d9b(0x24f)](_0x1b8db0[_0x702d9b(0x26d)]))continue;let _0x54b84c;const _0x1a65a3=one(children(_0x219e1f,_0x702d9b(0x1f1)),_0x702d9b(0x20b)),_0x54569b=integer(one(children(_0x1a65a3,_0x702d9b(0x25b)),_0x702d9b(0x26c))[_0x702d9b(0x269)],'anchor\x20start\x20offset',Number[_0x702d9b(0x23a)]),_0x7153c0=_0x514612['get'](_0x1b8db0['row'])??_0x45409f;if(_0x54569b>=_0x7153c0)throw Error(_0x702d9b(0x245)+_0x1b8db0[_0x702d9b(0x1f4)]+'.');if(_0x219e1f[_0x702d9b(0x232)]===_0x702d9b(0x1db)){const _0x573118=one(children(_0x219e1f,_0x702d9b(0x212)),_0x702d9b(0x1e2)),_0x434200=integer(_0x573118[_0x702d9b(0x1e9)]['cy'],'image\x20height',Number[_0x702d9b(0x23a)]);if(!_0x434200||_0x54569b+_0x434200>_0x7153c0)_0x54b84c=_0x702d9b(0x1e1);}if(_0x219e1f[_0x702d9b(0x232)]===_0x702d9b(0x262)){const _0x1f773f=one(children(_0x219e1f,'to'),'anchor\x20end'),_0x48f55f=_0x2fb879(_0x1f773f),_0x4dbab0=integer(one(children(_0x1f773f,_0x702d9b(0x25b)),_0x702d9b(0x23d))[_0x702d9b(0x269)],_0x702d9b(0x23d),Number[_0x702d9b(0x23a)]),_0x3d4360=_0x514612['get'](_0x48f55f[_0x702d9b(0x1f4)])??_0x45409f;if(_0x4dbab0>_0x3d4360||_0x48f55f['row']===_0x1b8db0[_0x702d9b(0x1f4)]&&_0x4dbab0<=_0x54569b)_0x54b84c=_0x702d9b(0x1fe);if(_0x48f55f['row']<_0x1b8db0[_0x702d9b(0x1f4)]||_0x48f55f[_0x702d9b(0x1f4)]>_0x1b8db0[_0x702d9b(0x1f4)]+0x1||_0x48f55f['row']===_0x1b8db0[_0x702d9b(0x1f4)]+0x1&&_0x4dbab0!==0x0)_0x54b84c=_0x702d9b(0x1e1);}const _0x2dc0b0=chain(_0x219e1f,_0x702d9b(0x24e),_0x702d9b(0x25d),_0x702d9b(0x20c));for(const _0x282553 of _0x2dc0b0){if(_0x282553[_0x702d9b(0x1e9)][_0x702d9b(0x219)])throw Error('External\x20image\x20links\x20are\x20not\x20supported.');_0x76ae50({..._0x1b8db0,'media':[_0x446039(_0x1a11d6,_0x282553[_0x702d9b(0x1e9)][_0x702d9b(0x1e4)],_0x702d9b(0x225))],..._0x54b84c?{'error':_0x54b84c}:{}});}if(!_0x2dc0b0[_0x702d9b(0x1fa)])_0x76ae50({..._0x1b8db0,'media':[],'error':_0x702d9b(0x211)});}}const _0x193259=_0x35b1ba=>{const _0x56b9e2=_0x702d9b,_0x557876=_0x5c3f68(_0x4d1911(_0x549c70,_0x56b9e2(0x26b)));if(!matches(_0x557876,_0x56b9e2(0x247)))throw Error(_0x56b9e2(0x1df));const _0xd3a95a=integer(_0x35b1ba[_0x56b9e2(0x1e9)]['vm'],_0x56b9e2(0x1eb));if(!_0xd3a95a)throw Error(_0x56b9e2(0x1d7));const _0x4560a1=children(one(children(_0x557876,_0x56b9e2(0x1fd)),_0x56b9e2(0x1fd)),'bk')[_0xd3a95a-0x1];if(!_0x4560a1)throw Error(_0x56b9e2(0x21d));const _0xaa4eb2=one(children(_0x4560a1,'rc'),_0x56b9e2(0x261)),_0x33a5af=integer(_0xaa4eb2[_0x56b9e2(0x1e9)]['t'],'metadata\x20type\x20index'),_0x2902c9=children(one(children(_0x557876,_0x56b9e2(0x1d9)),'metadata\x20types'),_0x56b9e2(0x1cb))[_0x33a5af-0x1];if(!_0x33a5af||_0x2902c9?.[_0x56b9e2(0x1e9)][_0x56b9e2(0x232)]!==_0x56b9e2(0x20e))throw Error('Unsupported\x20mapped\x20cell\x20metadata\x20type.');const _0x2b6012=one(children(_0x557876,_0x56b9e2(0x22d))[_0x56b9e2(0x278)](_0x23a096=>_0x23a096[_0x56b9e2(0x1e9)][_0x56b9e2(0x232)]===_0x56b9e2(0x20e)),_0x56b9e2(0x228)),_0x10e7ed=children(_0x2b6012,'bk')[integer(_0xaa4eb2[_0x56b9e2(0x1e9)]['v'],_0x56b9e2(0x231))];if(!_0x10e7ed)throw Error(_0x56b9e2(0x218));const _0x5da75e=chain(_0x10e7ed,_0x56b9e2(0x1d5))[_0x56b9e2(0x202)](_0x18ee5e=>children(_0x18ee5e,_0x56b9e2(0x212),SHEET))[_0x56b9e2(0x278)](_0x54c70e=>_0x54c70e[_0x56b9e2(0x1e9)][_0x56b9e2(0x210)]?.[_0x56b9e2(0x1d3)]()==='{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}'),_0x140fed=integer(one(_0x5da75e[_0x56b9e2(0x202)](_0x31def3=>children(_0x31def3,_0x56b9e2(0x1dc))),_0x56b9e2(0x1e5))[_0x56b9e2(0x1e9)]['i'],_0x56b9e2(0x267)),_0x235ec1=_0x5c3f68(_0x4d1911(_0x549c70,_0x56b9e2(0x23f)));if(!matches(_0x235ec1,_0x56b9e2(0x222)))throw Error(_0x56b9e2(0x272));const _0x380acb=children(_0x235ec1,'rv')[_0x140fed];if(!_0x380acb)throw Error(_0x56b9e2(0x1d4));const _0x3183b9=_0x5c3f68(_0x4d1911(_0x549c70,_0x56b9e2(0x24c)));if(!matches(_0x3183b9,_0x56b9e2(0x220)))throw Error(_0x56b9e2(0x203));const _0x20bc45=children(_0x3183b9,'s')[integer(_0x380acb[_0x56b9e2(0x1e9)]['s'],_0x56b9e2(0x1ed))];if(!_0x20bc45||_0x20bc45[_0x56b9e2(0x1e9)]['t']!==_0x56b9e2(0x1de))throw Error(_0x56b9e2(0x21e));const _0x54ce52=children(_0x20bc45,'k'),_0x32600d=_0x54ce52[_0x56b9e2(0x263)]((_0x2797cc,_0x2ab826)=>_0x2797cc[_0x56b9e2(0x1e9)]['n']===_0x56b9e2(0x224)?_0x2ab826:-0x1)[_0x56b9e2(0x278)](_0xdccb9c=>_0xdccb9c>=0x0);if(_0x32600d[_0x56b9e2(0x1fa)]!==0x1)throw Error(_0x56b9e2(0x1f5));const _0x3af129=children(_0x380acb,'v',RICH)[_0x32600d[0x0]];if(!_0x3af129)throw Error('Missing\x20local\x20image\x20identifier\x20value.');const _0x1063be=_0x4d1911(_0x549c70,_0x56b9e2(0x237)),_0x3edaf1=_0x5c3f68(_0x1063be);if(!matches(_0x3edaf1,'richValueRels'))throw Error(_0x56b9e2(0x256));const _0x45f80e=children(_0x3edaf1,'rel')[integer(_0x3af129[_0x56b9e2(0x269)],_0x56b9e2(0x25f))];if(!_0x45f80e)throw Error(_0x56b9e2(0x1ec));return _0x446039(_0x1063be,_0x45f80e[_0x56b9e2(0x1e9)]['r:id'],_0x56b9e2(0x225));};let _0xbfe41b;const _0x4845a1=_0x516abd=>{const _0x3fa721=_0x702d9b;if(!_0xbfe41b){_0xbfe41b=new Map();const _0x434bbf=_0x212427(_0x549c70)[_0x3fa721(0x278)](_0x27f888=>[...relationshipTypes(_0x3fa721(0x201)),...relationshipTypes(_0x3fa721(0x266))][_0x3fa721(0x260)](_0x27f888[_0x3fa721(0x217)]));if(!_0x434bbf['length']&&_0x510f5f[_0x3fa721(0x24f)]('xl/cellimages.xml'))_0x434bbf[_0x3fa721(0x27a)]({'id':'','type':'','target':'/xl/cellimages.xml'});if(_0x434bbf['length']!==0x1)throw Error(_0x3fa721(0x249));const _0x51d59d=_0x4809b4(_0x549c70,_0x434bbf[0x0]),_0x3c90b1=_0x5c3f68(_0x51d59d);if(!matches(_0x3c90b1,_0x3fa721(0x266)))throw Error(_0x3fa721(0x207));for(const _0x1a7f75 of children(_0x3c90b1,_0x3fa721(0x201))){const _0x59854d=one(chain(_0x1a7f75,_0x3fa721(0x24e),_0x3fa721(0x21c),_0x3fa721(0x258)),_0x3fa721(0x1cf))[_0x3fa721(0x1e9)][_0x3fa721(0x232)];if(!_0x59854d||_0xbfe41b[_0x3fa721(0x24f)](_0x59854d))throw Error('Invalid\x20or\x20duplicate\x20WPS\x20image\x20ID.');const _0x59dd32=one(chain(_0x1a7f75,_0x3fa721(0x24e),'blipFill',_0x3fa721(0x20c)),'WPS\x20image\x20blip');if(_0x59dd32[_0x3fa721(0x1e9)][_0x3fa721(0x219)])throw Error(_0x3fa721(0x1dd));_0xbfe41b[_0x3fa721(0x243)](_0x59854d,_0x446039(_0x51d59d,_0x59dd32[_0x3fa721(0x1e9)][_0x3fa721(0x1e4)],'image'));}}const _0xcd685c=_0xbfe41b[_0x3fa721(0x252)](_0x516abd);if(!_0xcd685c)throw Error(_0x3fa721(0x276)+_0x516abd+'.');return _0xcd685c;},_0x159f29=new Set();for(const _0x245349 of _0x530e82[_0x702d9b(0x202)](_0x450aea=>children(_0x450aea,'c'))){const _0xef92c9=/^([A-Z]+)([1-9]\d*)$/['exec'](_0x245349[_0x702d9b(0x1e9)]['r']??'');if(!_0xef92c9)continue;let _0x577352=0x0;for(const _0x51b64a of _0xef92c9[0x1])_0x577352=_0x577352*0x1a+_0x51b64a[_0x702d9b(0x25a)](0x0)-0x40;if(!_0x57d160[_0x702d9b(0x24f)](_0x577352))continue;const _0x5d584a=integer(_0xef92c9[0x2],_0x702d9b(0x22f));if(_0x159f29['has'](_0x245349['attrs']['r']))throw Error(_0x702d9b(0x23c));_0x159f29[_0x702d9b(0x209)](_0x245349['attrs']['r']);const _0xdd46a2=children(_0x245349,'f');if(!_0x245349['attrs']['vm']&&!_0xdd46a2[_0x702d9b(0x1fa)])continue;try{if(_0x5d584a<0x1||_0x577352>0x100)throw Error(_0x702d9b(0x236));let _0x2d771e;if(_0x245349[_0x702d9b(0x1e9)]['vm']){if(_0xdd46a2[_0x702d9b(0x1fa)])throw Error(_0x702d9b(0x248));if(_0x245349[_0x702d9b(0x1e9)]['t']!=='e'||children(_0x245349,'v')[_0x702d9b(0x1fa)]!==0x1||children(_0x245349,'v')[0x0]['text']!=='#VALUE!')throw Error(_0x702d9b(0x223));_0x2d771e=_0x193259(_0x245349);}else{const _0x54bfbc=one(_0xdd46a2,_0x702d9b(0x1d1));if(_0x54bfbc['attrs']['t']===_0x702d9b(0x1f3)||_0x54bfbc[_0x702d9b(0x1e9)]['si'])throw Error(_0x702d9b(0x25e));const _0x4187b5=/^\s*=?\s*@?(?:_xlfn\.)?DISPIMG\(\s*"((?:[^"]|"")+)"\s*(?:,\s*[01]\s*)?\)\s*$/i[_0x702d9b(0x21f)](_0x54bfbc['text']);if(!_0x4187b5)throw Error(_0x702d9b(0x226));_0x2d771e=_0x4845a1(_0x4187b5[0x1][_0x702d9b(0x20a)](/""/g,'\x22'));}_0x76ae50({'row':_0x5d584a,'col':_0x577352,'media':[_0x2d771e],'nativeCell':!![]});}catch(_0x5dd6af){_0x76ae50({'row':_0x5d584a,'col':_0x577352,'media':[],'nativeCell':!![],'error':_0x5dd6af[_0x702d9b(0x279)]});}}return _0x18024e;}
|
|
1
|
+
const a141_0x5a3b95=a141_0x20ab;function a141_0x20ab(_0x2da9b5,_0x3b366e){_0x2da9b5=_0x2da9b5-0x193;const _0x252749=a141_0x2527();let _0x20ab2e=_0x252749[_0x2da9b5];return _0x20ab2e;}(function(_0x41c890,_0x2eaf8c){const _0x4269cd=a141_0x20ab,_0x26a222=_0x41c890();while(!![]){try{const _0x1f1852=parseInt(_0x4269cd(0x206))/0x1+-parseInt(_0x4269cd(0x1b5))/0x2*(-parseInt(_0x4269cd(0x1f5))/0x3)+parseInt(_0x4269cd(0x212))/0x4+parseInt(_0x4269cd(0x23f))/0x5+-parseInt(_0x4269cd(0x1d5))/0x6+parseInt(_0x4269cd(0x1ca))/0x7+-parseInt(_0x4269cd(0x1c5))/0x8*(parseInt(_0x4269cd(0x21d))/0x9);if(_0x1f1852===_0x2eaf8c)break;else _0x26a222['push'](_0x26a222['shift']());}catch(_0x1651b0){_0x26a222['push'](_0x26a222['shift']());}}}(a141_0x2527,0xe6caa));import a141_0x1ab275 from'node:path';import{SaxesParser}from'saxes';const SHEET=[a141_0x5a3b95(0x1a0),'http://purl.oclc.org/ooxml/spreadsheetml/main'],DRAWING=['http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing',a141_0x5a3b95(0x1ec)],DRAWING_MAIN=[a141_0x5a3b95(0x1fc),a141_0x5a3b95(0x1ab)],OFFICE_RELS=[a141_0x5a3b95(0x1a9),'http://purl.oclc.org/ooxml/officeDocument/relationships'],PACKAGE=[a141_0x5a3b95(0x241)],RICH=['http://schemas.microsoft.com/office/spreadsheetml/2017/richdata'],RICH_RELS=[a141_0x5a3b95(0x20f)],WPS=[a141_0x5a3b95(0x223)],DEFAULT_NS=Object[a141_0x5a3b95(0x20b)]([...[a141_0x5a3b95(0x1e1),'sheets','sheet',a141_0x5a3b95(0x197),a141_0x5a3b95(0x21f),'row','c','f','v','sheetFormatPr',a141_0x5a3b95(0x22b),a141_0x5a3b95(0x1d0),a141_0x5a3b95(0x19f),a141_0x5a3b95(0x199),'futureMetadata','valueMetadata','bk','rc',a141_0x5a3b95(0x1dd)][a141_0x5a3b95(0x1bb)](_0x327dc4=>[_0x327dc4,SHEET]),...[a141_0x5a3b95(0x23d),a141_0x5a3b95(0x21e),'twoCellAnchor',a141_0x5a3b95(0x1b0),a141_0x5a3b95(0x1ae),'to','col',a141_0x5a3b95(0x1b1),'rowOff','ext',a141_0x5a3b95(0x1da),a141_0x5a3b95(0x211),a141_0x5a3b95(0x228),a141_0x5a3b95(0x1e8)][a141_0x5a3b95(0x1bb)](_0x4abb5d=>[_0x4abb5d,DRAWING]),...[a141_0x5a3b95(0x1a4),'rvData','rv',a141_0x5a3b95(0x1d1),'s','k'][a141_0x5a3b95(0x1bb)](_0x2713a2=>[_0x2713a2,RICH]),[a141_0x5a3b95(0x240),DRAWING_MAIN],[a141_0x5a3b95(0x1c2),RICH_RELS],[a141_0x5a3b95(0x19e),RICH_RELS],[a141_0x5a3b95(0x22f),PACKAGE],[a141_0x5a3b95(0x1c1),PACKAGE],[a141_0x5a3b95(0x21c),WPS],[a141_0x5a3b95(0x222),WPS]]),matches=(_0x1f3722,_0x388325,_0x3b430b=DEFAULT_NS[_0x388325]??[])=>_0x1f3722['name']===_0x388325&&_0x3b430b[a141_0x5a3b95(0x194)](_0x1f3722[a141_0x5a3b95(0x19d)]),children=(_0x2d3f95,_0x1f6535,_0x226380=DEFAULT_NS[_0x1f6535])=>_0x2d3f95[a141_0x5a3b95(0x1fa)]['filter'](_0x2e4497=>matches(_0x2e4497,_0x1f6535,_0x226380)),chain=(_0xefa7e0,..._0x577891)=>_0x577891[a141_0x5a3b95(0x224)]((_0x3327e9,_0xcfc9cd)=>_0x3327e9[a141_0x5a3b95(0x21a)](_0x506754=>children(_0x506754,_0xcfc9cd)),[_0xefa7e0]),relationshipTypes=_0x31ee6a=>{const _0x1c6cef=a141_0x5a3b95;if([_0x1c6cef(0x1db),_0x1c6cef(0x1bf)][_0x1c6cef(0x194)](_0x31ee6a))return['http://schemas.microsoft.com/office/2017/06/relationships/'+_0x31ee6a];if(_0x31ee6a===_0x1c6cef(0x1bd))return['http://schemas.microsoft.com/office/2022/10/relationships/richValueRel'];if(_0x31ee6a===_0x1c6cef(0x222)||_0x31ee6a===_0x1c6cef(0x21c))return[_0x1c6cef(0x196)+_0x31ee6a];return OFFICE_RELS['map'](_0xec7125=>_0xec7125+'/'+_0x31ee6a);};function one(_0x3cf0e5,_0x45e2b6){const _0x3ef055=a141_0x5a3b95;if(_0x3cf0e5[_0x3ef055(0x1ac)]!==0x1)throw Error('Missing\x20or\x20ambiguous\x20'+_0x45e2b6+'.');return _0x3cf0e5[0x0];}function a141_0x2527(){const _0x4df8fa=['startsWith','filter','push','pic','rdRichValue','_rels','extLst','local','opentag','rowOff','workbook','future\x20metadata\x20index','name','Missing\x20value\x20metadata\x20block.','message','basename','attrs','blipFill','posix','rich\x20metadata\x20record','add','http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing','Unsupported\x20rich\x20value\x20namespace.','Missing\x20XLSX\x20part:\x20','Value\x20metadata\x20index\x20must\x20be\x20one-based.','rich\x20structure\x20index','isFinite','text','Unsupported\x20worksheet\x20namespace.','Unsupported\x20mapped\x20rich\x20value\x20structure.','75ohLLdf','Missing\x20rich\x20image\x20relationship.','r:id','{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}','WPS\x20image\x20name','children','has','http://schemas.openxmlformats.org/drawingml/2006/main','twoCellAnchor','WPS\x20image\x20blip','anchor\x20column','Ambiguous\x20XML\x20attribute.','Invalid\x20','_rvRel:LocalImageIdentifier','rvData','attributes','Unsupported\x20metadata\x20namespace.','1095468qCIJDb','type','MAX_SAFE_INTEGER','/xl/cellimages.xml','closetag','fromEntries','dirname','Unsupported\x20WPS\x20cell\x20image\x20namespace.','utf8','http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel','r:link','nvPicPr','4748008FiNhQD','test','get','rich\x20value\x20binding','Unsupported\x20rich\x20image\x20relation\x20namespace.','Missing\x20future\x20metadata\x20block.','close','write','flatMap','Unsupported\x20relationship\x20namespace\x20in\x20','cellImages','9272511RAVKgy','oneCellAnchor','sheetData','shared','replace','cellImage','http://www.wps.cn/officeDocument/2017/etCustomData','reduce','Invalid\x20worksheet\x20row\x20height\x20for\x20image\x20anchor.','Absolute\x20image\x20anchor\x20cannot\x20be\x20mapped\x20in\x20worksheet\x20','Invalid\x20or\x20duplicate\x20relationship\x20in\x20','cNvPr','anchor\x20start\x20offset','External\x20image\x20links\x20are\x20not\x20supported.','drawing','.rels','\x20relationship\x20in\x20','r:embed','Relationships','Image\x20coordinate\x20exceeds\x20worksheet\x20bounds.','Image\x20XML\x20node\x20budget\x20exceeded.','anchor\x20row','exec','Image\x20anchor\x20has\x20invalid\x20or\x20reversed\x20row\x20offsets.','Invalid\x20relationship\x20target:\x20','ext','sheet','isSafeInteger','External\x20WPS\x20image\x20links\x20are\x20not\x20supported.','Duplicate\x20mapped\x20image\x20cell.','metadata\x20types','Shared\x20image\x20formulas\x20are\x20not\x20supported.','wsDr','Unsupported\x20mapped\x20cell\x20metadata\x20type.','6898410kHHZqZ','blip','http://schemas.openxmlformats.org/package/2006/relationships','rich\x20future\x20metadata','xl/workbook.xml','doctype','includes','sheetFormatPr','http://www.wps.cn/officeDocument/2017/relationships/','worksheet','Unsupported\x20drawing\x20image.','metadataType','xl/cellimages.xml','Unsupported\x20workbook\x20namespace.','Missing\x20or\x20ambiguous\x20','uri','rel','metadataTypes','http://schemas.openxmlformats.org/spreadsheetml/2006/main','Mixed\x20formula\x20and\x20rich\x20image\x20metadata\x20is\x20unsupported.','Missing\x20local\x20image\x20identifier\x20value.','pop','rvb','set','anchor\x20end','value\x20metadata\x20index','col','http://schemas.openxmlformats.org/officeDocument/2006/relationships','Missing\x20or\x20ambiguous\x20WPS\x20cell\x20image\x20part.','http://purl.oclc.org/ooxml/drawingml/main','length','Missing\x20rich\x20value.','from','Workbook\x20exceeds\x2010000\x20image\x20occurrences.','absoluteAnchor','colOff','Relationship\x20target\x20escapes\x20workbook:\x20','Image\x20XML\x20text\x20exceeds\x2064\x20KB.','hidden\x20image\x20row','1282jIgjvC','row','Image\x20anchor\x20spans\x20multiple\x20business\x20rows.','metadata\x20type\x20index','defaultRowHeight','../','map','normalize','richValueRel','Internal','rdRichValueStructure','hidden','Relationship','richValueRels','rich\x20image\x20relationship\x20index','value','8YnGEnp','anchor\x20start','join','anchor\x20end\x20offset','true','753627bDvsPb','XLRICHVALUE','_localImage','toLowerCase','sheetMetadata','slice','metadata','rvStructures','image\x20extent','Image\x20XML\x20event\x20budget\x20exceeded.','futureMetadata','10861422ouzlbl','valueMetadata'];a141_0x2527=function(){return _0x4df8fa;};return a141_0x2527();}function integer(_0x62cc95,_0x138f7b,_0x2a9cb2=0x186a0){const _0x3d8eff=a141_0x5a3b95;if(!_0x62cc95||!/^\d+$/[_0x3d8eff(0x213)](_0x62cc95)||!Number[_0x3d8eff(0x238)](Number(_0x62cc95))||Number(_0x62cc95)>_0x2a9cb2)throw Error(_0x3d8eff(0x201)+_0x138f7b+'.');return Number(_0x62cc95);}export function resolveWorksheetImages(_0x400f55,_0x4244f2,_0x2db3f9){const _0xd792e9=a141_0x5a3b95;let _0xf78330=0x0,_0xbee584=0x0,_0x5786da=0x0;const _0x5032fd=new Map(),_0x5e3695=_0x1a6372=>{const _0x567061=a141_0x20ab;if(_0x5032fd[_0x567061(0x1fb)](_0x1a6372))return _0x5032fd[_0x567061(0x214)](_0x1a6372);const _0x18ea0f=_0x400f55[_0x567061(0x214)](_0x1a6372);if(!_0x18ea0f)throw Error(_0x567061(0x1ee)+_0x1a6372+'.');const _0x458e21={'name':'','uri':'','attrs':{},'children':[],'text':''},_0x1a306a=[_0x458e21],_0x3fb2d7=new SaxesParser({'xmlns':!![]}),_0x35f850=()=>{const _0x370c14=_0x567061;if(++_0xbee584>0x1e8480)throw Error(_0x370c14(0x1d3));};_0x3fb2d7['on'](_0x567061(0x193),()=>{throw Error('XML\x20DTD/entities\x20are\x20not\x20supported.');}),_0x3fb2d7['on'](_0x567061(0x1df),_0x1c4264=>{const _0x17dfbd=_0x567061;_0x35f850();if(++_0xf78330>0x7a120||_0x1a306a[_0x17dfbd(0x1ac)]>0x40)throw Error(_0x17dfbd(0x231));const _0x2bc430={};for(const _0x4ab4dd of Object['values'](_0x1c4264[_0x17dfbd(0x204)])){const _0x4de4d7=OFFICE_RELS[_0x17dfbd(0x194)](_0x4ab4dd[_0x17dfbd(0x19d)])?'r:'+_0x4ab4dd[_0x17dfbd(0x1de)]:_0x4ab4dd['uri']?'{'+_0x4ab4dd['uri']+'}'+_0x4ab4dd[_0x17dfbd(0x1de)]:_0x4ab4dd[_0x17dfbd(0x1de)];if(_0x4de4d7 in _0x2bc430)throw Error(_0x17dfbd(0x200));_0x2bc430[_0x4de4d7]=_0x4ab4dd[_0x17dfbd(0x1c4)];}const _0x3ddd13={'name':_0x1c4264['local'],'uri':_0x1c4264['uri'],'attrs':_0x2bc430,'children':[],'text':''};_0x1a306a['at'](-0x1)[_0x17dfbd(0x1fa)][_0x17dfbd(0x1d9)](_0x3ddd13),_0x1a306a[_0x17dfbd(0x1d9)](_0x3ddd13);}),_0x3fb2d7['on'](_0x567061(0x1f2),_0x3b9e65=>{const _0x12aa7c=_0x567061;_0x35f850();const _0x4c01de=_0x1a306a['at'](-0x1);_0x4c01de['text']+=_0x3b9e65;if(_0x4c01de[_0x12aa7c(0x1f2)][_0x12aa7c(0x1ac)]>0x10000)throw Error(_0x12aa7c(0x1b3));}),_0x3fb2d7['on'](_0x567061(0x20a),()=>{const _0x201259=_0x567061;_0x35f850(),_0x1a306a[_0x201259(0x1a3)]();}),_0x3fb2d7['on']('error',_0x164da1=>{throw _0x164da1;}),_0x3fb2d7[_0x567061(0x219)](_0x18ea0f['toString'](_0x567061(0x20e)))[_0x567061(0x218)]();const _0x507cf5=one(_0x458e21[_0x567061(0x1fa)],_0x1a6372);return _0x5032fd[_0x567061(0x1a5)](_0x1a6372,_0x507cf5),_0x507cf5;},_0x12fe98=new Map(),_0xcc5412=_0x5a3808=>{const _0x27e957=a141_0x20ab;if(_0x12fe98['has'](_0x5a3808))return _0x12fe98[_0x27e957(0x214)](_0x5a3808);const _0x127ec1=a141_0x1ab275[_0x27e957(0x1e9)]['join'](a141_0x1ab275[_0x27e957(0x1e9)]['dirname'](_0x5a3808),_0x27e957(0x1dc),a141_0x1ab275[_0x27e957(0x1e9)][_0x27e957(0x1e6)](_0x5a3808)+_0x27e957(0x22c));if(!_0x400f55[_0x27e957(0x1fb)](_0x127ec1))return[];const _0x2e90bf=new Set(),_0x1ed8db=_0x5e3695(_0x127ec1);if(!matches(_0x1ed8db,_0x27e957(0x22f)))throw Error(_0x27e957(0x21b)+_0x127ec1+'.');const _0x3d53cb=children(_0x1ed8db,_0x27e957(0x1c1))[_0x27e957(0x1bb)](_0x3a74f9=>{const _0x3910b3=_0x27e957,{Id:_0x489678,Type:_0x4fc26e,Target:_0x22e8ce,TargetMode:_0x2a9ed2}=_0x3a74f9[_0x3910b3(0x1e7)];if(!_0x489678||_0x2e90bf['has'](_0x489678)||!_0x4fc26e)throw Error(_0x3910b3(0x227)+_0x127ec1+'.');return _0x2e90bf[_0x3910b3(0x1eb)](_0x489678),{'id':_0x489678,'type':_0x4fc26e,'target':_0x22e8ce??'','mode':_0x2a9ed2};});return _0x12fe98[_0x27e957(0x1a5)](_0x5a3808,_0x3d53cb),_0x3d53cb;},_0x2f3205=(_0x26eb11,_0x8583f4)=>{const _0x31bf80=a141_0x20ab,{target:_0x320244,mode:_0x560504}=_0x8583f4;if(_0x560504&&_0x560504!==_0x31bf80(0x1be))throw Error('External\x20image\x20relationship\x20is\x20not\x20supported:\x20'+_0x26eb11+'.');if(!_0x320244||_0x320244[_0x31bf80(0x194)]('\x5c')||/[?#%\x00-\x20]/[_0x31bf80(0x213)](_0x320244)||/^[a-z][a-z0-9+.-]*:/i['test'](_0x320244)||_0x320244[_0x31bf80(0x1d7)]('//'))throw Error(_0x31bf80(0x235)+_0x26eb11+'.');const _0x481040=_0x320244[_0x31bf80(0x1d7)]('/')?_0x320244[_0x31bf80(0x1cf)](0x1):a141_0x1ab275['posix'][_0x31bf80(0x1bc)](a141_0x1ab275[_0x31bf80(0x1e9)][_0x31bf80(0x1c7)](a141_0x1ab275['posix'][_0x31bf80(0x20c)](_0x26eb11),_0x320244));if(_0x481040[_0x31bf80(0x1d7)](_0x31bf80(0x1ba))||_0x481040==='..'||!_0x481040[_0x31bf80(0x1d7)]('xl/'))throw Error(_0x31bf80(0x1b2)+_0x26eb11+'.');return _0x481040;},_0x4c30f1=(_0x351a26,_0x4559f2,_0x28c557)=>{const _0x23fff0=a141_0x20ab,_0x39db44=_0xcc5412(_0x351a26)[_0x23fff0(0x1d8)](_0x4652fb=>_0x4652fb['id']===_0x4559f2&&relationshipTypes(_0x28c557)['includes'](_0x4652fb['type']));if(_0x39db44[_0x23fff0(0x1ac)]!==0x1)throw Error(_0x23fff0(0x19c)+_0x28c557+_0x23fff0(0x22d)+_0x351a26+'.');return _0x2f3205(_0x351a26,_0x39db44[0x0]);},_0x3ae0e1=(_0x47832d,_0x60d464)=>{const _0x54d1c4=a141_0x20ab,_0x84709b=_0xcc5412(_0x47832d)['filter'](_0x2614a6=>relationshipTypes(_0x60d464)[_0x54d1c4(0x194)](_0x2614a6[_0x54d1c4(0x207)]));if(_0x84709b[_0x54d1c4(0x1ac)]!==0x1)throw Error(_0x54d1c4(0x19c)+_0x60d464+'\x20relationship\x20in\x20'+_0x47832d+'.');return _0x2f3205(_0x47832d,_0x84709b[0x0]);},_0x32c262=_0xd792e9(0x243),_0x5a8fdf=_0x5e3695(_0x32c262);if(!matches(_0x5a8fdf,'workbook'))throw Error(_0xd792e9(0x19b));const _0x549f58=one(chain(_0x5a8fdf,'sheets',_0xd792e9(0x237))[_0xd792e9(0x1d8)](_0x5da45c=>_0x5da45c['attrs'][_0xd792e9(0x1e3)]===_0x4244f2),'worksheet'),_0x51e98d=_0x4c30f1(_0x32c262,_0x549f58[_0xd792e9(0x1e7)][_0xd792e9(0x1f7)],_0xd792e9(0x197)),_0x4787fb=_0x5e3695(_0x51e98d);if(!matches(_0x4787fb,_0xd792e9(0x197)))throw Error(_0xd792e9(0x1f3));const _0x74d6a8=chain(_0x4787fb,_0xd792e9(0x21f),_0xd792e9(0x1b6)),_0x4bf38f=new Map(),_0x5ee424=new Set(_0x74d6a8[_0xd792e9(0x1d8)](_0x4dbe81=>_0x4dbe81[_0xd792e9(0x1e7)][_0xd792e9(0x1c0)]==='1'||_0x4dbe81[_0xd792e9(0x1e7)][_0xd792e9(0x1c0)]===_0xd792e9(0x1c9))[_0xd792e9(0x1bb)](_0x5396f8=>integer(_0x5396f8[_0xd792e9(0x1e7)]['r'],_0xd792e9(0x1b4)))),_0x48006c=_0x1169fa=>{const _0x3acd8f=_0xd792e9,_0x11581d=_0x1169fa===undefined?0xf:Number(_0x1169fa);if(!Number[_0x3acd8f(0x1f1)](_0x11581d)||_0x11581d<=0x0||_0x11581d>409.5)throw Error(_0x3acd8f(0x225));return Math['round'](_0x11581d*0x319c);},_0x5bff08=_0x48006c(children(_0x4787fb,_0xd792e9(0x195))[0x0]?.[_0xd792e9(0x1e7)][_0xd792e9(0x1b9)]);for(const _0xf13b0 of _0x74d6a8)if(_0xf13b0[_0xd792e9(0x1e7)]['ht']!==undefined)_0x4bf38f['set'](integer(_0xf13b0[_0xd792e9(0x1e7)]['r'],'image\x20row\x20height\x20coordinate'),_0x48006c(_0xf13b0['attrs']['ht']));const _0x1fecec=[],_0x7fcbc1=_0x55beee=>{const _0x36c38b=_0xd792e9;if(!_0x2db3f9['has'](_0x55beee[_0x36c38b(0x1a8)]))return;if(++_0x5786da>0x2710)throw Error(_0x36c38b(0x1af));_0x1fecec[_0x36c38b(0x1d9)](_0x5ee424['has'](_0x55beee[_0x36c38b(0x1b6)])?{..._0x55beee,'hiddenRow':!![]}:_0x55beee);},_0x1f8757=_0x34e71a=>({'row':integer(one(children(_0x34e71a,_0xd792e9(0x1b6),DRAWING),'anchor\x20row')[_0xd792e9(0x1f2)],_0xd792e9(0x232),0x1869f)+0x1,'col':integer(one(children(_0x34e71a,_0xd792e9(0x1a8)),'anchor\x20column')[_0xd792e9(0x1f2)],_0xd792e9(0x1ff),0xff)+0x1});for(const _0x337841 of children(_0x4787fb,_0xd792e9(0x22b))){const _0x2db23e=_0x4c30f1(_0x51e98d,_0x337841[_0xd792e9(0x1e7)][_0xd792e9(0x1f7)],_0xd792e9(0x22b)),_0x331e86=_0x5e3695(_0x2db23e);if(!matches(_0x331e86,'wsDr'))throw Error('Unsupported\x20drawing\x20namespace.');for(const _0x4fe52d of _0x331e86[_0xd792e9(0x1fa)]){if(![_0xd792e9(0x21e),_0xd792e9(0x1fd),_0xd792e9(0x1b0)]['some'](_0x1dd954=>matches(_0x4fe52d,_0x1dd954)))continue;if(_0x4fe52d[_0xd792e9(0x1e3)]===_0xd792e9(0x1b0))throw Error(_0xd792e9(0x226)+_0x4244f2+'.');const _0x8f443f=_0x1f8757(one(children(_0x4fe52d,_0xd792e9(0x1ae)),_0xd792e9(0x1c6)));if(!_0x2db3f9[_0xd792e9(0x1fb)](_0x8f443f['col']))continue;let _0x2e7132;const _0x313bd8=one(children(_0x4fe52d,'from'),_0xd792e9(0x1c6)),_0xfe3dd5=integer(one(children(_0x313bd8,_0xd792e9(0x1e0)),_0xd792e9(0x229))['text'],_0xd792e9(0x229),Number[_0xd792e9(0x208)]),_0x135f33=_0x4bf38f[_0xd792e9(0x214)](_0x8f443f[_0xd792e9(0x1b6)])??_0x5bff08;if(_0xfe3dd5>=_0x135f33)throw Error('Invalid\x20image\x20start\x20offset\x20at\x20row\x20'+_0x8f443f[_0xd792e9(0x1b6)]+'.');if(_0x4fe52d[_0xd792e9(0x1e3)]===_0xd792e9(0x21e)){const _0x384af5=one(children(_0x4fe52d,_0xd792e9(0x236)),_0xd792e9(0x1d2)),_0x11b681=integer(_0x384af5[_0xd792e9(0x1e7)]['cy'],'image\x20height',Number['MAX_SAFE_INTEGER']);if(!_0x11b681||_0xfe3dd5+_0x11b681>_0x135f33)_0x2e7132=_0xd792e9(0x1b7);}if(_0x4fe52d[_0xd792e9(0x1e3)]===_0xd792e9(0x1fd)){const _0x2f9cdb=one(children(_0x4fe52d,'to'),_0xd792e9(0x1a6)),_0x4f7532=_0x1f8757(_0x2f9cdb),_0x54e22b=integer(one(children(_0x2f9cdb,_0xd792e9(0x1e0)),'anchor\x20end\x20offset')['text'],_0xd792e9(0x1c8),Number[_0xd792e9(0x208)]),_0x3f2bed=_0x4bf38f[_0xd792e9(0x214)](_0x4f7532[_0xd792e9(0x1b6)])??_0x5bff08;if(_0x54e22b>_0x3f2bed||_0x4f7532[_0xd792e9(0x1b6)]===_0x8f443f[_0xd792e9(0x1b6)]&&_0x54e22b<=_0xfe3dd5)_0x2e7132=_0xd792e9(0x234);if(_0x4f7532[_0xd792e9(0x1b6)]<_0x8f443f['row']||_0x4f7532[_0xd792e9(0x1b6)]>_0x8f443f[_0xd792e9(0x1b6)]+0x1||_0x4f7532[_0xd792e9(0x1b6)]===_0x8f443f[_0xd792e9(0x1b6)]+0x1&&_0x54e22b!==0x0)_0x2e7132=_0xd792e9(0x1b7);}const _0x20f57b=chain(_0x4fe52d,_0xd792e9(0x1da),_0xd792e9(0x1e8),'blip');for(const _0x97b119 of _0x20f57b){if(_0x97b119[_0xd792e9(0x1e7)][_0xd792e9(0x210)])throw Error(_0xd792e9(0x22a));_0x7fcbc1({..._0x8f443f,'media':[_0x4c30f1(_0x2db23e,_0x97b119['attrs'][_0xd792e9(0x22e)],'image')],..._0x2e7132?{'error':_0x2e7132}:{}});}if(!_0x20f57b[_0xd792e9(0x1ac)])_0x7fcbc1({..._0x8f443f,'media':[],'error':_0xd792e9(0x198)});}}const _0x393c36=_0x195b60=>{const _0x519443=_0xd792e9,_0x162f6a=_0x5e3695(_0x3ae0e1(_0x32c262,_0x519443(0x1ce)));if(!matches(_0x162f6a,_0x519443(0x1d0)))throw Error(_0x519443(0x205));const _0x3675a8=integer(_0x195b60['attrs']['vm'],_0x519443(0x1a7));if(!_0x3675a8)throw Error(_0x519443(0x1ef));const _0x3d1f81=children(one(children(_0x162f6a,_0x519443(0x1d6)),_0x519443(0x1d6)),'bk')[_0x3675a8-0x1];if(!_0x3d1f81)throw Error(_0x519443(0x1e4));const _0x4e4f16=one(children(_0x3d1f81,'rc'),_0x519443(0x1ea)),_0x17808d=integer(_0x4e4f16[_0x519443(0x1e7)]['t'],_0x519443(0x1b8)),_0x301711=children(one(children(_0x162f6a,_0x519443(0x19f)),_0x519443(0x23b)),_0x519443(0x199))[_0x17808d-0x1];if(!_0x17808d||_0x301711?.[_0x519443(0x1e7)][_0x519443(0x1e3)]!==_0x519443(0x1cb))throw Error(_0x519443(0x23e));const _0x569026=one(children(_0x162f6a,_0x519443(0x1d4))['filter'](_0x3fdf42=>_0x3fdf42[_0x519443(0x1e7)][_0x519443(0x1e3)]===_0x519443(0x1cb)),_0x519443(0x242)),_0x120406=children(_0x569026,'bk')[integer(_0x4e4f16[_0x519443(0x1e7)]['v'],_0x519443(0x1e2))];if(!_0x120406)throw Error(_0x519443(0x217));const _0x59c34e=chain(_0x120406,_0x519443(0x1dd))['flatMap'](_0x122b7f=>children(_0x122b7f,_0x519443(0x236),SHEET))[_0x519443(0x1d8)](_0x6cebcb=>_0x6cebcb[_0x519443(0x1e7)][_0x519443(0x19d)]?.[_0x519443(0x1cd)]()===_0x519443(0x1f8)),_0x5c62a5=integer(one(_0x59c34e[_0x519443(0x21a)](_0xac1a8e=>children(_0xac1a8e,_0x519443(0x1a4))),_0x519443(0x215))[_0x519443(0x1e7)]['i'],'rich\x20value\x20index'),_0x284cdf=_0x5e3695(_0x3ae0e1(_0x32c262,_0x519443(0x1db)));if(!matches(_0x284cdf,_0x519443(0x203)))throw Error(_0x519443(0x1ed));const _0x3fbc52=children(_0x284cdf,'rv')[_0x5c62a5];if(!_0x3fbc52)throw Error(_0x519443(0x1ad));const _0x3cc094=_0x5e3695(_0x3ae0e1(_0x32c262,'rdRichValueStructure'));if(!matches(_0x3cc094,_0x519443(0x1d1)))throw Error('Unsupported\x20rich\x20structure\x20namespace.');const _0x4bb1a6=children(_0x3cc094,'s')[integer(_0x3fbc52[_0x519443(0x1e7)]['s'],_0x519443(0x1f0))];if(!_0x4bb1a6||_0x4bb1a6[_0x519443(0x1e7)]['t']!==_0x519443(0x1cc))throw Error(_0x519443(0x1f4));const _0x54428e=children(_0x4bb1a6,'k'),_0x38e1e7=_0x54428e[_0x519443(0x1bb)]((_0x5b6826,_0x2f3bd7)=>_0x5b6826[_0x519443(0x1e7)]['n']===_0x519443(0x202)?_0x2f3bd7:-0x1)[_0x519443(0x1d8)](_0x21eb19=>_0x21eb19>=0x0);if(_0x38e1e7[_0x519443(0x1ac)]!==0x1)throw Error('Missing\x20or\x20ambiguous\x20local\x20image\x20identifier.');const _0x2a2e4b=children(_0x3fbc52,'v',RICH)[_0x38e1e7[0x0]];if(!_0x2a2e4b)throw Error(_0x519443(0x1a2));const _0x2227c1=_0x3ae0e1(_0x32c262,_0x519443(0x1bd)),_0x43ed46=_0x5e3695(_0x2227c1);if(!matches(_0x43ed46,_0x519443(0x1c2)))throw Error(_0x519443(0x216));const _0x29bf56=children(_0x43ed46,_0x519443(0x19e))[integer(_0x2a2e4b[_0x519443(0x1f2)],_0x519443(0x1c3))];if(!_0x29bf56)throw Error(_0x519443(0x1f6));return _0x4c30f1(_0x2227c1,_0x29bf56[_0x519443(0x1e7)][_0x519443(0x1f7)],'image');};let _0x1bb7aa;const _0x40ae5f=_0x1cfc90=>{const _0x25fd7a=_0xd792e9;if(!_0x1bb7aa){_0x1bb7aa=new Map();const _0x4aa8f3=_0xcc5412(_0x32c262)[_0x25fd7a(0x1d8)](_0x26c70a=>[...relationshipTypes('cellImage'),...relationshipTypes(_0x25fd7a(0x21c))]['includes'](_0x26c70a[_0x25fd7a(0x207)]));if(!_0x4aa8f3['length']&&_0x400f55[_0x25fd7a(0x1fb)](_0x25fd7a(0x19a)))_0x4aa8f3[_0x25fd7a(0x1d9)]({'id':'','type':'','target':_0x25fd7a(0x209)});if(_0x4aa8f3[_0x25fd7a(0x1ac)]!==0x1)throw Error(_0x25fd7a(0x1aa));const _0xf3e41c=_0x2f3205(_0x32c262,_0x4aa8f3[0x0]),_0x5d6203=_0x5e3695(_0xf3e41c);if(!matches(_0x5d6203,_0x25fd7a(0x21c)))throw Error(_0x25fd7a(0x20d));for(const _0x54201d of children(_0x5d6203,_0x25fd7a(0x222))){const _0x4b0cd5=one(chain(_0x54201d,_0x25fd7a(0x1da),_0x25fd7a(0x211),_0x25fd7a(0x228)),_0x25fd7a(0x1f9))['attrs'][_0x25fd7a(0x1e3)];if(!_0x4b0cd5||_0x1bb7aa[_0x25fd7a(0x1fb)](_0x4b0cd5))throw Error('Invalid\x20or\x20duplicate\x20WPS\x20image\x20ID.');const _0x2dee9b=one(chain(_0x54201d,_0x25fd7a(0x1da),_0x25fd7a(0x1e8),'blip'),_0x25fd7a(0x1fe));if(_0x2dee9b[_0x25fd7a(0x1e7)][_0x25fd7a(0x210)])throw Error(_0x25fd7a(0x239));_0x1bb7aa[_0x25fd7a(0x1a5)](_0x4b0cd5,_0x4c30f1(_0xf3e41c,_0x2dee9b[_0x25fd7a(0x1e7)][_0x25fd7a(0x22e)],'image'));}}const _0x48eb70=_0x1bb7aa['get'](_0x1cfc90);if(!_0x48eb70)throw Error('Missing\x20WPS\x20image\x20ID:\x20'+_0x1cfc90+'.');return _0x48eb70;},_0xfb56de=new Set();for(const _0x296f05 of _0x74d6a8[_0xd792e9(0x21a)](_0x2d5397=>children(_0x2d5397,'c'))){const _0x35544d=/^([A-Z]+)([1-9]\d*)$/[_0xd792e9(0x233)](_0x296f05[_0xd792e9(0x1e7)]['r']??'');if(!_0x35544d)continue;let _0x393d17=0x0;for(const _0x3219fb of _0x35544d[0x1])_0x393d17=_0x393d17*0x1a+_0x3219fb['charCodeAt'](0x0)-0x40;if(!_0x2db3f9[_0xd792e9(0x1fb)](_0x393d17))continue;const _0x3a8f71=integer(_0x35544d[0x2],'image\x20cell\x20row');if(_0xfb56de['has'](_0x296f05[_0xd792e9(0x1e7)]['r']))throw Error(_0xd792e9(0x23a));_0xfb56de[_0xd792e9(0x1eb)](_0x296f05[_0xd792e9(0x1e7)]['r']);const _0x4a3cf2=children(_0x296f05,'f');if(!_0x296f05[_0xd792e9(0x1e7)]['vm']&&!_0x4a3cf2[_0xd792e9(0x1ac)])continue;try{if(_0x3a8f71<0x1||_0x393d17>0x100)throw Error(_0xd792e9(0x230));let _0x1996a1;if(_0x296f05[_0xd792e9(0x1e7)]['vm']){if(_0x4a3cf2[_0xd792e9(0x1ac)])throw Error(_0xd792e9(0x1a1));if(_0x296f05['attrs']['t']!=='e'||children(_0x296f05,'v')[_0xd792e9(0x1ac)]!==0x1||children(_0x296f05,'v')[0x0][_0xd792e9(0x1f2)]!=='#VALUE!')throw Error('Rich\x20IMAGE\x20cell\x20contains\x20unexpected\x20scalar\x20or\x20mixed\x20content.');_0x1996a1=_0x393c36(_0x296f05);}else{const _0xaa0c9f=one(_0x4a3cf2,'image\x20formula');if(_0xaa0c9f['attrs']['t']===_0xd792e9(0x220)||_0xaa0c9f[_0xd792e9(0x1e7)]['si'])throw Error(_0xd792e9(0x23c));const _0x415c76=/^\s*=?\s*@?(?:_xlfn\.)?DISPIMG\(\s*"((?:[^"]|"")+)"\s*(?:,\s*[01]\s*)?\)\s*$/i[_0xd792e9(0x233)](_0xaa0c9f['text']);if(!_0x415c76)throw Error('Unsupported\x20image\x20formula;\x20expected\x20a\x20standalone\x20DISPIMG\x20literal.');_0x1996a1=_0x40ae5f(_0x415c76[0x1][_0xd792e9(0x221)](/""/g,'\x22'));}_0x7fcbc1({'row':_0x3a8f71,'col':_0x393d17,'media':[_0x1996a1],'nativeCell':!![]});}catch(_0x1d003c){_0x7fcbc1({'row':_0x3a8f71,'col':_0x393d17,'media':[],'nativeCell':!![],'error':_0x1d003c[_0xd792e9(0x1e5)]});}}return _0x1fecec;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x565a35,_0x38d173){const _0x33f5af=a142_0x1972,_0x46a12b=_0x565a35();while(!![]){try{const _0x3bd7f7=parseInt(_0x33f5af(0xaa))/0x1*(-parseInt(_0x33f5af(0x97))/0x2)+parseInt(_0x33f5af(0xb1))/0x3+parseInt(_0x33f5af(0xb7))/0x4*(-parseInt(_0x33f5af(0x9d))/0x5)+-parseInt(_0x33f5af(0xab))/0x6+-parseInt(_0x33f5af(0xb5))/0x7+-parseInt(_0x33f5af(0xb2))/0x8+parseInt(_0x33f5af(0xba))/0x9;if(_0x3bd7f7===_0x38d173)break;else _0x46a12b['push'](_0x46a12b['shift']());}catch(_0x145010){_0x46a12b['push'](_0x46a12b['shift']());}}}(a142_0x3367,0x92c52));import{randomUUID,createHash}from'node:crypto';import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,resolveImportOutputPath,runExcelImport,saveImportJson}from'./runner.js';import{runAutoIdExcelImport}from'./auto-id-runner.js';import{previewImportBatchCount}from'./preview.js';export function assertImageImportCapability(_0x270315,_0xd4434d){const _0x59c0d2=a142_0x1972;if(!_0xd4434d['media']?.['length'])return;const _0x4cdec3=_0x270315[_0x59c0d2(0x82)];if(!_0x4cdec3||_0x4cdec3[_0x59c0d2(0x7d)]!==0x1||_0x4cdec3[_0x59c0d2(0x8c)]!==_0x59c0d2(0xb4)||_0x4cdec3[_0x59c0d2(0xc5)]!==0xa00000||_0x4cdec3['maxPixels']!==0x2625a00||!Array[_0x59c0d2(0x65)](_0x4cdec3[_0x59c0d2(0xac)])||![_0x59c0d2(0x66),_0x59c0d2(0x70),'image/gif'][_0x59c0d2(0xaf)](_0x2fdd6e=>_0x4cdec3['types'][_0x59c0d2(0xbf)](_0x2fdd6e)))throw Error('The\x20server\x20does\x20not\x20support\x20this\x20image\x20import\x20capability.');}function a142_0x3367(){const _0x5a17c3=['appCode','binding','type','get','reduce','all','stringify','mappingHash','00000000-0000-4000-8000-000000000000','2QBxHYU','readback','contract','png','entries','jpg','2403710SQmdHK','datasetCode','utf8','gif','field','values','runtimeDomain','bytes','maxBatchBytes','imageFields','phase','uploadFields','parse','145779jqKYry','3633078JUYslg','types','contentHash','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','every','rows-started','788085debbHC','1599240PcEtdM','batchSize','sha256','779681kBnKhk','schemaVersion','4lCjcIK','fileName','schemaFingerprint','16936173bvBKQg','upload','missing','value','size','includes','isInteger','key','imageApi','sheet','actorId','maxFileBytes','importId','Image\x20upload\x20outcome\x20is\x20unknown\x20or\x20missing.\x20Resume\x20to\x20reconcile\x20the\x20original\x20upload\x20identity.','succeeded','Invalid\x20image\x20media\x20descriptor.','rowNumber','isArray','image/png','Uploaded\x20image\x20is\x20not\x20visible.\x20Resume\x20to\x20reconcile\x20before\x20continuing.','Image\x20cell\x20references\x20missing\x20media.','Cannot\x20read\x20the\x20image\x20import\x20checkpoint.','hashes','Invalid\x20image\x20manifest\x20limits.','Completed\x20image\x20checkpoint\x20value\x20changed.','test','completed','pending','image/jpeg','imageCells','.lock','media','strategy','ENOENT','fromEntries','hex','manifest','dataset-import/','map','Invalid\x20image\x20readback\x20digest.','name','version','rows','Previously\x20uploaded\x20image\x20is\x20missing;\x20automatic\x20repair\x20is\x20disabled.','hash','.lock.recovery','imageImport','Excel\x20contains\x20invalid\x20or\x20no\x20data\x20rows;\x20no\x20images\x20were\x20uploaded.','maxBatchSize','fileHash','inputPaths','Row\x20phase\x20started\x20but\x20the\x20row\x20checkpoint\x20is\x20missing;\x20stop\x20to\x20avoid\x20duplicate\x20records.','status','length','update','resume','uploadId','rows-preparing'];a142_0x3367=function(){return _0x5a17c3;};return a142_0x3367();}export function imageObjectValue(_0x1a916b,_0x35c7ee,_0x2aff76){const _0x34800c=a142_0x1972,_0x121aff=createHash(_0x34800c(0xb4))[_0x34800c(0x8a)](JSON[_0x34800c(0x94)]([_0x1a916b[_0x34800c(0xc4)],_0x1a916b['appCode'],_0x1a916b[_0x34800c(0x9e)],_0x35c7ee]))['digest'](_0x34800c(0x77)),_0x2b363e={'image/png':_0x34800c(0x9a),'image/jpeg':_0x34800c(0x9c),'image/gif':_0x34800c(0xa0)}[_0x2aff76['type']];if(!_0x2b363e||!/^[0-9a-f]{64}$/[_0x34800c(0x6d)](_0x2aff76[_0x34800c(0xad)])||!Number['isSafeInteger'](_0x2aff76[_0x34800c(0xbe)])||_0x2aff76[_0x34800c(0xbe)]<=0x0||_0x2aff76['size']>0xa00000)throw Error(_0x34800c(0xc9));const _0x305929=_0x2aff76[_0x34800c(0xad)]+'.'+_0x2b363e;return{'key':_0x34800c(0x79)+_0x121aff+'/'+_0x305929,'name':_0x305929,'type':_0x2aff76[_0x34800c(0x90)],'size':_0x2aff76[_0x34800c(0xbe)]};}function a142_0x1972(_0x4b1106,_0x1c10cc){_0x4b1106=_0x4b1106-0x64;const _0x33675a=a142_0x3367();let _0x197205=_0x33675a[_0x4b1106];return _0x197205;}export function bindImageManifest(_0x3617a7,_0x282c2e,_0x56f6b7){const _0x36b5fe=a142_0x1972,_0x562a99=new Map(_0x3617a7[_0x36b5fe(0x73)]?.['map'](_0x4563cc=>[_0x4563cc[_0x36b5fe(0xad)],_0x4563cc])),_0x2cd21a=new Map(_0x3617a7[_0x36b5fe(0x71)]?.[_0x36b5fe(0x7a)](_0x322947=>[_0x322947[_0x36b5fe(0x64)]+':'+_0x322947[_0x36b5fe(0xa1)],_0x322947['hashes']]));return{..._0x3617a7,'rows':_0x3617a7[_0x36b5fe(0x7e)][_0x36b5fe(0x7a)](_0x1a1ffc=>({..._0x1a1ffc,'values':Object[_0x36b5fe(0x76)](Object[_0x36b5fe(0x9b)](_0x1a1ffc[_0x36b5fe(0xa2)])[_0x36b5fe(0x7a)](([_0x2ed91d,_0x473753])=>{const _0xe8fb45=_0x36b5fe,_0xa07253=_0x2cd21a[_0xe8fb45(0x91)](_0x1a1ffc[_0xe8fb45(0x64)]+':'+_0x2ed91d);return[_0x2ed91d,_0xa07253?_0xa07253[_0xe8fb45(0x7a)](_0x23e2bf=>{const _0x3ad236=_0xe8fb45,_0x32e01c=_0x562a99[_0x3ad236(0x91)](_0x23e2bf);if(!_0x32e01c)throw Error(_0x3ad236(0x68));const _0x2471e4=imageObjectValue(_0x282c2e,_0x56f6b7,_0x32e01c);return _0x3617a7['uploadFields']?.['includes'](_0x2ed91d)?{'fileName':_0x2471e4['name'],'filePath':_0x2471e4['key']}:_0x2471e4;}):_0x473753];}))}))};}async function exists(_0x142aef){const _0x2066d1=a142_0x1972;try{return await lstat(_0x142aef),!![];}catch(_0x4ae909){if(_0x4ae909['code']===_0x2066d1(0x75))return![];throw _0x4ae909;}}export async function runImageExcelImport(_0x3186bd){const _0x41c2ce=a142_0x1972;assertImportContract(_0x3186bd[_0x41c2ce(0x99)],_0x3186bd[_0x41c2ce(0x8e)],_0x3186bd[_0x41c2ce(0x9e)]),assertImageImportCapability(_0x3186bd[_0x41c2ce(0x99)],_0x3186bd[_0x41c2ce(0x78)]);if(!Number[_0x41c2ce(0xc0)](_0x3186bd[_0x41c2ce(0xb3)])||_0x3186bd['batchSize']<0x1||_0x3186bd['batchSize']>_0x3186bd['contract'][_0x41c2ce(0x84)])throw Error('Invalid\x20import\x20batch\x20size.');if(_0x3186bd['manifest']['errors'][_0x41c2ce(0x89)]||!_0x3186bd['manifest']['rows'][_0x41c2ce(0x89)])throw Error(_0x41c2ce(0x83));const _0x483473=await resolveImportOutputPath(_0x3186bd['checkpoint']),_0x3858de=await resolveImportOutputPath(_0x3186bd['report']),_0x249376=await resolveImportOutputPath(_0x483473+'.rows.json'),_0x148232=await Promise[_0x41c2ce(0x93)]([_0x249376,_0x249376+'.lock',_0x249376+_0x41c2ce(0x81),..._0x3186bd[_0x41c2ce(0x86)]??[]][_0x41c2ce(0x7a)](resolveImportOutputPath));for(const _0x5d9da0 of[_0x483473,_0x3858de,_0x483473+_0x41c2ce(0x72),_0x483473+_0x41c2ce(0x81)])await resolveImportOutputPath(_0x5d9da0);assertImportPaths(_0x483473,_0x3858de,_0x148232);const {contract:_0x9d92f0,manifest:_0x213a84}=_0x3186bd,_0x4613d0=_0x213a84[_0x41c2ce(0x73)]??[];if(new Set(_0x4613d0[_0x41c2ce(0x7a)](_0x2dbb01=>_0x2dbb01[_0x41c2ce(0xad)]))[_0x41c2ce(0xbe)]!==_0x4613d0[_0x41c2ce(0x89)]||_0x4613d0[_0x41c2ce(0x92)]((_0x2fa883,_0x3b9a6f)=>_0x2fa883+_0x3b9a6f['size'],0x0)>0x32*0x400*0x400||(_0x213a84[_0x41c2ce(0x71)]??[])[_0x41c2ce(0x92)]((_0x4939dd,_0x5071f1)=>_0x4939dd+_0x5071f1[_0x41c2ce(0x6a)][_0x41c2ce(0x89)],0x0)>0x2710)throw Error(_0x41c2ce(0x6b));for(const _0x514305 of _0x4613d0)if(_0x514305[_0x41c2ce(0xbe)]!==_0x514305['bytes']['length']||createHash(_0x41c2ce(0xb4))[_0x41c2ce(0x8a)](_0x514305[_0x41c2ce(0xa4)])['digest'](_0x41c2ce(0x77))!==_0x514305['contentHash'])throw Error('Image\x20media\x20bytes\x20changed.');previewImportBatchCount(bindImageManifest(_0x213a84,_0x9d92f0,_0x41c2ce(0x96)),_0x9d92f0,_0x3186bd[_0x41c2ce(0xb3)]);const _0x50c9b2={'appCode':_0x3186bd[_0x41c2ce(0x8e)],'datasetCode':_0x3186bd[_0x41c2ce(0x9e)],'runtimeDomain':_0x3186bd[_0x41c2ce(0xa3)],'actorId':_0x9d92f0[_0x41c2ce(0xc4)],'fileHash':_0x213a84[_0x41c2ce(0x85)],'mappingHash':_0x213a84[_0x41c2ce(0x95)],'schemaHash':_0x213a84['schemaHash'],'remoteSchemaHash':_0x9d92f0[_0x41c2ce(0xb9)],'strategy':_0x9d92f0[_0x41c2ce(0x74)],'schemaVersion':_0x9d92f0[_0x41c2ce(0xb6)],'batchSize':_0x3186bd[_0x41c2ce(0xb3)],'maxBatchBytes':_0x9d92f0[_0x41c2ce(0xa5)],'sheet':_0x213a84[_0x41c2ce(0xc3)],'parserVersion':_0x213a84['parserVersion'],'imageFields':_0x213a84[_0x41c2ce(0xa6)],'cells':_0x213a84[_0x41c2ce(0x71)],..._0x213a84[_0x41c2ce(0xa8)]?.[_0x41c2ce(0x89)]?{'uploadFields':_0x213a84[_0x41c2ce(0xa8)]}:{},'media':_0x4613d0[_0x41c2ce(0x7a)](({contentHash:_0x2d6136,type:_0x561fc6,size:_0x421e7f})=>({'contentHash':_0x2d6136,'type':_0x561fc6,'size':_0x421e7f})),'rows':_0x213a84[_0x41c2ce(0x7e)]},_0x372744=await acquireLock(_0x483473);try{let _0x7f0229;if(_0x3186bd[_0x41c2ce(0x8b)]){try{_0x7f0229=JSON[_0x41c2ce(0xa9)](await readFile(_0x483473,_0x41c2ce(0x9f)));}catch{throw Error(_0x41c2ce(0x69));}if(_0x7f0229[_0x41c2ce(0x7d)]!==0x3||!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/[_0x41c2ce(0x6d)](_0x7f0229[_0x41c2ce(0xc6)])||canonical(_0x7f0229[_0x41c2ce(0x8f)])!==canonical(_0x50c9b2)||!['media',_0x41c2ce(0x8d),_0x41c2ce(0xb0),'completed'][_0x41c2ce(0xbf)](_0x7f0229[_0x41c2ce(0xa7)])||!Array[_0x41c2ce(0x65)](_0x7f0229['media'])||_0x7f0229['media'][_0x41c2ce(0x89)]!==_0x4613d0[_0x41c2ce(0x89)]||_0x7f0229[_0x41c2ce(0x73)]['some']((_0x5c2d18,_0x217123)=>_0x5c2d18[_0x41c2ce(0x80)]!==_0x4613d0[_0x217123][_0x41c2ce(0xad)]||![_0x41c2ce(0x6f),_0x41c2ce(0xc8)]['includes'](_0x5c2d18[_0x41c2ce(0x88)])))throw Error('Image\x20checkpoint\x20does\x20not\x20match\x20the\x20source,\x20target\x20or\x20identity.');if([_0x41c2ce(0xb0),_0x41c2ce(0x6e)][_0x41c2ce(0xbf)](_0x7f0229[_0x41c2ce(0xa7)])&&!await exists(_0x249376))throw Error(_0x41c2ce(0x87));if(_0x7f0229[_0x41c2ce(0xa7)]===_0x41c2ce(0x73)&&await exists(_0x249376))throw Error('Unexpected\x20row\x20checkpoint\x20during\x20image\x20upload\x20phase.');}else{if(await exists(_0x483473)||await exists(_0x249376))throw Error(_0x41c2ce(0xae));_0x7f0229={'version':0x3,'importId':randomUUID(),'binding':_0x50c9b2,'phase':_0x41c2ce(0x73),'media':_0x4613d0['map'](_0x52cec9=>({'hash':_0x52cec9[_0x41c2ce(0xad)],'status':_0x41c2ce(0x6f)}))},await saveImportJson(_0x483473,_0x7f0229);}const _0x197f5e=(_0x4a88e6,_0x267221)=>{const _0x20251f=_0x41c2ce;if(!_0x4a88e6||_0x4a88e6[_0x20251f(0xad)]!==_0x267221['contentHash'])throw Error(_0x20251f(0x7b));if(_0x4a88e6[_0x20251f(0x88)]===_0x20251f(0xbc))return undefined;const _0x24704a=imageObjectValue(_0x9d92f0,_0x7f0229['importId'],_0x267221);if(_0x4a88e6[_0x20251f(0x88)]!==_0x20251f(0xc8)||_0x4a88e6['filePath']!==_0x24704a[_0x20251f(0xc1)]||_0x4a88e6[_0x20251f(0xb8)]!==_0x24704a[_0x20251f(0x7c)]||_0x4a88e6[_0x20251f(0x90)]!==_0x24704a[_0x20251f(0x90)]||_0x4a88e6['size']!==_0x24704a[_0x20251f(0xbe)])throw Error('Uploaded\x20image\x20metadata\x20changed\x20or\x20is\x20corrupt.');return _0x24704a;};for(let _0x4a66aa=0x0;_0x4a66aa<_0x4613d0[_0x41c2ce(0x89)];_0x4a66aa++){const _0x23518e=_0x4613d0[_0x4a66aa],_0x13e435=_0x7f0229[_0x41c2ce(0x73)][_0x4a66aa],_0x1c9558=imageObjectValue(_0x9d92f0,_0x7f0229['importId'],_0x23518e);if(_0x13e435['status']==='succeeded'&&canonical(_0x13e435['value'])!==canonical(_0x1c9558))throw Error(_0x41c2ce(0x6c));let _0x3aa00a;if(_0x3186bd['resume']||_0x13e435['status']===_0x41c2ce(0xc8))_0x3aa00a=_0x197f5e(await _0x3186bd[_0x41c2ce(0xc2)][_0x41c2ce(0x98)](_0x7f0229[_0x41c2ce(0xc6)],_0x23518e),_0x23518e);if(!_0x3aa00a&&_0x13e435[_0x41c2ce(0x88)]===_0x41c2ce(0xc8))throw Error(_0x41c2ce(0x7f));if(!_0x3aa00a){try{_0x197f5e(await _0x3186bd['imageApi'][_0x41c2ce(0xbb)](_0x7f0229[_0x41c2ce(0xc6)],_0x23518e),_0x23518e);}catch(_0x135a3d){_0x3aa00a=_0x197f5e(await _0x3186bd[_0x41c2ce(0xc2)][_0x41c2ce(0x98)](_0x7f0229[_0x41c2ce(0xc6)],_0x23518e),_0x23518e);if(!_0x3aa00a)throw Error(_0x41c2ce(0xc7));}if(!_0x3aa00a)_0x3aa00a=_0x197f5e(await _0x3186bd['imageApi'][_0x41c2ce(0x98)](_0x7f0229[_0x41c2ce(0xc6)],_0x23518e),_0x23518e);if(!_0x3aa00a)throw Error(_0x41c2ce(0x67));}_0x13e435['status']='succeeded',_0x13e435[_0x41c2ce(0xbd)]=_0x3aa00a,await saveImportJson(_0x483473,_0x7f0229);}const _0x3571a2=bindImageManifest(_0x213a84,_0x9d92f0,_0x7f0229[_0x41c2ce(0xc6)]),_0x141295=_0x7f0229['phase']===_0x41c2ce(0x8d)?await exists(_0x249376):_0x7f0229[_0x41c2ce(0xa7)]!=='media';_0x7f0229[_0x41c2ce(0xa7)]===_0x41c2ce(0x73)&&(_0x7f0229[_0x41c2ce(0xa7)]=_0x41c2ce(0x8d),await saveImportJson(_0x483473,_0x7f0229));const _0x29f3c6={..._0x3186bd,'manifest':_0x3571a2,'checkpoint':_0x249376,'report':_0x3858de,'resume':_0x141295,'onCheckpointReady':async()=>{const _0x5cf363=_0x41c2ce;_0x7f0229[_0x5cf363(0xa7)]='rows-started',await saveImportJson(_0x483473,_0x7f0229);}},_0x28eadd=_0x9d92f0['schemaVersion']===0x2?await runAutoIdExcelImport({..._0x29f3c6,'reconcileImageConflicts':_0x3186bd['resume']===!![]&&_0x141295}):await runExcelImport(_0x29f3c6);return _0x7f0229[_0x41c2ce(0xa7)]='completed',await saveImportJson(_0x483473,_0x7f0229),{..._0x28eadd,'checkpoint':_0x483473,'imageCount':_0x213a84[_0x41c2ce(0x71)]?.[_0x41c2ce(0x92)]((_0x3b2384,_0x13385d)=>_0x3b2384+_0x13385d['hashes'][_0x41c2ce(0x89)],0x0)??0x0,'uniqueImages':_0x4613d0[_0x41c2ce(0x89)]};}finally{await _0x372744();}}
|
|
1
|
+
(function(_0x2bdf76,_0xa41249){const _0x529ae0=a142_0x286d,_0x2fc54a=_0x2bdf76();while(!![]){try{const _0x575df7=-parseInt(_0x529ae0(0x115))/0x1*(parseInt(_0x529ae0(0x152))/0x2)+parseInt(_0x529ae0(0x160))/0x3*(parseInt(_0x529ae0(0x149))/0x4)+-parseInt(_0x529ae0(0x129))/0x5*(parseInt(_0x529ae0(0x102))/0x6)+parseInt(_0x529ae0(0x12f))/0x7+parseInt(_0x529ae0(0x125))/0x8+-parseInt(_0x529ae0(0x127))/0x9+parseInt(_0x529ae0(0x11b))/0xa;if(_0x575df7===_0xa41249)break;else _0x2fc54a['push'](_0x2fc54a['shift']());}catch(_0x56f46c){_0x2fc54a['push'](_0x2fc54a['shift']());}}}(a142_0x20fa,0xb6790));import{randomUUID,createHash}from'node:crypto';function a142_0x286d(_0x4c4e57,_0x4e2926){_0x4c4e57=_0x4c4e57-0xfd;const _0x20fa90=a142_0x20fa();let _0x286d26=_0x20fa90[_0x4c4e57];return _0x286d26;}import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,resolveImportOutputPath,runExcelImport,saveImportJson}from'./runner.js';function a142_0x20fa(){const _0x368a5f=['value','Image\x20cell\x20references\x20missing\x20media.','Completed\x20image\x20checkpoint\x20value\x20changed.','136PSGhiu','every','importId','batchSize','media','status','manifest','runtimeDomain','errors','phase','get','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','some','schemaVersion','3309IFquvz','rows','version','uploadFields','completed','entries','hash','strategy','rowNumber','3838122iRtdns','isInteger','pending','upload','png','checkpoint','field','inputPaths','hex','isSafeInteger','types','datasetCode','type','Invalid\x20image\x20media\x20descriptor.','bytes','fromEntries','contract','Invalid\x20image\x20readback\x20digest.','fileHash','1149VFkDkJ','imageApi','name','test','utf8','code','4225640IrLCEP','digest','schemaHash','succeeded','includes','sheet','update','dataset-import/','image/png','contentHash','10478600rVlBtd','imageCells','11283516wWwrZT','Image\x20checkpoint\x20does\x20not\x20match\x20the\x20source,\x20target\x20or\x20identity.','5osaDFq','size','map','reduce','Unexpected\x20row\x20checkpoint\x20during\x20image\x20upload\x20phase.','Row\x20phase\x20started\x20but\x20the\x20row\x20checkpoint\x20is\x20missing;\x20stop\x20to\x20avoid\x20duplicate\x20records.','5245919LJlMNJ','maxFileBytes','rows-started','key','length','sha256','Image\x20upload\x20outcome\x20is\x20unknown\x20or\x20missing.\x20Resume\x20to\x20reconcile\x20the\x20original\x20upload\x20identity.','missing','rows-preparing','maxBatchBytes','parserVersion','mappingHash','stringify','appCode','Excel\x20contains\x20invalid\x20or\x20no\x20data\x20rows;\x20no\x20images\x20were\x20uploaded.','fileName','.lock.recovery','isArray','resume','hashes','readback','Uploaded\x20image\x20is\x20not\x20visible.\x20Resume\x20to\x20reconcile\x20before\x20continuing.','00000000-0000-4000-8000-000000000000','report','Cannot\x20read\x20the\x20image\x20import\x20checkpoint.','.lock','860kHAugx','jpg','image/gif','all','imageFields','binding'];a142_0x20fa=function(){return _0x368a5f;};return a142_0x20fa();}import{runAutoIdExcelImport}from'./auto-id-runner.js';import{previewImportBatchCount}from'./preview.js';export function assertImageImportCapability(_0x48401a,_0x16a27e){const _0x8c710d=a142_0x286d;if(!_0x16a27e[_0x8c710d(0x156)]?.[_0x8c710d(0x133)])return;const _0x27edc5=_0x48401a['imageImport'];if(!_0x27edc5||_0x27edc5[_0x8c710d(0x162)]!==0x1||_0x27edc5['uploadId']!=='sha256'||_0x27edc5[_0x8c710d(0x130)]!==0xa00000||_0x27edc5['maxPixels']!==0x2625a00||!Array[_0x8c710d(0x140)](_0x27edc5[_0x8c710d(0x10c)])||![_0x8c710d(0x123),'image/jpeg',_0x8c710d(0x14b)][_0x8c710d(0x153)](_0x4819ac=>_0x27edc5[_0x8c710d(0x10c)]['includes'](_0x4819ac)))throw Error('The\x20server\x20does\x20not\x20support\x20this\x20image\x20import\x20capability.');}export function imageObjectValue(_0x271bfd,_0x585126,_0x166ac7){const _0x83b5a6=a142_0x286d,_0x551d2f=createHash(_0x83b5a6(0x134))[_0x83b5a6(0x121)](JSON[_0x83b5a6(0x13b)]([_0x271bfd['actorId'],_0x271bfd['appCode'],_0x271bfd[_0x83b5a6(0x10d)],_0x585126]))[_0x83b5a6(0x11c)](_0x83b5a6(0x10a)),_0x53216c={'image/png':_0x83b5a6(0x106),'image/jpeg':_0x83b5a6(0x14a),'image/gif':'gif'}[_0x166ac7['type']];if(!_0x53216c||!/^[0-9a-f]{64}$/[_0x83b5a6(0x118)](_0x166ac7[_0x83b5a6(0x124)])||!Number[_0x83b5a6(0x10b)](_0x166ac7['size'])||_0x166ac7[_0x83b5a6(0x12a)]<=0x0||_0x166ac7[_0x83b5a6(0x12a)]>0xa00000)throw Error(_0x83b5a6(0x10f));const _0x5258ba=_0x166ac7[_0x83b5a6(0x124)]+'.'+_0x53216c;return{'key':_0x83b5a6(0x122)+_0x551d2f+'/'+_0x5258ba,'name':_0x5258ba,'type':_0x166ac7[_0x83b5a6(0x10e)],'size':_0x166ac7[_0x83b5a6(0x12a)]};}export function bindImageManifest(_0x23857c,_0x216489,_0x1385b5){const _0x50d845=a142_0x286d,_0x111b0b=new Map(_0x23857c[_0x50d845(0x156)]?.[_0x50d845(0x12b)](_0x49aecb=>[_0x49aecb[_0x50d845(0x124)],_0x49aecb])),_0x4e1b2f=new Map(_0x23857c[_0x50d845(0x126)]?.[_0x50d845(0x12b)](_0x5439f6=>[_0x5439f6['rowNumber']+':'+_0x5439f6[_0x50d845(0x108)],_0x5439f6[_0x50d845(0x142)]]));return{..._0x23857c,'rows':_0x23857c['rows'][_0x50d845(0x12b)](_0x4e0b4c=>({..._0x4e0b4c,'values':Object[_0x50d845(0x111)](Object[_0x50d845(0xfe)](_0x4e0b4c['values'])['map'](([_0x58f11f,_0x58607e])=>{const _0x3c908a=_0x50d845,_0x4578b0=_0x4e1b2f[_0x3c908a(0x15c)](_0x4e0b4c[_0x3c908a(0x101)]+':'+_0x58f11f);return[_0x58f11f,_0x4578b0?_0x4578b0[_0x3c908a(0x12b)](_0x5d2812=>{const _0x29ad50=_0x3c908a,_0x1562e4=_0x111b0b['get'](_0x5d2812);if(!_0x1562e4)throw Error(_0x29ad50(0x150));const _0x4d33a1=imageObjectValue(_0x216489,_0x1385b5,_0x1562e4);return _0x23857c[_0x29ad50(0x163)]?.['includes'](_0x58f11f)?{'fileName':_0x4d33a1[_0x29ad50(0x117)],'filePath':_0x4d33a1['key']}:_0x4d33a1;}):_0x58607e];}))}))};}async function exists(_0x3fee88){const _0x4300b0=a142_0x286d;try{return await lstat(_0x3fee88),!![];}catch(_0x144961){if(_0x144961[_0x4300b0(0x11a)]==='ENOENT')return![];throw _0x144961;}}export async function runImageExcelImport(_0x117f0e){const _0x24451a=a142_0x286d;assertImportContract(_0x117f0e[_0x24451a(0x112)],_0x117f0e[_0x24451a(0x13c)],_0x117f0e[_0x24451a(0x10d)]),assertImageImportCapability(_0x117f0e[_0x24451a(0x112)],_0x117f0e[_0x24451a(0x158)]);if(!Number[_0x24451a(0x103)](_0x117f0e[_0x24451a(0x155)])||_0x117f0e[_0x24451a(0x155)]<0x1||_0x117f0e[_0x24451a(0x155)]>_0x117f0e['contract']['maxBatchSize'])throw Error('Invalid\x20import\x20batch\x20size.');if(_0x117f0e[_0x24451a(0x158)][_0x24451a(0x15a)][_0x24451a(0x133)]||!_0x117f0e[_0x24451a(0x158)]['rows'][_0x24451a(0x133)])throw Error(_0x24451a(0x13d));const _0x42c40d=await resolveImportOutputPath(_0x117f0e[_0x24451a(0x107)]),_0x52482c=await resolveImportOutputPath(_0x117f0e[_0x24451a(0x146)]),_0x2539c9=await resolveImportOutputPath(_0x42c40d+'.rows.json'),_0x5be684=await Promise[_0x24451a(0x14c)]([_0x2539c9,_0x2539c9+_0x24451a(0x148),_0x2539c9+_0x24451a(0x13f),..._0x117f0e[_0x24451a(0x109)]??[]][_0x24451a(0x12b)](resolveImportOutputPath));for(const _0x2da41c of[_0x42c40d,_0x52482c,_0x42c40d+_0x24451a(0x148),_0x42c40d+_0x24451a(0x13f)])await resolveImportOutputPath(_0x2da41c);assertImportPaths(_0x42c40d,_0x52482c,_0x5be684);const {contract:_0x3195ea,manifest:_0x45f936}=_0x117f0e,_0x141b6b=_0x45f936['media']??[];if(new Set(_0x141b6b[_0x24451a(0x12b)](_0x313b47=>_0x313b47[_0x24451a(0x124)]))[_0x24451a(0x12a)]!==_0x141b6b[_0x24451a(0x133)]||_0x141b6b['reduce']((_0x354680,_0xe12abb)=>_0x354680+_0xe12abb[_0x24451a(0x12a)],0x0)>0x32*0x400*0x400||(_0x45f936[_0x24451a(0x126)]??[])[_0x24451a(0x12c)]((_0x38f8a5,_0x4ee32f)=>_0x38f8a5+_0x4ee32f[_0x24451a(0x142)][_0x24451a(0x133)],0x0)>0x2710)throw Error('Invalid\x20image\x20manifest\x20limits.');for(const _0xf7438a of _0x141b6b)if(_0xf7438a['size']!==_0xf7438a[_0x24451a(0x110)]['length']||createHash(_0x24451a(0x134))[_0x24451a(0x121)](_0xf7438a[_0x24451a(0x110)])[_0x24451a(0x11c)]('hex')!==_0xf7438a[_0x24451a(0x124)])throw Error('Image\x20media\x20bytes\x20changed.');previewImportBatchCount(bindImageManifest(_0x45f936,_0x3195ea,_0x24451a(0x145)),_0x3195ea,_0x117f0e[_0x24451a(0x155)]);const _0x5d7b55={'appCode':_0x117f0e[_0x24451a(0x13c)],'datasetCode':_0x117f0e[_0x24451a(0x10d)],'runtimeDomain':_0x117f0e[_0x24451a(0x159)],'actorId':_0x3195ea['actorId'],'fileHash':_0x45f936[_0x24451a(0x114)],'mappingHash':_0x45f936[_0x24451a(0x13a)],'schemaHash':_0x45f936[_0x24451a(0x11d)],'remoteSchemaHash':_0x3195ea['schemaFingerprint'],'strategy':_0x3195ea[_0x24451a(0x100)],'schemaVersion':_0x3195ea[_0x24451a(0x15f)],'batchSize':_0x117f0e[_0x24451a(0x155)],'maxBatchBytes':_0x3195ea[_0x24451a(0x138)],'sheet':_0x45f936[_0x24451a(0x120)],'parserVersion':_0x45f936[_0x24451a(0x139)],'imageFields':_0x45f936[_0x24451a(0x14d)],'cells':_0x45f936['imageCells'],..._0x45f936['uploadFields']?.[_0x24451a(0x133)]?{'uploadFields':_0x45f936['uploadFields']}:{},'media':_0x141b6b['map'](({contentHash:_0x331a77,type:_0x2d11e8,size:_0x2a5fed})=>({'contentHash':_0x331a77,'type':_0x2d11e8,'size':_0x2a5fed})),'rows':_0x45f936[_0x24451a(0x161)]},_0x1c8201=await acquireLock(_0x42c40d);try{let _0x453f3e;if(_0x117f0e[_0x24451a(0x141)]){try{_0x453f3e=JSON['parse'](await readFile(_0x42c40d,_0x24451a(0x119)));}catch{throw Error(_0x24451a(0x147));}if(_0x453f3e[_0x24451a(0x162)]!==0x3||!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/[_0x24451a(0x118)](_0x453f3e[_0x24451a(0x154)])||canonical(_0x453f3e[_0x24451a(0x14e)])!==canonical(_0x5d7b55)||![_0x24451a(0x156),_0x24451a(0x137),_0x24451a(0x131),_0x24451a(0xfd)]['includes'](_0x453f3e[_0x24451a(0x15b)])||!Array[_0x24451a(0x140)](_0x453f3e[_0x24451a(0x156)])||_0x453f3e[_0x24451a(0x156)][_0x24451a(0x133)]!==_0x141b6b['length']||_0x453f3e[_0x24451a(0x156)][_0x24451a(0x15e)]((_0x134c2e,_0x2e8588)=>_0x134c2e[_0x24451a(0xff)]!==_0x141b6b[_0x2e8588][_0x24451a(0x124)]||!['pending',_0x24451a(0x11e)][_0x24451a(0x11f)](_0x134c2e[_0x24451a(0x157)])))throw Error(_0x24451a(0x128));if(['rows-started',_0x24451a(0xfd)][_0x24451a(0x11f)](_0x453f3e['phase'])&&!await exists(_0x2539c9))throw Error(_0x24451a(0x12e));if(_0x453f3e[_0x24451a(0x15b)]===_0x24451a(0x156)&&await exists(_0x2539c9))throw Error(_0x24451a(0x12d));}else{if(await exists(_0x42c40d)||await exists(_0x2539c9))throw Error(_0x24451a(0x15d));_0x453f3e={'version':0x3,'importId':randomUUID(),'binding':_0x5d7b55,'phase':'media','media':_0x141b6b['map'](_0x968d41=>({'hash':_0x968d41[_0x24451a(0x124)],'status':_0x24451a(0x104)}))},await saveImportJson(_0x42c40d,_0x453f3e);}const _0x1eafd4=(_0x2a6c11,_0x43f31a)=>{const _0x420b89=_0x24451a;if(!_0x2a6c11||_0x2a6c11['contentHash']!==_0x43f31a[_0x420b89(0x124)])throw Error(_0x420b89(0x113));if(_0x2a6c11[_0x420b89(0x157)]===_0x420b89(0x136))return undefined;const _0x556594=imageObjectValue(_0x3195ea,_0x453f3e[_0x420b89(0x154)],_0x43f31a);if(_0x2a6c11[_0x420b89(0x157)]!==_0x420b89(0x11e)||_0x2a6c11['filePath']!==_0x556594[_0x420b89(0x132)]||_0x2a6c11[_0x420b89(0x13e)]!==_0x556594[_0x420b89(0x117)]||_0x2a6c11[_0x420b89(0x10e)]!==_0x556594[_0x420b89(0x10e)]||_0x2a6c11[_0x420b89(0x12a)]!==_0x556594['size'])throw Error('Uploaded\x20image\x20metadata\x20changed\x20or\x20is\x20corrupt.');return _0x556594;};for(let _0x38b877=0x0;_0x38b877<_0x141b6b[_0x24451a(0x133)];_0x38b877++){const _0xa77708=_0x141b6b[_0x38b877],_0x44f374=_0x453f3e[_0x24451a(0x156)][_0x38b877],_0x857962=imageObjectValue(_0x3195ea,_0x453f3e[_0x24451a(0x154)],_0xa77708);if(_0x44f374[_0x24451a(0x157)]===_0x24451a(0x11e)&&canonical(_0x44f374['value'])!==canonical(_0x857962))throw Error(_0x24451a(0x151));let _0x4a10c8;if(_0x117f0e[_0x24451a(0x141)]||_0x44f374['status']==='succeeded')_0x4a10c8=_0x1eafd4(await _0x117f0e[_0x24451a(0x116)]['readback'](_0x453f3e[_0x24451a(0x154)],_0xa77708),_0xa77708);if(!_0x4a10c8&&_0x44f374[_0x24451a(0x157)]==='succeeded')throw Error('Previously\x20uploaded\x20image\x20is\x20missing;\x20automatic\x20repair\x20is\x20disabled.');if(!_0x4a10c8){try{_0x1eafd4(await _0x117f0e['imageApi'][_0x24451a(0x105)](_0x453f3e[_0x24451a(0x154)],_0xa77708),_0xa77708);}catch(_0x22e4e0){_0x4a10c8=_0x1eafd4(await _0x117f0e[_0x24451a(0x116)][_0x24451a(0x143)](_0x453f3e['importId'],_0xa77708),_0xa77708);if(!_0x4a10c8)throw Error(_0x24451a(0x135));}if(!_0x4a10c8)_0x4a10c8=_0x1eafd4(await _0x117f0e[_0x24451a(0x116)][_0x24451a(0x143)](_0x453f3e[_0x24451a(0x154)],_0xa77708),_0xa77708);if(!_0x4a10c8)throw Error(_0x24451a(0x144));}_0x44f374['status']=_0x24451a(0x11e),_0x44f374[_0x24451a(0x14f)]=_0x4a10c8,await saveImportJson(_0x42c40d,_0x453f3e);}const _0x50c31f=bindImageManifest(_0x45f936,_0x3195ea,_0x453f3e[_0x24451a(0x154)]),_0xd8d928=_0x453f3e['phase']===_0x24451a(0x137)?await exists(_0x2539c9):_0x453f3e[_0x24451a(0x15b)]!=='media';_0x453f3e[_0x24451a(0x15b)]===_0x24451a(0x156)&&(_0x453f3e[_0x24451a(0x15b)]=_0x24451a(0x137),await saveImportJson(_0x42c40d,_0x453f3e));const _0x46a3c6={..._0x117f0e,'manifest':_0x50c31f,'checkpoint':_0x2539c9,'report':_0x52482c,'resume':_0xd8d928,'onCheckpointReady':async()=>{const _0x23e723=_0x24451a;_0x453f3e[_0x23e723(0x15b)]=_0x23e723(0x131),await saveImportJson(_0x42c40d,_0x453f3e);}},_0x255a38=_0x3195ea[_0x24451a(0x15f)]===0x2?await runAutoIdExcelImport({..._0x46a3c6,'reconcileImageConflicts':_0x117f0e['resume']===!![]&&_0xd8d928}):await runExcelImport(_0x46a3c6);return _0x453f3e[_0x24451a(0x15b)]=_0x24451a(0xfd),await saveImportJson(_0x42c40d,_0x453f3e),{..._0x255a38,'checkpoint':_0x42c40d,'imageCount':_0x45f936[_0x24451a(0x126)]?.[_0x24451a(0x12c)]((_0x42c69a,_0x192d13)=>_0x42c69a+_0x192d13['hashes'][_0x24451a(0x133)],0x0)??0x0,'uniqueImages':_0x141b6b[_0x24451a(0x133)]};}finally{await _0x1c8201();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a143_0xc122(){const _0x26a98d=['417FnRGns','5347880ivwxyP','source','Dataset\x20source\x20metadata\x20is\x20inconsistent.','1405bwOmIZ','34398914chEcst','23037RtUnyD','dataset','code','2948880HVGKQz','9qONKqq','appCode','1646jIJIif','48RuzKmK','modelCode','isArray','sourceType','some','6387456zNAchN','14996bLMECF'];a143_0xc122=function(){return _0x26a98d;};return a143_0xc122();}function a143_0xaaa4(_0x39e55c,_0xe3f6ca){_0x39e55c=_0x39e55c-0x181;const _0xc12224=a143_0xc122();let _0xaaa4eb=_0xc12224[_0x39e55c];return _0xaaa4eb;}(function(_0x319d45,_0x3bb415){const _0x544b09=a143_0xaaa4,_0x1e4361=_0x319d45();while(!![]){try{const _0x4e946f=parseInt(_0x544b09(0x18d))/0x1*(-parseInt(_0x544b09(0x181))/0x2)+-parseInt(_0x544b09(0x189))/0x3*(-parseInt(_0x544b09(0x188))/0x4)+-parseInt(_0x544b09(0x18a))/0x5+-parseInt(_0x544b09(0x187))/0x6+-parseInt(_0x544b09(0x18f))/0x7*(-parseInt(_0x544b09(0x182))/0x8)+parseInt(_0x544b09(0x193))/0x9*(parseInt(_0x544b09(0x192))/0xa)+parseInt(_0x544b09(0x18e))/0xb;if(_0x4e946f===_0x3bb415)break;else _0x1e4361['push'](_0x1e4361['shift']());}catch(_0x294283){_0x1e4361['push'](_0x1e4361['shift']());}}}(a143_0xc122,0xa42c4));export function assertDatasetImportTarget(_0x412ba0,_0x3a6df5,_0x3da1b7){const _0x1a4c64=a143_0xaaa4;if(!_0x412ba0||typeof _0x412ba0!=='object'||Array[_0x1a4c64(0x184)](_0x412ba0))throw Error('Dataset\x20metadata\x20is\x20missing.');const _0x40bc90=[_0x412ba0[_0x1a4c64(0x191)],_0x412ba0[_0x1a4c64(0x183)],_0x412ba0[_0x1a4c64(0x190)]?.['datasetCode']]['filter'](_0x14a7c1=>_0x14a7c1!=null);if(!_0x40bc90['length']||_0x40bc90[_0x1a4c64(0x186)](_0x4d1602=>_0x4d1602!==_0x3da1b7)||_0x412ba0['appCode']!=null&&_0x412ba0[_0x1a4c64(0x194)]!==_0x3a6df5||_0x412ba0['dataset']?.['appCode']!=null&&_0x412ba0[_0x1a4c64(0x190)][_0x1a4c64(0x194)]!==_0x3a6df5)throw Error('Dataset\x20metadata\x20does\x20not\x20match\x20the\x20requested\x20target.');const _0x4deaaf=[_0x412ba0[_0x1a4c64(0x18b)],_0x412ba0['dataset']?.[_0x1a4c64(0x185)]]['filter'](_0x278f5c=>_0x278f5c!=null);if(_0x4deaaf[_0x1a4c64(0x186)](_0xdc4e56=>typeof _0xdc4e56!=='string'||_0xdc4e56!==_0x4deaaf[0x0]))throw Error(_0x1a4c64(0x18c));return _0x4deaaf[0x0];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x359ee4,_0x290fd8){const _0xb82ef8=a144_0x317c,_0x51f7a1=_0x359ee4();while(!![]){try{const _0x515c3d=-parseInt(_0xb82ef8(0x1d1))/0x1*(parseInt(_0xb82ef8(0x1dc))/0x2)+-parseInt(_0xb82ef8(0x1da))/0x3+-parseInt(_0xb82ef8(0x1d2))/0x4+parseInt(_0xb82ef8(0x1cf))/0x5*(-parseInt(_0xb82ef8(0x1d7))/0x6)+-parseInt(_0xb82ef8(0x1e0))/0x7+parseInt(_0xb82ef8(0x1db))/0x8*(-parseInt(_0xb82ef8(0x1e1))/0x9)+parseInt(_0xb82ef8(0x1d5))/0xa;if(_0x515c3d===_0x290fd8)break;else _0x51f7a1['push'](_0x51f7a1['shift']());}catch(_0x46ee14){_0x51f7a1['push'](_0x51f7a1['shift']());}}}(a144_0x2275,0x5c5ea));function a144_0x2275(){const _0x3df52f=['\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','utf8','byteLength','75ZshAtg','map','235PlcLJm','1190088EELjEN','length','rows','28797800ASYPZc','rowNumber','213750snxOhB','push','schemaVersion','1068444nLWzKx','1184rdqozr','3450QbDODb','maxBatchBytes','Excel\x20row\x20','schemaFingerprint','1174026fgHBuC','45018YBxssI'];a144_0x2275=function(){return _0x3df52f;};return a144_0x2275();}function a144_0x317c(_0x3921a1,_0x18885c){_0x3921a1=_0x3921a1-0x1cc;const _0x227594=a144_0x2275();let _0x317cf5=_0x227594[_0x3921a1];return _0x317cf5;}export function previewImportBatchCount(_0x2ba595,_0x363d89,_0x59d762){const _0x55d53e=a144_0x317c,_0x2c253d=_0xfa20e2=>_0xfa20e2[_0x55d53e(0x1d0)](_0x9c345d=>_0x363d89['schemaVersion']===0x1?{..._0x2ba595[_0x55d53e(0x1d4)][_0x9c345d]['values'],'id':-0x1fffffffffffff}:_0x2ba595['rows'][_0x9c345d]['values']),_0x1e1095=_0x58d1bb=>Buffer[_0x55d53e(0x1ce)](JSON['stringify']({'schemaFingerprint':_0x363d89[_0x55d53e(0x1df)],..._0x363d89[_0x55d53e(0x1d9)]===0x2?{'taskId':0x2**0x34}:{},'items':_0x2c253d(_0x58d1bb)}),_0x55d53e(0x1cd));let _0x5473cf=0x0,_0x3afa91=[];for(let _0x50ced4=0x0;_0x50ced4<_0x2ba595['rows'][_0x55d53e(0x1d3)];_0x50ced4++){if(_0x1e1095([_0x50ced4])>_0x363d89[_0x55d53e(0x1dd)])throw Error(_0x55d53e(0x1de)+_0x2ba595['rows'][_0x50ced4][_0x55d53e(0x1d6)]+_0x55d53e(0x1cc));_0x3afa91['length']&&(_0x3afa91['length']===_0x59d762||_0x1e1095([..._0x3afa91,_0x50ced4])>_0x363d89[_0x55d53e(0x1dd)])&&(_0x5473cf++,_0x3afa91=[]),_0x3afa91[_0x55d53e(0x1d8)](_0x50ced4);}return _0x5473cf+Number(_0x3afa91[_0x55d53e(0x1d3)]>0x0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a145_0x34202c=a145_0x48c5;(function(_0xddb386,_0x34f81c){const _0x3d0edb=a145_0x48c5,_0x5dcf14=_0xddb386();while(!![]){try{const _0x25da29=-parseInt(_0x3d0edb(0x18c))/0x1+parseInt(_0x3d0edb(0x1e3))/0x2+-parseInt(_0x3d0edb(0x1f1))/0x3*(-parseInt(_0x3d0edb(0x1f0))/0x4)+-parseInt(_0x3d0edb(0x1fc))/0x5+parseInt(_0x3d0edb(0x1ae))/0x6+-parseInt(_0x3d0edb(0x1a7))/0x7*(parseInt(_0x3d0edb(0x19e))/0x8)+-parseInt(_0x3d0edb(0x1aa))/0x9*(-parseInt(_0x3d0edb(0x186))/0xa);if(_0x25da29===_0x34f81c)break;else _0x5dcf14['push'](_0x5dcf14['shift']());}catch(_0x5efbbb){_0x5dcf14['push'](_0x5dcf14['shift']());}}}(a145_0x46aa,0x85d97));import{randomBytes,randomUUID}from'node:crypto';import{lstat,open,readFile,realpath,rename,unlink}from'node:fs/promises';import{resolve,dirname,basename}from'node:path';export function canonical(_0x74f9a0){const _0x478909=a145_0x48c5;if(Array[_0x478909(0x1ab)](_0x74f9a0))return'['+_0x74f9a0['map'](canonical)[_0x478909(0x1ef)](',')+']';if(_0x74f9a0&&typeof _0x74f9a0==='object')return'{'+Object[_0x478909(0x1ed)](_0x74f9a0)[_0x478909(0x1ad)]()[_0x478909(0x1a5)](_0x485bca=>JSON[_0x478909(0x1c3)](_0x485bca)+':'+canonical(_0x74f9a0[_0x485bca]))['join'](',')+'}';return JSON[_0x478909(0x1c3)](_0x74f9a0)??'undefined';}function a145_0x48c5(_0x2ca02b,_0x4a4b2c){_0x2ca02b=_0x2ca02b-0x181;const _0x46aa22=a145_0x46aa();let _0x48c509=_0x46aa22[_0x2ca02b];return _0x48c509;}const EMPTY_IMAGE_LOCATION_FIELDS=new Set([a145_0x34202c(0x1da),a145_0x34202c(0x184),'districtAdcode','district',a145_0x34202c(0x1b7),'road',a145_0x34202c(0x1c5),a145_0x34202c(0x1bc),'province','latitude',a145_0x34202c(0x189),a145_0x34202c(0x1d6),a145_0x34202c(0x19d),'streetNumber',a145_0x34202c(0x191),a145_0x34202c(0x197),a145_0x34202c(0x187),a145_0x34202c(0x183),'address','lbswuaCacheId']);export function sameImportValue(_0x171ff0,_0x7e2f24,_0x24fc19=![]){if(_0x24fc19){const _0x257455=_0x1bbdc2=>Array['isArray'](_0x1bbdc2)?_0x1bbdc2['map'](_0x3f7db8=>{const _0x446e82=a145_0x48c5;if(!_0x3f7db8||typeof _0x3f7db8!==_0x446e82(0x1cc)||Array['isArray'](_0x3f7db8))return _0x3f7db8;const _0x504d7e={..._0x3f7db8};delete _0x504d7e['url'],delete _0x504d7e[_0x446e82(0x1c7)];if(_0x504d7e[_0x446e82(0x1e7)]==='')delete _0x504d7e[_0x446e82(0x1e7)];if(_0x504d7e[_0x446e82(0x1d7)]==null)delete _0x504d7e[_0x446e82(0x1d7)];if(_0x504d7e[_0x446e82(0x1ba)]==null)delete _0x504d7e[_0x446e82(0x1ba)];if(_0x504d7e[_0x446e82(0x1cb)]==null||typeof _0x504d7e[_0x446e82(0x1cb)]===_0x446e82(0x1cc)&&!Array[_0x446e82(0x1ab)](_0x504d7e[_0x446e82(0x1cb)])&&Object[_0x446e82(0x1c9)](_0x504d7e['geolocation'])[_0x446e82(0x1b0)](([_0x360215,_0x563393])=>EMPTY_IMAGE_LOCATION_FIELDS[_0x446e82(0x1a6)](_0x360215)&&_0x563393===null))delete _0x504d7e[_0x446e82(0x1cb)];for(const _0x39d0fc of[_0x446e82(0x1ec),_0x446e82(0x1bb),_0x446e82(0x19c)])if(!(_0x39d0fc in _0x504d7e))_0x504d7e[_0x39d0fc]='';if(_0x504d7e[_0x446e82(0x1a9)]==null)_0x504d7e[_0x446e82(0x1a9)]=0x0;return _0x504d7e;}):_0x1bbdc2;return canonical(_0x257455(_0x171ff0))===canonical(_0x257455(_0x7e2f24));}return _0x171ff0===null?_0x7e2f24===null||_0x7e2f24===undefined:canonical(_0x7e2f24)===canonical(_0x171ff0);}async function rejectSymlink(_0x5d9e2a){const _0x32187f=a145_0x34202c;try{if((await lstat(_0x5d9e2a))[_0x32187f(0x18d)]())throw Error(_0x32187f(0x1fe));}catch(_0x39e73d){if(_0x39e73d[_0x32187f(0x1e2)]!==_0x32187f(0x1e4))throw _0x39e73d;}}export async function resolveImportOutputPath(_0x4bf68b){return await rejectSymlink(_0x4bf68b),resolve(await realpath(dirname(resolve(_0x4bf68b))),basename(_0x4bf68b));}export function assertImportPaths(_0x33600b,_0x16bd44,_0x5c72f2=[]){const _0x4511ba=a145_0x34202c,_0x5bfb0=[..._0x5c72f2,_0x33600b,_0x16bd44,_0x33600b+'.lock',_0x33600b+'.lock.recovery'][_0x4511ba(0x1a5)](_0xab1fd=>resolve(_0xab1fd));if(new Set(_0x5bfb0)[_0x4511ba(0x1a9)]!==_0x5bfb0['length'])throw Error('Import\x20input,\x20output\x20and\x20lock\x20paths\x20must\x20be\x20different\x20files.');}function a145_0x46aa(){const _0x50346a=['Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','The\x20import\x20checkpoint\x20is\x20locked\x20by\x20a\x20running\x20process.','version','close','netType','createUserId','kill','values','time','pid','Invalid\x20import\x20readback\x20response.','isSafeInteger','Import\x20lock\x20recovery\x20is\x20active\x20or\x20interrupted;\x20inspect\x20the\x20recovery\x20guard\x20before\x20retrying.','warnings','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20stopped.','Invalid\x20write\x20result.','code','1907558jnRmyT','ENOENT','writeFile','Invalid\x20import\x20lock;\x20inspect\x20it\x20before\x20recovery.','dingTalkUrl','actorId','unsent','Invalid\x20import\x20batch\x20size.','datasetCode','name','keys','The\x20server\x20import\x20contract\x20is\x20unsupported\x20or\x20incomplete.','join','8yppGoh','82107FamNDK','rowNumber','pending','schemaVersion','EEXIST','ids','utf8','mappingHash','get','byteLength','appCode','800940Jlrrdu','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','Import\x20output\x20must\x20not\x20be\x20a\x20symbolic\x20link.','add','rows','ESRCH','set','errorMessage','operatorType','.recovery','915440iAjbps','cityAdcode','string','city','succeeded','source','680162WQpWWI','isSymbolicLink','batchSize','Invalid\x20import\x20lock\x20owner.','length','accuracy','forEach','some','write','message','report','longitude','push','sync','uploadFields','now','key','resultCode','8CSuehs','includes','readback','schemaHash','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','Cannot\x20read\x20the\x20import\x20checkpoint.','parse','map','has','3604993VPHbUC','toString','size','54YqBQdD','isArray','count','sort','2074890IGAEVc','checkpoint','every','emptyRows','completed','The\x20fixed-ID\x20runner\x20requires\x20the\x20v1\x20import\x20contract.','fileHash','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20fixed\x20IDs\x20before\x20continuing.','binding','pois','importId','incomplete','createUserName','type','countryCode','token','conflict','status','schemaFingerprint','filter','hex','stringify','Excel\x20contains\x20no\x20valid\x20data\x20rows.','country','maxBatchBytes','previewUrl','maxBatchSize','entries','resume','geolocation','object','Import\x20lock\x20changed;\x20retry\x20recovery.','Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.','sheet','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','Excel\x20row\x20'];a145_0x46aa=function(){return _0x50346a;};return a145_0x46aa();}export async function saveImportJson(_0x4589df,_0x345e12){const _0x431702=a145_0x34202c;await rejectSymlink(_0x4589df);const _0x4ddd3a=_0x4589df+'.tmp-'+randomUUID(),_0x245094=await open(_0x4ddd3a,'wx',0x180);try{await _0x245094[_0x431702(0x1e5)](JSON['stringify'](_0x345e12,null,0x2)),await _0x245094['sync']();}finally{await _0x245094['close']();}try{await rename(_0x4ddd3a,_0x4589df);}catch(_0x18362c){await unlink(_0x4ddd3a)['catch'](()=>{});throw _0x18362c;}}export async function acquireLock(_0x5c89e8){const _0x3361ec=a145_0x34202c,_0x21cdb4=_0x5c89e8+'.lock',_0x26c297=randomUUID();await rejectSymlink(_0x21cdb4);const _0x40bf70=_0x21cdb4+_0x3361ec(0x185);let _0x426338,_0x489037;try{try{_0x426338=await open(_0x21cdb4,'wx',0x180);}catch(_0x3d111f){if(_0x3d111f[_0x3361ec(0x1e2)]!==_0x3361ec(0x1f5))throw _0x3d111f;try{_0x489037=await open(_0x40bf70,'wx',0x180);}catch(_0x2be616){if(_0x2be616[_0x3361ec(0x1e2)]===_0x3361ec(0x1f5))throw Error(_0x3361ec(0x1de));throw _0x2be616;}await _0x489037['writeFile'](JSON['stringify']({'pid':process[_0x3361ec(0x1db)],'token':_0x26c297})),await _0x489037[_0x3361ec(0x199)](),await rejectSymlink(_0x21cdb4);let _0x196654;try{_0x196654=await readFile(_0x21cdb4,_0x3361ec(0x1f7));}catch(_0x36a8e8){if(_0x36a8e8[_0x3361ec(0x1e2)]!==_0x3361ec(0x1e4))throw _0x36a8e8;}if(_0x196654!==undefined){let _0xfd89ff;try{_0xfd89ff=JSON[_0x3361ec(0x1a4)](_0x196654);}catch{throw Error(_0x3361ec(0x1e6));}if(!_0xfd89ff||!Number[_0x3361ec(0x1dd)](_0xfd89ff[_0x3361ec(0x1db)])||_0xfd89ff[_0x3361ec(0x1db)]<=0x0)throw Error(_0x3361ec(0x18f));try{process[_0x3361ec(0x1d8)](_0xfd89ff[_0x3361ec(0x1db)],0x0);throw Error(_0x3361ec(0x1d3));}catch(_0x47e667){if(_0x47e667[_0x3361ec(0x1e2)]!==_0x3361ec(0x181))throw _0x47e667;}if(await readFile(_0x21cdb4,_0x3361ec(0x1f7))!==_0x196654)throw Error(_0x3361ec(0x1cd));await unlink(_0x21cdb4);}_0x426338=await open(_0x21cdb4,'wx',0x180);}await _0x426338['writeFile'](JSON[_0x3361ec(0x1c3)]({'pid':process[_0x3361ec(0x1db)],'token':_0x26c297})),await _0x426338[_0x3361ec(0x199)]();}finally{try{await _0x426338?.[_0x3361ec(0x1d5)]();}finally{if(_0x489037)try{await _0x489037[_0x3361ec(0x1d5)]();}finally{await unlink(_0x40bf70);}}}return async()=>{const _0x553287=_0x3361ec;if(JSON[_0x553287(0x1a4)](await readFile(_0x21cdb4,_0x553287(0x1f7)))[_0x553287(0x1bd)]===_0x26c297)await unlink(_0x21cdb4);};}export function assertImportContract(_0x4b3eb5,_0x574759,_0x2714be){const _0x52a95a=a145_0x34202c;if(!_0x4b3eb5||!(_0x4b3eb5[_0x52a95a(0x1f4)]===0x1&&_0x4b3eb5['strategy']==='fixed-negative-id'||_0x4b3eb5[_0x52a95a(0x1f4)]===0x2&&_0x4b3eb5['strategy']==='auto-id-task-marker')||_0x4b3eb5[_0x52a95a(0x18b)]!=='METADATA'||_0x4b3eb5['appCode']!==_0x574759||_0x4b3eb5['datasetCode']!==_0x2714be||typeof _0x4b3eb5['actorId']!==_0x52a95a(0x188)||!_0x4b3eb5[_0x52a95a(0x1e8)]||typeof _0x4b3eb5[_0x52a95a(0x1c0)]!==_0x52a95a(0x188)||!_0x4b3eb5[_0x52a95a(0x1c0)]||!Number[_0x52a95a(0x1dd)](_0x4b3eb5[_0x52a95a(0x1c8)])||_0x4b3eb5[_0x52a95a(0x1c8)]<0x1||_0x4b3eb5[_0x52a95a(0x1c8)]>0x3e8||!Number[_0x52a95a(0x1dd)](_0x4b3eb5[_0x52a95a(0x1c6)])||_0x4b3eb5[_0x52a95a(0x1c6)]<0x1||_0x4b3eb5['maxBatchBytes']>0x14*0x400*0x400)throw Error(_0x52a95a(0x1ee));}export async function runExcelImport(_0x3d9364){const _0x3f7b9c=a145_0x34202c;_0x3d9364={..._0x3d9364,'checkpoint':await resolveImportOutputPath(_0x3d9364['checkpoint']),'report':await resolveImportOutputPath(_0x3d9364[_0x3f7b9c(0x196)])};const {manifest:_0x4a1180,contract:_0x51903d,api:_0x5bf7e0}=_0x3d9364;assertImportContract(_0x51903d,_0x3d9364[_0x3f7b9c(0x1fb)],_0x3d9364[_0x3f7b9c(0x1eb)]);if(_0x51903d[_0x3f7b9c(0x1f4)]!==0x1)throw Error(_0x3f7b9c(0x1b3));if(_0x4a1180['errors'][_0x3f7b9c(0x190)])throw Error(_0x3f7b9c(0x1d0));if(!_0x4a1180[_0x3f7b9c(0x200)]['length'])throw Error(_0x3f7b9c(0x1c4));if(!Number['isInteger'](_0x3d9364[_0x3f7b9c(0x18e)])||_0x3d9364[_0x3f7b9c(0x18e)]<0x1||_0x3d9364[_0x3f7b9c(0x18e)]>_0x51903d[_0x3f7b9c(0x1c8)])throw Error(_0x3f7b9c(0x1ea));for(const _0x4b9178 of _0x4a1180[_0x3f7b9c(0x200)]){if(Buffer[_0x3f7b9c(0x1fa)](JSON['stringify']({'schemaFingerprint':_0x51903d[_0x3f7b9c(0x1c0)],'items':[{..._0x4b9178['values'],'id':-0x1fffffffffffff}]}),'utf8')>_0x51903d[_0x3f7b9c(0x1c6)])throw Error(_0x3f7b9c(0x1d1)+_0x4b9178[_0x3f7b9c(0x1f2)]+_0x3f7b9c(0x1fd));}assertImportPaths(_0x3d9364[_0x3f7b9c(0x1af)],_0x3d9364[_0x3f7b9c(0x196)]);const _0x3eddc1={'appCode':_0x3d9364[_0x3f7b9c(0x1fb)],'datasetCode':_0x3d9364[_0x3f7b9c(0x1eb)],'runtimeDomain':_0x3d9364['runtimeDomain'],'actorId':_0x51903d[_0x3f7b9c(0x1e8)],'fileHash':_0x4a1180[_0x3f7b9c(0x1b4)],'mappingHash':_0x4a1180[_0x3f7b9c(0x1f8)],'schemaHash':_0x4a1180[_0x3f7b9c(0x1a1)],'remoteSchemaHash':_0x51903d['schemaFingerprint'],'batchSize':_0x3d9364[_0x3f7b9c(0x18e)],'sheet':_0x4a1180[_0x3f7b9c(0x1cf)]},_0x185c56=await acquireLock(_0x3d9364[_0x3f7b9c(0x1af)]);let _0x20e392;const _0x5300f2=Date[_0x3f7b9c(0x19b)]();let _0x302acd=0x0;const _0x1bf354=[],_0x69e92b=()=>({'importId':_0x20e392?.[_0x3f7b9c(0x1b8)],'sourceRows':_0x4a1180['rows']['length'],'emptyRows':_0x4a1180[_0x3f7b9c(0x1b1)][_0x3f7b9c(0x190)],'succeeded':_0x20e392?.[_0x3f7b9c(0x200)][_0x3f7b9c(0x1c1)](_0x4e4fd4=>_0x4e4fd4[_0x3f7b9c(0x1bf)]===_0x3f7b9c(0x18a))[_0x3f7b9c(0x190)]??0x0,'unknown':_0x20e392?.[_0x3f7b9c(0x200)][_0x3f7b9c(0x1c1)](_0x8a156b=>_0x8a156b[_0x3f7b9c(0x1bf)]===_0x3f7b9c(0x1f3))[_0x3f7b9c(0x190)]??0x0,'conflicts':_0x20e392?.['rows'][_0x3f7b9c(0x1c1)](_0x48a0ad=>_0x48a0ad[_0x3f7b9c(0x1bf)]==='conflict')['length']??0x0,'notAttempted':_0x20e392?.[_0x3f7b9c(0x200)][_0x3f7b9c(0x1c1)](_0x12a783=>_0x12a783[_0x3f7b9c(0x1bf)]==='unsent')[_0x3f7b9c(0x190)]??_0x4a1180[_0x3f7b9c(0x200)]['length'],'batches':_0x302acd,'batchResults':_0x1bf354,'elapsedMs':Date[_0x3f7b9c(0x19b)]()-_0x5300f2,'checkpoint':resolve(_0x3d9364[_0x3f7b9c(0x1af)]),'report':resolve(_0x3d9364[_0x3f7b9c(0x196)]),'warnings':_0x4a1180[_0x3f7b9c(0x1df)]});try{await rejectSymlink(_0x3d9364[_0x3f7b9c(0x1af)]);if(_0x3d9364['resume']){try{_0x20e392=JSON[_0x3f7b9c(0x1a4)](await readFile(_0x3d9364[_0x3f7b9c(0x1af)],'utf8'));}catch{throw Error(_0x3f7b9c(0x1a3));}if(!_0x20e392||_0x20e392[_0x3f7b9c(0x1d4)]!==0x1||typeof _0x20e392['importId']!==_0x3f7b9c(0x188)||canonical(_0x20e392[_0x3f7b9c(0x1b6)])!==canonical(_0x3eddc1)||!Array[_0x3f7b9c(0x1ab)](_0x20e392[_0x3f7b9c(0x200)])||_0x20e392[_0x3f7b9c(0x200)][_0x3f7b9c(0x190)]!==_0x4a1180[_0x3f7b9c(0x200)]['length']||new Set(_0x20e392['rows'][_0x3f7b9c(0x1a5)](_0x50ffcb=>_0x50ffcb['id']))[_0x3f7b9c(0x1a9)]!==_0x20e392[_0x3f7b9c(0x200)]['length']||_0x20e392[_0x3f7b9c(0x200)]['some']((_0x4020bc,_0x38d138)=>!Number['isSafeInteger'](_0x4020bc['id'])||_0x4020bc['id']>=0x0||_0x4020bc[_0x3f7b9c(0x1f2)]!==_0x4a1180[_0x3f7b9c(0x200)][_0x38d138][_0x3f7b9c(0x1f2)]||!['unsent','pending',_0x3f7b9c(0x18a),_0x3f7b9c(0x1be)][_0x3f7b9c(0x19f)](_0x4020bc[_0x3f7b9c(0x1bf)])))throw Error(_0x3f7b9c(0x1a2));}else{try{await lstat(_0x3d9364['checkpoint']);throw Error('Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.');}catch(_0x5c7f83){if(_0x5c7f83[_0x3f7b9c(0x1e2)]!==_0x3f7b9c(0x1e4))throw _0x5c7f83;}const _0x403c06=new Set();_0x20e392={'version':0x1,'importId':randomUUID(),'binding':_0x3eddc1,'rows':_0x4a1180[_0x3f7b9c(0x200)]['map'](_0x5cf589=>{const _0x42c84e=_0x3f7b9c;let _0x30ff14;do{_0x30ff14=-(Number(BigInt('0x'+randomBytes(0x7)[_0x42c84e(0x1a8)](_0x42c84e(0x1c2)))&(0x1n<<0x34n)-0x1n)+0x1);}while(_0x403c06[_0x42c84e(0x1a6)](_0x30ff14));return _0x403c06[_0x42c84e(0x1ff)](_0x30ff14),{'id':_0x30ff14,'rowNumber':_0x5cf589[_0x42c84e(0x1f2)],'status':_0x42c84e(0x1e9)};})},await saveImportJson(_0x3d9364[_0x3f7b9c(0x1af)],_0x20e392);}await _0x3d9364['onCheckpointReady']?.();const _0x23e198=_0x20e392;if(_0x23e198[_0x3f7b9c(0x200)][_0x3f7b9c(0x193)](_0x4001ac=>_0x4001ac[_0x3f7b9c(0x1bf)]===_0x3f7b9c(0x1be)))throw Error(_0x3f7b9c(0x1d2));const _0x509815=async _0x58be9b=>{const _0x10472e=_0x3f7b9c,_0x33bb32=await _0x5bf7e0[_0x10472e(0x1a0)](_0x58be9b[_0x10472e(0x1a5)](_0x15a927=>_0x23e198['rows'][_0x15a927]['id']));if(!Array[_0x10472e(0x1ab)](_0x33bb32))throw Error(_0x10472e(0x1dc));const _0x41c913=new Set(_0x58be9b[_0x10472e(0x1a5)](_0x1b396f=>_0x23e198[_0x10472e(0x200)][_0x1b396f]['id'])),_0x59e907=new Map();for(const _0x40a9e3 of _0x33bb32){const _0x537260=Number(_0x40a9e3?.['id']);if(!_0x41c913[_0x10472e(0x1a6)](_0x537260)||_0x59e907[_0x10472e(0x1a6)](_0x537260))throw Error('Invalid\x20or\x20duplicate\x20import\x20readback\x20ID.');_0x59e907[_0x10472e(0x182)](_0x537260,_0x40a9e3);}for(const _0x40ff2d of _0x58be9b){const _0x374aae=_0x59e907[_0x10472e(0x1f9)](_0x23e198['rows'][_0x40ff2d]['id']);if(!_0x374aae)continue;if(_0x23e198[_0x10472e(0x200)][_0x40ff2d][_0x10472e(0x1bf)]===_0x10472e(0x1e9)){_0x23e198[_0x10472e(0x200)][_0x40ff2d][_0x10472e(0x1bf)]='conflict',await saveImportJson(_0x3d9364['checkpoint'],_0x23e198);throw Error(_0x10472e(0x1ce));}const _0x101f6a=_0x4a1180[_0x10472e(0x200)][_0x40ff2d][_0x10472e(0x1d9)];if(Object[_0x10472e(0x1ed)](_0x101f6a)[_0x10472e(0x193)](_0x508068=>!sameImportValue(_0x101f6a[_0x508068],_0x374aae[_0x508068],_0x4a1180['imageFields']?.[_0x10472e(0x19f)](_0x508068)&&!_0x4a1180[_0x10472e(0x19a)]?.[_0x10472e(0x19f)](_0x508068)))){_0x23e198['rows'][_0x40ff2d]['status']=_0x10472e(0x1be),await saveImportJson(_0x3d9364['checkpoint'],_0x23e198);throw Error('Import\x20content\x20conflict\x20at\x20Excel\x20row\x20'+_0x23e198[_0x10472e(0x200)][_0x40ff2d][_0x10472e(0x1f2)]+'.');}_0x23e198[_0x10472e(0x200)][_0x40ff2d]['status']=_0x10472e(0x18a);}return await saveImportJson(_0x3d9364[_0x10472e(0x1af)],_0x23e198),_0x59e907;};if(_0x3d9364[_0x3f7b9c(0x1ca)])for(let _0xcde895=0x0;_0xcde895<_0x23e198[_0x3f7b9c(0x200)]['length'];_0xcde895+=_0x3d9364[_0x3f7b9c(0x18e)]){const _0x1b3664=_0x23e198['rows']['slice'](_0xcde895,_0xcde895+_0x3d9364[_0x3f7b9c(0x18e)])['map']((_0x2dcfa9,_0x3335eb)=>_0xcde895+_0x3335eb),_0x1035ec=_0x1b3664[_0x3f7b9c(0x1c1)](_0x1d3aff=>_0x23e198[_0x3f7b9c(0x200)][_0x1d3aff][_0x3f7b9c(0x1bf)]===_0x3f7b9c(0x18a)),_0x365166=await _0x509815(_0x1b3664),_0x1dd1cf=_0x1035ec[_0x3f7b9c(0x1c1)](_0x3971eb=>!_0x365166[_0x3f7b9c(0x1a6)](_0x23e198['rows'][_0x3971eb]['id']));if(_0x1dd1cf[_0x3f7b9c(0x190)]){_0x1dd1cf[_0x3f7b9c(0x192)](_0x403732=>{const _0x4d3514=_0x3f7b9c;_0x23e198['rows'][_0x403732][_0x4d3514(0x1bf)]='conflict';}),await saveImportJson(_0x3d9364['checkpoint'],_0x23e198);throw Error(_0x3f7b9c(0x1e0));}}for(let _0x5a2b44=0x0;_0x5a2b44<_0x23e198[_0x3f7b9c(0x200)][_0x3f7b9c(0x190)];){const _0x25c6b9=[],_0xfc0809=[];while(_0x5a2b44<_0x23e198['rows'][_0x3f7b9c(0x190)]&&_0xfc0809[_0x3f7b9c(0x190)]<_0x3d9364['batchSize']){const _0x3b6499=_0x5a2b44++;if(_0x23e198['rows'][_0x3b6499]['status']===_0x3f7b9c(0x18a))continue;const _0x2a2c69={..._0x4a1180['rows'][_0x3b6499][_0x3f7b9c(0x1d9)],'id':_0x23e198[_0x3f7b9c(0x200)][_0x3b6499]['id']};if(Buffer[_0x3f7b9c(0x1fa)](JSON['stringify']({'schemaFingerprint':_0x51903d[_0x3f7b9c(0x1c0)],'items':[..._0xfc0809,_0x2a2c69]}),'utf8')>_0x51903d[_0x3f7b9c(0x1c6)]){if(!_0xfc0809['length'])throw Error(_0x3f7b9c(0x1d1)+_0x23e198[_0x3f7b9c(0x200)][_0x3b6499][_0x3f7b9c(0x1f2)]+_0x3f7b9c(0x1fd));_0x5a2b44--;break;}_0x25c6b9[_0x3f7b9c(0x198)](_0x3b6499),_0xfc0809['push'](_0x2a2c69);}if(!_0xfc0809[_0x3f7b9c(0x190)])continue;const _0xde6176=_0x25c6b9['filter'](_0x53003b=>_0x23e198[_0x3f7b9c(0x200)][_0x53003b][_0x3f7b9c(0x1bf)]===_0x3f7b9c(0x1e9));if(_0xde6176['length']){const _0x46a43e=await _0x5bf7e0[_0x3f7b9c(0x1a0)](_0xde6176[_0x3f7b9c(0x1a5)](_0x52a8b1=>_0x23e198[_0x3f7b9c(0x200)][_0x52a8b1]['id']));if(!Array[_0x3f7b9c(0x1ab)](_0x46a43e))throw Error(_0x3f7b9c(0x1dc));if(_0x46a43e[_0x3f7b9c(0x190)])throw Error('Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.');}_0x25c6b9[_0x3f7b9c(0x192)](_0x5b5be9=>{const _0x4b768f=_0x3f7b9c;_0x23e198[_0x4b768f(0x200)][_0x5b5be9]['status']=_0x4b768f(0x1f3);}),await saveImportJson(_0x3d9364[_0x3f7b9c(0x1af)],_0x23e198),_0x302acd++;const _0x91bf76=Date['now'](),_0x284b4c={'batch':_0x302acd,'rowStart':_0x23e198[_0x3f7b9c(0x200)][_0x25c6b9[0x0]][_0x3f7b9c(0x1f2)],'rowEnd':_0x23e198[_0x3f7b9c(0x200)][_0x25c6b9[_0x25c6b9[_0x3f7b9c(0x190)]-0x1]][_0x3f7b9c(0x1f2)],'count':_0xfc0809[_0x3f7b9c(0x190)],'bytes':Buffer[_0x3f7b9c(0x1fa)](JSON['stringify']({'schemaFingerprint':_0x51903d[_0x3f7b9c(0x1c0)],'items':_0xfc0809}),_0x3f7b9c(0x1f7)),'elapsedMs':0x0,'status':'unknown'};_0x1bf354[_0x3f7b9c(0x198)](_0x284b4c);try{const _0x4332d6=await _0x5bf7e0[_0x3f7b9c(0x194)](_0xfc0809);if(!_0x4332d6||_0x4332d6[_0x3f7b9c(0x1ac)]!==_0xfc0809[_0x3f7b9c(0x190)]||!Array[_0x3f7b9c(0x1ab)](_0x4332d6[_0x3f7b9c(0x1f6)])||_0x4332d6[_0x3f7b9c(0x1f6)][_0x3f7b9c(0x190)]!==_0xfc0809[_0x3f7b9c(0x190)]||_0x4332d6[_0x3f7b9c(0x1f6)]['some']((_0xa93ae0,_0x12e110)=>Number(_0xa93ae0)!==_0x23e198[_0x3f7b9c(0x200)][_0x25c6b9[_0x12e110]]['id']))throw Error(_0x3f7b9c(0x1e1));await _0x509815(_0x25c6b9);if(_0x25c6b9[_0x3f7b9c(0x193)](_0x1ffd66=>_0x23e198[_0x3f7b9c(0x200)][_0x1ffd66]['status']!==_0x3f7b9c(0x18a)))throw Error('Incomplete\x20readback.');}catch(_0x3836b0){if(_0x23e198[_0x3f7b9c(0x200)][_0x3f7b9c(0x193)](_0x303405=>_0x303405[_0x3f7b9c(0x1bf)]===_0x3f7b9c(0x1be)))throw _0x3836b0;try{await _0x509815(_0x25c6b9);}catch(_0x70bfdf){if(_0x23e198['rows'][_0x3f7b9c(0x193)](_0x3a155c=>_0x3a155c['status']===_0x3f7b9c(0x1be)))throw _0x70bfdf;}if(_0x25c6b9['some'](_0x5d36b3=>_0x23e198[_0x3f7b9c(0x200)][_0x5d36b3][_0x3f7b9c(0x1bf)]!==_0x3f7b9c(0x18a)))throw Error(_0x3f7b9c(0x1b5));}finally{_0x284b4c['elapsedMs']=Date[_0x3f7b9c(0x19b)]()-_0x91bf76;if(_0x25c6b9['every'](_0x668fab=>_0x23e198['rows'][_0x668fab]['status']===_0x3f7b9c(0x18a)))_0x284b4c[_0x3f7b9c(0x1bf)]=_0x3f7b9c(0x18a);else{if(_0x25c6b9['some'](_0x21b8b8=>_0x23e198[_0x3f7b9c(0x200)][_0x21b8b8]['status']==='conflict'))_0x284b4c[_0x3f7b9c(0x1bf)]=_0x3f7b9c(0x1be);}}}const _0x25f053={'status':_0x3f7b9c(0x1b2),..._0x69e92b()};return await saveImportJson(_0x3d9364[_0x3f7b9c(0x196)],_0x25f053),_0x25f053;}catch(_0x550654){if(_0x20e392)await saveImportJson(_0x3d9364[_0x3f7b9c(0x196)],{'status':_0x3f7b9c(0x1b9),..._0x69e92b(),'message':_0x550654[_0x3f7b9c(0x195)]});throw _0x550654;}finally{await _0x185c56();}}
|
|
1
|
+
const a145_0x2b92c0=a145_0x549e;(function(_0x50a5cd,_0x20b3b2){const _0x17a2ec=a145_0x549e,_0x34f3b7=_0x50a5cd();while(!![]){try{const _0x587d31=-parseInt(_0x17a2ec(0x1a8))/0x1*(-parseInt(_0x17a2ec(0x194))/0x2)+-parseInt(_0x17a2ec(0x18a))/0x3+-parseInt(_0x17a2ec(0x1e2))/0x4+-parseInt(_0x17a2ec(0x1aa))/0x5*(-parseInt(_0x17a2ec(0x1c0))/0x6)+-parseInt(_0x17a2ec(0x185))/0x7*(parseInt(_0x17a2ec(0x1da))/0x8)+-parseInt(_0x17a2ec(0x17a))/0x9*(parseInt(_0x17a2ec(0x198))/0xa)+-parseInt(_0x17a2ec(0x1a2))/0xb*(-parseInt(_0x17a2ec(0x1c4))/0xc);if(_0x587d31===_0x20b3b2)break;else _0x34f3b7['push'](_0x34f3b7['shift']());}catch(_0x48de27){_0x34f3b7['push'](_0x34f3b7['shift']());}}}(a145_0x305c,0xe2c21));import{randomBytes,randomUUID}from'node:crypto';import{lstat,open,readFile,realpath,rename,unlink}from'node:fs/promises';import{resolve,dirname,basename}from'node:path';function a145_0x305c(){const _0x2422a6=['netType','createUserName','size','join','maxBatchSize','runtimeDomain','object','Import\x20input,\x20output\x20and\x20lock\x20paths\x20must\x20be\x20different\x20files.','values','isInteger','.tmp-','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20stopped.','status','code','110277dOJOtg','completed','binding','type','stringify','districtAdcode','rowNumber','datasetCode','imageFields','.lock','countryCode','914333VjBGhC','streetNumber','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20fixed\x20IDs\x20before\x20continuing.','ENOENT','createUserId','4267761HyMxNv','add','filter','Invalid\x20write\x20result.','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','unsent','fileHash','rows','accuracy','catch','2NUVIWc','errorMessage','The\x20server\x20import\x20contract\x20is\x20unsupported\x20or\x20incomplete.','lbswuaCacheId','1130WGCyFn','mappingHash','keys','hex','.lock.recovery','slice','isArray','Invalid\x20import\x20batch\x20size.','Import\x20output\x20must\x20not\x20be\x20a\x20symbolic\x20link.','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','44TgLTPe','succeeded','.recovery','pending','Import\x20lock\x20recovery\x20is\x20active\x20or\x20interrupted;\x20inspect\x20the\x20recovery\x20guard\x20before\x20retrying.','dingTalkUrl','1132061BfSKAS','pid','525FLOnuD','road','close','entries','schemaFingerprint','The\x20import\x20checkpoint\x20is\x20locked\x20by\x20a\x20running\x20process.','elapsedMs','maxBatchBytes','Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.','push','every','report','resume','byteLength','geolocation','actorId','has','pois','address','undefined','latitude','ESRCH','75342pgXepO','Excel\x20row\x20','writeFile','now','8603100kCwGLh','conflict','message','get','uploadFields','forEach','version','Invalid\x20or\x20duplicate\x20import\x20readback\x20ID.','Invalid\x20import\x20readback\x20response.','province','source','sort','schemaVersion','importId','fixed-negative-id','errors','readback','ids','map','set','string','time','56VsQScp','appCode','district','length','checkpoint','unknown','batchSize','kill','2671744nBbjmz','resultCode','Invalid\x20import\x20lock;\x20inspect\x20it\x20before\x20recovery.','isSafeInteger','strategy','isSymbolicLink','parse','country','EEXIST','write','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','auto-id-task-marker','sheet','some','Import\x20lock\x20changed;\x20retry\x20recovery.','sync','utf8','toString','cityAdcode','includes'];a145_0x305c=function(){return _0x2422a6;};return a145_0x305c();}export function canonical(_0x2400d7){const _0x4991e0=a145_0x549e;if(Array[_0x4991e0(0x19e)](_0x2400d7))return'['+_0x2400d7[_0x4991e0(0x1d6)](canonical)['join'](',')+']';if(_0x2400d7&&typeof _0x2400d7==='object')return'{'+Object['keys'](_0x2400d7)[_0x4991e0(0x1cf)]()['map'](_0x2e2b5a=>JSON[_0x4991e0(0x17e)](_0x2e2b5a)+':'+canonical(_0x2400d7[_0x2e2b5a]))[_0x4991e0(0x16f)](',')+'}';return JSON[_0x4991e0(0x17e)](_0x2400d7)??_0x4991e0(0x1bd);}const EMPTY_IMAGE_LOCATION_FIELDS=new Set([a145_0x2b92c0(0x1d9),'operatorType',a145_0x2b92c0(0x17f),a145_0x2b92c0(0x1dc),a145_0x2b92c0(0x1bb),a145_0x2b92c0(0x1ab),a145_0x2b92c0(0x15f),a145_0x2b92c0(0x184),a145_0x2b92c0(0x1cd),a145_0x2b92c0(0x1be),'city',a145_0x2b92c0(0x16c),a145_0x2b92c0(0x1e3),a145_0x2b92c0(0x186),a145_0x2b92c0(0x192),'longitude',a145_0x2b92c0(0x16a),a145_0x2b92c0(0x195),a145_0x2b92c0(0x1bc),a145_0x2b92c0(0x197)]);export function sameImportValue(_0x52709e,_0x3de059,_0x18811d=![]){const _0x12eb59=a145_0x2b92c0;if(_0x18811d){const _0x162e0b=_0x158588=>Array[_0x12eb59(0x19e)](_0x158588)?_0x158588[_0x12eb59(0x1d6)](_0x458b61=>{const _0x5b1409=_0x12eb59;if(!_0x458b61||typeof _0x458b61!==_0x5b1409(0x172)||Array[_0x5b1409(0x19e)](_0x458b61))return _0x458b61;const _0x4c473a={..._0x458b61};delete _0x4c473a['url'],delete _0x4c473a['previewUrl'];if(_0x4c473a[_0x5b1409(0x1a7)]==='')delete _0x4c473a[_0x5b1409(0x1a7)];if(_0x4c473a[_0x5b1409(0x189)]==null)delete _0x4c473a[_0x5b1409(0x189)];if(_0x4c473a[_0x5b1409(0x16d)]==null)delete _0x4c473a['createUserName'];if(_0x4c473a['geolocation']==null||typeof _0x4c473a[_0x5b1409(0x1b8)]===_0x5b1409(0x172)&&!Array['isArray'](_0x4c473a['geolocation'])&&Object[_0x5b1409(0x1ad)](_0x4c473a[_0x5b1409(0x1b8)])[_0x5b1409(0x1b4)](([_0x5a8059,_0x1a7d96])=>EMPTY_IMAGE_LOCATION_FIELDS[_0x5b1409(0x1ba)](_0x5a8059)&&_0x1a7d96===null))delete _0x4c473a[_0x5b1409(0x1b8)];for(const _0x3bd8aa of['name',_0x5b1409(0x17d),'key'])if(!(_0x3bd8aa in _0x4c473a))_0x4c473a[_0x3bd8aa]='';if(_0x4c473a[_0x5b1409(0x16e)]==null)_0x4c473a[_0x5b1409(0x16e)]=0x0;return _0x4c473a;}):_0x158588;return canonical(_0x162e0b(_0x52709e))===canonical(_0x162e0b(_0x3de059));}return _0x52709e===null?_0x3de059===null||_0x3de059===undefined:canonical(_0x3de059)===canonical(_0x52709e);}async function rejectSymlink(_0x19138c){const _0x4e40f0=a145_0x2b92c0;try{if((await lstat(_0x19138c))[_0x4e40f0(0x1e7)]())throw Error(_0x4e40f0(0x1a0));}catch(_0x4c2970){if(_0x4c2970[_0x4e40f0(0x179)]!==_0x4e40f0(0x188))throw _0x4c2970;}}export async function resolveImportOutputPath(_0x4ba588){return await rejectSymlink(_0x4ba588),resolve(await realpath(dirname(resolve(_0x4ba588))),basename(_0x4ba588));}export function assertImportPaths(_0x1242f2,_0x32f018,_0x396116=[]){const _0x401ad4=a145_0x2b92c0,_0x14fd46=[..._0x396116,_0x1242f2,_0x32f018,_0x1242f2+_0x401ad4(0x183),_0x1242f2+_0x401ad4(0x19c)]['map'](_0x3d4daa=>resolve(_0x3d4daa));if(new Set(_0x14fd46)['size']!==_0x14fd46[_0x401ad4(0x1dd)])throw Error(_0x401ad4(0x173));}export async function saveImportJson(_0x33e2c7,_0x4b763b){const _0x115b00=a145_0x2b92c0;await rejectSymlink(_0x33e2c7);const _0xfd93c8=_0x33e2c7+_0x115b00(0x176)+randomUUID(),_0x385fcc=await open(_0xfd93c8,'wx',0x180);try{await _0x385fcc[_0x115b00(0x1c2)](JSON[_0x115b00(0x17e)](_0x4b763b,null,0x2)),await _0x385fcc[_0x115b00(0x167)]();}finally{await _0x385fcc[_0x115b00(0x1ac)]();}try{await rename(_0xfd93c8,_0x33e2c7);}catch(_0x402821){await unlink(_0xfd93c8)[_0x115b00(0x193)](()=>{});throw _0x402821;}}function a145_0x549e(_0x283a92,_0x4b1958){_0x283a92=_0x283a92-0x15e;const _0x305cec=a145_0x305c();let _0x549ec3=_0x305cec[_0x283a92];return _0x549ec3;}export async function acquireLock(_0x224547){const _0x58b0b3=a145_0x2b92c0,_0x23b3dc=_0x224547+_0x58b0b3(0x183),_0x2e5406=randomUUID();await rejectSymlink(_0x23b3dc);const _0x19916b=_0x23b3dc+_0x58b0b3(0x1a4);let _0x476e00,_0x4253e2;try{try{_0x476e00=await open(_0x23b3dc,'wx',0x180);}catch(_0x99cf67){if(_0x99cf67[_0x58b0b3(0x179)]!==_0x58b0b3(0x160))throw _0x99cf67;try{_0x4253e2=await open(_0x19916b,'wx',0x180);}catch(_0x4de316){if(_0x4de316[_0x58b0b3(0x179)]==='EEXIST')throw Error(_0x58b0b3(0x1a6));throw _0x4de316;}await _0x4253e2[_0x58b0b3(0x1c2)](JSON[_0x58b0b3(0x17e)]({'pid':process['pid'],'token':_0x2e5406})),await _0x4253e2[_0x58b0b3(0x167)](),await rejectSymlink(_0x23b3dc);let _0x57f05b;try{_0x57f05b=await readFile(_0x23b3dc,_0x58b0b3(0x168));}catch(_0x4e3f86){if(_0x4e3f86[_0x58b0b3(0x179)]!==_0x58b0b3(0x188))throw _0x4e3f86;}if(_0x57f05b!==undefined){let _0x43351c;try{_0x43351c=JSON[_0x58b0b3(0x15e)](_0x57f05b);}catch{throw Error(_0x58b0b3(0x1e4));}if(!_0x43351c||!Number['isSafeInteger'](_0x43351c['pid'])||_0x43351c['pid']<=0x0)throw Error('Invalid\x20import\x20lock\x20owner.');try{process[_0x58b0b3(0x1e1)](_0x43351c[_0x58b0b3(0x1a9)],0x0);throw Error(_0x58b0b3(0x1af));}catch(_0x436d10){if(_0x436d10[_0x58b0b3(0x179)]!==_0x58b0b3(0x1bf))throw _0x436d10;}if(await readFile(_0x23b3dc,_0x58b0b3(0x168))!==_0x57f05b)throw Error(_0x58b0b3(0x166));await unlink(_0x23b3dc);}_0x476e00=await open(_0x23b3dc,'wx',0x180);}await _0x476e00['writeFile'](JSON[_0x58b0b3(0x17e)]({'pid':process[_0x58b0b3(0x1a9)],'token':_0x2e5406})),await _0x476e00[_0x58b0b3(0x167)]();}finally{try{await _0x476e00?.[_0x58b0b3(0x1ac)]();}finally{if(_0x4253e2)try{await _0x4253e2['close']();}finally{await unlink(_0x19916b);}}}return async()=>{const _0x94e2ce=_0x58b0b3;if(JSON[_0x94e2ce(0x15e)](await readFile(_0x23b3dc,_0x94e2ce(0x168)))['token']===_0x2e5406)await unlink(_0x23b3dc);};}export function assertImportContract(_0x444e88,_0x58564c,_0x5bc793){const _0x5049a9=a145_0x2b92c0;if(!_0x444e88||!(_0x444e88[_0x5049a9(0x1d0)]===0x1&&_0x444e88[_0x5049a9(0x1e6)]===_0x5049a9(0x1d2)||_0x444e88[_0x5049a9(0x1d0)]===0x2&&_0x444e88[_0x5049a9(0x1e6)]===_0x5049a9(0x163))||_0x444e88[_0x5049a9(0x1ce)]!=='METADATA'||_0x444e88[_0x5049a9(0x1db)]!==_0x58564c||_0x444e88[_0x5049a9(0x181)]!==_0x5bc793||typeof _0x444e88[_0x5049a9(0x1b9)]!==_0x5049a9(0x1d8)||!_0x444e88[_0x5049a9(0x1b9)]||typeof _0x444e88['schemaFingerprint']!==_0x5049a9(0x1d8)||!_0x444e88[_0x5049a9(0x1ae)]||!Number[_0x5049a9(0x1e5)](_0x444e88['maxBatchSize'])||_0x444e88[_0x5049a9(0x170)]<0x1||_0x444e88[_0x5049a9(0x170)]>0x3e8||!Number['isSafeInteger'](_0x444e88[_0x5049a9(0x1b1)])||_0x444e88[_0x5049a9(0x1b1)]<0x1||_0x444e88[_0x5049a9(0x1b1)]>0x14*0x400*0x400)throw Error(_0x5049a9(0x196));}export async function runExcelImport(_0x510a38){const _0x4a55f0=a145_0x2b92c0;_0x510a38={..._0x510a38,'checkpoint':await resolveImportOutputPath(_0x510a38[_0x4a55f0(0x1de)]),'report':await resolveImportOutputPath(_0x510a38[_0x4a55f0(0x1b5)])};const {manifest:_0x1588f8,contract:_0x412e92,api:_0x2f2884}=_0x510a38;assertImportContract(_0x412e92,_0x510a38['appCode'],_0x510a38[_0x4a55f0(0x181)]);if(_0x412e92[_0x4a55f0(0x1d0)]!==0x1)throw Error('The\x20fixed-ID\x20runner\x20requires\x20the\x20v1\x20import\x20contract.');if(_0x1588f8[_0x4a55f0(0x1d3)][_0x4a55f0(0x1dd)])throw Error(_0x4a55f0(0x18e));if(!_0x1588f8[_0x4a55f0(0x191)]['length'])throw Error('Excel\x20contains\x20no\x20valid\x20data\x20rows.');if(!Number[_0x4a55f0(0x175)](_0x510a38['batchSize'])||_0x510a38['batchSize']<0x1||_0x510a38['batchSize']>_0x412e92[_0x4a55f0(0x170)])throw Error(_0x4a55f0(0x19f));for(const _0x5ab527 of _0x1588f8[_0x4a55f0(0x191)]){if(Buffer[_0x4a55f0(0x1b7)](JSON[_0x4a55f0(0x17e)]({'schemaFingerprint':_0x412e92['schemaFingerprint'],'items':[{..._0x5ab527[_0x4a55f0(0x174)],'id':-0x1fffffffffffff}]}),_0x4a55f0(0x168))>_0x412e92[_0x4a55f0(0x1b1)])throw Error(_0x4a55f0(0x1c1)+_0x5ab527[_0x4a55f0(0x180)]+_0x4a55f0(0x162));}assertImportPaths(_0x510a38[_0x4a55f0(0x1de)],_0x510a38['report']);const _0x4aae7a={'appCode':_0x510a38['appCode'],'datasetCode':_0x510a38[_0x4a55f0(0x181)],'runtimeDomain':_0x510a38[_0x4a55f0(0x171)],'actorId':_0x412e92[_0x4a55f0(0x1b9)],'fileHash':_0x1588f8[_0x4a55f0(0x190)],'mappingHash':_0x1588f8[_0x4a55f0(0x199)],'schemaHash':_0x1588f8['schemaHash'],'remoteSchemaHash':_0x412e92['schemaFingerprint'],'batchSize':_0x510a38[_0x4a55f0(0x1e0)],'sheet':_0x1588f8[_0x4a55f0(0x164)]},_0x477381=await acquireLock(_0x510a38[_0x4a55f0(0x1de)]);let _0x38f387;const _0x9e4ec8=Date[_0x4a55f0(0x1c3)]();let _0xe8e6da=0x0;const _0x29600a=[],_0x3fb38b=()=>({'importId':_0x38f387?.['importId'],'sourceRows':_0x1588f8[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)],'emptyRows':_0x1588f8['emptyRows'][_0x4a55f0(0x1dd)],'succeeded':_0x38f387?.['rows'][_0x4a55f0(0x18c)](_0x1f68c2=>_0x1f68c2['status']==='succeeded')[_0x4a55f0(0x1dd)]??0x0,'unknown':_0x38f387?.[_0x4a55f0(0x191)][_0x4a55f0(0x18c)](_0x4cf7aa=>_0x4cf7aa['status']===_0x4a55f0(0x1a5))[_0x4a55f0(0x1dd)]??0x0,'conflicts':_0x38f387?.[_0x4a55f0(0x191)][_0x4a55f0(0x18c)](_0x153c6d=>_0x153c6d['status']===_0x4a55f0(0x1c5))[_0x4a55f0(0x1dd)]??0x0,'notAttempted':_0x38f387?.['rows'][_0x4a55f0(0x18c)](_0x39c4a2=>_0x39c4a2[_0x4a55f0(0x178)]===_0x4a55f0(0x18f))[_0x4a55f0(0x1dd)]??_0x1588f8[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)],'batches':_0xe8e6da,'batchResults':_0x29600a,'elapsedMs':Date[_0x4a55f0(0x1c3)]()-_0x9e4ec8,'checkpoint':resolve(_0x510a38['checkpoint']),'report':resolve(_0x510a38[_0x4a55f0(0x1b5)]),'warnings':_0x1588f8['warnings']});try{await rejectSymlink(_0x510a38['checkpoint']);if(_0x510a38[_0x4a55f0(0x1b6)]){try{_0x38f387=JSON[_0x4a55f0(0x15e)](await readFile(_0x510a38[_0x4a55f0(0x1de)],_0x4a55f0(0x168)));}catch{throw Error('Cannot\x20read\x20the\x20import\x20checkpoint.');}if(!_0x38f387||_0x38f387[_0x4a55f0(0x1ca)]!==0x1||typeof _0x38f387[_0x4a55f0(0x1d1)]!==_0x4a55f0(0x1d8)||canonical(_0x38f387[_0x4a55f0(0x17c)])!==canonical(_0x4aae7a)||!Array[_0x4a55f0(0x19e)](_0x38f387[_0x4a55f0(0x191)])||_0x38f387['rows'][_0x4a55f0(0x1dd)]!==_0x1588f8[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)]||new Set(_0x38f387[_0x4a55f0(0x191)][_0x4a55f0(0x1d6)](_0x15b6ca=>_0x15b6ca['id']))[_0x4a55f0(0x16e)]!==_0x38f387[_0x4a55f0(0x191)]['length']||_0x38f387[_0x4a55f0(0x191)][_0x4a55f0(0x165)]((_0x4cf9df,_0x12c9db)=>!Number[_0x4a55f0(0x1e5)](_0x4cf9df['id'])||_0x4cf9df['id']>=0x0||_0x4cf9df[_0x4a55f0(0x180)]!==_0x1588f8[_0x4a55f0(0x191)][_0x12c9db]['rowNumber']||![_0x4a55f0(0x18f),_0x4a55f0(0x1a5),'succeeded','conflict'][_0x4a55f0(0x16b)](_0x4cf9df['status'])))throw Error('Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.');}else{try{await lstat(_0x510a38['checkpoint']);throw Error('Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.');}catch(_0x400c98){if(_0x400c98[_0x4a55f0(0x179)]!==_0x4a55f0(0x188))throw _0x400c98;}const _0x412c1f=new Set();_0x38f387={'version':0x1,'importId':randomUUID(),'binding':_0x4aae7a,'rows':_0x1588f8['rows']['map'](_0x3eeb8d=>{const _0x129699=_0x4a55f0;let _0x57d2ea;do{_0x57d2ea=-(Number(BigInt('0x'+randomBytes(0x7)[_0x129699(0x169)](_0x129699(0x19b)))&(0x1n<<0x34n)-0x1n)+0x1);}while(_0x412c1f[_0x129699(0x1ba)](_0x57d2ea));return _0x412c1f[_0x129699(0x18b)](_0x57d2ea),{'id':_0x57d2ea,'rowNumber':_0x3eeb8d[_0x129699(0x180)],'status':_0x129699(0x18f)};})},await saveImportJson(_0x510a38['checkpoint'],_0x38f387);}await _0x510a38['onCheckpointReady']?.();const _0x3eeca4=_0x38f387;if(_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x165)](_0x3269df=>_0x3269df[_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))throw Error(_0x4a55f0(0x1a1));const _0x59ba92=async _0x422fd8=>{const _0xe62bf1=_0x4a55f0,_0x33761d=await _0x2f2884[_0xe62bf1(0x1d4)](_0x422fd8['map'](_0x2c4577=>_0x3eeca4[_0xe62bf1(0x191)][_0x2c4577]['id']));if(!Array['isArray'](_0x33761d))throw Error(_0xe62bf1(0x1cc));const _0x2fc4bc=new Set(_0x422fd8[_0xe62bf1(0x1d6)](_0x5b3a97=>_0x3eeca4['rows'][_0x5b3a97]['id'])),_0x389083=new Map();for(const _0x1d6578 of _0x33761d){const _0x3556c3=Number(_0x1d6578?.['id']);if(!_0x2fc4bc[_0xe62bf1(0x1ba)](_0x3556c3)||_0x389083[_0xe62bf1(0x1ba)](_0x3556c3))throw Error(_0xe62bf1(0x1cb));_0x389083[_0xe62bf1(0x1d7)](_0x3556c3,_0x1d6578);}for(const _0x42e280 of _0x422fd8){const _0x19fe87=_0x389083[_0xe62bf1(0x1c7)](_0x3eeca4[_0xe62bf1(0x191)][_0x42e280]['id']);if(!_0x19fe87)continue;if(_0x3eeca4[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x178)]===_0xe62bf1(0x18f)){_0x3eeca4[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x178)]=_0xe62bf1(0x1c5),await saveImportJson(_0x510a38[_0xe62bf1(0x1de)],_0x3eeca4);throw Error('Import\x20primary\x20key\x20collision;\x20stop\x20without\x20replacing\x20the\x20fixed\x20IDs.');}const _0x11173f=_0x1588f8[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x174)];if(Object[_0xe62bf1(0x19a)](_0x11173f)['some'](_0x1c201d=>!sameImportValue(_0x11173f[_0x1c201d],_0x19fe87[_0x1c201d],_0x1588f8[_0xe62bf1(0x182)]?.[_0xe62bf1(0x16b)](_0x1c201d)&&!_0x1588f8[_0xe62bf1(0x1c8)]?.[_0xe62bf1(0x16b)](_0x1c201d)))){_0x3eeca4[_0xe62bf1(0x191)][_0x42e280][_0xe62bf1(0x178)]=_0xe62bf1(0x1c5),await saveImportJson(_0x510a38[_0xe62bf1(0x1de)],_0x3eeca4);throw Error('Import\x20content\x20conflict\x20at\x20Excel\x20row\x20'+_0x3eeca4['rows'][_0x42e280]['rowNumber']+'.');}_0x3eeca4[_0xe62bf1(0x191)][_0x42e280]['status']=_0xe62bf1(0x1a3);}return await saveImportJson(_0x510a38[_0xe62bf1(0x1de)],_0x3eeca4),_0x389083;};if(_0x510a38[_0x4a55f0(0x1b6)])for(let _0x2d557b=0x0;_0x2d557b<_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)];_0x2d557b+=_0x510a38[_0x4a55f0(0x1e0)]){const _0x53c327=_0x3eeca4['rows'][_0x4a55f0(0x19d)](_0x2d557b,_0x2d557b+_0x510a38[_0x4a55f0(0x1e0)])['map']((_0x423a2b,_0x325ae3)=>_0x2d557b+_0x325ae3),_0x4a6e9b=_0x53c327[_0x4a55f0(0x18c)](_0xbdc063=>_0x3eeca4[_0x4a55f0(0x191)][_0xbdc063]['status']===_0x4a55f0(0x1a3)),_0x337831=await _0x59ba92(_0x53c327),_0x3bdf56=_0x4a6e9b['filter'](_0x4ee835=>!_0x337831[_0x4a55f0(0x1ba)](_0x3eeca4[_0x4a55f0(0x191)][_0x4ee835]['id']));if(_0x3bdf56[_0x4a55f0(0x1dd)]){_0x3bdf56[_0x4a55f0(0x1c9)](_0x53edfb=>{const _0x135c69=_0x4a55f0;_0x3eeca4[_0x135c69(0x191)][_0x53edfb][_0x135c69(0x178)]=_0x135c69(0x1c5);}),await saveImportJson(_0x510a38[_0x4a55f0(0x1de)],_0x3eeca4);throw Error(_0x4a55f0(0x177));}}for(let _0x433f9e=0x0;_0x433f9e<_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)];){const _0x463fb0=[],_0x34274c=[];while(_0x433f9e<_0x3eeca4[_0x4a55f0(0x191)][_0x4a55f0(0x1dd)]&&_0x34274c[_0x4a55f0(0x1dd)]<_0x510a38['batchSize']){const _0x442188=_0x433f9e++;if(_0x3eeca4['rows'][_0x442188][_0x4a55f0(0x178)]===_0x4a55f0(0x1a3))continue;const _0x1c45d1={..._0x1588f8[_0x4a55f0(0x191)][_0x442188][_0x4a55f0(0x174)],'id':_0x3eeca4[_0x4a55f0(0x191)][_0x442188]['id']};if(Buffer[_0x4a55f0(0x1b7)](JSON[_0x4a55f0(0x17e)]({'schemaFingerprint':_0x412e92[_0x4a55f0(0x1ae)],'items':[..._0x34274c,_0x1c45d1]}),_0x4a55f0(0x168))>_0x412e92['maxBatchBytes']){if(!_0x34274c[_0x4a55f0(0x1dd)])throw Error('Excel\x20row\x20'+_0x3eeca4[_0x4a55f0(0x191)][_0x442188][_0x4a55f0(0x180)]+_0x4a55f0(0x162));_0x433f9e--;break;}_0x463fb0[_0x4a55f0(0x1b3)](_0x442188),_0x34274c[_0x4a55f0(0x1b3)](_0x1c45d1);}if(!_0x34274c[_0x4a55f0(0x1dd)])continue;const _0x553491=_0x463fb0[_0x4a55f0(0x18c)](_0x44a69e=>_0x3eeca4[_0x4a55f0(0x191)][_0x44a69e][_0x4a55f0(0x178)]===_0x4a55f0(0x18f));if(_0x553491['length']){const _0x73df3f=await _0x2f2884[_0x4a55f0(0x1d4)](_0x553491[_0x4a55f0(0x1d6)](_0x197e3b=>_0x3eeca4[_0x4a55f0(0x191)][_0x197e3b]['id']));if(!Array['isArray'](_0x73df3f))throw Error(_0x4a55f0(0x1cc));if(_0x73df3f[_0x4a55f0(0x1dd)])throw Error(_0x4a55f0(0x1b2));}_0x463fb0[_0x4a55f0(0x1c9)](_0x333ba7=>{const _0x7e0cbc=_0x4a55f0;_0x3eeca4[_0x7e0cbc(0x191)][_0x333ba7]['status']=_0x7e0cbc(0x1a5);}),await saveImportJson(_0x510a38['checkpoint'],_0x3eeca4),_0xe8e6da++;const _0x23d4d6=Date[_0x4a55f0(0x1c3)](),_0x52c1ab={'batch':_0xe8e6da,'rowStart':_0x3eeca4['rows'][_0x463fb0[0x0]][_0x4a55f0(0x180)],'rowEnd':_0x3eeca4['rows'][_0x463fb0[_0x463fb0[_0x4a55f0(0x1dd)]-0x1]][_0x4a55f0(0x180)],'count':_0x34274c[_0x4a55f0(0x1dd)],'bytes':Buffer[_0x4a55f0(0x1b7)](JSON[_0x4a55f0(0x17e)]({'schemaFingerprint':_0x412e92[_0x4a55f0(0x1ae)],'items':_0x34274c}),'utf8'),'elapsedMs':0x0,'status':_0x4a55f0(0x1df)};_0x29600a[_0x4a55f0(0x1b3)](_0x52c1ab);try{const _0x5a7af2=await _0x2f2884[_0x4a55f0(0x161)](_0x34274c);if(!_0x5a7af2||_0x5a7af2['count']!==_0x34274c[_0x4a55f0(0x1dd)]||!Array['isArray'](_0x5a7af2[_0x4a55f0(0x1d5)])||_0x5a7af2[_0x4a55f0(0x1d5)][_0x4a55f0(0x1dd)]!==_0x34274c[_0x4a55f0(0x1dd)]||_0x5a7af2['ids'][_0x4a55f0(0x165)]((_0x3d26b6,_0x2d0596)=>Number(_0x3d26b6)!==_0x3eeca4[_0x4a55f0(0x191)][_0x463fb0[_0x2d0596]]['id']))throw Error(_0x4a55f0(0x18d));await _0x59ba92(_0x463fb0);if(_0x463fb0['some'](_0x14b140=>_0x3eeca4[_0x4a55f0(0x191)][_0x14b140][_0x4a55f0(0x178)]!=='succeeded'))throw Error('Incomplete\x20readback.');}catch(_0x267061){if(_0x3eeca4['rows'][_0x4a55f0(0x165)](_0x35ffa4=>_0x35ffa4[_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))throw _0x267061;try{await _0x59ba92(_0x463fb0);}catch(_0x1542b7){if(_0x3eeca4[_0x4a55f0(0x191)]['some'](_0xe6300e=>_0xe6300e[_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))throw _0x1542b7;}if(_0x463fb0[_0x4a55f0(0x165)](_0xe9f326=>_0x3eeca4[_0x4a55f0(0x191)][_0xe9f326][_0x4a55f0(0x178)]!==_0x4a55f0(0x1a3)))throw Error(_0x4a55f0(0x187));}finally{_0x52c1ab[_0x4a55f0(0x1b0)]=Date[_0x4a55f0(0x1c3)]()-_0x23d4d6;if(_0x463fb0[_0x4a55f0(0x1b4)](_0x4ab6a1=>_0x3eeca4[_0x4a55f0(0x191)][_0x4ab6a1][_0x4a55f0(0x178)]==='succeeded'))_0x52c1ab['status']=_0x4a55f0(0x1a3);else{if(_0x463fb0[_0x4a55f0(0x165)](_0x3941c9=>_0x3eeca4[_0x4a55f0(0x191)][_0x3941c9][_0x4a55f0(0x178)]===_0x4a55f0(0x1c5)))_0x52c1ab[_0x4a55f0(0x178)]=_0x4a55f0(0x1c5);}}}const _0x29f996={'status':_0x4a55f0(0x17b),..._0x3fb38b()};return await saveImportJson(_0x510a38['report'],_0x29f996),_0x29f996;}catch(_0x46ddc9){if(_0x38f387)await saveImportJson(_0x510a38['report'],{'status':'incomplete',..._0x3fb38b(),'message':_0x46ddc9[_0x4a55f0(0x1c6)]});throw _0x46ddc9;}finally{await _0x477381();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a147_0x1d61b2=a147_0x2ef8;(function(_0x17dbee,_0x2eacee){const _0x9da1ab=a147_0x2ef8,_0x12b38a=_0x17dbee();while(!![]){try{const _0x510518=parseInt(_0x9da1ab(0x93))/0x1*(-parseInt(_0x9da1ab(0xa5))/0x2)+-parseInt(_0x9da1ab(0xa7))/0x3+parseInt(_0x9da1ab(0x7a))/0x4*(parseInt(_0x9da1ab(0xb3))/0x5)+parseInt(_0x9da1ab(0x9b))/0x6+parseInt(_0x9da1ab(0x81))/0x7*(parseInt(_0x9da1ab(0x6e))/0x8)+parseInt(_0x9da1ab(0xb1))/0x9+-parseInt(_0x9da1ab(0x86))/0xa*(parseInt(_0x9da1ab(0x92))/0xb);if(_0x510518===_0x2eacee)break;else _0x12b38a['push'](_0x12b38a['shift']());}catch(_0x542489){_0x12b38a['push'](_0x12b38a['shift']());}}}(a147_0x2dca,0x8ae11));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a147_0x1d61b2(0x87),SKILL_NAME=a147_0x1d61b2(0x77),debug=debuglog(a147_0x1d61b2(0x84));function frontmatterValue(_0x34332c,_0x46cff3){const _0x1cc96b=a147_0x1d61b2;return _0x34332c[_0x1cc96b(0x8a)](new RegExp('^'+_0x46cff3+_0x1cc96b(0x78),'m'))?.[0x1]?.[_0x1cc96b(0xb4)]()??'';}function listFiles(_0x4413b5,_0x4723d6=_0x4413b5){const _0x87e554=a147_0x1d61b2;return readdirSync(_0x4723d6,{'withFileTypes':!![]})[_0x87e554(0xa8)](_0x2704c0=>{const _0x5b4344=_0x87e554,_0x45aa9e=join(_0x4723d6,_0x2704c0[_0x5b4344(0x94)]),_0x4eb8bc=lstatSync(_0x45aa9e);if(_0x4eb8bc['isSymbolicLink']())throw new Error(_0x5b4344(0xa9)+_0x45aa9e);if(_0x4eb8bc['isDirectory']())return listFiles(_0x4413b5,_0x45aa9e);if(!_0x4eb8bc[_0x5b4344(0x85)]())throw new Error(_0x5b4344(0x7f)+_0x45aa9e);return[relative(_0x4413b5,_0x45aa9e)[_0x5b4344(0xa6)](sep)[_0x5b4344(0x8f)]('/')];})[_0x87e554(0x97)]((_0x32a7a1,_0x5c6ce6)=>_0x32a7a1<_0x5c6ce6?-0x1:_0x32a7a1>_0x5c6ce6?0x1:0x0);}function digestFiles(_0x3d6a6b,_0x5a072b){const _0x41980b=a147_0x1d61b2,_0x7baafb=createHash('sha256');for(const _0x1ff60e of _0x5a072b){if(_0x1ff60e[_0x41980b(0x91)]('/')||_0x1ff60e[_0x41980b(0xa6)]('/')[_0x41980b(0x95)]('..')||_0x1ff60e['includes']('\x5c'))throw new Error(_0x41980b(0x80)+_0x1ff60e);_0x7baafb[_0x41980b(0xaa)](_0x1ff60e),_0x7baafb[_0x41980b(0xaa)]('\x00'),_0x7baafb[_0x41980b(0xaa)](readFileSync(join(_0x3d6a6b,..._0x1ff60e[_0x41980b(0xa6)]('/')))),_0x7baafb[_0x41980b(0xaa)]('\x00');}return _0x7baafb['digest'](_0x41980b(0x82));}function sameFiles(_0x142db1,_0x3c4043){const _0x20013c=a147_0x1d61b2;return _0x142db1[_0x20013c(0x7c)]===_0x3c4043['length']&&_0x142db1[_0x20013c(0xad)]((_0x4680f0,_0x2a34c4)=>_0x4680f0===_0x3c4043[_0x2a34c4]);}function readSource(_0x449de6){const _0x5c731c=a147_0x1d61b2,_0x282bc7=JSON[_0x5c731c(0x88)](readFileSync(join(_0x449de6,_0x5c731c(0xab)),'utf8')),_0x1f1a0a=JSON[_0x5c731c(0x88)](readFileSync(join(_0x449de6,'skills',_0x5c731c(0x89)),_0x5c731c(0x96))),_0xb0a426=join(_0x449de6,_0x5c731c(0x8e),SKILL_NAME),_0x2cfe7f=frontmatterValue(readFileSync(join(_0xb0a426,_0x5c731c(0x79)),'utf8'),_0x5c731c(0xaf)),_0x59f6d3=listFiles(_0xb0a426);if(_0x1f1a0a[_0x5c731c(0xb0)]!==0x1||_0x1f1a0a[_0x5c731c(0x94)]!==SKILL_NAME||!_0x282bc7[_0x5c731c(0xaf)]||_0x1f1a0a[_0x5c731c(0x9f)]!==_0x282bc7[_0x5c731c(0xaf)]||_0x1f1a0a[_0x5c731c(0x7b)]!==_0x282bc7[_0x5c731c(0xaf)]||_0x2cfe7f!==_0x282bc7[_0x5c731c(0xaf)]||!sameFiles(_0x59f6d3,_0x1f1a0a[_0x5c731c(0x70)])||digestFiles(_0xb0a426,_0x59f6d3)!==_0x1f1a0a[_0x5c731c(0xa0)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x282bc7['version'],'skillVersion':_0x2cfe7f,'root':_0xb0a426,'manifest':_0x1f1a0a};}function installedSkillPath(_0x161d30){const _0xd42b8e=a147_0x1d61b2,_0x1585d0=resolveInstalledSkill(SKILL_NAME,{'home':_0x161d30});if(_0x1585d0['state']===_0xd42b8e(0xb2))return{'state':_0xd42b8e(0xb2),'path':dirname(_0x1585d0[_0xd42b8e(0xa1)])};if(_0x1585d0[_0xd42b8e(0x83)]==='absent')return{'state':_0xd42b8e(0x7d)};return{'state':'unverifiable','reason':_0x1585d0['reason']};}function a147_0x2dca(){const _0xf8ce07=['name','includes','utf8','sort','installedPath','\x20verified;\x20','CLI\x20Built-in\x20Skill\x20','2454180WqzGLE','packageRoot','stdio','current','packageVersion','digest','path','home','root','version_mismatch','14yvhhEn','split','346614ZqlVzm','flatMap','Symbolic\x20link\x20is\x20not\x20allowed:\x20','update','package.json','content_mismatch','every','status','version','schemaVersion','8431443NvPTiE','present','2263950FAJCMC','trim','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','72056pzvGdC','unverifiable','files','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','error','VERIFY_FAILED','skills@latest\x20exited\x20','partialFailure','unknown','lovrabet',':\x5cs*(.+)$','SKILL.md','8zWeYbB','skillVersion','length','missing','output','Unsupported\x20Skill\x20entry:\x20','Unsafe\x20manifest\x20path:\x20','91DDutpC','hex','state','lovrabet-skills','isFile','3365610mdbvyM','lovrabet\x20cli-skill\x20install','parse','lovrabet.manifest.json','match','Installed\x20Skill\x20state\x20is\x20','reason','message','skills','join','INSTALL_FAILED','startsWith','44reZGRP','48271HZBFJu'];a147_0x2dca=function(){return _0xf8ce07;};return a147_0x2dca();}export function inspectInstalledBuiltinSkillVersion(_0x4bd91b,_0x424e64={}){const _0x44880b=a147_0x1d61b2,_0x1b4a87=installedSkillPath(_0x424e64[_0x44880b(0xa2)]??homedir());if(_0x1b4a87[_0x44880b(0x83)]===_0x44880b(0x7d))return{'state':'missing','expectedVersion':_0x4bd91b,'repairCommand':REPAIR_COMMAND};if(_0x1b4a87[_0x44880b(0x83)]===_0x44880b(0x6f))return{'state':_0x44880b(0x6f),'expectedVersion':_0x4bd91b,'reason':_0x1b4a87[_0x44880b(0x8c)],'repairCommand':REPAIR_COMMAND};try{const _0x35c251=frontmatterValue(readFileSync(join(_0x1b4a87['path'],_0x44880b(0x79)),_0x44880b(0x96)),'version');return{'state':_0x35c251===_0x4bd91b?'current':_0x44880b(0xa4),'expectedVersion':_0x4bd91b,'skillVersion':_0x35c251,'installedPath':_0x1b4a87[_0x44880b(0xa1)],'repairCommand':REPAIR_COMMAND};}catch(_0x104cbe){return{'state':_0x44880b(0x6f),'expectedVersion':_0x4bd91b,'installedPath':_0x1b4a87[_0x44880b(0xa1)],'reason':_0x104cbe instanceof Error?_0x104cbe['message']:String(_0x104cbe),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x44e119={}){const _0x5857ff=a147_0x1d61b2,_0x10d3c5=_0x44e119[_0x5857ff(0x9c)]??DEFAULT_PACKAGE_ROOT;let _0x54eec4;try{_0x54eec4=readSource(_0x10d3c5);}catch(_0x2ebc40){return{'state':'unverifiable','packageVersion':_0x5857ff(0x76),'reason':_0x2ebc40 instanceof Error?_0x2ebc40['message']:String(_0x2ebc40),'repairCommand':REPAIR_COMMAND};}const _0x315968=installedSkillPath(_0x44e119[_0x5857ff(0xa2)]??homedir());if(_0x315968[_0x5857ff(0x83)]==='missing')return{'state':_0x5857ff(0x7d),'packageVersion':_0x54eec4[_0x5857ff(0x9f)],'repairCommand':REPAIR_COMMAND};if(_0x315968['state']===_0x5857ff(0x6f))return{'state':_0x5857ff(0x6f),'packageVersion':_0x54eec4[_0x5857ff(0x9f)],'reason':_0x315968[_0x5857ff(0x8c)],'repairCommand':REPAIR_COMMAND};try{const _0x10bd17=frontmatterValue(readFileSync(join(_0x315968['path'],_0x5857ff(0x79)),_0x5857ff(0x96)),'version');if(_0x10bd17!==_0x54eec4[_0x5857ff(0x7b)])return{'state':_0x5857ff(0xa4),'packageVersion':_0x54eec4[_0x5857ff(0x9f)],'skillVersion':_0x10bd17,'installedPath':_0x315968[_0x5857ff(0xa1)],'repairCommand':REPAIR_COMMAND};const _0x282a83=listFiles(_0x315968[_0x5857ff(0xa1)]),_0x39829c=digestFiles(_0x315968[_0x5857ff(0xa1)],_0x282a83);return{'state':sameFiles(_0x282a83,_0x54eec4['manifest'][_0x5857ff(0x70)])&&_0x39829c===_0x54eec4['manifest'][_0x5857ff(0xa0)]?'current':_0x5857ff(0xac),'packageVersion':_0x54eec4[_0x5857ff(0x9f)],'skillVersion':_0x10bd17,'installedPath':_0x315968[_0x5857ff(0xa1)],'digest':_0x39829c,'repairCommand':REPAIR_COMMAND};}catch(_0x58bfe0){return{'state':_0x5857ff(0x6f),'packageVersion':_0x54eec4[_0x5857ff(0x9f)],'installedPath':_0x315968[_0x5857ff(0xa1)],'reason':_0x58bfe0 instanceof Error?_0x58bfe0[_0x5857ff(0x8d)]:String(_0x58bfe0),'repairCommand':REPAIR_COMMAND};}}function failure(_0x35a8db,_0x489d7e,_0x4b1df2,_0x42ac4b){const _0xc85b96=a147_0x1d61b2;return{'ok':![],'code':_0x35a8db,'packageVersion':_0x489d7e['packageVersion'],'skillVersion':_0x489d7e[_0xc85b96(0x7b)],'installedPath':_0x42ac4b,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4b1df2 instanceof Error?_0x4b1df2[_0xc85b96(0x8d)]:String(_0x4b1df2)};}function a147_0x2ef8(_0x54b7b0,_0x4b88e1){_0x54b7b0=_0x54b7b0-0x6e;const _0x2dca61=a147_0x2dca();let _0x2ef889=_0x2dca61[_0x54b7b0];return _0x2ef889;}export function installBuiltinSkill(_0x137eb8={}){const _0x34202f=a147_0x1d61b2,_0x1781ff=_0x137eb8['packageRoot']??DEFAULT_PACKAGE_ROOT,_0xc71b4b=_0x137eb8['home']??homedir();let _0x5d302f;try{_0x5d302f=readSource(_0x1781ff);}catch(_0x826695){return failure('SOURCE_INVALID',{'packageVersion':'unknown','skillVersion':'unknown'},_0x826695);}const _0x336663=inspectBuiltinSkill({'packageRoot':_0x1781ff,'home':_0xc71b4b}),_0xfb3ec=runNpxSkillsAddGlobal(_0x1781ff,_0x5d302f[_0x34202f(0xa3)],{'stdio':_0x137eb8[_0x34202f(0x9d)]??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0xc71b4b}});if(_0xfb3ec['skipped'])return{'ok':!![],'packageVersion':_0x5d302f['packageVersion'],'skillVersion':_0x5d302f[_0x34202f(0x7b)],'installedPath':_0x336663[_0x34202f(0x98)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0xfb3ec['ok'])return failure(_0x34202f(0x90),_0x5d302f,_0xfb3ec[_0x34202f(0x72)]??_0x34202f(0x74)+_0xfb3ec[_0x34202f(0xae)]);const _0x50b84a=inspectBuiltinSkill({'packageRoot':_0x1781ff,'home':_0xc71b4b});if(_0x50b84a[_0x34202f(0x83)]!==_0x34202f(0x9e)){const _0x2fe24d=_0x50b84a['reason']??_0x34202f(0x8b)+_0x50b84a['state'];return failure(_0x34202f(0x73),_0x5d302f,_0xfb3ec[_0x34202f(0x75)]?_0x2fe24d+'\x0a'+_0xfb3ec['partialFailure']['output']:_0x2fe24d,_0x50b84a[_0x34202f(0x98)]);}return _0xfb3ec[_0x34202f(0x75)]&&(debug(_0x34202f(0xb5),_0xfb3ec[_0x34202f(0x75)][_0x34202f(0x7e)]),console['log'](_0x34202f(0x9a)+_0x5d302f['skillVersion']+_0x34202f(0x99)+_0xfb3ec['partialFailure']['count']+_0x34202f(0x71))),{'ok':!![],'packageVersion':_0x5d302f[_0x34202f(0x9f)],'skillVersion':_0x5d302f[_0x34202f(0x7b)],'installedPath':_0x50b84a[_0x34202f(0x98)],'changed':_0x336663[_0x34202f(0x83)]!==_0x34202f(0x9e),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a147_0x495b24=a147_0x7ea9;function a147_0x3c3f(){const _0x32ce5d=['missing','sort','CLI\x20Built-in\x20Skill\x20','1185663hgqWEA','Unsupported\x20Skill\x20entry:\x20','match','655032OhiTvj','Installed\x20Skill\x20state\x20is\x20','isDirectory','Symbolic\x20link\x20is\x20not\x20allowed:\x20','absent','4898362vFWZPU','count','skipped','reason','packageRoot',':\x5cs*(.+)$','117124dogOEM','name','path','isFile','present','VERIFY_FAILED','join','output','skillVersion','files','INSTALL_FAILED','log','root','577384ESUhHe','update','home','current','30LXjQoy','lovrabet-skills','message','schemaVersion','installedPath','split','digest','279709uKXtIu','lovrabet\x20cli-skill\x20install','trim','flatMap','skills','parse','hex','unknown','every','version_mismatch','isSymbolicLink','21364256hDVlBt','package.json','unverifiable','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','packageVersion','manifest','state','Unsafe\x20manifest\x20path:\x20','skills@latest\x20exited\x20','SKILL.md','SOURCE_INVALID','includes','sha256','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','\x20verified;\x20','version','utf8','lovrabet','error','stdio','pipe','partialFailure'];a147_0x3c3f=function(){return _0x32ce5d;};return a147_0x3c3f();}function a147_0x7ea9(_0x422465,_0x4876af){_0x422465=_0x422465-0x180;const _0x3c3f0a=a147_0x3c3f();let _0x7ea90b=_0x3c3f0a[_0x422465];return _0x7ea90b;}(function(_0x2b6dbf,_0x5ad0c5){const _0x2ba1bd=a147_0x7ea9,_0x45298e=_0x2b6dbf();while(!![]){try{const _0x13fcb7=-parseInt(_0x2ba1bd(0x18c))/0x1+-parseInt(_0x2ba1bd(0x1be))/0x2+-parseInt(_0x2ba1bd(0x1b0))/0x3+parseInt(_0x2ba1bd(0x181))/0x4*(-parseInt(_0x2ba1bd(0x185))/0x5)+parseInt(_0x2ba1bd(0x1b3))/0x6+-parseInt(_0x2ba1bd(0x1b8))/0x7+parseInt(_0x2ba1bd(0x197))/0x8;if(_0x13fcb7===_0x5ad0c5)break;else _0x45298e['push'](_0x45298e['shift']());}catch(_0x535d2b){_0x45298e['push'](_0x45298e['shift']());}}}(a147_0x3c3f,0x75472));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a147_0x495b24(0x18d),SKILL_NAME=a147_0x495b24(0x1a8),debug=debuglog(a147_0x495b24(0x186));function frontmatterValue(_0x3fc55c,_0x3aadee){const _0x4796bb=a147_0x495b24;return _0x3fc55c[_0x4796bb(0x1b2)](new RegExp('^'+_0x3aadee+_0x4796bb(0x1bd),'m'))?.[0x1]?.[_0x4796bb(0x18e)]()??'';}function listFiles(_0x2f33a3,_0x4886fd=_0x2f33a3){const _0x20db45=a147_0x495b24;return readdirSync(_0x4886fd,{'withFileTypes':!![]})[_0x20db45(0x18f)](_0x495841=>{const _0x2f0151=_0x20db45,_0x3114d8=join(_0x4886fd,_0x495841['name']),_0x5e388e=lstatSync(_0x3114d8);if(_0x5e388e[_0x2f0151(0x196)]())throw new Error(_0x2f0151(0x1b6)+_0x3114d8);if(_0x5e388e[_0x2f0151(0x1b5)]())return listFiles(_0x2f33a3,_0x3114d8);if(!_0x5e388e[_0x2f0151(0x1c1)]())throw new Error(_0x2f0151(0x1b1)+_0x3114d8);return[relative(_0x2f33a3,_0x3114d8)[_0x2f0151(0x18a)](sep)[_0x2f0151(0x1c4)]('/')];})[_0x20db45(0x1ae)]((_0x5bf1e6,_0x5f213f)=>_0x5bf1e6<_0x5f213f?-0x1:_0x5bf1e6>_0x5f213f?0x1:0x0);}function digestFiles(_0x39e381,_0x4db77a){const _0x2234cf=a147_0x495b24,_0x1e0aa9=createHash(_0x2234cf(0x1a3));for(const _0x3a9403 of _0x4db77a){if(_0x3a9403['startsWith']('/')||_0x3a9403[_0x2234cf(0x18a)]('/')[_0x2234cf(0x1a2)]('..')||_0x3a9403[_0x2234cf(0x1a2)]('\x5c'))throw new Error(_0x2234cf(0x19e)+_0x3a9403);_0x1e0aa9[_0x2234cf(0x182)](_0x3a9403),_0x1e0aa9[_0x2234cf(0x182)]('\x00'),_0x1e0aa9['update'](readFileSync(join(_0x39e381,..._0x3a9403[_0x2234cf(0x18a)]('/')))),_0x1e0aa9['update']('\x00');}return _0x1e0aa9[_0x2234cf(0x18b)](_0x2234cf(0x192));}function sameFiles(_0x358c1a,_0x3f2503){const _0xa71f25=a147_0x495b24;return _0x358c1a['length']===_0x3f2503['length']&&_0x358c1a[_0xa71f25(0x194)]((_0x32d1eb,_0x2b5e94)=>_0x32d1eb===_0x3f2503[_0x2b5e94]);}function readSource(_0x699c33){const _0x11c81c=a147_0x495b24,_0x1e0152=JSON[_0x11c81c(0x191)](readFileSync(join(_0x699c33,_0x11c81c(0x198)),_0x11c81c(0x1a7))),_0x3aa8c9=JSON[_0x11c81c(0x191)](readFileSync(join(_0x699c33,_0x11c81c(0x190),'lovrabet.manifest.json'),_0x11c81c(0x1a7))),_0x1b3a44=join(_0x699c33,_0x11c81c(0x190),SKILL_NAME),_0x41c2fd=frontmatterValue(readFileSync(join(_0x1b3a44,_0x11c81c(0x1a0)),_0x11c81c(0x1a7)),'version'),_0x2f8519=listFiles(_0x1b3a44);if(_0x3aa8c9[_0x11c81c(0x188)]!==0x1||_0x3aa8c9[_0x11c81c(0x1bf)]!==SKILL_NAME||!_0x1e0152[_0x11c81c(0x1a6)]||_0x3aa8c9[_0x11c81c(0x19b)]!==_0x1e0152[_0x11c81c(0x1a6)]||_0x3aa8c9[_0x11c81c(0x1c6)]!==_0x1e0152[_0x11c81c(0x1a6)]||_0x41c2fd!==_0x1e0152[_0x11c81c(0x1a6)]||!sameFiles(_0x2f8519,_0x3aa8c9[_0x11c81c(0x1c7)])||digestFiles(_0x1b3a44,_0x2f8519)!==_0x3aa8c9[_0x11c81c(0x18b)])throw new Error(_0x11c81c(0x1a4));return{'packageVersion':_0x1e0152[_0x11c81c(0x1a6)],'skillVersion':_0x41c2fd,'root':_0x1b3a44,'manifest':_0x3aa8c9};}function installedSkillPath(_0x5aea55){const _0x1f764c=a147_0x495b24,_0x50fafb=resolveInstalledSkill(SKILL_NAME,{'home':_0x5aea55});if(_0x50fafb[_0x1f764c(0x19d)]===_0x1f764c(0x1c2))return{'state':_0x1f764c(0x1c2),'path':dirname(_0x50fafb[_0x1f764c(0x1c0)])};if(_0x50fafb['state']===_0x1f764c(0x1b7))return{'state':'missing'};return{'state':_0x1f764c(0x199),'reason':_0x50fafb[_0x1f764c(0x1bb)]};}export function inspectInstalledBuiltinSkillVersion(_0x1a9234,_0x17c709={}){const _0x39988f=a147_0x495b24,_0x2130dc=installedSkillPath(_0x17c709[_0x39988f(0x183)]??homedir());if(_0x2130dc[_0x39988f(0x19d)]===_0x39988f(0x1ad))return{'state':_0x39988f(0x1ad),'expectedVersion':_0x1a9234,'repairCommand':REPAIR_COMMAND};if(_0x2130dc[_0x39988f(0x19d)]===_0x39988f(0x199))return{'state':'unverifiable','expectedVersion':_0x1a9234,'reason':_0x2130dc[_0x39988f(0x1bb)],'repairCommand':REPAIR_COMMAND};try{const _0x54dbfc=frontmatterValue(readFileSync(join(_0x2130dc['path'],'SKILL.md'),_0x39988f(0x1a7)),_0x39988f(0x1a6));return{'state':_0x54dbfc===_0x1a9234?_0x39988f(0x184):_0x39988f(0x195),'expectedVersion':_0x1a9234,'skillVersion':_0x54dbfc,'installedPath':_0x2130dc[_0x39988f(0x1c0)],'repairCommand':REPAIR_COMMAND};}catch(_0x1600dc){return{'state':_0x39988f(0x199),'expectedVersion':_0x1a9234,'installedPath':_0x2130dc[_0x39988f(0x1c0)],'reason':_0x1600dc instanceof Error?_0x1600dc['message']:String(_0x1600dc),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x4d032a={}){const _0x2ae602=a147_0x495b24,_0x2a80d0=_0x4d032a['packageRoot']??DEFAULT_PACKAGE_ROOT;let _0x3f20eb;try{_0x3f20eb=readSource(_0x2a80d0);}catch(_0x2d796d){return{'state':'unverifiable','packageVersion':_0x2ae602(0x193),'reason':_0x2d796d instanceof Error?_0x2d796d['message']:String(_0x2d796d),'repairCommand':REPAIR_COMMAND};}const _0x10eb68=installedSkillPath(_0x4d032a[_0x2ae602(0x183)]??homedir());if(_0x10eb68[_0x2ae602(0x19d)]===_0x2ae602(0x1ad))return{'state':_0x2ae602(0x1ad),'packageVersion':_0x3f20eb['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x10eb68[_0x2ae602(0x19d)]==='unverifiable')return{'state':_0x2ae602(0x199),'packageVersion':_0x3f20eb[_0x2ae602(0x19b)],'reason':_0x10eb68[_0x2ae602(0x1bb)],'repairCommand':REPAIR_COMMAND};try{const _0x1dd68f=frontmatterValue(readFileSync(join(_0x10eb68[_0x2ae602(0x1c0)],_0x2ae602(0x1a0)),_0x2ae602(0x1a7)),_0x2ae602(0x1a6));if(_0x1dd68f!==_0x3f20eb[_0x2ae602(0x1c6)])return{'state':_0x2ae602(0x195),'packageVersion':_0x3f20eb['packageVersion'],'skillVersion':_0x1dd68f,'installedPath':_0x10eb68['path'],'repairCommand':REPAIR_COMMAND};const _0x3edc37=listFiles(_0x10eb68['path']),_0x35c26b=digestFiles(_0x10eb68[_0x2ae602(0x1c0)],_0x3edc37);return{'state':sameFiles(_0x3edc37,_0x3f20eb[_0x2ae602(0x19c)][_0x2ae602(0x1c7)])&&_0x35c26b===_0x3f20eb['manifest'][_0x2ae602(0x18b)]?_0x2ae602(0x184):'content_mismatch','packageVersion':_0x3f20eb[_0x2ae602(0x19b)],'skillVersion':_0x1dd68f,'installedPath':_0x10eb68['path'],'digest':_0x35c26b,'repairCommand':REPAIR_COMMAND};}catch(_0x45bae0){return{'state':_0x2ae602(0x199),'packageVersion':_0x3f20eb[_0x2ae602(0x19b)],'installedPath':_0x10eb68[_0x2ae602(0x1c0)],'reason':_0x45bae0 instanceof Error?_0x45bae0[_0x2ae602(0x187)]:String(_0x45bae0),'repairCommand':REPAIR_COMMAND};}}function failure(_0x276b33,_0xb302d7,_0x379453,_0x29d066){const _0x41bfe5=a147_0x495b24;return{'ok':![],'code':_0x276b33,'packageVersion':_0xb302d7[_0x41bfe5(0x19b)],'skillVersion':_0xb302d7[_0x41bfe5(0x1c6)],'installedPath':_0x29d066,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x379453 instanceof Error?_0x379453['message']:String(_0x379453)};}export function installBuiltinSkill(_0x55e590={}){const _0x1ff3c1=a147_0x495b24,_0x45cdee=_0x55e590[_0x1ff3c1(0x1bc)]??DEFAULT_PACKAGE_ROOT,_0x35bea3=_0x55e590[_0x1ff3c1(0x183)]??homedir();let _0x6b7033;try{_0x6b7033=readSource(_0x45cdee);}catch(_0x3834ba){return failure(_0x1ff3c1(0x1a1),{'packageVersion':_0x1ff3c1(0x193),'skillVersion':'unknown'},_0x3834ba);}const _0xefe50f=inspectBuiltinSkill({'packageRoot':_0x45cdee,'home':_0x35bea3}),_0x3c3868=runNpxSkillsAddGlobal(_0x45cdee,_0x6b7033[_0x1ff3c1(0x180)],{'stdio':_0x55e590[_0x1ff3c1(0x1aa)]??_0x1ff3c1(0x1ab),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x35bea3}});if(_0x3c3868[_0x1ff3c1(0x1ba)])return{'ok':!![],'packageVersion':_0x6b7033[_0x1ff3c1(0x19b)],'skillVersion':_0x6b7033[_0x1ff3c1(0x1c6)],'installedPath':_0xefe50f[_0x1ff3c1(0x189)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3c3868['ok'])return failure(_0x1ff3c1(0x1c8),_0x6b7033,_0x3c3868[_0x1ff3c1(0x1a9)]??_0x1ff3c1(0x19f)+_0x3c3868['status']);const _0x285b83=inspectBuiltinSkill({'packageRoot':_0x45cdee,'home':_0x35bea3});if(_0x285b83[_0x1ff3c1(0x19d)]!==_0x1ff3c1(0x184)){const _0x4d09c1=_0x285b83[_0x1ff3c1(0x1bb)]??_0x1ff3c1(0x1b4)+_0x285b83[_0x1ff3c1(0x19d)];return failure(_0x1ff3c1(0x1c3),_0x6b7033,_0x3c3868[_0x1ff3c1(0x1ac)]?_0x4d09c1+'\x0a'+_0x3c3868[_0x1ff3c1(0x1ac)][_0x1ff3c1(0x1c5)]:_0x4d09c1,_0x285b83[_0x1ff3c1(0x189)]);}return _0x3c3868[_0x1ff3c1(0x1ac)]&&(debug(_0x1ff3c1(0x19a),_0x3c3868[_0x1ff3c1(0x1ac)][_0x1ff3c1(0x1c5)]),console[_0x1ff3c1(0x1c9)](_0x1ff3c1(0x1af)+_0x6b7033[_0x1ff3c1(0x1c6)]+_0x1ff3c1(0x1a5)+_0x3c3868[_0x1ff3c1(0x1ac)][_0x1ff3c1(0x1b9)]+'\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.')),{'ok':!![],'packageVersion':_0x6b7033[_0x1ff3c1(0x19b)],'skillVersion':_0x6b7033[_0x1ff3c1(0x1c6)],'installedPath':_0x285b83['installedPath'],'changed':_0xefe50f[_0x1ff3c1(0x19d)]!==_0x1ff3c1(0x184),'repairCommand':REPAIR_COMMAND};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x537a0f=a148_0x31d5;(function(_0x4bcfc3,_0x28ed2a){const _0x3c8982=a148_0x31d5,_0x3784c8=_0x4bcfc3();while(!![]){try{const _0x594c04=-parseInt(_0x3c8982(0x150))/0x1*(parseInt(_0x3c8982(0x12a))/0x2)+-parseInt(_0x3c8982(0x122))/0x3+parseInt(_0x3c8982(0x146))/0x4+parseInt(_0x3c8982(0x11d))/0x5*(-parseInt(_0x3c8982(0x127))/0x6)+-parseInt(_0x3c8982(0x11f))/0x7+-parseInt(_0x3c8982(0x135))/0x8*(parseInt(_0x3c8982(0x123))/0x9)+-parseInt(_0x3c8982(0x128))/0xa*(-parseInt(_0x3c8982(0x14c))/0xb);if(_0x594c04===_0x28ed2a)break;else _0x3784c8['push'](_0x3784c8['shift']());}catch(_0x507cee){_0x3784c8['push'](_0x3784c8['shift']());}}}(a148_0x1045,0x9d2d3));import{execaSync}from'execa';import{LOVRABET_SKILL_SOURCE as a148_0x45dc3f}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a148_0x31d5(_0x29cf5a,_0x273585){_0x29cf5a=_0x29cf5a-0x11a;const _0x1045ab=a148_0x1045();let _0x31d5ee=_0x1045ab[_0x29cf5a];return _0x31d5ee;}function a148_0x1045(){const _0x3678e8=['absent','NPX_NOT_FOUND','INSTALL_PARTIAL','state','unknown','Skill\x20\x22','13270SGiVdN','EPERM','2065658PRDNEy','ENOENT','\x20failed\x20target(s)','1990482gkeaZZ','5126049YlgKvI','expectedSkillName','stdout','message','1482YYViCn','1252870xyPAVi','npx\x20terminated\x20by\x20signal\x20','302SnQMTq','exitCode','code','npx\x20failed\x20to\x20start','PERMISSION_DENIED','signal','NPM_CONFIG_GLOBAL','skills@latest','CHILD_EXIT_NONZERO','partialFailure','exit\x20','8aSoYoI','log','failed','CHILD_TERMINATED','unverifiable','EACCES','SPAWN_FAILED','internalSkillSource','match','presence','filter','present','!\x20Could\x20not\x20verify\x20\x22','npx','stderr','join','SKILL_NOT_INSTALLED','1433136OifORq','trim','shortMessage','\x22\x20install\x20state:\x20','checked','pipe','220XENBXU','skipNpxSkillsEnvSuffix','npm_config_global','stdio','242ZBjzAX'];a148_0x1045=function(){return _0x3678e8;};return a148_0x1045();}import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a148_0x45dc3f;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a148_0x537a0f(0x13c)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG['globalSkillName'];export function resolveGlobalSkillName(_0x4e778a){const _0x1b36ce=a148_0x537a0f;switch(_0x4e778a[_0x1b36ce(0x147)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a148_0x537a0f(0x14d)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x21dc83,_0x3bff82,_0x256af3){return{'ok':![],'status':_0x3bff82,'code':_0x21dc83,'error':'['+_0x21dc83+']\x20'+_0x256af3};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x5310a9,_0x548ea3=LOVRABET_SKILL_SOURCE,_0x14dc3a){const _0x21849d=a148_0x537a0f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x8fa515=['-y',_0x21849d(0x131),'add',_0x548ea3,'-g','-y'],_0x9e5990=[_0x21849d(0x142),..._0x8fa515][_0x21849d(0x144)]('\x20');console[_0x21849d(0x136)]('*\x20'+_0x9e5990);const _0x3f841a={...process.env};delete _0x3f841a[_0x21849d(0x14e)],delete _0x3f841a[_0x21849d(0x130)];const _0x3bed8e=execaSync('npx',_0x8fa515,{'cwd':_0x5310a9,'stdio':'pipe','env':_0x3f841a,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x183c74=[_0x3bed8e[_0x21849d(0x125)]?String(_0x3bed8e[_0x21849d(0x125)]):'',_0x3bed8e[_0x21849d(0x143)]?String(_0x3bed8e['stderr']):''][_0x21849d(0x13f)](Boolean)[_0x21849d(0x144)]('\x0a')[_0x21849d(0x147)](),_0x490f20=_0x3bed8e[_0x21849d(0x12b)]??null,_0x4ffc4b=_0x51eb77=>{const _0x39ed1f=_0x21849d;return _0x14dc3a?.[_0x39ed1f(0x14f)]!==_0x39ed1f(0x14b)&&!_0x51eb77[_0x39ed1f(0x133)]&&_0x183c74&&console['log'](_0x183c74),_0x51eb77;};if(_0x3bed8e[_0x21849d(0x12c)]){const _0x50ab41=_0x3bed8e[_0x21849d(0x12c)]===_0x21849d(0x120)?_0x21849d(0x152):_0x3bed8e['code']===_0x21849d(0x11e)||_0x3bed8e['code']===_0x21849d(0x13a)?_0x21849d(0x12e):_0x21849d(0x13b);return _0x4ffc4b(failure(_0x50ab41,_0x490f20,_0x3bed8e['shortMessage']??_0x3bed8e[_0x21849d(0x126)]??_0x3bed8e[_0x21849d(0x12c)]));}if(_0x3bed8e['signal'])return _0x4ffc4b(failure(_0x21849d(0x138),_0x490f20,_0x21849d(0x129)+_0x3bed8e[_0x21849d(0x12f)]));if(_0x3bed8e[_0x21849d(0x137)]&&_0x490f20===null)return _0x4ffc4b(failure(_0x21849d(0x13b),_0x490f20,_0x3bed8e['shortMessage']??_0x3bed8e[_0x21849d(0x126)]??_0x21849d(0x12d)));if(_0x490f20!==0x0)return _0x4ffc4b(failure(_0x21849d(0x132),_0x490f20,_0x183c74||_0x3bed8e[_0x21849d(0x148)]||_0x21849d(0x134)+(_0x490f20??_0x21849d(0x11b))));const _0x46fa2f=_0x14dc3a?.[_0x21849d(0x124)]??resolveGlobalSkillName(_0x548ea3),_0xa25289=_0x46fa2f?resolveInstalledSkill(_0x46fa2f,_0x14dc3a?.[_0x21849d(0x13e)]):undefined,_0x2ca603=_0x183c74[_0x21849d(0x13d)](/Failed to install\s+(\d+)/i);if(_0x2ca603&&Number(_0x2ca603[0x1])>0x0){const _0x40f98f='Installer\x20reported\x20'+_0x2ca603[0x1]+_0x21849d(0x121)+(_0x183c74?':\x0a'+_0x183c74:'');if(_0xa25289?.['state']===_0x21849d(0x140))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x2ca603[0x1]),'output':_0x183c74}};return _0x4ffc4b(failure(_0x21849d(0x153),0x0,_0x40f98f));}if(_0x46fa2f&&_0xa25289){if(_0xa25289[_0x21849d(0x11a)]===_0x21849d(0x151))return _0x4ffc4b(failure(_0x21849d(0x145),0x0,_0x21849d(0x11c)+_0x46fa2f+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0xa25289[_0x21849d(0x14a)]['join'](',\x20')+')'));_0xa25289[_0x21849d(0x11a)]===_0x21849d(0x139)&&console['warn'](_0x21849d(0x141)+_0x46fa2f+_0x21849d(0x149)+_0xa25289['reason']);}return _0x4ffc4b({'ok':!![],'status':0x0});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a149_0x2fcc(_0x16da18,_0x4ce62a){_0x16da18=_0x16da18-0x166;const _0x5b7675=a149_0x5b76();let _0x2fcc19=_0x5b7675[_0x16da18];return _0x2fcc19;}const a149_0x715426=a149_0x2fcc;(function(_0xedf0d,_0x5aef5c){const _0x396f2b=a149_0x2fcc,_0x2c6011=_0xedf0d();while(!![]){try{const _0x4de691=parseInt(_0x396f2b(0x172))/0x1+parseInt(_0x396f2b(0x16c))/0x2+parseInt(_0x396f2b(0x16d))/0x3*(parseInt(_0x396f2b(0x16a))/0x4)+-parseInt(_0x396f2b(0x170))/0x5+parseInt(_0x396f2b(0x16b))/0x6*(parseInt(_0x396f2b(0x176))/0x7)+-parseInt(_0x396f2b(0x171))/0x8*(parseInt(_0x396f2b(0x177))/0x9)+parseInt(_0x396f2b(0x166))/0xa*(-parseInt(_0x396f2b(0x174))/0xb);if(_0x4de691===_0x5aef5c)break;else _0x2c6011['push'](_0x2c6011['shift']());}catch(_0x5f0a9d){_0x2c6011['push'](_0x2c6011['shift']());}}}(a149_0x5b76,0x7dfd2));export const METADATA_FILE=a149_0x715426(0x167);export const SKILL_FILE=a149_0x715426(0x173);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a149_0x715426(0x169)]);export const IGNORED_DIR_NAMES=new Set(['.git',a149_0x715426(0x178),a149_0x715426(0x175),'node_modules',a149_0x715426(0x16f),a149_0x715426(0x179),a149_0x715426(0x16e),a149_0x715426(0x168),'.turbo','.cache']);function a149_0x5b76(){const _0x5888cc=['.hg','dist','10yNfbwp','lovrabet.skill.json','coverage','.DS_Store','100icFnsS','1002zmGsVb','532334YcgrGj','46233gHQWJp','build','.next','40445Ksixae','808bdWxpK','739393TsMYlB','SKILL.md','8588382hCyors','.svn','32963glMRUW','77733SzhelJ'];a149_0x5b76=function(){return _0x5888cc;};return a149_0x5b76();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e93e9,_0x4cbebe){const _0x2826f2=a150_0x4c4a,_0x4a7b63=_0x3e93e9();while(!![]){try{const _0x47be03=parseInt(_0x2826f2(0x171))/0x1*(parseInt(_0x2826f2(0x172))/0x2)+-parseInt(_0x2826f2(0x174))/0x3+-parseInt(_0x2826f2(0x16a))/0x4+parseInt(_0x2826f2(0x16d))/0x5+-parseInt(_0x2826f2(0x16b))/0x6+parseInt(_0x2826f2(0x163))/0x7*(-parseInt(_0x2826f2(0x168))/0x8)+-parseInt(_0x2826f2(0x167))/0x9*(-parseInt(_0x2826f2(0x165))/0xa);if(_0x47be03===_0x4cbebe)break;else _0x4a7b63['push'](_0x4a7b63['shift']());}catch(_0x12db84){_0x4a7b63['push'](_0x4a7b63['shift']());}}}(a150_0x3144,0xda5c9));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x2d1891,_0x37ae3d){const _0x515024=a150_0x4c4a,_0x11d5e3=normalizeSkillRelativePath(_0x37ae3d),_0x400f1e=realOrResolved(_0x2d1891),_0x35599c=resolve(_0x400f1e,..._0x11d5e3[_0x515024(0x166)]('/'));if(!isPathInside(_0x35599c,_0x400f1e))throw CliErrors[_0x515024(0x169)](_0x515024(0x161)+_0x37ae3d);return ensureNoSymlinkInManagedPath(_0x400f1e,_0x11d5e3),_0x35599c;}export function ensureNoSymlinkInManagedPath(_0x2190e8,_0x5d1e3f){const _0xe5c0ac=a150_0x4c4a;let _0x4bedd3=_0x2190e8;for(const _0xf3372e of _0x5d1e3f[_0xe5c0ac(0x166)]('/')){_0x4bedd3=resolve(_0x4bedd3,_0xf3372e);const _0x16a7d3=lstatIfPresent(_0x4bedd3);if(_0x16a7d3?.['isSymbolicLink']())throw CliErrors[_0xe5c0ac(0x169)](_0xe5c0ac(0x170)+_0x5d1e3f);}}export function isDanglingSymlink(_0xb54288){const _0x456981=a150_0x4c4a;try{return lstatSync(_0xb54288)[_0x456981(0x173)]();}catch{return![];}}export function resolveSymlinkTarget(_0x1c0878){const _0x6df33=readlinkSync(_0x1c0878);return isAbsolute(_0x6df33)?_0x6df33:resolve(dirname(_0x1c0878),_0x6df33);}function a150_0x3144(){const _0x56b341=['6696380LyePsU','.tmp','from','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','4QPTJAw','108872KRFgAc','isSymbolicLink','2100777onzEFX','startsWith','Unsafe\x20Skill\x20file\x20path:\x20','stringify','14cTJENo','utf8','40JWCTPd','split','6405606HbbyHD','5323048lrqgzL','validation','1561456Fiosso','6528972tvXAnI','endsWith'];a150_0x3144=function(){return _0x56b341;};return a150_0x3144();}export function isPathInside(_0x5b2d15,_0x1727f8){const _0x5733ba=a150_0x4c4a,_0x2c7948=_0x5b2d15[_0x5733ba(0x16c)](sep)?_0x5b2d15:''+_0x5b2d15+sep,_0x4f3a82=_0x1727f8['endsWith'](sep)?_0x1727f8:''+_0x1727f8+sep;return _0x5b2d15===_0x1727f8||_0x2c7948[_0x5733ba(0x160)](_0x4f3a82);}export function realOrResolved(_0x102731){try{return realpathSync(_0x102731);}catch{return resolve(_0x102731);}}function a150_0x4c4a(_0x3bc8bf,_0x374d8e){_0x3bc8bf=_0x3bc8bf-0x160;const _0x314456=a150_0x3144();let _0x4c4a49=_0x314456[_0x3bc8bf];return _0x4c4a49;}export function lstatIfPresent(_0x50b9dd){try{return lstatSync(_0x50b9dd);}catch{return undefined;}}export function writeTextAtomic(_0x4ae29c,_0x446d2a,_0x4ece65){const _0x4c1ec5=a150_0x4c4a;writeBytesAtomic(_0x4ae29c,Buffer[_0x4c1ec5(0x16f)](_0x446d2a,_0x4c1ec5(0x164)),_0x4ece65);}export function writeBytesAtomic(_0x58469b,_0x10fb3e,_0x30c15c){const _0x52f0ca=a150_0x4c4a,_0x567406=_0x58469b+_0x52f0ca(0x16e);try{writeFileSync(_0x567406,_0x10fb3e,{'mode':_0x30c15c}),renameSync(_0x567406,_0x58469b);}catch(_0x3096e9){try{rmSync(_0x567406,{'force':!![]});}catch{}throw _0x3096e9;}}export function writeJsonAtomic(_0x3c7607,_0x58e8f5){const _0x50b40c=a150_0x4c4a;writeTextAtomic(_0x3c7607,JSON[_0x50b40c(0x162)](_0x58e8f5,null,0x2)+'\x0a',0x180);}
|