lido-player 0.0.2-beta-25-dev → 0.0.2-beta-26-dev
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/LICENSE +21 -21
- package/dist/cjs/{decode-BSImuLEU.js → decode-CE64w_Pc.js} +1 -1
- package/dist/cjs/{index-DRw2yVbg.js → index-Cf9LHdIw.js} +126 -60
- package/dist/cjs/{index-DBCFoh1I.js → index-DnaH8sO-.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/lido-avatar_22.cjs.entry.js +103 -42
- package/dist/cjs/lido-player.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/avatar/lido-avatar.css +4 -4
- package/dist/collection/components/avatar/lido-avatar.js +1 -1
- package/dist/collection/components/avatar/lido-avatar.tsx +214 -214
- package/dist/collection/components/avatar/readme.md +49 -49
- package/dist/collection/components/calculator/lido-calculator.css +89 -89
- package/dist/collection/components/calculator/lido-calculator.js +2 -2
- package/dist/collection/components/canvas/lido-canvas.css +33 -33
- package/dist/collection/components/canvas/lido-canvas.js +1 -1
- package/dist/collection/components/cell/lido-cell.css +100 -100
- package/dist/collection/components/cell/lido-cell.js +12 -12
- package/dist/collection/components/column/lido-col.css +19 -19
- package/dist/collection/components/column/lido-col.js +6 -6
- package/dist/collection/components/container/lido-container.css +34 -34
- package/dist/collection/components/container/lido-container.js +8 -8
- package/dist/collection/components/flashCard/lido-flash-card.css +72 -72
- package/dist/collection/components/flashCard/lido-flash-card.js +72 -12
- package/dist/collection/components/float/lido-float.css +30 -30
- package/dist/collection/components/float/lido-float.js +2 -2
- package/dist/collection/components/home/lido-home.css +309 -309
- package/dist/collection/components/home/lido-home.js +35 -8
- package/dist/collection/components/image/lido-image.css +17 -17
- package/dist/collection/components/image/lido-image.js +6 -6
- package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
- package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
- package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
- package/dist/collection/components/position/lido-pos.css +16 -16
- package/dist/collection/components/position/lido-pos.js +2 -2
- package/dist/collection/components/random/lido-random.css +8 -8
- package/dist/collection/components/random/lido-random.js +2 -2
- package/dist/collection/components/root/lido-root.js +5 -5
- package/dist/collection/components/row/lido-row.css +10 -10
- package/dist/collection/components/row/lido-row.js +6 -6
- package/dist/collection/components/scale/assets/Shadow.svg +9 -9
- package/dist/collection/components/scale/lido-balance.css +174 -174
- package/dist/collection/components/scale/lido-balance.js +13 -13
- package/dist/collection/components/shape/lido-shape.css +216 -216
- package/dist/collection/components/shape/lido-shape.js +6 -6
- package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
- package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
- package/dist/collection/components/text/lido-text.css +53 -53
- package/dist/collection/components/text/lido-text.js +6 -6
- package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
- package/dist/collection/components/trace/lido-trace.css +97 -97
- package/dist/collection/components/trace/lido-trace.js +2 -2
- package/dist/collection/components/wrap/lido-wrap.css +18 -18
- package/dist/collection/components/wrap/lido-wrap.js +6 -6
- package/dist/collection/css/animation.css +211 -211
- package/dist/collection/css/index.css +323 -323
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
- package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
- package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
- package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
- package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
- package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
- package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
- package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
- package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
- package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
- package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
- package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
- package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
- package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
- package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
- package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
- package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
- package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
- package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
- package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
- package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
- package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
- package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
- package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
- package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +633 -633
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
- package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
- package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
- package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
- package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
- package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
- package/dist/collection/stories/Templates/total/total.stories.js +28 -28
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
- package/dist/collection/stories/components/flash-card.stories.js +48 -48
- package/dist/collection/stories/components/keyboard.stories.js +10 -10
- package/dist/collection/stories/components/slider.stories.js +4 -4
- package/dist/collection/stories/components/trace.stories.js +5 -5
- package/dist/collection/utils/audioPlayer.js +7 -2
- package/dist/collection/utils/constants.js +6 -0
- package/dist/collection/utils/utils.js +59 -7
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +8 -8
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
- package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +1 -1
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/p-B4iWvszS.js +1 -0
- package/dist/components/{p-Cf85Nc-6.js → p-BA-XmR9g.js} +1 -1
- package/dist/components/p-BJt-z8VW.js +1 -0
- package/dist/components/{p-CTlcpv4a.js → p-BfwUqpXc.js} +1 -1
- package/dist/components/{p-DNo3iX_r.js → p-BiBt9LGP.js} +1 -1
- package/dist/components/{p-DG0KR2iN.js → p-BlN0IsR4.js} +1 -1
- package/dist/components/{p-BSWrnLbC.js → p-BpVpANK9.js} +1 -1
- package/dist/components/{p-CgsPIpg0.js → p-Bw-OC9iR.js} +1 -1
- package/dist/components/p-C2J7-bcH.js +1 -0
- package/dist/components/{p-BfJG1wmU.js → p-CEmofYPx.js} +1 -1
- package/dist/components/{p-C5WmmkI6.js → p-CPYnt0P-.js} +1 -1
- package/dist/components/{p-CsDu4kiC.js → p-ChfVUoX4.js} +1 -1
- package/dist/components/{p-AaE392x7.js → p-CnQ-4EIw.js} +1 -1
- package/dist/components/{p-CXHPZN3m.js → p-CyGxEcn7.js} +1 -1
- package/dist/components/{p-CuDMRxx_.js → p-D1cBkIab.js} +1 -1
- package/dist/components/p-DP6jQ5ML.js +1 -0
- package/dist/components/{p-BW0855oZ.js → p-DV-k1ulI.js} +1 -1
- package/dist/components/p-Qhj9-H6e.js +12 -0
- package/dist/components/{p-CVZEVfip.js → p-hUfX1As2.js} +1 -1
- package/dist/components/p-leIEepjl.js +1 -0
- package/dist/components/{p-CK9M0Kcf.js → p-s4oGlKg6.js} +1 -1
- package/dist/components/{p-C70ykycD.js → p-useuhkjH.js} +1 -1
- package/dist/esm/{decode-D2f5bktc.js → decode-DhjaTUf2.js} +1 -1
- package/dist/esm/{index-BB56Mo3L.js → index-Bc6Y7rds.js} +124 -61
- package/dist/esm/{index-mMpK8062.js → index-Dvjbti-h.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/lido-avatar_22.entry.js +103 -42
- package/dist/esm/lido-player.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/lido-player/assets/Shadow.svg +9 -9
- package/dist/lido-player/assets/Tracing-hand.svg +8 -8
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-avatar.css +4 -4
- package/dist/lido-player/lido-avatar.tsx +214 -214
- package/dist/lido-player/lido-player.css +7 -7
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-DSlo480E.js → p-CORilAH-.js} +1 -1
- package/dist/lido-player/p-D66K5DXn.js +1 -0
- package/dist/lido-player/p-Dvjbti-h.js +2 -0
- package/dist/lido-player/p-ca195982.entry.js +12 -0
- package/dist/lido-player/readme.md +49 -49
- package/dist/types/components/flashCard/lido-flash-card.d.ts +2 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/types/json.d.ts +3 -3
- package/dist/types/utils/audioPlayer.d.ts +1 -1
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +4 -0
- package/package.json +73 -73
- package/readme.md +113 -113
- package/dist/components/p-B-mIxynb.js +0 -1
- package/dist/components/p-CSxwfvl3.js +0 -1
- package/dist/components/p-DONbWJGn.js +0 -1
- package/dist/components/p-DPGOqpde.js +0 -1
- package/dist/components/p-DXy70SGv.js +0 -1
- package/dist/components/p-i3W5bJbL.js +0 -12
- package/dist/lido-player/p-53d245b0.entry.js +0 -12
- package/dist/lido-player/p-DKuh-2gv.js +0 -1
- package/dist/lido-player/p-mMpK8062.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as s,d as o}from"./p-BlN0IsR4.js";const p=s,r=o;export{p as LidoAvatar,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as
|
|
1
|
+
import{L as o,d as s}from"./p-BiBt9LGP.js";const t=o,p=s;export{t as LidoBalance,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as p,d as o}from"./p-BpVpANK9.js";const s=p,r=o;export{s as LidoCalculator,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as o,d as s}from"./p-CPYnt0P-.js";const t=o,p=s;export{t as LidoCanvas,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as o,d as s}from"./p-Bw-OC9iR.js";const p=o,r=s;export{p as LidoCell,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as p}from"./p-
|
|
1
|
+
import{L as o,d as p}from"./p-BfwUqpXc.js";const s=o,r=p;export{s as LidoCol,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-CnQ-4EIw.js";const p=o,r=s;export{p as LidoContainer,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as s,d as o}from"./p-B4iWvszS.js";const p=s,r=o;export{p as LidoFlashCard,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-C2J7-bcH.js";const p=o,r=s;export{p as LidoFloat,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-Qhj9-H6e.js";const p=o,r=s;export{p as LidoHome,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-BA-XmR9g.js";const m=o,p=s;export{m as LidoImage,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-DV-k1ulI.js";const p=o,r=s;export{p as LidoKeyboard,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-s4oGlKg6.js";const p=o,r=s;export{p as LidoMathMatrix,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-CyGxEcn7.js";const p=o,r=s;export{p as LidoPos,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as
|
|
1
|
+
import{L as o,d as p}from"./p-leIEepjl.js";const s=o,e=p;export{s as LidoRandom,e as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as s,H as o,getAssetPath as e,h as a}from"./index.js";import{d as i,i as l}from"./p-
|
|
1
|
+
import{t,p as s,H as o,getAssetPath as e,h as a}from"./index.js";import{d as i,i as l}from"./p-BJt-z8VW.js";import{d as r}from"./p-BlN0IsR4.js";import{d as m}from"./p-BiBt9LGP.js";import{d as n}from"./p-BpVpANK9.js";import{d}from"./p-CPYnt0P-.js";import{d as c}from"./p-Bw-OC9iR.js";import{d as p}from"./p-BfwUqpXc.js";import{d as u}from"./p-CnQ-4EIw.js";import{d as h}from"./p-B4iWvszS.js";import{d as f}from"./p-C2J7-bcH.js";import{d as b}from"./p-Qhj9-H6e.js";import{d as k}from"./p-BA-XmR9g.js";import{d as E}from"./p-DV-k1ulI.js";import{d as j}from"./p-s4oGlKg6.js";import{d as x}from"./p-CyGxEcn7.js";import{d as g}from"./p-leIEepjl.js";import{d as v}from"./p-useuhkjH.js";import{d as B}from"./p-DP6jQ5ML.js";import{d as L}from"./p-D1cBkIab.js";import{d as U}from"./p-CEmofYPx.js";import{d as w}from"./p-ChfVUoX4.js";const C=s(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.xmlPath="",this.initialIndex=0,this.margin="",this.canplay=!0,this.baseUrl="",this.zipUrl=""}connectedCallback(){this.setLanguage(this.Lang)}onLangChange(t){this.setLanguage(t)}setLanguage(t){l.changeLanguage(t||l.language)}async componentWillLoad(){var t,s;if(this.zipUrl)return void(this.xmlData="");const o=null!==(t=this.xmlPath)&&void 0!==t?t:this.baseUrl+((null===(s=this.baseUrl)||void 0===s?void 0:s.endsWith("/"))?"index.xml":"/index.xml");try{const t=o.startsWith("http")?o:e(o),s=await fetch(t);if(!s.ok)throw Error("Failed to fetch XML data: "+s.statusText);const a=await s.text();this.xmlData=a}catch(t){console.error("Error fetching XML data:",t),this.xmlData=null}}render(){return void 0===this.xmlData?a("div",null,"Loading..."):null===this.xmlData?a("div",null,"Error loading XML data. Please check the path or URL."):a("lido-home",Object.assign({showNav:!0,activeContainerIndexes:[],initialIndex:this.initialIndex,canplay:this.canplay,Lang:this.Lang,xmlData:this.xmlData,baseUrl:this.baseUrl},this.zipUrl?{zipUrl:this.zipUrl}:{},{exitButtonUrl:this.exitButtonUrl,prevButtonUrl:this.prevButtonUrl,nextButtonUrl:this.nextButtonUrl,speakerButtonUrl:this.speakerButtonUrl}))}static get assetsDirs(){return["assets"]}static get watchers(){return{Lang:[{onLangChange:0}]}}},[0,"lido-root",{Lang:[1,"lang"],xmlPath:[1,"xml-path"],initialIndex:[2,"initial-index"],margin:[1],canplay:[4],baseUrl:[1,"base-url"],zipUrl:[1,"zip-url"],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],xmlData:[32]},void 0,{Lang:[{onLangChange:0}]}]);function y(){"undefined"!=typeof customElements&&["lido-root","lido-avatar","lido-balance","lido-calculator","lido-canvas","lido-cell","lido-col","lido-container","lido-flash-card","lido-float","lido-home","lido-image","lido-keyboard","lido-math-matrix","lido-pos","lido-random","lido-row","lido-shape","lido-slide-fill","lido-text","lido-trace","lido-wrap"].forEach((s=>{switch(s){case"lido-root":customElements.get(t(s))||customElements.define(t(s),C);break;case"lido-avatar":customElements.get(t(s))||r();break;case"lido-balance":customElements.get(t(s))||m();break;case"lido-calculator":customElements.get(t(s))||n();break;case"lido-canvas":customElements.get(t(s))||d();break;case"lido-cell":customElements.get(t(s))||c();break;case"lido-col":customElements.get(t(s))||p();break;case"lido-container":customElements.get(t(s))||u();break;case"lido-flash-card":customElements.get(t(s))||h();break;case"lido-float":customElements.get(t(s))||f();break;case"lido-home":customElements.get(t(s))||b();break;case"lido-image":customElements.get(t(s))||k();break;case"lido-keyboard":customElements.get(t(s))||E();break;case"lido-math-matrix":customElements.get(t(s))||j();break;case"lido-pos":customElements.get(t(s))||x();break;case"lido-random":customElements.get(t(s))||g();break;case"lido-row":customElements.get(t(s))||v();break;case"lido-shape":customElements.get(t(s))||B();break;case"lido-slide-fill":customElements.get(t(s))||L();break;case"lido-text":customElements.get(t(s))||i();break;case"lido-trace":customElements.get(t(s))||U();break;case"lido-wrap":customElements.get(t(s))||w()}}))}y();const I=C,P=y;export{I as LidoRoot,P as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as s,d as o}from"./p-useuhkjH.js";const p=s,r=o;export{p as LidoRow,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-DP6jQ5ML.js";const p=o,r=s;export{p as LidoShape,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-D1cBkIab.js";const a=o,p=s;export{a as LidoSlideFill,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as
|
|
1
|
+
import{L as o,d as s}from"./p-BJt-z8VW.js";const t=o,p=s;export{t as LidoText,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as o,d as s}from"./p-
|
|
1
|
+
import{L as o,d as s}from"./p-CEmofYPx.js";const m=o,p=s;export{m as LidoTrace,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as o,d as s}from"./p-ChfVUoX4.js";const p=o,r=s;export{p as LidoWrap,r as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as i,H as t,f as s,a as o,A as a,v as e,w as h,k as n,i as d,T as l,h as r,b as c,t as f}from"./index.js";const p=i(class i extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible=!0,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.flipped=!1,this.autoFlipAfter=4500,this.narrationTarget=null,this.narrationHandled=!1,this.instructionDone=!1,this.instructionStarted=!1,this.shouldPlayTemplateInstruction=!0,this.onAudioStarted=i=>{var t;const s=null===(t=i.detail)||void 0===t?void 0:t.target;s===this.instructionText()&&(this.instructionStarted=!0),s&&s===this.narrationTarget&&!this.narrationHandled&&(this.narrationGraceTimer&&window.clearTimeout(this.narrationGraceTimer),this.narrationGraceTimer=void 0)},this.onAudioPlaying=i=>{const t=i.detail,s=null==t?void 0:t.target;if("lido-avatar"!==(null==s?void 0:s.id))return;if(t.playbackContext!==this.goodJobPlaybackContext)return;const o=this.nextArrow();o&&this.flipped&&(this.goodJobPlaybackId=t.playbackId,o.classList.add("flash-card-next-glowing"))},this.onAudioEnded=i=>{var t,o,a;const e=null===(t=i.detail)||void 0===t?void 0:t.target,h=this.instructionText();if(e&&(e===h||"lido-avatar"===e.id||this.el.contains(e)))if(e!==this.narrationTarget||this.narrationHandled){if(!this.narrationHandled||e!==this.narrationTarget)if(e===this.instructionText())this.instructionDone=!0,this.frontStartTimer=window.setTimeout((()=>{this.speakFront()}),1200);else if(e===this.frontText()){if(this.flipped)return;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter)}else if(e===this.backText())this.flipped&&this.showArrow();else if("lido-avatar"===e.id){const t=null===(o=i.detail)||void 0===o?void 0:o.playbackId;if((null===(a=i.detail)||void 0===a?void 0:a.playbackContext)!==this.goodJobPlaybackContext||t!==this.goodJobPlaybackId)return;this.goodJobPlaybackId=void 0,s("this.avatarAnimate='Idle'",e)}}else this.finishNarration(e)},this.margin="",this.disableSpeak=!1,this.style={},this.delayVisible="",this.updateStyles=()=>{const i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:o(this.height,i)||"200px",width:o(this.width,i)||"200px",backgroundColor:o(this.bgColor,i),top:o(this.y,i),left:o(this.x,i),zIndex:this.z,display:this.visible?this.display?o(this.display,i):"inline-block":"none",flexDirection:this.direction?o(this.direction,i):void 0,margin:o(this.margin,i)}},this.handleFlip=()=>{var i;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),a.getI().stop(),this.clearNarrationTimers();const t=!this.flipped;if(this.flipped=!this.flipped,this.stopGoodJobGlow(),this.setArrowVisible(!1),t){const t=this.backText();t&&(null===(i=t.textContent)||void 0===i?void 0:i.trim())?this.startNarration(t):this.showArrow()}else this.speakFront()},this.instructionText=()=>{const i=this.el.closest("lido-container"),t=null==i?void 0:i.getAttribute("template-id");return t?null==i?void 0:i.querySelector(`[id="${t}"]`):null},this.frontText=()=>this.el.querySelector(".card-front lido-text"),this.backText=()=>this.el.querySelector(".card-back lido-text"),this.nextArrow=()=>{var i;return null===(i=this.el.closest("lido-container"))||void 0===i?void 0:i.querySelector("#arrow")},this.stopGoodJobGlow=()=>{var i;this.goodJobPlaybackId=void 0,this.goodJobPlaybackContext=void 0,null===(i=this.nextArrow())||void 0===i||i.classList.remove("flash-card-next-glowing")},this.speakFront=()=>{var i,t;const s=this.frontText();this.instructionDone&&!this.flipped&&s&&(null===(i=s.textContent)||void 0===i?void 0:i.trim())?this.startNarration(s):!this.instructionDone||this.flipped||s&&(null===(t=s.textContent)||void 0===t?void 0:t.trim())||(this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter))},this.clearNarrationTimers=()=>{this.narrationGraceTimer&&window.clearTimeout(this.narrationGraceTimer),this.narrationGraceTimer=void 0,this.narrationTarget=null,this.narrationHandled=!1},this.continueAfterNarration=i=>{if(i===this.instructionText())this.instructionDone=!0,this.frontStartTimer=window.setTimeout((()=>this.speakFront()),1200);else if(i===this.frontText()){if(this.flipped)return;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter)}else i===this.backText()&&this.flipped&&this.showArrow()},this.finishNarration=i=>{i!==this.narrationTarget||this.narrationHandled||(this.narrationHandled=!0,this.narrationGraceTimer&&window.clearTimeout(this.narrationGraceTimer),this.narrationGraceTimer=void 0,this.continueAfterNarration(i))},this.startNarration=t=>{this.clearNarrationTimers(),this.narrationTarget=t,this.narrationGraceTimer=window.setTimeout((()=>{this.narrationHandled||this.finishNarration(t)}),i.narrationStartGrace),s("this.speak='true'",t)},this.showArrow=()=>{if(!this.flipped)return;const i=this.el.closest("lido-container");if("flashcardtemplate"!==(null==i?void 0:i.getAttribute("template-id")))return;const t=this.nextArrow();if(!t)return;t.getAttribute("onTouch")||t.setAttribute("onTouch","this.nextBtn='true';");const o=i.querySelector("#lido-avatar"),n=(null==o?void 0:o.getAttribute("audio"))||void 0,d=e(t)||n,l=h(t);o&&d&&l&&o.setAttribute("audio",d),this.setArrowVisible(!0),t.classList.add("flash-card-next-glowing"),o&&l&&(this.goodJobPlaybackContext={},this.goodJobPlaybackId=void 0,s("this.avatarAnimate='Idle speak'",o),a.getI().play(o,!0,this.goodJobPlaybackContext,n))},this.setArrowVisible=i=>{const t=this.el.closest("lido-container");if("flashcardtemplate"!==(null==t?void 0:t.getAttribute("template-id")))return;const s=t.querySelector("#arrow");if(!s)return;s.visible=i,s.setAttribute("visible",String(i)),s.style.display=i?"block":"none",s.style.visibility=i?"visible":"hidden",s.style.opacity=i?"1":"0",s.style.pointerEvents=i?"auto":"none";const o=s.querySelector("lido-image");o&&(o.style.display=i?"flex":"none",o.style.visibility=i?"visible":"hidden",o.style.opacity=i?"1":"0"),"function"==typeof s.updateStyles&&s.updateStyles()}}handleFlippedChange(){}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.updateStyles),window.addEventListener("load",this.updateStyles)}componentDidLoad(){var i,t;n(this.el,this.delayVisible),d(this.el,this.type),window.addEventListener("lidoAudioStarted",this.onAudioStarted),window.addEventListener("lidoAudioPlaying",this.onAudioPlaying),window.addEventListener("lidoAudioEnded",this.onAudioEnded);const s=this.el.closest("lido-container");if("flashcardtemplate"===(null==s?void 0:s.getAttribute("template-id"))){const o=s.closest("lido-home"),a=(null===(i=null==o?void 0:o.getAttribute(l))||void 0===i?void 0:i.split(",").map((i=>i.trim())).filter(Boolean))||[];this.shouldPlayTemplateInstruction=!a.includes("flashcardtemplate"),null===(t=s.querySelector("#lido-avatar"))||void 0===t||t.setAttribute("disable-speak","true"),this.instructionStartTimer=window.setTimeout((()=>{if(!this.instructionStarted&&!this.instructionDone){if(!this.shouldPlayTemplateInstruction)return this.instructionDone=!0,void this.speakFront();const i=this.instructionText();i&&this.startNarration(i)}}),150)}}disconnectedCallback(){window.removeEventListener("lidoAudioEnded",this.onAudioEnded),window.removeEventListener("lidoAudioPlaying",this.onAudioPlaying),window.removeEventListener("lidoAudioStarted",this.onAudioStarted),this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.instructionStartTimer&&window.clearTimeout(this.instructionStartTimer),this.frontStartTimer&&window.clearTimeout(this.frontStartTimer),this.clearNarrationTimers(),window.removeEventListener("resize",this.updateStyles),window.removeEventListener("load",this.updateStyles)}async replayGoodJobAudio(){const i=this.el.closest("lido-container");if("flashcardtemplate"!==(null==i?void 0:i.getAttribute("template-id")))return;const t=this.nextArrow(),o=i.querySelector("#lido-avatar");if(!t||!o)return;if("true"!==t.getAttribute("visible")&&"visible"!==t.style.visibility)return;const h=o.getAttribute("audio")||void 0,n=e(t)||h;n&&(o.setAttribute("audio",n),this.goodJobPlaybackContext={},this.goodJobPlaybackId=void 0,s("this.avatarAnimate='Idle speak'",o),await a.getI().play(o,!0,this.goodJobPlaybackContext,h))}render(){return r(c,{key:"b6012ba4855d142b6fdbad9dcfd7251bfcbb932b",value:this.value,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,type:this.type,onClick:i=>{var t,s;(null===(s=null===(t=i.target)||void 0===t?void 0:t.closest)||void 0===s?void 0:s.call(t,"#lido-avatar"))||this.handleFlip()},"disable-speak":this.disableSpeak},r("div",{key:"fecb100c8ac0f227d8bd685d02f8314e9018fe02",class:"card "+(this.flipped?"flipped":"")},r("div",{key:"e89512323ad8eb884548a1dead734f635c096c8f",class:"card-face card-front"},null!=this.front?this.front:r("slot",{name:"front"})),r("div",{key:"82820aaf5b5febcf8247f96faca59976b8fade8e",class:"card-face card-back"},null!=this.back?this.back:r("slot",{name:"back"}))))}get el(){return this}static get watchers(){return{flipped:[{handleFlippedChange:0}]}}static get style(){return'.card{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 0.6s ease;cursor:pointer}.card.flipped{transform:rotateY(180deg)}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;display:flex;align-items:center;justify-content:center}.card-back{transform:rotateY(180deg)}lido-container[template-id="flashcardtemplate"] #arrow{position:absolute !important;left:auto !important;top:50% !important;right:13.3% !important;transform:translateY(-50%);z-index:4 !important;overflow:visible;box-sizing:border-box;border:10px solid transparent;box-shadow:0px 8px 0px 0px #8b310f !important}lido-container[template-id="flashcardtemplate"] #arrow.flash-card-next-glowing{animation:flash-card-next-attention 1.4s ease-in-out infinite}@keyframes flash-card-next-attention{0%,100%{border-color:#ffc34d;filter:drop-shadow(0 0 0 rgba(255, 195, 77, 0))}50%{border-color:#fff1a8;filter:drop-shadow(0 0 10px rgba(255, 195, 77, 0.95))}}lido-container[template-id="flashcardtemplate"] #arrow:active{transform:translateY(calc(-50% + 8px)) !important;box-shadow:0px 0px 0px 0px !important}@media (orientation: portrait){lido-container[template-id="flashcardtemplate"] #arrow{right:-4.3% !important}}'}},[260,"lido-flash-card",{value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],direction:[1],display:[1],front:[8],back:[8],flipped:[1540],autoFlipAfter:[2,"auto-flip-after"],margin:[1],disableSpeak:[4,"disable-speak"],delayVisible:[1,"delay-visible"],style:[32],replayGoodJobAudio:[64]},void 0,{flipped:[{handleFlippedChange:0}]}]);function u(){"undefined"!=typeof customElements&&["lido-flash-card"].forEach((i=>{"lido-flash-card"===i&&(customElements.get(f(i))||customElements.define(f(i),p))}))}p.narrationStartGrace=800,u();export{p as L,u as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as t,t as e,p as n,H as r,k as i,i as o,a5 as s,m as a,c as u,a as c,h as l,b as h}from"./index.js";function f(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var d,g,b={exports:{}},m={},v={},p={};function w(){return d||(d=1,t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.MUST_INSTALL_PUPPETEER=t.DEFAULT_CONVERSION_ERROR_MESSAGE=t.UNEXPECTED_ERROR_MESSAGE_INTRODUCTION=t.UNEXPECTED_ERROR_MESSAGE_LINK=t.UNEXPECTED_ERROR_MESSAGE_PREFIX=void 0,t.UNEXPECTED_ERROR_MESSAGE_PREFIX="Unexpected error has occurred, please report this by using the following link: ",t.UNEXPECTED_ERROR_MESSAGE_LINK="https://github.com/OvidijusParsiunas/css-filter-converter/issues/new",t.UNEXPECTED_ERROR_MESSAGE_INTRODUCTION=t.UNEXPECTED_ERROR_MESSAGE_PREFIX+t.UNEXPECTED_ERROR_MESSAGE_LINK,t.DEFAULT_CONVERSION_ERROR_MESSAGE="Input value is invalid",t.MUST_INSTALL_PUPPETEER="To convert filter values to color in Node - you will first need to install 'puppeteer' by running: \n npm install puppeteer"),p;var t}function y(){if(g)return v;g=1,Object.defineProperty(v,"__esModule",{value:!0}),v.ErrorHandling=void 0;const t=w();class e{static generateErrorResult(t){return{color:null,error:{message:t}}}static generateInputErrorMessage(t,e,n){const r=[`Input ${t} color string could not be parsed.`,`String received: ${e}.`];return n&&r.splice(1,0,`Expected format: ${n}.`),r.join(" ")}static generateUnexpectedError(n){return e.generateErrorResult(`${t.UNEXPECTED_ERROR_MESSAGE_INTRODUCTION}: \n${n.message}`)}static hasError(t){return!!t.errorMessage}}return v.ErrorHandling=e,v}var M,k={};function j(){if(M)return k;M=1,Object.defineProperty(k,"__esModule",{value:!0}),k.SheenUtil=void 0;class t{static parseSheenFromOptions(t){return!t||"boolean"!=typeof t.sheen||t.sheen}}return k.SheenUtil=t,t.SHEEN_FILTER_PREFIX="brightness(0) saturate(100%)",k}var x,O={};function P(){return x||(x=1,t=O,Object.defineProperty(t,"__esModule",{value:!0}),t.ColorTypes=void 0,(e=t.ColorTypes||(t.ColorTypes={})).HEX="hex",e.RGB="rgb",e.HSL="hsl",e.KEYWORD="keyword",e.FILTER="filter"),O;var t,e}var E,T,_,$={},S={},I={};function A(){return E||(E=1,Object.defineProperty(I,"__esModule",{value:!0}),I.RgbColor=void 0,I.RgbColor=class{constructor(t=[0,0,0],e=!1){this.roundChannels=e,this.r=this.clamp(t[0]),this.g=this.clamp(t[1]),this.b=this.clamp(t[2])}clamp(t){return t>255?t=255:t<0&&(t=0),this.roundChannels?Math.round(t):t}setRgb(t,e,n){this.r=this.clamp(t),this.g=this.clamp(e),this.b=this.clamp(n)}multiply(t){const e=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),n=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),r=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=e,this.g=n,this.b=r}hueRotate(t=0){t=t/180*Math.PI;const e=Math.sin(t),n=Math.cos(t);this.multiply([.213+.787*n-.213*e,.715-.715*n-.715*e,.072-.072*n+.928*e,.213-.213*n+.143*e,.715+.285*n+.14*e,.072-.072*n-.283*e,.213-.213*n-.787*e,.715-.715*n+.715*e,.072+.928*n+.072*e])}sepia(t=1){this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])}saturate(t=1){this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])}linear(t=1,e=0){this.r=this.clamp(this.r*t+255*e),this.g=this.clamp(this.g*t+255*e),this.b=this.clamp(this.b*t+255*e)}brightness(t=1){this.linear(t)}contrast(t=1){this.linear(t,-.5*t+.5)}invert(t=1){this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))}}),I}var R,C,F,H,q,D,V,L,z,G,U,B,N,W={},X={},J={},K={};function Q(){return F||(F=1,t=K,Object.defineProperty(t,"__esModule",{value:!0}),t.ColorFormats=void 0,(e=t.ColorFormats||(t.ColorFormats={})).HEX="#ffffff or #fff",e.RGB="rgb([0-255], [0-255], [0-255]) or rgb([0-255], [0-255], [0-255], [0-1]) or rgb([0-100%], [0-100%], [0-100%]) or rgb([0-100%], [0-100%], [0-100%], [0-100%]) or [0-255], [0-255], [0-255] or [0-255] [0-255] [0-255]",e.HSL="hsl([0-360], [0-100], [0-100]) or hsl([0-360], [0-100%], [0-100%]) or [0-360], [0-100], [0-100] or [0-360] [0-100] [0-100]",e.FILTER="blur(), brightness(), contrast(), drop-shadow(), grayscale(), hue-rotate(), invert(), saturate(), sepia() with each parameter populated with %, px or deg where approriate e.g. contrast(101%)",e.KEYWORD="Generic color string. See the following link for all available colors: https://github.com/colorjs/color-name/blob/master/index.js"),K;var t,e}function Y(){return q?H:(q=1,H={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})}function Z(){if(L)return V;L=1;const t=Y(),e={};for(const n of Object.keys(t))e[t[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};V=n;for(const t of Object.keys(n)){if(!("channels"in n[t]))throw new Error("missing channels property: "+t);if(!("labels"in n[t]))throw new Error("missing channel labels property: "+t);if(n[t].labels.length!==n[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=n[t];delete n[t].channels,delete n[t].labels,Object.defineProperty(n[t],"channels",{value:e}),Object.defineProperty(n[t],"labels",{value:r})}return n.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=o-i;let a,u;o===i?a=0:e===o?a=(n-r)/s:n===o?a=2+(r-e)/s:r===o&&(a=4+(e-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(i+o)/2;return u=o===i?0:c<=.5?s/(o+i):s/(2-o-i),[a,100*u,100*c]},n.rgb.hsv=function(t){let e,n,r,i,o;const s=t[0]/255,a=t[1]/255,u=t[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),h=function(t){return(c-t)/6/l+.5};return 0===l?(i=0,o=0):(o=l/c,e=h(s),n=h(a),r=h(u),s===c?i=r-n:a===c?i=1/3+e-r:u===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},n.rgb.hwb=function(t){const e=t[0],r=t[1];let i=t[2];const o=n.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[o,100*s,100*i]},n.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r);return[100*((1-e-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},n.rgb.keyword=function(n){const r=e[n];if(r)return r;let i,o=1/0;for(const e of Object.keys(t)){const r=((s=n)[0]-(a=t[e])[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2;r<o&&(o=r,i=e)}var s,a;return i},n.keyword.rgb=function(e){return t[e]},n.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*e+.3576*n+.1805*r),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},n.rgb.lab=function(t){const e=n.rgb.xyz(t);let r=e[0],i=e[1],o=e[2];return r/=95.047,i/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,[116*i-16,500*(r-i),200*(i-o)]},n.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,o,s;if(0===n)return s=255*r,[s,s,s];i=r<.5?r*(1+n):r+n-r*n;const a=2*r-i,u=[0,0,0];for(let t=0;t<3;t++)o=e+1/3*-(t-1),o<0&&o++,o>1&&o--,s=6*o<1?a+6*(i-a)*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,u[t]=255*s;return u},n.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const o=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o,[e,100*(0===r?2*i/(o+i):2*n/(r+n)),(r+n)/2*100]},n.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,o=e-Math.floor(e),s=255*r*(1-n),a=255*r*(1-n*o),u=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,u,s];case 1:return[a,r,s];case 2:return[s,r,u];case 3:return[s,a,r];case 4:return[u,s,r];case 5:return[r,s,a]}},n.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,100*o,100*s]},n.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*e),a=1-r;o=6*e-s,1&s&&(o=1-o);const u=n+o*(a-n);let c,l,h;switch(s){default:case 6:case 0:c=a,l=u,h=n;break;case 1:c=u,l=a,h=n;break;case 2:c=n,l=a,h=u;break;case 3:c=n,l=u,h=a;break;case 4:c=u,l=n,h=a;break;case 5:c=a,l=n,h=u}return[255*c,255*l,255*h]},n.cmyk.rgb=function(t){const e=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-r)+r)),255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},n.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,o,s;return i=3.2406*e+-1.5372*n+-.4986*r,o=-.9689*e+1.8758*n+.0415*r,s=.0557*e+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[255*i,255*o,255*s]},n.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];return e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(e-n),200*(n-r)]},n.lab.xyz=function(t){let e,n,r;n=(t[0]+16)/116,e=t[1]/500+n,r=n-t[2]/200;const i=n**3,o=e**3,s=r**3;return n=i>.008856?i:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,e*=95.047,n*=100,r*=108.883,[e,n,r]},n.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[e,Math.sqrt(n*n+r*r),i]},n.lch.lab=function(t){const e=t[1],n=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(n),e*Math.sin(n)]},n.rgb.ansi16=function(t,e=null){const[r,i,o]=t;let s=null===e?n.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(o/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},n.hsv.ansi16=function(t){return n.rgb.ansi16(n.hsv.rgb(t),t[2])},n.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},n.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},n.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},n.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];3===e[0].length&&(n=n.split("").map((t=>t+t)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),o=Math.min(Math.min(e,n),r),s=i-o;let a,u;return a=s<1?o/(1-s):0,u=s<=0?0:i===e?(n-r)/s%6:i===n?2+(r-e)/s:4+(e-n)/s,u/=6,u%=1,[360*u,100*s,100*a]},n.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},n.hsv.hcg=function(t){const e=t[2]/100,n=t[1]/100*e;let r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},n.hcg.rgb=function(t){const e=t[1]/100,n=t[2]/100;if(0===e)return[255*n,255*n,255*n];const r=[0,0,0],i=t[0]/360%1*6,o=i%1,s=1-o;let a=0;switch(Math.floor(i)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return a=(1-e)*n,[255*(e*r[0]+a),255*(e*r[1]+a),255*(e*r[2]+a)]},n.hcg.hsv=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);let r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},n.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},n.hcg.hwb=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},n.hwb.hcg=function(t){const e=1-t[2]/100,n=e-t[1]/100;let r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},n.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},n.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},n.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},n.gray.hsl=function(t){return[0,0,t[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(t){return[0,100,t[0]]},n.gray.cmyk=function(t){return[0,0,0,t[0]]},n.gray.lab=function(t){return[t[0],0,0]},n.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]},V}function tt(){if(G)return z;G=1;const t=Z();function e(t,e){return function(n){return e(t(n))}}function n(n,r){const i=[r[n].parent,n];let o=t[r[n].parent][n],s=r[n].parent;for(;r[s].parent;)i.unshift(r[s].parent),o=e(t[r[s].parent][s],o),s=r[s].parent;return o.conversion=i,o}return z=function(e){const r=function(e){const n=function(){const e={},n=Object.keys(t);for(let t=n.length,r=0;r<t;r++)e[n[r]]={distance:-1,parent:null};return e}(),r=[e];for(n[e].distance=0;r.length;){const e=r.pop(),i=Object.keys(t[e]);for(let t=i.length,o=0;o<t;o++){const t=i[o],s=n[t];-1===s.distance&&(s.distance=n[e].distance+1,s.parent=e,r.unshift(t))}}return n}(e),i={},o=Object.keys(r);for(let t=o.length,e=0;e<t;e++){const t=o[e];null!==r[t].parent&&(i[t]=n(t,r))}return i}}function et(){if(B)return U;B=1;const t=Z(),e=tt(),n={};return Object.keys(t).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:t[r].channels}),Object.defineProperty(n[r],"labels",{value:t[r].labels});const i=e(r);Object.keys(i).forEach((t=>{const e=i[t];n[r][t]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const r=t(e);if("object"==typeof r)for(let t=r.length,e=0;e<t;e++)r[e]=Math.round(r[e]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}(e),n[r][t].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(e)}))})),U=n}var nt,rt={},it={},ot={},st={};function at(){if(nt)return st;nt=1,Object.defineProperty(st,"__esModule",{value:!0}),st.FilterToHexShared=void 0;const t=y(),e=Q(),n=P();return st.FilterToHexShared=class{static generateInputErrorMessage(r){return t.ErrorHandling.generateInputErrorMessage(n.ColorTypes.FILTER,r,e.ColorFormats.FILTER)}static addSVGElementsToDOMAndValidateFilter(t,e=1){const n=function(){const t=document.createElement("div");return t.style.height=`${e}px`,t.style.width=`${e}px`,t.style.position="absolute",t.style.top="0px",t.style.left="0px",t}(),r=function(){const n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg");r.style.height="inherit",r.style.width="inherit",r.style.float="left",r.style.filter=t;const i=document.createElementNS(n,"rect");return i.setAttributeNS(null,"width",e.toString()),i.setAttributeNS(null,"height",e.toString()),r.appendChild(i),r}();return""===r.style.filter?{errorMessage:"error indicator",svgContainerElement:n}:(n.appendChild(r),document.body.appendChild(n),{svgContainerElement:n})}static async getColorViaImageDataURL(t){return function(t){const e=function(t){const e=t.width;return t.getContext("2d").getImageData(0,0,e,e).data}(t);return`#${`000000${function(t,e,n){if(t>255||e>255||n>255)throw new Error("Invalid color component");return(t<<16|e<<8|n).toString(16)}(e[0],e[1],e[2])}`.slice(-6)}`}(function(t){const e=document.createElement("canvas");return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height),e}(await async function(){const e=new Image;return new Promise(((n,r)=>{e.onload=()=>n(e),e.onerror=()=>r(new Error("Failed to load the SVG image data URL")),e.src=t}))}()))}},st}var ut,ct,lt={exports:{}};function ht(){return ut||(ut=1,t=lt,function(){var e=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n,r;return(n="application/font-woff",r="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:r,jpeg:r,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[e(t).toLowerCase()]||""},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){return a.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e(t)},i.readAsDataURL(r.response)}else n?e(n):o("cannot fetch resource: "+t+", status: "+r.status)},r.ontimeout=function(){n?e(n):o("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),a.impl.options.imagePlaceholder){var i=a.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(n=i[1])}function o(t){console.error(t),e("")}}))},uid:(t=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)+t++}),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var e=n(t,"border-left-width"),r=n(t,"border-right-width");return t.scrollWidth+e+r},height:function(t){var e=n(t,"border-top-width"),r=n(t,"border-bottom-width");return t.scrollHeight+e+r}};var t;function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),n=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,e,o){return n(t)?Promise.resolve(t).then(r).then((function(n){var r=Promise.resolve(t);return n.forEach((function(t){r=r.then((function(n){return i(n,t,e,o)}))})),r})):Promise.resolve(t)},shouldProcess:n,impl:{readUrls:r,inline:i}};function n(e){return-1!==e.search(t)}function r(n){for(var r,i=[];null!==(r=t.exec(n));)i.push(r[1]);return i.filter((function(t){return!e.isDataUrl(t)}))}function i(t,n,r,i){return Promise.resolve(n).then((function(t){return r?e.resolveUrl(t,r):t})).then(i||e.getAndEncode).then((function(t){return e.dataAsUrl(t,e.mimeType(n))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+e.escape(t)+")(['\"]?\\))","g")}(n),"$1"+r+"$3")}))}}(),r=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(e.asArray(document.styleSheets)).then((function(t){var n=[];return t.forEach((function(t){try{e.asArray(t.cssRules||[]).forEach(n.push.bind(n))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),n})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return n.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){return n.inlineAll(t.cssText,(t.parentStyleSheet||{}).href)},src:function(){return t.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function r(i){return i instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?n.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(e.asArray(i.childNodes).map((function(t){return r(t)})))})):Promise.resolve(i)},impl:{newImage:t}};function t(t){return{inline:function(n){return e.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(n||e.getAndEncode).then((function(n){return e.dataAsUrl(n,e.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),o=void 0,s=!1,a={toSvg:u,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,n){return c(t,n||{}).then(e.canvasToBlob)},toPixelData:function(t,n){return c(t,n||{}).then((function(n){return n.getContext("2d").getImageData(0,0,e.width(t),e.height(t)).data}))},impl:{fontFaces:r,images:i,util:e,inliner:n,options:{}}};function u(t,n){return function(t){a.impl.options.imagePlaceholder=void 0===t.imagePlaceholder?o:t.imagePlaceholder,a.impl.options.cacheBust=void 0===t.cacheBust?s:t.cacheBust}(n=n||{}),Promise.resolve(t).then((function(t){return l(t,n.filter,!0)})).then(h).then(f).then((function(t){return n.bgcolor&&(t.style.backgroundColor=n.bgcolor),n.width&&(t.style.width=n.width+"px"),n.height&&(t.style.height=n.height+"px"),n.style&&Object.keys(n.style).forEach((function(e){t.style[e]=n.style[e]})),t})).then((function(r){return function(t,n,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(e.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,n.width||e.width(t),n.height||e.height(t))}))}function c(t,n){return u(t,n).then(e.makeImage).then(e.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=n.width||e.width(t),r.height=n.height||e.height(t),n.bgcolor){var i=r.getContext("2d");i.fillStyle=n.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function l(t,n,r){return r||!n||n(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?e.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,n,r){var i=t.childNodes;return 0===i.length?Promise.resolve(n):function(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return l(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}(n,e.asArray(i),r).then((function(){return n}))}(t,r,n)})).then((function(n){return function(t,n){return n instanceof Element?Promise.resolve().then((function(){r=window.getComputedStyle(t),i=n.style,r.cssText?i.cssText=r.cssText:function(t,n){e.asArray(t).forEach((function(e){n.setProperty(e,t.getPropertyValue(e),t.getPropertyPriority(e))}))}(r,i);var r,i})).then((function(){[":before",":after"].forEach((function(r){!function(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var s=e.uid();n.className=n.className+" "+s;var a=document.createElement("style");a.appendChild(function(t,n,r){var i="."+t+":"+n,o=r.cssText?s(r):a(r);return document.createTextNode(i+"{"+o+"}");function s(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function a(t){return e.asArray(t).map(n).join("; ")+";";function n(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}(s,r,i)),n.appendChild(a)}}(r)}))})).then((function(){t instanceof HTMLTextAreaElement&&(n.innerHTML=t.value),t instanceof HTMLInputElement&&n.setAttribute("value",t.value)})).then((function(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(t){var e=n.getAttribute(t);e&&n.style.setProperty(t,e)})))})).then((function(){return n})):n}(t,n)})):Promise.resolve()}function h(t){return r.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function f(t){return i.inlineAll(t).then((function(){return t}))}t.exports=a}()),lt.exports;var t}var ft,dt,gt={};var bt,mt,vt,pt,wt={},yt={};var Mt=t((pt||(pt=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=function(){if(N)return m;N=1;var t=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(m,"__esModule",{value:!0}),m.ColorToFilter=void 0;const e=y(),n=j(),r=P(),i=function(){if(_)return $;_=1,Object.defineProperty($,"__esModule",{value:!0}),$.RgbToFilter=void 0;const t=y(),e=w(),n=function(){if(T)return S;T=1,Object.defineProperty(S,"__esModule",{value:!0}),S.RgbToFilterWorker=void 0;const t=j(),e=A();class n{constructor(t,n){this.targetRgbColor=t,this.reusedRgbColor=new e.RgbColor,this.reusedRoundedRgbColor=new e.RgbColor([0,0,0],!0),this.addSheen=n}static fmt(t,e,n=1){return Math.round(t[e]*n)}generateCss(e){return`${this.addSheen?`${t.SheenUtil.SHEEN_FILTER_PREFIX} `:""}invert(${n.fmt(e,0)}%) sepia(${n.fmt(e,1)}%) saturate(${n.fmt(e,2)}%) hue-rotate(${n.fmt(e,3,3.6)}deg) brightness(${n.fmt(e,4)}%) contrast(${n.fmt(e,5)}%)`}applyFilters(t,e,n){return t.setRgb(0,0,0),t.invert(e[0]/100),t.sepia(e[1]/100),t.saturate(e[2]/100),t.hueRotate(n),t.brightness(e[4]/100),t.contrast(e[5]/100),Math.abs(t.r-this.targetRgbColor.r)+Math.abs(t.g-this.targetRgbColor.g)+Math.abs(t.b-this.targetRgbColor.b)}loss(t){return this.applyFilters(this.reusedRgbColor,t,3.6*t[3])}serializedLoss(t){const e=t.map(((e,r)=>n.fmt(t,r))),r=n.fmt(t,3,3.6),i=this.applyFilters(this.reusedRgbColor,e,r),o=this.applyFilters(this.reusedRoundedRgbColor,e,r);return Math.max(i,o)}static fixSpsa(t,e){let n=100;return 2===e?n=7500:4!==e&&5!==e||(n=200),3===e?t>n?t%=n:t<0&&(t=n+t%n):t<0?t=0:t>n&&(t=n),t}spsa(t,e,r,i,o){let s=[],a=1/0;const u=new Array(6),c=new Array(6),l=new Array(6);for(let h=0;h<o;h+=1){const o=r/Math.pow(h+1,.16666666666666666);for(let t=0;t<6;t+=1)u[t]=Math.random()>.5?1:-1,c[t]=i[t]+o*u[t],l[t]=i[t]-o*u[t];const f=this.loss(c)-this.loss(l);for(let r=0;r<6;r+=1){const s=f/(2*o)*u[r],a=e[r]/Math.pow(t+h+1,1);i[r]=n.fixSpsa(i[r]-a*s,r)}const d=this.serializedLoss(i);d<a&&(s=i.slice(0),a=d)}return{values:s,loss:a}}solveNarrow(t){const e=t.loss,n=e+1;return this.spsa(e,[.25*n,.25*n,n,.25*n,.2*n,.2*n],2,t.values,500)}solveWide(){const t=[60,180,18e3,600,1.2,1.2];let e={values:[],loss:1/0};for(let n=0;e.loss>25&&n<3;n+=1){const n=this.spsa(5,t,15,[50,20,3750,50,100,100],1e3);n.loss<e.loss&&(e=n)}return e}convert(){const t=this.solveNarrow(this.solveWide());return{loss:t.loss,color:this.generateCss(t.values)}}}return S.RgbToFilterWorker=n,S}(),r=A();class i{static generateConversionError(n){return t.ErrorHandling.generateErrorResult(n||e.DEFAULT_CONVERSION_ERROR_MESSAGE)}static generateValidateAndParseError(e){return t.ErrorHandling.generateErrorResult(e)}static execute(t,e){const i=new r.RgbColor(t);return new n.RgbToFilterWorker(i,e).convert()}static convertToRGB(t,e){return t&&e?e(t):null}static convert(e){try{const{colorString:n,validateAndParse:r,convertToRgb:o,conversionErrorMessage:s,addSheen:a}=e,u=n.trim().toLocaleLowerCase(),c=(null==r?void 0:r(u))||{color:u};if(t.ErrorHandling.hasError(c))return i.generateValidateAndParseError(c.errorMessage);const l=i.convertToRGB(c.color,o)||c.color;return l?i.execute(l,a):i.generateConversionError(s)}catch(e){return t.ErrorHandling.generateUnexpectedError(e)}}}return $.RgbToFilter=i,$}(),o=function(){if(D)return W;D=1;var t=W&&W.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W,"__esModule",{value:!0}),W.ColorParser=void 0;const e=(R||(R=1,Object.defineProperty(X,"__esModule",{value:!0}),X.MATCH_HEXADECIMAL=X.MATCH_INTEGER_AND_FLOAT_NUMBERS=void 0,X.MATCH_INTEGER_AND_FLOAT_NUMBERS=/(-?\d+(?:\.\d+)?)/g,X.MATCH_HEXADECIMAL=/^#[0-9a-f]{3}([0-9a-f]{3})?$/i),X),n=y(),r=(C||(C=1,Object.defineProperty(J,"__esModule",{value:!0}),J.MAX_COLOR_INPUT_STRING_LENGTH=void 0,J.MAX_COLOR_INPUT_STRING_LENGTH=25),J),i=Q(),o=P(),s=t(Y());class a{static validateAndParseHex(t){return t.length<r.MAX_COLOR_INPUT_STRING_LENGTH&&t.match(e.MATCH_HEXADECIMAL)?{color:t}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.HEX,t,i.ColorFormats.HEX)}}static parseFirstThreeIntegersFromString(t){if(t.length<r.MAX_COLOR_INPUT_STRING_LENGTH){const n=t.match(e.MATCH_INTEGER_AND_FLOAT_NUMBERS);if(e.MATCH_INTEGER_AND_FLOAT_NUMBERS.lastIndex=0,n&&n.length>=3)return n.slice(0,3).map((t=>Number.parseInt(t)))}return null}static validateAndParseRgb(t){const e=a.parseFirstThreeIntegersFromString(t);return e&&e[0]>=0&&e[0]<=255&&e[1]>=0&&e[1]<=255&&e[2]>=0&&e[2]<=255?{color:e}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.RGB,t,i.ColorFormats.RGB)}}static validateAndParseHsl(t){const e=a.parseFirstThreeIntegersFromString(t);return e&&e[0]>=0&&e[0]<=360&&e[1]>=0&&e[1]<=100&&e[2]>=0&&e[2]<=100?{color:e}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.HSL,t,i.ColorFormats.HSL)}}static validateAndParseKeyword(t){return t.length<r.MAX_COLOR_INPUT_STRING_LENGTH&&s.default[t]?{color:t}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.KEYWORD,t,i.ColorFormats.KEYWORD)}}}return W.ColorParser=a,W}(),s=t(et());return m.ColorToFilter=class{static rgbToFilter(t,e){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseRgb,addSheen:n.SheenUtil.parseSheenFromOptions(e)})}static hexToFilter(t,e){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseHex,convertToRgb:s.default.hex.rgb,addSheen:n.SheenUtil.parseSheenFromOptions(e)})}static hslToFilter(t,e){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseHsl,convertToRgb:s.default.hsl.rgb,addSheen:n.SheenUtil.parseSheenFromOptions(e)})}static keywordToFilter(t,a){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseKeyword,convertToRgb:s.default.keyword.rgb,conversionErrorMessage:e.ErrorHandling.generateInputErrorMessage(r.ColorTypes.KEYWORD,t),addSheen:n.SheenUtil.parseSheenFromOptions(a)})}},m}(),r=function(){if(vt)return rt;vt=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.FilterToColor=void 0;const t=function(){if(dt)return it;dt=1;var t=it&&it.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),e=it&&it.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=it&&it.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&t(r,n,i);return e(r,n),r};Object.defineProperty(it,"__esModule",{value:!0}),it.FilterToHex=void 0;const r=y(),i=function(){if(ct)return ot;ct=1;var t=ot&&ot.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),e=ot&&ot.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=ot&&ot.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&t(r,n,i);return e(r,n),r};Object.defineProperty(ot,"__esModule",{value:!0}),ot.FilterToHexBrowser=void 0;const r=y(),i=at();class o extends i.FilterToHexShared{static cleanup(t){t.remove()}static returnInputError(t,e){const n=i.FilterToHexShared.generateInputErrorMessage(t),s=r.ErrorHandling.generateErrorResult(n);return o.cleanup(e),s}static async getImageBase64ViaSVG(t){return(await Promise.resolve().then((()=>n(ht())))).toPng(t)}static async convert(t){const{errorMessage:e,svgContainerElement:n}=i.FilterToHexShared.addSVGElementsToDOMAndValidateFilter(t);if(e)return o.returnInputError(t,n);const r=await o.getImageBase64ViaSVG(n),s=await i.FilterToHexShared.getColorViaImageDataURL(r);return o.cleanup(n),{color:s}}}return ot.FilterToHexBrowser=o,ot}();return it.FilterToHex=class{static async convert(t,e,o){try{let r;if("undefined"==typeof window){const{FilterToHexNode:e}=await Promise.resolve().then((()=>n(function(){if(ft)return gt;ft=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.FilterToHexNode=void 0;const t=y(),e=w(),n=Q(),r=P(),i=at();class o extends i.FilterToHexShared{static cleanup(t){o.IS_HEADLESS&&(null==t||t.close())}static returnError(e,n){const r=t.ErrorHandling.generateErrorResult(e);return o.cleanup(n),r}static async getImageBase64ViaSVG(t){const e=await t.screenshot({encoding:o.BASE_64_ENCODING});return`${o.ENCODED_DATA_URL_PREFIX}${e}`}static async openBrowserPage(t){const e=await t.newPage();return await e.setViewport({width:o.SVG_SIDE_LENGTH_PX,height:o.SVG_SIDE_LENGTH_PX}),e}static async addSVGAndValidateFilter(e,s){const a=await e.evaluate(i.FilterToHexShared.addSVGElementsToDOMAndValidateFilter,s,o.SVG_SIDE_LENGTH_PX);return a.errorMessage?{errorMessage:t.ErrorHandling.generateInputErrorMessage(r.ColorTypes.FILTER,s,n.ColorFormats.FILTER)}:a}static async getPuppeteerDependency(){try{return f("puppeteer")}catch(t){return{errorMessage:e.MUST_INSTALL_PUPPETEER}}}static async preparePuppeteerBrowser(){const e=await o.getPuppeteerDependency();return t.ErrorHandling.hasError(e)?e:e.launch({headless:o.IS_HEADLESS})}static async convert(e){const n=await o.preparePuppeteerBrowser();if(t.ErrorHandling.hasError(n))return o.returnError(n.errorMessage);const r=await o.openBrowserPage(n),s=await o.addSVGAndValidateFilter(r,e);if(t.ErrorHandling.hasError(s))return o.returnError(s.errorMessage,n);const a=await o.getImageBase64ViaSVG(r),u=await r.evaluate(i.FilterToHexShared.getColorViaImageDataURL,a);return o.cleanup(n),{color:u}}}return gt.FilterToHexNode=o,o.BASE_64_ENCODING="base64",o.ENCODED_DATA_URL_PREFIX=`data:image/png;${o.BASE_64_ENCODING},`,o.IS_HEADLESS=!0,o.SVG_SIDE_LENGTH_PX=2,gt}())));r=await e.convert(t)}else r=await i.FilterToHexBrowser.convert(t);return r.color&&e&&"string"==typeof r.color&&(r.color=e(r.color,o)),r}catch(t){return r.ErrorHandling.generateUnexpectedError(t)}}},it}(),e=function(){if(mt)return wt;mt=1;var t=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.HexToColor=void 0;const e=(bt||(bt=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.ColorFormatter=void 0,yt.ColorFormatter=class{static arrayToRgbString(t){return`rgb(${t[0]}, ${t[1]}, ${t[2]})`}static arrayToHslString(t){return`hsl(${t[0]}deg, ${t[1]}%, ${t[2]}%)`}}),yt),n=t(et());return wt.HexToColor=class{static convertToRgb(t,r){const i=n.default.hex.rgb(t);return"string"===(null==r?void 0:r.resultType)?e.ColorFormatter.arrayToRgbString(i):i}static convertToHsl(t,r){const i=n.default.hex.hsl(t);return"string"===(null==r?void 0:r.resultType)?e.ColorFormatter.arrayToHslString(i):i}},wt}();return rt.FilterToColor=class{static async filterToHex(e){const n=await t.FilterToHex.convert(e);return n.color&&(n.color=n.color.toUpperCase()),n}static async filterToRgb(n,r){return t.FilterToHex.convert(n,e.HexToColor.convertToRgb,r)}static async filterToHsl(n,r){return t.FilterToHex.convert(n,e.HexToColor.convertToHsl,r)}},rt}();class i{static rgbToFilter(t,e){return n.ColorToFilter.rgbToFilter(t,e)}static hexToFilter(t,e){return n.ColorToFilter.hexToFilter(t,e)}static hslToFilter(t,e){return n.ColorToFilter.hslToFilter(t,e)}static keywordToFilter(t,e){return n.ColorToFilter.keywordToFilter(t,e)}static async filterToHex(t){return r.FilterToColor.filterToHex(t)}static async filterToRgb(t,e){return r.FilterToColor.filterToRgb(t,e)}static async filterToHsl(t,e){return r.FilterToColor.filterToHsl(t,e)}}e.default=i,t.exports=i}(b,b.exports)),b.exports));const kt=n(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.sliceWidth="30px",this.minDrops=1,this.maxDrops=1,this.margin="",this.padding="",this.filter="",this.borderRadius="0px",this.transform="",this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(i(this.el,this.delayVisible),o(this.el,this.type),""!==this.filter){const t=this.el.getElementsByTagName("img")[0];t&&(t.style.filter=`${Mt.hexToFilter(s(this.filter).toHexString()).color}`)}this.showSpeakIcon&&a(this.el)}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:c(this.height,t),width:c(this.width,t),backgroundColor:c(this.bgColor,t),top:c(this.y,t),left:c(this.x,t),zIndex:this.z,display:c(`${this.visible}`,t)?"flex":"none",alignItems:"center",justifyContent:"center",margin:c(this.margin,t),padding:c(this.padding,t),transform:c(this.transform,t),borderRadius:this.borderRadius,borderImageSource:"true"===this.isSlice?`url(${u(this.src)})`:"none",borderImageSlice:"true"===this.isSlice?`${parseInt(this.sliceWidth)} fill`:"unset",borderImageRepeat:"true"===this.isSlice?"round":"unset",borderImageWidth:"true"===this.isSlice?`${this.sliceWidth}`:"unset",backgroundImage:"true"===this.isSlice?`url(${u(this.src)})`:"none"}}render(){return"true"===this.isSlice?l(h,{class:"slice",id:this.id,type:this.type,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,value:this.value,minDrops:this.minDrops,maxDrops:this.maxDrops,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry}):l(h,{id:this.id,type:this.type,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,value:this.value,minDrops:this.minDrops,maxDrops:this.maxDrops,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,"disable-speak":this.disableSpeak},l("img",{class:"lido-image",src:u(this.src),alt:"",style:this.style}))}get el(){return this}static get style(){return".lido-image{user-select:none;-webkit-user-drag:none;object-fit:contain;width:100% !important;height:100% !important;aspect-ratio:1 / 1;transform:rotate(0) !important;margin:0 !important}.slice{background-repeat:no-repeat;background-position:center;background-size:100% 100%}"}},[0,"lido-image",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],src:[1],isSlice:[1,"is-slice"],sliceWidth:[1,"slice-width"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],padding:[1],filter:[1],borderRadius:[1,"border-radius"],transform:[1],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function jt(){"undefined"!=typeof customElements&&["lido-image"].forEach((t=>{"lido-image"===t&&(customElements.get(e(t))||customElements.define(e(t),kt))}))}jt();export{kt as L,f as c,jt as d}
|
|
1
|
+
import{M as t,t as e,p as n,H as r,k as i,i as o,a8 as s,m as a,c as u,a as c,h as l,b as h}from"./index.js";function f(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var d,g,b={exports:{}},m={},v={},p={};function w(){return d||(d=1,t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.MUST_INSTALL_PUPPETEER=t.DEFAULT_CONVERSION_ERROR_MESSAGE=t.UNEXPECTED_ERROR_MESSAGE_INTRODUCTION=t.UNEXPECTED_ERROR_MESSAGE_LINK=t.UNEXPECTED_ERROR_MESSAGE_PREFIX=void 0,t.UNEXPECTED_ERROR_MESSAGE_PREFIX="Unexpected error has occurred, please report this by using the following link: ",t.UNEXPECTED_ERROR_MESSAGE_LINK="https://github.com/OvidijusParsiunas/css-filter-converter/issues/new",t.UNEXPECTED_ERROR_MESSAGE_INTRODUCTION=t.UNEXPECTED_ERROR_MESSAGE_PREFIX+t.UNEXPECTED_ERROR_MESSAGE_LINK,t.DEFAULT_CONVERSION_ERROR_MESSAGE="Input value is invalid",t.MUST_INSTALL_PUPPETEER="To convert filter values to color in Node - you will first need to install 'puppeteer' by running: \n npm install puppeteer"),p;var t}function y(){if(g)return v;g=1,Object.defineProperty(v,"__esModule",{value:!0}),v.ErrorHandling=void 0;const t=w();class e{static generateErrorResult(t){return{color:null,error:{message:t}}}static generateInputErrorMessage(t,e,n){const r=[`Input ${t} color string could not be parsed.`,`String received: ${e}.`];return n&&r.splice(1,0,`Expected format: ${n}.`),r.join(" ")}static generateUnexpectedError(n){return e.generateErrorResult(`${t.UNEXPECTED_ERROR_MESSAGE_INTRODUCTION}: \n${n.message}`)}static hasError(t){return!!t.errorMessage}}return v.ErrorHandling=e,v}var M,k={};function j(){if(M)return k;M=1,Object.defineProperty(k,"__esModule",{value:!0}),k.SheenUtil=void 0;class t{static parseSheenFromOptions(t){return!t||"boolean"!=typeof t.sheen||t.sheen}}return k.SheenUtil=t,t.SHEEN_FILTER_PREFIX="brightness(0) saturate(100%)",k}var x,O={};function P(){return x||(x=1,t=O,Object.defineProperty(t,"__esModule",{value:!0}),t.ColorTypes=void 0,(e=t.ColorTypes||(t.ColorTypes={})).HEX="hex",e.RGB="rgb",e.HSL="hsl",e.KEYWORD="keyword",e.FILTER="filter"),O;var t,e}var E,T,_,$={},S={},I={};function A(){return E||(E=1,Object.defineProperty(I,"__esModule",{value:!0}),I.RgbColor=void 0,I.RgbColor=class{constructor(t=[0,0,0],e=!1){this.roundChannels=e,this.r=this.clamp(t[0]),this.g=this.clamp(t[1]),this.b=this.clamp(t[2])}clamp(t){return t>255?t=255:t<0&&(t=0),this.roundChannels?Math.round(t):t}setRgb(t,e,n){this.r=this.clamp(t),this.g=this.clamp(e),this.b=this.clamp(n)}multiply(t){const e=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),n=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),r=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=e,this.g=n,this.b=r}hueRotate(t=0){t=t/180*Math.PI;const e=Math.sin(t),n=Math.cos(t);this.multiply([.213+.787*n-.213*e,.715-.715*n-.715*e,.072-.072*n+.928*e,.213-.213*n+.143*e,.715+.285*n+.14*e,.072-.072*n-.283*e,.213-.213*n-.787*e,.715-.715*n+.715*e,.072+.928*n+.072*e])}sepia(t=1){this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])}saturate(t=1){this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])}linear(t=1,e=0){this.r=this.clamp(this.r*t+255*e),this.g=this.clamp(this.g*t+255*e),this.b=this.clamp(this.b*t+255*e)}brightness(t=1){this.linear(t)}contrast(t=1){this.linear(t,-.5*t+.5)}invert(t=1){this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))}}),I}var R,C,F,H,q,D,V,L,z,G,U,B,N,W={},X={},J={},K={};function Q(){return F||(F=1,t=K,Object.defineProperty(t,"__esModule",{value:!0}),t.ColorFormats=void 0,(e=t.ColorFormats||(t.ColorFormats={})).HEX="#ffffff or #fff",e.RGB="rgb([0-255], [0-255], [0-255]) or rgb([0-255], [0-255], [0-255], [0-1]) or rgb([0-100%], [0-100%], [0-100%]) or rgb([0-100%], [0-100%], [0-100%], [0-100%]) or [0-255], [0-255], [0-255] or [0-255] [0-255] [0-255]",e.HSL="hsl([0-360], [0-100], [0-100]) or hsl([0-360], [0-100%], [0-100%]) or [0-360], [0-100], [0-100] or [0-360] [0-100] [0-100]",e.FILTER="blur(), brightness(), contrast(), drop-shadow(), grayscale(), hue-rotate(), invert(), saturate(), sepia() with each parameter populated with %, px or deg where approriate e.g. contrast(101%)",e.KEYWORD="Generic color string. See the following link for all available colors: https://github.com/colorjs/color-name/blob/master/index.js"),K;var t,e}function Y(){return q?H:(q=1,H={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})}function Z(){if(L)return V;L=1;const t=Y(),e={};for(const n of Object.keys(t))e[t[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};V=n;for(const t of Object.keys(n)){if(!("channels"in n[t]))throw new Error("missing channels property: "+t);if(!("labels"in n[t]))throw new Error("missing channel labels property: "+t);if(n[t].labels.length!==n[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=n[t];delete n[t].channels,delete n[t].labels,Object.defineProperty(n[t],"channels",{value:e}),Object.defineProperty(n[t],"labels",{value:r})}return n.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=o-i;let a,u;o===i?a=0:e===o?a=(n-r)/s:n===o?a=2+(r-e)/s:r===o&&(a=4+(e-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(i+o)/2;return u=o===i?0:c<=.5?s/(o+i):s/(2-o-i),[a,100*u,100*c]},n.rgb.hsv=function(t){let e,n,r,i,o;const s=t[0]/255,a=t[1]/255,u=t[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),h=function(t){return(c-t)/6/l+.5};return 0===l?(i=0,o=0):(o=l/c,e=h(s),n=h(a),r=h(u),s===c?i=r-n:a===c?i=1/3+e-r:u===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},n.rgb.hwb=function(t){const e=t[0],r=t[1];let i=t[2];const o=n.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[o,100*s,100*i]},n.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r);return[100*((1-e-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},n.rgb.keyword=function(n){const r=e[n];if(r)return r;let i,o=1/0;for(const e of Object.keys(t)){const r=((s=n)[0]-(a=t[e])[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2;r<o&&(o=r,i=e)}var s,a;return i},n.keyword.rgb=function(e){return t[e]},n.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*e+.3576*n+.1805*r),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},n.rgb.lab=function(t){const e=n.rgb.xyz(t);let r=e[0],i=e[1],o=e[2];return r/=95.047,i/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,[116*i-16,500*(r-i),200*(i-o)]},n.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,o,s;if(0===n)return s=255*r,[s,s,s];i=r<.5?r*(1+n):r+n-r*n;const a=2*r-i,u=[0,0,0];for(let t=0;t<3;t++)o=e+1/3*-(t-1),o<0&&o++,o>1&&o--,s=6*o<1?a+6*(i-a)*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,u[t]=255*s;return u},n.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const o=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o,[e,100*(0===r?2*i/(o+i):2*n/(r+n)),(r+n)/2*100]},n.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,o=e-Math.floor(e),s=255*r*(1-n),a=255*r*(1-n*o),u=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,u,s];case 1:return[a,r,s];case 2:return[s,r,u];case 3:return[s,a,r];case 4:return[u,s,r];case 5:return[r,s,a]}},n.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,100*o,100*s]},n.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*e),a=1-r;o=6*e-s,1&s&&(o=1-o);const u=n+o*(a-n);let c,l,h;switch(s){default:case 6:case 0:c=a,l=u,h=n;break;case 1:c=u,l=a,h=n;break;case 2:c=n,l=a,h=u;break;case 3:c=n,l=u,h=a;break;case 4:c=u,l=n,h=a;break;case 5:c=a,l=n,h=u}return[255*c,255*l,255*h]},n.cmyk.rgb=function(t){const e=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-r)+r)),255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},n.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,o,s;return i=3.2406*e+-1.5372*n+-.4986*r,o=-.9689*e+1.8758*n+.0415*r,s=.0557*e+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[255*i,255*o,255*s]},n.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];return e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(e-n),200*(n-r)]},n.lab.xyz=function(t){let e,n,r;n=(t[0]+16)/116,e=t[1]/500+n,r=n-t[2]/200;const i=n**3,o=e**3,s=r**3;return n=i>.008856?i:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,e*=95.047,n*=100,r*=108.883,[e,n,r]},n.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[e,Math.sqrt(n*n+r*r),i]},n.lch.lab=function(t){const e=t[1],n=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(n),e*Math.sin(n)]},n.rgb.ansi16=function(t,e=null){const[r,i,o]=t;let s=null===e?n.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(o/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},n.hsv.ansi16=function(t){return n.rgb.ansi16(n.hsv.rgb(t),t[2])},n.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},n.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},n.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},n.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];3===e[0].length&&(n=n.split("").map((t=>t+t)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),o=Math.min(Math.min(e,n),r),s=i-o;let a,u;return a=s<1?o/(1-s):0,u=s<=0?0:i===e?(n-r)/s%6:i===n?2+(r-e)/s:4+(e-n)/s,u/=6,u%=1,[360*u,100*s,100*a]},n.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},n.hsv.hcg=function(t){const e=t[2]/100,n=t[1]/100*e;let r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},n.hcg.rgb=function(t){const e=t[1]/100,n=t[2]/100;if(0===e)return[255*n,255*n,255*n];const r=[0,0,0],i=t[0]/360%1*6,o=i%1,s=1-o;let a=0;switch(Math.floor(i)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return a=(1-e)*n,[255*(e*r[0]+a),255*(e*r[1]+a),255*(e*r[2]+a)]},n.hcg.hsv=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);let r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},n.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},n.hcg.hwb=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},n.hwb.hcg=function(t){const e=1-t[2]/100,n=e-t[1]/100;let r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},n.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},n.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},n.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},n.gray.hsl=function(t){return[0,0,t[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(t){return[0,100,t[0]]},n.gray.cmyk=function(t){return[0,0,0,t[0]]},n.gray.lab=function(t){return[t[0],0,0]},n.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]},V}function tt(){if(G)return z;G=1;const t=Z();function e(t,e){return function(n){return e(t(n))}}function n(n,r){const i=[r[n].parent,n];let o=t[r[n].parent][n],s=r[n].parent;for(;r[s].parent;)i.unshift(r[s].parent),o=e(t[r[s].parent][s],o),s=r[s].parent;return o.conversion=i,o}return z=function(e){const r=function(e){const n=function(){const e={},n=Object.keys(t);for(let t=n.length,r=0;r<t;r++)e[n[r]]={distance:-1,parent:null};return e}(),r=[e];for(n[e].distance=0;r.length;){const e=r.pop(),i=Object.keys(t[e]);for(let t=i.length,o=0;o<t;o++){const t=i[o],s=n[t];-1===s.distance&&(s.distance=n[e].distance+1,s.parent=e,r.unshift(t))}}return n}(e),i={},o=Object.keys(r);for(let t=o.length,e=0;e<t;e++){const t=o[e];null!==r[t].parent&&(i[t]=n(t,r))}return i}}function et(){if(B)return U;B=1;const t=Z(),e=tt(),n={};return Object.keys(t).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:t[r].channels}),Object.defineProperty(n[r],"labels",{value:t[r].labels});const i=e(r);Object.keys(i).forEach((t=>{const e=i[t];n[r][t]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const r=t(e);if("object"==typeof r)for(let t=r.length,e=0;e<t;e++)r[e]=Math.round(r[e]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}(e),n[r][t].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(e)}))})),U=n}var nt,rt={},it={},ot={},st={};function at(){if(nt)return st;nt=1,Object.defineProperty(st,"__esModule",{value:!0}),st.FilterToHexShared=void 0;const t=y(),e=Q(),n=P();return st.FilterToHexShared=class{static generateInputErrorMessage(r){return t.ErrorHandling.generateInputErrorMessage(n.ColorTypes.FILTER,r,e.ColorFormats.FILTER)}static addSVGElementsToDOMAndValidateFilter(t,e=1){const n=function(){const t=document.createElement("div");return t.style.height=`${e}px`,t.style.width=`${e}px`,t.style.position="absolute",t.style.top="0px",t.style.left="0px",t}(),r=function(){const n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg");r.style.height="inherit",r.style.width="inherit",r.style.float="left",r.style.filter=t;const i=document.createElementNS(n,"rect");return i.setAttributeNS(null,"width",e.toString()),i.setAttributeNS(null,"height",e.toString()),r.appendChild(i),r}();return""===r.style.filter?{errorMessage:"error indicator",svgContainerElement:n}:(n.appendChild(r),document.body.appendChild(n),{svgContainerElement:n})}static async getColorViaImageDataURL(t){return function(t){const e=function(t){const e=t.width;return t.getContext("2d").getImageData(0,0,e,e).data}(t);return`#${`000000${function(t,e,n){if(t>255||e>255||n>255)throw new Error("Invalid color component");return(t<<16|e<<8|n).toString(16)}(e[0],e[1],e[2])}`.slice(-6)}`}(function(t){const e=document.createElement("canvas");return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height),e}(await async function(){const e=new Image;return new Promise(((n,r)=>{e.onload=()=>n(e),e.onerror=()=>r(new Error("Failed to load the SVG image data URL")),e.src=t}))}()))}},st}var ut,ct,lt={exports:{}};function ht(){return ut||(ut=1,t=lt,function(){var e=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n,r;return(n="application/font-woff",r="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:r,jpeg:r,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[e(t).toLowerCase()]||""},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){return a.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e(t)},i.readAsDataURL(r.response)}else n?e(n):o("cannot fetch resource: "+t+", status: "+r.status)},r.ontimeout=function(){n?e(n):o("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),a.impl.options.imagePlaceholder){var i=a.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(n=i[1])}function o(t){console.error(t),e("")}}))},uid:(t=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)+t++}),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var e=n(t,"border-left-width"),r=n(t,"border-right-width");return t.scrollWidth+e+r},height:function(t){var e=n(t,"border-top-width"),r=n(t,"border-bottom-width");return t.scrollHeight+e+r}};var t;function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),n=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,e,o){return n(t)?Promise.resolve(t).then(r).then((function(n){var r=Promise.resolve(t);return n.forEach((function(t){r=r.then((function(n){return i(n,t,e,o)}))})),r})):Promise.resolve(t)},shouldProcess:n,impl:{readUrls:r,inline:i}};function n(e){return-1!==e.search(t)}function r(n){for(var r,i=[];null!==(r=t.exec(n));)i.push(r[1]);return i.filter((function(t){return!e.isDataUrl(t)}))}function i(t,n,r,i){return Promise.resolve(n).then((function(t){return r?e.resolveUrl(t,r):t})).then(i||e.getAndEncode).then((function(t){return e.dataAsUrl(t,e.mimeType(n))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+e.escape(t)+")(['\"]?\\))","g")}(n),"$1"+r+"$3")}))}}(),r=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(e.asArray(document.styleSheets)).then((function(t){var n=[];return t.forEach((function(t){try{e.asArray(t.cssRules||[]).forEach(n.push.bind(n))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),n})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return n.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){return n.inlineAll(t.cssText,(t.parentStyleSheet||{}).href)},src:function(){return t.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function r(i){return i instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?n.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(e.asArray(i.childNodes).map((function(t){return r(t)})))})):Promise.resolve(i)},impl:{newImage:t}};function t(t){return{inline:function(n){return e.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(n||e.getAndEncode).then((function(n){return e.dataAsUrl(n,e.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),o=void 0,s=!1,a={toSvg:u,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,n){return c(t,n||{}).then(e.canvasToBlob)},toPixelData:function(t,n){return c(t,n||{}).then((function(n){return n.getContext("2d").getImageData(0,0,e.width(t),e.height(t)).data}))},impl:{fontFaces:r,images:i,util:e,inliner:n,options:{}}};function u(t,n){return function(t){a.impl.options.imagePlaceholder=void 0===t.imagePlaceholder?o:t.imagePlaceholder,a.impl.options.cacheBust=void 0===t.cacheBust?s:t.cacheBust}(n=n||{}),Promise.resolve(t).then((function(t){return l(t,n.filter,!0)})).then(h).then(f).then((function(t){return n.bgcolor&&(t.style.backgroundColor=n.bgcolor),n.width&&(t.style.width=n.width+"px"),n.height&&(t.style.height=n.height+"px"),n.style&&Object.keys(n.style).forEach((function(e){t.style[e]=n.style[e]})),t})).then((function(r){return function(t,n,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(e.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,n.width||e.width(t),n.height||e.height(t))}))}function c(t,n){return u(t,n).then(e.makeImage).then(e.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=n.width||e.width(t),r.height=n.height||e.height(t),n.bgcolor){var i=r.getContext("2d");i.fillStyle=n.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function l(t,n,r){return r||!n||n(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?e.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,n,r){var i=t.childNodes;return 0===i.length?Promise.resolve(n):function(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return l(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}(n,e.asArray(i),r).then((function(){return n}))}(t,r,n)})).then((function(n){return function(t,n){return n instanceof Element?Promise.resolve().then((function(){r=window.getComputedStyle(t),i=n.style,r.cssText?i.cssText=r.cssText:function(t,n){e.asArray(t).forEach((function(e){n.setProperty(e,t.getPropertyValue(e),t.getPropertyPriority(e))}))}(r,i);var r,i})).then((function(){[":before",":after"].forEach((function(r){!function(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var s=e.uid();n.className=n.className+" "+s;var a=document.createElement("style");a.appendChild(function(t,n,r){var i="."+t+":"+n,o=r.cssText?s(r):a(r);return document.createTextNode(i+"{"+o+"}");function s(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function a(t){return e.asArray(t).map(n).join("; ")+";";function n(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}(s,r,i)),n.appendChild(a)}}(r)}))})).then((function(){t instanceof HTMLTextAreaElement&&(n.innerHTML=t.value),t instanceof HTMLInputElement&&n.setAttribute("value",t.value)})).then((function(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(t){var e=n.getAttribute(t);e&&n.style.setProperty(t,e)})))})).then((function(){return n})):n}(t,n)})):Promise.resolve()}function h(t){return r.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function f(t){return i.inlineAll(t).then((function(){return t}))}t.exports=a}()),lt.exports;var t}var ft,dt,gt={};var bt,mt,vt,pt,wt={},yt={};var Mt=t((pt||(pt=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=function(){if(N)return m;N=1;var t=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(m,"__esModule",{value:!0}),m.ColorToFilter=void 0;const e=y(),n=j(),r=P(),i=function(){if(_)return $;_=1,Object.defineProperty($,"__esModule",{value:!0}),$.RgbToFilter=void 0;const t=y(),e=w(),n=function(){if(T)return S;T=1,Object.defineProperty(S,"__esModule",{value:!0}),S.RgbToFilterWorker=void 0;const t=j(),e=A();class n{constructor(t,n){this.targetRgbColor=t,this.reusedRgbColor=new e.RgbColor,this.reusedRoundedRgbColor=new e.RgbColor([0,0,0],!0),this.addSheen=n}static fmt(t,e,n=1){return Math.round(t[e]*n)}generateCss(e){return`${this.addSheen?`${t.SheenUtil.SHEEN_FILTER_PREFIX} `:""}invert(${n.fmt(e,0)}%) sepia(${n.fmt(e,1)}%) saturate(${n.fmt(e,2)}%) hue-rotate(${n.fmt(e,3,3.6)}deg) brightness(${n.fmt(e,4)}%) contrast(${n.fmt(e,5)}%)`}applyFilters(t,e,n){return t.setRgb(0,0,0),t.invert(e[0]/100),t.sepia(e[1]/100),t.saturate(e[2]/100),t.hueRotate(n),t.brightness(e[4]/100),t.contrast(e[5]/100),Math.abs(t.r-this.targetRgbColor.r)+Math.abs(t.g-this.targetRgbColor.g)+Math.abs(t.b-this.targetRgbColor.b)}loss(t){return this.applyFilters(this.reusedRgbColor,t,3.6*t[3])}serializedLoss(t){const e=t.map(((e,r)=>n.fmt(t,r))),r=n.fmt(t,3,3.6),i=this.applyFilters(this.reusedRgbColor,e,r),o=this.applyFilters(this.reusedRoundedRgbColor,e,r);return Math.max(i,o)}static fixSpsa(t,e){let n=100;return 2===e?n=7500:4!==e&&5!==e||(n=200),3===e?t>n?t%=n:t<0&&(t=n+t%n):t<0?t=0:t>n&&(t=n),t}spsa(t,e,r,i,o){let s=[],a=1/0;const u=new Array(6),c=new Array(6),l=new Array(6);for(let h=0;h<o;h+=1){const o=r/Math.pow(h+1,.16666666666666666);for(let t=0;t<6;t+=1)u[t]=Math.random()>.5?1:-1,c[t]=i[t]+o*u[t],l[t]=i[t]-o*u[t];const f=this.loss(c)-this.loss(l);for(let r=0;r<6;r+=1){const s=f/(2*o)*u[r],a=e[r]/Math.pow(t+h+1,1);i[r]=n.fixSpsa(i[r]-a*s,r)}const d=this.serializedLoss(i);d<a&&(s=i.slice(0),a=d)}return{values:s,loss:a}}solveNarrow(t){const e=t.loss,n=e+1;return this.spsa(e,[.25*n,.25*n,n,.25*n,.2*n,.2*n],2,t.values,500)}solveWide(){const t=[60,180,18e3,600,1.2,1.2];let e={values:[],loss:1/0};for(let n=0;e.loss>25&&n<3;n+=1){const n=this.spsa(5,t,15,[50,20,3750,50,100,100],1e3);n.loss<e.loss&&(e=n)}return e}convert(){const t=this.solveNarrow(this.solveWide());return{loss:t.loss,color:this.generateCss(t.values)}}}return S.RgbToFilterWorker=n,S}(),r=A();class i{static generateConversionError(n){return t.ErrorHandling.generateErrorResult(n||e.DEFAULT_CONVERSION_ERROR_MESSAGE)}static generateValidateAndParseError(e){return t.ErrorHandling.generateErrorResult(e)}static execute(t,e){const i=new r.RgbColor(t);return new n.RgbToFilterWorker(i,e).convert()}static convertToRGB(t,e){return t&&e?e(t):null}static convert(e){try{const{colorString:n,validateAndParse:r,convertToRgb:o,conversionErrorMessage:s,addSheen:a}=e,u=n.trim().toLocaleLowerCase(),c=(null==r?void 0:r(u))||{color:u};if(t.ErrorHandling.hasError(c))return i.generateValidateAndParseError(c.errorMessage);const l=i.convertToRGB(c.color,o)||c.color;return l?i.execute(l,a):i.generateConversionError(s)}catch(e){return t.ErrorHandling.generateUnexpectedError(e)}}}return $.RgbToFilter=i,$}(),o=function(){if(D)return W;D=1;var t=W&&W.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W,"__esModule",{value:!0}),W.ColorParser=void 0;const e=(R||(R=1,Object.defineProperty(X,"__esModule",{value:!0}),X.MATCH_HEXADECIMAL=X.MATCH_INTEGER_AND_FLOAT_NUMBERS=void 0,X.MATCH_INTEGER_AND_FLOAT_NUMBERS=/(-?\d+(?:\.\d+)?)/g,X.MATCH_HEXADECIMAL=/^#[0-9a-f]{3}([0-9a-f]{3})?$/i),X),n=y(),r=(C||(C=1,Object.defineProperty(J,"__esModule",{value:!0}),J.MAX_COLOR_INPUT_STRING_LENGTH=void 0,J.MAX_COLOR_INPUT_STRING_LENGTH=25),J),i=Q(),o=P(),s=t(Y());class a{static validateAndParseHex(t){return t.length<r.MAX_COLOR_INPUT_STRING_LENGTH&&t.match(e.MATCH_HEXADECIMAL)?{color:t}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.HEX,t,i.ColorFormats.HEX)}}static parseFirstThreeIntegersFromString(t){if(t.length<r.MAX_COLOR_INPUT_STRING_LENGTH){const n=t.match(e.MATCH_INTEGER_AND_FLOAT_NUMBERS);if(e.MATCH_INTEGER_AND_FLOAT_NUMBERS.lastIndex=0,n&&n.length>=3)return n.slice(0,3).map((t=>Number.parseInt(t)))}return null}static validateAndParseRgb(t){const e=a.parseFirstThreeIntegersFromString(t);return e&&e[0]>=0&&e[0]<=255&&e[1]>=0&&e[1]<=255&&e[2]>=0&&e[2]<=255?{color:e}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.RGB,t,i.ColorFormats.RGB)}}static validateAndParseHsl(t){const e=a.parseFirstThreeIntegersFromString(t);return e&&e[0]>=0&&e[0]<=360&&e[1]>=0&&e[1]<=100&&e[2]>=0&&e[2]<=100?{color:e}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.HSL,t,i.ColorFormats.HSL)}}static validateAndParseKeyword(t){return t.length<r.MAX_COLOR_INPUT_STRING_LENGTH&&s.default[t]?{color:t}:{errorMessage:n.ErrorHandling.generateInputErrorMessage(o.ColorTypes.KEYWORD,t,i.ColorFormats.KEYWORD)}}}return W.ColorParser=a,W}(),s=t(et());return m.ColorToFilter=class{static rgbToFilter(t,e){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseRgb,addSheen:n.SheenUtil.parseSheenFromOptions(e)})}static hexToFilter(t,e){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseHex,convertToRgb:s.default.hex.rgb,addSheen:n.SheenUtil.parseSheenFromOptions(e)})}static hslToFilter(t,e){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseHsl,convertToRgb:s.default.hsl.rgb,addSheen:n.SheenUtil.parseSheenFromOptions(e)})}static keywordToFilter(t,a){return i.RgbToFilter.convert({colorString:t,validateAndParse:o.ColorParser.validateAndParseKeyword,convertToRgb:s.default.keyword.rgb,conversionErrorMessage:e.ErrorHandling.generateInputErrorMessage(r.ColorTypes.KEYWORD,t),addSheen:n.SheenUtil.parseSheenFromOptions(a)})}},m}(),r=function(){if(vt)return rt;vt=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.FilterToColor=void 0;const t=function(){if(dt)return it;dt=1;var t=it&&it.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),e=it&&it.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=it&&it.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&t(r,n,i);return e(r,n),r};Object.defineProperty(it,"__esModule",{value:!0}),it.FilterToHex=void 0;const r=y(),i=function(){if(ct)return ot;ct=1;var t=ot&&ot.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),e=ot&&ot.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=ot&&ot.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&t(r,n,i);return e(r,n),r};Object.defineProperty(ot,"__esModule",{value:!0}),ot.FilterToHexBrowser=void 0;const r=y(),i=at();class o extends i.FilterToHexShared{static cleanup(t){t.remove()}static returnInputError(t,e){const n=i.FilterToHexShared.generateInputErrorMessage(t),s=r.ErrorHandling.generateErrorResult(n);return o.cleanup(e),s}static async getImageBase64ViaSVG(t){return(await Promise.resolve().then((()=>n(ht())))).toPng(t)}static async convert(t){const{errorMessage:e,svgContainerElement:n}=i.FilterToHexShared.addSVGElementsToDOMAndValidateFilter(t);if(e)return o.returnInputError(t,n);const r=await o.getImageBase64ViaSVG(n),s=await i.FilterToHexShared.getColorViaImageDataURL(r);return o.cleanup(n),{color:s}}}return ot.FilterToHexBrowser=o,ot}();return it.FilterToHex=class{static async convert(t,e,o){try{let r;if("undefined"==typeof window){const{FilterToHexNode:e}=await Promise.resolve().then((()=>n(function(){if(ft)return gt;ft=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.FilterToHexNode=void 0;const t=y(),e=w(),n=Q(),r=P(),i=at();class o extends i.FilterToHexShared{static cleanup(t){o.IS_HEADLESS&&(null==t||t.close())}static returnError(e,n){const r=t.ErrorHandling.generateErrorResult(e);return o.cleanup(n),r}static async getImageBase64ViaSVG(t){const e=await t.screenshot({encoding:o.BASE_64_ENCODING});return`${o.ENCODED_DATA_URL_PREFIX}${e}`}static async openBrowserPage(t){const e=await t.newPage();return await e.setViewport({width:o.SVG_SIDE_LENGTH_PX,height:o.SVG_SIDE_LENGTH_PX}),e}static async addSVGAndValidateFilter(e,s){const a=await e.evaluate(i.FilterToHexShared.addSVGElementsToDOMAndValidateFilter,s,o.SVG_SIDE_LENGTH_PX);return a.errorMessage?{errorMessage:t.ErrorHandling.generateInputErrorMessage(r.ColorTypes.FILTER,s,n.ColorFormats.FILTER)}:a}static async getPuppeteerDependency(){try{return f("puppeteer")}catch(t){return{errorMessage:e.MUST_INSTALL_PUPPETEER}}}static async preparePuppeteerBrowser(){const e=await o.getPuppeteerDependency();return t.ErrorHandling.hasError(e)?e:e.launch({headless:o.IS_HEADLESS})}static async convert(e){const n=await o.preparePuppeteerBrowser();if(t.ErrorHandling.hasError(n))return o.returnError(n.errorMessage);const r=await o.openBrowserPage(n),s=await o.addSVGAndValidateFilter(r,e);if(t.ErrorHandling.hasError(s))return o.returnError(s.errorMessage,n);const a=await o.getImageBase64ViaSVG(r),u=await r.evaluate(i.FilterToHexShared.getColorViaImageDataURL,a);return o.cleanup(n),{color:u}}}return gt.FilterToHexNode=o,o.BASE_64_ENCODING="base64",o.ENCODED_DATA_URL_PREFIX=`data:image/png;${o.BASE_64_ENCODING},`,o.IS_HEADLESS=!0,o.SVG_SIDE_LENGTH_PX=2,gt}())));r=await e.convert(t)}else r=await i.FilterToHexBrowser.convert(t);return r.color&&e&&"string"==typeof r.color&&(r.color=e(r.color,o)),r}catch(t){return r.ErrorHandling.generateUnexpectedError(t)}}},it}(),e=function(){if(mt)return wt;mt=1;var t=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.HexToColor=void 0;const e=(bt||(bt=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.ColorFormatter=void 0,yt.ColorFormatter=class{static arrayToRgbString(t){return`rgb(${t[0]}, ${t[1]}, ${t[2]})`}static arrayToHslString(t){return`hsl(${t[0]}deg, ${t[1]}%, ${t[2]}%)`}}),yt),n=t(et());return wt.HexToColor=class{static convertToRgb(t,r){const i=n.default.hex.rgb(t);return"string"===(null==r?void 0:r.resultType)?e.ColorFormatter.arrayToRgbString(i):i}static convertToHsl(t,r){const i=n.default.hex.hsl(t);return"string"===(null==r?void 0:r.resultType)?e.ColorFormatter.arrayToHslString(i):i}},wt}();return rt.FilterToColor=class{static async filterToHex(e){const n=await t.FilterToHex.convert(e);return n.color&&(n.color=n.color.toUpperCase()),n}static async filterToRgb(n,r){return t.FilterToHex.convert(n,e.HexToColor.convertToRgb,r)}static async filterToHsl(n,r){return t.FilterToHex.convert(n,e.HexToColor.convertToHsl,r)}},rt}();class i{static rgbToFilter(t,e){return n.ColorToFilter.rgbToFilter(t,e)}static hexToFilter(t,e){return n.ColorToFilter.hexToFilter(t,e)}static hslToFilter(t,e){return n.ColorToFilter.hslToFilter(t,e)}static keywordToFilter(t,e){return n.ColorToFilter.keywordToFilter(t,e)}static async filterToHex(t){return r.FilterToColor.filterToHex(t)}static async filterToRgb(t,e){return r.FilterToColor.filterToRgb(t,e)}static async filterToHsl(t,e){return r.FilterToColor.filterToHsl(t,e)}}e.default=i,t.exports=i}(b,b.exports)),b.exports));const kt=n(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.sliceWidth="30px",this.minDrops=1,this.maxDrops=1,this.margin="",this.padding="",this.filter="",this.borderRadius="0px",this.transform="",this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(i(this.el,this.delayVisible),o(this.el,this.type),""!==this.filter){const t=this.el.getElementsByTagName("img")[0];t&&(t.style.filter=`${Mt.hexToFilter(s(this.filter).toHexString()).color}`)}this.showSpeakIcon&&a(this.el)}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:c(this.height,t),width:c(this.width,t),backgroundColor:c(this.bgColor,t),top:c(this.y,t),left:c(this.x,t),zIndex:this.z,display:c(`${this.visible}`,t)?"flex":"none",alignItems:"center",justifyContent:"center",margin:c(this.margin,t),padding:c(this.padding,t),transform:c(this.transform,t),borderRadius:this.borderRadius,borderImageSource:"true"===this.isSlice?`url(${u(this.src)})`:"none",borderImageSlice:"true"===this.isSlice?`${parseInt(this.sliceWidth)} fill`:"unset",borderImageRepeat:"true"===this.isSlice?"round":"unset",borderImageWidth:"true"===this.isSlice?`${this.sliceWidth}`:"unset",backgroundImage:"true"===this.isSlice?`url(${u(this.src)})`:"none"}}render(){return"true"===this.isSlice?l(h,{class:"slice",id:this.id,type:this.type,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,value:this.value,minDrops:this.minDrops,maxDrops:this.maxDrops,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry}):l(h,{id:this.id,type:this.type,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,value:this.value,minDrops:this.minDrops,maxDrops:this.maxDrops,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,"disable-speak":this.disableSpeak},l("img",{class:"lido-image",src:u(this.src),alt:"",style:this.style}))}get el(){return this}static get style(){return".lido-image{user-select:none;-webkit-user-drag:none;object-fit:contain;width:100% !important;height:100% !important;aspect-ratio:1 / 1;transform:rotate(0) !important;margin:0 !important}.slice{background-repeat:no-repeat;background-position:center;background-size:100% 100%}"}},[0,"lido-image",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],src:[1],isSlice:[1,"is-slice"],sliceWidth:[1,"slice-width"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],padding:[1],filter:[1],borderRadius:[1,"border-radius"],transform:[1],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function jt(){"undefined"!=typeof customElements&&["lido-image"].forEach((t=>{"lido-image"===t&&(customElements.get(e(t))||customElements.define(e(t),kt))}))}jt();export{kt as L,f as c,jt as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as i,H as e,k as s,i as o,m as n,a7 as r,c as a,a as h,h as l,b as u,a0 as c}from"./index.js";const d=t=>"string"==typeof t,g=()=>{let t,i;const e=new Promise(((e,s)=>{t=e,i=s}));return e.resolve=t,e.reject=i,e},p=t=>null==t?"":""+t,f=/###/g,m=t=>t&&t.indexOf("###")>-1?t.replace(f,"."):t,y=t=>!t||d(t),b=(t,i,e)=>{const s=d(i)?i.split("."):i;let o=0;for(;o<s.length-1;){if(y(t))return{};const i=m(s[o]);!t[i]&&e&&(t[i]=new e),t=Object.prototype.hasOwnProperty.call(t,i)?t[i]:{},++o}return y(t)?{}:{obj:t,k:m(s[o])}},w=(t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);if(void 0!==s||1===i.length)return void(s[o]=e);let n=i[i.length-1],r=i.slice(0,i.length-1),a=b(t,r,Object);for(;void 0===a.obj&&r.length;)n=`${r[r.length-1]}.${n}`,r=r.slice(0,r.length-1),a=b(t,r,Object),a?.obj&&void 0!==a.obj[`${a.k}.${n}`]&&(a.obj=void 0);a.obj[`${a.k}.${n}`]=e},v=(t,i)=>{const{obj:e,k:s}=b(t,i);if(e&&Object.prototype.hasOwnProperty.call(e,s))return e[s]},x=(t,i,e)=>{for(const s in i)"__proto__"!==s&&"constructor"!==s&&(s in t?d(t[s])||t[s]instanceof String||d(i[s])||i[s]instanceof String?e&&(t[s]=i[s]):x(t[s],i[s],e):t[s]=i[s]);return t},$=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const k=t=>d(t)?t.replace(/[&<>"'\/]/g,(t=>A[t])):t,S=[" ",",","?","!",";"],E=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(void 0!==i)return i;const e=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,e),this.regExpQueue.push(t),e}}(20),I=(t,i,e=".")=>{if(!t)return;if(t[i]){if(!Object.prototype.hasOwnProperty.call(t,i))return;return t[i]}const s=i.split(e);let o=t;for(let t=0;t<s.length;){if(!o||"object"!=typeof o)return;let i,n="";for(let r=t;r<s.length;++r)if(r!==t&&(n+=e),n+=s[r],i=o[n],void 0!==i){if(["string","number","boolean"].indexOf(typeof i)>-1&&r<s.length-1)continue;t+=r-t+1;break}o=i}return o},W=t=>t?.replace(/_/g,"-"),O={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,i){console?.[t]?.apply?.(console,i)}};class j{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||O,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,e,s){return s&&!this.debug?null:(d(t[0])&&(t[0]=`${e}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new j(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new j(this.logger,t)}}var L=new j;class P{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const e=this.observers[t].get(i)||0;this.observers[t].set(i,e+1)})),this}off(t,i){this.observers[t]&&(i?this.observers[t].delete(i):delete this.observers[t])}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,e])=>{for(let s=0;s<e;s++)t(...i)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([e,s])=>{for(let o=0;o<s;o++)e.apply(e,[t,...i])}))}}class M extends P{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,e,s={}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,n=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;t.indexOf(".")>-1?r=t.split("."):(r=[t,i],e&&(Array.isArray(e)?r.push(...e):d(e)&&o?r.push(...e.split(o)):r.push(e)));const a=v(this.data,r);return!a&&!i&&!e&&t.indexOf(".")>-1&&(t=r[0],i=r[1],e=r.slice(2).join(".")),!a&&n&&d(e)?I(this.data?.[t]?.[i],e,o):a}addResource(t,i,e,s,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[t,i];e&&(r=r.concat(n?e.split(n):e)),t.indexOf(".")>-1&&(r=t.split("."),s=i,i=r[1]),this.addNamespaces(i),w(this.data,r,s),o.silent||this.emit("added",t,i,e,s)}addResources(t,i,e,s={silent:!1}){for(const s in e)(d(e[s])||Array.isArray(e[s]))&&this.addResource(t,i,s,e[s],{silent:!0});s.silent||this.emit("added",t,i,e)}addResourceBundle(t,i,e,s,o,n={silent:!1,skipCopy:!1}){let r=[t,i];t.indexOf(".")>-1&&(r=t.split("."),s=e,e=i,i=r[1]),this.addNamespaces(i);let a=v(this.data,r)||{};n.skipCopy||(e=JSON.parse(JSON.stringify(e))),s?x(a,e,o):a={...a,...e},w(this.data,r,a),n.silent||this.emit("added",t,i,e)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return void 0!==this.getResource(t,i)}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find((t=>i[t]&&Object.keys(i[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,i,e,s,o){return t.forEach((t=>{i=this.processors[t]?.process(i,e,s,o)??i})),i}};const D=Symbol("i18next/PATH_KEY");function N(t,i){const{[D]:e}=t(function(){const t=[],i=Object.create(null);let e;return i.get=(s,o)=>(e?.revoke?.(),o===D?t:(t.push(o),e=Proxy.revocable(s,i),e.proxy)),Proxy.revocable(Object.create(null),i).proxy}()),s=i?.keySeparator??".",o=i?.nsSeparator??":";if(e.length>1&&o){const t=i?.ns,n=Array.isArray(t)?t:null;if(n&&n.length>1&&n.slice(1).includes(e[0]))return`${e[0]}${o}${e.slice(1).join(s)}`}return e.join(s)}const R={},T=t=>!d(t)&&"boolean"!=typeof t&&"number"!=typeof t;class K extends P{constructor(t,i={}){var e,s;super(),e=t,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{e[t]&&(s[t]=e[t])})),this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=L.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const e={...i};if(null==t)return!1;const s=this.resolve(t,e);if(void 0===s?.res)return!1;const o=T(s.res);return!1!==e.returnObjects||!o}extractFromKey(t,i){let e=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===e&&(e=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=i.ns||this.options.defaultNS||[];const n=e&&t.indexOf(e)>-1,r=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((t,i,e)=>{i=i||"",e=e||"";const s=S.filter((t=>i.indexOf(t)<0&&e.indexOf(t)<0));if(0===s.length)return!0;const o=E.getRegExp(`(${s.map((t=>"?"===t?"\\?":t)).join("|")})`);let n=!o.test(t);if(!n){const i=t.indexOf(e);i>0&&!o.test(t.substring(0,i))&&(n=!0)}return n})(t,e,s));if(n&&!r){const i=t.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:t,namespaces:d(o)?[o]:o};const n=t.split(e);(e!==s||e===s&&this.options.ns.indexOf(n[0])>-1)&&(o=n.shift()),t=n.join(s)}return{key:t,namespaces:d(o)?[o]:o}}translate(t,i,e){let s="object"==typeof i?{...i}:i;if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";"function"==typeof t&&(t=N(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?N(t,{...this.options,...s}):String(t)));const o=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(t[t.length-1],s),h=a[a.length-1];let l=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const u=s.lng||this.language,c=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return c?o?{res:`${h}${l}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${l}${r}`:o?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:r;const g=this.resolve(t,s);let p=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==s.joinArrays?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==s.count&&!d(s.count),v=K.hasDefaultValue(s),x=w?this.pluralResolver.getSuffix(u,s.count,s):"",$=s.ordinal&&w?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",A=w&&!s.ordinal&&0===s.count,k=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${x}`]||s[`defaultValue${$}`]||s.defaultValue;let S=p;b&&!p&&v&&(S=k);const E=T(S),I=Object.prototype.toString.apply(S);if(!(b&&S&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(I)<0)||d(y)&&Array.isArray(S))if(b&&d(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,e));else{let i=!1,o=!1;!this.isValidLookup(p)&&v&&(i=!0,p=k),this.isValidLookup(p)||(o=!0,p=r);const a=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,c=v&&k!==p&&this.options.updateMissing;if(o||i||c){if(this.logger.log(c?"updateKey":"missingKey",u,h,r,c?k:p),n){const t=this.resolve(r,{...s,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&&i&&i[0])for(let e=0;e<i.length;e++)t.push(i[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(s.lng||this.language):t.push(s.lng||this.language);const e=(t,i,e)=>{const o=v&&e!==p?e:a;this.options.missingKeyHandler?this.options.missingKeyHandler(t,h,i,o,c,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,h,i,o,c,s),this.emit("missingKey",t,h,i,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?t.forEach((t=>{const i=this.pluralResolver.getSuffixes(t,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&i.indexOf(`${this.options.pluralSeparator}zero`)<0&&i.push(`${this.options.pluralSeparator}zero`),i.forEach((i=>{e([t],r+i,s[`defaultValue${i}`]||k)}))})):e(t,r,k))}p=this.extendTranslation(p,t,s,g,e),o&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${h}${l}${r}`),(o||i)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${l}${r}`:r,i?p:void 0,s))}else{if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,S,{...s,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return o?(g.res=t,g.usedParams=this.getUsedParamsDetails(s),g):t}if(n){const t=Array.isArray(S),i=t?[]:{},e=t?m:f;for(const t in S)if(Object.prototype.hasOwnProperty.call(S,t)){const o=`${e}${n}${t}`;i[t]=this.translate(o,v&&!p?{...s,defaultValue:T(k)?k[t]:void 0,joinArrays:!1,ns:a}:{...s,joinArrays:!1,ns:a}),i[t]===o&&(i[t]=S[t])}p=i}}return o?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,i,e,s,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...e},e.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!e.skipInterpolation){e.interpolation&&this.interpolator.init({...e,interpolation:{...this.options.interpolation,...e.interpolation}});const n=d(t)&&(void 0!==e?.interpolation?.skipOnVariables?e.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(n){const i=t.match(this.interpolator.nestingRegexp);r=i&&i.length}let a=e.replace&&!d(e.replace)?e.replace:e;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),t=this.interpolator.interpolate(t,a,e.lng||this.language||s.usedLng,e),n){const i=t.match(this.interpolator.nestingRegexp);r<(i&&i.length)&&(e.nest=!1)}!e.lng&&s&&s.res&&(e.lng=this.language||s.usedLng),!1!==e.nest&&(t=this.interpolator.nest(t,((...t)=>o?.[0]!==t[0]||e.context?this.translate(...t,i):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null)),e)),e.interpolation&&this.interpolator.reset()}const n=e.postProcess||this.options.postProcess,r=d(n)?[n]:n;return null!=t&&r?.length&&!1!==e.applyPostProcessor&&(t=C.handle(r,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(e)},...e}:e,this)),t}resolve(t,i={}){let e,s,o,n,r;return d(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?N(t,{...this.options,...i}):t))),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,i),h=a.key;s=h;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==i.count&&!d(i.count),c=u&&!i.ordinal&&0===i.count,g=void 0!==i.context&&(d(i.context)||"number"==typeof i.context)&&""!==i.context,p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);l.forEach((t=>{this.isValidLookup(e)||(r=t,R[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(R[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((s=>{if(this.isValidLookup(e))return;n=s;const r=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(r,h,s,t,i);else{let t;u&&(t=this.pluralResolver.getSuffix(s,i.count,i));const e=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.ordinal&&0===t.indexOf(o)&&r.push(h+t.replace(o,this.options.pluralSeparator)),r.push(h+t),c&&r.push(h+e)),g){const s=`${h}${this.options.contextSeparator||"_"}${i.context}`;r.push(s),u&&(i.ordinal&&0===t.indexOf(o)&&r.push(s+t.replace(o,this.options.pluralSeparator)),r.push(s+t),c&&r.push(s+e))}}let a;for(;a=r.pop();)this.isValidLookup(e)||(o=a,e=this.getResource(s,t,a,i))})))}))})),{res:e,usedKey:s,exactUsedKey:o,usedLng:n,usedNS:r}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,i,e,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,e,s):this.resourceStore.getResource(t,i,e,s)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],e=t.replace&&!d(t.replace);let s=e?t.replace:t;if(e&&void 0!==t.count&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!e){s={...s};for(const t of i)delete s[t]}return s}static hasDefaultValue(t){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"defaultValue"===i.substring(0,12)&&void 0!==t[i])return!0;return!1}}class H{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=L.create("languageUtils")}getScriptPartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return null;const i=t.split("-");return 2===i.length?null:(i.pop(),"x"===i[i.length-1].toLowerCase()?null:this.formatLanguageCode(i.join("-")))}getLanguagePartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(d(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch(t){}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach((t=>{if(i)return;const e=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(e)||(i=e)})),!i&&this.options.supportedLngs&&t.forEach((t=>{if(i)return;const e=this.getScriptPartFromCode(t);if(this.isSupportedCode(e))return i=e;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return i=s;i=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if("function"==typeof t&&(t=t(i)),d(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let e=t[i];return e||(e=t[this.getScriptPartFromCode(i)]),e||(e=t[this.formatLanguageCode(i)]),e||(e=t[this.getLanguagePartFromCode(i)]),e||(e=t.default),e||[]}toResolveHierarchy(t,i){const e=this.getFallbackCodes((!1===i?[]:i)||this.options.fallbackLng||[],t),s=[],o=t=>{t&&(this.isSupportedCode(t)?s.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return d(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):d(t)&&o(this.formatLanguageCode(t)),e.forEach((t=>{s.indexOf(t)<0&&o(this.formatLanguageCode(t))})),s}}const z={zero:0,one:1,two:2,few:3,many:4,other:5},B={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=L.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const e=W("dev"===t?"en":t),s=i.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:e,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(e,{type:s})}catch(e){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),B;if(!t.match(/-|_/))return B;const s=this.languageUtils.getLanguagePartFromCode(t);n=this.getRule(s,i)}return this.pluralRulesCache[o]=n,n}needsPlural(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,e={}){return this.getSuffixes(t,e).map((t=>`${i}${t}`))}getSuffixes(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?e.resolvedOptions().pluralCategories.sort(((t,i)=>z[t]-z[i])).map((t=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,i,e={}){const s=this.getRule(t,e);return s?`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,e))}}const q=(t,i,e,s=".",o=!0)=>{let n=((t,i,e)=>{const s=v(t,e);return void 0!==s?s:v(i,e)})(t,i,e);return!n&&o&&d(e)&&(n=I(t,e,s),void 0===n&&(n=I(i,e,s))),n},V=t=>t.replace(/\$/g,"$$$$");class _{constructor(t={}){this.logger=L.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:e,useRawValueToEscape:s,prefix:o,prefixEscaped:n,suffix:r,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:c,nestingPrefixEscaped:d,nestingSuffix:g,nestingSuffixEscaped:p,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=void 0!==i?i:k,this.escapeValue=void 0===e||e,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?$(o):n||"{{",this.suffix=r?$(r):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=c?$(c):d||$("$t("),this.nestingSuffix=g?$(g):p||$(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,i,e,s){let o,n,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=t=>{if(t.indexOf(this.formatSeparator)<0){const o=q(i,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,e,{...s,...i,interpolationkey:t}):o}const o=t.split(this.formatSeparator),n=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(q(i,a,n,this.options.keySeparator,this.options.ignoreJSONStructure),r,e,{...s,...i,interpolationkey:n})};this.resetRegExp();const l=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>V(this.escapeValue?this.escape(t):t)}].forEach((i=>{for(r=0;o=i.regex.exec(t);){const e=o[1].trim();if(n=h(e),void 0===n)if("function"==typeof l){const i=l(t,o,s);n=d(i)?i:""}else if(s&&Object.prototype.hasOwnProperty.call(s,e))n="";else{if(u){n=o[0];continue}this.logger.warn(`missed to pass in variable ${e} for interpolating ${t}`),n=""}else d(n)||this.useRawValueToEscape||(n=p(n));const a=i.safeValue(n);if(t=t.replace(o[0],a),u?(i.regex.lastIndex+=n.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),t}nest(t,i,e={}){let s,o,n;const r=(t,i)=>{const e=this.nestingOptionsSeparator;if(t.indexOf(e)<0)return t;const s=t.split(new RegExp(`${$(e)}[ ]*{`));let o=`{${s[1]}`;t=s[0],o=this.interpolate(o,n);const r=o.match(/'/g),a=o.match(/"/g);((r?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),i&&(n={...i,...n})}catch(i){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,i),`${t}${e}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,t};for(;s=this.nestingRegexp.exec(t);){let a=[];n={...e},n=n.replace&&!d(n.replace)?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(-1!==h&&(a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),s[1]=s[1].slice(0,h)),o=i(r.call(this,s[1].trim(),n),n),o&&s[0]===t&&!d(o))return o;d(o)||(o=p(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce(((t,i)=>this.format(t,i,e.lng,{...e,interpolationkey:s[1].trim()})),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const U=t=>{const i={};return(e,s,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const r=s+JSON.stringify(n);let a=i[r];return a||(a=t(W(s),o),i[r]=a),a(e)}},J=t=>(i,e,s)=>t(W(e),s)(i);class Y{constructor(t={}){this.logger=L.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const e=i.cacheInBuiltFormats?U:J;this.formats={number:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i});return t=>e.format(t)})),currency:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i,style:"currency"});return t=>e.format(t)})),datetime:e(((t,i)=>{const e=new Intl.DateTimeFormat(t,{...i});return t=>e.format(t)})),relativetime:e(((t,i)=>{const e=new Intl.RelativeTimeFormat(t,{...i});return t=>e.format(t,i.range||"day")})),list:e(((t,i)=>{const e=new Intl.ListFormat(t,{...i});return t=>e.format(t)}))}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=U(i)}format(t,i,e,s={}){const o=i.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((t=>t.indexOf(")")>-1))){const t=o.findIndex((t=>t.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}return o.reduce(((t,i)=>{const{formatName:o,formatOptions:n}=(t=>{let i=t.toLowerCase().trim();const e={};if(t.indexOf("(")>-1){const s=t.split("(");i=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===i&&o.indexOf(":")<0?e.currency||(e.currency=o.trim()):"relativetime"===i&&o.indexOf(":")<0?e.range||(e.range=o.trim()):o.split(";").forEach((t=>{if(t){const[i,...s]=t.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),n=i.trim();e[n]||(e[n]=o),"false"===o&&(e[n]=!1),"true"===o&&(e[n]=!0),isNaN(o)||(e[n]=parseInt(o,10))}}))}return{formatName:i,formatOptions:e}})(i);if(this.formats[o]){let i=t;try{const r=s?.formatParams?.[s.interpolationkey]||{};i=this.formats[o](t,r.locale||r.lng||s.locale||s.lng||e,{...n,...s,...r})}catch(t){this.logger.warn(t)}return i}return this.logger.warn(`there was no format function for ${o}`),t}),t)}}class G extends P{constructor(t,i,e,s={}){super(),this.backend=t,this.store=i,this.services=e,this.languageUtils=e.languageUtils,this.options=s,this.logger=L.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(e,s.backend,s)}queueLoad(t,i,e,s){const o={},n={},r={},a={};return t.forEach((t=>{let s=!0;i.forEach((i=>{const r=`${t}|${i}`;!e.reload&&this.store.hasResourceBundle(t,i)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===n[r]&&(n[r]=!0):(this.state[r]=1,s=!1,void 0===n[r]&&(n[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[i]&&(a[i]=!0)))})),s||(r[t]=!0)})),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(t,i,e){const s=t.split("|"),o=s[0],n=s[1];i&&this.emit("failedLoading",o,n,i),!i&&e&&this.store.addResourceBundle(o,n,e,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&e&&(this.state[t]=0);const r={};this.queue.forEach((e=>{((t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);s[o]=s[o]||[],s[o].push(e)})(e.loaded,[o],n),((t,i)=>{void 0!==t.pending[i]&&(delete t.pending[i],t.pendingCount--)})(e,t),i&&e.errors.push(i),0!==e.pendingCount||e.done||(Object.keys(e.loaded).forEach((t=>{r[t]||(r[t]={});const i=e.loaded[t];i.length&&i.forEach((i=>{void 0===r[t][i]&&(r[t][i]=!0)}))})),e.done=!0,e.errors.length?e.callback(e.errors):e.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((t=>!t.done))}read(t,i,e,s=0,o=this.retryTimeout,n){if(!t.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:i,fcName:e,tried:s,wait:o,callback:n});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}r&&a&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,t,i,e,s+1,2*o,n)}),o):n(r,a)},a=this.backend[e].bind(this.backend);if(2!==a.length)return a(t,i,r);try{const e=a(t,i);e&&"function"==typeof e.then?e.then((t=>r(null,t))).catch(r):r(null,e)}catch(t){r(t)}}prepareLoading(t,i,e={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();d(t)&&(t=this.languageUtils.toResolveHierarchy(t)),d(i)&&(i=[i]);const o=this.queueLoad(t,i,e,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,i,e){this.prepareLoading(t,i,{},e)}reload(t,i,e){this.prepareLoading(t,i,{reload:!0},e)}loadOne(t,i=""){const e=t.split("|"),s=e[0],o=e[1];this.read(s,o,"read",void 0,void 0,((e,n)=>{e&&this.logger.warn(`${i}loading namespace ${o} for language ${s} failed`,e),!e&&n&&this.logger.log(`${i}loaded namespace ${o} for language ${s}`,n),this.loaded(t,e,n)}))}saveMissing(t,i,e,s,o,n={},r=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(i)){if(null!=e&&""!==e){if(this.backend?.create){const a={...n,isUpdate:o},h=this.backend.create.bind(this.backend);if(h.length<6)try{let o;o=5===h.length?h(t,i,e,s,a):h(t,i,e,s),o&&"function"==typeof o.then?o.then((t=>r(null,t))).catch(r):r(null,o)}catch(t){r(t)}else h(t,i,e,s,r,a)}t&&t[0]&&this.store.addResource(t[0],i,e,s)}}else this.logger.warn(`did not save key "${e}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let i={};if("object"==typeof t[1]&&(i=t[1]),d(t[1])&&(i.defaultValue=t[1]),d(t[2])&&(i.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{i[t]=e[t]}))}return i},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Z=t=>(d(t.ns)&&(t.ns=[t.ns]),d(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),d(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),X=()=>{},tt="__i18next_supportNoticeShown";class it extends P{constructor(t={},i){var e;if(super(),this.options=Z(t),this.services={},this.logger=L,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout((()=>{this.init(t,i)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(d(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const e=Q();var s;this.options={...e,...this.options,...Z(t)},this.options.interpolation={...e.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=e.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(s=this,s?.modules?.backend?.name?.indexOf("Locize")>0||s?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||s?.options?.backend?.backends&&s.options.backend.backends.some((t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0))||s?.options?.backend?.projectId||s?.options?.backend?.backendOptions&&s.options.backend.backendOptions.some((t=>t?.projectId)))||"undefined"!=typeof globalThis&&globalThis[tt]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[tt]=!0));const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;L.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:Y;const i=new H(this.options);this.store=new M(this.options.resources,this.options);const s=this.services;s.logger=L,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new F(i,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format||(s.formatter=o(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new _(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new G(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=X),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...i)=>this.store[t](...i)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...i)=>(this.store[t](...i),this)}));const n=g(),r=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),n.resolve(e),i(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),n}loadResources(t,i=X){let e=i;const s=d(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],i=i=>{i&&"cimode"!==i&&this.services.languageUtils.toResolveHierarchy(i).forEach((i=>{"cimode"!==i&&t.indexOf(i)<0&&t.push(i)}))};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload?.forEach?.((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,i,e){const s=g();return"function"==typeof t&&(e=t,t=void 0),"function"==typeof i&&(e=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),e||(e=X),this.services.backendConnector.reload(t,i,(t=>{s.resolve(),e(t)})),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const e=g();this.emit("languageChanging",t);const s=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(o,n)=>{n?this.isLanguageChangingTo===t&&(s(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,e.resolve(((...t)=>this.t(...t))),i&&i(o,((...t)=>this.t(...t)))},n=i=>{t||i||!this.services.languageDetector||(i=[]);const e=d(i)?i:i&&i[0],n=this.store.hasLanguageSomeTranslations(e)?e:this.services.languageUtils.getBestMatchFromCodes(d(i)?[i]:i);n&&(this.language||s(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(n):this.services.languageDetector.detect(n):n(t):n(this.services.languageDetector.detect()),e}getFixedT(t,i,e){const s=(t,i,...o)=>{let n;n="object"!=typeof i?this.options.overloadTranslationOptionHandler([t,i].concat(o)):{...i},n.lng=n.lng||s.lng,n.lngs=n.lngs||s.lngs,n.ns=n.ns||s.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||e||s.keyPrefix);const r={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=N(n.keyPrefix,r));const a=this.options.keySeparator||".";let h;return n.keyPrefix&&Array.isArray(t)?h=t.map((t=>("function"==typeof t&&(t=N(t,r)),`${n.keyPrefix}${a}${t}`))):("function"==typeof t&&(t=N(t,r)),h=n.keyPrefix?`${n.keyPrefix}${a}${t}`:t),this.t(h,n)};return d(t)?s.lng=t:s.lngs=t,s.ns=i,s.keyPrefix=e,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const e=i.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===e.toLowerCase())return!0;const n=(t,i)=>{const e=this.services.backendConnector.state[`${t}|${i}`];return-1===e||0===e||2===e};if(i.precheck){const t=i.precheck(this,n);if(void 0!==t)return t}return!(!this.hasResourceBundle(e,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(e,t)||s&&!n(o,t)))}loadNamespaces(t,i){const e=g();return this.options.ns?(d(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}loadLanguages(t,i){const e=g();d(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=s.concat(o),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const t=i.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const i=this.services?.languageUtils||new H(Q());return t.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const e=new it(t,i);return e.createInstance=it.createInstance,e}cloneInstance(t={},i=X){const e=t.forkResourceStore;e&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new it(s);if(void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((t=>{o[t]=this[t]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},e){const t=Object.keys(this.store.data).reduce(((t,i)=>(t[i]={...this.store.data[i]},t[i]=Object.keys(t[i]).reduce(((e,s)=>(e[s]={...t[i][s]},e)),t[i]),t)),{});o.store=new M(t,s),o.services.resourceStore=o.store}if(t.interpolation){const i={...Q().interpolation,...this.options.interpolation,...t.interpolation},e={...s,interpolation:i};o.services.interpolator=new _(e)}return o.translator=new K(o.services,s),o.translator.on("*",((t,...i)=>{o.emit(t,...i)})),o.init(s,i),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const et=it.createInstance(),{slice:st,forEach:ot}=[],nt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rt={create(t,i,e,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};e&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*e*1e3)),s&&(o.domain=s),document.cookie=function(t,i){const e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${t}=${encodeURIComponent(i)}`;if(e.maxAge>0){const t=e.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(t)}`}if(e.domain){if(!nt.test(e.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${e.domain}`}if(e.path){if(!nt.test(e.path))throw new TypeError("option path is invalid");s+=`; Path=${e.path}`}if(e.expires){if("function"!=typeof e.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${e.expires.toUTCString()}`}if(e.httpOnly&&(s+="; HttpOnly"),e.secure&&(s+="; Secure"),e.sameSite)switch("string"==typeof e.sameSite?e.sameSite.toLowerCase():e.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return e.partitioned&&(s+="; Partitioned"),s}(t,i,o)},read(t){const i=`${t}=`,e=document.cookie.split(";");for(let t=0;t<e.length;t++){let s=e[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return null},remove(t,i){this.create(t,"",-1,i)}};var at={name:"cookie",lookup(t){let{lookupCookie:i}=t;if(i&&"undefined"!=typeof document)return rt.read(i)||void 0},cacheUserLanguage(t,i){let{lookupCookie:e,cookieMinutes:s,cookieDomain:o,cookieOptions:n}=i;e&&"undefined"!=typeof document&&rt.create(e,t,s,o,n)}},ht={name:"querystring",lookup(t){let i,{lookupQuerystring:e}=t;if("undefined"!=typeof window){let{search:t}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(t=window.location.hash.substring(window.location.hash.indexOf("?")));const s=t.substring(1).split("&");for(let t=0;t<s.length;t++){const o=s[t].indexOf("=");o>0&&s[t].substring(0,o)===e&&(i=s[t].substring(o+1))}}return i}},lt={name:"hash",lookup(t){let i,{lookupHash:e,lookupFromHashIndex:s}=t;if("undefined"!=typeof window){const{hash:t}=window.location;if(t&&t.length>2){const o=t.substring(1);if(e){const t=o.split("&");for(let s=0;s<t.length;s++){const o=t[s].indexOf("=");o>0&&t[s].substring(0,o)===e&&(i=t[s].substring(o+1))}}if(i)return i;if(!i&&s>-1){const i=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return;const e="number"==typeof s?s:0;return i[e]?.replace("/","")}}}return i}};let ut=null;const ct=()=>{if(null!==ut)return ut;try{if(ut="undefined"!=typeof window&&null!==window.localStorage,!ut)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ut=!1}return ut};var dt={name:"localStorage",lookup(t){let{lookupLocalStorage:i}=t;if(i&&ct())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupLocalStorage:e}=i;e&&ct()&&window.localStorage.setItem(e,t)}};let gt=null;const pt=()=>{if(null!==gt)return gt;try{if(gt="undefined"!=typeof window&&null!==window.sessionStorage,!gt)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){gt=!1}return gt};var ft={name:"sessionStorage",lookup(t){let{lookupSessionStorage:i}=t;if(i&&pt())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupSessionStorage:e}=i;e&&pt()&&window.sessionStorage.setItem(e,t)}},mt={name:"navigator",lookup(t){const i=[];if("undefined"!=typeof navigator){const{languages:t,userLanguage:e,language:s}=navigator;if(t)for(let e=0;e<t.length;e++)i.push(t[e]);e&&i.push(e),s&&i.push(s)}return i.length>0?i:void 0}},yt={name:"htmlTag",lookup(t){let i,{htmlTag:e}=t;const s=e||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(i=s.getAttribute("lang")),i}},bt={name:"path",lookup(t){let{lookupFromPathIndex:i}=t;if("undefined"==typeof window)return;const e=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return;const s="number"==typeof i?i:0;return e[s]?.replace("/","")}},wt={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:i}=t;const e="number"==typeof i?i+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[e]}};let vt=!1;try{vt=!0}catch(t){}const xt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vt||xt.splice(1,1);class $t{constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,i)}init(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(t){return ot.call(st.call(arguments,1),(i=>{if(i)for(const e in i)void 0===t[e]&&(t[e]=i[e])})),t}(t,this.options||{},{order:xt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=t=>t.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(at),this.addDetector(ht),this.addDetector(dt),this.addDetector(ft),this.addDetector(mt),this.addDetector(yt),this.addDetector(bt),this.addDetector(wt),this.addDetector(lt)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((i=>{if(this.detectors[i]){let e=this.detectors[i].lookup(this.options);e&&"string"==typeof e&&(e=[e]),e&&(t=t.concat(e))}})),t=t.filter((t=>{return null!=t&&!("string"==typeof(i=t)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(i))));var i})).map((t=>this.options.convertDetectedLanguage(t))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach((i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(t,this.options)})))}}$t.type="languageDetector";et.use($t).init({resources:{en:{translation:{" balloon":"Balloon"," box":"Box"," egg":"Egg"," flower":"Flower"," heart":"Heart"," house":"House"," lamp":"Lamp"," moon":"Moon"," rectangle":"Rectangle"," star":"Star"," watermelon":"Watermelon"," trophy":"Trophy"," dog":"Dog"," fish":"Fish"," bird":"Bird"," arrow":"Arrow","Do you want to exit? button":"Do you want to exit?","Exit button":"Exit","Continue playing button":"Continue playing","Drop the elements to match the given symbol order":"Drop the elements to match the given symbol order","Fill in the blanks":"Fill in the blanks",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageEngAudio",substractionWithoutImage:"substractionWithoutImageEngAudio",numberIdentificationWithImage:"numberIdentificationWithImageEngAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageEngAudio",wordBuildingWithImage:"wordBuildingWithImageEngAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageEngAudio",pictureClues:"pictureCluesEngAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesEngAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageEngAudio",sentenceMatch:"sentenceMatchEngAudio",imageMatch:"imageMatchEngAudio",palStoryTale:"palStoryTaleEngAudio",palEgmaPatternMatching:"palEgmaPatternMatchingEngAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropEngAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickEngAudio",palEgraOddOneOut:"palEgraOddOneOutEngAudio",palEgraArrangePictures:"palEgraArrangePicturesEngAudio",palEgraBuildWord:"palEgraBuildWordEngAudio",palEgraWordFormation:"palEgraWordFormationEngAudio",palInventedSpelling:"palInventedSpellingEngAudio",palLetterIdentification:"palLetterIdentificationEngAudio",palStoryMaking:"palStoryMakingEngAudio",palegmasumtogether:"palegmasumtogetherEngAudio",palegmamultioption:"palegmamultioptionEngAudio",palegraoptionaudio:"palegraoptionaudioEngAudio",palegrawordmatch:"palegrawordmatchEngAudio",palegramcqimages:"palegramcqimagesEngAudio"}}},fr:{translation:{"Do you want to exit? button":"Voulez-vous quitter?","Exit button":"Quitter","Continue playing button":"Continuer à jouer","Drop the elements to match the given symbol order":"Déposez les éléments pour correspondre au symbole donné","Fill in the blanks":"Remplissez les blancs",instruction:{dragAndDrop:"Faites glisser les objets vers le bon emplacement.",mcq:"Choisissez la bonne réponse parmi les options proposées.",tracing:"Tracez soigneusement la forme en suivant la ligne.",flashcards:"Regardez les cartes mémoire pour renforcer l’apprentissage."}}},hi:{translation:{" balloon":"गुब्बारा"," box":"डिब्बा"," egg":"अंडा"," flower":"फूल"," heart":"दिल"," house":"घर"," lamp":"दीपक"," moon":"चंद्रमा"," rectangle":"आयत"," star":"तारा"," watermelon":"तरबूज"," trophy":"ट्रॉफी"," dog":"कुत्ता"," fish":"मछली"," bird":"चिड़िया"," arrow":"तीर","Do you want to exit? button":"क्या आप बाहर निकलना चाहते हैं?","Exit button":"बाहर निकलें","Continue playing button":"खेलना जारी रखें","Drop the elements to match the given symbol order":"दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें","Fill in the blanks":"रिक्त स्थान भरें",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageHiAudio",substractionWithoutImage:"substractionWithoutImageHiAudio",numberIdentificationWithImage:"numberIdentificationWithImageHiAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageHiAudio",wordBuildingWithImage:"wordBuildingWithImageHiAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageHiAudio",pictureClues:"pictureCluesHiAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesHiAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageHiAudio",sentenceMatch:"sentenceMatchHiAudio",imageMatch:"imageMatchHiAudio",palStoryTale:"palStoryTaleHiAudio",palEgmaPatternMatching:"palEgmaPatternMatchingHiAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropHiAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickHiAudio",palEgraOddOneOut:"palEgraOddOneOutHiAudio",palEgraArrangePictures:"palEgraArrangePicturesHiAudio",palEgraBuildWord:"palEgraBuildWordHiAudio",palEgraWordFormation:"palEgraWordFormationHiAudio",palInventedSpelling:"palInventedSpellingHiAudio",palLetterIdentification:"palLetterIdentificationHiAudio",palStoryMaking:"palStoryMakingHiAudio",palegmasumtogether:"palegmasumtogetherHiAudio",palegmamultioption:"palegmamultioptionHiAudio",palegraoptionaudio:"palegraoptionaudioHiAudio",palegrawordmatch:"palegrawordmatchHiAudio",palegramcqimages:"palegramcqimagesHiAudio"}}},kn:{translation:{" balloon":"ಪುಗ್ಗ"," box":"ಡಬ್ಬ"," egg":"ಮೊಟ್ಟೆ"," flower":"ಹೂವು"," heart":"ಹೃದಯ"," house":"ಮನೆ"," lamp":"ದೀಪ"," moon":"ಚಂದ್ರ"," rectangle":"ಆಯತ"," star":"ನಕ್ಷತ್ರ"," watermelon":"ಕಲ್ಲಂಗಡಿ"," trophy":"ಟ್ರೋಫಿ"," dog":"ನಾಯಿ"," fish":"ಮೀನು"," bird":"ಹಕ್ಕಿ"," arrow":"ಬಾಣ","Do you want to exit? button":"ನೀವು ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?","Exit button":"ನಿರ್ಗಮಿಸು","Continue playing button":"ಆಟವನ್ನು ಮುಂದುವರಿಸಿ","Drop the elements to match the given symbol order":"ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageKaAudio",substractionWithoutImage:"substractionWithoutImageKaAudio",numberIdentificationWithImage:"numberIdentificationWithImageKaAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageKaAudio",wordBuildingWithImage:"wordBuildingWithImageKaAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageKaAudio",pictureClues:"pictureCluesKaAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesKaAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageKaAudio",sentenceMatch:"sentenceMatchKaAudio",imageMatch:"imageMatchKaAudio",palStoryTale:"palStoryTaleKaAudio",palEgmaPatternMatching:"palEgmaPatternMatchingKaAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropKaAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickKaAudio",palEgraOddOneOut:"palEgraOddOneOutKaAudio",palEgraArrangePictures:"palEgraArrangePicturesKaAudio",palEgraBuildWord:"palEgraBuildWordKaAudio",palEgraWordFormation:"palEgraWordFormationKaAudio",palInventedSpelling:"palInventedSpellingKaAudio",palLetterIdentification:"palLetterIdentificationKaAudio",palStoryMaking:"palStoryMakingKaAudio",palegmasumtogether:"palegmasumtogetherKaAudio",palegmamultioption:"palegmamultioptionKaAudio",palegraoptionaudio:"palegraoptionaudioKaAudio",palegrawordmatch:"palegrawordmatchKaAudio",palegramcqimages:"palegramcqimagesKaAudio"}}},te:{translation:{"Do you want to exit? button":"మీరు బయటకు వెళ్లాలనుకుంటున్నారా?","Exit button":"బయటకు వెళ్ళు","Continue playing button":"ఆటను కొనసాగించు","Drop the elements to match the given symbol order":"ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయಂడಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ"}},pt:{translation:{"Do you want to exit? button":"Você deseja sair?","Exit button":"Sair","Continue playing button":"Continuar jogando","Drop the elements to match the given symbol order":"Solte os elementos para corresponder à ordem dos símbolos fornecida","Fill in the blanks":"Preencha os espaços em branco"}},mr:{translation:{"Do you want to exit? button":"तुम्हाला बाहेर पडायचे आहे का?","Exit button":"बाहेर पडा","Continue playing button":"खेळ सुरू ठेवा",instruction:{dragAndDrop:"वस्तू योग्य ठिकाणी ओढून आणि सोडून जुळवा.",mcq:"दिलेल्या पर्यायांमधून योग्य उत्तर निवडा.",tracing:"रेषेचा काळजीपूर्वक मागोवा घेत आकृती काढा.",flashcards:"तुमचे शिक्षण मजबूत करण्यासाठी फ्लॅशकार्ड्स पाहा."}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},detection:{order:["querystring","localStorage","navigator","htmlTag"],caches:["localStorage"]}});const At=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.requiredDrops="",this.string="",this.fontFamily="",this.fontSize="20px",this.fontColor="",this.highlightWhileSpeaking=!1,this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.move="false",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.borderImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.minDrops=1,this.maxDrops=1,this.onEntry="",this.margin="",this.padding="",this.borderRadius="0px",this.spanType="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(s(this.el,this.delayVisible),o(this.el,this.type),"words"!==this.spanType&&"letters"!==this.spanType||this.addSpanToText(),this.showSpeakIcon&&n(this.el),!this.audio||""===this.audio.trim()){const t=()=>{const t=this.resolveAutoAudio();t&&(this.audio=t)};window.__LIDO_COMMON_AUDIO_PATH__?t():window.addEventListener(r,t,{once:!0})}}resolveAutoAudio(){const t=window[c];return t&&this.string?`${t}/${this.string}.mp3`:null}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=this.borderImage?a(this.borderImage):"",i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:h(this.height,i),width:h(this.width,i),backgroundColor:h(this.bgColor,i),top:h(this.y,i),left:h(this.x,i),zIndex:this.z,fontSize:h(this.fontSize,i),fontFamily:this.fontFamily,color:h(this.fontColor,i),display:"true"===h(`${this.visible}`,i)?"flex":"none",borderImage:`url(${t})`,borderImageSlice:t?"0 fill":"",margin:h(this.margin,i),padding:h(this.padding,i),borderRadius:h(this.borderRadius,i)}}async addSpanToText(){const t=this.el.querySelector(".lido-text-content");if(!t)return;const i=t.textContent||"";t.innerHTML="","letters"===this.spanType&&i.split("").forEach((i=>{if(""===i.trim())return;const e=document.createElement("span");e.textContent=i,e.className="text-letters",t.appendChild(e)})),"words"===this.spanType&&i.split(" ").forEach((i=>{const e=document.createElement("span");e.textContent=i,e.className="text-words",t.appendChild(e)}))}render(){const t=et.t(this.string).replace(/_phonics?/gi,"");return l(u,{key:"4bffbc9cb9963f3b478d9e95a13ef70e83ebf69f",class:"lido-text",value:this.value,"required-drops":this.requiredDrops,type:this.type,"tab-index":this.tabIndex,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,minDrops:this.minDrops,maxDrops:this.maxDrops,id:this.id,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,move:this.move,"span-type":this.spanType,"disable-speak":`${this.disableSpeak}`},""!==this.spanType?l("div",{class:"lido-text-content"}," ",t):t)}get el(){return this}static get style(){return".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}"}},[0,"lido-text",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],requiredDrops:[1,"required-drops"],string:[1],fontFamily:[1,"font-family"],fontSize:[1,"font-size"],fontColor:[1,"font-color"],highlightWhileSpeaking:[4,"highlight-while-speaking"],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],move:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],borderImage:[1,"border-image"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],onEntry:[1,"on-entry"],margin:[1],padding:[1],borderRadius:[1,"border-radius"],spanType:[1,"span-type"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function kt(){"undefined"!=typeof customElements&&["lido-text"].forEach((i=>{"lido-text"===i&&(customElements.get(t(i))||customElements.define(t(i),At))}))}kt();export{At as L,kt as d,et as i}
|