@imgly/plugin-qr-code-web 1.69.0-rc.5 → 1.69.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +3 -3
- package/package.json +2 -2
package/dist/.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@cesdk+engine@1.69.0-rc.5_react@18.3.1/node_modules/@cesdk/engine/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.27/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+prop-types@15.7.15/node_modules/@types/prop-types/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.27/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react-dom@18.3.7_@types+react@18.3.27/node_modules/@types/react-dom/client.d.ts","../../../node_modules/.pnpm/@cesdk+cesdk-js@1.69.0-rc.5_react@18.3.1/node_modules/@cesdk/cesdk-js/index.d.ts","../../../internal/plugin-utils/dist/assetSources/CustomAssetSource.d.ts","../../../internal/plugin-utils/dist/assetSources/IndexedDBAssetSource.d.ts","../../../internal/plugin-utils/dist/assetSources/AggregatedAssetSource.d.ts","../../../internal/plugin-utils/dist/metadata/Metadata.d.ts","../../../internal/plugin-utils/dist/metadata/types.d.ts","../../../internal/plugin-utils/dist/metadata/FillProcessingMetadata.d.ts","../../../internal/plugin-utils/dist/processing/fillProcessing.d.ts","../../../internal/plugin-utils/dist/processing/initializeFillProcessing.d.ts","../../../internal/plugin-utils/dist/processing/registerFillProcessingComponents.d.ts","../../../internal/plugin-utils/dist/types/Optional.d.ts","../../../internal/plugin-utils/dist/types/UserInterfaceConfiguration.d.ts","../../../internal/plugin-utils/dist/utils/colors.d.ts","../../../internal/plugin-utils/dist/utils/upload.d.ts","../../../internal/plugin-utils/dist/utils/uuid.d.ts","../../../internal/plugin-utils/dist/utils/images.d.ts","../../../internal/plugin-utils/dist/utils/isDefined.d.ts","../../../internal/plugin-utils/dist/utils/toArray.d.ts","../../../internal/plugin-utils/dist/translationHelpers.d.ts","../../../internal/plugin-utils/dist/index.d.ts","../src/lib/qrcodegen.ts","../src/qr.ts","../src/plugin.ts","../src/index.ts","../src/types.ts","../esbuild/global.d.ts","../../../node_modules/.pnpm/@types+ndarray@1.0.14/node_modules/@types/ndarray/index.d.ts"],"fileIdsList":[[38],[32],[39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56],[42,43],[38,43,57],[38,57],[32,36,37],[36],[33,34,35],[60],[32,38,57,59],[58]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"19a56edafeedebbacd96095f109b68cc07a2c6f5a7a2d8c9368a9b5f97bbed61","impliedFormat":99},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","impliedFormat":1},{"version":"316db29a78bb9ab76ca9ac68a35cfaf3ac4184d8853ac1f2637bb2b9f3b94a0d","impliedFormat":99},"395930038878d2820bae19148bfbbfea0dc4d6a5f0937081d1f818aa1a5344c8","bb310394bed87e0518177d56d03ed9302644d7c6131f0065610c89159d785a53","48d1d8068fdbf3a80f65bfddc6833009bb73522a85ac66ba01cbe88431869a7b","9792a6ceb95a9b12a06bf77dafa60773111aebd3676e74d9f015a01b2ce9ad4e","3b66b77dc1c65e79292b24ca485ab9f224c57d59c9b1483dd4142040aaf3ab10","cb022fa0053b67ba57a4e61d2f655757b35fbaaf6bbab1f8e7d8e71c595e77ce","3c364501427d75086144822fdff35f9d12fc46d30a15589d4bf1ec58604e5d81","a711cc0a1b5635ad802047cc72ce5bbfedb3ee4166e1c58f6b67eae79d41b690","9925441ad64712f91750f97a35026857ef85bcbb673ce5232f814eee749a4932","67110113d27335e8fb7a32087a5cce2316627867b67b2df252d9cfbc3826ab34","0a8f2dbe1118ebc2070fec7bb921bb86cc48fa6e62a172a300e525e291e64488","8a501b3e5592be6d51ef04c1dbdf625c5c8d242612c8365b43ba2b6ea0a8dc18","8c0e8ac147427276b9977392caa11e35402b6a29460cf1bfa486e7fd8ab55850","da2cff8595faeb98d2246fbe5c2a96efdc04525b7868e258ad06a24b298ba648","2e6a7c89b4fb214da5440bf4fe04dfea899a6e9052f0c8493f8fb08c74e94a55","2eda1174ba5d7df48620e859dc6dd04e0abae33ae1b1bca7571ba3b33874ace0","1708d1f9960568c3d158a5d70d7837520a0a09bc1a9462e65468910397afba44","3ee86f1c530b1603f3dd9b377a778a44bbe1ecb0539cf7793d3967afd47c8f9b","a4927ed9cbea5c7fedcae6344c70b88d9026525545a6d48748071233b929ae33",{"version":"a34e609b123e592c453d82d23a97bc1a1773162919e8a5ebe61c0e2b5f332370","signature":"e3eed1477a2d2424e54602d871e92b9991f36c50479493ac9e28c41b6a311237"},{"version":"c3f7cf44598eec9c593a1aa386773f2da5bbc86007bd88b6896a18727c8b8f09","signature":"295575918649b896e61d1e278cd4a8f0c51f04157949490478be9edd392a088d"},{"version":"965d8f31afa6c8f6c0a16bf4787846fbadd67f4218cc095e54d389bdd3751e4e","signature":"f890f80c67a430560b1025ff5252963db52e35767e88d4345e9a162f4603dc3d"},{"version":"88d0533b03e062d398a7a12483f059b55aa62dec1a1d01910669cef95bd52f2d","signature":"c5f44b10ddc44d6aed9bfe8917e0519e7f008a9207ebdd95a38cb1f436a3eee2"},{"version":"64c10a4e32bc17cd9a26a683b7b3fcfe6722740a33a2cda157539917a9e164a8","signature":"6ba3cf0ee1e6e2f182413dc0e232e2138ce75747227f53f95db614dc774c9dee"},{"version":"9180dee655300a81a1ba84d945901d773f54b6e535a5730c56722c052ddddc33","affectsGlobalScope":true},{"version":"08c5f8a855984aaf4b7df847c53ac7e87c32350d4ab151370f262a822fa96d8d","impliedFormat":1}],"root":[[58,63]],"options":{"declaration":true,"declarationDir":"./","emitDeclarationOnly":true,"esModuleInterop":true,"module":6,"skipLibCheck":true,"strict":true,"target":4,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[41,1],[39,2],[40,1],[57,3],[44,4],[42,1],[43,1],[45,5],[46,6],[47,1],[50,1],[53,1],[51,1],[38,7],[37,8],[36,9],[61,10],[60,11],[59,12]],"version":"5.9.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@cesdk+engine@1.69.0-rc.6_react@18.3.1/node_modules/@cesdk/engine/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.27/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+prop-types@15.7.15/node_modules/@types/prop-types/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.27/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react-dom@18.3.7_@types+react@18.3.27/node_modules/@types/react-dom/client.d.ts","../../../node_modules/.pnpm/@cesdk+cesdk-js@1.69.0-rc.6_react@18.3.1/node_modules/@cesdk/cesdk-js/index.d.ts","../../../internal/plugin-utils/dist/assetSources/CustomAssetSource.d.ts","../../../internal/plugin-utils/dist/assetSources/IndexedDBAssetSource.d.ts","../../../internal/plugin-utils/dist/assetSources/AggregatedAssetSource.d.ts","../../../internal/plugin-utils/dist/metadata/Metadata.d.ts","../../../internal/plugin-utils/dist/metadata/types.d.ts","../../../internal/plugin-utils/dist/metadata/FillProcessingMetadata.d.ts","../../../internal/plugin-utils/dist/processing/fillProcessing.d.ts","../../../internal/plugin-utils/dist/processing/initializeFillProcessing.d.ts","../../../internal/plugin-utils/dist/processing/registerFillProcessingComponents.d.ts","../../../internal/plugin-utils/dist/types/Optional.d.ts","../../../internal/plugin-utils/dist/types/UserInterfaceConfiguration.d.ts","../../../internal/plugin-utils/dist/utils/colors.d.ts","../../../internal/plugin-utils/dist/utils/upload.d.ts","../../../internal/plugin-utils/dist/utils/uuid.d.ts","../../../internal/plugin-utils/dist/utils/images.d.ts","../../../internal/plugin-utils/dist/utils/isDefined.d.ts","../../../internal/plugin-utils/dist/utils/toArray.d.ts","../../../internal/plugin-utils/dist/translationHelpers.d.ts","../../../internal/plugin-utils/dist/index.d.ts","../src/lib/qrcodegen.ts","../src/qr.ts","../src/plugin.ts","../src/index.ts","../src/types.ts","../esbuild/global.d.ts","../../../node_modules/.pnpm/@types+ndarray@1.0.14/node_modules/@types/ndarray/index.d.ts"],"fileIdsList":[[38],[32],[39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56],[42,43],[38,43,57],[38,57],[32,36,37],[36],[33,34,35],[60],[32,38,57,59],[58]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"19a56edafeedebbacd96095f109b68cc07a2c6f5a7a2d8c9368a9b5f97bbed61","impliedFormat":99},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","impliedFormat":1},{"version":"316db29a78bb9ab76ca9ac68a35cfaf3ac4184d8853ac1f2637bb2b9f3b94a0d","impliedFormat":99},"395930038878d2820bae19148bfbbfea0dc4d6a5f0937081d1f818aa1a5344c8","bb310394bed87e0518177d56d03ed9302644d7c6131f0065610c89159d785a53","48d1d8068fdbf3a80f65bfddc6833009bb73522a85ac66ba01cbe88431869a7b","9792a6ceb95a9b12a06bf77dafa60773111aebd3676e74d9f015a01b2ce9ad4e","3b66b77dc1c65e79292b24ca485ab9f224c57d59c9b1483dd4142040aaf3ab10","cb022fa0053b67ba57a4e61d2f655757b35fbaaf6bbab1f8e7d8e71c595e77ce","3c364501427d75086144822fdff35f9d12fc46d30a15589d4bf1ec58604e5d81","a711cc0a1b5635ad802047cc72ce5bbfedb3ee4166e1c58f6b67eae79d41b690","9925441ad64712f91750f97a35026857ef85bcbb673ce5232f814eee749a4932","67110113d27335e8fb7a32087a5cce2316627867b67b2df252d9cfbc3826ab34","0a8f2dbe1118ebc2070fec7bb921bb86cc48fa6e62a172a300e525e291e64488","8a501b3e5592be6d51ef04c1dbdf625c5c8d242612c8365b43ba2b6ea0a8dc18","8c0e8ac147427276b9977392caa11e35402b6a29460cf1bfa486e7fd8ab55850","da2cff8595faeb98d2246fbe5c2a96efdc04525b7868e258ad06a24b298ba648","2e6a7c89b4fb214da5440bf4fe04dfea899a6e9052f0c8493f8fb08c74e94a55","2eda1174ba5d7df48620e859dc6dd04e0abae33ae1b1bca7571ba3b33874ace0","1708d1f9960568c3d158a5d70d7837520a0a09bc1a9462e65468910397afba44","3ee86f1c530b1603f3dd9b377a778a44bbe1ecb0539cf7793d3967afd47c8f9b","a4927ed9cbea5c7fedcae6344c70b88d9026525545a6d48748071233b929ae33",{"version":"a34e609b123e592c453d82d23a97bc1a1773162919e8a5ebe61c0e2b5f332370","signature":"e3eed1477a2d2424e54602d871e92b9991f36c50479493ac9e28c41b6a311237"},{"version":"c3f7cf44598eec9c593a1aa386773f2da5bbc86007bd88b6896a18727c8b8f09","signature":"295575918649b896e61d1e278cd4a8f0c51f04157949490478be9edd392a088d"},{"version":"92bb42bd6c8b2a3b0b1d73509d2b4c513400de59c0619bbe66fd26901c3ffc22","signature":"f890f80c67a430560b1025ff5252963db52e35767e88d4345e9a162f4603dc3d"},{"version":"88d0533b03e062d398a7a12483f059b55aa62dec1a1d01910669cef95bd52f2d","signature":"c5f44b10ddc44d6aed9bfe8917e0519e7f008a9207ebdd95a38cb1f436a3eee2"},{"version":"64c10a4e32bc17cd9a26a683b7b3fcfe6722740a33a2cda157539917a9e164a8","signature":"6ba3cf0ee1e6e2f182413dc0e232e2138ce75747227f53f95db614dc774c9dee"},{"version":"9180dee655300a81a1ba84d945901d773f54b6e535a5730c56722c052ddddc33","affectsGlobalScope":true},{"version":"08c5f8a855984aaf4b7df847c53ac7e87c32350d4ab151370f262a822fa96d8d","impliedFormat":1}],"root":[[58,63]],"options":{"declaration":true,"declarationDir":"./","emitDeclarationOnly":true,"esModuleInterop":true,"module":6,"skipLibCheck":true,"strict":true,"target":4,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[41,1],[39,2],[40,1],[57,3],[44,4],[42,1],[43,1],[45,5],[46,6],[47,1],[50,1],[53,1],[51,1],[38,7],[37,8],[36,9],[61,10],[60,11],[59,12]],"version":"5.9.3"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Rt=class{constructor(t,n){this.engine=t,this.key=n}hasData(t){return this.engine.block.isValid(t)&&this.engine.block.hasMetadata(t,this.key)}get(t){if(this.hasData(t))return JSON.parse(this.engine.block.getMetadata(t,this.key))}set(t,n){this.engine.block.setMetadata(t,this.key,JSON.stringify(n))}clear(t){this.engine.block.hasMetadata(t,this.key)&&this.engine.block.removeMetadata(t,this.key)}},pt=Rt,Mt=typeof global=="object"&&global&&global.Object===Object&&global,gt=Mt,kt=typeof self=="object"&&self&&self.Object===Object&&self,Nt=gt||kt||Function("return this")(),A=Nt,Ft=A.Symbol,P=Ft,bt=Object.prototype,xt=bt.hasOwnProperty,Ot=bt.toString,O=P?P.toStringTag:void 0;function Bt(t){var n=xt.call(t,O),o=t[O];try{t[O]=void 0;var l=!0}catch{}var c=Ot.call(t);return l&&(n?t[O]=o:delete t[O]),c}var _t=Bt,jt=Object.prototype,Vt=jt.toString;function Dt(t){return Vt.call(t)}var Lt=Dt,Ht="[object Null]",$t="[object Undefined]",tt=P?P.toStringTag:void 0;function Ut(t){return t==null?t===void 0?$t:Ht:tt&&tt in Object(t)?_t(t):Lt(t)}var V=Ut;function zt(t){return t!=null&&typeof t=="object"}var W=zt,Fi=Array.isArray;function Tt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var yt=Tt,Gt="[object AsyncFunction]",qt="[object Function]",Zt="[object GeneratorFunction]",Yt="[object Proxy]";function Wt(t){if(!yt(t))return!1;var n=V(t);return n==qt||n==Zt||n==Gt||n==Yt}var Kt=Wt,Xt=A["__core-js_shared__"],U=Xt,et=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Jt(t){return!!et&&et in t}var Qt=Jt,te=Function.prototype,ee=te.toString;function re(t){if(t!=null){try{return ee.call(t)}catch{}try{return t+""}catch{}}return""}var S=re,ie=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,ae=Function.prototype,oe=Object.prototype,se=ae.toString,le=oe.hasOwnProperty,ce=RegExp("^"+se.call(le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ue(t){if(!yt(t)||Qt(t))return!1;var n=Kt(t)?ce:ne;return n.test(S(t))}var de=ue;function he(t,n){return t?.[n]}var fe=he;function pe(t,n){var o=fe(t,n);return de(o)?o:void 0}var R=pe,ge=R(A,"WeakMap"),T=ge;function be(t,n){return t===n||t!==t&&n!==n}var ye=be,ve=9007199254740991;function me(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ve}var we=me;var xi=Object.prototype;var Ae="[object Arguments]";function Ce(t){return W(t)&&V(t)==Ae}var rt=Ce,vt=Object.prototype,Se=vt.hasOwnProperty,Ee=vt.propertyIsEnumerable,Oi=rt(function(){return arguments}())?rt:function(t){return W(t)&&Se.call(t,"callee")&&!Ee.call(t,"callee")};var mt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,it=mt&&typeof module=="object"&&module&&!module.nodeType&&module,Ie=it&&it.exports===mt,nt=Ie?A.Buffer:void 0,Bi=nt?nt.isBuffer:void 0;var Pe="[object Arguments]",Re="[object Array]",Me="[object Boolean]",ke="[object Date]",Ne="[object Error]",Fe="[object Function]",xe="[object Map]",Oe="[object Number]",Be="[object Object]",_e="[object RegExp]",je="[object Set]",Ve="[object String]",De="[object WeakMap]",Le="[object ArrayBuffer]",He="[object DataView]",$e="[object Float32Array]",Ue="[object Float64Array]",ze="[object Int8Array]",Te="[object Int16Array]",Ge="[object Int32Array]",qe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Ye="[object Uint16Array]",We="[object Uint32Array]",g={};g[$e]=g[Ue]=g[ze]=g[Te]=g[Ge]=g[qe]=g[Ze]=g[Ye]=g[We]=!0;g[Pe]=g[Re]=g[Le]=g[Me]=g[He]=g[ke]=g[Ne]=g[Fe]=g[xe]=g[Oe]=g[Be]=g[_e]=g[je]=g[Ve]=g[De]=!1;function Ke(t){return W(t)&&we(t.length)&&!!g[V(t)]}var Xe=Ke;function Je(t){return function(n){return t(n)}}var Qe=Je,wt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=wt&&typeof module=="object"&&module&&!module.nodeType&&module,tr=B&&B.exports===wt,z=tr&>.process,er=function(){try{var t=B&&B.require&&B.require("util").types;return t||z&&z.binding&&z.binding("util")}catch{}}(),at=er,ot=at&&at.isTypedArray,_i=ot?Qe(ot):Xe;var rr=Object.prototype,ji=rr.hasOwnProperty;function ir(t,n){return function(o){return t(n(o))}}var nr=ir,Vi=nr(Object.keys,Object);var ar=Object.prototype,Di=ar.hasOwnProperty;var or=R(Object,"create"),_=or;function sr(){this.__data__=_?_(null):{},this.size=0}var lr=sr;function cr(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var ur=cr,dr="__lodash_hash_undefined__",hr=Object.prototype,fr=hr.hasOwnProperty;function pr(t){var n=this.__data__;if(_){var o=n[t];return o===dr?void 0:o}return fr.call(n,t)?n[t]:void 0}var gr=pr,br=Object.prototype,yr=br.hasOwnProperty;function vr(t){var n=this.__data__;return _?n[t]!==void 0:yr.call(n,t)}var mr=vr,wr="__lodash_hash_undefined__";function Ar(t,n){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=_&&n===void 0?wr:n,this}var Cr=Ar;function M(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}M.prototype.clear=lr;M.prototype.delete=ur;M.prototype.get=gr;M.prototype.has=mr;M.prototype.set=Cr;var st=M;function Sr(){this.__data__=[],this.size=0}var Er=Sr;function Ir(t,n){for(var o=t.length;o--;)if(ye(t[o][0],n))return o;return-1}var L=Ir,Pr=Array.prototype,Rr=Pr.splice;function Mr(t){var n=this.__data__,o=L(n,t);if(o<0)return!1;var l=n.length-1;return o==l?n.pop():Rr.call(n,o,1),--this.size,!0}var kr=Mr;function Nr(t){var n=this.__data__,o=L(n,t);return o<0?void 0:n[o][1]}var Fr=Nr;function xr(t){return L(this.__data__,t)>-1}var Or=xr;function Br(t,n){var o=this.__data__,l=L(o,t);return l<0?(++this.size,o.push([t,n])):o[l][1]=n,this}var _r=Br;function k(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}k.prototype.clear=Er;k.prototype.delete=kr;k.prototype.get=Fr;k.prototype.has=Or;k.prototype.set=_r;var H=k,jr=R(A,"Map"),j=jr;function Vr(){this.size=0,this.__data__={hash:new st,map:new(j||H),string:new st}}var Dr=Vr;function Lr(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}var Hr=Lr;function $r(t,n){var o=t.__data__;return Hr(n)?o[typeof n=="string"?"string":"hash"]:o.map}var $=$r;function Ur(t){var n=$(this,t).delete(t);return this.size-=n?1:0,n}var zr=Ur;function Tr(t){return $(this,t).get(t)}var Gr=Tr;function qr(t){return $(this,t).has(t)}var Zr=qr;function Yr(t,n){var o=$(this,t),l=o.size;return o.set(t,n),this.size+=o.size==l?0:1,this}var Wr=Yr;function N(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}N.prototype.clear=Dr;N.prototype.delete=zr;N.prototype.get=Gr;N.prototype.has=Zr;N.prototype.set=Wr;var At=N;function Kr(){this.__data__=new H,this.size=0}var Xr=Kr;function Jr(t){var n=this.__data__,o=n.delete(t);return this.size=n.size,o}var Qr=Jr;function ti(t){return this.__data__.get(t)}var ei=ti;function ri(t){return this.__data__.has(t)}var ii=ri,ni=200;function ai(t,n){var o=this.__data__;if(o instanceof H){var l=o.__data__;if(!j||l.length<ni-1)return l.push([t,n]),this.size=++o.size,this;o=this.__data__=new At(l)}return o.set(t,n),this.size=o.size,this}var oi=ai;function D(t){var n=this.__data__=new H(t);this.size=n.size}D.prototype.clear=Xr;D.prototype.delete=Qr;D.prototype.get=ei;D.prototype.has=ii;D.prototype.set=oi;var si=Object.prototype,Li=si.propertyIsEnumerable;var li=R(A,"DataView"),G=li,ci=R(A,"Promise"),q=ci,ui=R(A,"Set"),Z=ui,lt="[object Map]",di="[object Object]",ct="[object Promise]",ut="[object Set]",dt="[object WeakMap]",ht="[object DataView]",hi=S(G),fi=S(j),pi=S(q),gi=S(Z),bi=S(T),I=V;(G&&I(new G(new ArrayBuffer(1)))!=ht||j&&I(new j)!=lt||q&&I(q.resolve())!=ct||Z&&I(new Z)!=ut||T&&I(new T)!=dt)&&(I=function(t){var n=V(t),o=n==di?t.constructor:void 0,l=o?S(o):"";if(l)switch(l){case hi:return ht;case fi:return lt;case pi:return ct;case gi:return ut;case bi:return dt}return n});var Hi=A.Uint8Array;var yi="__lodash_hash_undefined__";function vi(t){return this.__data__.set(t,yi),this}var mi=vi;function wi(t){return this.__data__.has(t)}var Ai=wi;function Y(t){var n=-1,o=t==null?0:t.length;for(this.__data__=new At;++n<o;)this.add(t[n])}Y.prototype.add=Y.prototype.push=mi;Y.prototype.has=Ai;var ft=P?P.prototype:void 0,$i=ft?ft.valueOf:void 0;var Ci=Object.prototype,Ui=Ci.hasOwnProperty;var Si=Object.prototype,zi=Si.hasOwnProperty;var Ti=new RegExp(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,"i"),Ei=new RegExp(/[A-Fa-f0-9]{1}/,"g"),Ii=new RegExp(/[A-Fa-f0-9]{2}/,"g"),K=(t,n=!1)=>{let{r:o,g:l,b:c,a:d}=t,f=Math.round(255*o),e=Math.round(255*l),i=Math.round(255*c),r=Math.round(255*d),a=s=>s.toString(16).padStart(2,"0");return`#${a(f)}${a(e)}${a(i)}${n?a(r):""}`},Ct=t=>{let n=(o,l,c,d,f)=>({r:parseInt(o,16)/f,g:parseInt(l,16)/f,b:parseInt(c,16)/f,a:d===void 0?1:parseInt(d,16)/f});if(t.startsWith("#")){if(t.length===4||t.length===5){let o=t.match(Ei);if(o){let[l,c,d,f]=o;return n(l,c,d,f,15)}}if(t.length===7||t.length===8){let o=t.match(Ii);if(o){let[l,c,d,f]=o;return n(l,c,d,f,255)}}}throw new Error('Invalid hex string! Allowed RGB formats are "#FFF" and "#FFFFFF". Allowed RGBA formats are "#FFFF" and "#FFFFFFFF')};var F;(d=>{class t{constructor(e,i,r,a){this.version=e;this.errorCorrectionLevel=i;this.modules=[];this.isFunction=[];if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let u=0;u<this.size;u++)s.push(!1);for(let u=0;u<this.size;u++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();let h=this.addEccAndInterleave(r);if(this.drawCodewords(h),a==-1){let u=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);let p=this.getPenaltyScore();p<u&&(a=b,u=p),this.applyMask(b)}}l(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(e,i){let r=d.QrSegment.makeSegments(e);return t.encodeSegments(r,i)}static encodeBinary(e,i){let r=d.QrSegment.makeBytes(e);return t.encodeSegments([r],i)}static encodeSegments(e,i,r=1,a=40,s=-1,h=!0){if(!(t.MIN_VERSION<=r&&r<=a&&a<=t.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let u,b;for(u=r;;u++){let y=t.getNumDataCodewords(u,i)*8,w=c.getTotalBits(e,u);if(w<=y){b=w;break}if(u>=a)throw new RangeError("Data too long")}for(let y of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&b<=t.getNumDataCodewords(u,y)*8&&(i=y);let p=[];for(let y of e){n(y.mode.modeBits,4,p),n(y.numChars,y.mode.numCharCountBits(u),p);for(let w of y.getData())p.push(w)}l(p.length==b);let x=t.getNumDataCodewords(u,i)*8;l(p.length<=x),n(0,Math.min(4,x-p.length),p),n(0,(8-p.length%8)%8,p),l(p.length%8==0);for(let y=236;p.length<x;y^=253)n(y,8,p);let C=[];for(;C.length*8<p.length;)C.push(0);return p.forEach((y,w)=>C[w>>>3]|=y<<7-(w&7)),new t(u,i,C,s)}getModule(e,i){return 0<=e&&e<this.size&&0<=i&&i<this.size&&this.modules[i][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),i=e.length;for(let r=0;r<i;r++)for(let a=0;a<i;a++)r==0&&a==0||r==0&&a==i-1||r==i-1&&a==0||this.drawAlignmentPattern(e[r],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let i=this.errorCorrectionLevel.formatBits<<3|e,r=i;for(let s=0;s<10;s++)r=r<<1^(r>>>9)*1335;let a=(i<<10|r)^21522;l(a>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,o(a,s));this.setFunctionModule(8,7,o(a,6)),this.setFunctionModule(8,8,o(a,7)),this.setFunctionModule(7,8,o(a,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,o(a,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,o(a,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,o(a,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let i=this.version<<12|e;l(i>>>18==0);for(let r=0;r<18;r++){let a=o(i,r),s=this.size-11+r%3,h=Math.floor(r/3);this.setFunctionModule(s,h,a),this.setFunctionModule(h,s,a)}}drawFinderPattern(e,i){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let s=Math.max(Math.abs(a),Math.abs(r)),h=e+a,u=i+r;0<=h&&h<this.size&&0<=u&&u<this.size&&this.setFunctionModule(h,u,s!=2&&s!=4)}}drawAlignmentPattern(e,i){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,i+r,Math.max(Math.abs(a),Math.abs(r))!=1)}setFunctionModule(e,i,r){this.modules[i][e]=r,this.isFunction[i][e]=!0}addEccAndInterleave(e){let i=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(i,r))throw new RangeError("Invalid argument");let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][i],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][i],h=Math.floor(t.getNumRawDataModules(i)/8),u=a-h%a,b=Math.floor(h/a),p=[],x=t.reedSolomonComputeDivisor(s);for(let y=0,w=0;y<a;y++){let E=e.slice(w,w+b-s+(y<u?0:1));w+=E.length;let Pt=t.reedSolomonComputeRemainder(E,x);y<u&&E.push(0),p.push(E.concat(Pt))}let C=[];for(let y=0;y<p[0].length;y++)p.forEach((w,E)=>{(y!=b-s||E>=u)&&C.push(w[y])});return l(C.length==h),C}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let r=this.size-1;r>=1;r-=2){r==6&&(r=5);for(let a=0;a<this.size;a++)for(let s=0;s<2;s++){let h=r-s,b=(r+1&2)==0?this.size-1-a:a;!this.isFunction[b][h]&&i<e.length*8&&(this.modules[b][h]=o(e[i>>>3],7-(i&7)),i++)}}l(i==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let r=0;r<this.size;r++){let a;switch(e){case 0:a=(r+i)%2==0;break;case 1:a=i%2==0;break;case 2:a=r%3==0;break;case 3:a=(r+i)%3==0;break;case 4:a=(Math.floor(r/3)+Math.floor(i/2))%2==0;break;case 5:a=r*i%2+r*i%3==0;break;case 6:a=(r*i%2+r*i%3)%2==0;break;case 7:a=((r+i)%2+r*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][r]&&a&&(this.modules[i][r]=!this.modules[i][r])}}getPenaltyScore(){let e=0;for(let s=0;s<this.size;s++){let h=!1,u=0,b=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[s][p]==h?(u++,u==5?e+=t.PENALTY_N1:u>5&&e++):(this.finderPenaltyAddHistory(u,b),h||(e+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),h=this.modules[s][p],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,b)*t.PENALTY_N3}for(let s=0;s<this.size;s++){let h=!1,u=0,b=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[p][s]==h?(u++,u==5?e+=t.PENALTY_N1:u>5&&e++):(this.finderPenaltyAddHistory(u,b),h||(e+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),h=this.modules[p][s],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,b)*t.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let h=0;h<this.size-1;h++){let u=this.modules[s][h];u==this.modules[s][h+1]&&u==this.modules[s+1][h]&&u==this.modules[s+1][h+1]&&(e+=t.PENALTY_N2)}let i=0;for(let s of this.modules)i=s.reduce((h,u)=>h+(u?1:0),i);let r=this.size*this.size,a=Math.ceil(Math.abs(i*20-r*10)/r)-1;return l(0<=a&&a<=9),e+=a*t.PENALTY_N4,l(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let a=this.size-7;r.length<e;a-=i)r.splice(1,0,a);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;i-=(25*r-10)*r-55,e>=7&&(i-=36)}return l(208<=i&&i<=29648),i}static getNumDataCodewords(e,i){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[i.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let i=[];for(let a=0;a<e-1;a++)i.push(0);i.push(1);let r=1;for(let a=0;a<e;a++){for(let s=0;s<i.length;s++)i[s]=t.reedSolomonMultiply(i[s],r),s+1<i.length&&(i[s]^=i[s+1]);r=t.reedSolomonMultiply(r,2)}return i}static reedSolomonComputeRemainder(e,i){let r=i.map(a=>0);for(let a of e){let s=a^r.shift();r.push(0),i.forEach((h,u)=>r[u]^=t.reedSolomonMultiply(h,s))}return r}static reedSolomonMultiply(e,i){if(e>>>8||i>>>8)throw new RangeError("Byte out of range");let r=0;for(let a=7;a>=0;a--)r=r<<1^(r>>>7)*285,r^=(i>>>a&1)*e;return l(r>>>8==0),r}finderPenaltyCountPatterns(e){let i=e[1];l(i<=this.size*3);let r=i>0&&e[2]==i&&e[3]==i*3&&e[4]==i&&e[5]==i;return(r&&e[0]>=i*4&&e[6]>=i?1:0)+(r&&e[6]>=i*4&&e[0]>=i?1:0)}finderPenaltyTerminateAndCount(e,i,r){return e&&(this.finderPenaltyAddHistory(i,r),i=0),i+=this.size,this.finderPenaltyAddHistory(i,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,i){i[0]==0&&(e+=this.size),i.pop(),i.unshift(e)}static{this.MIN_VERSION=1}static{this.MAX_VERSION=40}static{this.PENALTY_N1=3}static{this.PENALTY_N2=3}static{this.PENALTY_N3=40}static{this.PENALTY_N4=10}static{this.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]]}static{this.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]}}d.QrCode=t;function n(f,e,i){if(e<0||e>31||f>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)i.push(f>>>r&1)}function o(f,e){return(f>>>e&1)!=0}function l(f){if(!f)throw new Error("Assertion error")}class c{constructor(e,i,r){this.mode=e;this.numChars=i;this.bitData=r;if(i<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let i=[];for(let r of e)n(r,8,i);return new c(c.Mode.BYTE,e.length,i)}static makeNumeric(e){if(!c.isNumeric(e))throw new RangeError("String contains non-numeric characters");let i=[];for(let r=0;r<e.length;){let a=Math.min(e.length-r,3);n(parseInt(e.substring(r,r+a),10),a*3+1,i),r+=a}return new c(c.Mode.NUMERIC,e.length,i)}static makeAlphanumeric(e){if(!c.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],r;for(r=0;r+2<=e.length;r+=2){let a=c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r))*45;a+=c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r+1)),n(a,11,i)}return r<e.length&&n(c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r)),6,i),new c(c.Mode.ALPHANUMERIC,e.length,i)}static makeSegments(e){return e==""?[]:c.isNumeric(e)?[c.makeNumeric(e)]:c.isAlphanumeric(e)?[c.makeAlphanumeric(e)]:[c.makeBytes(c.toUtf8ByteArray(e))]}static makeEci(e){let i=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,i);else if(e<16384)n(2,2,i),n(e,14,i);else if(e<1e6)n(6,3,i),n(e,21,i);else throw new RangeError("ECI assignment value out of range");return new c(c.Mode.ECI,0,i)}static isNumeric(e){return c.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return c.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,i){let r=0;for(let a of e){let s=a.mode.numCharCountBits(i);if(a.numChars>=1<<s)return 1/0;r+=4+s+a.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let i=[];for(let r=0;r<e.length;r++)e.charAt(r)!="%"?i.push(e.charCodeAt(r)):(i.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return i}static{this.NUMERIC_REGEX=/^[0-9]*$/}static{this.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/}static{this.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}}d.QrSegment=c})(F||={});(n=>{let t;(l=>{class o{constructor(d,f){this.ordinal=d;this.formatBits=f}static{this.LOW=new o(0,1)}static{this.MEDIUM=new o(1,0)}static{this.QUARTILE=new o(2,3)}static{this.HIGH=new o(3,2)}}l.Ecc=o})(t=n.QrCode||={})})(F||={});(n=>{let t;(l=>{class o{constructor(d,f){this.modeBits=d;this.numBitsCharCount=f}static{this.NUMERIC=new o(1,[10,12,14])}static{this.ALPHANUMERIC=new o(2,[9,11,13])}static{this.BYTE=new o(4,[8,16,16])}static{this.KANJI=new o(8,[8,10,12])}static{this.ECI=new o(7,[0,0,0])}numCharCountBits(d){return this.numBitsCharCount[Math.floor((d+7)/17)]}}l.Mode=o})(t=n.QrSegment||={})})(F||={});var X=F;function J(t,n){let o=X.QrCode.encodeText(t,X.QrCode.Ecc.HIGH),l=Pi(o);return{svg:Ri(l,n,o.size),path:l,size:o.size}}function Pi(t){let n=[];for(let o=0;o<t.size;o++)for(let l=0;l<t.size;l++)t.getModule(l,o)&&n.push(`M${l},${o}h1v1h-1z`);return n.join(" ")}function Ri(t,n,o){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
1
|
+
var Rt=class{constructor(t,n){this.engine=t,this.key=n}hasData(t){return this.engine.block.isValid(t)&&this.engine.block.hasMetadata(t,this.key)}get(t){if(this.hasData(t))return JSON.parse(this.engine.block.getMetadata(t,this.key))}set(t,n){this.engine.block.setMetadata(t,this.key,JSON.stringify(n))}clear(t){this.engine.block.hasMetadata(t,this.key)&&this.engine.block.removeMetadata(t,this.key)}},pt=Rt,Mt=typeof global=="object"&&global&&global.Object===Object&&global,gt=Mt,kt=typeof self=="object"&&self&&self.Object===Object&&self,Nt=gt||kt||Function("return this")(),A=Nt,xt=A.Symbol,P=xt,bt=Object.prototype,Ft=bt.hasOwnProperty,Ot=bt.toString,O=P?P.toStringTag:void 0;function Bt(t){var n=Ft.call(t,O),o=t[O];try{t[O]=void 0;var l=!0}catch{}var c=Ot.call(t);return l&&(n?t[O]=o:delete t[O]),c}var _t=Bt,jt=Object.prototype,Vt=jt.toString;function Dt(t){return Vt.call(t)}var Lt=Dt,Ht="[object Null]",$t="[object Undefined]",tt=P?P.toStringTag:void 0;function Ut(t){return t==null?t===void 0?$t:Ht:tt&&tt in Object(t)?_t(t):Lt(t)}var V=Ut;function zt(t){return t!=null&&typeof t=="object"}var W=zt,xi=Array.isArray;function Tt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var yt=Tt,Gt="[object AsyncFunction]",qt="[object Function]",Zt="[object GeneratorFunction]",Yt="[object Proxy]";function Wt(t){if(!yt(t))return!1;var n=V(t);return n==qt||n==Zt||n==Gt||n==Yt}var Kt=Wt,Xt=A["__core-js_shared__"],U=Xt,et=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Jt(t){return!!et&&et in t}var Qt=Jt,te=Function.prototype,ee=te.toString;function re(t){if(t!=null){try{return ee.call(t)}catch{}try{return t+""}catch{}}return""}var S=re,ie=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,ae=Function.prototype,oe=Object.prototype,se=ae.toString,le=oe.hasOwnProperty,ce=RegExp("^"+se.call(le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ue(t){if(!yt(t)||Qt(t))return!1;var n=Kt(t)?ce:ne;return n.test(S(t))}var de=ue;function he(t,n){return t?.[n]}var fe=he;function pe(t,n){var o=fe(t,n);return de(o)?o:void 0}var R=pe,ge=R(A,"WeakMap"),T=ge;function be(t,n){return t===n||t!==t&&n!==n}var ye=be,ve=9007199254740991;function me(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ve}var we=me;var Fi=Object.prototype;var Ae="[object Arguments]";function Ce(t){return W(t)&&V(t)==Ae}var rt=Ce,vt=Object.prototype,Se=vt.hasOwnProperty,Ee=vt.propertyIsEnumerable,Oi=rt(function(){return arguments}())?rt:function(t){return W(t)&&Se.call(t,"callee")&&!Ee.call(t,"callee")};var mt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,it=mt&&typeof module=="object"&&module&&!module.nodeType&&module,Ie=it&&it.exports===mt,nt=Ie?A.Buffer:void 0,Bi=nt?nt.isBuffer:void 0;var Pe="[object Arguments]",Re="[object Array]",Me="[object Boolean]",ke="[object Date]",Ne="[object Error]",xe="[object Function]",Fe="[object Map]",Oe="[object Number]",Be="[object Object]",_e="[object RegExp]",je="[object Set]",Ve="[object String]",De="[object WeakMap]",Le="[object ArrayBuffer]",He="[object DataView]",$e="[object Float32Array]",Ue="[object Float64Array]",ze="[object Int8Array]",Te="[object Int16Array]",Ge="[object Int32Array]",qe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Ye="[object Uint16Array]",We="[object Uint32Array]",g={};g[$e]=g[Ue]=g[ze]=g[Te]=g[Ge]=g[qe]=g[Ze]=g[Ye]=g[We]=!0;g[Pe]=g[Re]=g[Le]=g[Me]=g[He]=g[ke]=g[Ne]=g[xe]=g[Fe]=g[Oe]=g[Be]=g[_e]=g[je]=g[Ve]=g[De]=!1;function Ke(t){return W(t)&&we(t.length)&&!!g[V(t)]}var Xe=Ke;function Je(t){return function(n){return t(n)}}var Qe=Je,wt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=wt&&typeof module=="object"&&module&&!module.nodeType&&module,tr=B&&B.exports===wt,z=tr&>.process,er=function(){try{var t=B&&B.require&&B.require("util").types;return t||z&&z.binding&&z.binding("util")}catch{}}(),at=er,ot=at&&at.isTypedArray,_i=ot?Qe(ot):Xe;var rr=Object.prototype,ji=rr.hasOwnProperty;function ir(t,n){return function(o){return t(n(o))}}var nr=ir,Vi=nr(Object.keys,Object);var ar=Object.prototype,Di=ar.hasOwnProperty;var or=R(Object,"create"),_=or;function sr(){this.__data__=_?_(null):{},this.size=0}var lr=sr;function cr(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var ur=cr,dr="__lodash_hash_undefined__",hr=Object.prototype,fr=hr.hasOwnProperty;function pr(t){var n=this.__data__;if(_){var o=n[t];return o===dr?void 0:o}return fr.call(n,t)?n[t]:void 0}var gr=pr,br=Object.prototype,yr=br.hasOwnProperty;function vr(t){var n=this.__data__;return _?n[t]!==void 0:yr.call(n,t)}var mr=vr,wr="__lodash_hash_undefined__";function Ar(t,n){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=_&&n===void 0?wr:n,this}var Cr=Ar;function M(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}M.prototype.clear=lr;M.prototype.delete=ur;M.prototype.get=gr;M.prototype.has=mr;M.prototype.set=Cr;var st=M;function Sr(){this.__data__=[],this.size=0}var Er=Sr;function Ir(t,n){for(var o=t.length;o--;)if(ye(t[o][0],n))return o;return-1}var L=Ir,Pr=Array.prototype,Rr=Pr.splice;function Mr(t){var n=this.__data__,o=L(n,t);if(o<0)return!1;var l=n.length-1;return o==l?n.pop():Rr.call(n,o,1),--this.size,!0}var kr=Mr;function Nr(t){var n=this.__data__,o=L(n,t);return o<0?void 0:n[o][1]}var xr=Nr;function Fr(t){return L(this.__data__,t)>-1}var Or=Fr;function Br(t,n){var o=this.__data__,l=L(o,t);return l<0?(++this.size,o.push([t,n])):o[l][1]=n,this}var _r=Br;function k(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}k.prototype.clear=Er;k.prototype.delete=kr;k.prototype.get=xr;k.prototype.has=Or;k.prototype.set=_r;var H=k,jr=R(A,"Map"),j=jr;function Vr(){this.size=0,this.__data__={hash:new st,map:new(j||H),string:new st}}var Dr=Vr;function Lr(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}var Hr=Lr;function $r(t,n){var o=t.__data__;return Hr(n)?o[typeof n=="string"?"string":"hash"]:o.map}var $=$r;function Ur(t){var n=$(this,t).delete(t);return this.size-=n?1:0,n}var zr=Ur;function Tr(t){return $(this,t).get(t)}var Gr=Tr;function qr(t){return $(this,t).has(t)}var Zr=qr;function Yr(t,n){var o=$(this,t),l=o.size;return o.set(t,n),this.size+=o.size==l?0:1,this}var Wr=Yr;function N(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}N.prototype.clear=Dr;N.prototype.delete=zr;N.prototype.get=Gr;N.prototype.has=Zr;N.prototype.set=Wr;var At=N;function Kr(){this.__data__=new H,this.size=0}var Xr=Kr;function Jr(t){var n=this.__data__,o=n.delete(t);return this.size=n.size,o}var Qr=Jr;function ti(t){return this.__data__.get(t)}var ei=ti;function ri(t){return this.__data__.has(t)}var ii=ri,ni=200;function ai(t,n){var o=this.__data__;if(o instanceof H){var l=o.__data__;if(!j||l.length<ni-1)return l.push([t,n]),this.size=++o.size,this;o=this.__data__=new At(l)}return o.set(t,n),this.size=o.size,this}var oi=ai;function D(t){var n=this.__data__=new H(t);this.size=n.size}D.prototype.clear=Xr;D.prototype.delete=Qr;D.prototype.get=ei;D.prototype.has=ii;D.prototype.set=oi;var si=Object.prototype,Li=si.propertyIsEnumerable;var li=R(A,"DataView"),G=li,ci=R(A,"Promise"),q=ci,ui=R(A,"Set"),Z=ui,lt="[object Map]",di="[object Object]",ct="[object Promise]",ut="[object Set]",dt="[object WeakMap]",ht="[object DataView]",hi=S(G),fi=S(j),pi=S(q),gi=S(Z),bi=S(T),I=V;(G&&I(new G(new ArrayBuffer(1)))!=ht||j&&I(new j)!=lt||q&&I(q.resolve())!=ct||Z&&I(new Z)!=ut||T&&I(new T)!=dt)&&(I=function(t){var n=V(t),o=n==di?t.constructor:void 0,l=o?S(o):"";if(l)switch(l){case hi:return ht;case fi:return lt;case pi:return ct;case gi:return ut;case bi:return dt}return n});var Hi=A.Uint8Array;var yi="__lodash_hash_undefined__";function vi(t){return this.__data__.set(t,yi),this}var mi=vi;function wi(t){return this.__data__.has(t)}var Ai=wi;function Y(t){var n=-1,o=t==null?0:t.length;for(this.__data__=new At;++n<o;)this.add(t[n])}Y.prototype.add=Y.prototype.push=mi;Y.prototype.has=Ai;var ft=P?P.prototype:void 0,$i=ft?ft.valueOf:void 0;var Ci=Object.prototype,Ui=Ci.hasOwnProperty;var Si=Object.prototype,zi=Si.hasOwnProperty;var Ti=new RegExp(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,"i"),Ei=new RegExp(/[A-Fa-f0-9]{1}/,"g"),Ii=new RegExp(/[A-Fa-f0-9]{2}/,"g"),K=(t,n=!1)=>{let{r:o,g:l,b:c,a:d}=t,f=Math.round(255*o),e=Math.round(255*l),r=Math.round(255*c),i=Math.round(255*d),a=s=>s.toString(16).padStart(2,"0");return`#${a(f)}${a(e)}${a(r)}${n?a(i):""}`},Ct=t=>{let n=(o,l,c,d,f)=>({r:parseInt(o,16)/f,g:parseInt(l,16)/f,b:parseInt(c,16)/f,a:d===void 0?1:parseInt(d,16)/f});if(t.startsWith("#")){if(t.length===4||t.length===5){let o=t.match(Ei);if(o){let[l,c,d,f]=o;return n(l,c,d,f,15)}}if(t.length===7||t.length===8){let o=t.match(Ii);if(o){let[l,c,d,f]=o;return n(l,c,d,f,255)}}}throw new Error('Invalid hex string! Allowed RGB formats are "#FFF" and "#FFFFFF". Allowed RGBA formats are "#FFFF" and "#FFFFFFFF')};var x;(d=>{class t{constructor(e,r,i,a){this.version=e;this.errorCorrectionLevel=r;this.modules=[];this.isFunction=[];if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let u=0;u<this.size;u++)s.push(!1);for(let u=0;u<this.size;u++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();let h=this.addEccAndInterleave(i);if(this.drawCodewords(h),a==-1){let u=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);let p=this.getPenaltyScore();p<u&&(a=b,u=p),this.applyMask(b)}}l(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(e,r){let i=d.QrSegment.makeSegments(e);return t.encodeSegments(i,r)}static encodeBinary(e,r){let i=d.QrSegment.makeBytes(e);return t.encodeSegments([i],r)}static encodeSegments(e,r,i=1,a=40,s=-1,h=!0){if(!(t.MIN_VERSION<=i&&i<=a&&a<=t.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let u,b;for(u=i;;u++){let y=t.getNumDataCodewords(u,r)*8,w=c.getTotalBits(e,u);if(w<=y){b=w;break}if(u>=a)throw new RangeError("Data too long")}for(let y of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&b<=t.getNumDataCodewords(u,y)*8&&(r=y);let p=[];for(let y of e){n(y.mode.modeBits,4,p),n(y.numChars,y.mode.numCharCountBits(u),p);for(let w of y.getData())p.push(w)}l(p.length==b);let F=t.getNumDataCodewords(u,r)*8;l(p.length<=F),n(0,Math.min(4,F-p.length),p),n(0,(8-p.length%8)%8,p),l(p.length%8==0);for(let y=236;p.length<F;y^=253)n(y,8,p);let C=[];for(;C.length*8<p.length;)C.push(0);return p.forEach((y,w)=>C[w>>>3]|=y<<7-(w&7)),new t(u,r,C,s)}getModule(e,r){return 0<=e&&e<this.size&&0<=r&&r<this.size&&this.modules[r][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let i=0;i<this.size;i++)this.setFunctionModule(6,i,i%2==0),this.setFunctionModule(i,6,i%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),r=e.length;for(let i=0;i<r;i++)for(let a=0;a<r;a++)i==0&&a==0||i==0&&a==r-1||i==r-1&&a==0||this.drawAlignmentPattern(e[i],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let r=this.errorCorrectionLevel.formatBits<<3|e,i=r;for(let s=0;s<10;s++)i=i<<1^(i>>>9)*1335;let a=(r<<10|i)^21522;l(a>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,o(a,s));this.setFunctionModule(8,7,o(a,6)),this.setFunctionModule(8,8,o(a,7)),this.setFunctionModule(7,8,o(a,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,o(a,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,o(a,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,o(a,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let i=0;i<12;i++)e=e<<1^(e>>>11)*7973;let r=this.version<<12|e;l(r>>>18==0);for(let i=0;i<18;i++){let a=o(r,i),s=this.size-11+i%3,h=Math.floor(i/3);this.setFunctionModule(s,h,a),this.setFunctionModule(h,s,a)}}drawFinderPattern(e,r){for(let i=-4;i<=4;i++)for(let a=-4;a<=4;a++){let s=Math.max(Math.abs(a),Math.abs(i)),h=e+a,u=r+i;0<=h&&h<this.size&&0<=u&&u<this.size&&this.setFunctionModule(h,u,s!=2&&s!=4)}}drawAlignmentPattern(e,r){for(let i=-2;i<=2;i++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,r+i,Math.max(Math.abs(a),Math.abs(i))!=1)}setFunctionModule(e,r,i){this.modules[r][e]=i,this.isFunction[r][e]=!0}addEccAndInterleave(e){let r=this.version,i=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,i))throw new RangeError("Invalid argument");let a=t.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[i.ordinal][r],h=Math.floor(t.getNumRawDataModules(r)/8),u=a-h%a,b=Math.floor(h/a),p=[],F=t.reedSolomonComputeDivisor(s);for(let y=0,w=0;y<a;y++){let E=e.slice(w,w+b-s+(y<u?0:1));w+=E.length;let Pt=t.reedSolomonComputeRemainder(E,F);y<u&&E.push(0),p.push(E.concat(Pt))}let C=[];for(let y=0;y<p[0].length;y++)p.forEach((w,E)=>{(y!=b-s||E>=u)&&C.push(w[y])});return l(C.length==h),C}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let i=this.size-1;i>=1;i-=2){i==6&&(i=5);for(let a=0;a<this.size;a++)for(let s=0;s<2;s++){let h=i-s,b=(i+1&2)==0?this.size-1-a:a;!this.isFunction[b][h]&&r<e.length*8&&(this.modules[b][h]=o(e[r>>>3],7-(r&7)),r++)}}l(r==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let i=0;i<this.size;i++){let a;switch(e){case 0:a=(i+r)%2==0;break;case 1:a=r%2==0;break;case 2:a=i%3==0;break;case 3:a=(i+r)%3==0;break;case 4:a=(Math.floor(i/3)+Math.floor(r/2))%2==0;break;case 5:a=i*r%2+i*r%3==0;break;case 6:a=(i*r%2+i*r%3)%2==0;break;case 7:a=((i+r)%2+i*r%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[r][i]&&a&&(this.modules[r][i]=!this.modules[r][i])}}getPenaltyScore(){let e=0;for(let s=0;s<this.size;s++){let h=!1,u=0,b=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[s][p]==h?(u++,u==5?e+=t.PENALTY_N1:u>5&&e++):(this.finderPenaltyAddHistory(u,b),h||(e+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),h=this.modules[s][p],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,b)*t.PENALTY_N3}for(let s=0;s<this.size;s++){let h=!1,u=0,b=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[p][s]==h?(u++,u==5?e+=t.PENALTY_N1:u>5&&e++):(this.finderPenaltyAddHistory(u,b),h||(e+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),h=this.modules[p][s],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,b)*t.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let h=0;h<this.size-1;h++){let u=this.modules[s][h];u==this.modules[s][h+1]&&u==this.modules[s+1][h]&&u==this.modules[s+1][h+1]&&(e+=t.PENALTY_N2)}let r=0;for(let s of this.modules)r=s.reduce((h,u)=>h+(u?1:0),r);let i=this.size*this.size,a=Math.ceil(Math.abs(r*20-i*10)/i)-1;return l(0<=a&&a<=9),e+=a*t.PENALTY_N4,l(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,r=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,i=[6];for(let a=this.size-7;i.length<e;a-=r)i.splice(1,0,a);return i}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let i=Math.floor(e/7)+2;r-=(25*i-10)*i-55,e>=7&&(r-=36)}return l(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let a=0;a<e-1;a++)r.push(0);r.push(1);let i=1;for(let a=0;a<e;a++){for(let s=0;s<r.length;s++)r[s]=t.reedSolomonMultiply(r[s],i),s+1<r.length&&(r[s]^=r[s+1]);i=t.reedSolomonMultiply(i,2)}return r}static reedSolomonComputeRemainder(e,r){let i=r.map(a=>0);for(let a of e){let s=a^i.shift();i.push(0),r.forEach((h,u)=>i[u]^=t.reedSolomonMultiply(h,s))}return i}static reedSolomonMultiply(e,r){if(e>>>8||r>>>8)throw new RangeError("Byte out of range");let i=0;for(let a=7;a>=0;a--)i=i<<1^(i>>>7)*285,i^=(r>>>a&1)*e;return l(i>>>8==0),i}finderPenaltyCountPatterns(e){let r=e[1];l(r<=this.size*3);let i=r>0&&e[2]==r&&e[3]==r*3&&e[4]==r&&e[5]==r;return(i&&e[0]>=r*4&&e[6]>=r?1:0)+(i&&e[6]>=r*4&&e[0]>=r?1:0)}finderPenaltyTerminateAndCount(e,r,i){return e&&(this.finderPenaltyAddHistory(r,i),r=0),r+=this.size,this.finderPenaltyAddHistory(r,i),this.finderPenaltyCountPatterns(i)}finderPenaltyAddHistory(e,r){r[0]==0&&(e+=this.size),r.pop(),r.unshift(e)}static{this.MIN_VERSION=1}static{this.MAX_VERSION=40}static{this.PENALTY_N1=3}static{this.PENALTY_N2=3}static{this.PENALTY_N3=40}static{this.PENALTY_N4=10}static{this.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]]}static{this.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]}}d.QrCode=t;function n(f,e,r){if(e<0||e>31||f>>>e)throw new RangeError("Value out of range");for(let i=e-1;i>=0;i--)r.push(f>>>i&1)}function o(f,e){return(f>>>e&1)!=0}function l(f){if(!f)throw new Error("Assertion error")}class c{constructor(e,r,i){this.mode=e;this.numChars=r;this.bitData=i;if(r<0)throw new RangeError("Invalid argument");this.bitData=i.slice()}static makeBytes(e){let r=[];for(let i of e)n(i,8,r);return new c(c.Mode.BYTE,e.length,r)}static makeNumeric(e){if(!c.isNumeric(e))throw new RangeError("String contains non-numeric characters");let r=[];for(let i=0;i<e.length;){let a=Math.min(e.length-i,3);n(parseInt(e.substring(i,i+a),10),a*3+1,r),i+=a}return new c(c.Mode.NUMERIC,e.length,r)}static makeAlphanumeric(e){if(!c.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let r=[],i;for(i=0;i+2<=e.length;i+=2){let a=c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(i))*45;a+=c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(i+1)),n(a,11,r)}return i<e.length&&n(c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(i)),6,r),new c(c.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return e==""?[]:c.isNumeric(e)?[c.makeNumeric(e)]:c.isAlphanumeric(e)?[c.makeAlphanumeric(e)]:[c.makeBytes(c.toUtf8ByteArray(e))]}static makeEci(e){let r=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,r);else if(e<16384)n(2,2,r),n(e,14,r);else if(e<1e6)n(6,3,r),n(e,21,r);else throw new RangeError("ECI assignment value out of range");return new c(c.Mode.ECI,0,r)}static isNumeric(e){return c.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return c.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,r){let i=0;for(let a of e){let s=a.mode.numCharCountBits(r);if(a.numChars>=1<<s)return 1/0;i+=4+s+a.bitData.length}return i}static toUtf8ByteArray(e){e=encodeURI(e);let r=[];for(let i=0;i<e.length;i++)e.charAt(i)!="%"?r.push(e.charCodeAt(i)):(r.push(parseInt(e.substring(i+1,i+3),16)),i+=2);return r}static{this.NUMERIC_REGEX=/^[0-9]*$/}static{this.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/}static{this.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}}d.QrSegment=c})(x||={});(n=>{let t;(l=>{class o{constructor(d,f){this.ordinal=d;this.formatBits=f}static{this.LOW=new o(0,1)}static{this.MEDIUM=new o(1,0)}static{this.QUARTILE=new o(2,3)}static{this.HIGH=new o(3,2)}}l.Ecc=o})(t=n.QrCode||={})})(x||={});(n=>{let t;(l=>{class o{constructor(d,f){this.modeBits=d;this.numBitsCharCount=f}static{this.NUMERIC=new o(1,[10,12,14])}static{this.ALPHANUMERIC=new o(2,[9,11,13])}static{this.BYTE=new o(4,[8,16,16])}static{this.KANJI=new o(8,[8,10,12])}static{this.ECI=new o(7,[0,0,0])}numCharCountBits(d){return this.numBitsCharCount[Math.floor((d+7)/17)]}}l.Mode=o})(t=n.QrSegment||={})})(x||={});var X=x;function J(t,n){let o=X.QrCode.encodeText(t,X.QrCode.Ecc.HIGH),l=Pi(o);return{svg:Ri(l,n,o.size),path:l,size:o.size}}function Pi(t){let n=[];for(let o=0;o<t.size;o++)for(let l=0;l<t.size;l++)t.getModule(l,o)&&n.push(`M${l},${o}h1v1h-1z`);return n.join(" ")}function Ri(t,n,o){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 ${o} ${o}" stroke="none">
|
|
4
4
|
<path d="${t}" fill="${n}"/>
|
|
@@ -17,7 +17,7 @@ var Rt=class{constructor(t,n){this.engine=t,this.key=n}hasData(t){return this.en
|
|
|
17
17
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 13H13V15H15V17H13V21H17V19H19V21H21V19H19V17H21V13H17V15H15V13ZM17 17H15V19H17V17ZM17 17V15H19V17H17Z" fill="currentColor"/>
|
|
18
18
|
</symbol>
|
|
19
19
|
</svg>
|
|
20
|
-
`),l.setTranslations({en:{"ly.img.generate-qr.dock.label":"QR Code",[`panel.${m}`]:"Generate QR Code",[`panel.${m}.description`]:"Enter a URL to automatically generate a QR code for you to embed it in your design.",[`panel.${m}.submit`]:"Generate QR Code",[`panel.${m}.url`]:"URL",[`panel.${m}.foregroundColor`]:"Foreground Color",[`panel.${m}.error`]:"Failed to create QR code block.",[`panel.${v}`]:"Update QR Code",[`panel.${v}.description`]:"Update the URL to automatically refresh the QR code within your design.",[`panel.${v}.asShape`]:"As Shape?",[`panel.${v}.onlyOneBlock`]:"Please select only one block to update the QR code.",[`panel.${v}.noMetadata`]:"Invalid QR code block selected. Missing metadata.",[`panel.${v}.invalidStateShape`]:"Invalid state with no shape found.",[`panel.${v}.invalidStateFill`]:"Invalid state with no fill found.",[`panel.${v}.url`]:"URL",[`panel.${v}.foregroundColor`]:"Foreground Color","ly.img.generate-qr.canvasMenu.edit":"Edit"}}),["ly.img.replace","ly.img.crop","ly.img.fill","ly.img.adjustment","ly.img.shape.options"].forEach(d=>{l.feature.enable(d,({isPreviousEnable:f,engine:e})=>e.block.findAllSelected().every(
|
|
20
|
+
`),l.setTranslations({en:{"ly.img.generate-qr.dock.label":"QR Code",[`panel.${m}`]:"Generate QR Code",[`panel.${m}.description`]:"Enter a URL to automatically generate a QR code for you to embed it in your design.",[`panel.${m}.submit`]:"Generate QR Code",[`panel.${m}.url`]:"URL",[`panel.${m}.foregroundColor`]:"Foreground Color",[`panel.${m}.error`]:"Failed to create QR code block.",[`panel.${v}`]:"Update QR Code",[`panel.${v}.description`]:"Update the URL to automatically refresh the QR code within your design.",[`panel.${v}.asShape`]:"As Shape?",[`panel.${v}.onlyOneBlock`]:"Please select only one block to update the QR code.",[`panel.${v}.noMetadata`]:"Invalid QR code block selected. Missing metadata.",[`panel.${v}.invalidStateShape`]:"Invalid state with no shape found.",[`panel.${v}.invalidStateFill`]:"Invalid state with no fill found.",[`panel.${v}.url`]:"URL",[`panel.${v}.foregroundColor`]:"Foreground Color","ly.img.generate-qr.canvasMenu.edit":"Edit"}}),["ly.img.replace","ly.img.crop","ly.img.fill","ly.img.adjustment","ly.img.shape.options"].forEach(d=>{l.feature.enable(d,({isPreviousEnable:f,engine:e})=>{let r=e.block.findAllSelected();return r.length>0&&r.every(a=>c.hasData(a))?!1:f()})}),l.ui.registerComponent("ly.img.generate-qr.dock",({builder:d})=>{let f=l.ui.isPanelOpen(m);d.Button("ly.img.generate-qr.dock",{label:"ly.img.generate-qr.dock.label",icon:"@imgly/plugin/qr",isSelected:f,onClick:()=>{f?l.ui.closePanel(m):l.ui.openPanel(m)}})}),l.ui.registerComponent("ly.img.update-qr.canvasMenu",({builder:d,engine:f})=>{let e=f.block.findAllSelected();if(e.length!==1)return;let r=e[0];f.block.isAllowedByScope(r,"fill/change")&&c.hasData(r)&&d.Button("ly.img.update-qr.dock",{label:"ly.img.generate-qr.canvasMenu.edit",icon:"@imgly/plugin/qr",onClick:()=>{l.ui.openPanel(v)}})}),l.ui.setCanvasMenuOrder(["ly.img.update-qr.canvasMenu",...l.ui.getCanvasMenuOrder()]),l.ui.registerPanel(m,({builder:d,engine:f,state:e})=>{let r=e("url",""),i=e("color",{r:0,g:0,b:0,a:1}),a=e("asShape",n==="shape");d.Section("ly.img.generate-qr.text.section",{children:()=>{d.Text("ly.img.generate-qr.text",{content:`panel.${m}.description`})}}),d.Section("ly.img.generate-qr.inputs.section",{children:()=>{d.TextInput("ly.img.generate-qr.url",{inputLabel:`panel.${m}.url`,...r}),d.ColorInput("ly.img.generate-qr.foregroundColor",{label:`panel.${m}.foregroundColor`,inputLabel:`panel.${m}.foregroundColor`,...i})}}),d.Section("ly.img.generate-qr.button.section",{children:()=>{d.Button("ly.img.generate-qr.generate",{label:`panel.${m}.submit`,isDisabled:r.value==="",color:"accent",onClick:async()=>{await ki(l,f,r.value,i.value,c,a.value)!=null&&l.ui.closePanel(m)}}),o&&d.Checkbox("ly.img.generate-qr.asShape",{inputLabel:`panel.${v}.asShape`,...a})}})}),l.engine.block.onSelectionChanged(()=>{let d=l.engine.block.findAllSelected();if(d.length!==1){l.ui.isPanelOpen(v)&&l.ui.closePanel(v);return}let f=d[0];c.hasData(f)||l.ui.isPanelOpen(v)&&l.ui.closePanel(v)}),l.ui.registerPanel(v,({builder:d,engine:f})=>{let e=f.block.findAllSelected();if(e.length!==1){d.Section("ly.img.update-qr.only-one-block.section",{children:()=>{d.Text("ly.img.update-qr.only-one-block",{content:`panel.${v}.onlyOneBlock`})}});return}let r=e[0];if(!c.hasData(r)){d.Section("ly.img.update-qr.no-metadata.section",{children:()=>{d.Text("ly.img.update-qr.no-metadata",{content:`panel.${v}.noMetadata`})}});return}let{url:i,color:a,type:s}=c.get(r);d.Section("ly.img.update-qr.section",{children:()=>{d.Text("ly.img.update-qr.text",{content:`panel.${v}.description`}),d.TextInput("ly.img.update-qr.url",{inputLabel:`panel.${v}.url`,value:i,setValue:h=>{c.set(r,{url:h,color:a,type:s}),St(l,f,r,h,a,s)}}),s==="fill"&&d.ColorInput("ly.img.update-qr.foregroundColor",{inputLabel:`panel.${v}.foregroundColor`,inputLabelPosition:"top",value:Ct(a),setValue:h=>{let u=Mi(f,h);c.set(r,{url:i,color:u,type:s}),St(l,f,r,i,u,s)}})}})})}}};function Mi(t,n){let o=typeof n=="string",l;if(o)l=n;else{let c=t.editor.convertColorToColorSpace(n,"sRGB");l=K(c)}return l}async function ki(t,n,o,l,c,d){let f=n.editor.convertColorToColorSpace(l,"sRGB"),e=K(f),{path:r,svg:i,size:a}=J(o,e),s;if(d){if(s=await n.asset.defaultApplyAsset({id:"qr-code",meta:{kind:"shape",vectorPath:r,height:a,width:a,shapeType:"//ly.img.ubq/shape/vector_path"},payload:{}}),s!=null){if(n.block.supportsFill(s)){let h=n.block.getFill(s);n.block.getType(h)==="//ly.img.ubq/fill/color"&&n.block.setColor(h,"fill/color/value",f)}It(n,s)}}else{let h=`data:text/plain;base64,${btoa(i)}`;s=await n.asset.defaultApplyAsset({id:"qr-code",meta:{fillType:"//ly.img.ubq/fill/image",width:a,height:a},payload:{sourceSet:[{uri:h,width:a,height:a}]}})}return s==null?t.ui.showNotification({type:"error",message:`panel.${m}.error`}):c.set(s,{url:o,color:e,type:d?"shape":"fill"}),s}function St(t,n,o,l,c,d){let{path:f,svg:e,size:r}=J(l,c);if(d==="shape"){if(!n.block.supportsShape(o)){t.ui.showNotification({type:"error",message:`panel.${v}.invalidStateShape`});return}let i=n.block.getShape(o);n.block.setString(i,"shape/vector_path/path",f),n.block.setFloat(i,"shape/vector_path/height",r),n.block.setFloat(i,"shape/vector_path/width",r),It(n,o)}else if(d==="fill"){if(!n.block.supportsFill(o)){t.ui.showNotification({type:"error",message:`panel.${v}.invalidStateFill`});return}let i=n.block.getFill(o),a=`data:text/plain;base64,${btoa(e)}`;n.block.setSourceSet(i,"fill/image/sourceSet",[{uri:a,width:r,height:r}])}}function It(t,n){let o=t.block.duplicate(n),l=t.block.getParent(n);if(l!=null){let c=t.block.create("graphic");t.block.setShape(c,t.block.createShape("//ly.img.ubq/shape/rect")),t.block.appendChild(l,c),t.block.setPositionX(c,t.block.getPositionX(n)),t.block.setPositionY(c,t.block.getPositionY(n)),t.block.setWidth(c,t.block.getWidth(n)),t.block.setHeight(c,t.block.getHeight(n));let d=t.block.combine([o,c],"Intersection");t.block.setShape(n,t.block.getShape(d)),t.block.destroy(d)}return n}var Ni=t=>({name:Q,version:"1.69.0-rc.6",...Et(t)}),tn=Ni;export{tn as default};
|
|
21
21
|
/*! Bundled license information:
|
|
22
22
|
|
|
23
23
|
lodash-es/lodash.js:
|