From 7c070dcea89e3257e8d47b28993567dcb6f762a6 Mon Sep 17 00:00:00 2001 From: Amr Wagdy Date: Tue, 9 Aug 2022 19:23:52 +0200 Subject: [PATCH 1/8] Feat: update or set ci image - T8076 --- src/common/ci.constants.js | 11 ++++++++ src/common/ci.utils.js | 20 +++++++++++++- src/low-preview/ci.service.js | 51 +++++++++++++++++++++++++++++++++++ src/low-preview/ci.utis.js | 2 ++ 4 files changed, 83 insertions(+), 1 deletion(-) diff --git a/src/common/ci.constants.js b/src/common/ci.constants.js index e69de29..0e5693f 100644 --- a/src/common/ci.constants.js +++ b/src/common/ci.constants.js @@ -0,0 +1,11 @@ +const processedAttr = 'data-ci-processed'; + +const bgContentAttr = 'data-ci-bg-container'; + +const loadedImageClassNames = ['ci-image-loaded', 'lazyloaded', 'ci-image']; + +export { + processedAttr, + bgContentAttr, + loadedImageClassNames +} \ No newline at end of file diff --git a/src/common/ci.utils.js b/src/common/ci.utils.js index f32e195..f855979 100644 --- a/src/common/ci.utils.js +++ b/src/common/ci.utils.js @@ -201,4 +201,22 @@ export const destroyNodeImgSize = imgNode => { export const setAlt = (imgNode, alt) => { imgNode.setAttribute('alt', alt); -}; \ No newline at end of file +}; + +export const removeClassNames = (node, classNames) => { + classNames.forEach((className) => { + if (node.classList.contains(className)) { + node.classList.remove(className); + } + }); + + return node +} + +export const setOptions = (node, options) => { + Object.entries(options).forEach(([key, value]) => { + node.setAttribute(key, value); + }); + + return node; +} \ No newline at end of file diff --git a/src/low-preview/ci.service.js b/src/low-preview/ci.service.js index 3fbf9e1..979fae0 100644 --- a/src/low-preview/ci.service.js +++ b/src/low-preview/ci.service.js @@ -4,8 +4,10 @@ import { getFreshCIElements, getImageProps, isLazy, + removeClassNames, setAlt, setBackgroundSrc, + setOptions, setSrc, setSrcset } from '../common/ci.utils'; @@ -31,6 +33,7 @@ import { updateSizeWithPixelRatio } from './ci.utis'; import { debounce } from 'throttle-debounce'; +import { bgContentAttr, loadedImageClassNames, processedAttr } from '../common/ci.constants'; export default class CIResponsive { @@ -40,6 +43,7 @@ export default class CIResponsive { if (this.config.init) this.init(); this.innerWidth = window.innerWidth; + this.set = this.set; } init() { @@ -196,6 +200,8 @@ export default class CIResponsive { const { dataSrcAttr } = config; if (!isUpdate) { + imgNode.setAttribute(processedAttr, true); + if (isPreview) { const previewImgURL = getPreviewSRC({ src, params, config, containerProps }); const [previewBox, contentBox] = wrapBackgroundContainer(imgNode); @@ -217,4 +223,49 @@ export default class CIResponsive { setBackgroundSrc(imgNode, cloudimageUrl, lazy, src, isSVG, dataSrcAttr); } } + + set(src, node, options) { + const {imgSelector, bgSelector} = this.config; + + const isImage = node.hasAttribute(imgSelector); + const isBackground = node.hasAttribute(bgSelector); + const elementParentNode = node.parentNode; + + if (options && typeof options === 'object') { + node = setOptions(node, options); + } + + if (isImage) { + const isProcessed = node.classList.contains('ci-image'); + + if (src) { + node.setAttribute(imgSelector, src); + } + + if (isProcessed) { + let adaptedImageNode = removeClassNames(node, loadedImageClassNames); + + elementParentNode.parentNode.replaceChild(adaptedImageNode, elementParentNode); + } + } + + if (isBackground) { + const isProcessed = node.getAttribute(processedAttr); + + if (src) { + node.setAttribute(bgSelector, src); + } + + if (isProcessed) { + const contentBox = node.querySelector(`[${bgContentAttr}]`); + const contentBoxInner = contentBox.firstChild; + + node.removeAttribute(processedAttr); + node.innerHTML = ''; + node.appendChild(contentBoxInner); + } + } + + this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); + } } diff --git a/src/low-preview/ci.utis.js b/src/low-preview/ci.utis.js index 2d0aa81..5fd93ff 100644 --- a/src/low-preview/ci.utis.js +++ b/src/low-preview/ci.utis.js @@ -1,3 +1,4 @@ +import { bgContentAttr } from '../common/ci.constants'; import { addClass, getWrapper } from '../common/ci.utils'; @@ -18,6 +19,7 @@ export const applyBackgroundStyles = ({ imgNode, previewBox, contentBox, lazy, w imgNode.style.position = 'relative'; contentBox.style.position = 'relative'; + contentBox.setAttribute(bgContentAttr, true); previewBox.className = `${imgNode.className}${lazy ? ' lazyload' : ''}`; previewBox.setAttribute('ci-preview', true); From 7a71221b968659ae088cd364f5032a9d9ebc6935 Mon Sep 17 00:00:00 2001 From: Amr Wagdy Date: Thu, 11 Aug 2022 11:34:39 +0200 Subject: [PATCH 2/8] Feat: update or set ci image - T8076 --- src/blur-hash/ci.service.js | 55 +++++++++++++++++++++++++++++++++++ src/blur-hash/ci.utils.js | 2 ++ src/common/ci.constants.js | 3 ++ src/low-preview/ci.service.js | 5 ++-- src/plain/ci.service.js | 45 ++++++++++++++++++++++++++++ 5 files changed, 108 insertions(+), 2 deletions(-) diff --git a/src/blur-hash/ci.service.js b/src/blur-hash/ci.service.js index e503b84..f4e5def 100644 --- a/src/blur-hash/ci.service.js +++ b/src/blur-hash/ci.service.js @@ -4,11 +4,14 @@ import { getFreshCIElements, getImageProps, isLazy, + removeClassNames, setAlt, setBackgroundSrc, + setOptions, setSrc, setSrcset } from '../common/ci.utils'; +import { canvasAttr, loadedImageClassNames, processedAttr } from '../common/ci.constants' import { determineContainerProps } from 'cloudimage-responsive-utils/dist/utils/determine-container-props'; import { getImgSRC } from 'cloudimage-responsive-utils/dist/utils/get-img-src'; import { generateURL } from 'cloudimage-responsive-utils/dist/utils/generate-url'; @@ -149,6 +152,8 @@ export default class CIResponsive { initImageStyles(imgNode); setAlt(imgNode, alt); + imgNode.setAttribute(processedAttr, true); + if (config.destroyNodeImgSize) { destroyNodeImgSize(imgNode); } @@ -177,6 +182,8 @@ export default class CIResponsive { const canvas = applyOrUpdateBlurHashCanvas(imgNode, blurHash); + imgNode.setAttribute(processedAttr, true); + if (!lazy) { let tempImage = new Image(); @@ -190,4 +197,52 @@ export default class CIResponsive { setBackgroundSrc(imgNode, cloudimageUrl, lazy, src, isSVG, dataSrcAttr); } + + updateImage(src, node, options) { + if (!node) return; + + const {imgSelector, bgSelector} = this.config; + + const isImage = node.hasAttribute(imgSelector); + const isBackground = node.hasAttribute(bgSelector); + const elementParentNode = node.parentNode; + + if (options && typeof options === 'object') { + node = setOptions(node, options); + } + + if (isImage) { + const isProcessed = node.classList.contains('ci-image'); + + if (src) { + node.setAttribute(imgSelector, src); + } + + if (isProcessed) { + let adaptedImageNode = removeClassNames(node, loadedImageClassNames); + + elementParentNode.parentNode.replaceChild(adaptedImageNode, elementParentNode); + } + } + + if (isBackground) { + const isProcessed = node.getAttribute(processedAttr); + + if (src) { + node.setAttribute(bgSelector, src); + } + + if (isProcessed) { + removeClassNames(node, loadedImageClassNames); + + const canvas = node.querySelector(`[${canvasAttr}]`); + + if (canvas) { + canvas.parentNode.removeChild(canvas); + } + } + } + + this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); + } } diff --git a/src/blur-hash/ci.utils.js b/src/blur-hash/ci.utils.js index 51624c6..1856e59 100644 --- a/src/blur-hash/ci.utils.js +++ b/src/blur-hash/ci.utils.js @@ -1,3 +1,4 @@ +import { canvasAttr } from '../common/ci.constants'; import { addClass, getWrapper } from '../common/ci.utils'; import { decode } from './blurHash'; @@ -116,6 +117,7 @@ export const applyOrUpdateBlurHashCanvas = (wrapper, blurHash) => { if (!canvas && blurHash) { canvas = document.createElement("canvas"); + canvas.setAttribute(canvasAttr, true); const pixels = decode(blurHash, 32, 32); canvas.width = 32; canvas.height = 32; diff --git a/src/common/ci.constants.js b/src/common/ci.constants.js index 0e5693f..1cc5c22 100644 --- a/src/common/ci.constants.js +++ b/src/common/ci.constants.js @@ -2,10 +2,13 @@ const processedAttr = 'data-ci-processed'; const bgContentAttr = 'data-ci-bg-container'; +const canvasAttr = 'data-ci-canvas'; + const loadedImageClassNames = ['ci-image-loaded', 'lazyloaded', 'ci-image']; export { processedAttr, bgContentAttr, + canvasAttr, loadedImageClassNames } \ No newline at end of file diff --git a/src/low-preview/ci.service.js b/src/low-preview/ci.service.js index 979fae0..275ca4d 100644 --- a/src/low-preview/ci.service.js +++ b/src/low-preview/ci.service.js @@ -43,7 +43,6 @@ export default class CIResponsive { if (this.config.init) this.init(); this.innerWidth = window.innerWidth; - this.set = this.set; } init() { @@ -224,7 +223,9 @@ export default class CIResponsive { } } - set(src, node, options) { + updateImage(src, node, options) { + if (!node) return; + const {imgSelector, bgSelector} = this.config; const isImage = node.hasAttribute(imgSelector); diff --git a/src/plain/ci.service.js b/src/plain/ci.service.js index be08904..3b04cd4 100644 --- a/src/plain/ci.service.js +++ b/src/plain/ci.service.js @@ -5,11 +5,14 @@ import { getFreshCIElements, getImageProps, isLazy, + removeClassNames, setAlt, setBackgroundSrc, + setOptions, setSrc, setSrcset } from '../common/ci.utils'; +import { loadedImageClassNames, processedAttr } from '../common/ci.constants'; import { determineContainerProps } from 'cloudimage-responsive-utils/dist/utils/determine-container-props'; import { getImgSRC } from 'cloudimage-responsive-utils/dist/utils/get-img-src'; import { generateURL } from 'cloudimage-responsive-utils/dist/utils/generate-url'; @@ -156,8 +159,50 @@ export default class CIResponsive { if (!isUpdate) { imgNode.className = `${imgNode.className}${lazy ? ' lazyload' : ''}`; + imgNode.setAttribute(processedAttr, true); } setBackgroundSrc(imgNode, cloudimageUrl, lazy, src, isSVG, dataSrcAttr); } + + updateImage(src, node, options) { + if (!node) return; + + const {imgSelector, bgSelector} = this.config; + + const isImage = node.hasAttribute(imgSelector); + const isBackground = node.hasAttribute(bgSelector); + + if (options && typeof options === 'object') { + node = setOptions(node, options); + } + + if (isImage) { + const isProcessed = node.classList.contains('ci-image'); + + if (src) { + node.setAttribute(imgSelector, src); + } + + if (isProcessed) { + let adaptedImageNode = removeClassNames(node, loadedImageClassNames); + + node.parentNode.replaceChild(adaptedImageNode, node); + } + } + + if (isBackground) { + const isProcessed = node.getAttribute(processedAttr); + + if (src) { + node.setAttribute(bgSelector, src); + } + + if (isProcessed) { + removeClassNames(node, loadedImageClassNames); + } + } + + this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); + } } From 325b3192360d291da959daed7fa87628bbfc6a19 Mon Sep 17 00:00:00 2001 From: Amr Wagdy Date: Thu, 11 Aug 2022 11:47:05 +0200 Subject: [PATCH 3/8] Feat: update or set ci image - T8076 --- src/blur-hash/ci.service.js | 9 +++++++++ src/low-preview/ci.service.js | 9 +++++++++ src/plain/ci.service.js | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/src/blur-hash/ci.service.js b/src/blur-hash/ci.service.js index f4e5def..8c17469 100644 --- a/src/blur-hash/ci.service.js +++ b/src/blur-hash/ci.service.js @@ -245,4 +245,13 @@ export default class CIResponsive { this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); } + + addImage(node) { + if (!node) return; + + const { imgSelector } = this.config; + const isImage = node.hasAttribute(imgSelector); + + this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); + } } diff --git a/src/low-preview/ci.service.js b/src/low-preview/ci.service.js index 275ca4d..fc7c244 100644 --- a/src/low-preview/ci.service.js +++ b/src/low-preview/ci.service.js @@ -269,4 +269,13 @@ export default class CIResponsive { this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); } + + addImage(node) { + if (!node) return; + + const { imgSelector } = this.config; + const isImage = node.hasAttribute(imgSelector); + + this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); + } } diff --git a/src/plain/ci.service.js b/src/plain/ci.service.js index 3b04cd4..99e6d5b 100644 --- a/src/plain/ci.service.js +++ b/src/plain/ci.service.js @@ -205,4 +205,13 @@ export default class CIResponsive { this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); } + + addImage(node) { + if (!node) return; + + const { imgSelector } = this.config; + const isImage = node.hasAttribute(imgSelector); + + this.getBasicInfo(node, false, false, isImage ? 'image' : 'background'); + } } From 7519b2b66e64b2aa84ff81ed13eaca9cefb965b9 Mon Sep 17 00:00:00 2001 From: Amr Wagdy Date: Thu, 11 Aug 2022 20:19:42 +0200 Subject: [PATCH 4/8] Chore: Release v4.9.0 --- CHANGELOG.md | 4 + README-BLUR-HASH.md | 74 + README-PLAIN.md | 75 +- README.md | 79 +- .../blur-hash/js-cloudimage-responsive.min.js | 3 + ...s-cloudimage-responsive.min.js.LICENSE.txt | 11 + .../js-cloudimage-responsive.min.js.map | 1 + .../js-cloudimage-responsive.min.css | 11 + .../js-cloudimage-responsive.min.js | 4181 +++++++++++++++++ .../js-cloudimage-responsive.min.js.map | 1 + build/plain/js-cloudimage-responsive.min.js | 3 + ...s-cloudimage-responsive.min.js.LICENSE.txt | 11 + .../plain/js-cloudimage-responsive.min.js.map | 1 + build/wp/js-cloudimage-responsive.min.js | 3 + ...s-cloudimage-responsive.min.js.LICENSE.txt | 11 + build/wp/js-cloudimage-responsive.min.js.map | 1 + config/low-preview/webpack-build.config.js | 3 - package.json | 2 +- src/blur-hash/ci.service.js | 2 +- src/low-preview/ci.service.js | 2 +- src/plain/ci.service.js | 2 +- 21 files changed, 4470 insertions(+), 11 deletions(-) create mode 100644 build/blur-hash/js-cloudimage-responsive.min.js create mode 100644 build/blur-hash/js-cloudimage-responsive.min.js.LICENSE.txt create mode 100644 build/blur-hash/js-cloudimage-responsive.min.js.map create mode 100644 build/low-preview/js-cloudimage-responsive.min.css create mode 100644 build/low-preview/js-cloudimage-responsive.min.js create mode 100644 build/low-preview/js-cloudimage-responsive.min.js.map create mode 100644 build/plain/js-cloudimage-responsive.min.js create mode 100644 build/plain/js-cloudimage-responsive.min.js.LICENSE.txt create mode 100644 build/plain/js-cloudimage-responsive.min.js.map create mode 100644 build/wp/js-cloudimage-responsive.min.js create mode 100644 build/wp/js-cloudimage-responsive.min.js.LICENSE.txt create mode 100644 build/wp/js-cloudimage-responsive.min.js.map diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e6093c..6e20ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,10 @@ Types of changes: - ... ------------- +## 4.9.0 - 2022-08-11 +### Added +- Possibility to change ci-src and process image. + ## 4.8.13 - 2022-08-05 ### Fixed - Undefined hostname when adding relative src diff --git a/README-BLUR-HASH.md b/README-BLUR-HASH.md index c50e91a..7a52005 100644 --- a/README-BLUR-HASH.md +++ b/README-BLUR-HASH.md @@ -81,6 +81,7 @@ powered by [Cloudimage](https://www.cloudimage.io/) * [Step 3: Implement](#implement) * [Step 4: Prevent seeing broken images](#prevent_styles) * [Configuration](#configuration) +* [Methods](#methods) * [Image properties](#image_properties) * [Lazy loading](#lazy_loading) * [Process dynamically loaded images](#dynamically-loaded) @@ -397,8 +398,81 @@ If width and height attributes are NOT set, image container size will be detecte *Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute +## methods + +#### `updateImage` + +Type: `function updateImage(newSrc, imgNode, options)` + +arguments: + +`imgNode: HTMLElement` The image node to be updated.
+`newSrc: String` The new image src.
+`options: Object` Options that you need to add on the image, All the image properties can be added in options. + +Example: + +```js + const image = document.getElementById('cloudimage-image-example'); + const options = { 'ci-params': 'grey=1', alt: 'dress' }; + + window.ciResponsive.updateImage(image, 'dresses-img.jpg', options); +``` +beside using this method to update image src or options. you can use it to for background images. + +Example: +```js + const bgImage = document.getElementById('cloudimage-bg-example'); + const options = { 'ci-params': 'grey=1', alt: 'house' }; + + window.ciResponsive.updateImage(bgImage, 'house-img.jpg', options); +``` + +edit in codesandbox + +#### `addImage` + +Type: `function updateImage(newSrc, imgNode, options)` + +arguments: + +`imgNode: HTMLElement` The image node to be added.
+ +Supported version: +v4.9.0 + +Example: + +```js + const image = document.createElement('img'); + + image.setAttribute('ci-src', 'dresses-img.jpg'); + image.setAttribute('ci-params', 'gery=1'); + + document.body.appendChild(image); + window.ciResponsive.addImage(image); +``` +beside using this method to update image src or options. you can use it to for background images. + +Example: + +```js + const bgImage = document.createElement('section'); + const paragraph = document.createElement('p'); + + bgImage.setAttribute('ci-bg-url', 'house-img.jpg'); + bgImage.setAttribute('ci-params', 'gery=1'); + + paragraph.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a nulla dictum'; + + bgImage.appendChild(paragraph); + document.body.appendChild(bgImage); + window.ciResponsive.addImage(bgImage); +``` + +edit in codesandbox ## Image properties + Cloudimage responsive plugin will make image on your page responsive if you replace the `src` with `ci-src` attribute in the `` tag: ### ci-src diff --git a/README-PLAIN.md b/README-PLAIN.md index fb46b41..af0ed04 100644 --- a/README-PLAIN.md +++ b/README-PLAIN.md @@ -76,6 +76,7 @@ Cloudimage, contact us at * [Step 3: Implement](#implement) * [Step 4: Prevent seeing broken images](#prevent_styles) * [Configuration](#configuration) +* [Methods](#methods) * [Image properties](#image_properties) * [Lazy loading](#lazy_loading) * [Process dynamically loaded images](#dynamically-loaded) @@ -381,7 +382,7 @@ Breakpoints shortcuts to use in image size property, can be overwridden. If width and height attributes are set: -**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**. +**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**. **take-ratio** - width & height attributes values will be used only to calculate **ratio**. @@ -390,6 +391,78 @@ If width and height attributes are set: If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR) *Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute +## methods + +#### `updateImage` + +Type: `function updateImage(newSrc, imgNode, options)` + +arguments: + +`imgNode: HTMLElement` The image node to be updated.
+`newSrc: String` The new image src.
+`options: Object` Options that you need to add on the image, All the image properties can be added in options. + +Example: + +```js + const image = document.getElementById('cloudimage-image-example'); + const options = { 'ci-params': 'grey=1', alt: 'dress' }; + + window.ciResponsive.updateImage(image, 'dresses-img.jpg', options); +``` +beside using this method to update image src or options. you can use it to for background images. + +Example: +```js + const bgImage = document.getElementById('cloudimage-bg-example'); + const options = { 'ci-params': 'grey=1', alt: 'house' }; + + window.ciResponsive.updateImage(bgImage, 'house-img.jpg', options); +``` + +edit in codesandbox + +#### `addImage` + +Type: `function updateImage(newSrc, imgNode, options)` + +arguments: + +`imgNode: HTMLElement` The image node to be added.
+ +Supported version: +v4.9.0 + +Example: + +```js + const image = document.createElement('img'); + + image.setAttribute('ci-src', 'dresses-img.jpg'); + image.setAttribute('ci-params', 'gery=1'); + + document.body.appendChild(image); + window.ciResponsive.addImage(image); +``` +beside using this method to update image src or options. you can use it to for background images. + +Example: + +```js + const bgImage = document.createElement('section'); + const paragraph = document.createElement('p'); + + bgImage.setAttribute('ci-bg-url', 'house-img.jpg'); + bgImage.setAttribute('ci-params', 'gery=1'); + + paragraph.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a nulla dictum'; + + bgImage.appendChild(paragraph); + document.body.appendChild(bgImage); + window.ciResponsive.addImage(bgImage); +``` + +edit in codesandbox ## Image properties diff --git a/README.md b/README.md index 1ba3bf7..ba52a72 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ you can check our all-in-one Digital Asset Management solution * [Step 2: Initialize](#initialize) * [Step 3: Implement](#implement) * [Configuration](#configuration) +* [Methods](#methods) * [Image properties](#image_properties) * [Lazy loading](#lazy_loading) * [Process dynamically loaded images](#dynamically-loaded) @@ -308,7 +309,7 @@ Multiple params can be applied, separated by "```&```" e.g. wat_scale=35&wat_gra } ``` -#### alternative syntax +#### alternative syntax ###### Type: **Object** @@ -396,11 +397,11 @@ Breakpoints shortcuts to use in image size property, can be overridden. ### imageSizeAttributes -###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'** +###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'** If width and height attributes are set: -**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**. +**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**. **take-ratio** - width & height attributes values will be used only to calculate **ratio**. @@ -410,6 +411,78 @@ If width and height attributes are NOT set, image container size will be detecte *Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute +## methods + +#### `updateImage` + +Type: `function updateImage(newSrc, imgNode, options)` + +arguments: + +`imgNode: HTMLElement` The image node to be updated.
+`newSrc: String` The new image src.
+`options: Object` Options that you need to add on the image, All the image properties can be added in options. + +Example: + +```js + const image = document.getElementById('cloudimage-image-example'); + const options = { 'ci-params': 'grey=1', alt: 'dress' }; + + window.ciResponsive.updateImage(image, 'dresses-img.jpg', options); +``` +beside using this method to update image src or options. you can use it to for background images. + +Example: +```js + const bgImage = document.getElementById('cloudimage-bg-example'); + const options = { 'ci-params': 'grey=1', alt: 'house' }; + + window.ciResponsive.updateImage(bgImage, 'house-img.jpg', options); +``` + +edit in codesandbox + +#### `addImage` + +Type: `function updateImage(newSrc, imgNode, options)` + +arguments: + +`imgNode: HTMLElement` The image node to be added.
+ +Supported version: +v4.9.0 + +Example: + +```js + const image = document.createElement('img'); + + image.setAttribute('ci-src', 'dresses-img.jpg'); + image.setAttribute('ci-params', 'gery=1'); + + document.body.appendChild(image); + window.ciResponsive.addImage(image); +``` +beside using this method to update image src or options. you can use it to for background images. + +Example: + +```js + const bgImage = document.createElement('section'); + const paragraph = document.createElement('p'); + + bgImage.setAttribute('ci-bg-url', 'house-img.jpg'); + bgImage.setAttribute('ci-params', 'gery=1'); + + paragraph.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a nulla dictum'; + + bgImage.appendChild(paragraph); + document.body.appendChild(bgImage); + window.ciResponsive.addImage(bgImage); +``` + +edit in codesandbox ## Image properties The Cloudimage responsive plugin will make an image on your page responsive if you replace the `src` with a `ci-src` attribute in the `` tag: diff --git a/build/blur-hash/js-cloudimage-responsive.min.js b/build/blur-hash/js-cloudimage-responsive.min.js new file mode 100644 index 0000000..007d25a --- /dev/null +++ b/build/blur-hash/js-cloudimage-responsive.min.js @@ -0,0 +1,3 @@ +/*! For license information please see js-cloudimage-responsive.min.js.LICENSE.txt */ +(()=>{var t={5748:()=>{window.CanvasPixelArray&&(CanvasPixelArray.prototype.set=function(t){for(var e=this.length,r=0;r2){if(!((t=e.shift())instanceof Uint8ClampedArray))throw new TypeError("\n Failed to construct 'ImageData': parameter 1 is not of type 'Uint8ClampedArray'\n ");if(t.length!==4*e[0]*e[1])throw new Error("\n Failed to construct 'ImageData': The input data byte length is not a multiple of (4 * width * height)\n ")}var r=e[0],n=e[1],o=document.createElement("canvas"),i=o.getContext("2d"),a=i.createImageData(r,n);return t&&a.data.set(t),a}}}()},6423:()=>{[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(t){t.hasOwnProperty("prepend")||Object.defineProperty(t,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var t=Array.prototype.slice.call(arguments),e=document.createDocumentFragment();t.forEach((function(t){var r=t instanceof Node;e.appendChild(r?t:document.createTextNode(String(t)))})),this.insertBefore(e,this.firstChild)}})}))},5644:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEVICE_PIXEL_RATIO_LIST=void 0,e.DEVICE_PIXEL_RATIO_LIST=[1,1.5,2]},4113:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertToPX=void 0;var n=r(4975);e.convertToPX=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(t=(t||"").toString()).indexOf("px")>-1?parseInt(t):t.indexOf("%")>-1?null:t.indexOf("vw")>-1?(0,n.isServer)()?null:window.innerWidth*parseInt(t)/100:t.indexOf("vh")>-1?(0,n.isServer)()?null:window.innerHeight*parseInt(t)/100:parseInt(t)||""}},9343:(t,e,r)=>{"use strict";e.e=void 0;var n=r(3919),o=r(5989),i=r(7403),a=r(9473),u=r(5644),c=r(5479);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";e.s=void 0,e.s=function(t){if(t){var e=t.split("/"),r=(e[e.length-1]||"").replace(/\+|-|_|&/g," ").toLocaleLowerCase(),n=r.indexOf(".");return r.slice(0,n)}}},8599:(t,e,r)=>{"use strict";e.b=void 0;var n=r(5644),o=["w","h","width","height"];function i(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";e.i=void 0;var n=r(4975);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r-1?n:e[n];r.push({media:o,params:a(t[n])})})),r},a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.w,r=void 0===e?t.width||"":e,n=t.h,o=void 0===n?t.height||"":n,i=t.r,a=void 0===i?t.r:i,u=t.src,c=void 0===u?t.src:u;if(r.toString().indexOf("vw")>-1){var s=parseFloat(r);r=window.innerWidth*s/100}else r=parseFloat(r);if(o.toString().indexOf("vh")>-1){var f=parseFloat(o);o=window.innerHeight*f/100}else o=parseFloat(o);return{w:r,h:o,r:a,src:c}}},7403:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getImageHeight=e.getHeight=void 0;var n=r(4113),o=r(9390),i=r(3919),a=r(4975);e.getHeight=function(t){var e=t.imgNode,r=void 0===e?null:e,c=t.config,s=void 0===c?{}:c,f=t.imgNodeHeight,p=void 0===f?null:f,l=t.params,d=void 0===l?{}:l,v=t.size,y=t.width,h=s.ignoreNodeImgSize,g=s.ignoreStyleImgSize,m=s.imageSizeAttributes,b=s.params,w=void 0===b?{}:b,x=void 0!==h?h:"use"!==m,A=(0,i.isCrop)(d.func||w.func),O=v&&v.params&&(v.params.h||v.params.height),S=v&&v.params&&(v.params.ratio||v.params.r),T=d.height||d.h,j=!x&&p&&(0,n.convertToPX)(p),I=!g&&u(r),E=(0,a.isServer)()?null:!I&&parseInt((0,o.getParentContainerSize)(r,"height"),10);return v&&v.params?S&&y?y/S:O:T||(!x&&p?j:I||(A?E:null))};var u=function(t){var e,r=t&&t.style&&t.style.height,o=r&&!(-1!==r.indexOf("%"));return r=o&&r||"",(e=(0,n.convertToPX)(r))&&parseInt(e,10)};e.getImageHeight=u},623:(t,e,r)=>{"use strict";e.K=void 0;var n=r(7281),o=r(4975);e.K=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=c(t);return 0===t.indexOf("//")&&(t=((0,o.isServer)()?"https:":window.location.protocol)+t),r&&(t=i(e,t)),[t,(0,n.isSVG)(t)]};var i=function(t,e){var r="/"===e[0],n=a(r,t).split("/"),o=e.split("/");n.length>1&&n.pop(),r&&o.shift();for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"",e=t.split("/"),r=e[0],n=e[2];return r&&n?r+"//"+n:t},c=function(t){return!!t&&(0===t.indexOf("//")&&(t=((0,o.isServer)()?"https:":window.location.protocol)+t),0!==t.indexOf("http://")&&0!==t.indexOf("https://")&&0!==t.indexOf("//"))}},7086:(t,e)=>{"use strict";e.h=void 0,e.h=function(t){var e=t.indexOf("?");if(-1!==e)return r(t.slice(e+1))};var r=function(t){var e=void 0;try{var r=t.replace(/(\w+:)|(\w+ :)/g,(function(t){return'"'+t.substring(0,t.length-1)+'":'}));e=JSON.parse(r)}catch(t){}if(!e)try{e=JSON.parse('{"'+decodeURI(t.replace(/&/g,'","').replace(/=/g,'":"'))+'"}')}catch(t){}return e}},9390:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParentContainerSize=void 0,e.getParentContainerSize=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"width",r=t,n=0,o=0;do{n="function"==typeof(r=r&&r.parentNode).getBoundingClientRect?r.getBoundingClientRect()[e]:window.innerWidth,o+=1}while(r&&!n&&o>5);var i=n&&r&&1===r.nodeType?parseInt(window.getComputedStyle(r).paddingLeft):0,a=n&&r&&1===r.nodeType?parseInt(window.getComputedStyle(r).paddingRight):0;return n||(n=window.innerWidth),n+(n?-i-a:0)}},9473:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRatio=void 0,e.getRatio=function(t){var e=t.imgNodeRatio,r=t.width,n=t.height,o=t.size,i=t.config,a=void 0===i?{}:i,u=t.imgNodeWidth,c=t.imgNodeHeight,s="ignore"===a.imageSizeAttributes;return o&&o.params?o.params.r||o.params.ratio?o.params.r||o.params.ratio:(o.params.w||o.params.width)&&(o.params.h||o.params.height)?(o.params.w||o.params.width)/(o.params.h||o.params.height):null:!s&&u&&c?u/c:!s&&e?e:r&&n?r/n:null}},5479:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSizeLimit=void 0,e.getSizeLimit=function(t,e,r){return e?Math.ceil(t):t<=25?25:t<=50?50:Math.ceil(t/r)*r}},5989:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWidth=void 0;var n=r(4113),o=r(9390),i=r(4975);e.getWidth=function(t){var e=t.imgNode,r=t.imgNodeWidth,u=void 0===r?null:r,c=t.params,s=void 0===c?{}:c,f=t.size,p=t.config,l=void 0===p?{}:p,d=l.ignoreNodeImgSize,v=l.ignoreStyleImgSize,y=l.imageSizeAttributes,h=l.detectImageNodeCSS,g=void 0!==d?d:"use"!==y,m=f&&f.params&&(f.params.w||f.params.width),b=s.width||s.w,w=!g&&u&&(0,n.convertToPX)(u),x=!v&&a(e,h),A=(0,i.isServer)()?null:!x&&parseInt((0,o.getParentContainerSize)(e),10),O=x||A;return f&&f.params?f.params.r?s.width||s.w?[b]:!g&&u?[w]:[O]:[m]:b?[b]:!g&&u?[w]:[O,!0]};var a=function(t,e){var r=t&&t.style&&t.style.width&&!(-1!==t.style.width.indexOf("%"))&&t.style.width,o=r&&(0,n.convertToPX)(r),a=!(0,i.isServer)()&&e&&u(t);return e&&a?a:o&&parseInt(o,10)},u=function(t){var e,r=t.style.display;return t.style.display="inline-block",e=t.getBoundingClientRect().width,t.style.display=r,e}},3919:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCrop=void 0,e.isCrop=function(t){return-1!==["crop","fit","bound","cover"].indexOf(t)}},4975:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isServer=void 0,e.isServer=function(){return"undefined"==typeof window}},8313:(t,e,r)=>{"use strict";e.e=void 0;var n=r(4975);e.e=function(t){var e=!0;if(t&&!(0,n.isServer)())try{new window.ImageData(new Uint8ClampedArray([0,0,0,0]),1,1)}catch(t){e=!1}return Element.prototype.hasOwnProperty("prepend")&&e}},7281:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSVG=void 0,e.isSVG=function(t){return".svg"===t.slice(-4).toLowerCase()}},9253:(t,e,r)=>{var n=r(687);r(7380),r(1118),r(3767),r(8585),r(8970),r(8696),t.exports=n},1144:(t,e,r)=>{var n=r(8810);r(9253),t.exports=n},6443:(t,e,r)=>{r(1539),r(8783),r(8145),r(5206),r(8675),r(2990),r(8927),r(3105),r(5035),r(4345),r(7174),r(3408),r(2958),r(2846),r(4731),r(7209),r(8867),r(7789),r(3739),r(9368),r(4483),r(2056),r(3462),r(678),r(7462),r(3824),r(5021),r(2974),r(5016),r(6319)},9447:(t,e,r)=>{r(8264),r(9575),r(9743),r(6443);var n=r(7854);t.exports=n.Uint8ClampedArray},9569:(t,e,r)=>{r(4233)},1435:(t,e,r)=>{var n=r(9253);r(1532),r(8674),r(6850),r(8012),r(6182),r(8922),r(5835),r(4444),t.exports=n},4233:(t,e,r)=>{var n=r(1144);r(1435),t.exports=n},9662:(t,e,r)=>{var n=r(614),o=r(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),o=r(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),o=r(30),i=r(3070).f,a=n("unscopables"),u=Array.prototype;null==u[a]&&i(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},5787:(t,e,r)=>{var n=r(7976),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw o("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(111),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not an object")}},4019:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(t,e,r)=>{var n=r(7293);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},260:(t,e,r)=>{"use strict";var n,o,i,a=r(4019),u=r(9781),c=r(7854),s=r(614),f=r(111),p=r(2597),l=r(648),d=r(6330),v=r(8880),y=r(8052),h=r(3070).f,g=r(7976),m=r(9518),b=r(7674),w=r(5112),x=r(9711),A=r(9909),O=A.enforce,S=A.get,T=c.Int8Array,j=T&&T.prototype,I=c.Uint8ClampedArray,E=I&&I.prototype,P=T&&m(T),R=j&&m(j),N=Object.prototype,C=c.TypeError,M=w("toStringTag"),_=x("TYPED_ARRAY_TAG"),z=a&&!!b&&"Opera"!==l(c.opera),U=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},k={BigInt64Array:8,BigUint64Array:8},D=function(t){var e=m(t);if(f(e)){var r=S(e);return r&&p(r,"TypedArrayConstructor")?r.TypedArrayConstructor:D(e)}},F=function(t){if(!f(t))return!1;var e=l(t);return p(L,e)||p(k,e)};for(n in L)(i=(o=c[n])&&o.prototype)?O(i).TypedArrayConstructor=o:z=!1;for(n in k)(i=(o=c[n])&&o.prototype)&&(O(i).TypedArrayConstructor=o);if((!z||!s(P)||P===Function.prototype)&&(P=function(){throw C("Incorrect invocation")},z))for(n in L)c[n]&&b(c[n],P);if((!z||!R||R===N)&&(R=P.prototype,z))for(n in L)c[n]&&b(c[n].prototype,R);if(z&&m(E)!==R&&b(E,R),u&&!p(R,M))for(n in U=!0,h(R,M,{get:function(){return f(this)?this[_]:void 0}}),L)c[n]&&v(c[n],_,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:z,TYPED_ARRAY_TAG:U&&_,aTypedArray:function(t){if(F(t))return t;throw C("Target is not a typed array")},aTypedArrayConstructor:function(t){if(s(t)&&(!b||g(P,t)))return t;throw C(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(u){if(r)for(var o in L){var i=c[o];if(i&&p(i.prototype,t))try{delete i.prototype[t]}catch(r){try{i.prototype[t]=e}catch(t){}}}R[t]&&!r||y(R,t,r?e:z&&j[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(u){if(b){if(r)for(n in L)if((o=c[n])&&p(o,t))try{delete o[t]}catch(t){}if(P[t]&&!r)return;try{return y(P,t,r?e:z&&P[t]||e)}catch(t){}}for(n in L)!(o=c[n])||o[t]&&!r||y(o,t,e)}},getTypedArrayConstructor:D,isView:function(t){if(!f(t))return!1;var e=l(t);return"DataView"===e||p(L,e)||p(k,e)},isTypedArray:F,TypedArray:P,TypedArrayPrototype:R}},3331:(t,e,r)=>{"use strict";var n=r(7854),o=r(1702),i=r(9781),a=r(4019),u=r(6530),c=r(8880),s=r(9190),f=r(7293),p=r(5787),l=r(9303),d=r(7466),v=r(7067),y=r(1179),h=r(9518),g=r(7674),m=r(8006).f,b=r(3070).f,w=r(1285),x=r(1589),A=r(8003),O=r(9909),S=u.PROPER,T=u.CONFIGURABLE,j=O.get,I=O.set,E="ArrayBuffer",P="Wrong index",R=n.ArrayBuffer,N=R,C=N&&N.prototype,M=n.DataView,_=M&&M.prototype,z=Object.prototype,U=n.Array,L=n.RangeError,k=o(w),D=o([].reverse),F=y.pack,W=y.unpack,B=function(t){return[255&t]},V=function(t){return[255&t,t>>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},G=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Y=function(t){return F(t,23,4)},X=function(t){return F(t,52,8)},q=function(t,e){b(t.prototype,e,{get:function(){return j(this)[e]}})},J=function(t,e,r,n){var o=v(r),i=j(t);if(o+e>i.byteLength)throw L(P);var a=j(i.buffer).bytes,u=o+i.byteOffset,c=x(a,u,u+e);return n?c:D(c)},K=function(t,e,r,n,o,i){var a=v(r),u=j(t);if(a+e>u.byteLength)throw L(P);for(var c=j(u.buffer).bytes,s=a+u.byteOffset,f=n(+o),p=0;ptt;)($=Z[tt++])in N||c(N,$,R[$]);C.constructor=N}g&&h(_)!==z&&g(_,z);var et=new M(new N(2)),rt=o(_.setInt8);et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||s(_,{setInt8:function(t,e){rt(this,t,e<<24>>24)},setUint8:function(t,e){rt(this,t,e<<24>>24)}},{unsafe:!0})}else C=(N=function(t){p(this,C);var e=v(t);I(this,{bytes:k(U(e),0),byteLength:e}),i||(this.byteLength=e)}).prototype,_=(M=function(t,e,r){p(this,_),p(t,C);var n=j(t).byteLength,o=l(e);if(o<0||o>n)throw L("Wrong offset");if(o+(r=void 0===r?n-o:d(r))>n)throw L("Wrong length");I(this,{buffer:t,byteLength:r,byteOffset:o}),i||(this.buffer=t,this.byteLength=r,this.byteOffset=o)}).prototype,i&&(q(N,"byteLength"),q(M,"buffer"),q(M,"byteLength"),q(M,"byteOffset")),s(_,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return G(J(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return G(J(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return W(J(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return W(J(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){K(this,1,t,B,e)},setUint8:function(t,e){K(this,1,t,B,e)},setInt16:function(t,e){K(this,2,t,V,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){K(this,2,t,V,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){K(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){K(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){K(this,4,t,Y,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){K(this,8,t,X,e,arguments.length>2?arguments[2]:void 0)}});A(N,E),A(M,"DataView"),t.exports={ArrayBuffer:N,DataView:M}},1048:(t,e,r)=>{"use strict";var n=r(7908),o=r(1400),i=r(6244),a=r(5117),u=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),c=i(r),s=o(t,c),f=o(e,c),p=arguments.length>2?arguments[2]:void 0,l=u((void 0===p?c:o(p,c))-f,c-s),d=1;for(f0;)f in r?r[s]=r[f]:a(r,s),s+=d,f+=d;return r}},1285:(t,e,r)=>{"use strict";var n=r(7908),o=r(1400),i=r(6244);t.exports=function(t){for(var e=n(this),r=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>u;)e[u++]=t;return e}},3253:(t,e,r)=>{"use strict";var n=r(9974),o=r(7908),i=r(4411),a=r(4777),u=r(8554),c=r(1246),s=r(8173),f=r(8770),p=r(5005),l=r(5112),d=r(8091),v=r(2269).toArray,y=l("asyncIterator"),h=f("Array").values;t.exports=function(t){var e=this,r=arguments.length,f=r>1?arguments[1]:void 0,l=r>2?arguments[2]:void 0;return new(p("Promise"))((function(r){var p=o(t);void 0!==f&&(f=n(f,l));var g=s(p,y),m=g?void 0:c(p)||h,b=i(e)?new e:[],w=g?a(p,g):new d(u(p,m));r(v(w,f,b))}))}},7745:(t,e,r)=>{var n=r(6244);t.exports=function(t,e){for(var r=0,o=n(e),i=new t(o);o>r;)i[r]=e[r++];return i}},1191:(t,e,r)=>{var n=r(9974),o=r(1702),i=r(8361),a=r(7908),u=r(4948),c=r(6244),s=r(30),f=r(7745),p=Array,l=o([].push);t.exports=function(t,e,r,o){for(var d,v,y,h=a(t),g=i(h),m=n(e,r),b=s(null),w=c(g),x=0;w>x;x++)y=g[x],(v=u(m(y,x,h)))in b?l(b[v],y):b[v]=[y];if(o&&(d=o(h))!==p)for(v in b)b[v]=f(d,b[v]);return b}},1318:(t,e,r)=>{var n=r(5656),o=r(1400),i=r(6244),a=function(t){return function(e,r,a){var u,c=n(e),s=i(c),f=o(a,s);if(t&&r!=r){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9671:(t,e,r)=>{var n=r(9974),o=r(8361),i=r(7908),a=r(6244),u=function(t){var e=1==t;return function(r,u,c){for(var s,f=i(r),p=o(f),l=n(u,c),d=a(p);d-- >0;)if(l(s=p[d],d,f))switch(t){case 0:return s;case 1:return d}return e?-1:void 0}};t.exports={findLast:u(0),findLastIndex:u(1)}},2092:(t,e,r)=>{var n=r(9974),o=r(1702),i=r(8361),a=r(7908),u=r(6244),c=r(5417),s=o([].push),f=function(t){var e=1==t,r=2==t,o=3==t,f=4==t,p=6==t,l=7==t,d=5==t||p;return function(v,y,h,g){for(var m,b,w=a(v),x=i(w),A=n(y,h),O=u(x),S=0,T=g||c,j=e?T(v,O):r||l?T(v,0):void 0;O>S;S++)if((d||S in x)&&(b=A(m=x[S],S,w),t))if(e)j[S]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return S;case 2:s(j,m)}else switch(t){case 4:return!1;case 7:s(j,m)}return p?-1:o||f?f:j}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},6583:(t,e,r)=>{"use strict";var n=r(2104),o=r(5656),i=r(9303),a=r(6244),u=r(9341),c=Math.min,s=[].lastIndexOf,f=!!s&&1/[1].lastIndexOf(1,-0)<0,p=u("lastIndexOf"),l=f||!p;t.exports=l?function(t){if(f)return n(s,this,arguments)||0;var e=o(this),r=a(e),u=r-1;for(arguments.length>1&&(u=c(u,i(arguments[1]))),u<0&&(u=r+u);u>=0;u--)if(u in e&&e[u]===t)return u||0;return-1}:s},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},3671:(t,e,r)=>{var n=r(9662),o=r(7908),i=r(8361),a=r(6244),u=TypeError,c=function(t){return function(e,r,c,s){n(r);var f=o(e),p=i(f),l=a(f),d=t?l-1:0,v=t?-1:1;if(c<2)for(;;){if(d in p){s=p[d],d+=v;break}if(d+=v,t?d<0:l<=d)throw u("Reduce of empty array with no initial value")}for(;t?d>=0:l>d;d+=v)d in p&&(s=r(s,p[d],d,f));return s}};t.exports={left:c(!1),right:c(!0)}},1589:(t,e,r)=>{var n=r(1400),o=r(6244),i=r(6135),a=Array,u=Math.max;t.exports=function(t,e,r){for(var c=o(t),s=n(e,c),f=n(void 0===r?c:r,c),p=a(u(f-s,0)),l=0;s{var n=r(1702);t.exports=n([].slice)},4362:(t,e,r)=>{var n=r(1589),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?a(t,e):u(t,i(n(t,0,c),e),i(n(t,c),e),e)},a=function(t,e){for(var r,n,o=t.length,i=1;i0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},u=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,u=0;a{var n=r(3157),o=r(4411),i=r(111),a=r(5112)("species"),u=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(o(e)&&(e===u||n(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?u:e}},5417:(t,e,r)=>{var n=r(7475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},1843:(t,e,r)=>{var n=r(6244);t.exports=function(t,e){for(var r=n(t),o=new e(r),i=0;i{"use strict";var n=r(5005),o=r(1702),i=r(9662),a=r(6244),u=r(7908),c=r(5417),s=n("Map"),f=s.prototype,p=o(f.forEach),l=o(f.has),d=o(f.set),v=o([].push);t.exports=function(t){var e,r,n,o=u(this),f=a(o),y=c(o,0),h=new s,g=null!=t?i(t):function(t){return t};for(e=0;e{var n=r(6244),o=r(9303),i=RangeError;t.exports=function(t,e,r,a){var u=n(t),c=o(r),s=c<0?u+c:c;if(s>=u||s<0)throw i("Incorrect index");for(var f=new e(u),p=0;p{"use strict";var n=r(6916),o=r(9670),i=r(30),a=r(8173),u=r(9190),c=r(9909),s=r(5005),f=r(6462),p=s("Promise"),l="AsyncFromSyncIterator",d=c.set,v=c.getterFor(l),y=function(t,e,r){var n=t.done;p.resolve(t.value).then((function(t){e({done:n,value:t})}),r)},h=function(t){d(this,{type:l,iterator:o(t),next:t.next})};h.prototype=u(i(f),{next:function(){var t=v(this);return new p((function(e,r){var i=o(n(t.next,t.iterator));y(i,e,r)}))},return:function(){var t=v(this).iterator;return new p((function(e,r){var i=a(t,"return");if(void 0===i)return e({done:!0,value:void 0});var u=o(n(i,t));y(u,e,r)}))}}),t.exports=h},1753:(t,e,r)=>{var n=r(6916),o=r(5005),i=r(8173);t.exports=function(t,e,r,a){try{var u=i(t,"return");if(u)return o("Promise").resolve(n(u,t)).then((function(){e(r)}),(function(t){a(t)}))}catch(t){return a(t)}e(r)}},2269:(t,e,r)=>{"use strict";var n=r(6916),o=r(9662),i=r(9670),a=r(7207),u=r(5005),c=r(4942),s=r(1753),f=function(t){var e=0==t,r=1==t,f=2==t,p=3==t;return function(t,l,d){var v=c(t),y=u("Promise"),h=v.iterator,g=v.next,m=0,b=void 0!==l;return!b&&e||o(l),new y((function(t,o){var u=function(t){s(h,o,t,o)},c=function(){try{if(e&&b)try{a(m)}catch(t){u(t)}y.resolve(i(n(g,h))).then((function(n){try{if(i(n).done)e?(d.length=m,t(d)):t(!p&&(f||void 0));else{var a=n.value;try{b?y.resolve(e?l(a,m):l(a)).then((function(n){if(r)c();else if(f)n?c():s(h,t,!1,o);else if(e)try{d[m++]=n,c()}catch(t){u(t)}else n?s(h,t,p||a,o):c()}),u):(d[m++]=a,c())}catch(t){u(t)}}}catch(t){o(t)}}),o)}catch(t){o(t)}};c()}))}};t.exports={toArray:f(0),forEach:f(1),every:f(2),some:f(3),find:f(4)}},6462:(t,e,r)=>{var n,o,i=r(7854),a=r(5465),u=r(614),c=r(30),s=r(9518),f=r(8052),p=r(5112),l=r(1913),d=p("asyncIterator"),v=i.AsyncIterator,y=a.AsyncIteratorPrototype;if(y)n=y;else if(u(v))n=v.prototype;else if(a.USE_FUNCTION_CONSTRUCTOR||i.USE_FUNCTION_CONSTRUCTOR)try{o=s(s(s(Function("return async function*(){}()")()))),s(o)===Object.prototype&&(n=o)}catch(t){}n?l&&(n=c(n)):n={},u(n[d])||f(n,d,(function(){return this})),t.exports=n},7072:(t,e,r)=>{var n=r(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},4326:(t,e,r)=>{var n=r(1702),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,r)=>{var n=r(1694),o=r(614),i=r(4326),a=r(5112)("toStringTag"),u=Object,c="Arguments"==i(function(){return arguments}());t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=u(t),a))?r:c?i(e):"Object"==(n=i(e))&&o(e.callee)?"Arguments":n}},5631:(t,e,r)=>{"use strict";var n=r(3070).f,o=r(30),i=r(9190),a=r(9974),u=r(5787),c=r(408),s=r(654),f=r(6340),p=r(9781),l=r(2423).fastKey,d=r(9909),v=d.set,y=d.getterFor;t.exports={getConstructor:function(t,e,r,s){var f=t((function(t,n){u(t,d),v(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),p||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),d=f.prototype,h=y(e),g=function(t,e,r){var n,o,i=h(t),a=m(t,e);return a?a.value=r:(i.last=a={index:o=l(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),p?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},m=function(t,e){var r,n=h(t),o=l(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(d,{clear:function(){for(var t=h(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,p?t.size=0:this.size=0},delete:function(t){var e=this,r=h(e),n=m(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),p?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=h(this),n=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!m(this,t)}}),i(d,r?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),p&&n(d,"size",{get:function(){return h(this).size}}),f},setStrong:function(t,e,r){var n=e+" Iterator",o=y(e),i=y(n);s(t,e,(function(t,e){v(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),f(e)}}},7710:(t,e,r)=>{"use strict";var n=r(2109),o=r(7854),i=r(1702),a=r(4705),u=r(8052),c=r(2423),s=r(408),f=r(5787),p=r(614),l=r(111),d=r(7293),v=r(7072),y=r(8003),h=r(9587);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),m=-1!==t.indexOf("Weak"),b=g?"set":"add",w=o[t],x=w&&w.prototype,A=w,O={},S=function(t){var e=i(x[t]);u(x,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!l(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!l(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!p(w)||!(m||x.forEach&&!d((function(){(new w).entries().next()})))))A=r.getConstructor(e,t,g,b),c.enable();else if(a(t,!0)){var T=new A,j=T[b](m?{}:-0,1)!=T,I=d((function(){T.has(1)})),E=v((function(t){new w(t)})),P=!m&&d((function(){for(var t=new w,e=5;e--;)t[b](e,e);return!t.has(-0)}));E||((A=e((function(t,e){f(t,x);var r=h(new w,t,A);return null!=e&&s(e,r[b],{that:r,AS_ENTRIES:g}),r}))).prototype=x,x.constructor=A),(I||P)&&(S("delete"),S("has"),g&&S("get")),(P||j)&&S(b),m&&x.clear&&delete x.clear}return O[t]=A,n({global:!0,constructor:!0,forced:A!=w},O),y(A,t),m||r.setStrong(A,t,g),A}},9920:(t,e,r)=>{var n=r(2597),o=r(3887),i=r(1236),a=r(3070);t.exports=function(t,e,r){for(var u=o(e),c=a.f,s=i.f,f=0;f{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,o=r(30),i=r(9114),a=r(8003),u=r(7497),c=function(){return this};t.exports=function(t,e,r,s){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),a(t,f,!1,!0),u[f]=c,t}},8880:(t,e,r)=>{var n=r(9781),o=r(3070),i=r(9114);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(4948),o=r(3070),i=r(9114);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},8052:(t,e,r)=>{var n=r(614),o=r(3070),i=r(6339),a=r(3072);t.exports=function(t,e,r,u){u||(u={});var c=u.enumerable,s=void 0!==u.name?u.name:e;if(n(r)&&i(r,s,u),u.global)c?t[e]=r:a(e,r);else{try{u.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},9190:(t,e,r)=>{var n=r(8052);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},3072:(t,e,r)=>{var n=r(7854),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},654:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(1913),a=r(6530),u=r(614),c=r(4994),s=r(9518),f=r(7674),p=r(8003),l=r(8880),d=r(8052),v=r(5112),y=r(7497),h=r(3383),g=a.PROPER,m=a.CONFIGURABLE,b=h.IteratorPrototype,w=h.BUGGY_SAFARI_ITERATORS,x=v("iterator"),A="keys",O="values",S="entries",T=function(){return this};t.exports=function(t,e,r,a,v,h,j){c(r,e,a);var I,E,P,R=function(t){if(t===v&&z)return z;if(!w&&t in M)return M[t];switch(t){case A:case O:case S:return function(){return new r(this,t)}}return function(){return new r(this)}},N=e+" Iterator",C=!1,M=t.prototype,_=M[x]||M["@@iterator"]||v&&M[v],z=!w&&_||R(v),U="Array"==e&&M.entries||_;if(U&&(I=s(U.call(new t)))!==Object.prototype&&I.next&&(i||s(I)===b||(f?f(I,b):u(I[x])||d(I,x,T)),p(I,N,!0,!0),i&&(y[N]=T)),g&&v==O&&_&&_.name!==O&&(!i&&m?l(M,"name",O):(C=!0,z=function(){return o(_,this)})),v)if(E={values:R(O),keys:h?z:R(A),entries:R(S)},j)for(P in E)(w||C||!(P in M))&&d(M,P,E[P]);else n({target:e,proto:!0,forced:w||C},E);return i&&!j||M[x]===z||d(M,x,z,{name:v}),y[e]=z,E}},5117:(t,e,r)=>{"use strict";var n=r(6330),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw o("Cannot delete property "+n(e)+" of "+n(t))}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var n=r(7854),o=r(111),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8886:(t,e,r)=>{var n=r(8113).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},7871:(t,e,r)=>{var n=r(3823),o=r(5268);t.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,e,r)=>{var n=r(8113);t.exports=/MSIE|Trident/.test(n)},1528:(t,e,r)=>{var n=r(8113),o=r(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},6833:(t,e,r)=>{var n=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),o=r(7854);t.exports="process"==n(o.process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,o,i=r(7854),a=r(8113),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},8008:(t,e,r)=>{var n=r(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},8770:(t,e,r)=>{var n=r(7854);t.exports=function(t){return n[t].prototype}},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),a=r(8052),u=r(3072),c=r(9920),s=r(4705);t.exports=function(t,e){var r,f,p,l,d,v=t.target,y=t.global,h=t.stat;if(r=y?n:h?n[v]||u(v,{}):(n[v]||{}).prototype)for(f in e){if(l=e[f],p=t.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!s(y?f:v+(h?".":"#")+f,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;c(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),a(r,f,l,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},6677:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},9974:(t,e,r)=>{var n=r(1702),o=r(9662),i=r(4374),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,e,r)=>{var n=r(4374),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},6530:(t,e,r)=>{var n=r(9781),o=r(2597),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},1702:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.bind,a=o.call,u=n&&i.bind(a,a);t.exports=n?function(t){return t&&u(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},4777:(t,e,r)=>{var n=r(6916),o=r(8091),i=r(9670),a=r(8554),u=r(8173),c=r(5112)("asyncIterator");t.exports=function(t,e){var r=arguments.length<2?u(t,c):e;return r?i(n(r,t)):new o(a(t))}},5005:(t,e,r)=>{var n=r(7854),o=r(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},4942:(t,e,r)=>{var n=r(9662),o=r(9670);t.exports=function(t){return{iterator:t,next:n(o(t).next)}}},1246:(t,e,r)=>{var n=r(648),o=r(8173),i=r(7497),a=r(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},8554:(t,e,r)=>{var n=r(6916),o=r(9662),i=r(9670),a=r(6330),u=r(1246),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?u(t):e;if(o(r))return i(n(r,t));throw c(a(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(t,e,r)=>{var n=r(1702),o=r(7908),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1179:t=>{var e=Array,r=Math.abs,n=Math.pow,o=Math.floor,i=Math.log,a=Math.LN2;t.exports={pack:function(t,u,c){var s,f,p,l=e(c),d=8*c-u-1,v=(1<>1,h=23===u?n(2,-24)-n(2,-77):0,g=t<0||0===t&&1/t<0?1:0,m=0;for((t=r(t))!=t||t===1/0?(f=t!=t?1:0,s=v):(s=o(i(t)/a),t*(p=n(2,-s))<1&&(s--,p*=2),(t+=s+y>=1?h/p:h*n(2,1-y))*p>=2&&(s++,p/=2),s+y>=v?(f=0,s=v):s+y>=1?(f=(t*p-1)*n(2,u),s+=y):(f=t*n(2,y-1)*n(2,u),s=0));u>=8;)l[m++]=255&f,f/=256,u-=8;for(s=s<0;)l[m++]=255&s,s/=256,d-=8;return l[--m]|=128*g,l},unpack:function(t,e){var r,o=t.length,i=8*o-e-1,a=(1<>1,c=i-7,s=o-1,f=t[s--],p=127&f;for(f>>=7;c>0;)p=256*p+t[s--],c-=8;for(r=p&(1<<-c)-1,p>>=-c,c+=e;c>0;)r=256*r+t[s--],c-=8;if(0===p)p=1-u;else{if(p===a)return r?NaN:f?-1/0:1/0;r+=n(2,e),p-=u}return(f?-1:1)*r*n(2,p-e)}}},8361:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(4326),a=Object,u=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?u(t,""):a(t)}:a},9587:(t,e,r)=>{var n=r(614),o=r(111),i=r(7674);t.exports=function(t,e,r){var a,u;return i&&n(a=e.constructor)&&a!==r&&o(u=a.prototype)&&u!==r.prototype&&i(t,u),t}},2788:(t,e,r)=>{var n=r(1702),o=r(614),i=r(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},2423:(t,e,r)=>{var n=r(2109),o=r(1702),i=r(3501),a=r(111),u=r(2597),c=r(3070).f,s=r(8006),f=r(1156),p=r(2050),l=r(9711),d=r(6677),v=!1,y=l("meta"),h=0,g=function(t){c(t,y,{value:{objectID:"O"+h++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},v=!0;var t=s.f,e=o([].splice),r={};r[y]=1,t(r).length&&(s.f=function(r){for(var n=t(r),o=0,i=n.length;o{var n,o,i,a=r(8536),u=r(7854),c=r(1702),s=r(111),f=r(8880),p=r(2597),l=r(5465),d=r(6200),v=r(3501),y="Object already initialized",h=u.TypeError,g=u.WeakMap;if(a||l.state){var m=l.state||(l.state=new g),b=c(m.get),w=c(m.has),x=c(m.set);n=function(t,e){if(w(m,t))throw new h(y);return e.facade=t,x(m,t,e),e},o=function(t){return b(m,t)||{}},i=function(t){return w(m,t)}}else{var A=d("state");v[A]=!0,n=function(t,e){if(p(t,A))throw new h(y);return e.facade=t,f(t,A,e),e},o=function(t){return p(t,A)?t[A]:{}},i=function(t){return p(t,A)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),o=r(7497),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},4067:(t,e,r)=>{var n=r(648),o=r(1702)("".slice);t.exports=function(t){return"Big"===o(n(t),0,3)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(614),a=r(648),u=r(5005),c=r(2788),s=function(){},f=[],p=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,d=n(l.exec),v=!l.exec(s),y=function(t){if(!i(t))return!1;try{return p(s,f,t),!0}catch(t){return!1}},h=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!d(l,c(t))}catch(t){return!0}};h.sham=!0,t.exports=!p||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?h:y},4705:(t,e,r)=>{var n=r(7293),o=r(614),i=/#|\.prototype\./,a=function(t,e){var r=c[u(t)];return r==f||r!=s&&(o(e)?n(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},5988:(t,e,r)=>{var n=r(111),o=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&o(t)===t}},111:(t,e,r)=>{var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},2190:(t,e,r)=>{var n=r(5005),o=r(614),i=r(7976),a=r(3307),u=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,u(t))}},408:(t,e,r)=>{var n=r(9974),o=r(6916),i=r(9670),a=r(6330),u=r(7659),c=r(6244),s=r(7976),f=r(8554),p=r(1246),l=r(9212),d=TypeError,v=function(t,e){this.stopped=t,this.result=e},y=v.prototype;t.exports=function(t,e,r){var h,g,m,b,w,x,A,O=r&&r.that,S=!(!r||!r.AS_ENTRIES),T=!(!r||!r.IS_RECORD),j=!(!r||!r.IS_ITERATOR),I=!(!r||!r.INTERRUPTED),E=n(e,O),P=function(t){return h&&l(h,"normal",t),new v(!0,t)},R=function(t){return S?(i(t),I?E(t[0],t[1],P):E(t[0],t[1])):I?E(t,P):E(t)};if(T)h=t.iterator;else if(j)h=t;else{if(!(g=p(t)))throw d(a(t)+" is not iterable");if(u(g)){for(m=0,b=c(t);b>m;m++)if((w=R(t[m]))&&s(y,w))return w;return new v(!1)}h=f(t,g)}for(x=T?t.next:h.next;!(A=o(x,h)).done;){try{w=R(A.value)}catch(t){l(h,"throw",t)}if("object"==typeof w&&w&&s(y,w))return w}return new v(!1)}},9212:(t,e,r)=>{var n=r(6916),o=r(9670),i=r(8173);t.exports=function(t,e,r){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw r;if(u)throw a;return o(a),r}},3383:(t,e,r)=>{"use strict";var n,o,i,a=r(7293),u=r(614),c=r(30),s=r(9518),f=r(8052),p=r(5112),l=r(1913),d=p("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):v=!0),null==n||a((function(){var t={};return n[d].call(t)!==t}))?n={}:l&&(n=c(n)),u(n[d])||f(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},6339:(t,e,r)=>{var n=r(7293),o=r(614),i=r(2597),a=r(9781),u=r(6530).CONFIGURABLE,c=r(2788),s=r(9909),f=s.enforce,p=s.get,l=Object.defineProperty,d=a&&!n((function(){return 8!==l((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!i(t,"name")||u&&t.name!==e)&&(a?l(t,"name",{value:e,configurable:!0}):t.name=e),d&&r&&i(r,"arity")&&t.length!==r.arity&&l(t,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?a&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=f(t);return i(n,"source")||(n.source=v.join("string"==typeof e?e:"")),t};Function.prototype.toString=y((function(){return o(this)&&p(this).source||c(this)}),"toString")},4758:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},5948:(t,e,r)=>{var n,o,i,a,u,c,s,f,p=r(7854),l=r(9974),d=r(1236).f,v=r(261).set,y=r(6833),h=r(1528),g=r(1036),m=r(5268),b=p.MutationObserver||p.WebKitMutationObserver,w=p.document,x=p.process,A=p.Promise,O=d(p,"queueMicrotask"),S=O&&O.value;S||(n=function(){var t,e;for(m&&(t=x.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},y||m||g||!b||!w?!h&&A&&A.resolve?((s=A.resolve(void 0)).constructor=A,f=l(s.then,s),a=function(){f(n)}):m?a=function(){x.nextTick(n)}:(v=l(v,p),a=function(){v(n)}):(u=!0,c=w.createTextNode(""),new b(n).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=S||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},133:(t,e,r)=>{var n=r(7392),o=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(t,e,r)=>{var n=r(7854),o=r(614),i=r(2788),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:(t,e,r)=>{"use strict";var n=r(9662),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},30:(t,e,r)=>{var n,o=r(9670),i=r(6048),a=r(748),u=r(3501),c=r(490),s=r(317),f=r(6200)("IE_PROTO"),p=function(){},l=function(t){return"