From 4eb98fab96a8950ba5c2c18bd3515916f793fe86 Mon Sep 17 00:00:00 2001 From: harriplappalainen Date: Tue, 19 Sep 2023 09:34:42 +0300 Subject: [PATCH] Demos for mobile menu --- docs/mobile-menu-demo/asset-manifest.json | 25 + docs/mobile-menu-demo/favicon.ico | Bin 0 -> 3870 bytes docs/mobile-menu-demo/index.html | 1 + docs/mobile-menu-demo/logo192.png | Bin 0 -> 5347 bytes docs/mobile-menu-demo/logo512.png | Bin 0 -> 9664 bytes docs/mobile-menu-demo/manifest.json | 25 + docs/mobile-menu-demo/robots.txt | 3 + .../static/css/2.4a6229c5.chunk.css | 2 + .../static/css/2.4a6229c5.chunk.css.map | 1 + .../static/css/main.d6b87222.chunk.css | 2 + .../static/css/main.d6b87222.chunk.css.map | 1 + .../static/js/2.527210a5.chunk.js | 3 + .../static/js/2.527210a5.chunk.js.LICENSE.txt | 61 + .../static/js/2.527210a5.chunk.js.map | 1 + .../static/js/3.a4a99f27.chunk.js | 2 + .../static/js/3.a4a99f27.chunk.js.map | 1 + .../static/js/main.c9080b05.chunk.js | 2 + .../static/js/main.c9080b05.chunk.js.map | 1 + .../static/js/runtime-main.7888aa73.js | 2 + .../static/js/runtime-main.7888aa73.js.map | 1 + .../0eecdb26e72fcd7501c2.woff | Bin 0 -> 51164 bytes .../106.7554f6f3.iframe.bundle.js | 1 + .../20d494430c87e15e194932b729d48270.woff | Bin 0 -> 54396 bytes .../252.2cda80e0.iframe.bundle.js | 1 + .../2641f0493c9aef319003.woff | Bin 0 -> 52924 bytes ...344.b7fc0ab1700ca38c81e0.manager.bundle.js | 1 + .../375.b96cf8e1.iframe.bundle.js | 2 + .../375.b96cf8e1.iframe.bundle.js.LICENSE.txt | 8 + ...429.ec6a4122674a4b4c7e0c.manager.bundle.js | 1 + .../499.b7e9bee5.iframe.bundle.js | 7 + .../499.b7e9bee5.iframe.bundle.js.LICENSE.txt | 114 + .../499.b7e9bee5.iframe.bundle.js.map | 1 + .../533af26cf28d7660f24c2884d3c27eac.woff | Bin 0 -> 52216 bytes .../565d73a693abe0776c801607ac28f0bf.woff | Bin 0 -> 48992 bytes .../583.22346854.iframe.bundle.js | 2 + .../583.22346854.iframe.bundle.js.LICENSE.txt | 12 + .../593.2d37c465.iframe.bundle.js | 2 + .../593.2d37c465.iframe.bundle.js.LICENSE.txt | 31 + .../5bb29e3b7b1d3ef30121229bbe67c3e1.woff | Bin 0 -> 50968 bytes .../60.792d33441922af562cb4.manager.bundle.js | 2 + ...1922af562cb4.manager.bundle.js.LICENSE.txt | 12 + .../62a1781d8b396fbb025b0552cf6304d2.woff | Bin 0 -> 52092 bytes ...665.339fbbc6ab1f84f8196a.manager.bundle.js | 2 + ...ab1f84f8196a.manager.bundle.js.LICENSE.txt | 8 + .../672.8c4f50dd.iframe.bundle.js | 1 + ...709.c0017fafe045dff1d0d9.manager.bundle.js | 2 + ...e045dff1d0d9.manager.bundle.js.LICENSE.txt | 94 + ...735.925e538b960f4871ecc5.manager.bundle.js | 1 + .../7c46f288e8133b87e6b12b45dac71865.woff | Bin 0 -> 51164 bytes ...825.fefd678a530e162e436a.manager.bundle.js | 2 + ...530e162e436a.manager.bundle.js.LICENSE.txt | 31 + .../8287fd935a77dc149fbf.woff | Bin 0 -> 52216 bytes .../838.4d16910a.iframe.bundle.js | 1 + .../892.41f22c4f.iframe.bundle.js | 2 + .../892.41f22c4f.iframe.bundle.js.LICENSE.txt | 11 + ...950.beb339a4aa9acc448016.manager.bundle.js | 1 + .../a50a1bd245ce63abcc0d1da80ff790d2.woff | Bin 0 -> 50396 bytes .../ac06baf0acb35bb93c0b.png | Bin 0 -> 44826 bytes .../be9a994463db18c52f8b.woff | Bin 0 -> 52092 bytes .../df29a4d17d02b8fe5c30.woff | Bin 0 -> 48992 bytes .../e62dc97e83a385e4d8cdc939cf1e4213.woff | Bin 0 -> 52924 bytes .../eb2614cfc5b332b75292.jpg | Bin 0 -> 419294 bytes .../ebf10695325d2deb3907.woff | Bin 0 -> 50968 bytes .../ee5162ffaea474534ef2.woff | Bin 0 -> 50396 bytes .../ef0d93a98aa30b9c3cef.woff | Bin 0 -> 54396 bytes .../f3b374ad3ff135c4f79b.png | Bin 0 -> 13864 bytes docs/mobile-menu-react/favicon.ico | Bin 0 -> 32988 bytes docs/mobile-menu-react/iframe.html | 353 +++ docs/mobile-menu-react/index.html | 59 + ...ain.4ef22571d9308a1e496e.manager.bundle.js | 1 + .../main.cc630355.iframe.bundle.js | 1 + ...ain.eb7bdd061a334ac505d0.manager.bundle.js | 1 + .../runtime~main.f229f1be.iframe.bundle.js | 1 + .../static/css/main.283631ca.css | 2227 +++++++++++++++++ .../static/css/main.283631ca.css.map | 1 + 75 files changed, 3131 insertions(+) create mode 100644 docs/mobile-menu-demo/asset-manifest.json create mode 100644 docs/mobile-menu-demo/favicon.ico create mode 100644 docs/mobile-menu-demo/index.html create mode 100644 docs/mobile-menu-demo/logo192.png create mode 100644 docs/mobile-menu-demo/logo512.png create mode 100644 docs/mobile-menu-demo/manifest.json create mode 100644 docs/mobile-menu-demo/robots.txt create mode 100644 docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css create mode 100644 docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css.map create mode 100644 docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css create mode 100644 docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css.map create mode 100644 docs/mobile-menu-demo/static/js/2.527210a5.chunk.js create mode 100644 docs/mobile-menu-demo/static/js/2.527210a5.chunk.js.LICENSE.txt create mode 100644 docs/mobile-menu-demo/static/js/2.527210a5.chunk.js.map create mode 100644 docs/mobile-menu-demo/static/js/3.a4a99f27.chunk.js create mode 100644 docs/mobile-menu-demo/static/js/3.a4a99f27.chunk.js.map create mode 100644 docs/mobile-menu-demo/static/js/main.c9080b05.chunk.js create mode 100644 docs/mobile-menu-demo/static/js/main.c9080b05.chunk.js.map create mode 100644 docs/mobile-menu-demo/static/js/runtime-main.7888aa73.js create mode 100644 docs/mobile-menu-demo/static/js/runtime-main.7888aa73.js.map create mode 100644 docs/mobile-menu-react/0eecdb26e72fcd7501c2.woff create mode 100644 docs/mobile-menu-react/106.7554f6f3.iframe.bundle.js create mode 100644 docs/mobile-menu-react/20d494430c87e15e194932b729d48270.woff create mode 100644 docs/mobile-menu-react/252.2cda80e0.iframe.bundle.js create mode 100644 docs/mobile-menu-react/2641f0493c9aef319003.woff create mode 100644 docs/mobile-menu-react/344.b7fc0ab1700ca38c81e0.manager.bundle.js create mode 100644 docs/mobile-menu-react/375.b96cf8e1.iframe.bundle.js create mode 100644 docs/mobile-menu-react/375.b96cf8e1.iframe.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/429.ec6a4122674a4b4c7e0c.manager.bundle.js create mode 100644 docs/mobile-menu-react/499.b7e9bee5.iframe.bundle.js create mode 100644 docs/mobile-menu-react/499.b7e9bee5.iframe.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/499.b7e9bee5.iframe.bundle.js.map create mode 100644 docs/mobile-menu-react/533af26cf28d7660f24c2884d3c27eac.woff create mode 100644 docs/mobile-menu-react/565d73a693abe0776c801607ac28f0bf.woff create mode 100644 docs/mobile-menu-react/583.22346854.iframe.bundle.js create mode 100644 docs/mobile-menu-react/583.22346854.iframe.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/593.2d37c465.iframe.bundle.js create mode 100644 docs/mobile-menu-react/593.2d37c465.iframe.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/5bb29e3b7b1d3ef30121229bbe67c3e1.woff create mode 100644 docs/mobile-menu-react/60.792d33441922af562cb4.manager.bundle.js create mode 100644 docs/mobile-menu-react/60.792d33441922af562cb4.manager.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/62a1781d8b396fbb025b0552cf6304d2.woff create mode 100644 docs/mobile-menu-react/665.339fbbc6ab1f84f8196a.manager.bundle.js create mode 100644 docs/mobile-menu-react/665.339fbbc6ab1f84f8196a.manager.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/672.8c4f50dd.iframe.bundle.js create mode 100644 docs/mobile-menu-react/709.c0017fafe045dff1d0d9.manager.bundle.js create mode 100644 docs/mobile-menu-react/709.c0017fafe045dff1d0d9.manager.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/735.925e538b960f4871ecc5.manager.bundle.js create mode 100644 docs/mobile-menu-react/7c46f288e8133b87e6b12b45dac71865.woff create mode 100644 docs/mobile-menu-react/825.fefd678a530e162e436a.manager.bundle.js create mode 100644 docs/mobile-menu-react/825.fefd678a530e162e436a.manager.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/8287fd935a77dc149fbf.woff create mode 100644 docs/mobile-menu-react/838.4d16910a.iframe.bundle.js create mode 100644 docs/mobile-menu-react/892.41f22c4f.iframe.bundle.js create mode 100644 docs/mobile-menu-react/892.41f22c4f.iframe.bundle.js.LICENSE.txt create mode 100644 docs/mobile-menu-react/950.beb339a4aa9acc448016.manager.bundle.js create mode 100644 docs/mobile-menu-react/a50a1bd245ce63abcc0d1da80ff790d2.woff create mode 100644 docs/mobile-menu-react/ac06baf0acb35bb93c0b.png create mode 100644 docs/mobile-menu-react/be9a994463db18c52f8b.woff create mode 100644 docs/mobile-menu-react/df29a4d17d02b8fe5c30.woff create mode 100644 docs/mobile-menu-react/e62dc97e83a385e4d8cdc939cf1e4213.woff create mode 100644 docs/mobile-menu-react/eb2614cfc5b332b75292.jpg create mode 100644 docs/mobile-menu-react/ebf10695325d2deb3907.woff create mode 100644 docs/mobile-menu-react/ee5162ffaea474534ef2.woff create mode 100644 docs/mobile-menu-react/ef0d93a98aa30b9c3cef.woff create mode 100644 docs/mobile-menu-react/f3b374ad3ff135c4f79b.png create mode 100644 docs/mobile-menu-react/favicon.ico create mode 100644 docs/mobile-menu-react/iframe.html create mode 100644 docs/mobile-menu-react/index.html create mode 100644 docs/mobile-menu-react/main.4ef22571d9308a1e496e.manager.bundle.js create mode 100644 docs/mobile-menu-react/main.cc630355.iframe.bundle.js create mode 100644 docs/mobile-menu-react/runtime~main.eb7bdd061a334ac505d0.manager.bundle.js create mode 100644 docs/mobile-menu-react/runtime~main.f229f1be.iframe.bundle.js create mode 100644 docs/mobile-menu-react/static/css/main.283631ca.css create mode 100644 docs/mobile-menu-react/static/css/main.283631ca.css.map diff --git a/docs/mobile-menu-demo/asset-manifest.json b/docs/mobile-menu-demo/asset-manifest.json new file mode 100644 index 00000000000..7e42ad8f82c --- /dev/null +++ b/docs/mobile-menu-demo/asset-manifest.json @@ -0,0 +1,25 @@ +{ + "files": { + "main.css": "/static/css/main.d6b87222.chunk.css", + "main.js": "/static/js/main.c9080b05.chunk.js", + "main.js.map": "/static/js/main.c9080b05.chunk.js.map", + "runtime-main.js": "/static/js/runtime-main.7888aa73.js", + "runtime-main.js.map": "/static/js/runtime-main.7888aa73.js.map", + "static/css/2.4a6229c5.chunk.css": "/static/css/2.4a6229c5.chunk.css", + "static/js/2.527210a5.chunk.js": "/static/js/2.527210a5.chunk.js", + "static/js/2.527210a5.chunk.js.map": "/static/js/2.527210a5.chunk.js.map", + "static/js/3.a4a99f27.chunk.js": "/static/js/3.a4a99f27.chunk.js", + "static/js/3.a4a99f27.chunk.js.map": "/static/js/3.a4a99f27.chunk.js.map", + "index.html": "/index.html", + "static/css/2.4a6229c5.chunk.css.map": "/static/css/2.4a6229c5.chunk.css.map", + "static/css/main.d6b87222.chunk.css.map": "/static/css/main.d6b87222.chunk.css.map", + "static/js/2.527210a5.chunk.js.LICENSE.txt": "/static/js/2.527210a5.chunk.js.LICENSE.txt" + }, + "entrypoints": [ + "static/js/runtime-main.7888aa73.js", + "static/css/2.4a6229c5.chunk.css", + "static/js/2.527210a5.chunk.js", + "static/css/main.d6b87222.chunk.css", + "static/js/main.c9080b05.chunk.js" + ] +} \ No newline at end of file diff --git a/docs/mobile-menu-demo/favicon.ico b/docs/mobile-menu-demo/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/docs/mobile-menu-demo/index.html b/docs/mobile-menu-demo/index.html new file mode 100644 index 00000000000..c441993217a --- /dev/null +++ b/docs/mobile-menu-demo/index.html @@ -0,0 +1 @@ +React App
\ No newline at end of file diff --git a/docs/mobile-menu-demo/logo192.png b/docs/mobile-menu-demo/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..fc44b0a3796c0e0a64c3d858ca038bd4570465d9 GIT binary patch literal 5347 zcmZWtbyO6NvR-oO24RV%BvuJ&=?+<7=`LvyB&A_#M7mSDYw1v6DJkiYl9XjT!%$dLEBTQ8R9|wd3008in6lFF3GV-6mLi?MoP_y~}QUnaDCHI#t z7w^m$@6DI)|C8_jrT?q=f8D?0AM?L)Z}xAo^e^W>t$*Y0KlT5=@bBjT9kxb%-KNdk zeOS1tKO#ChhG7%{ApNBzE2ZVNcxbrin#E1TiAw#BlUhXllzhN$qWez5l;h+t^q#Eav8PhR2|T}y5kkflaK`ba-eoE+Z2q@o6P$)=&` z+(8}+-McnNO>e#$Rr{32ngsZIAX>GH??tqgwUuUz6kjns|LjsB37zUEWd|(&O!)DY zQLrq%Y>)Y8G`yYbYCx&aVHi@-vZ3|ebG!f$sTQqMgi0hWRJ^Wc+Ibv!udh_r%2|U) zPi|E^PK?UE!>_4`f`1k4hqqj_$+d!EB_#IYt;f9)fBOumGNyglU(ofY`yHq4Y?B%- zp&G!MRY<~ajTgIHErMe(Z8JG*;D-PJhd@RX@QatggM7+G(Lz8eZ;73)72Hfx5KDOE zkT(m}i2;@X2AT5fW?qVp?@WgN$aT+f_6eo?IsLh;jscNRp|8H}Z9p_UBO^SJXpZew zEK8fz|0Th%(Wr|KZBGTM4yxkA5CFdAj8=QSrT$fKW#tweUFqr0TZ9D~a5lF{)%-tTGMK^2tz(y2v$i%V8XAxIywrZCp=)83p(zIk6@S5AWl|Oa2hF`~~^W zI;KeOSkw1O#TiQ8;U7OPXjZM|KrnN}9arP)m0v$c|L)lF`j_rpG(zW1Qjv$=^|p*f z>)Na{D&>n`jOWMwB^TM}slgTEcjxTlUby89j1)|6ydRfWERn3|7Zd2&e7?!K&5G$x z`5U3uFtn4~SZq|LjFVrz$3iln-+ucY4q$BC{CSm7Xe5c1J<=%Oagztj{ifpaZk_bQ z9Sb-LaQMKp-qJA*bP6DzgE3`}*i1o3GKmo2pn@dj0;He}F=BgINo};6gQF8!n0ULZ zL>kC0nPSFzlcB7p41doao2F7%6IUTi_+!L`MM4o*#Y#0v~WiO8uSeAUNp=vA2KaR&=jNR2iVwG>7t%sG2x_~yXzY)7K& zk3p+O0AFZ1eu^T3s};B%6TpJ6h-Y%B^*zT&SN7C=N;g|#dGIVMSOru3iv^SvO>h4M=t-N1GSLLDqVTcgurco6)3&XpU!FP6Hlrmj}f$ zp95;b)>M~`kxuZF3r~a!rMf4|&1=uMG$;h^g=Kl;H&Np-(pFT9FF@++MMEx3RBsK?AU0fPk-#mdR)Wdkj)`>ZMl#^<80kM87VvsI3r_c@_vX=fdQ`_9-d(xiI z4K;1y1TiPj_RPh*SpDI7U~^QQ?%0&!$Sh#?x_@;ag)P}ZkAik{_WPB4rHyW#%>|Gs zdbhyt=qQPA7`?h2_8T;-E6HI#im9K>au*(j4;kzwMSLgo6u*}-K`$_Gzgu&XE)udQ zmQ72^eZd|vzI)~!20JV-v-T|<4@7ruqrj|o4=JJPlybwMg;M$Ud7>h6g()CT@wXm` zbq=A(t;RJ^{Xxi*Ff~!|3!-l_PS{AyNAU~t{h;(N(PXMEf^R(B+ZVX3 z8y0;0A8hJYp@g+c*`>eTA|3Tgv9U8#BDTO9@a@gVMDxr(fVaEqL1tl?md{v^j8aUv zm&%PX4^|rX|?E4^CkplWWNv*OKM>DxPa z!RJ)U^0-WJMi)Ksc!^ixOtw^egoAZZ2Cg;X7(5xZG7yL_;UJ#yp*ZD-;I^Z9qkP`} zwCTs0*%rIVF1sgLervtnUo&brwz?6?PXRuOCS*JI-WL6GKy7-~yi0giTEMmDs_-UX zo=+nFrW_EfTg>oY72_4Z0*uG>MnXP=c0VpT&*|rvv1iStW;*^={rP1y?Hv+6R6bxFMkxpWkJ>m7Ba{>zc_q zEefC3jsXdyS5??Mz7IET$Kft|EMNJIv7Ny8ZOcKnzf`K5Cd)&`-fTY#W&jnV0l2vt z?Gqhic}l}mCv1yUEy$%DP}4AN;36$=7aNI^*AzV(eYGeJ(Px-j<^gSDp5dBAv2#?; zcMXv#aj>%;MiG^q^$0MSg-(uTl!xm49dH!{X0){Ew7ThWV~Gtj7h%ZD zVN-R-^7Cf0VH!8O)uUHPL2mO2tmE*cecwQv_5CzWeh)ykX8r5Hi`ehYo)d{Jnh&3p z9ndXT$OW51#H5cFKa76c<%nNkP~FU93b5h-|Cb}ScHs@4Q#|}byWg;KDMJ#|l zE=MKD*F@HDBcX@~QJH%56eh~jfPO-uKm}~t7VkHxHT;)4sd+?Wc4* z>CyR*{w@4(gnYRdFq=^(#-ytb^5ESD?x<0Skhb%Pt?npNW1m+Nv`tr9+qN<3H1f<% zZvNEqyK5FgPsQ`QIu9P0x_}wJR~^CotL|n zk?dn;tLRw9jJTur4uWoX6iMm914f0AJfB@C74a;_qRrAP4E7l890P&{v<}>_&GLrW z)klculcg`?zJO~4;BBAa=POU%aN|pmZJn2{hA!d!*lwO%YSIzv8bTJ}=nhC^n}g(ld^rn#kq9Z3)z`k9lvV>y#!F4e{5c$tnr9M{V)0m(Z< z#88vX6-AW7T2UUwW`g<;8I$Jb!R%z@rCcGT)-2k7&x9kZZT66}Ztid~6t0jKb&9mm zpa}LCb`bz`{MzpZR#E*QuBiZXI#<`5qxx=&LMr-UUf~@dRk}YI2hbMsAMWOmDzYtm zjof16D=mc`^B$+_bCG$$@R0t;e?~UkF?7<(vkb70*EQB1rfUWXh$j)R2)+dNAH5%R zEBs^?N;UMdy}V};59Gu#0$q53$}|+q7CIGg_w_WlvE}AdqoS<7DY1LWS9?TrfmcvT zaypmplwn=P4;a8-%l^e?f`OpGb}%(_mFsL&GywhyN(-VROj`4~V~9bGv%UhcA|YW% zs{;nh@aDX11y^HOFXB$a7#Sr3cEtNd4eLm@Y#fc&j)TGvbbMwze zXtekX_wJqxe4NhuW$r}cNy|L{V=t#$%SuWEW)YZTH|!iT79k#?632OFse{+BT_gau zJwQcbH{b}dzKO?^dV&3nTILYlGw{27UJ72ZN){BILd_HV_s$WfI2DC<9LIHFmtyw? zQ;?MuK7g%Ym+4e^W#5}WDLpko%jPOC=aN)3!=8)s#Rnercak&b3ESRX3z{xfKBF8L z5%CGkFmGO@x?_mPGlpEej!3!AMddChabyf~nJNZxx!D&{@xEb!TDyvqSj%Y5@A{}9 zRzoBn0?x}=krh{ok3Nn%e)#~uh;6jpezhA)ySb^b#E>73e*frBFu6IZ^D7Ii&rsiU z%jzygxT-n*joJpY4o&8UXr2s%j^Q{?e-voloX`4DQyEK+DmrZh8A$)iWL#NO9+Y@!sO2f@rI!@jN@>HOA< z?q2l{^%mY*PNx2FoX+A7X3N}(RV$B`g&N=e0uvAvEN1W^{*W?zT1i#fxuw10%~))J zjx#gxoVlXREWZf4hRkgdHx5V_S*;p-y%JtGgQ4}lnA~MBz-AFdxUxU1RIT$`sal|X zPB6sEVRjGbXIP0U+?rT|y5+ev&OMX*5C$n2SBPZr`jqzrmpVrNciR0e*Wm?fK6DY& zl(XQZ60yWXV-|Ps!A{EF;=_z(YAF=T(-MkJXUoX zI{UMQDAV2}Ya?EisdEW;@pE6dt;j0fg5oT2dxCi{wqWJ<)|SR6fxX~5CzblPGr8cb zUBVJ2CQd~3L?7yfTpLNbt)He1D>*KXI^GK%<`bq^cUq$Q@uJifG>p3LU(!H=C)aEL zenk7pVg}0{dKU}&l)Y2Y2eFMdS(JS0}oZUuVaf2+K*YFNGHB`^YGcIpnBlMhO7d4@vV zv(@N}(k#REdul8~fP+^F@ky*wt@~&|(&&meNO>rKDEnB{ykAZ}k>e@lad7to>Ao$B zz<1(L=#J*u4_LB=8w+*{KFK^u00NAmeNN7pr+Pf+N*Zl^dO{LM-hMHyP6N!~`24jd zXYP|Ze;dRXKdF2iJG$U{k=S86l@pytLx}$JFFs8e)*Vi?aVBtGJ3JZUj!~c{(rw5>vuRF$`^p!P8w1B=O!skwkO5yd4_XuG^QVF z`-r5K7(IPSiKQ2|U9+`@Js!g6sfJwAHVd|s?|mnC*q zp|B|z)(8+mxXyxQ{8Pg3F4|tdpgZZSoU4P&9I8)nHo1@)9_9u&NcT^FI)6|hsAZFk zZ+arl&@*>RXBf-OZxhZerOr&dN5LW9@gV=oGFbK*J+m#R-|e6(Loz(;g@T^*oO)0R zN`N=X46b{7yk5FZGr#5&n1!-@j@g02g|X>MOpF3#IjZ_4wg{dX+G9eqS+Es9@6nC7 zD9$NuVJI}6ZlwtUm5cCAiYv0(Yi{%eH+}t)!E^>^KxB5^L~a`4%1~5q6h>d;paC9c zTj0wTCKrhWf+F#5>EgX`sl%POl?oyCq0(w0xoL?L%)|Q7d|Hl92rUYAU#lc**I&^6p=4lNQPa0 znQ|A~i0ip@`B=FW-Q;zh?-wF;Wl5!+q3GXDu-x&}$gUO)NoO7^$BeEIrd~1Dh{Tr` z8s<(Bn@gZ(mkIGnmYh_ehXnq78QL$pNDi)|QcT*|GtS%nz1uKE+E{7jdEBp%h0}%r zD2|KmYGiPa4;md-t_m5YDz#c*oV_FqXd85d@eub?9N61QuYcb3CnVWpM(D-^|CmkL z(F}L&N7qhL2PCq)fRh}XO@U`Yn<?TNGR4L(mF7#4u29{i~@k;pLsgl({YW5`Mo+p=zZn3L*4{JU;++dG9 X@eDJUQo;Ye2mwlRs?y0|+_a0zY+Zo%Dkae}+MySoIppb75o?vUW_?)>@g{U2`ERQIXV zeY$JrWnMZ$QC<=ii4X|@0H8`si75jB(ElJb00HAB%>SlLR{!zO|C9P3zxw_U8?1d8uRZ=({Ga4shyN}3 zAK}WA(ds|``G4jA)9}Bt2Hy0+f3rV1E6b|@?hpGA=PI&r8)ah|)I2s(P5Ic*Ndhn^ z*T&j@gbCTv7+8rpYbR^Ty}1AY)YH;p!m948r#%7x^Z@_-w{pDl|1S4`EM3n_PaXvK z1JF)E3qy$qTj5Xs{jU9k=y%SQ0>8E$;x?p9ayU0bZZeo{5Z@&FKX>}s!0+^>C^D#z z>xsCPvxD3Z=dP}TTOSJhNTPyVt14VCQ9MQFN`rn!c&_p?&4<5_PGm4a;WS&1(!qKE z_H$;dDdiPQ!F_gsN`2>`X}$I=B;={R8%L~`>RyKcS$72ai$!2>d(YkciA^J0@X%G4 z4cu!%Ps~2JuJ8ex`&;Fa0NQOq_nDZ&X;^A=oc1&f#3P1(!5il>6?uK4QpEG8z0Rhu zvBJ+A9RV?z%v?!$=(vcH?*;vRs*+PPbOQ3cdPr5=tOcLqmfx@#hOqX0iN)wTTO21jH<>jpmwRIAGw7`a|sl?9y9zRBh>(_%| zF?h|P7}~RKj?HR+q|4U`CjRmV-$mLW>MScKnNXiv{vD3&2@*u)-6P@h0A`eeZ7}71 zK(w%@R<4lLt`O7fs1E)$5iGb~fPfJ?WxhY7c3Q>T-w#wT&zW522pH-B%r5v#5y^CF zcC30Se|`D2mY$hAlIULL%-PNXgbbpRHgn<&X3N9W!@BUk@9g*P5mz-YnZBb*-$zMM z7Qq}ic0mR8n{^L|=+diODdV}Q!gwr?y+2m=3HWwMq4z)DqYVg0J~^}-%7rMR@S1;9 z7GFj6K}i32X;3*$SmzB&HW{PJ55kT+EI#SsZf}bD7nW^Haf}_gXciYKX{QBxIPSx2Ma? zHQqgzZq!_{&zg{yxqv3xq8YV+`S}F6A>Gtl39_m;K4dA{pP$BW0oIXJ>jEQ!2V3A2 zdpoTxG&V=(?^q?ZTj2ZUpDUdMb)T?E$}CI>r@}PFPWD9@*%V6;4Ag>D#h>!s)=$0R zRXvdkZ%|c}ubej`jl?cS$onl9Tw52rBKT)kgyw~Xy%z62Lr%V6Y=f?2)J|bZJ5(Wx zmji`O;_B+*X@qe-#~`HFP<{8$w@z4@&`q^Q-Zk8JG3>WalhnW1cvnoVw>*R@c&|o8 zZ%w!{Z+MHeZ*OE4v*otkZqz11*s!#s^Gq>+o`8Z5 z^i-qzJLJh9!W-;SmFkR8HEZJWiXk$40i6)7 zZpr=k2lp}SasbM*Nbn3j$sn0;rUI;%EDbi7T1ZI4qL6PNNM2Y%6{LMIKW+FY_yF3) zSKQ2QSujzNMSL2r&bYs`|i2Dnn z=>}c0>a}>|uT!IiMOA~pVT~R@bGlm}Edf}Kq0?*Af6#mW9f9!}RjW7om0c9Qlp;yK z)=XQs(|6GCadQbWIhYF=rf{Y)sj%^Id-ARO0=O^Ad;Ph+ z0?$eE1xhH?{T$QI>0JP75`r)U_$#%K1^BQ8z#uciKf(C701&RyLQWBUp*Q7eyn76} z6JHpC9}R$J#(R0cDCkXoFSp;j6{x{b&0yE@P7{;pCEpKjS(+1RQy38`=&Yxo%F=3y zCPeefABp34U-s?WmU#JJw23dcC{sPPFc2#J$ZgEN%zod}J~8dLm*fx9f6SpO zn^Ww3bt9-r0XaT2a@Wpw;C23XM}7_14#%QpubrIw5aZtP+CqIFmsG4`Cm6rfxl9n5 z7=r2C-+lM2AB9X0T_`?EW&Byv&K?HS4QLoylJ|OAF z`8atBNTzJ&AQ!>sOo$?^0xj~D(;kS$`9zbEGd>f6r`NC3X`tX)sWgWUUOQ7w=$TO&*j;=u%25ay-%>3@81tGe^_z*C7pb9y*Ed^H3t$BIKH2o+olp#$q;)_ zfpjCb_^VFg5fU~K)nf*d*r@BCC>UZ!0&b?AGk_jTPXaSnCuW110wjHPPe^9R^;jo3 zwvzTl)C`Zl5}O2}3lec=hZ*$JnkW#7enKKc)(pM${_$9Hc=Sr_A9Biwe*Y=T?~1CK z6eZ9uPICjy-sMGbZl$yQmpB&`ouS8v{58__t0$JP%i3R&%QR3ianbZqDs<2#5FdN@n5bCn^ZtH992~5k(eA|8|@G9u`wdn7bnpg|@{m z^d6Y`*$Zf2Xr&|g%sai#5}Syvv(>Jnx&EM7-|Jr7!M~zdAyjt*xl;OLhvW-a%H1m0 z*x5*nb=R5u><7lyVpNAR?q@1U59 zO+)QWwL8t zyip?u_nI+K$uh{y)~}qj?(w0&=SE^8`_WMM zTybjG=999h38Yes7}-4*LJ7H)UE8{mE(6;8voE+TYY%33A>S6`G_95^5QHNTo_;Ao ztIQIZ_}49%{8|=O;isBZ?=7kfdF8_@azfoTd+hEJKWE!)$)N%HIe2cplaK`ry#=pV z0q{9w-`i0h@!R8K3GC{ivt{70IWG`EP|(1g7i_Q<>aEAT{5(yD z=!O?kq61VegV+st@XCw475j6vS)_z@efuqQgHQR1T4;|-#OLZNQJPV4k$AX1Uk8Lm z{N*b*ia=I+MB}kWpupJ~>!C@xEN#Wa7V+7{m4j8c?)ChV=D?o~sjT?0C_AQ7B-vxqX30s0I_`2$in86#`mAsT-w?j{&AL@B3$;P z31G4(lV|b}uSDCIrjk+M1R!X7s4Aabn<)zpgT}#gE|mIvV38^ODy@<&yflpCwS#fRf9ZX3lPV_?8@C5)A;T zqmouFLFk;qIs4rA=hh=GL~sCFsXHsqO6_y~*AFt939UYVBSx1s(=Kb&5;j7cSowdE;7()CC2|-i9Zz+_BIw8#ll~-tyH?F3{%`QCsYa*b#s*9iCc`1P1oC26?`g<9))EJ3%xz+O!B3 zZ7$j~To)C@PquR>a1+Dh>-a%IvH_Y7^ys|4o?E%3`I&ADXfC8++hAdZfzIT#%C+Jz z1lU~K_vAm0m8Qk}K$F>|>RPK%<1SI0(G+8q~H zAsjezyP+u!Se4q3GW)`h`NPSRlMoBjCzNPesWJwVTY!o@G8=(6I%4XHGaSiS3MEBK zhgGFv6Jc>L$4jVE!I?TQuwvz_%CyO!bLh94nqK11C2W$*aa2ueGopG8DnBICVUORP zgytv#)49fVXDaR$SukloYC3u7#5H)}1K21=?DKj^U)8G;MS)&Op)g^zR2($<>C*zW z;X7`hLxiIO#J`ANdyAOJle4V%ppa*(+0i3w;8i*BA_;u8gOO6)MY`ueq7stBMJTB; z-a0R>hT*}>z|Gg}@^zDL1MrH+2hsR8 zHc}*9IvuQC^Ju)^#Y{fOr(96rQNPNhxc;mH@W*m206>Lo<*SaaH?~8zg&f&%YiOEG zGiz?*CP>Bci}!WiS=zj#K5I}>DtpregpP_tfZtPa(N<%vo^#WCQ5BTv0vr%Z{)0q+ z)RbfHktUm|lg&U3YM%lMUM(fu}i#kjX9h>GYctkx9Mt_8{@s%!K_EI zScgwy6%_fR?CGJQtmgNAj^h9B#zmaMDWgH55pGuY1Gv7D z;8Psm(vEPiwn#MgJYu4Ty9D|h!?Rj0ddE|&L3S{IP%H4^N!m`60ZwZw^;eg4sk6K{ ziA^`Sbl_4~f&Oo%n;8Ye(tiAdlZKI!Z=|j$5hS|D$bDJ}p{gh$KN&JZYLUjv4h{NY zBJ>X9z!xfDGY z+oh_Z&_e#Q(-}>ssZfm=j$D&4W4FNy&-kAO1~#3Im;F)Nwe{(*75(p=P^VI?X0GFakfh+X-px4a%Uw@fSbmp9hM1_~R>?Z8+ ziy|e9>8V*`OP}4x5JjdWp}7eX;lVxp5qS}0YZek;SNmm7tEeSF*-dI)6U-A%m6YvCgM(}_=k#a6o^%-K4{`B1+}O4x zztDT%hVb;v#?j`lTvlFQ3aV#zkX=7;YFLS$uIzb0E3lozs5`Xy zi~vF+%{z9uLjKvKPhP%x5f~7-Gj+%5N`%^=yk*Qn{`> z;xj&ROY6g`iy2a@{O)V(jk&8#hHACVDXey5a+KDod_Z&}kHM}xt7}Md@pil{2x7E~ zL$k^d2@Ec2XskjrN+IILw;#7((abu;OJii&v3?60x>d_Ma(onIPtcVnX@ELF0aL?T zSmWiL3(dOFkt!x=1O!_0n(cAzZW+3nHJ{2S>tgSK?~cFha^y(l@-Mr2W$%MN{#af8J;V*>hdq!gx=d0h$T7l}>91Wh07)9CTX zh2_ZdQCyFOQ)l(}gft0UZG`Sh2`x-w`5vC2UD}lZs*5 zG76$akzn}Xi))L3oGJ75#pcN=cX3!=57$Ha=hQ2^lwdyU#a}4JJOz6ddR%zae%#4& za)bFj)z=YQela(F#Y|Q#dp}PJghITwXouVaMq$BM?K%cXn9^Y@g43$=O)F&ZlOUom zJiad#dea;-eywBA@e&D6Pdso1?2^(pXiN91?jvcaUyYoKUmvl5G9e$W!okWe*@a<^ z8cQQ6cNSf+UPDx%?_G4aIiybZHHagF{;IcD(dPO!#=u zWfqLcPc^+7Uu#l(Bpxft{*4lv#*u7X9AOzDO z1D9?^jIo}?%iz(_dwLa{ex#T}76ZfN_Z-hwpus9y+4xaUu9cX}&P{XrZVWE{1^0yw zO;YhLEW!pJcbCt3L8~a7>jsaN{V3>tz6_7`&pi%GxZ=V3?3K^U+*ryLSb)8^IblJ0 zSRLNDvIxt)S}g30?s_3NX>F?NKIGrG_zB9@Z>uSW3k2es_H2kU;Rnn%j5qP)!XHKE zPB2mHP~tLCg4K_vH$xv`HbRsJwbZMUV(t=ez;Ec(vyHH)FbfLg`c61I$W_uBB>i^r z&{_P;369-&>23R%qNIULe=1~T$(DA`ev*EWZ6j(B$(te}x1WvmIll21zvygkS%vwG zzkR6Z#RKA2!z!C%M!O>!=Gr0(J0FP=-MN=5t-Ir)of50y10W}j`GtRCsXBakrKtG& zazmITDJMA0C51&BnLY)SY9r)NVTMs);1<=oosS9g31l{4ztjD3#+2H7u_|66b|_*O z;Qk6nalpqdHOjx|K&vUS_6ITgGll;TdaN*ta=M_YtyC)I9Tmr~VaPrH2qb6sd~=AcIxV+%z{E&0@y=DPArw zdV7z(G1hBx7hd{>(cr43^WF%4Y@PXZ?wPpj{OQ#tvc$pABJbvPGvdR`cAtHn)cSEV zrpu}1tJwQ3y!mSmH*uz*x0o|CS<^w%&KJzsj~DU0cLQUxk5B!hWE>aBkjJle8z~;s z-!A=($+}Jq_BTK5^B!`R>!MulZN)F=iXXeUd0w5lUsE5VP*H*oCy(;?S$p*TVvTxwAeWFB$jHyb0593)$zqalVlDX=GcCN1gU0 zlgU)I$LcXZ8Oyc2TZYTPu@-;7<4YYB-``Qa;IDcvydIA$%kHhJKV^m*-zxcvU4viy&Kr5GVM{IT>WRywKQ9;>SEiQD*NqplK-KK4YR`p0@JW)n_{TU3bt0 zim%;(m1=#v2}zTps=?fU5w^(*y)xT%1vtQH&}50ZF!9YxW=&7*W($2kgKyz1mUgfs zfV<*XVVIFnohW=|j+@Kfo!#liQR^x>2yQdrG;2o8WZR+XzU_nG=Ed2rK?ntA;K5B{ z>M8+*A4!Jm^Bg}aW?R?6;@QG@uQ8&oJ{hFixcfEnJ4QH?A4>P=q29oDGW;L;= z9-a0;g%c`C+Ai!UmK$NC*4#;Jp<1=TioL=t^YM)<<%u#hnnfSS`nq63QKGO1L8RzX z@MFDqs1z ztYmxDl@LU)5acvHk)~Z`RW7=aJ_nGD!mOSYD>5Odjn@TK#LY{jf?+piB5AM-CAoT_ z?S-*q7}wyLJzK>N%eMPuFgN)Q_otKP;aqy=D5f!7<=n(lNkYRXVpkB{TAYLYg{|(jtRqYmg$xH zjmq?B(RE4 zQx^~Pt}gxC2~l=K$$-sYy_r$CO(d=+b3H1MB*y_5g6WLaWTXn+TKQ|hNY^>Mp6k*$ zwkovomhu776vQATqT4blf~g;TY(MWCrf^^yfWJvSAB$p5l;jm@o#=!lqw+Lqfq>X= z$6~kxfm7`3q4zUEB;u4qa#BdJxO!;xGm)wwuisj{0y2x{R(IGMrsIzDY9LW>m!Y`= z04sx3IjnYvL<4JqxQ8f7qYd0s2Ig%`ytYPEMKI)s(LD}D@EY>x`VFtqvnADNBdeao zC96X+MxnwKmjpg{U&gP3HE}1=s!lv&D{6(g_lzyF3A`7Jn*&d_kL<;dAFx!UZ>hB8 z5A*%LsAn;VLp>3${0>M?PSQ)9s3}|h2e?TG4_F{}{Cs>#3Q*t$(CUc}M)I}8cPF6% z=+h(Kh^8)}gj(0}#e7O^FQ6`~fd1#8#!}LMuo3A0bN`o}PYsm!Y}sdOz$+Tegc=qT z8x`PH$7lvnhJp{kHWb22l;@7B7|4yL4UOOVM0MP_>P%S1Lnid)+k9{+3D+JFa#Pyf zhVc#&df87APl4W9X)F3pGS>@etfl=_E5tBcVoOfrD4hmVeTY-cj((pkn%n@EgN{0f zwb_^Rk0I#iZuHK!l*lN`ceJn(sI{$Fq6nN& zE<-=0_2WN}m+*ivmIOxB@#~Q-cZ>l136w{#TIJe478`KE7@=a{>SzPHsKLzYAyBQO zAtuuF$-JSDy_S@6GW0MOE~R)b;+0f%_NMrW(+V#c_d&U8Z9+ec4=HmOHw?gdjF(Lu zzra83M_BoO-1b3;9`%&DHfuUY)6YDV21P$C!Rc?mv&{lx#f8oc6?0?x zK08{WP65?#>(vPfA-c=MCY|%*1_<3D4NX zeVTi-JGl2uP_2@0F{G({pxQOXt_d{g_CV6b?jNpfUG9;8yle-^4KHRvZs-_2siata zt+d_T@U$&t*xaD22(fH(W1r$Mo?3dc%Tncm=C6{V9y{v&VT#^1L04vDrLM9qBoZ4@ z6DBN#m57hX7$C(=#$Y5$bJmwA$T8jKD8+6A!-IJwA{WOfs%s}yxUw^?MRZjF$n_KN z6`_bGXcmE#5e4Ym)aQJ)xg3Pg0@k`iGuHe?f(5LtuzSq=nS^5z>vqU0EuZ&75V%Z{ zYyhRLN^)$c6Ds{f7*FBpE;n5iglx5PkHfWrj3`x^j^t z7ntuV`g!9Xg#^3!x)l*}IW=(Tz3>Y5l4uGaB&lz{GDjm2D5S$CExLT`I1#n^lBH7Y zDgpMag@`iETKAI=p<5E#LTkwzVR@=yY|uBVI1HG|8h+d;G-qfuj}-ZR6fN>EfCCW z9~wRQoAPEa#aO?3h?x{YvV*d+NtPkf&4V0k4|L=uj!U{L+oLa(z#&iuhJr3-PjO3R z5s?=nn_5^*^Rawr>>Nr@K(jwkB#JK-=+HqwfdO<+P5byeim)wvqGlP-P|~Nse8=XF zz`?RYB|D6SwS}C+YQv+;}k6$-%D(@+t14BL@vM z2q%q?f6D-A5s$_WY3{^G0F131bbh|g!}#BKw=HQ7mx;Dzg4Z*bTLQSfo{ed{4}NZW zfrRm^Ca$rlE{Ue~uYv>R9{3smwATcdM_6+yWIO z*ZRH~uXE@#p$XTbCt5j7j2=86e{9>HIB6xDzV+vAo&B?KUiMP|ttOElepnl%|DPqL b{|{}U^kRn2wo}j7|0ATu<;8xA7zX}7|B6mN literal 0 HcmV?d00001 diff --git a/docs/mobile-menu-demo/manifest.json b/docs/mobile-menu-demo/manifest.json new file mode 100644 index 00000000000..080d6c77ac2 --- /dev/null +++ b/docs/mobile-menu-demo/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/docs/mobile-menu-demo/robots.txt b/docs/mobile-menu-demo/robots.txt new file mode 100644 index 00000000000..e9e57dc4d41 --- /dev/null +++ b/docs/mobile-menu-demo/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css b/docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css new file mode 100644 index 00000000000..78067de43d5 --- /dev/null +++ b/docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css @@ -0,0 +1,2 @@ +.hds-icon--alert-circle-fill{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z' fill='currentColor'/%3E%3C/svg%3E")}.hds-icon--check-circle-fill{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3a9 9 0 100 18 9 9 0 000-18zm4.5 5L18 9.5 10.5 17 6 12.5 7.5 11l3 3 6-6z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3a9 9 0 100 18 9 9 0 000-18zm4.5 5L18 9.5 10.5 17 6 12.5 7.5 11l3 3 6-6z' fill='currentColor'/%3E%3C/svg%3E")}.hds-icon--error-fill{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.175 3.456c.349-.586 1.223-.607 1.61-.063l.04.063 9.052 15.21c.343.577-.072 1.285-.753 1.332l-.072.002H2.948c-.7 0-1.15-.689-.858-1.273l.033-.06 9.052-15.21zM13 16v2h-2v-2h2zm0-7.5v6h-2v-6h2z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.175 3.456c.349-.586 1.223-.607 1.61-.063l.04.063 9.052 15.21c.343.577-.072 1.285-.753 1.332l-.072.002H2.948c-.7 0-1.15-.689-.858-1.273l.033-.06 9.052-15.21zM13 16v2h-2v-2h2zm0-7.5v6h-2v-6h2z' fill='currentColor'/%3E%3C/svg%3E")}.hds-icon--info-circle-fill{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3a9 9 0 100 18 9 9 0 000-18zm1 7v6.5h2V18H9v-1.5h2v-5H9V10h4zm-1.188-4a1.312 1.312 0 110 2.625 1.312 1.312 0 010-2.625z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3a9 9 0 100 18 9 9 0 000-18zm1 7v6.5h2V18H9v-1.5h2v-5H9V10h4zm-1.188-4a1.312 1.312 0 110 2.625 1.312 1.312 0 010-2.625z' fill='currentColor'/%3E%3C/svg%3E")}.hds-notification{--notification-background-color:var(--color-info-light);--notification-border-color:var(--color-info);--notification-border-width:var(--spacing-2-xs);--notification-icon-color:var(--color-info);--notification-color:var(--color-black-90);--notification-max-width-inline:none;--notification-max-width-toast:21rem;--notification-z-index-inline:auto;--notification-z-index-toast:99;--notification-offset:var(--spacing-layout-s);--notification-padding:var(--spacing-s);background-color:var(--notification-background-color);border:solid var(--notification-border-color);border-left-width:var(--notification-border-width);border-bottom-width:0;border-right-width:0;border-top-width:0;box-sizing:border-box;color:var(--notification-color);max-width:var(--notification-max-width-inline);padding:var(--notification-padding);position:relative;width:100%;z-index:var(--notification-z-index-inline)}.hds-notification__content{display:grid;grid-gap:var(--spacing-s);gap:var(--spacing-s)}.hds-notification__label{align-items:flex-start;display:flex;font-size:var(--fontsize-heading-xs);font-weight:700;letter-spacing:.4px;line-height:24px;margin-right:var(--spacing-l)}.hds-notification__label>.hds-icon{color:var(--notification-icon-color);flex:none;margin-right:var(--spacing-2-xs)}.hds-notification__body{font-size:var(--fontsize-body-s);line-height:24px}.hds-notification--small{--notification-padding:var(--spacing-2-xs)}.hds-notification--small .hds-notification__content{display:flex;grid-gap:0;gap:0}.hds-notification--small .hds-notification__label{margin-right:0}.hds-notification--small .hds-notification__body{margin-right:var(--spacing-l)}.hds-notification--large{--notification-padding:var(--spacing-l)}.hds-notification--large .hds-notification__label{margin-right:0}.hds-notification .hds-icon{--icon-size:var(--spacing-layout-xs)}.hds-notification__close-button{--notification-close-button-offset:var(--spacing-s);background:none;border:none;cursor:pointer;display:flex;outline:none;padding:0;position:absolute;right:var(--notification-close-button-offset);top:var(--notification-close-button-offset)}.hds-notification--large .hds-notification__close-button,.hds-notification--small .hds-notification__close-button{--notification-close-button-offset:var(--spacing-2-xs)}.hds-notification__close-button:focus{box-shadow:0 0 0 3px var(--color-focus-outline)}.hds-notification--bottom-center,.hds-notification--bottom-left,.hds-notification--bottom-right,.hds-notification--top-center,.hds-notification--top-left,.hds-notification--top-right{border-left-width:0;border-bottom-width:0;border-right-width:0;border-top-width:var(--notification-border-width);max-width:var(--notification-max-width-toast);position:fixed;width:calc(100% - var(--spacing-l));z-index:var(--notification-z-index-toast)}.hds-notification--top-left{left:var(--notification-offset);top:var(--notification-offset)}.hds-notification--top-center{left:50%;top:var(--notification-offset);transform:translateX(-50%)}.hds-notification--top-right{right:var(--notification-offset);top:var(--notification-offset)}.hds-notification--bottom-left{bottom:var(--notification-offset);left:var(--notification-offset)}.hds-notification--bottom-center{bottom:var(--notification-offset);left:50%;transform:translateX(-50%)}.hds-notification--bottom-right{bottom:var(--notification-offset);right:var(--notification-offset)}@media only screen and (max-width:765.98px){.hds-notification{--notification-offset:var(--spacing-s)}}.hds-notification--success{--notification-background-color:var(--color-success-light);--notification-border-color:var(--color-success);--notification-icon-color:var(--color-success)}.hds-notification--alert{--notification-background-color:var(--color-alert-light);--notification-border-color:var(--color-alert-dark);--notification-icon-color:var(--color-alert-dark)}.hds-notification--error{--notification-background-color:var(--color-error-light);--notification-border-color:var(--color-error);--notification-icon-color:var(--color-error)}.hds-notification--box-shadow{box-shadow:var(--box-shadow-l)}.hds-icon--cross{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 7.5L13.5 12l4.5 4.5-1.5 1.5-4.5-4.5L7.5 18 6 16.5l4.5-4.5L6 7.5 7.5 6l4.5 4.5L16.5 6 18 7.5z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 7.5L13.5 12l4.5 4.5-1.5 1.5-4.5-4.5L7.5 18 6 16.5l4.5-4.5L6 7.5 7.5 6l4.5 4.5L16.5 6 18 7.5z' fill='currentColor'/%3E%3C/svg%3E")}.hds-tag{--tag-background:var(--color-black-10);--tag-color:var(--color-black-90);--tag-font-size:var(--fontsize-body-s);--tag-spacing:var(--spacing-2-xs);--tag-height:32px;align-items:center;background-color:var(--tag-background);border-radius:20px;color:var(--tag-color);display:inline-flex;flex-direction:row;font-size:var(--tag-font-size);line-height:var(--tag-height);min-height:var(--tag-height);outline:none}.hds-tag--large{--tag-font-size:var(--fontsize-body-m);--tag-spacing:var(--spacing-s);--tag-height:48px;border-radius:24px;flex-direction:row}.hds-tag:focus,.hds-tag:focus-within{box-shadow:0 0 0 3px var(--color-focus-outline)}.hds-tag[tabindex="0"]{cursor:pointer}.hds-tag__label{line-height:var(--lineheight-m);padding:0 var(--tag-spacing)}.hds-tag__label:not(:only-child){padding:0 0 0 var(--tag-spacing)}.hds-tag__delete-button{display:flex;margin-right:calc(var(--tag-spacing)/2);outline:none}.hds-tag__delete-button .hds-icon{height:var(--spacing-m);width:var(--spacing-m)}.hds-button{--border-width:2px;--color:inherit;--min-size:44px;--outline-gutter:2px;--outline-width:3px;align-content:flex-start;align-items:center;-webkit-appearance:button;background-color:transparent;background-color:var(--background-color,transparent);border:var(--border-width) solid var(--border-color,transparent);border-radius:0;color:var(--color);cursor:pointer;display:inline-flex;font-family:inherit;font-size:100%;font-weight:500;justify-content:center;line-height:1.15;margin:0;min-height:var(--min-size);min-width:var(--min-size);padding:0 var(--spacing-2-xs);position:relative;text-transform:none;vertical-align:top}.hds-button,.hds-button *,.hds-button:after,.hds-button :after,.hds-button:before,.hds-button :before{box-sizing:border-box}.hds-button[type=button],.hds-button[type=reset],.hds-button[type=submit]{-webkit-appearance:button}.hds-button::-moz-focus-inner,.hds-button[type=button]::-moz-focus-inner,.hds-button[type=reset]::-moz-focus-inner,.hds-button[type=submit]::-moz-focus-inner{border-style:none;padding:0}.hds-button:-moz-focusring,.hds-button[type=button]:-moz-focusring,.hds-button[type=reset]:-moz-focusring,.hds-button[type=submit]:-moz-focusring{outline:1px dotted ButtonText}.hds-button.focus-visible,.hds-button:focus-visible,.hds-button:hover{transition-duration:85ms;transition-property:background-color,border-color,color;transition-timing-function:ease-out}.hds-button:hover{background-color:transparent;background-color:var(--background-color-hover,transparent);color:var(--color-hover)}.hds-button.focus-visible,.hds-button:active,.hds-button:focus-visible{background-color:transparent;background-color:var(--background-color-focus,transparent);color:var(--color-focus);outline:none}.hds-button:not(:disabled){border-color:transparent;border-color:var(--border-color,transparent)}.hds-button:disabled{background-color:transparent;background-color:var(--background-color-disabled,transparent);border-color:transparent;border-color:var(--border-color-disabled,transparent);color:var(--color-disabled);cursor:not-allowed}.hds-button.focus-visible:hover,.hds-button:active:hover,.hds-button:focus-visible:hover{background-color:transparent;background-color:var(--background-color-hover-focus,transparent)}.hds-button:not(:disabled):hover{border-color:transparent;border-color:var(--border-color-hover,transparent)}.hds-button:not(:disabled).focus-visible,.hds-button:not(:disabled):active,.hds-button:not(:disabled):focus-visible{border-color:transparent;border-color:var(--border-color-focus,transparent)}.hds-button:not(:disabled).focus-visible:hover,.hds-button:not(:disabled):active:hover,.hds-button:not(:disabled):focus-visible:hover{border-color:transparent;border-color:var(--border-color-hover-focus,transparent);color:var(--color-hover-focus)}.hds-button:after{--size:100%;border:var(--outline-width) solid transparent;content:"";height:var(--size);position:absolute;width:var(--size)}.hds-button.focus-visible:after,.hds-button:active:after,.hds-button:focus-visible:after{--size:calc(100% + var(--outline-width)*2 + var(--border-width)*2 + var(--outline-gutter)*2);border-color:var(--focus-outline-color)}.hds-button__label,input[type=submit].hds-button{font-weight:inherit;line-height:1.25em;padding:var(--spacing-s)}input[type=submit].hds-button{cursor:pointer;padding:var(--spacing-s) var(--spacing-l)}input[type=submit].hds-button.focus-visible,input[type=submit].hds-button:focus-visible{box-shadow:0 0 0 var(--outline-gutter) var(--submit-input-focus-gutter-color),0 0 0 calc(var(--outline-gutter) + var(--outline-width)) var(--focus-outline-color)}.hds-button__label:only-child{margin:0 var(--spacing-2-xs)}.hds-button--small .hds-button__label,input[type=submit].hds-button--small{line-height:var(--lineheight-s);padding:var(--spacing-2-xs) var(--spacing-xs)}.hds-button--supplementary .hds-button__label:first-child{padding-right:var(--spacing-2-xs)}.hds-button--small .hds-button__label:only-child{margin:0 var(--spacing-xs)}.hds-button--supplementary .hds-icon+.hds-button__label:last-child{padding-left:var(--spacing-2-xs)}.hds-button--supplementary .hds-icon+.hds-button__label:not(:last-child){padding-left:var(--spacing-2-xs);padding-right:var(--spacing-2-xs)}.hds-button--small{padding:0}input[type=submit].hds-button--small{padding:var(--spacing-2-xs) var(--spacing-m)}.hds-button--small .hds-button__label:not(:first-of-type):not(:last-of-type){padding:var(--spacing-2-xs) var(--spacing-2-xs)}.hds-button--fullwidth{width:100%}.hds-button .hds-icon{height:var(--spacing-m);margin-left:var(--spacing-s);width:var(--spacing-m)}.hds-button__label~.hds-icon{margin:0 var(--spacing-s) 0 0}.hds-button--small .hds-icon{margin-left:var(--spacing-2-xs)}.hds-button .hds-button--small .hds-button__label~.hds-icon{margin:0 var(--spacing-2-xs) 0 0}.hds-button .hds-icon:first-of-type:not(:last-of-type){margin:0 0 0 var(--spacing-2-xs)}.hds-button .hds-icon:last-of-type:not(:first-of-type){margin:0 var(--spacing-2-xs) 0 0}.hds-button--small .hds-icon:first-child:not(:last-of-type){margin:0 0 0 var(--spacing-2-xs)}.hds-button--small .hds-icon:last-child:not(:first-of-type){margin:0 var(--spacing-2-xs) 0 0}.hds-button--primary{--background-color:var(--color-bus);--background-color-hover:var(--color-bus-dark);--background-color-focus:var(--color-bus);--background-color-hover-focus:var(--color-bus-dark);--background-color-disabled:var(--color-black-20);--border-color:var(--color-bus);--border-color-hover:var(--color-bus-dark);--border-color-focus:var(--color-bus);--border-color-hover-focus:var(--color-bus-dark);--border-color-disabled:var(--color-black-20);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white);--color-disabled:var(--color-white);--focus-outline-color:var(--color-focus-outline);--submit-input-focus-gutter-color:var(--color-white)}.hds-button--secondary{--border-color:var(--color-bus);--border-color-hover:var(--color-bus-dark);--border-color-focus:var(--color-bus);--border-color-hover-focus:var(--color-bus-dark);--border-color-disabled:var(--color-black-50);--focus-outline-color:var(--color-focus-outline);--submit-input-focus-gutter-color:var(--color-white)}.hds-button--secondary,.hds-button--supplementary{--background-color:transparent;--background-color-hover:var(--color-bus-light);--background-color-focus:transparent;--background-color-hover-focus:var(--color-bus-light);--background-color-disabled:transparent;--color:var(--color-bus);--color-hover:var(--color-bus-dark);--color-focus:var(--color-bus);--color-hover-focus:var(--color-bus-dark);--color-disabled:var(--color-black-40)}.hds-button--supplementary{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline);--border-color-disabled:transparent;--focus-outline-color:transparent;--submit-input-focus-gutter-color:transparent}.hds-button--loading{--background-color:transparent;--background-color-hover:transparent;--background-color-focus:transparent;--background-color-hover-focus:transparent;--background-color-disabled:transparent;--border-color:transparent;--border-color-hover:transparent;--border-color-focus:transparent;--border-color-hover-focus:transparent;--border-color-disabled:transparent;--color:var(--color-black-90);--color-hover:var(--color-black-90);--color-focus:var(--color-black-90);--color-hover-focus:var(--color-black-90);--color-disabled:var(--color-black-90);cursor:wait}.hds-button--success{--background-color:var(--color-success);--background-color-hover:var(--color-success-dark);--background-color-focus:var(--color-success);--background-color-hover-focus:var(--color-success-dark);--border-color:var(--color-success);--border-color-hover:var(--color-success-dark);--border-color-focus:var(--color-success);--border-color-hover-focus:var(--color-success-dark)}.hds-button--danger,.hds-button--success{--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white);--focus-outline-color:var(--color-focus-outline)}.hds-button--danger{--background-color:var(--color-error);--background-color-hover:var(--color-error-dark);--background-color-focus:var(--color-error);--background-color-hover-focus:var(--color-error-dark);--border-color:var(--color-error);--border-color-hover:var(--color-error-dark);--border-color-focus:var(--color-error);--border-color-hover-focus:var(--color-error-dark)}.hds-button--primary.hds-button--theme-coat{--background-color:var(--color-coat-of-arms);--background-color-hover:var(--color-coat-of-arms-dark);--background-color-focus:var(--color-coat-of-arms);--background-color-hover-focus:var(--color-coat-of-arms-dark);--border-color:var(--color-coat-of-arms);--border-color-hover:var(--color-coat-of-arms-dark);--border-color-focus:var(--color-coat-of-arms);--border-color-hover-focus:var(--color-coat-of-arms-dark);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white)}.hds-button--secondary.hds-button--theme-coat{--border-color:var(--color-coat-of-arms);--border-color-hover:var(--color-coat-of-arms-dark);--border-color-focus:var(--color-coat-of-arms);--border-color-hover-focus:var(--color-coat-of-arms-dark)}.hds-button--secondary.hds-button--theme-coat,.hds-button--supplementary.hds-button--theme-coat{--background-color:transparent;--background-color-hover:var(--color-coat-of-arms-light);--background-color-focus:transparent;--background-color-hover-focus:var(--color-coat-of-arms-light);--color:var(--color-coat-of-arms);--color-hover:var(--color-coat-of-arms);--color-focus:var(--color-coat-of-arms);--color-hover-focus:var(--color-coat-of-arms)}.hds-button--supplementary.hds-button--theme-coat{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline)}.hds-button--primary.hds-button--theme-black{--background-color:var(--color-black);--background-color-hover:var(--color-black);--background-color-focus:var(--color-black);--background-color-hover-focus:var(--color-black);--border-color:var(--color-black);--border-color-hover:var(--color-black);--border-color-focus:var(--color-black);--border-color-hover-focus:var(--color-black);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white)}.hds-button--secondary.hds-button--theme-black{--border-color:var(--color-black);--border-color-hover:var(--color-black);--border-color-focus:var(--color-black);--border-color-hover-focus:var(--color-black)}.hds-button--secondary.hds-button--theme-black,.hds-button--supplementary.hds-button--theme-black{--background-color:transparent;--background-color-hover:var(--color-black-5);--background-color-focus:transparent;--background-color-hover-focus:var(--color-black-5);--color:var(--color-black);--color-hover:var(--color-black);--color-focus:var(--color-black);--color-hover-focus:var(--color-black)}.hds-button--supplementary.hds-button--theme-black{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline)}.hds-icon{--icon-size:100%;background-color:currentcolor;display:inline-block;height:var(--icon-size);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:auto;mask-size:auto;width:var(--icon-size)}.hds-icon.hds-icon--size-xs{--icon-size:var(--spacing-layout-2-xs)}.hds-icon.hds-icon--size-s{--icon-size:var(--spacing-layout-xs)}.hds-icon.hds-icon--size-m{--icon-size:var(--spacing-layout-s)}.hds-icon.hds-icon--size-l{--icon-size:var(--spacing-layout-m)}.hds-icon.hds-icon--size-xl{--icon-size:var(--spacing-layout-l)}.hds-icon--angle-right{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.5 12l-5-5L10 5.5l6.5 6.5-6.5 6.5L8.5 17l5-5z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.5 12l-5-5L10 5.5l6.5 6.5-6.5 6.5L8.5 17l5-5z' fill='currentColor'/%3E%3C/svg%3E")}.hds-icon--angle-left{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.5 12l5 5-1.5 1.5L7.5 12 14 5.5 15.5 7l-5 5z' fill='currentColor'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.5 12l5 5-1.5 1.5L7.5 12 14 5.5 15.5 7l-5 5z' fill='currentColor'/%3E%3C/svg%3E")}.hds-pagination-container{text-align:center}.hds-pagination{display:inline-block;font-size:var(--fontsize-body-m);font-weight:700;line-height:var(--lineheight-l);position:relative;transform:scaleY(-1);--active-page-background-color:var(--color-black);--link-height:40px}.hds-pagination:before{content:attr(data-next);content:attr(data-next)/"";display:block;float:right;line-height:56px;padding-left:80px;speak:never;visibility:hidden}.hds-pagination .hds-pagination__button-prev{float:left;margin-right:8px;transform:scaleY(-1);white-space:nowrap}.hds-pagination .hds-pagination__button-next{position:absolute;right:0;top:0;transform:scaleY(-1);white-space:nowrap}.hds-pagination__pages{display:inline-flex;flex-wrap:wrap;grid-gap:var(--spacing-2-xs);gap:var(--spacing-2-xs);justify-content:center;list-style:none;margin-bottom:0;margin-top:8px;padding:0;transform:scaleY(-1)}.hds-pagination__item-link{align-items:center;border-radius:21px;color:var(--color-black-90);display:flex;height:var(--link-height);justify-content:center;min-width:32px;padding-left:var(--spacing-3-xs);padding-right:var(--spacing-3-xs);text-decoration:none}.hds-pagination__item-link:hover{text-decoration:underline}.hds-pagination__item-link:active,.hds-pagination__item-link:focus{outline:solid var(--color-focus-outline) 3px;outline-offset:1px}.hds-pagination__item-link.hds-pagination__item-link--active{background-color:var(--active-page-background-color);color:var(--color-white)}.hds-pagination__item-link.hds-pagination__item-link--active:hover{text-decoration:none}.hds-pagination__item-ellipsis{align-items:center;color:var(--color-black-90);display:flex;height:var(--link-height);justify-content:center;width:40px} +/*# sourceMappingURL=2.4a6229c5.chunk.css.map */ \ No newline at end of file diff --git a/docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css.map b/docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css.map new file mode 100644 index 00000000000..cdb4d220f43 --- /dev/null +++ b/docs/mobile-menu-demo/static/css/2.4a6229c5.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://node_modules/hds-core/lib/components/notification/notification.css","webpack://node_modules/hds-core/lib/components/tag/tag.css","webpack://node_modules/hds-core/lib/components/pagination/pagination.css"],"names":[],"mappings":"AAmCA,6BACE,gRAA6X,CAC7X,wQACF,CAEA,6BACE,6RAA6Y,CAC7Y,qRACF,CAEA,sBACE,mZAA4f,CAC5f,2YACF,CAEA,4BACE,4UAAqiB,CACriB,oUACF,CAEA,kBACE,uDAAwD,CACxD,6CAA8C,CAC9C,+CAAgD,CAChD,2CAA4C,CAC5C,0CAA2C,CAC3C,oCAAqC,CACrC,oCAAqC,CACrC,kCAAmC,CACnC,+BAAgC,CAChC,6CAA8C,CAC9C,uCAAwC,CAExC,qDAAsD,CACtD,6CAA8C,CAC9C,kDAAoD,CAApD,qBAAoD,CAApD,oBAAoD,CAApD,kBAAoD,CACpD,qBAAsB,CACtB,+BAAgC,CAChC,8CAA+C,CAC/C,mCAAoC,CACpC,iBAAkB,CAClB,UAAW,CACX,0CACF,CAIA,2BACE,YAAa,CAEb,yBAAqB,CAArB,oBACF,CAIA,yBACE,sBAAuB,CACvB,YAAa,CACb,oCAAqC,CACrC,eAAiB,CACjB,mBAAqB,CACrB,gBAAiB,CACjB,6BACF,CAEA,mCACE,oCAAqC,CACrC,SAAU,CACV,gCACF,CAIA,wBACE,gCAAiC,CACjC,gBACF,CAIA,yBACE,0CACF,CAEA,oDACE,YAAa,CAEb,UAAM,CAAN,KACF,CAEA,kDACE,cACF,CAEA,iDACE,6BACF,CAIA,yBACE,uCACF,CAEA,kDACE,cACF,CAIA,4BACE,oCACF,CAIA,gCACE,mDAAoD,CAEpD,eAAgB,CAChB,WAAY,CACZ,cAAe,CACf,YAAa,CACb,YAAa,CACb,SAAU,CACV,iBAAkB,CAClB,6CAA8C,CAC9C,2CACF,CAEA,kHAEE,sDACF,CAEA,sCACE,+CACF,CAIA,uLAME,mBAAkD,CAAlD,qBAAkD,CAAlD,oBAAkD,CAAlD,iDAAkD,CAClD,6CAA8C,CAC9C,cAAe,CACf,mCAAoC,CACpC,yCACF,CAEA,4BACE,+BAAgC,CAChC,8BACF,CAEA,8BACE,QAAS,CACT,8BAA+B,CAC/B,0BACF,CAEA,6BACE,gCAAiC,CACjC,8BACF,CAEA,+BACE,iCAAkC,CAClC,+BACF,CAEA,iCACE,iCAAkC,CAClC,QAAS,CACT,0BACF,CAEA,gCACE,iCAAkC,CAClC,gCACF,CAEA,4CACE,kBACE,sCACF,CACF,CAIA,2BACE,0DAA2D,CAC3D,gDAAiD,CACjD,8CACF,CAEA,yBACE,wDAAyD,CACzD,mDAAoD,CACpD,iDACF,CAEA,yBACE,wDAAyD,CACzD,8CAA+C,CAC/C,4CACF,CAIA,8BACE,8BACF,CCxNA,iBACE,iTAAyU,CACzU,ySACF,CAEA,SACE,sCAAuC,CACvC,iCAAkC,CAClC,sCAAuC,CACvC,iCAAkC,CAClC,iBAAkB,CAElB,kBAAmB,CACnB,sCAAuC,CACvC,kBAAsB,CACtB,sBAAuB,CACvB,mBAAoB,CACpB,kBAAqB,CACrB,8BAA+B,CAC/B,6BAA8B,CAC9B,4BAA6B,CAC7B,YACF,CAEA,gBACE,sCAAwC,CACxC,8BAAkC,CAClC,iBAAsB,CAEtB,kBAAsB,CACtB,kBACF,CAEA,qCAEE,+CACF,CAEA,uBACE,cACF,CAEA,gBACE,+BAAgC,CAChC,4BACF,CAEA,iCACE,gCACF,CAEA,wBACE,YAAa,CACb,uCAA0C,CAC1C,YACD,CAED,kCACE,uBAAwB,CACxB,sBACF,CC/FA,YACE,kBAAmB,CACnB,eAAgB,CAChB,eAAgB,CAChB,oBAAqB,CACrB,mBAAoB,CAEpB,wBAAyB,CACzB,kBAAmB,CAMnB,yBAA0B,CAC1B,4BAAsD,CAAtD,oDAAsD,CACtD,gEAAkE,CAClE,eAAgB,CAChB,kBAAmB,CACnB,cAAe,CACf,mBAAoB,CAMpB,mBAAoB,CACpB,cAAe,CACf,eAAgB,CAChB,sBAAuB,CAOvB,gBAAiB,CACjB,QAAS,CACT,0BAA2B,CAC3B,yBAA0B,CAC1B,6BAA8B,CAC9B,iBAAkB,CAMlB,mBAAoB,CACpB,kBACF,CAEA,sGAME,qBACF,CAOA,0EACE,yBACF,CAOA,8JACE,iBAAkB,CAClB,SACF,CAOA,kJACE,6BACF,CAWA,sEAEE,wBAAyB,CACzB,uDAA0D,CAC1D,mCACF,CAEA,kBACE,4BAA4D,CAA5D,0DAA4D,CAC5D,wBACF,CAcA,uEACE,4BAA4D,CAA5D,0DAA4D,CAC5D,wBAAyB,CACzB,YACF,CAEA,2BACE,wBAA8C,CAA9C,4CACF,CAEA,qBACE,4BAA+D,CAA/D,6DAA+D,CAC/D,wBAAuD,CAAvD,qDAAuD,CACvD,2BAA4B,CAC5B,kBACF,CAUA,yFACE,4BAAkE,CAAlE,gEACF,CAEA,iCACE,wBAAoD,CAApD,kDACF,CAUA,oHACE,wBAAoD,CAApD,kDACF,CAYA,sIACE,wBAA0D,CAA1D,wDAA0D,CAC1D,8BACF,CAIA,kBACE,WAAY,CAEZ,6CAA8C,CAC9C,UAAW,CACX,kBAAmB,CACnB,iBAAkB,CAClB,iBACF,CAcA,yFACE,4FAAyG,CAEzG,uCACF,CAEA,iDAEE,mBAAoB,CACpB,kBAAmB,CACnB,wBACF,CAEA,8BACE,cAAe,CACf,yCACF,CAQA,wFACE,iKACF,CAIA,8BACE,4BACF,CAEA,2EAEE,+BAAgC,CAChC,6CACF,CAIA,0DACE,iCACF,CAIA,iDACE,0BACF,CAIA,mEACE,gCACF,CAIA,yEACE,gCAAiC,CACjC,iCACF,CAIA,mBACE,SACF,CAEA,qCACE,4CACF,CAIA,6EACE,+CACF,CAIA,uBACE,UACF,CAMA,sBACE,uBAAwB,CACxB,4BAA6B,CAC7B,sBACF,CAIA,6BACE,6BACF,CAIA,6BACE,+BACF,CAIA,4DACE,gCACF,CAIA,uDACE,gCACF,CAIA,uDACE,gCACF,CAIA,4DACE,gCACF,CAIA,4DACE,gCACF,CAMA,qBACE,mCAAoC,CACpC,8CAA+C,CAC/C,yCAA0C,CAC1C,oDAAqD,CACrD,iDAAkD,CAClD,+BAAgC,CAChC,0CAA2C,CAC3C,qCAAsC,CACtC,gDAAiD,CACjD,6CAA8C,CAC9C,0BAA2B,CAC3B,gCAAiC,CACjC,gCAAiC,CACjC,sCAAuC,CACvC,mCAAoC,CACpC,gDAAiD,CACjD,oDACF,CAMA,uBAME,+BAAgC,CAChC,0CAA2C,CAC3C,qCAAsC,CACtC,gDAAiD,CACjD,6CAA8C,CAM9C,gDAAiD,CACjD,oDACF,CAIA,kDArBE,8BAA+B,CAC/B,+CAAgD,CAChD,oCAAqC,CACrC,qDAAsD,CACtD,uCAAwC,CAMxC,wBAAyB,CACzB,mCAAoC,CACpC,8BAA+B,CAC/B,yCAA0C,CAC1C,sCAyBF,CAlBA,2BAME,0BAA2B,CAC3B,gCAAiC,CACjC,+CAAgD,CAChD,qDAAsD,CACtD,mCAAoC,CAMpC,iCAAkC,CAClC,6CACF,CAIA,qBACE,8BAA+B,CAC/B,oCAAqC,CACrC,oCAAqC,CACrC,0CAA2C,CAC3C,uCAAwC,CACxC,0BAA2B,CAC3B,gCAAiC,CACjC,gCAAiC,CACjC,sCAAuC,CACvC,mCAAoC,CACpC,6BAA8B,CAC9B,mCAAoC,CACpC,mCAAoC,CACpC,yCAA0C,CAC1C,sCAAuC,CAEvC,WACF,CAMA,qBACE,uCAAwC,CACxC,kDAAmD,CACnD,6CAA8C,CAC9C,wDAAyD,CACzD,mCAAoC,CACpC,8CAA+C,CAC/C,yCAA0C,CAC1C,oDAMF,CAIA,yCATE,0BAA2B,CAC3B,gCAAiC,CACjC,gCAAiC,CACjC,sCAAuC,CACvC,gDAmBF,CAdA,oBACE,qCAAsC,CACtC,gDAAiD,CACjD,2CAA4C,CAC5C,sDAAuD,CACvD,iCAAkC,CAClC,4CAA6C,CAC7C,uCAAwC,CACxC,kDAMF,CAMA,4CACE,4CAA6C,CAC7C,uDAAwD,CACxD,kDAAmD,CACnD,6DAA8D,CAC9D,wCAAyC,CACzC,mDAAoD,CACpD,8CAA+C,CAC/C,yDAA0D,CAC1D,0BAA2B,CAC3B,gCAAiC,CACjC,gCAAiC,CACjC,sCACF,CAEA,8CAKE,wCAAyC,CACzC,mDAAoD,CACpD,8CAA+C,CAC/C,yDAKF,CAEA,gGAdE,8BAA+B,CAC/B,wDAAyD,CACzD,oCAAqC,CACrC,8DAA+D,CAK/D,iCAAkC,CAClC,uCAAwC,CACxC,uCAAwC,CACxC,6CAgBF,CAbA,kDAKE,0BAA2B,CAC3B,gCAAiC,CACjC,+CAAgD,CAChD,qDAKF,CAIA,6CACE,qCAAsC,CACtC,2CAA4C,CAC5C,2CAA4C,CAC5C,iDAAkD,CAClD,iCAAkC,CAClC,uCAAwC,CACxC,uCAAwC,CACxC,6CAA8C,CAC9C,0BAA2B,CAC3B,gCAAiC,CACjC,gCAAiC,CACjC,sCACF,CAEA,+CAKE,iCAAkC,CAClC,uCAAwC,CACxC,uCAAwC,CACxC,6CAKF,CAEA,kGAdE,8BAA+B,CAC/B,6CAA8C,CAC9C,oCAAqC,CACrC,mDAAoD,CAKpD,0BAA2B,CAC3B,gCAAiC,CACjC,gCAAiC,CACjC,sCAgBF,CAbA,mDAKE,0BAA2B,CAC3B,gCAAiC,CACjC,+CAAgD,CAChD,qDAKF,CAEA,UACE,gBAAiB,CAEjB,6BAA8B,CAC9B,oBAAqB,CACrB,uBAAwB,CACxB,4BAA6B,CAC7B,oBAAqB,CACrB,6BAA8B,CAC9B,qBAAsB,CACtB,sBAAuB,CACvB,cAAe,CACf,sBACF,CAEA,4BACE,sCACF,CAEA,2BACE,oCACF,CAEA,2BACE,mCACF,CAEA,2BACE,mCACF,CAEA,4BACE,mCACF,CAEA,uBACE,iQAA8R,CAC9R,yPACF,CAEA,sBACE,gQAA+R,CAC/R,wPACF,CAEA,0BACE,iBACF,CAEA,gBACE,oBAAqB,CACrB,gCAAiC,CACjC,eAAiB,CACjB,+BAAgC,CAChC,iBAAkB,CAClB,oBAAqB,CAErB,iDAAkD,CAClD,kBACF,CAKA,uBACE,uBAAwB,CACxB,0BAA6B,CAC7B,aAAc,CACd,WAAY,CACZ,gBAAiB,CACjB,iBAAkB,CAClB,WAAY,CACZ,iBACF,CAEA,6CACE,UAAW,CACX,gBAAiB,CACjB,oBAAqB,CACrB,kBACF,CAEA,6CACE,iBAAkB,CAClB,OAAQ,CACR,KAAM,CACN,oBAAqB,CACrB,kBACF,CAEA,uBACE,mBAAoB,CACpB,cAAe,CAEf,4BAAwB,CAAxB,uBAAwB,CACxB,sBAAuB,CACvB,eAAgB,CAChB,eAAgB,CAChB,cAAe,CACf,SAAU,CACV,oBACF,CAEA,2BACE,kBAAmB,CACnB,kBAAmB,CACnB,2BAA4B,CAC5B,YAAa,CACb,yBAA0B,CAC1B,sBAAuB,CACvB,cAAe,CACf,gCAAiC,CACjC,iCAAkC,CAClC,oBACF,CAEA,iCACE,yBACF,CAEA,mEACE,4CAA6C,CAC7C,kBACF,CAEA,6DACE,oDAAqD,CACrD,wBACF,CAEA,mEACE,oBACF,CAEA,+BACE,kBAAmB,CACnB,2BAA4B,CAC5B,YAAa,CACb,yBAA0B,CAC1B,sBAAuB,CACvB,UACF","file":"2.4a6229c5.chunk.css","sourcesContent":[".hds-icon {\n --icon-size: 100%;\n\n background-color: currentcolor;\n display: inline-block;\n height: var(--icon-size);\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: auto;\n mask-size: auto;\n width: var(--icon-size);\n}\n\n.hds-icon.hds-icon--size-xs {\n --icon-size: var(--spacing-layout-2-xs);\n}\n\n.hds-icon.hds-icon--size-s {\n --icon-size: var(--spacing-layout-xs);\n}\n\n.hds-icon.hds-icon--size-m {\n --icon-size: var(--spacing-layout-s);\n}\n\n.hds-icon.hds-icon--size-l {\n --icon-size: var(--spacing-layout-m);\n}\n\n.hds-icon.hds-icon--size-xl {\n --icon-size: var(--spacing-layout-l);\n}\n\n.hds-icon--alert-circle-fill {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM13 16V18H11V16H13ZM13 6V14H11V6H13Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM13 16V18H11V16H13ZM13 6V14H11V6H13Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-icon--check-circle-fill {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM16.5 8L18 9.5L10.5 17L6 12.5L7.5 11L10.5 14L16.5 8Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM16.5 8L18 9.5L10.5 17L6 12.5L7.5 11L10.5 14L16.5 8Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-icon--error-fill {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.175 3.45608C11.5239 2.86969 12.3977 2.84875 12.7842 3.39325L12.825 3.45608L21.8771 18.6666C22.2202 19.2432 21.8055 19.951 21.1235 19.9976L21.052 20H2.94799C2.24813 20 1.7987 19.3114 2.09013 18.7267L2.12295 18.6666L11.175 3.45608ZM13 16V18H11V16H13ZM13 8.5V14.5H11V8.5H13Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.175 3.45608C11.5239 2.86969 12.3977 2.84875 12.7842 3.39325L12.825 3.45608L21.8771 18.6666C22.2202 19.2432 21.8055 19.951 21.1235 19.9976L21.052 20H2.94799C2.24813 20 1.7987 19.3114 2.09013 18.7267L2.12295 18.6666L11.175 3.45608ZM13 16V18H11V16H13ZM13 8.5V14.5H11V8.5H13Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-icon--info-circle-fill {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM13 10V16.5H15V18H9V16.5H11V11.5H9V10H13ZM11.8125 6C12.5374 6 13.125 6.5876 13.125 7.3125C13.125 8.03735 12.5374 8.625 11.8125 8.625C11.0876 8.625 10.5 8.03735 10.5 7.3125C10.5 6.5876 11.0876 6 11.8125 6Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM13 10V16.5H15V18H9V16.5H11V11.5H9V10H13ZM11.8125 6C12.5374 6 13.125 6.5876 13.125 7.3125C13.125 8.03735 12.5374 8.625 11.8125 8.625C11.0876 8.625 10.5 8.03735 10.5 7.3125C10.5 6.5876 11.0876 6 11.8125 6Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-notification {\n --notification-background-color: var(--color-info-light);\n --notification-border-color: var(--color-info);\n --notification-border-width: var(--spacing-2-xs);\n --notification-icon-color: var(--color-info);\n --notification-color: var(--color-black-90);\n --notification-max-width-inline: none;\n --notification-max-width-toast: 21rem;\n --notification-z-index-inline: auto;\n --notification-z-index-toast: 99;\n --notification-offset: var(--spacing-layout-s);\n --notification-padding: var(--spacing-s);\n\n background-color: var(--notification-background-color);\n border: solid var(--notification-border-color);\n border-width: 0 0 0 var(--notification-border-width);\n box-sizing: border-box;\n color: var(--notification-color);\n max-width: var(--notification-max-width-inline);\n padding: var(--notification-padding);\n position: relative;\n width: 100%;\n z-index: var(--notification-z-index-inline);\n}\n\n/* CONTENT */\n\n.hds-notification__content {\n display: grid;\n grid-gap: var(--spacing-s);\n gap: var(--spacing-s);\n}\n\n/* LABEL */\n\n.hds-notification__label {\n align-items: flex-start;\n display: flex;\n font-size: var(--fontsize-heading-xs);\n font-weight: bold;\n letter-spacing: 0.4px;\n line-height: 24px;\n margin-right: var(--spacing-l);\n}\n\n.hds-notification__label > .hds-icon {\n color: var(--notification-icon-color);\n flex: none;\n margin-right: var(--spacing-2-xs);\n}\n\n/* BODY */\n\n.hds-notification__body {\n font-size: var(--fontsize-body-s);\n line-height: 24px;\n}\n\n/* SMALL */\n\n.hds-notification--small {\n --notification-padding: var(--spacing-2-xs);\n}\n\n.hds-notification--small .hds-notification__content {\n display: flex;\n grid-gap: 0;\n gap: 0;\n}\n\n.hds-notification--small .hds-notification__label {\n margin-right: 0;\n}\n\n.hds-notification--small .hds-notification__body {\n margin-right: var(--spacing-l);\n}\n\n/* LARGE */\n\n.hds-notification--large {\n --notification-padding: var(--spacing-l);\n}\n\n.hds-notification--large .hds-notification__label {\n margin-right: 0;\n}\n\n/* ICON */\n\n.hds-notification .hds-icon {\n --icon-size: var(--spacing-layout-xs);\n}\n\n/* CLOSE BUTTON */\n\n.hds-notification__close-button {\n --notification-close-button-offset: var(--spacing-s);\n\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n outline: none;\n padding: 0;\n position: absolute;\n right: var(--notification-close-button-offset);\n top: var(--notification-close-button-offset);\n}\n\n.hds-notification--small .hds-notification__close-button,\n.hds-notification--large .hds-notification__close-button {\n --notification-close-button-offset: var(--spacing-2-xs);\n}\n\n.hds-notification__close-button:focus {\n box-shadow: 0 0 0 3px var(--color-focus-outline);\n}\n\n/* TOAST POSITIONS */\n\n.hds-notification--top-left,\n.hds-notification--top-center,\n.hds-notification--top-right,\n.hds-notification--bottom-left,\n.hds-notification--bottom-center,\n.hds-notification--bottom-right {\n border-width: var(--notification-border-width) 0 0;\n max-width: var(--notification-max-width-toast);\n position: fixed;\n width: calc(100% - var(--spacing-l));\n z-index: var(--notification-z-index-toast);\n}\n\n.hds-notification--top-left {\n left: var(--notification-offset);\n top: var(--notification-offset);\n}\n\n.hds-notification--top-center {\n left: 50%;\n top: var(--notification-offset);\n transform: translateX(-50%);\n}\n\n.hds-notification--top-right {\n right: var(--notification-offset);\n top: var(--notification-offset);\n}\n\n.hds-notification--bottom-left {\n bottom: var(--notification-offset);\n left: var(--notification-offset);\n}\n\n.hds-notification--bottom-center {\n bottom: var(--notification-offset);\n left: 50%;\n transform: translateX(-50%);\n}\n\n.hds-notification--bottom-right {\n bottom: var(--notification-offset);\n right: var(--notification-offset);\n}\n\n@media only screen and (max-width: 765.98px) {\n .hds-notification {\n --notification-offset: var(--spacing-s);\n }\n}\n\n/* TYPES */\n\n.hds-notification--success {\n --notification-background-color: var(--color-success-light);\n --notification-border-color: var(--color-success);\n --notification-icon-color: var(--color-success);\n}\n\n.hds-notification--alert {\n --notification-background-color: var(--color-alert-light);\n --notification-border-color: var(--color-alert-dark);\n --notification-icon-color: var(--color-alert-dark);\n}\n\n.hds-notification--error {\n --notification-background-color: var(--color-error-light);\n --notification-border-color: var(--color-error);\n --notification-icon-color: var(--color-error);\n}\n\n/* BOX SHADOW */\n\n.hds-notification--box-shadow {\n box-shadow: var(--box-shadow-l);\n}\n",".hds-icon {\n --icon-size: 100%;\n\n background-color: currentcolor;\n display: inline-block;\n height: var(--icon-size);\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: auto;\n mask-size: auto;\n width: var(--icon-size);\n}\n\n.hds-icon.hds-icon--size-xs {\n --icon-size: var(--spacing-layout-2-xs);\n}\n\n.hds-icon.hds-icon--size-s {\n --icon-size: var(--spacing-layout-xs);\n}\n\n.hds-icon.hds-icon--size-m {\n --icon-size: var(--spacing-layout-s);\n}\n\n.hds-icon.hds-icon--size-l {\n --icon-size: var(--spacing-layout-m);\n}\n\n.hds-icon.hds-icon--size-xl {\n --icon-size: var(--spacing-layout-l);\n}\n\n.hds-icon--cross {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 7.5L13.5 12L18 16.5L16.5 18L12 13.5L7.5 18L6 16.5L10.5 12L6 7.5L7.5 6L12 10.5L16.5 6L18 7.5Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 7.5L13.5 12L18 16.5L16.5 18L12 13.5L7.5 18L6 16.5L10.5 12L6 7.5L7.5 6L12 10.5L16.5 6L18 7.5Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-tag {\n --tag-background: var(--color-black-10);\n --tag-color: var(--color-black-90);\n --tag-font-size: var(--fontsize-body-s);\n --tag-spacing: var(--spacing-2-xs);\n --tag-height: 32px;\n\n align-items: center;\n background-color: var(--tag-background);\n border-radius: 20px;\n color: var(--tag-color);\n display: inline-flex;\n flex-direction: row;\n font-size: var(--tag-font-size);\n line-height: var(--tag-height);\n min-height: var(--tag-height);\n outline: none;\n}\n\n.hds-tag--large {\n --tag-font-size: var(--fontsize-body-m);\n --tag-spacing: var(--spacing-s);\n --tag-height: 48px;\n\n border-radius: 24px;\n flex-direction: row;\n}\n\n.hds-tag:focus,\n.hds-tag:focus-within {\n box-shadow: 0 0 0 3px var(--color-focus-outline);\n}\n\n.hds-tag[tabindex='0'] {\n cursor: pointer;\n}\n\n.hds-tag__label {\n line-height: var(--lineheight-m);\n padding: 0 var(--tag-spacing);\n}\n\n.hds-tag__label:not(:only-child) {\n padding: 0 0 0 var(--tag-spacing);\n}\n\n.hds-tag__delete-button {\n display: flex;\n margin-right: calc(var(--tag-spacing) / 2);\n outline: none;\n }\n\n.hds-tag__delete-button .hds-icon {\n height: var(--spacing-m);\n width: var(--spacing-m);\n}\n",".hds-button {\n --border-width: 2px;\n --color: inherit;\n --min-size: 44px;\n --outline-gutter: 2px;\n --outline-width: 3px;\n\n align-content: flex-start;\n align-items: center;\n\n /*\n * Normalize.css rules\n * Correct the inability to style clickable types in iOS and Safari.\n */\n -webkit-appearance: button;\n background-color: var(--background-color, transparent);\n border: var(--border-width) solid var(--border-color, transparent);\n border-radius: 0;\n color: var(--color);\n cursor: pointer;\n display: inline-flex;\n\n /*\n * Normalize.css rules\n * 1. Change the font styles in all browsers.\n */\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: 500;\n justify-content: center;\n\n /*\n * Normalize.css rules\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n min-height: var(--min-size);\n min-width: var(--min-size);\n padding: 0 var(--spacing-2-xs);\n position: relative;\n\n /*\n * Normalize.css rule\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n */\n text-transform: none;\n vertical-align: top;\n}\n\n.hds-button,\n.hds-button:before,\n.hds-button:after,\n.hds-button *,\n.hds-button *:before,\n.hds-button *:after {\n box-sizing: border-box;\n}\n\n/*\n * Normalize.css rules\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\n.hds-button[type=\"button\"], .hds-button[type=\"reset\"], .hds-button[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/*\n * Normalize.css rules\n * Remove the inner border and padding in Firefox.\n */\n\n.hds-button::-moz-focus-inner, .hds-button[type=\"button\"]::-moz-focus-inner, .hds-button[type=\"reset\"]::-moz-focus-inner, .hds-button[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/*\n * Normalize.css rules\n * Restore the focus styles unset by the previous rule.\n */\n\n.hds-button:-moz-focusring, .hds-button[type=\"button\"]:-moz-focusring, .hds-button[type=\"reset\"]:-moz-focusring, .hds-button[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/* button transitions */\n\n.hds-button:hover,\n.hds-button.focus-visible {\n transition-duration: 85ms;\n transition-property: background-color, border-color, color;\n transition-timing-function: ease-out;\n}\n\n.hds-button:hover,\n.hds-button:focus-visible {\n transition-duration: 85ms;\n transition-property: background-color, border-color, color;\n transition-timing-function: ease-out;\n}\n\n.hds-button:hover {\n background-color: var(--background-color-hover, transparent);\n color: var(--color-hover);\n}\n\n.hds-button.focus-visible {\n background-color: var(--background-color-focus, transparent);\n color: var(--color-focus);\n outline: none;\n}\n\n.hds-button:focus-visible {\n background-color: var(--background-color-focus, transparent);\n color: var(--color-focus);\n outline: none;\n}\n\n.hds-button:active {\n background-color: var(--background-color-focus, transparent);\n color: var(--color-focus);\n outline: none;\n}\n\n.hds-button:not(:disabled) {\n border-color: var(--border-color, transparent);\n}\n\n.hds-button:disabled {\n background-color: var(--background-color-disabled, transparent);\n border-color: var(--border-color-disabled, transparent);\n color: var(--color-disabled);\n cursor: not-allowed;\n}\n\n.hds-button.focus-visible:hover {\n background-color: var(--background-color-hover-focus, transparent);\n}\n\n.hds-button:focus-visible:hover {\n background-color: var(--background-color-hover-focus, transparent);\n}\n\n.hds-button:active:hover {\n background-color: var(--background-color-hover-focus, transparent);\n}\n\n.hds-button:not(:disabled):hover {\n border-color: var(--border-color-hover, transparent);\n}\n\n.hds-button:not(:disabled).focus-visible {\n border-color: var(--border-color-focus, transparent);\n}\n\n.hds-button:not(:disabled):focus-visible {\n border-color: var(--border-color-focus, transparent);\n}\n\n.hds-button:not(:disabled):active {\n border-color: var(--border-color-focus, transparent);\n}\n\n.hds-button:not(:disabled).focus-visible:hover {\n border-color: var(--border-color-hover-focus, transparent);\n color: var(--color-hover-focus);\n}\n\n.hds-button:not(:disabled):focus-visible:hover {\n border-color: var(--border-color-hover-focus, transparent);\n color: var(--color-hover-focus);\n}\n\n.hds-button:not(:disabled):active:hover {\n border-color: var(--border-color-hover-focus, transparent);\n color: var(--color-hover-focus);\n}\n\n/* FOCUS OUTLINE */\n\n.hds-button:after {\n --size: 100%;\n\n border: var(--outline-width) solid transparent;\n content: '';\n height: var(--size);\n position: absolute;\n width: var(--size);\n}\n\n.hds-button.focus-visible:after {\n --size: calc(100% + calc(var(--outline-width) * 2 + var(--border-width) * 2 + var(--outline-gutter) * 2));\n\n border-color: var(--focus-outline-color);\n}\n\n.hds-button:focus-visible:after {\n --size: calc(100% + calc(var(--outline-width) * 2 + var(--border-width) * 2 + var(--outline-gutter) * 2));\n\n border-color: var(--focus-outline-color);\n}\n\n.hds-button:active:after {\n --size: calc(100% + calc(var(--outline-width) * 2 + var(--border-width) * 2 + var(--outline-gutter) * 2));\n\n border-color: var(--focus-outline-color);\n}\n\ninput[type=\"submit\"].hds-button,\n.hds-button__label {\n font-weight: inherit;\n line-height: 1.25em;\n padding: var(--spacing-s);\n}\n\ninput[type=\"submit\"].hds-button {\n cursor: pointer;\n padding: var(--spacing-s) var(--spacing-l);\n}\n\n/* submit input */\n\ninput[type=\"submit\"].hds-button.focus-visible {\n box-shadow: 0 0 0 var(--outline-gutter) var(--submit-input-focus-gutter-color), 0 0 0 calc(var(--outline-gutter) + var(--outline-width)) var(--focus-outline-color);\n}\n\ninput[type=\"submit\"].hds-button:focus-visible {\n box-shadow: 0 0 0 var(--outline-gutter) var(--submit-input-focus-gutter-color), 0 0 0 calc(var(--outline-gutter) + var(--outline-width)) var(--focus-outline-color);\n}\n\n/* no icons */\n\n.hds-button__label:only-child {\n margin: 0 var(--spacing-2-xs);\n}\n\ninput[type=\"submit\"].hds-button--small,\n.hds-button--small .hds-button__label {\n line-height: var(--lineheight-s);\n padding: var(--spacing-2-xs) var(--spacing-xs);\n}\n\n/* supplementary with right icon */\n\n.hds-button--supplementary .hds-button__label:first-child {\n padding-right: var(--spacing-2-xs);\n}\n\n/* no icons */\n\n.hds-button--small .hds-button__label:only-child {\n margin: 0 var(--spacing-xs);\n}\n\n/* supplementary with left icon */\n\n.hds-button--supplementary .hds-icon + .hds-button__label:last-child {\n padding-left: var(--spacing-2-xs);\n}\n\n/* supplementary with both icons */\n\n.hds-button--supplementary .hds-icon + .hds-button__label:not(:last-child) {\n padding-left: var(--spacing-2-xs);\n padding-right: var(--spacing-2-xs);\n}\n\n/* SMALL */\n\n.hds-button--small {\n padding: 0;\n}\n\ninput[type=\"submit\"].hds-button--small {\n padding: var(--spacing-2-xs) var(--spacing-m);\n}\n\n/* both icons */\n\n.hds-button--small .hds-button__label:not(:first-of-type):not(:last-of-type) {\n padding: var(--spacing-2-xs) var(--spacing-2-xs);\n}\n\n/* FULL WIDTH */\n\n.hds-button--fullwidth {\n width: 100%;\n}\n\n/* ICONS */\n\n/* left */\n\n.hds-button .hds-icon {\n height: var(--spacing-m);\n margin-left: var(--spacing-s);\n width: var(--spacing-m);\n}\n\n/* right */\n\n.hds-button__label ~ .hds-icon {\n margin: 0 var(--spacing-s) 0 0;\n}\n\n/* left - small */\n\n.hds-button--small .hds-icon {\n margin-left: var(--spacing-2-xs);\n}\n\n/* right - small */\n\n.hds-button .hds-button--small .hds-button__label ~ .hds-icon {\n margin: 0 var(--spacing-2-xs) 0 0;\n}\n\n/* both icons - left */\n\n.hds-button .hds-icon:first-of-type:not(:last-of-type) {\n margin: 0 0 0 var(--spacing-2-xs);\n}\n\n/* both icons - right */\n\n.hds-button .hds-icon:last-of-type:not(:first-of-type) {\n margin: 0 var(--spacing-2-xs) 0 0;\n}\n\n/* both icons - left - small */\n\n.hds-button--small .hds-icon:first-child:not(:last-of-type) {\n margin: 0 0 0 var(--spacing-2-xs);\n}\n\n/* both icons - right - small */\n\n.hds-button--small .hds-icon:last-child:not(:first-of-type) {\n margin: 0 var(--spacing-2-xs) 0 0;\n}\n\n/* PRIMARY */\n\n/* default (bus) */\n\n.hds-button--primary {\n --background-color: var(--color-bus);\n --background-color-hover: var(--color-bus-dark);\n --background-color-focus: var(--color-bus);\n --background-color-hover-focus: var(--color-bus-dark);\n --background-color-disabled: var(--color-black-20);\n --border-color: var(--color-bus);\n --border-color-hover: var(--color-bus-dark);\n --border-color-focus: var(--color-bus);\n --border-color-hover-focus: var(--color-bus-dark);\n --border-color-disabled: var(--color-black-20);\n --color: var(--color-white);\n --color-hover: var(--color-white);\n --color-focus: var(--color-white);\n --color-hover-focus: var(--color-white);\n --color-disabled: var(--color-white);\n --focus-outline-color: var(--color-focus-outline);\n --submit-input-focus-gutter-color: var(--color-white);\n}\n\n/* SECONDARY */\n\n/* default (bus) */\n\n.hds-button--secondary {\n --background-color: transparent;\n --background-color-hover: var(--color-bus-light);\n --background-color-focus: transparent;\n --background-color-hover-focus: var(--color-bus-light);\n --background-color-disabled: transparent;\n --border-color: var(--color-bus);\n --border-color-hover: var(--color-bus-dark);\n --border-color-focus: var(--color-bus);\n --border-color-hover-focus: var(--color-bus-dark);\n --border-color-disabled: var(--color-black-50);\n --color: var(--color-bus);\n --color-hover: var(--color-bus-dark);\n --color-focus: var(--color-bus);\n --color-hover-focus: var(--color-bus-dark);\n --color-disabled: var(--color-black-40);\n --focus-outline-color: var(--color-focus-outline);\n --submit-input-focus-gutter-color: var(--color-white);\n}\n\n/* SUPPLEMENTARY */\n\n.hds-button--supplementary {\n --background-color: transparent;\n --background-color-hover: var(--color-bus-light);\n --background-color-focus: transparent;\n --background-color-hover-focus: var(--color-bus-light);\n --background-color-disabled: transparent;\n --border-color: transparent;\n --border-color-hover: transparent;\n --border-color-focus: var(--color-focus-outline);\n --border-color-hover-focus: var(--color-focus-outline);\n --border-color-disabled: transparent;\n --color: var(--color-bus);\n --color-hover: var(--color-bus-dark);\n --color-focus: var(--color-bus);\n --color-hover-focus: var(--color-bus-dark);\n --color-disabled: var(--color-black-40);\n --focus-outline-color: transparent;\n --submit-input-focus-gutter-color: transparent;\n}\n\n/* LOADING */\n\n.hds-button--loading {\n --background-color: transparent;\n --background-color-hover: transparent;\n --background-color-focus: transparent;\n --background-color-hover-focus: transparent;\n --background-color-disabled: transparent;\n --border-color: transparent;\n --border-color-hover: transparent;\n --border-color-focus: transparent;\n --border-color-hover-focus: transparent;\n --border-color-disabled: transparent;\n --color: var(--color-black-90);\n --color-hover: var(--color-black-90);\n --color-focus: var(--color-black-90);\n --color-hover-focus: var(--color-black-90);\n --color-disabled: var(--color-black-90);\n\n cursor: wait;\n}\n\n/* UTILITY */\n\n/* success */\n\n.hds-button--success {\n --background-color: var(--color-success);\n --background-color-hover: var(--color-success-dark);\n --background-color-focus: var(--color-success);\n --background-color-hover-focus: var(--color-success-dark);\n --border-color: var(--color-success);\n --border-color-hover: var(--color-success-dark);\n --border-color-focus: var(--color-success);\n --border-color-hover-focus: var(--color-success-dark);\n --color: var(--color-white);\n --color-hover: var(--color-white);\n --color-focus: var(--color-white);\n --color-hover-focus: var(--color-white);\n --focus-outline-color: var(--color-focus-outline);\n}\n\n/* danger */\n\n.hds-button--danger {\n --background-color: var(--color-error);\n --background-color-hover: var(--color-error-dark);\n --background-color-focus: var(--color-error);\n --background-color-hover-focus: var(--color-error-dark);\n --border-color: var(--color-error);\n --border-color-hover: var(--color-error-dark);\n --border-color-focus: var(--color-error);\n --border-color-hover-focus: var(--color-error-dark);\n --color: var(--color-white);\n --color-hover: var(--color-white);\n --color-focus: var(--color-white);\n --color-hover-focus: var(--color-white);\n --focus-outline-color: var(--color-focus-outline);\n}\n\n/* THEMES */\n\n/* coat */\n\n.hds-button--primary.hds-button--theme-coat {\n --background-color: var(--color-coat-of-arms);\n --background-color-hover: var(--color-coat-of-arms-dark);\n --background-color-focus: var(--color-coat-of-arms);\n --background-color-hover-focus: var(--color-coat-of-arms-dark);\n --border-color: var(--color-coat-of-arms);\n --border-color-hover: var(--color-coat-of-arms-dark);\n --border-color-focus: var(--color-coat-of-arms);\n --border-color-hover-focus: var(--color-coat-of-arms-dark);\n --color: var(--color-white);\n --color-hover: var(--color-white);\n --color-focus: var(--color-white);\n --color-hover-focus: var(--color-white);\n}\n\n.hds-button--secondary.hds-button--theme-coat {\n --background-color: transparent;\n --background-color-hover: var(--color-coat-of-arms-light);\n --background-color-focus: transparent;\n --background-color-hover-focus: var(--color-coat-of-arms-light);\n --border-color: var(--color-coat-of-arms);\n --border-color-hover: var(--color-coat-of-arms-dark);\n --border-color-focus: var(--color-coat-of-arms);\n --border-color-hover-focus: var(--color-coat-of-arms-dark);\n --color: var(--color-coat-of-arms);\n --color-hover: var(--color-coat-of-arms);\n --color-focus: var(--color-coat-of-arms);\n --color-hover-focus: var(--color-coat-of-arms);\n}\n\n.hds-button--supplementary.hds-button--theme-coat {\n --background-color: transparent;\n --background-color-hover: var(--color-coat-of-arms-light);\n --background-color-focus: transparent;\n --background-color-hover-focus: var(--color-coat-of-arms-light);\n --border-color: transparent;\n --border-color-hover: transparent;\n --border-color-focus: var(--color-focus-outline);\n --border-color-hover-focus: var(--color-focus-outline);\n --color: var(--color-coat-of-arms);\n --color-hover: var(--color-coat-of-arms);\n --color-focus: var(--color-coat-of-arms);\n --color-hover-focus: var(--color-coat-of-arms);\n}\n\n/* black */\n\n.hds-button--primary.hds-button--theme-black {\n --background-color: var(--color-black);\n --background-color-hover: var(--color-black);\n --background-color-focus: var(--color-black);\n --background-color-hover-focus: var(--color-black);\n --border-color: var(--color-black);\n --border-color-hover: var(--color-black);\n --border-color-focus: var(--color-black);\n --border-color-hover-focus: var(--color-black);\n --color: var(--color-white);\n --color-hover: var(--color-white);\n --color-focus: var(--color-white);\n --color-hover-focus: var(--color-white);\n}\n\n.hds-button--secondary.hds-button--theme-black {\n --background-color: transparent;\n --background-color-hover: var(--color-black-5);\n --background-color-focus: transparent;\n --background-color-hover-focus: var(--color-black-5);\n --border-color: var(--color-black);\n --border-color-hover: var(--color-black);\n --border-color-focus: var(--color-black);\n --border-color-hover-focus: var(--color-black);\n --color: var(--color-black);\n --color-hover: var(--color-black);\n --color-focus: var(--color-black);\n --color-hover-focus: var(--color-black);\n}\n\n.hds-button--supplementary.hds-button--theme-black {\n --background-color: transparent;\n --background-color-hover: var(--color-black-5);\n --background-color-focus: transparent;\n --background-color-hover-focus: var(--color-black-5);\n --border-color: transparent;\n --border-color-hover: transparent;\n --border-color-focus: var(--color-focus-outline);\n --border-color-hover-focus: var(--color-focus-outline);\n --color: var(--color-black);\n --color-hover: var(--color-black);\n --color-focus: var(--color-black);\n --color-hover-focus: var(--color-black);\n}\n\n.hds-icon {\n --icon-size: 100%;\n\n background-color: currentcolor;\n display: inline-block;\n height: var(--icon-size);\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: auto;\n mask-size: auto;\n width: var(--icon-size);\n}\n\n.hds-icon.hds-icon--size-xs {\n --icon-size: var(--spacing-layout-2-xs);\n}\n\n.hds-icon.hds-icon--size-s {\n --icon-size: var(--spacing-layout-xs);\n}\n\n.hds-icon.hds-icon--size-m {\n --icon-size: var(--spacing-layout-s);\n}\n\n.hds-icon.hds-icon--size-l {\n --icon-size: var(--spacing-layout-m);\n}\n\n.hds-icon.hds-icon--size-xl {\n --icon-size: var(--spacing-layout-l);\n}\n\n.hds-icon--angle-right {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-icon--angle-left {\n -webkit-mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.5 12L15.5 17L14 18.5L7.5 12L14 5.5L15.5 7L10.5 12Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.5 12L15.5 17L14 18.5L7.5 12L14 5.5L15.5 7L10.5 12Z' fill='currentColor'%3E%3C/path%3E %3C/svg%3E\");\n}\n\n.hds-pagination-container {\n text-align: center;\n}\n\n.hds-pagination {\n display: inline-block; /* Allows centering */\n font-size: var(--fontsize-body-m);\n font-weight: bold;\n line-height: var(--lineheight-l);\n position: relative; /* Enables position absolute for btn--next */\n transform: scaleY(-1); /* Trick for flipping the list float direction from bottom to up */\n\n --active-page-background-color: var(--color-black);\n --link-height: 40px;\n}\n\n/* Invisible, floated pseudo-element for reserving space for the hds-pagination__button-next,\nwe can not use this position for the actual button as it's in incorrect source order for tabbing */\n\n.hds-pagination:before {\n content: attr(data-next); /* Trick to keep floating element same size as btn--next */\n content: attr(data-next) / ''; /* Removes this pseudo-element from screen readers where supported */\n display: block;\n float: right; /* Floated pseudo-element wraps the inline ul around it */\n line-height: 56px;\n padding-left: 80px;\n speak: never; /* Removes this pseudo-element from screen readers where supported */\n visibility: hidden;\n}\n\n.hds-pagination .hds-pagination__button-prev {\n float: left;\n margin-right: 8px;\n transform: scaleY(-1); /* Flip the element back from upside down */\n white-space: nowrap;\n}\n\n.hds-pagination .hds-pagination__button-next {\n position: absolute;\n right: 0;\n top: 0; /* Remember that the position is flipped upside down, so this means actually bottom */\n transform: scaleY(-1); /* Flip the element back from upside down */\n white-space: nowrap;\n}\n\n.hds-pagination__pages {\n display: inline-flex; /* inline-flex allows floating it based on floated buttons when there is no more space */\n flex-wrap: wrap; /* Allow wrapping of the li-elements */\n grid-gap: var(--spacing-2-xs);\n gap: var(--spacing-2-xs);\n justify-content: center; /* Center the li-elements */\n list-style: none;\n margin-bottom: 0;\n margin-top: 8px;\n padding: 0;\n transform: scaleY(-1); /* Flip the element back from upside down */\n}\n\n.hds-pagination__item-link {\n align-items: center;\n border-radius: 21px;\n color: var(--color-black-90);\n display: flex;\n height: var(--link-height);\n justify-content: center;\n min-width: 32px;\n padding-left: var(--spacing-3-xs);\n padding-right: var(--spacing-3-xs);\n text-decoration: none;\n}\n\n.hds-pagination__item-link:hover {\n text-decoration: underline;\n}\n\n.hds-pagination__item-link:focus, .hds-pagination__item-link:active {\n outline: solid var(--color-focus-outline) 3px;\n outline-offset: 1px;\n}\n\n.hds-pagination__item-link.hds-pagination__item-link--active {\n background-color: var(--active-page-background-color);\n color: var(--color-white);\n}\n\n.hds-pagination__item-link.hds-pagination__item-link--active:hover {\n text-decoration: none;\n}\n\n.hds-pagination__item-ellipsis {\n align-items: center;\n color: var(--color-black-90);\n display: flex;\n height: var(--link-height);\n justify-content: center;\n width: 40px;\n}\n"]} \ No newline at end of file diff --git a/docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css b/docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css new file mode 100644 index 00000000000..8e5b188d776 --- /dev/null +++ b/docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css @@ -0,0 +1,2 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/565d73a693abe0776c801607ac28f0bf.woff) format("woff");font-display:swap;font-weight:400;font-style:normal;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/5bb29e3b7b1d3ef30121229bbe67c3e1.woff) format("woff");font-display:swap;font-weight:400;font-style:italic;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/7c46f288e8133b87e6b12b45dac71865.woff) format("woff");font-display:swap;font-weight:500;font-style:normal;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/e62dc97e83a385e4d8cdc939cf1e4213.woff) format("woff");font-display:swap;font-weight:500;font-style:italic;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/533af26cf28d7660f24c2884d3c27eac.woff) format("woff");font-display:swap;font-weight:700;font-style:normal;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/20d494430c87e15e194932b729d48270.woff) format("woff");font-display:swap;font-weight:700;font-style:italic;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/a50a1bd245ce63abcc0d1da80ff790d2.woff) format("woff");font-display:swap;font-weight:900;font-style:normal;text-rendering:optimizeLegibility}@font-face{font-family:"HelsinkiGrotesk";src:url(https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/62a1781d8b396fbb025b0552cf6304d2.woff) format("woff");font-display:swap;font-weight:900;font-style:italic;text-rendering:optimizeLegibility}body{font-family:var(--font-default);font-size:var(--fontsize-body-m);color:var(--color-black-90);line-height:var(--lineheight-l)}​ .App>*{margin-top:var(--spacing-s)}.testlink.testlink{color:red}.headeriii{width:90%}.napuska{margin:10px} +/*# sourceMappingURL=main.d6b87222.chunk.css.map */ \ No newline at end of file diff --git a/docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css.map b/docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css.map new file mode 100644 index 00000000000..c0bb624f343 --- /dev/null +++ b/docs/mobile-menu-demo/static/css/main.d6b87222.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://src/index.css","webpack://src/App.css","webpack://src/components/navigation/Navigation.css","webpack://src/components/button/Button.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF,CCZA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,WACE,6BAA8B,CAC9B,kHAAqH,CACrH,iBAAkB,CAClB,eAAgB,CAChB,iBAAkB,CAClB,iCACF,CAEA,KACE,+BAAgC,CAChC,gCAAiC,CACjC,2BAA4B,CAC5B,+BACF,CAKA,SACE,2BACF,CACA,mBACE,SACF,CCvFA,WACI,SACJ,CCFA,SACI,WACJ","file":"main.d6b87222.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/565d73a693abe0776c801607ac28f0bf.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 400;\n font-style: normal;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/5bb29e3b7b1d3ef30121229bbe67c3e1.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 400;\n font-style: italic;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/7c46f288e8133b87e6b12b45dac71865.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 500;\n font-style: normal;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/e62dc97e83a385e4d8cdc939cf1e4213.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 500;\n font-style: italic;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/533af26cf28d7660f24c2884d3c27eac.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 700;\n font-style: normal;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/20d494430c87e15e194932b729d48270.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 700;\n font-style: italic;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/a50a1bd245ce63abcc0d1da80ff790d2.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 900;\n font-style: normal;\n text-rendering: optimizeLegibility;\n}\n\n@font-face {\n font-family: 'HelsinkiGrotesk';\n src: url(\"https://makasiini.hel.ninja/delivery/HelsinkiGrotesk/62a1781d8b396fbb025b0552cf6304d2.woff\") format(\"woff\");\n font-display: swap;\n font-weight: 900;\n font-style: italic;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n font-family: var(--font-default);\n font-size: var(--fontsize-body-m);\n color: var(--color-black-90);\n line-height: var(--lineheight-l);\n}\n\n/* .App {\n padding: var(--spacing-m);\n} */\n​ .App > * {\n margin-top: var(--spacing-s);\n}\n.testlink.testlink {\n color: red;\n}",".headeriii {\n width: 90%;\n}",".napuska {\n margin: 10px 10px;\n}"]} \ No newline at end of file diff --git a/docs/mobile-menu-demo/static/js/2.527210a5.chunk.js b/docs/mobile-menu-demo/static/js/2.527210a5.chunk.js new file mode 100644 index 00000000000..31c49efe2f4 --- /dev/null +++ b/docs/mobile-menu-demo/static/js/2.527210a5.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.527210a5.chunk.js.LICENSE.txt */ +(this["webpackJsonphds-cra"]=this["webpackJsonphds-cra"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(187)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(6),o={icon:"Icon-module_icon__1Jtzj icon_hds-icon__1YqNC",xs:"Icon-module_xs__3kAOj icon_hds-icon--size-xs__3dAMZ",s:"Icon-module_s__2WGWe icon_hds-icon--size-s__2Lkik",m:"Icon-module_m__3edUY icon_hds-icon--size-m__1mcHv",l:"Icon-module_l__1TDQL icon_hds-icon--size-l__3Zczy",xl:"Icon-module_xl__1M6cO icon_hds-icon--size-xl__1Jes8"};Object(r.a)(".icon_hds-icon__1YqNC{--icon-size:100%;background-color:currentcolor;display:inline-block;height:var(--icon-size);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:auto;mask-size:auto;width:var(--icon-size)}.icon_hds-icon__1YqNC.icon_hds-icon--size-xs__3dAMZ{--icon-size:var(--spacing-layout-2-xs)}.icon_hds-icon__1YqNC.icon_hds-icon--size-s__2Lkik{--icon-size:var(--spacing-layout-xs)}.icon_hds-icon__1YqNC.icon_hds-icon--size-m__1mcHv{--icon-size:var(--spacing-layout-s)}.icon_hds-icon__1YqNC.icon_hds-icon--size-l__3Zczy{--icon-size:var(--spacing-layout-m)}.icon_hds-icon__1YqNC.icon_hds-icon--size-xl__1Jes8{--icon-size:var(--spacing-layout-l)}.Icon-module_icon__1Jtzj{background-color:transparent}")},function(e,t,n){"use strict";n.d(t,"w",(function(){return l})),n.d(t,"a",(function(){return ke})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return Me})),n.d(t,"d",(function(){return we})),n.d(t,"e",(function(){return X})),n.d(t,"f",(function(){return pe})),n.d(t,"g",(function(){return Te})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return De})),n.d(t,"j",(function(){return Be})),n.d(t,"k",(function(){return C})),n.d(t,"l",(function(){return j})),n.d(t,"m",(function(){return I})),n.d(t,"n",(function(){return R})),n.d(t,"o",(function(){return V})),n.d(t,"p",(function(){return ye})),n.d(t,"q",(function(){return _e})),n.d(t,"r",(function(){return ge})),n.d(t,"s",(function(){return O})),n.d(t,"t",(function(){return He})),n.d(t,"u",(function(){return L})),n.d(t,"v",(function(){return E})),n.d(t,"x",(function(){return Ee})),n.d(t,"y",(function(){return N})),n.d(t,"z",(function(){return We})),n.d(t,"A",(function(){return Ye})),n.d(t,"B",(function(){return qe})),n.d(t,"C",(function(){return Ue})),n.d(t,"D",(function(){return Ke}));var r=n(4),o=n(13),i=n(9),a=w(),l=function(e){return v(e,a)},s=w();l.write=function(e){return v(e,s)};var u=w();l.onStart=function(e){return v(e,u)};var c=w();l.onFrame=function(e){return v(e,c)};var d=w();l.onFinish=function(e){return v(e,d)};var f=[];l.setTimeout=function(e,t){var n=l.now()+t,r={time:n,handler:e,cancel:function e(){var t=f.findIndex((function(t){return t.cancel==e}));~t&&f.splice(t,1),x.count-=~t?1:0}};return f.splice(h(n),0,r),x.count+=1,g(),r};var h=function(e){return~(~f.findIndex((function(t){return t.time>e}))||~f.length)};l.cancel=function(e){a.delete(e),s.delete(e)},l.sync=function(e){m=!0,l.batchedUpdates(e),m=!1},l.throttle=function(e){var t;function n(){try{e.apply(void 0,Object(i.a)(t))}finally{t=null}}function r(){for(var e=arguments.length,r=new Array(e),o=0;o1?t-1:0),r=1;re.priority?(H.add(e),l.onStart(q)):(K(e),l(Z))},advance:Z,sort:function(e){if(W)l.onFrame((function(){return V.sort(e)}));else{var t=U.indexOf(e);~t&&(U.splice(t,1),Y(e))}},clear:function(){U=[],H.clear()}};function q(){H.forEach(K),H.clear(),l(Z)}function K(e){U.includes(e)||Y(e)}function Y(e){U.splice(function(e,t){var n=e.findIndex(t);return n<0?e.length:n}(U,(function(t){return t.priority>e.priority})),0,e)}function Z(e){for(var t=F,n=0;n0}var X={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},G="[-+]?\\d*\\.?\\d+",Q=G+"%";function J(){for(var e=arguments.length,t=new Array(e),n=0;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=le(o,r,e+1/3),a=le(o,r,e),l=le(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function ce(e){return(parseFloat(e)%360+360)%360/360}function de(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function he(e){var t=function(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ie.exec(e))?parseInt(t[1]+"ff",16)>>>0:z&&void 0!==z[e]?z[e]:(t=$.exec(e))?(ue(t[1])<<24|ue(t[2])<<16|ue(t[3])<<8|255)>>>0:(t=ee.exec(e))?(ue(t[1])<<24|ue(t[2])<<16|ue(t[3])<<8|de(t[4]))>>>0:(t=re.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ae.exec(e))?parseInt(t[1],16)>>>0:(t=oe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=te.exec(e))?(255|se(ce(t[1]),fe(t[2]),fe(t[3])))>>>0:(t=ne.exec(e))?(se(ce(t[1]),fe(t[2]),fe(t[3]))|de(t[4]))>>>0:null}(e);if(null===t)return e;var n=(16711680&(t=t||0))>>>16,r=(65280&t)>>>8,o=(255&t)/255;return"rgba(".concat((4278190080&t)>>>24,", ").concat(n,", ").concat(r,", ").concat(o,")")}var pe=function e(t,n,r){if(O.fun(t))return t;if(O.arr(t))return e({range:t,output:n,extrapolate:r});if(O.str(t.output[0]))return T(t);var o=t,i=o.output,a=o.range||[0,1],l=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",u=o.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,a);return function(e,t,n,r,o,i,a,l,s){var u=s?s(e):e;if(un){if("identity"===l)return u;"clamp"===l&&(u=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t);u=i(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r;return u}(e,a[t],a[t+1],i[t],i[t+1],u,l,s,o.map)}};function be(){return(be=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var n=Object.assign({},e);return t&&Object.keys(t).filter((function(t){return!!e[t]})).forEach((function(e){n[t[e]]=!0})),Object.keys(n).filter((function(e){return r.call(n,e)&&!!n[e]})).join(" ")}(e,this):null:null}var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}var d=n(33),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o1&&void 0!==arguments[1]?arguments[1]:{},n=t.applyAnimatedValues,r=void 0===n?function(){return!1}:n,o=t.createAnimatedStyle,i=void 0===o?function(e){return new y(e)}:o,a=t.getComponentProps,l=void 0===a?function(e){return e}:a,s={applyAnimatedValues:r,createAnimatedStyle:i,getComponentProps:l},u=function e(t){var n=C(t)||"Anonymous";return(t=c.s.str(t)?e[t]||(e[t]=E(t,s)):t[O]||(t[O]=E(t,s))).displayName="Animated(".concat(n,")"),t};return Object(c.l)(e,(function(t,n){c.s.arr(e)&&(n=C(t)),u[n]=u(t)})),{animated:u}},C=function(e){return c.s.str(e)?e:e&&c.s.str(e.displayName)?e.displayName:c.s.fun(e)&&e.name||null}},,function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return j}));var i=n(0),a=n.n(i),l=n(31),s=n(179),u=n(33);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}n(180);var p=function(e){var t=Object(s.a)();return t.displayName=e,t},b=p("Router-History"),m=p("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}o(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a.a.createElement(m.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.a.createElement(b.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.a.Component);a.a.Component;a.a.Component;var g={},_=0;function y(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,l=void 0!==a&&a,s=n.sensitive,u=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=g[n]||(g[n]={});if(r[e])return r[e];var o=[],i={regexp:f()(e,o,t),keys:o};return _<1e4&&(r[e]=i,_++),i}(n,{end:i,strict:l,sensitive:u}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var c=s[0],d=s.slice(1),h=e===c;return i&&!h?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:h,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var w=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(m.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=c({},t,{location:n,match:e.props.computedMatch?e.props.computedMatch:e.props.path?y(n.pathname,e.props):t.match}),o=e.props,i=o.children,l=o.component,s=o.render;return Array.isArray(i)&&function(e){return 0===a.a.Children.count(e)}(i)&&(i=null),a.a.createElement(m.Provider,{value:r},r.match?i?"function"===typeof i?i(r):i:l?a.a.createElement(l,r):s?s(r):null:"function"===typeof i?i(r):null)}))},t}(a.a.Component);function k(e){return"/"===e.charAt(0)?e:"/"+e}function x(e,t){if(!e)return t;var n=k(e);return 0!==t.pathname.indexOf(n)?t:c({},t,{pathname:t.pathname.substr(n.length)})}function M(e){return"string"===typeof e?e:Object(l.e)(e)}function E(e){return function(){Object(u.a)(!1)}}function S(){}a.a.Component;var O=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(m.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,o=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?y(o.pathname,c({},e.props,{path:i})):t.match}})),r?a.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(a.a.Component);var L=a.a.useContext;function C(){return L(m).location}function j(e){var t=C(),n=L(m).match;return e?y(t.pathname,e):n}},function(e,t,n){e.exports=n(194)},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return k}));var r=n(9),o=n(0),i=n.n(o),a=n(38),l="object"==typeof a.a&&a.a&&a.a.Object===Object&&a.a,s="object"==typeof self&&self&&self.Object===Object&&self,u=l||s||Function("return this")();function c(e,t){for(var n=-1,r=t.length,o=e.length;++n0&&n(l)?t>1?v(l,t-1,n,r,o):c(o,l):r||(o[o.length]=l)}return o}function g(e){return _(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?h.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&f.call(e,"callee")&&(!b.call(e,"callee")||"[object Arguments]"==h.call(e))}(e)||!!(m&&e&&e[m])}var _=Array.isArray,y=function(e){return e&&e.length?v(e,1):[]},w=function(e){return void 0===e?[]:Array.isArray(e)?e:[e]},k=function(e,t){var n=Object(r.a)(w(e)),i=n.findIndex((function(e){var n;return Object(o.isValidElement)(e)&&(null===(n=e.type)||void 0===n?void 0:n.componentName)===t}));return[i>=0?n.splice(i,1):[],n]},x=function(e){var t=Object(r.a)(w(e)),n=1===t.length&&i.a.isValidElement(t[0])&&Boolean(t[0].props.children)&&(i.a.isValidElement(t[0].props.children)||Array.isArray(t[0].props.children));return y(n&&i.a.isValidElement(t[0])?t[0].props.children:t)}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,u=[],c=!1,d=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=l(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++d1)for(var n=1;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function s(e,t,n,r){for(var o=0,i=Math.min(e.length,n),a=t;a=49?l-49+10:l>=17?l-17+10:l}return o}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===t?this._parseHex(e,o):this._parseBase(e,t,o),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<>>26-l&67108863,(l+=24)>=26&&(l-=26,i++);else if("le"===n)for(o=0,i=0;o>>26-l&67108863,(l+=24)>=26&&(l-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)o=l(e,n,n+6),this.words[r]|=o<>>26-i&4194303,(i+=24)>=26&&(i-=26,r++);n+6!==t&&(o=l(e,t,n+6),this.words[r]|=o<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,l=Math.min(i,i-a)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,l=67108863&a,s=a/67108864|0;n.words[0]=l;for(var u=1;u>>26,d=67108863&s,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;c+=(a=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,s=0|c}return 0!==s?n.words[u]=0|s:n.length--,n.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,a=0;a>>24-o&16777215)||a!==this.length-1?u[6-s.length]+s+n:s+n,(o+=2)>=26&&(o-=26,a--)}for(0!==i&&(n=i.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?b+n:u[f-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,l,s="le"===t,u=new e(i),c=this.clone();if(s){for(l=0;!c.isZero();l++)a=c.andln(255),c.iushrn(8),u[l]=a;for(;l=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i>>26;for(;0!==o&&i>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==i&&a>26,this.words[a]=67108863&t;if(0===i&&a>>13,h=0|a[1],p=8191&h,b=h>>>13,m=0|a[2],v=8191&m,g=m>>>13,_=0|a[3],y=8191&_,w=_>>>13,k=0|a[4],x=8191&k,M=k>>>13,E=0|a[5],S=8191&E,O=E>>>13,L=0|a[6],C=8191&L,j=L>>>13,N=0|a[7],I=8191&N,T=N>>>13,A=0|a[8],R=8191&A,z=A>>>13,B=0|a[9],P=8191&B,D=B>>>13,H=0|l[0],U=8191&H,F=H>>>13,W=0|l[1],V=8191&W,q=W>>>13,K=0|l[2],Y=8191&K,Z=K>>>13,X=0|l[3],G=8191&X,Q=X>>>13,J=0|l[4],$=8191&J,ee=J>>>13,te=0|l[5],ne=8191&te,re=te>>>13,oe=0|l[6],ie=8191&oe,ae=oe>>>13,le=0|l[7],se=8191&le,ue=le>>>13,ce=0|l[8],de=8191&ce,fe=ce>>>13,he=0|l[9],pe=8191&he,be=he>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(u+(r=Math.imul(d,U))|0)+((8191&(o=(o=Math.imul(d,F))+Math.imul(f,U)|0))<<13)|0;u=((i=Math.imul(f,F))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,U),o=(o=Math.imul(p,F))+Math.imul(b,U)|0,i=Math.imul(b,F);var ve=(u+(r=r+Math.imul(d,V)|0)|0)+((8191&(o=(o=o+Math.imul(d,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((i=i+Math.imul(f,q)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),o=(o=Math.imul(v,F))+Math.imul(g,U)|0,i=Math.imul(g,F),r=r+Math.imul(p,V)|0,o=(o=o+Math.imul(p,q)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,q)|0;var ge=(u+(r=r+Math.imul(d,Y)|0)|0)+((8191&(o=(o=o+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((i=i+Math.imul(f,Z)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,U),o=(o=Math.imul(y,F))+Math.imul(w,U)|0,i=Math.imul(w,F),r=r+Math.imul(v,V)|0,o=(o=o+Math.imul(v,q)|0)+Math.imul(g,V)|0,i=i+Math.imul(g,q)|0,r=r+Math.imul(p,Y)|0,o=(o=o+Math.imul(p,Z)|0)+Math.imul(b,Y)|0,i=i+Math.imul(b,Z)|0;var _e=(u+(r=r+Math.imul(d,G)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(f,G)|0))<<13)|0;u=((i=i+Math.imul(f,Q)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(x,U),o=(o=Math.imul(x,F))+Math.imul(M,U)|0,i=Math.imul(M,F),r=r+Math.imul(y,V)|0,o=(o=o+Math.imul(y,q)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(v,Y)|0,o=(o=o+Math.imul(v,Z)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Z)|0,r=r+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,Q)|0;var ye=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(S,U),o=(o=Math.imul(S,F))+Math.imul(O,U)|0,i=Math.imul(O,F),r=r+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(M,V)|0,i=i+Math.imul(M,q)|0,r=r+Math.imul(y,Y)|0,o=(o=o+Math.imul(y,Z)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Z)|0,r=r+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(g,G)|0,i=i+Math.imul(g,Q)|0,r=r+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;u=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,U),o=(o=Math.imul(C,F))+Math.imul(j,U)|0,i=Math.imul(j,F),r=r+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,q)|0,r=r+Math.imul(x,Y)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(M,Y)|0,i=i+Math.imul(M,Z)|0,r=r+Math.imul(y,G)|0,o=(o=o+Math.imul(y,Q)|0)+Math.imul(w,G)|0,i=i+Math.imul(w,Q)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0;var ke=(u+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;u=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(I,U),o=(o=Math.imul(I,F))+Math.imul(T,U)|0,i=Math.imul(T,F),r=r+Math.imul(C,V)|0,o=(o=o+Math.imul(C,q)|0)+Math.imul(j,V)|0,i=i+Math.imul(j,q)|0,r=r+Math.imul(S,Y)|0,o=(o=o+Math.imul(S,Z)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Z)|0,r=r+Math.imul(x,G)|0,o=(o=o+Math.imul(x,Q)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,Q)|0,r=r+Math.imul(y,$)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(g,ne)|0,i=i+Math.imul(g,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,ae)|0;var xe=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(o=(o=o+Math.imul(d,ue)|0)+Math.imul(f,se)|0))<<13)|0;u=((i=i+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,U),o=(o=Math.imul(R,F))+Math.imul(z,U)|0,i=Math.imul(z,F),r=r+Math.imul(I,V)|0,o=(o=o+Math.imul(I,q)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,q)|0,r=r+Math.imul(C,Y)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(j,Y)|0,i=i+Math.imul(j,Z)|0,r=r+Math.imul(S,G)|0,o=(o=o+Math.imul(S,Q)|0)+Math.imul(O,G)|0,i=i+Math.imul(O,Q)|0,r=r+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,r=r+Math.imul(y,ne)|0,o=(o=o+Math.imul(y,re)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,ae)|0,r=r+Math.imul(p,se)|0,o=(o=o+Math.imul(p,ue)|0)+Math.imul(b,se)|0,i=i+Math.imul(b,ue)|0;var Me=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(P,U),o=(o=Math.imul(P,F))+Math.imul(D,U)|0,i=Math.imul(D,F),r=r+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(z,V)|0,i=i+Math.imul(z,q)|0,r=r+Math.imul(I,Y)|0,o=(o=o+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,i=i+Math.imul(T,Z)|0,r=r+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(j,G)|0,i=i+Math.imul(j,Q)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,r=r+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,re)|0)+Math.imul(M,ne)|0,i=i+Math.imul(M,re)|0,r=r+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(v,se)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,ue)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,fe)|0;var Ee=(u+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(f,pe)|0))<<13)|0;u=((i=i+Math.imul(f,be)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,V),o=(o=Math.imul(P,q))+Math.imul(D,V)|0,i=Math.imul(D,q),r=r+Math.imul(R,Y)|0,o=(o=o+Math.imul(R,Z)|0)+Math.imul(z,Y)|0,i=i+Math.imul(z,Z)|0,r=r+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(T,G)|0,i=i+Math.imul(T,Q)|0,r=r+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(j,$)|0,i=i+Math.imul(j,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(O,ne)|0,i=i+Math.imul(O,re)|0,r=r+Math.imul(x,ie)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,ae)|0,r=r+Math.imul(y,se)|0,o=(o=o+Math.imul(y,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(g,de)|0,i=i+Math.imul(g,fe)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(P,Y),o=(o=Math.imul(P,Z))+Math.imul(D,Y)|0,i=Math.imul(D,Z),r=r+Math.imul(R,G)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(z,G)|0,i=i+Math.imul(z,Q)|0,r=r+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(j,ne)|0,i=i+Math.imul(j,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,ae)|0,r=r+Math.imul(x,se)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(M,se)|0,i=i+Math.imul(M,ue)|0,r=r+Math.imul(y,de)|0,o=(o=o+Math.imul(y,fe)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,fe)|0;var Oe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,be)|0)+Math.imul(g,pe)|0))<<13)|0;u=((i=i+Math.imul(g,be)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(P,G),o=(o=Math.imul(P,Q))+Math.imul(D,G)|0,i=Math.imul(D,Q),r=r+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(z,$)|0,i=i+Math.imul(z,ee)|0,r=r+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,re)|0)+Math.imul(T,ne)|0,i=i+Math.imul(T,re)|0,r=r+Math.imul(C,ie)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(j,ie)|0,i=i+Math.imul(j,ae)|0,r=r+Math.imul(S,se)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,ue)|0,r=r+Math.imul(x,de)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,fe)|0;var Le=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(o=(o=o+Math.imul(y,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(P,$),o=(o=Math.imul(P,ee))+Math.imul(D,$)|0,i=Math.imul(D,ee),r=r+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,re)|0)+Math.imul(z,ne)|0,i=i+Math.imul(z,re)|0,r=r+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,ae)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,ae)|0,r=r+Math.imul(C,se)|0,o=(o=o+Math.imul(C,ue)|0)+Math.imul(j,se)|0,i=i+Math.imul(j,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,fe)|0;var Ce=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(o=(o=o+Math.imul(x,be)|0)+Math.imul(M,pe)|0))<<13)|0;u=((i=i+Math.imul(M,be)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(P,ne),o=(o=Math.imul(P,re))+Math.imul(D,ne)|0,i=Math.imul(D,re),r=r+Math.imul(R,ie)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(z,ie)|0,i=i+Math.imul(z,ae)|0,r=r+Math.imul(I,se)|0,o=(o=o+Math.imul(I,ue)|0)+Math.imul(T,se)|0,i=i+Math.imul(T,ue)|0,r=r+Math.imul(C,de)|0,o=(o=o+Math.imul(C,fe)|0)+Math.imul(j,de)|0,i=i+Math.imul(j,fe)|0;var je=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(o=(o=o+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(P,ie),o=(o=Math.imul(P,ae))+Math.imul(D,ie)|0,i=Math.imul(D,ae),r=r+Math.imul(R,se)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(z,se)|0,i=i+Math.imul(z,ue)|0,r=r+Math.imul(I,de)|0,o=(o=o+Math.imul(I,fe)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,fe)|0;var Ne=(u+(r=r+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,be)|0)+Math.imul(j,pe)|0))<<13)|0;u=((i=i+Math.imul(j,be)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(P,se),o=(o=Math.imul(P,ue))+Math.imul(D,se)|0,i=Math.imul(D,ue),r=r+Math.imul(R,de)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(z,de)|0,i=i+Math.imul(z,fe)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(P,de),o=(o=Math.imul(P,fe))+Math.imul(D,de)|0,i=Math.imul(D,fe);var Te=(u+(r=r+Math.imul(R,pe)|0)|0)+((8191&(o=(o=o+Math.imul(R,be)|0)+Math.imul(z,pe)|0))<<13)|0;u=((i=i+Math.imul(z,be)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Ae=(u+(r=Math.imul(P,pe))|0)+((8191&(o=(o=Math.imul(P,be))+Math.imul(D,pe)|0))<<13)|0;return u=((i=Math.imul(D,be))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s[0]=me,s[1]=ve,s[2]=ge,s[3]=_e,s[4]=ye,s[5]=we,s[6]=ke,s[7]=xe,s[8]=Me,s[9]=Ee,s[10]=Se,s[11]=Oe,s[12]=Le,s[13]=Ce,s[14]=je,s[15]=Ne,s[16]=Ie,s[17]=Te,s[18]=Ae,0!==u&&(s[19]=u,n.length++),n};function p(e,t,n){return(new b).mulp(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=f),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i>>26)|0)>>>26,a&=67108863}n.words[i]=l,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r>=1;return r},b.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&i,i>>>=13;for(a=2*t;a>=26,t+=o/67108864|0,t+=i>>>26,this.words[n]=67108863&i}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),l=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=o);u--){var d=0|this.words[u];this.words[u]=c<<26-i|d>>>i,c=d&l}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[o+n]=67108863&i}for(;o>26,this.words[o+n]=67108863&i;if(0===l)return this.strip();for(r(-1===l),l=0,o=0;o>26,this.words[o]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var l,s=r.length-o.length;if("mod"!==t){(l=new i(null)).length=s+1,l.words=new Array(l.length);for(var u=0;u=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);l&&(l.words[d]=f)}return l&&l.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:l||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(o=l.div.neg()),"div"!==t&&(a=l.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(o=l.div.neg()),{div:o,mod:l.mod}):0!==(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(a=l.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:l.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,l},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),l=new i(0),s=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,b=1;0===(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(l.isOdd()||s.isOdd())&&(l.iadd(c),s.isub(d)),l.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(l),a.isub(s)):(n.isub(t),l.isub(o),s.isub(a))}return{a:l,b:s,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),l=new i(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0===(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var d=0,f=1;0===(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)l.isOdd()&&l.iadd(s),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(l)):(n.isub(t),l.isub(a))}return(o=0===t.cmpn(1)?a:l).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,l&=67108863,this.words[a]=l}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){ro&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function y(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(g,v),g.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new _;else if("p192"===e)t=new y;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var l=new i(1).toRed(this),s=l.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var d=this.pow(c,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(l);){for(var b=h,m=0;0!==b.cmp(l);m++)b=b.redSqr();r(m=0;r--){for(var u=t.words[r],c=s-1;c>=0;c--){var d=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++l||0===r&&0===c)&&(o=this.mul(o,n[a]),l=0,a=0)):l=0}s=26}return o},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new x(e)},o(x,k),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(74)(e))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var r=n(203),o=n(204),i=n(123);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"===typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,l/=2,s/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;il&&(n=l-s),i=n;i>=0;i--){for(var d=!0,f=0;fo&&(r=o):r=o;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128===(192&(i=e[o+1]))&&(s=(31&u)<<6|63&i)>127&&(c=s);break;case 3:i=e[o+1],a=e[o+2],128===(192&i)&&128===(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=e[o+1],a=e[o+2],l=e[o+3],128===(192&i)&&128===(192&a)&&128===(192&l)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&l)>65535&&s<1114112&&(c=s)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),o+=d}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(i,a),u=this.slice(r,o),c=e.slice(t,n),d=0;do)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function L(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function A(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function z(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||z(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return i||z(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):A(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):A(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=0,a=1,l=0;for(this[t]=255&e;++i>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=n-1,a=1,l=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/a>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):A(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):A(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function W(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(20))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(4),o=n(9),i=n(0),a=n(37),l=n.n(a),s="undefined"!=typeof window&&window.document?i.useLayoutEffect:i.useEffect,u=function(e,t){var n=t&&"string"!=typeof t,a=Object(i.useRef)(n?l()("custom-theme-"):"").current;return s((function(){n&&function(e,t,n){if("undefined"!=typeof window){var i=function(t){var r;return null===(r=t.selectorText)||void 0===r?void 0:r.includes("".concat(e,".").concat(n))};try{var a=Object(o.a)(document.styleSheets).findIndex((function(t){try{return Object(o.a)(t.cssRules).findIndex((function(t){var n;return null===(n=t.selectorText)||void 0===n?void 0:n.includes(e)}))>=0}catch(e){return!1}}));if(-1===a){var l=document.createElement("style");document.head.appendChild(l),a=document.styleSheets.length-1}var s=document.styleSheets[a],u=s.cssRules,c=Object(o.a)(u).findIndex(i);-1===c&&(s.insertRule(".".concat(e,".").concat(n," { content: '' }"),u.length),c=Object(o.a)(u).findIndex(i));var d=u[c];Object.entries(t).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return d.style.setProperty(n,o)}))}catch(t){console.warn('Could not find the stylesheet to update with the "'.concat(e,'" selector!'))}}}(e&&e.split(" ")[0],t,a)}),[e,t,a,n]),a}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0;f--){var h=a[f];"."===h?i(a,f):".."===h?(i(a,f),d++):d&&(i(a,f),d--)}if(!u)for(;d--;d)a.unshift("..");!u||""===a[0]||a[0]&&o(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(33);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function h(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function b(e,t,n,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=r({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"===typeof e?e(t,n):e;"string"===typeof i?"function"===typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=b(e,t,f(),y.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(y.entries[y.index]=o,d({action:r,location:o}))}))},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},canGo:function(e){var t=y.index+e;return t>=0&&t(o>>1)-1?(o>>1)-s:s,i.isubn(l)):l=0,r[a]=l,i.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,o=0;e.cmpn(-r)>0||t.cmpn(-o)>0;){var i,a,l,s=e.andln(3)+r&3,u=t.andln(3)+o&3;if(3===s&&(s=-1),3===u&&(u=-1),0===(1&s))i=0;else i=3!==(l=e.andln(7)+r&7)&&5!==l||2!==u?s:-s;if(n[0].push(i),0===(1&u))a=0;else a=3!==(l=t.andln(7)+o&7)&&5!==l||2!==s?u:-u;n[1].push(a),2*r===i+1&&(r=1-r),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o(e,"hex","le")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(8),o=n(0),i=n.n(o),a=n(6),l=n(5),s=n(81),u={button:"Button-module_button__1msFE button_hds-button__2A0je",label:"Button-module_label__a4np1 button_hds-button__label__2EQa-",fullWidth:"Button-module_fullWidth__31eVK button_hds-button--fullwidth__1_hG9","size-small":"Button-module_size-small__3lizH button_hds-button--small__2NFef",icon:"Button-module_icon__O-h7R button_hds-icon__17j8Z",primary:"Button-module_primary__2LfKB button_hds-button--primary__2NVvO",secondary:"Button-module_secondary__1nABp button_hds-button--secondary__1NOWS",supplementary:"Button-module_supplementary__3YKiS button_hds-button--supplementary__GcHcV",isLoading:"Button-module_isLoading__3PK75 button_hds-button--loading__2mLjh",success:"Button-module_success__CU9nK button_hds-button--success__9hpuD",danger:"Button-module_danger__2el15 button_hds-button--danger__dEREN","theme-coat":"Button-module_theme-coat__2_3U7 button_hds-button--theme-coat__12cO0","theme-black":"Button-module_theme-black__m8giY button_hds-button--theme-black__3K_k4"};Object(a.a)('.button_hds-button__2A0je{--border-width:2px;--color:inherit;--min-size:44px;--outline-gutter:2px;--outline-width:3px;align-content:flex-start;align-items:center;-webkit-appearance:button;background-color:var(--background-color,transparent);border:var(--border-width) solid var(--border-color,transparent);border-radius:0;color:var(--color);cursor:pointer;display:inline-flex;font-family:inherit;font-size:100%;font-weight:500;justify-content:center;line-height:1.15;margin:0;min-height:var(--min-size);min-width:var(--min-size);padding:0 var(--spacing-2-xs);position:relative;text-transform:none;vertical-align:top}.button_hds-button__2A0je,.button_hds-button__2A0je *,.button_hds-button__2A0je:after,.button_hds-button__2A0je :after,.button_hds-button__2A0je:before,.button_hds-button__2A0je :before{box-sizing:border-box}.button_hds-button__2A0je[type=button],.button_hds-button__2A0je[type=reset],.button_hds-button__2A0je[type=submit]{-webkit-appearance:button}.button_hds-button__2A0je::-moz-focus-inner,.button_hds-button__2A0je[type=button]::-moz-focus-inner,.button_hds-button__2A0je[type=reset]::-moz-focus-inner,.button_hds-button__2A0je[type=submit]::-moz-focus-inner{border-style:none;padding:0}.button_hds-button__2A0je:-moz-focusring,.button_hds-button__2A0je[type=button]:-moz-focusring,.button_hds-button__2A0je[type=reset]:-moz-focusring,.button_hds-button__2A0je[type=submit]:-moz-focusring{outline:1px dotted ButtonText}.button_hds-button__2A0je.button_focus-visible__gEJLP,.button_hds-button__2A0je:focus-visible,.button_hds-button__2A0je:hover{transition-duration:85ms;transition-property:background-color,border-color,color;transition-timing-function:ease-out}.button_hds-button__2A0je:hover{background-color:var(--background-color-hover,transparent);color:var(--color-hover)}.button_hds-button__2A0je.button_focus-visible__gEJLP,.button_hds-button__2A0je:active,.button_hds-button__2A0je:focus-visible{background-color:var(--background-color-focus,transparent);color:var(--color-focus);outline:none}.button_hds-button__2A0je:not(:disabled){border-color:var(--border-color,transparent)}.button_hds-button__2A0je:disabled{background-color:var(--background-color-disabled,transparent);border-color:var(--border-color-disabled,transparent);color:var(--color-disabled);cursor:not-allowed}.button_hds-button__2A0je.button_focus-visible__gEJLP:hover,.button_hds-button__2A0je:active:hover,.button_hds-button__2A0je:focus-visible:hover{background-color:var(--background-color-hover-focus,transparent)}.button_hds-button__2A0je:not(:disabled):hover{border-color:var(--border-color-hover,transparent)}.button_hds-button__2A0je:not(:disabled).button_focus-visible__gEJLP,.button_hds-button__2A0je:not(:disabled):active,.button_hds-button__2A0je:not(:disabled):focus-visible{border-color:var(--border-color-focus,transparent)}.button_hds-button__2A0je:not(:disabled).button_focus-visible__gEJLP:hover,.button_hds-button__2A0je:not(:disabled):active:hover,.button_hds-button__2A0je:not(:disabled):focus-visible:hover{border-color:var(--border-color-hover-focus,transparent);color:var(--color-hover-focus)}.button_hds-button__2A0je:after{--size:100%;border:var(--outline-width) solid transparent;content:"";height:var(--size);position:absolute;width:var(--size)}.button_hds-button__2A0je.button_focus-visible__gEJLP:after,.button_hds-button__2A0je:active:after,.button_hds-button__2A0je:focus-visible:after{--size:calc(100% + calc(var(--outline-width) * 2 + var(--border-width) * 2 + var(--outline-gutter) * 2));border-color:var(--focus-outline-color)}.button_hds-button__label__2EQa-,input[type=submit].button_hds-button__2A0je{font-weight:inherit;line-height:1.25em;padding:var(--spacing-s)}input[type=submit].button_hds-button__2A0je{cursor:pointer;padding:var(--spacing-s) var(--spacing-l)}input[type=submit].button_hds-button__2A0je.button_focus-visible__gEJLP,input[type=submit].button_hds-button__2A0je:focus-visible{box-shadow:0 0 0 var(--outline-gutter) var(--submit-input-focus-gutter-color),0 0 0 calc(var(--outline-gutter) + var(--outline-width)) var(--focus-outline-color)}.button_hds-button__label__2EQa-:only-child{margin:0 var(--spacing-2-xs)}.button_hds-button--small__2NFef .button_hds-button__label__2EQa-,input[type=submit].button_hds-button--small__2NFef{line-height:var(--lineheight-s);padding:var(--spacing-2-xs) var(--spacing-xs)}.button_hds-button--supplementary__GcHcV .button_hds-button__label__2EQa-:first-child{padding-right:var(--spacing-2-xs)}.button_hds-button--small__2NFef .button_hds-button__label__2EQa-:only-child{margin:0 var(--spacing-xs)}.button_hds-button--supplementary__GcHcV .button_hds-icon__17j8Z+.button_hds-button__label__2EQa-:last-child{padding-left:var(--spacing-2-xs)}.button_hds-button--supplementary__GcHcV .button_hds-icon__17j8Z+.button_hds-button__label__2EQa-:not(:last-child){padding-left:var(--spacing-2-xs);padding-right:var(--spacing-2-xs)}.button_hds-button--small__2NFef{padding:0}input[type=submit].button_hds-button--small__2NFef{padding:var(--spacing-2-xs) var(--spacing-m)}.button_hds-button--small__2NFef .button_hds-button__label__2EQa-:not(:first-of-type):not(:last-of-type){padding:var(--spacing-2-xs) var(--spacing-2-xs)}.button_hds-button--fullwidth__1_hG9{width:100%}.button_hds-button__2A0je .button_hds-icon__17j8Z{height:var(--spacing-m);margin-left:var(--spacing-s);width:var(--spacing-m)}.button_hds-button__label__2EQa-~.button_hds-icon__17j8Z{margin:0 var(--spacing-s) 0 0}.button_hds-button--small__2NFef .button_hds-icon__17j8Z{margin-left:var(--spacing-2-xs)}.button_hds-button__2A0je .button_hds-button--small__2NFef .button_hds-button__label__2EQa-~.button_hds-icon__17j8Z{margin:0 var(--spacing-2-xs) 0 0}.button_hds-button__2A0je .button_hds-icon__17j8Z:first-of-type:not(:last-of-type){margin:0 0 0 var(--spacing-2-xs)}.button_hds-button__2A0je .button_hds-icon__17j8Z:last-of-type:not(:first-of-type){margin:0 var(--spacing-2-xs) 0 0}.button_hds-button--small__2NFef .button_hds-icon__17j8Z:first-child:not(:last-of-type){margin:0 0 0 var(--spacing-2-xs)}.button_hds-button--small__2NFef .button_hds-icon__17j8Z:last-child:not(:first-of-type){margin:0 var(--spacing-2-xs) 0 0}.button_hds-button--primary__2NVvO{--background-color:var(--color-bus);--background-color-hover:var(--color-bus-dark);--background-color-focus:var(--color-bus);--background-color-hover-focus:var(--color-bus-dark);--background-color-disabled:var(--color-black-20);--border-color:var(--color-bus);--border-color-hover:var(--color-bus-dark);--border-color-focus:var(--color-bus);--border-color-hover-focus:var(--color-bus-dark);--border-color-disabled:var(--color-black-20);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white);--color-disabled:var(--color-white)}.button_hds-button--primary__2NVvO,.button_hds-button--secondary__1NOWS{--focus-outline-color:var(--color-focus-outline);--submit-input-focus-gutter-color:var(--color-white)}.button_hds-button--secondary__1NOWS{--border-color:var(--color-bus);--border-color-hover:var(--color-bus-dark);--border-color-focus:var(--color-bus);--border-color-hover-focus:var(--color-bus-dark);--border-color-disabled:var(--color-black-50)}.button_hds-button--secondary__1NOWS,.button_hds-button--supplementary__GcHcV{--background-color:transparent;--background-color-hover:var(--color-bus-light);--background-color-focus:transparent;--background-color-hover-focus:var(--color-bus-light);--background-color-disabled:transparent;--color:var(--color-bus);--color-hover:var(--color-bus-dark);--color-focus:var(--color-bus);--color-hover-focus:var(--color-bus-dark);--color-disabled:var(--color-black-40)}.button_hds-button--supplementary__GcHcV{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline);--border-color-disabled:transparent;--focus-outline-color:transparent;--submit-input-focus-gutter-color:transparent}.button_hds-button--loading__2mLjh{--background-color:transparent;--background-color-hover:transparent;--background-color-focus:transparent;--background-color-hover-focus:transparent;--background-color-disabled:transparent;--border-color:transparent;--border-color-hover:transparent;--border-color-focus:transparent;--border-color-hover-focus:transparent;--border-color-disabled:transparent;--color:var(--color-black-90);--color-hover:var(--color-black-90);--color-focus:var(--color-black-90);--color-hover-focus:var(--color-black-90);--color-disabled:var(--color-black-90);cursor:wait}.button_hds-button--success__9hpuD{--background-color:var(--color-success);--background-color-hover:var(--color-success-dark);--background-color-focus:var(--color-success);--background-color-hover-focus:var(--color-success-dark);--border-color:var(--color-success);--border-color-hover:var(--color-success-dark);--border-color-focus:var(--color-success);--border-color-hover-focus:var(--color-success-dark)}.button_hds-button--danger__dEREN,.button_hds-button--success__9hpuD{--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white);--focus-outline-color:var(--color-focus-outline)}.button_hds-button--danger__dEREN{--background-color:var(--color-error);--background-color-hover:var(--color-error-dark);--background-color-focus:var(--color-error);--background-color-hover-focus:var(--color-error-dark);--border-color:var(--color-error);--border-color-hover:var(--color-error-dark);--border-color-focus:var(--color-error);--border-color-hover-focus:var(--color-error-dark)}.button_hds-button--primary__2NVvO.button_hds-button--theme-coat__12cO0{--background-color:var(--color-coat-of-arms);--background-color-hover:var(--color-coat-of-arms-dark);--background-color-focus:var(--color-coat-of-arms);--background-color-hover-focus:var(--color-coat-of-arms-dark);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white)}.button_hds-button--primary__2NVvO.button_hds-button--theme-coat__12cO0,.button_hds-button--secondary__1NOWS.button_hds-button--theme-coat__12cO0{--border-color:var(--color-coat-of-arms);--border-color-hover:var(--color-coat-of-arms-dark);--border-color-focus:var(--color-coat-of-arms);--border-color-hover-focus:var(--color-coat-of-arms-dark)}.button_hds-button--secondary__1NOWS.button_hds-button--theme-coat__12cO0,.button_hds-button--supplementary__GcHcV.button_hds-button--theme-coat__12cO0{--background-color:transparent;--background-color-hover:var(--color-coat-of-arms-light);--background-color-focus:transparent;--background-color-hover-focus:var(--color-coat-of-arms-light);--color:var(--color-coat-of-arms);--color-hover:var(--color-coat-of-arms);--color-focus:var(--color-coat-of-arms);--color-hover-focus:var(--color-coat-of-arms)}.button_hds-button--supplementary__GcHcV.button_hds-button--theme-coat__12cO0{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline)}.button_hds-button--primary__2NVvO.button_hds-button--theme-black__3K_k4{--background-color:var(--color-black);--background-color-hover:var(--color-black);--background-color-focus:var(--color-black);--background-color-hover-focus:var(--color-black);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white)}.button_hds-button--primary__2NVvO.button_hds-button--theme-black__3K_k4,.button_hds-button--secondary__1NOWS.button_hds-button--theme-black__3K_k4{--border-color:var(--color-black);--border-color-hover:var(--color-black);--border-color-focus:var(--color-black);--border-color-hover-focus:var(--color-black)}.button_hds-button--secondary__1NOWS.button_hds-button--theme-black__3K_k4,.button_hds-button--supplementary__GcHcV.button_hds-button--theme-black__3K_k4{--background-color:transparent;--background-color-hover:var(--color-black-5);--background-color-focus:transparent;--background-color-hover-focus:var(--color-black-5);--color:var(--color-black);--color-hover:var(--color-black);--color-focus:var(--color-black);--color-hover-focus:var(--color-black)}.button_hds-button--supplementary__GcHcV.button_hds-button--theme-black__3K_k4{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline)}.Button-module_icon__O-h7R svg{max-height:100%;max-width:100%}');var c=i.a.forwardRef((function(e,t){var n=e.children,o=e.className,a=e.disabled,c=void 0!==a&&a,d=e.fullWidth,f=e.size,h=void 0===f?"default":f,p=e.theme,b=void 0===p?"default":p,m=e.variant,v=void 0===m?"primary":m,g=e.iconLeft,_=e.iconRight,y=e.isLoading,w=void 0!==y&&y,k=e.loadingText,x=e.onClick,M=Object(r.a)(e,["children","className","disabled","fullWidth","size","theme","variant","iconLeft","iconRight","isLoading","loadingText","onClick"]),E=g?i.a.createElement("div",{className:u.icon,"aria-hidden":"true"},g):null,S=_?i.a.createElement("div",{className:Object(l.a)(u.icon),"aria-hidden":"true"},_):null;return i.a.createElement("button",Object.assign({ref:t,disabled:c,"aria-disabled":w||c||void 0,"aria-label":w?k:void 0,type:"button",className:Object(l.a)(u.button,u[v],u["theme-".concat(b)],u["size-".concat(h)],d?u.fullWidth:"",w?u.isLoading:"",o),onClick:w?function(e){e.preventDefault()}:x},M),w?i.a.createElement(s.a,{small:!0}):E,i.a.createElement("span",{className:u.label},w?k:n),w?null:S)}))},function(e,t,n){(function(t){var n="[object Symbol]",r="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")(),a=Object.prototype,l=0,s=a.toString,u=i.Symbol,c=u?u.prototype:void 0,d=c?c.toString:void 0;function f(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&s.call(e)==n}(e))return d?d.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}e.exports=function(e){var t,n=++l;return(null==(t=e)?"":f(t))+n}}).call(this,n(20))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(34),o=n(7);function i(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function l(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),o=0;o>6|192,n[r++]=63&a|128):i(e,o)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++o)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(o=0;o>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,a=(i>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,a,l){var s=0,u=t;return s+=(u=u+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,o,i,a,l){return t+r+i+l>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,a,l,s,u){var c=0,d=t;return c+=(d=d+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,o,i,a,l,s,u){return t+r+i+l+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t,n,r,o){return[t&&"".concat(e,"-helper"),n&&"".concat(e,"-error"),r&&"".concat(e,"-success"),o&&"".concat(e,"-info")].filter((function(e){return e})).join(" ")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(57);function o(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(1),a=function(e){var t=e.ariaLabel,n=void 0===t?"angle-left":t,r=e.ariaLabelledby,a=e.ariaHidden,l=void 0===a||a,s=e.className,u=void 0===s?"":s,c=e.color,d=e.size,f=void 0===d?"s":d,h=e.style,p=void 0===h?{}:h;return o.a.createElement("svg",{className:[i.a.icon,i.a[f],u].filter((function(e){return e})).join(" "),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-label":n,"aria-labelledby":r,"aria-hidden":l,color:c,style:p},o.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 12L15.5 17L14 18.5L7.5 12L14 5.5L15.5 7L10.5 12Z",fill:"currentColor"}))}},function(e,t,n){var r=n(10).Buffer,o=n(217).Transform,i=n(47).StringDecoder;function a(e){o.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(7)(a,o),a.prototype.update=function(e,t,n){"string"===typeof e&&(e=r.from(e,t));var o=this._update(e);return this.hashMode?this:(n&&(o=this._toString(o,n)),o)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(o){r=o}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(n){t=n}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new i(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(1),a=function(e){var t=e.ariaLabel,n=void 0===t?"angle-right":t,r=e.ariaLabelledby,a=e.ariaHidden,l=void 0===a||a,s=e.className,u=void 0===s?"":s,c=e.color,d=e.size,f=void 0===d?"s":d,h=e.style,p=void 0===h?{}:h;return o.a.createElement("svg",{className:[i.a.icon,i.a[f],u].filter((function(e){return e})).join(" "),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-label":n,"aria-labelledby":r,"aria-hidden":l,color:c,style:p},o.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z",fill:"currentColor"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(1),a=function(e){var t=e.ariaLabel,n=void 0===t?"angle-down":t,r=e.ariaLabelledby,a=e.ariaHidden,l=void 0===a||a,s=e.className,u=void 0===s?"":s,c=e.color,d=e.size,f=void 0===d?"s":d,h=e.style,p=void 0===h?{}:h;return o.a.createElement("svg",{className:[i.a.icon,i.a[f],u].filter((function(e){return e})).join(" "),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-label":n,"aria-labelledby":r,"aria-hidden":l,color:c,style:p},o.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 13.5L17 8.5L18.5 10L12 16.5L5.5 10L7 8.5L12 13.5Z",fill:"currentColor"}))}},function(e,t,n){"use strict";var r,o="object"===typeof Reflect?Reflect:null,i=o&&"function"===typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"===typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function l(){l.init.call(this)}e.exports=l,e.exports.once=function(e,t){return new Promise((function(n,r){function o(){void 0!==i&&e.removeListener("error",i),n([].slice.call(arguments))}var i;"error"!==t&&(i=function(n){e.removeListener(t,o),r(n)},e.once("error",i)),e.once(t,o)}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,l;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"===typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,l=s,console&&console.warn&&console.warn(l)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function p(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var s=o[e];if(void 0===s)return!1;if("function"===typeof s)i(s,this,t);else{var u=s.length,c=m(s,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},l.prototype.listenerCount=b,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(10).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=u,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function l(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";var r=n(75),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var i=Object.create(n(63));i.inherits=n(7);var a=n(133),l=n(99);i.inherits(d,a);for(var s=o(l.prototype),u=0;ui)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>o)for(var s=0;s2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,a,l;if("string"===typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l="The ".concat(e," ").concat(r," ").concat(i(t,"type"));else{var s=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(s," ").concat(r," ").concat(i(t,"type"))}return l+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var o=n(125),i=n(129);n(7)(u,o);for(var a=r(i.prototype),l=0;l=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){"use strict";var r={};function o(e,t,n){n||(n=Error);var o=function(e){var n,r;function o(n,r,o){return e.call(this,function(e,n,r){return"string"===typeof t?t:t(e,n,r)}(n,r,o))||this}return r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o}(n);o.prototype.name=n.name,o.prototype.code=e,r[e]=o}function i(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,a,l;if("string"===typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l="The ".concat(e," ").concat(r," ").concat(i(t,"type"));else{var s=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(s," ").concat(r," ").concat(i(t,"type"))}return l+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var o=n(154),i=n(158);n(7)(u,o);for(var a=r(i.prototype),l=0;lspan{display:flex}.Tooltip-module_button__2x9m0:focus{box-shadow:0 0 0 var(--button-focus-outline-width) var(--button-focus-outline-color);outline:none}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=bottom]{border-top:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=top]{border-bottom:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=left]{border-right:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=right]{border-left:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8 .Tooltip-module_arrow__210Rd{position:absolute}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=bottom] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-bottom:var(--tooltip-arrow-size) solid var(--tooltip-border-color);top:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=top] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-top:var(--tooltip-arrow-size) solid var(--tooltip-border-color);bottom:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=left] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-left:var(--tooltip-arrow-size) solid var(--tooltip-border-color);right:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=right] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-right:var(--tooltip-arrow-size) solid var(--tooltip-border-color);left:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}");var d=function(e){var t=e.boxShadow,n=void 0!==t&&t,l=e.children,s=e.placement,d=void 0===s?"auto":s,f=e.small,h=void 0!==f&&f,p=e.buttonLabel,b=void 0===p?"Tooltip":p,m=e.tooltipLabel,v=void 0===m?"Tooltip":m,g=e.className,_=e.buttonClassName,y=e.tooltipClassName,w=Object(o.useState)(!1),k=Object(r.a)(w,2),x=k[0],M=k[1],E=Object(o.useRef)(null),S=Object(o.useRef)(null),O=Object(o.useState)(null),L=Object(r.a)(O,2),C=L[0],j=L[1],N=Object(a.a)(E.current,S.current,{placement:d,modifiers:[{name:"arrow",options:{element:C}},{name:"offset",options:{offset:[0,10]}}]}),I=N.styles,T=N.attributes,A=N.forceUpdate;return Object(o.useEffect)((function(){null!==A&&!0===x&&A()}),[x,A]),Object(o.useEffect)((function(){var e=function(e){var t=e.key||e.keyCode;!x||"Escape"!==t&&"Esc"!==t&&27!==t||M(!1)},t=function(e){var t=e.target;!x||E.current.contains(t)||S.current.contains(t)||M(!1)};return document.addEventListener("keyup",e),document.addEventListener("click",t),function(){document.removeEventListener("keyup",e),document.removeEventListener("click",t)}})),i.a.createElement("div",{className:Object(c.a)("Tooltip-module_root__1Yo9t",g)},i.a.createElement("button",{ref:E,type:"button",className:Object(c.a)("Tooltip-module_button__2x9m0",_),title:b,"aria-label":b,"aria-expanded":x,onClick:function(){M(!x)}},i.a.createElement("span",{"aria-hidden":"true"},i.a.createElement(u,null))),x&&i.a.createElement("section",Object.assign({"aria-label":v,ref:S,className:Object(c.a)("Tooltip-module_tooltip__3x8S8",h&&"Tooltip-module_small__29mxd",n&&"Tooltip-module_boxShadow__3IzE-",y),style:I.popper},T.popper),l,i.a.createElement("div",Object.assign({ref:j,className:"Tooltip-module_arrow__210Rd",style:I.arrow},T.arrow))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(32);function o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}},function(e,t,n){"use strict";var r=n(7),o=n(92),i=n(95),a=n(96),l=n(43);function s(e){l.call(this,"digest"),this._hash=e}r(s,l),s.prototype._update=function(e){this._hash.update(e)},s.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new i:new s(a(e))}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"===typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"===typeof e},t.isString=function(e){return"string"===typeof e},t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"===typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"===typeof e},t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=e.isBuffer}).call(this,n(23).Buffer)},function(e,t,n){(function(t){e.exports=function(e,n){for(var r=Math.min(e.length,n.length),o=new t(r),i=0;i=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>24]^c[p>>>16&255]^d[b>>>8&255]^f[255&m]^t[v++],a=u[p>>>24]^c[b>>>16&255]^d[m>>>8&255]^f[255&h]^t[v++],l=u[b>>>24]^c[m>>>16&255]^d[h>>>8&255]^f[255&p]^t[v++],s=u[m>>>24]^c[h>>>16&255]^d[p>>>8&255]^f[255&b]^t[v++],h=i,p=a,b=l,m=s;return i=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[b>>>8&255]<<8|r[255&m])^t[v++],a=(r[p>>>24]<<24|r[b>>>16&255]<<16|r[m>>>8&255]<<8|r[255&h])^t[v++],l=(r[b>>>24]<<24|r[m>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[v++],s=(r[m>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&b])^t[v++],[i>>>=0,a>>>=0,l>>>=0,s>>>=0]}var l=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],o=[[],[],[],[]],i=[[],[],[],[]],a=0,l=0,s=0;s<256;++s){var u=l^l<<1^l<<2^l<<3^l<<4;u=u>>>8^255&u^99,n[a]=u,r[u]=a;var c=e[a],d=e[c],f=e[d],h=257*e[u]^16843008*u;o[0][a]=h<<24|h>>>8,o[1][a]=h<<16|h>>>16,o[2][a]=h<<8|h>>>24,o[3][a]=h,h=16843009*f^65537*d^257*c^16843008*a,i[0][u]=h<<24|h>>>8,i[1][u]=h<<16|h>>>16,i[2][u]=h<<8|h>>>24,i[3][u]=h,0===a?a=l=1:(a=c^e[e[e[f^c]]],l^=e[e[l]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:o,INV_SUB_MIX:i}}();function u(e){this._key=o(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),o=[],i=0;i>>24,a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=l[i/t|0]<<24):t>6&&i%t===4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),o[i]=o[i-t]^a}for(var u=[],c=0;c>>24]]^s.INV_SUB_MIX[1][s.SBOX[f>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[f>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&f]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=o(e),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},u.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=a(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),i=r.allocUnsafe(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=u},function(e,t,n){var r=n(10).Buffer,o=n(92);e.exports=function(e,t,n,i){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,l=r.alloc(a),s=r.alloc(i||0),u=r.alloc(0);a>0||i>0;){var c=new o;c.update(u),c.update(e),t&&c.update(t),u=c.digest();var d=0;if(a>0){var f=l.length-a;d=Math.min(a,u.length),u.copy(l,f,0,d),a-=d}if(d0){var h=s.length-i,p=Math.min(i,u.length-d);u.copy(s,h,d,d+p),i-=p}}return u.fill(0),{key:l,iv:s}}},function(e,t,n){"use strict";var r=n(21),o=n(35),i=o.getNAF,a=o.getJSF,l=o.assert;function s(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){l(e.precomputed);var n=e._getDoubles(),r=i(t,1,this._bitLength),o=(1<=s;t--)u=(u<<1)+r[t];a.push(u)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=o;f>0;f--){for(s=0;s=0;u--){for(t=0;u>=0&&0===a[u];u--)t++;if(u>=0&&t++,s=s.dblp(t),u<0)break;var c=a[u];l(0!==c),s="affine"===e.type?c>0?s.mixedAdd(o[c-1>>1]):s.mixedAdd(o[-c-1>>1].neg()):c>0?s.add(o[c-1>>1]):s.add(o[-c-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,t,n,r,o){for(var l=this._wnafT1,s=this._wnafT2,u=this._wnafT3,c=0,d=0;d=1;d-=2){var h=d-1,p=d;if(1===l[h]&&1===l[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=a(n[h],n[p]);c=Math.max(v[0].length,c),u[h]=new Array(c),u[p]=new Array(c);for(var g=0;g=0;d--){for(var x=0;d>=0;){var M=!0;for(g=0;g=0&&x++,w=w.dblp(x),d<0)break;for(g=0;g0?E=s[g][S-1>>1]:S<0&&(E=s[g][-S-1>>1].neg()),w="affine"===E.type?w.mixedAdd(E):w.add(E))}}for(d=0;d=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,o=0;o1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:E,n=O;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));var r,o={},i=Object(m.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value,l=t(e[a],a);v.s.und(l)||(o[a]=l)}}catch(s){i.e(s)}finally{i.f()}return o},O=["config","onProps","onStart","onChange","onPause","onResume","onRest"],L={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function C(e){var t=function(e){var t={},n=0;if(Object(v.l)(e,(function(e,r){L[r]||(t[r]=e,n++)})),n)return t}(e);if(t){var n={to:t};return Object(v.l)(e,(function(e,r){return r in t||(n[r]=e)})),n}return y({},e)}function j(e){return e=Object(v.q)(e),v.s.arr(e)?e.map(j):Object(v.t)(e)?v.b.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function N(e){for(var t in e)return!0;return!1}function I(e){return v.s.fun(e)||v.s.arr(e)&&v.s.obj(e[0])}function T(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function A(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}var R=y({},{tension:170,friction:26},{mass:1,damping:1,easing:function(e){return e},clamp:!1}),z=function e(){Object(b.a)(this,e),this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,R)};function B(e,t){if(v.s.und(t.decay)){var n=!v.s.und(t.tension)||!v.s.und(t.friction);!n&&v.s.und(t.frequency)&&v.s.und(t.damping)&&v.s.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var P=[],D=function e(){Object(b.a)(this,e),this.changed=!1,this.values=P,this.toValues=null,this.fromValues=P,this.to=void 0,this.from=void 0,this.config=new z,this.immediate=!1};function H(e,t){var n=t.key,r=t.props,o=t.defaultProps,i=t.state,a=t.actions;return new Promise((function(t,l){var s,u,c,d=k(null!=(s=r.cancel)?s:null==o?void 0:o.cancel,n);if(d)b();else{v.s.und(r.pause)||(i.paused=k(r.pause,n));var f=null==o?void 0:o.pause;!0!==f&&(f=i.paused||k(f,n)),u=w(r.delay||0,n),f?(i.resumeQueue.add(p),a.pause()):(a.resume(),p())}function h(){i.resumeQueue.add(p),i.timeouts.delete(c),c.cancel(),u=c.time-v.w.now()}function p(){u>0&&!v.b.skipAnimation?(c=v.w.setTimeout(b,u),i.pauseQueue.add(h),i.timeouts.add(c)):b()}function b(){i.pauseQueue.delete(h),i.timeouts.delete(c),e<=(i.cancelId||0)&&(d=!0);try{a.start(y({},r,{callId:e,cancel:d}),t)}catch(n){l(n)}}}))}var U=function(e,t){return 1==t.length?t[0]:t.some((function(e){return e.cancelled}))?V(e.get()):t.every((function(e){return e.noop}))?F(e.get()):W(e.get(),t.every((function(e){return e.finished})))},F=function(e){return{value:e,noop:!0,finished:!0,cancelled:!1}},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{value:e,finished:t,cancelled:n}},V=function(e){return{value:e,cancelled:!0,finished:!1}};function q(e,t,n,r){var o=t.callId,i=t.parentId,a=t.onRest,l=n.asyncTo,s=n.promise;return i||e!==l||t.reset?n.promise=Object(p.a)(h.a.mark((function u(){var c,d,f,b,g,_,w,k;return h.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(n.asyncId=o,n.asyncTo=e,c=S(t,(function(e,t){return"onRest"===t?void 0:e})),b=new Promise((function(e,t){return d=e,f=t})),g=function(e){var t=o<=(n.cancelId||0)&&V(r)||o!==n.asyncId&&W(r,!1);if(t)throw e.result=t,f(e),e},_=function(e,t){var i=new Y,a=new Z;return Object(p.a)(h.a.mark((function l(){var s,u;return h.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(!v.b.skipAnimation){l.next=5;break}throw K(n),a.result=W(r,!1),f(a),a;case 5:return g(i),(s=v.s.obj(e)?y({},e):y({},t,{to:e})).parentId=o,Object(v.l)(c,(function(e,t){v.s.und(s[t])&&(s[t]=e)})),l.next=11,r.start(s);case 11:if(u=l.sent,g(i),!n.paused){l.next=16;break}return l.next=16,new Promise((function(e){n.resumeQueue.add(e)}));case 16:return l.abrupt("return",u);case 17:case"end":return l.stop()}}),l)})))()},!v.b.skipAnimation){u.next=9;break}return K(n),u.abrupt("return",W(r,!1));case 9:return u.prev=9,k=v.s.arr(e)?function(){var e=Object(p.a)(h.a.mark((function e(t){var n,r,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(m.a)(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,_(o);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})));return function(t){return e.apply(this,arguments)}}()(e):Promise.resolve(e(_,r.stop.bind(r))),u.next=13,Promise.all([k.then(d),b]);case 13:w=W(r.get(),!0,!1),u.next=27;break;case 16:if(u.prev=16,u.t0=u.catch(9),!(u.t0 instanceof Y)){u.next=22;break}w=u.t0.result,u.next=27;break;case 22:if(!(u.t0 instanceof Z)){u.next=26;break}w=u.t0.result,u.next=27;break;case 26:throw u.t0;case 27:return u.prev=27,o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?s:void 0),u.finish(27);case 30:return v.s.fun(a)&&v.w.batchedUpdates((function(){a(w,r,r.item)})),u.abrupt("return",w);case 32:case"end":return u.stop()}}),u,null,[[9,16,27,30]])})))():s}function K(e,t){Object(v.m)(e.timeouts,(function(e){return e.cancel()})),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Y=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(b.a)(this,n),(e=t.call(this,"An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")).result=void 0,e}return n}(Object(d.a)(Error)),Z=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(b.a)(this,n),(e=t.call(this,"SkipAnimationSignal")).result=void 0,e}return n}(Object(d.a)(Error)),X=function(e){return e instanceof Q},G=1,Q=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(b.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i1&&void 0!==arguments[1]&&arguments[1];Object(v.d)(this,{type:"change",parent:this,value:e,idle:t})}},{key:"_onPriorityChange",value:function(e){this.idle||v.o.sort(this),Object(v.d)(this,{type:"priority",parent:this,priority:e})}},{key:"priority",get:function(){return this._priority},set:function(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}}]),n}(v.a),J=Symbol.for("SpringPhase"),$=function(e){return(1&e[J])>0},ee=function(e){return(2&e[J])>0},te=function(e){return(4&e[J])>0},ne=function(e,t){return t?e[J]|=3:e[J]&=-3},re=function(e,t){return t?e[J]|=4:e[J]&=-5},oe=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r){var o;if(Object(b.a)(this,n),(o=t.call(this)).key=void 0,o.animation=new D,o.queue=void 0,o.defaultProps={},o._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},o._pendingCalls=new Set,o._lastCallId=0,o._lastToId=0,o._memoizedDuration=0,!v.s.und(e)||!v.s.und(r)){var i=v.s.obj(e)?y({},e):y({},r,{from:e});v.s.und(i.default)&&(i.default=!0),o.start(i)}return o}return Object(s.a)(n,[{key:"advance",value:function(e){var t=this,n=!0,r=!1,o=this.animation,i=o.config,a=o.toValues,l=Object(_.g)(o.to);!l&&Object(v.r)(o.to)&&(a=Object(v.y)(Object(v.q)(o.to))),o.values.forEach((function(s,u){if(!s.done){var c=s.constructor==_.b?1:l?l[u].lastPosition:a[u],d=o.immediate,f=c;if(!d){if(f=s.lastPosition,i.tension<=0)return void(s.done=!0);var h,p=s.elapsedTime+=e,b=o.fromValues[u],m=null!=s.v0?s.v0:s.v0=v.s.arr(i.velocity)?i.velocity[u]:i.velocity;if(v.s.und(i.duration))if(i.decay){var g=!0===i.decay?.998:i.decay,y=Math.exp(-(1-g)*p);f=b+m/(1-g)*(1-y),d=Math.abs(s.lastPosition-f)<.1,h=m*y}else{h=null==s.lastVelocity?m:s.lastVelocity;for(var w=i.precision||(b==c?.005:Math.min(1,.001*Math.abs(c-b))),k=i.restVelocity||w/10,x=i.clamp?0:i.bounce,M=!v.s.und(x),E=b==c?s.v0>0:bk||!(d=Math.abs(c-f)<=w));++O){M&&(f==c||f>c==E)&&(h=-h*x,f=c),f+=1*(h+=1*((1e-6*-i.tension*(f-c)+.001*-i.friction*h)/i.mass))}}else{var L=1;i.duration>0&&(t._memoizedDuration!==i.duration&&(t._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,p=s.elapsedTime+=e)),L=(L=(i.progress||0)+p/t._memoizedDuration)>1?1:L<0?0:L,s.durationProgress=L),h=((f=b+i.easing(L)*(c-b))-s.lastPosition)/e,d=1==L}s.lastVelocity=h,Number.isNaN(f)&&(console.warn("Got NaN while animating:",t),d=!0)}l&&!l[u].done&&(d=!1),d?s.done=!0:n=!1,s.setValue(f,i.round)&&(r=!0)}}));var s=Object(_.e)(this),u=s.getValue();if(n){var c=Object(v.q)(o.to);u===c&&!r||i.decay?r&&i.decay&&this._onChange(u):(s.setValue(c),this._onChange(c)),this._stop()}else r&&this._onChange(u)}},{key:"set",value:function(e){var t=this;return v.w.batchedUpdates((function(){t._stop(),t._focus(e),t._set(e)})),this}},{key:"pause",value:function(){this._update({pause:!0})}},{key:"resume",value:function(){this._update({pause:!1})}},{key:"finish",value:function(){var e=this;if(ee(this)){var t=this.animation,n=t.to,r=t.config;v.w.batchedUpdates((function(){e._onStart(),r.decay||e._set(n,!1),e._stop()}))}return this}},{key:"update",value:function(e){return(this.queue||(this.queue=[])).push(e),this}},{key:"start",value:function(e,t){var n,r=this;return v.s.und(e)?(n=this.queue||[],this.queue=[]):n=[v.s.obj(e)?e:y({},t,{to:e})],Promise.all(n.map((function(e){return r._update(e)}))).then((function(e){return U(r,e)}))}},{key:"stop",value:function(e){var t=this,n=this.animation.to;return this._focus(this.get()),K(this._state,e&&this._lastCallId),v.w.batchedUpdates((function(){return t._stop(n,e)})),this}},{key:"reset",value:function(){this._update({reset:!0})}},{key:"eventObserved",value:function(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}},{key:"_prepareNode",value:function(e){var t=this.key||"",n=e.to,r=e.from;(null==(n=v.s.obj(n)?n[t]:n)||I(n))&&(n=void 0),null==(r=v.s.obj(r)?r[t]:r)&&(r=void 0);var o={to:n,from:r};if(!$(this)){if(e.reverse){var i=[r,n];n=i[0],r=i[1]}r=Object(v.q)(r),v.s.und(r)?Object(_.e)(this)||this._set(n):this._set(r)}return o}},{key:"_update",value:function(e,t){var n=this,r=y({},e),o=this.key,i=this.defaultProps;r.default&&Object.assign(i,S(r,(function(e,t){return/^on/.test(t)?x(e,o):e}))),de(this,r,"onProps"),fe(this,"onProps",r,this);var a=this._prepareNode(r);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");var l=this._state;return H(++this._lastCallId,{key:o,props:r,defaultProps:i,state:l,actions:{pause:function(){te(n)||(re(n,!0),Object(v.n)(l.pauseQueue),fe(n,"onPause",W(n,ie(n,n.animation.to)),n))},resume:function(){te(n)&&(re(n,!1),ee(n)&&n._resume(),Object(v.n)(l.resumeQueue),fe(n,"onResume",W(n,ie(n,n.animation.to)),n))},start:this._merge.bind(this,a)}}).then((function(e){if(r.loop&&e.finished&&(!t||!e.noop)){var o=ae(r);if(o)return n._update(o,!0)}return e}))}},{key:"_merge",value:function(e,t,n){var r=this;if(t.cancel)return this.stop(!0),n(V(this));var o=!v.s.und(e.to),i=!v.s.und(e.from);if(o||i){if(!(t.callId>this._lastToId))return n(V(this));this._lastToId=t.callId}var a=this.key,l=this.defaultProps,s=this.animation,u=s.to,c=s.from,d=e.to,f=void 0===d?u:d,h=e.from,p=void 0===h?c:h;if(!i||o||t.default&&!v.s.und(f)||(f=p),t.reverse){var b=[p,f];f=b[0],p=b[1]}var m=!Object(v.u)(p,c);m&&(s.from=p),p=Object(v.q)(p);var g=!Object(v.u)(f,u);g&&this._focus(f);var x=I(t.to),M=s.config,E=M.decay,S=M.velocity;(o||i)&&(M.velocity=0),t.config&&!x&&function(e,t,n){for(var r in n&&(B(n=y({},n),t),t=y({},n,t)),B(e,t),Object.assign(e,t),R)null==e[r]&&(e[r]=R[r]);var o=e.mass,i=e.frequency,a=e.damping;v.s.und(i)||(i<.01&&(i=.01),a<0&&(a=0),e.tension=Math.pow(2*Math.PI/i,2)*o,e.friction=4*Math.PI*a*o/i)}(M,w(t.config,a),t.config!==l.config?w(l.config,a):void 0);var O=Object(_.e)(this);if(!O||v.s.und(f))return n(W(this,!0));var L=v.s.und(t.reset)?i&&!t.default:!v.s.und(p)&&k(t.reset,a),C=L?p:this.get(),N=j(f),T=v.s.num(N)||v.s.arr(N)||Object(v.t)(N),A=!x&&(!T||k(l.immediate||t.immediate,a));if(g){var z=Object(_.f)(f);if(z!==O.constructor){if(!A)throw Error("Cannot animate between ".concat(O.constructor.name," and ").concat(z.name,', as the "to" prop suggests'));O=this._set(N)}}var P=O.constructor,D=Object(v.r)(f),H=!1;if(!D){var U=L||!$(this)&&m;(g||U)&&(D=!(H=Object(v.u)(j(C),N))),(Object(v.u)(s.immediate,A)||A)&&Object(v.u)(M.decay,E)&&Object(v.u)(M.velocity,S)||(D=!0)}if(H&&ee(this)&&(s.changed&&!L?D=!0:D||this._stop(u)),!x&&((D||Object(v.r)(u))&&(s.values=O.getPayload(),s.toValues=Object(v.r)(f)?null:P==_.b?[1]:Object(v.y)(N)),s.immediate!=A&&(s.immediate=A,A||L||this._set(u)),D)){var K=s.onRest;Object(v.k)(ce,(function(e){return de(r,t,e)}));var Y=W(this,ie(this,u));Object(v.n)(this._pendingCalls,Y),this._pendingCalls.add(n),s.changed&&v.w.batchedUpdates((function(){s.changed=!L,null==K||K(Y,r),L?w(l.onRest,Y):null==s.onStart||s.onStart(Y,r)}))}L&&this._set(C),x?n(q(t.to,t,this._state,this)):D?this._start():ee(this)&&!g?this._pendingCalls.add(n):n(F(C))}},{key:"_focus",value:function(e){var t=this.animation;e!==t.to&&(Object(v.p)(this)&&this._detach(),t.to=e,Object(v.p)(this)&&this._attach())}},{key:"_attach",value:function(){var e=0,t=this.animation.to;Object(v.r)(t)&&(Object(v.c)(t,this),X(t)&&(e=t.priority+1)),this.priority=e}},{key:"_detach",value:function(){var e=this.animation.to;Object(v.r)(e)&&Object(v.x)(e,this)}},{key:"_set",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Object(v.q)(e);if(!v.s.und(r)){var o=Object(_.e)(this);if(!o||!Object(v.u)(r,o.getValue())){var i=Object(_.f)(r);o&&o.constructor==i?o.setValue(r):Object(_.h)(this,i.create(r)),o&&v.w.batchedUpdates((function(){t._onChange(r,n)}))}}return Object(_.e)(this)}},{key:"_onStart",value:function(){var e=this.animation;e.changed||(e.changed=!0,fe(this,"onStart",W(this,ie(this,e.to)),this))}},{key:"_onChange",value:function(e,t){t||(this._onStart(),w(this.animation.onChange,e,this)),w(this.defaultProps.onChange,e,this),Object(a.a)(Object(l.a)(n.prototype),"_onChange",this).call(this,e,t)}},{key:"_start",value:function(){var e=this.animation;Object(_.e)(this).reset(Object(v.q)(e.to)),e.immediate||(e.fromValues=e.values.map((function(e){return e.lastPosition}))),ee(this)||(ne(this,!0),te(this)||this._resume())}},{key:"_resume",value:function(){v.b.skipAnimation?this.finish():v.o.start(this)}},{key:"_stop",value:function(e,t){if(ee(this)){ne(this,!1);var n=this.animation;Object(v.k)(n.values,(function(e){e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Object(v.d)(this,{type:"idle",parent:this});var r=t?V(this.get()):W(this.get(),ie(this,null!=e?e:n.to));Object(v.n)(this._pendingCalls,r),n.changed&&(n.changed=!1,fe(this,"onRest",r,this))}}},{key:"idle",get:function(){return!(ee(this)||this._state.asyncTo)||te(this)}},{key:"goal",get:function(){return Object(v.q)(this.animation.to)}},{key:"velocity",get:function(){var e=Object(_.e)(this);return e instanceof _.c?e.lastVelocity||0:e.getPayload().map((function(e){return e.lastVelocity||0}))}},{key:"hasAnimated",get:function(){return $(this)}},{key:"isAnimating",get:function(){return ee(this)}},{key:"isPaused",get:function(){return te(this)}}]),n}(Q);function ie(e,t){var n=j(t),r=j(e.get());return Object(v.u)(r,n)}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.loop,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.to,r=w(t);if(r){var o=!0!==r&&C(r),i=(o||e).reverse,a=!o||o.reset;return le(y({},e,{loop:t,default:!1,pause:void 0,to:!i||I(n)?n:void 0,from:a?e.from:void 0,reset:a},o))}}function le(e){var t=e=C(e),n=t.to,r=t.from,o=new Set;return v.s.obj(n)&&ue(n,o),v.s.obj(r)&&ue(r,o),e.keys=o.size?Array.from(o):null,e}function se(e){var t=le(e);return v.s.und(t.default)&&(t.default=S(t)),t}function ue(e,t){Object(v.l)(e,(function(e,n){return null!=e&&t.add(n)}))}var ce=["onStart","onRest","onChange","onPause","onResume"];function de(e,t,n){e.animation[n]=t[n]!==M(t,n)?x(t[n],e.key):void 0}function fe(e,t){for(var n,r,o,i,a,l,s=arguments.length,u=new Array(s>2?s-2:0),c=2;c0,l=this._changed.size>0;(a&&!this._started||l&&!this._started)&&(this._started=!0,Object(v.m)(n,(function(t){var n=Object(i.a)(t,2),r=n[0],o=n[1];o.value=e.get(),r(o,e,e._item)})));var s=!a&&this._started,u=l||s&&o.size?this.get():null;l&&r.size&&Object(v.m)(r,(function(t){var n=Object(i.a)(t,2),r=n[0],o=n[1];o.value=u,r(o,e,e._item)})),s&&(this._started=!1,Object(v.m)(o,(function(t){var n=Object(i.a)(t,2),r=n[0],o=n[1];o.value=u,r(o,e,e._item)})))}},{key:"eventObserved",value:function(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}v.w.onFrame(this._onFrame)}},{key:"idle",get:function(){return!this._state.asyncTo&&Object.values(this.springs).every((function(e){return e.idle}))}},{key:"item",get:function(){return this._item},set:function(e){this._item=e}}]),e}();function me(e,t){return Promise.all(t.map((function(t){return ve(e,t)}))).then((function(t){return U(e,t)}))}function ve(e,t,n){return ge.apply(this,arguments)}function ge(){return(ge=Object(p.a)(h.a.mark((function e(t,n,r){var o,i,a,l,s,u,c,d,f,p,b,m,g;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.keys,i=n.to,a=n.from,l=n.loop,s=n.onRest,u=n.onResolve,c=v.s.obj(n.default)&&n.default,l&&(n.loop=!1),!1===i&&(n.to=null),!1===a&&(n.from=null),(d=v.s.arr(i)||v.s.fun(i)?i:void 0)?(n.to=void 0,n.onRest=void 0,c&&(c.onRest=void 0)):Object(v.k)(he,(function(e){var r=n[e];if(v.s.fun(r)){var o=t._events[e];n[e]=function(e){var t=e.finished,n=e.cancelled,i=o.get(r);i?(t||(i.finished=!1),n&&(i.cancelled=!0)):o.set(r,{value:null,finished:t||!1,cancelled:n||!1})},c&&(c[e]=n[e])}})),f=t._state,n.pause===!f.paused?(f.paused=n.pause,Object(v.n)(n.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(n.pause=!0),p=(o||Object.keys(t.springs)).map((function(e){return t.springs[e].start(n)})),b=!0===n.cancel||!0===M(n,"cancel"),(d||b&&f.asyncId)&&p.push(H(++t._lastAsyncId,{props:n,state:f,actions:{pause:v.v,resume:v.v,start:function(e,n){b?(K(f,t._lastAsyncId),n(V(t))):(e.onRest=s,n(q(d,e,f,t)))}}})),!f.paused){e.next=15;break}return e.next=15,new Promise((function(e){f.resumeQueue.add(e)}));case 15:return e.t0=U,e.t1=t,e.next=19,Promise.all(p);case 19:if(e.t2=e.sent,m=(0,e.t0)(e.t1,e.t2),!l||!m.finished||r&&m.noop){e.next=26;break}if(!(g=ae(n,l,i))){e.next=26;break}return xe(t,[g]),e.abrupt("return",ve(t,g,!0));case 26:return u&&v.w.batchedUpdates((function(){return u(m,t,t.item)})),e.abrupt("return",m);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(e,t){var n=y({},e.springs);return t&&Object(v.k)(Object(v.y)(t),(function(e){v.s.und(e.keys)&&(e=le(e)),v.s.obj(e.to)||(e=y({},e,{to:void 0})),ke(n,e,(function(e){return we(e)}))})),ye(e,n),n}function ye(e,t){Object(v.l)(t,(function(t,n){e.springs[n]||(e.springs[n]=t,Object(v.c)(t,e))}))}function we(e,t){var n=new oe;return n.key=e,t&&Object(v.c)(n,t),n}function ke(e,t,n){t.keys&&Object(v.k)(t.keys,(function(r){(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function xe(e,t){Object(v.k)(t,(function(t){ke(e.springs,t,(function(t){return we(t,e)}))}))}function Me(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var Ee,Se,Oe=["children"],Le=function(e){var t=e.children,n=Me(e,Oe),r=Object(g.useContext)(Ce),o=n.pause||!!r.pause,i=n.immediate||!!r.immediate;n=Object(v.B)((function(){return{pause:o,immediate:i}}),[o,i]);var a=Ce.Provider;return g.createElement(a,{value:n},t)},Ce=(Ee=Le,Se={},Object.assign(Ee,g.createContext(Se)),Ee.Provider._context=Ee,Ee.Consumer._context=Ee,Ee);Le.Provider=Ce.Provider,Le.Consumer=Ce.Consumer;var je=function(){var e=[],t=function(t){Object(v.i)();var r=[];return Object(v.k)(e,(function(e,o){if(v.s.und(t))r.push(e.start());else{var i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){var n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){var t=arguments;return Object(v.k)(e,(function(e){return e.pause.apply(e,Object(o.a)(t))})),this},t.resume=function(){var t=arguments;return Object(v.k)(e,(function(e){return e.resume.apply(e,Object(o.a)(t))})),this},t.set=function(t){Object(v.k)(e,(function(e){return e.set(t)}))},t.start=function(t){var n=this,r=[];return Object(v.k)(e,(function(e,o){if(v.s.und(t))r.push(e.start());else{var i=n._getProps(t,e,o);i&&r.push(e.start(i))}})),r},t.stop=function(){var t=arguments;return Object(v.k)(e,(function(e){return e.stop.apply(e,Object(o.a)(t))})),this},t.update=function(t){var n=this;return Object(v.k)(e,(function(e,r){return e.update(n._getProps(t,e,r))})),this};var n=function(e,t,n){return v.s.fun(e)?e(n,t):e};return t._getProps=n,t};function Ne(e,t,n){var r=arguments,i=v.s.fun(t)&&t;i&&!n&&(n=[]);var a=Object(g.useMemo)((function(){return i||3==r.length?je():void 0}),[]),l=Object(g.useRef)(0),s=Object(v.z)(),u=Object(g.useMemo)((function(){return{ctrls:[],queue:[],flush:function(e,t){var n=_e(e,t);return l.current>0&&!u.queue.length&&!Object.keys(n).some((function(t){return!e.springs[t]}))?me(e,t):new Promise((function(r){ye(e,n),u.queue.push((function(){r(me(e,t))})),s()}))}}}),[]),c=Object(g.useRef)(Object(o.a)(u.ctrls)),d=[],f=Object(v.D)(e)||0;function h(e,n){for(var r=e;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return Q}));var o=n(12),i=n(4),a=n(41),l=(n(9),n(17),n(0)),s=n.n(l),u={prefix:String(Math.round(1e10*Math.random())),current:0,isSSR:!1},c=s.a.createContext(u);var d=Boolean("undefined"!==typeof window&&window.document&&window.document.createElement),f=new WeakMap;function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,l.useContext)(c),n=(0,l.useRef)(null);if(null===n.current&&!e){var r,o,i=null===(r=s.a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===r||null===(o=r.ReactCurrentOwner)||void 0===o?void 0:o.current;if(i){var a=f.get(i);null==a?f.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==a.state&&(t.current=a.id,f.delete(i))}n.current=++t.current}return n.current}s.a.useId;function p(){return!1}function b(){return!0}function m(e){return function(){}}function v(){return"function"===typeof s.a.useSyncExternalStore?s.a.useSyncExternalStore(m,p,b):(0,l.useContext)(c).isSSR}function g(e){var t,n,r="";if("string"===typeof e||"number"===typeof e)r+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t=65&&r.charCodeAt(2)<=90?e[r]=x(i,a):"className"!==r&&"UNSAFE_className"!==r||"string"!==typeof i||"string"!==typeof a?"id"===r&&i&&a?e.id=k(i,a):e[r]=void 0!==a?a:i:e[r]=_(i,a)}}return e}new Set(["id"]),new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]);var E=new Map,S=new Set;function O(){if("undefined"!==typeof window){var e=function e(t){var n=E.get(t.target);if(n&&(n.delete(t.propertyName),0===n.size&&(t.target.removeEventListener("transitioncancel",e),E.delete(t.target)),0===E.size)){var r,o=Object(a.a)(S);try{for(o.s();!(r=o.n()).done;){(0,r.value)()}}catch(i){o.e(i)}finally{o.f()}S.clear()}};document.body.addEventListener("transitionrun",(function(t){var n=E.get(t.target);n||(n=new Set,E.set(t.target,n),t.target.addEventListener("transitioncancel",e)),n.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}}"undefined"!==typeof document&&("loading"!==document.readyState?O():document.addEventListener("DOMContentLoaded",O));"undefined"!==typeof document&&window.visualViewport;new Map;function L(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((function(t){return e.test(t.brand)})))||e.test(window.navigator.userAgent))}function C(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function j(){return C(/^Mac/i)}function N(e){var t=(0,l.useRef)(null);return y((function(){t.current=e}),[e]),(0,l.useCallback)((function(){var e=t.current;return e.apply(void 0,arguments)}),[])}function I(e){return!(0!==e.mozInputSource||!e.isTrusted)||(L(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var T=n(13),A=n(25);new WeakMap;var R=s.a.createContext(null);R.displayName="PressResponderContext";new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var z=function(){function e(t,n){Object(T.a)(this,e),this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}return Object(A.a)(e,[{key:"isDefaultPrevented",value:function(){return this.nativeEvent.defaultPrevented}},{key:"preventDefault",value:function(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=function(){return!0}}},{key:"isPropagationStopped",value:function(){return!1}},{key:"persist",value:function(){}}]),e}();function B(e){var t=(0,l.useRef)({isFocused:!1,observer:null});y((function(){var e=t.current;return function(){e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);var n=N((function(t){null===e||void 0===e||e(t)}));return(0,l.useCallback)((function(e){if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;var r=e.target;r.addEventListener("focusout",(function(e){t.current.isFocused=!1,r.disabled&&n(new z("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)}),{once:!0}),t.current.observer=new MutationObserver((function(){if(t.current.isFocused&&r.disabled){t.current.observer.disconnect();var e=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}var P=new Set,D=!1,H=!1,U=!1;function F(e,t){var n,r=Object(a.a)(P);try{for(r.s();!(n=r.n()).done;){(0,n.value)(e,t)}}catch(o){r.e(o)}finally{r.f()}}function W(e){H=!0,function(e){return!(e.metaKey||!j()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&("keyboard",F("keyboard",e))}function V(e){"pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(H=!0,F("pointer",e))}function q(e){I(e)&&(H=!0,"virtual")}function K(e){e.target!==window&&e.target!==document&&(H||U||("virtual",F("virtual",e)),H=!1,U=!1)}function Y(){H=!1,U=!0}function Z(){if("undefined"!==typeof window&&!D){var e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){H=!0,e.apply(this,arguments)},document.addEventListener("keydown",W,!0),document.addEventListener("keyup",W,!0),document.addEventListener("click",q,!0),window.addEventListener("focus",K,!0),window.addEventListener("blur",Y,!1),"undefined"!==typeof PointerEvent?(document.addEventListener("pointerdown",V,!0),document.addEventListener("pointermove",V,!0),document.addEventListener("pointerup",V,!0)):(document.addEventListener("mousedown",V,!0),document.addEventListener("mousemove",V,!0),document.addEventListener("mouseup",V,!0)),D=!0}}function X(e){var t=e.isDisabled,n=e.onBlurWithin,r=e.onFocusWithin,o=e.onFocusWithinChange,i=(0,l.useRef)({isFocusWithin:!1}),a=(0,l.useCallback)((function(e){i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(e),o&&o(!1))}),[n,o,i]),s=B(a),u=(0,l.useCallback)((function(e){i.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,s(e))}),[r,o,s]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:u,onBlur:a}}}"undefined"!==typeof document&&("loading"!==document.readyState?Z():document.addEventListener("DOMContentLoaded",Z));var G={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Q(e){var t=e.children,n=e.elementType,a=void 0===n?"div":n,u=(e.isFocusable,e.style,r(e,["children","elementType","isFocusable","style"])),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.style,n=e.isFocusable,r=(0,l.useState)(!1),a=Object(i.a)(r,2),s=a[0],u=a[1],c=X({isDisabled:!n,onFocusWithinChange:function(e){return u(e)}}).focusWithinProps,d=(0,l.useMemo)((function(){return s?t:t?Object(o.a)(Object(o.a)({},G),t):G}),[s]);return{visuallyHiddenProps:Object(o.a)(Object(o.a)({},c),{},{style:d})}}(e).visuallyHiddenProps;return s.a.createElement(a,M(u,c),t)}},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,l,s=a(e),u=1;u>>32-t}function u(e,t,n,r,o,i,a){return s(e+(t&n|~t&r)+o+i|0,a)+t|0}function c(e,t,n,r,o,i,a){return s(e+(t&r|n&~r)+o+i|0,a)+t|0}function d(e,t,n,r,o,i,a){return s(e+(t^n^r)+o+i|0,a)+t|0}function f(e,t,n,r,o,i,a){return s(e+(n^(t|~r))+o+i|0,a)+t|0}r(l,o),l.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,o=this._c,i=this._d;n=u(n,r,o,i,e[0],3614090360,7),i=u(i,n,r,o,e[1],3905402710,12),o=u(o,i,n,r,e[2],606105819,17),r=u(r,o,i,n,e[3],3250441966,22),n=u(n,r,o,i,e[4],4118548399,7),i=u(i,n,r,o,e[5],1200080426,12),o=u(o,i,n,r,e[6],2821735955,17),r=u(r,o,i,n,e[7],4249261313,22),n=u(n,r,o,i,e[8],1770035416,7),i=u(i,n,r,o,e[9],2336552879,12),o=u(o,i,n,r,e[10],4294925233,17),r=u(r,o,i,n,e[11],2304563134,22),n=u(n,r,o,i,e[12],1804603682,7),i=u(i,n,r,o,e[13],4254626195,12),o=u(o,i,n,r,e[14],2792965006,17),n=c(n,r=u(r,o,i,n,e[15],1236535329,22),o,i,e[1],4129170786,5),i=c(i,n,r,o,e[6],3225465664,9),o=c(o,i,n,r,e[11],643717713,14),r=c(r,o,i,n,e[0],3921069994,20),n=c(n,r,o,i,e[5],3593408605,5),i=c(i,n,r,o,e[10],38016083,9),o=c(o,i,n,r,e[15],3634488961,14),r=c(r,o,i,n,e[4],3889429448,20),n=c(n,r,o,i,e[9],568446438,5),i=c(i,n,r,o,e[14],3275163606,9),o=c(o,i,n,r,e[3],4107603335,14),r=c(r,o,i,n,e[8],1163531501,20),n=c(n,r,o,i,e[13],2850285829,5),i=c(i,n,r,o,e[2],4243563512,9),o=c(o,i,n,r,e[7],1735328473,14),n=d(n,r=c(r,o,i,n,e[12],2368359562,20),o,i,e[5],4294588738,4),i=d(i,n,r,o,e[8],2272392833,11),o=d(o,i,n,r,e[11],1839030562,16),r=d(r,o,i,n,e[14],4259657740,23),n=d(n,r,o,i,e[1],2763975236,4),i=d(i,n,r,o,e[4],1272893353,11),o=d(o,i,n,r,e[7],4139469664,16),r=d(r,o,i,n,e[10],3200236656,23),n=d(n,r,o,i,e[13],681279174,4),i=d(i,n,r,o,e[0],3936430074,11),o=d(o,i,n,r,e[3],3572445317,16),r=d(r,o,i,n,e[6],76029189,23),n=d(n,r,o,i,e[9],3654602809,4),i=d(i,n,r,o,e[12],3873151461,11),o=d(o,i,n,r,e[15],530742520,16),n=f(n,r=d(r,o,i,n,e[2],3299628645,23),o,i,e[0],4096336452,6),i=f(i,n,r,o,e[7],1126891415,10),o=f(o,i,n,r,e[14],2878612391,15),r=f(r,o,i,n,e[5],4237533241,21),n=f(n,r,o,i,e[12],1700485571,6),i=f(i,n,r,o,e[3],2399980690,10),o=f(o,i,n,r,e[10],4293915773,15),r=f(r,o,i,n,e[1],2240044497,21),n=f(n,r,o,i,e[8],1873313359,6),i=f(i,n,r,o,e[15],4264355552,10),o=f(o,i,n,r,e[6],2734768916,15),r=f(r,o,i,n,e[13],1309151649,21),n=f(n,r,o,i,e[4],4149444226,6),i=f(i,n,r,o,e[11],3174756917,10),o=f(o,i,n,r,e[2],718787259,15),r=f(r,o,i,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+o|0,this._d=this._d+i|0},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=l},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(51).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,i){if("function"===typeof n)return e(t,null,n);n||(n={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o>>32-t}function b(e,t,n,r,o,i,a,l){return p(e+(t^n^r)+i+a|0,l)+o|0}function m(e,t,n,r,o,i,a,l){return p(e+(t&n|~t&r)+i+a|0,l)+o|0}function v(e,t,n,r,o,i,a,l){return p(e+((t|~n)^r)+i+a|0,l)+o|0}function g(e,t,n,r,o,i,a,l){return p(e+(t&r|n&~r)+i+a|0,l)+o|0}function _(e,t,n,r,o,i,a,l){return p(e+(t^(n|~r))+i+a|0,l)+o|0}o(h,i),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,o=0|this._c,i=0|this._d,h=0|this._e,y=0|this._a,w=0|this._b,k=0|this._c,x=0|this._d,M=0|this._e,E=0;E<80;E+=1){var S,O;E<16?(S=b(n,r,o,i,h,e[l[E]],d[0],u[E]),O=_(y,w,k,x,M,e[s[E]],f[0],c[E])):E<32?(S=m(n,r,o,i,h,e[l[E]],d[1],u[E]),O=g(y,w,k,x,M,e[s[E]],f[1],c[E])):E<48?(S=v(n,r,o,i,h,e[l[E]],d[2],u[E]),O=v(y,w,k,x,M,e[s[E]],f[2],c[E])):E<64?(S=g(n,r,o,i,h,e[l[E]],d[3],u[E]),O=m(y,w,k,x,M,e[s[E]],f[3],c[E])):(S=_(n,r,o,i,h,e[l[E]],d[4],u[E]),O=b(y,w,k,x,M,e[s[E]],f[4],c[E])),n=h,h=i,i=p(o,10),o=r,r=S,y=M,M=x,x=p(k,10),k=w,w=O}var L=this._b+o+x|0;this._b=this._c+i+M|0,this._c=this._d+h+y|0,this._d=this._e+n+w|0,this._e=this._a+r+k|0,this._a=L},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(213),t.sha1=n(214),t.sha224=n(215),t.sha256=n(131),t.sha384=n(216),t.sha512=n(132)},function(e,t,n){(t=e.exports=n(133)).Stream=t,t.Readable=t,t.Writable=n(99),t.Duplex=n(48),t.Transform=n(136),t.PassThrough=n(223)},function(e,t,n){var r=n(23),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,o){var i=n(75);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var l,s=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;g.WritableState=v;var u=Object.create(n(63));u.inherits=n(7);var c={deprecate:n(93)},d=n(134),f=n(98).Buffer,h=o.Uint8Array||function(){};var p,b=n(135);function m(){}function v(e,t){l=l||n(48),e=e||{};var r=t instanceof l;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(M,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),M(e,t))}(e,n,r,t,o);else{var a=k(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?s(y,e,n,a,o):y(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function g(e){if(l=l||n(48),!p.call(g,this)&&!(this instanceof l))return new g(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),d.call(this)}function _(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function y(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),M(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var l=0,s=!0;n;)o[l]=n,n.isBuf||(s=!1),n=n.next,l+=1;o.allBuffers=s,_(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,d=n.callback;if(_(e,t,!1,t.objectMode?1:u.length,u,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),M(e,t)}))}function M(e,t){var n=k(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"===typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(x,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(g,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,l=!o.objectMode&&(r=e,f.isBuffer(r)||r instanceof h);return l&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"===typeof t&&(n=t,t=null),l?t="buffer":t||(t=o.defaultEncoding),"function"!==typeof n&&(n=m),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(l||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=f.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var l=t.objectMode?1:r.length;t.length+=l;var s=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,n){var r=this._writableState;"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=b.destroy,g.prototype._undestroy=b.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(19),n(221).setImmediate,n(20))},function(e,t,n){"use strict";var r=n(34);function o(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=o,o.prototype._init=function(){},o.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},o.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(o,n);return t+=this._buffer(e,t),o},o.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,n){var o=function(e){var t=i(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),a=n.modulus.byteLength(),l=new r(e).mul(o.blinder).umod(n.modulus),s=l.toRed(r.mont(n.prime1)),u=l.toRed(r.mont(n.prime2)),c=n.coefficient,d=n.prime1,f=n.prime2,h=s.redPow(n.exponent1).fromRed(),p=u.redPow(n.exponent2).fromRed(),b=h.isub(p).imul(c).umod(d).imul(f);return p.iadd(b).imul(o.unblinder).umod(n.modulus).toArrayLike(t,"be",a)}a.getr=i,e.exports=a}).call(this,n(23).Buffer)},function(e,t,n){"use strict";var r=t;r.version=n(263).version,r.utils=n(35),r.rand=n(103),r.curve=n(161),r.curves=n(107),r.ec=n(274),r.eddsa=n(278)},function(e,t,n){"use strict";var r,o=t,i=n(108),a=n(161),l=n(35).assert;function s(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new s(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}o.PresetCurve=s,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(273)}catch(c){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,n){var r=t;r.utils=n(39),r.common=n(65),r.sha=n(267),r.ripemd=n(271),r.hmac=n(272),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";(function(t){var r,o=n(23),i=o.Buffer,a={};for(r in o)o.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=o[r]);var l=a.Buffer={};for(r in i)i.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(l[r]=i[r]);if(a.Buffer.prototype=i.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(e,t,n){if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&"undefined"===typeof e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return i(e,t,n)}),l.alloc||(l.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=i(e);return t&&0!==t.length?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(s){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a}).call(this,n(19))},function(e,t,n){"use strict";var r=n(111).Reporter,o=n(66).EncoderBuffer,i=n(66).DecoderBuffer,a=n(34),l=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l);function u(e,t,n){var r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=u;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var e=this._baseState,t={};c.forEach((function(n){t[n]=e[n]}));var n=new this.constructor(t.parent);return n._baseState=t,n},u.prototype._wrap=function(){var e=this._baseState;s.forEach((function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},u.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){var t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(a(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){u.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),l.forEach((function(e){u.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(n),this}})),u.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},u.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r,o=n.default,a=!0,l=null;if(null!==n.key&&(l=e.enterKey(n.key)),n.optional){var s=null;if(null!==n.explicit?s=n.explicit:null!==n.implicit?s=n.implicit:null!==n.tag&&(s=n.tag),null!==s||n.any){if(a=this._peekTag(e,s,n.any),e.isError(a))return a}else{var u=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(b){a=!1}e.restore(u)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){var c=this._decodeTag(e,n.explicit);if(e.isError(c))return c;e=c}var d=e.offset;if(null===n.use&&null===n.choice){var f;n.any&&(f=e.save());var h=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(h))return h;n.any?o=e.raw(f):e=h}if(t&&t.track&&null!==n.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var p=new i(o);o=this._getUse(n.contains,e._reporterState.obj)._decode(p,t)}}return n.obj&&a&&(o=e.leaveObject(r)),null===n.key||null===o&&!0!==a?null!==l&&e.exitKey(l):e.leaveKey(l,n.key,o),o},u.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},u.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,o=!1;return Object.keys(n.choice).some((function(i){var a=e.save(),l=n.choice[i];try{var s=l._decode(e,t);if(e.isError(s))return!1;r={type:i,value:s},o=!0}catch(u){return e.restore(a),!1}return!0}),this),o?r:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},u.prototype._encode=function(e,t,n){var r=this._baseState;if(null===r.default||r.default!==e){var o=this._encodeValue(e,t,n);if(void 0!==o&&!this._skipDefault(o,t,n))return o}},u.prototype._encodeValue=function(e,t,n){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new r);var i=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var a=null,l=!1;if(o.any)i=this._createEncoderBuffer(e);else if(o.choice)i=this._encodeChoice(e,t);else if(o.contains)a=this._getUse(o.contains,n)._encode(e,t),l=!0;else if(o.children)a=o.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var r=t.enterKey(n._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var o=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),o}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),s))}else null!==o.use?i=this._getUse(o.use,n)._encode(e,t):(a=this._encodePrimitive(o.tag,e),l=!0);if(!o.any&&null===o.choice){var u=null!==o.implicit?o.implicit:o.tag,c=null===o.implicit?"universal":"context";null===u?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(i=this._encodeComposite(u,l,c,a))}return null!==o.explicit&&(i=this._encodeComposite(o.explicit,!1,"context",i)),i},u.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,n){"use strict";var r=n(7);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}t.Reporter=o,o.prototype.isError=function(e){return e instanceof i},o.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){var t,n=this._reporterState,r=e instanceof i;if(t=r?e:new i(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},o.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(e,t,n){"use strict";function r(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",s="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",b="[object RegExp]",m="[object Set]",v="[object String]",g="[object Symbol]",_="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",k=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[i]=M[a]=M[y]=M[l]=M[w]=M[s]=M[u]=M[c]=M[d]=M[f]=M[h]=M[b]=M[m]=M[v]=M[_]=!1;var E="object"==typeof e&&e&&e.Object===Object&&e,S="object"==typeof self&&self&&self.Object===Object&&self,O=E||S||Function("return this")(),L=t&&!t.nodeType&&t,C=L&&"object"==typeof n&&n&&!n.nodeType&&n,j=C&&C.exports===L,N=j&&E.process,I=function(){try{return N&&N.binding&&N.binding("util")}catch(e){}}(),T=I&&I.isTypedArray;function A(e,t){for(var n=-1,r=null==e?0:e.length;++nl))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var c=-1,d=!0,f=2&n?new _e:void 0;for(i.set(e,t),i.set(t,e);++c-1},ve.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ge.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(oe||ve),string:new me}},ge.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},ge.prototype.get=function(e){return je(this,e).get(e)},ge.prototype.has=function(e){return je(this,e).has(e)},ge.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},_e.prototype.add=_e.prototype.push=function(e){return this.__data__.set(e,r),this},_e.prototype.has=function(e){return this.__data__.has(e)},ye.prototype.clear=function(){this.__data__=new ve,this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ye.prototype.get=function(e){return this.__data__.get(e)},ye.prototype.has=function(e){return this.__data__.has(e)},ye.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ge(r)}return n.set(e,t),this.size=n.size,this};var Ie=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function We(e){return null!=e&&"object"==typeof e}var Ve=T?function(e){return function(t){return e(t)}}(T):function(e){return We(e)&&Ue(e.length)&&!!M[xe(e)]};function qe(e){return null!=(t=e)&&Ue(t.length)&&!He(t)?we(e):Oe(e);var t}n.exports=function(e,t){return Ee(e,t)}}).call(this,n(20),n(74)(e))},function(e,t){function n(e,t,n){var r,o,i,a,l;function s(){var u=Date.now()-a;u=0?r=setTimeout(s,t-u):(r=null,n||(l=e.apply(i,o),i=o=null))}null==t&&(t=100);var u=function(){i=this,o=arguments,a=Date.now();var u=n&&!r;return r||(r=setTimeout(s,t)),u&&(l=e.apply(i,o),i=o=null),l};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(l=e.apply(i,o),i=o=null,clearTimeout(r),r=null)},u}n.debounce=n,e.exports=n},function(e,t,n){var r=n(201);e.exports=h,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],f=n[1],h=n.index;if(l+=e.slice(a,h),a=h+d.length,f)l+=f[1];else{var p=e[a],b=n[2],m=n[3],v=n[4],g=n[5],_=n[6],y=n[7];l&&(r.push(l),l="");var w=null!=b&&null!=p&&p!==b,k="+"===_||"*"===_,x="?"===_||"*"===_,M=n[2]||c,E=v||g;r.push({name:m||i++,prefix:b||"",delimiter:M,optional:x,repeat:k,partial:w,asterisk:!!y,pattern:E?u(E):y?".*":"[^"+s(M)+"]+?"})}}return a=0||(o[n]=e[n]);return o}var h=["style","children","scrollTop","scrollLeft"],p=/^--/;function b(e,t){return null==t||"boolean"===typeof t||""===t?"":"number"!==typeof t||0===t||p.test(e)||v.hasOwnProperty(e)&&v[e]?(""+t).trim():t+"px"}var m={};var v={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},g=["Webkit","Ms","Moz","O"];v=Object.keys(v).reduce((function(e,t){return g.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),v);var _=["x","y","z"],y=/^(matrix|translate|scale|rotate|skew)/,w=/^(translate)/,k=/^(rotate|skew)/,x=function(e,t){return c.s.num(e)&&0!==e?e+t:e},M=function e(t,n){return c.s.arr(t)?t.every((function(t){return e(t,n)})):c.s.num(t)?t===n:parseFloat(t)===n},E=function(e){Object(a.a)(n,e);var t=Object(l.a)(n);function n(e){Object(i.a)(this,n);var r=e.x,a=e.y,l=e.z,s=f(e,_),u=[],d=[];return(r||a||l)&&(u.push([r||0,a||0,l||0]),d.push((function(e){return["translate3d(".concat(e.map((function(e){return x(e,"px")})).join(","),")"),M(e,0)]}))),Object(c.l)(s,(function(e,t){if("transform"===t)u.push([e||""]),d.push((function(e){return[e,""===e]}));else if(y.test(t)){if(delete s[t],c.s.und(e))return;var n=w.test(t)?"px":k.test(t)?"deg":"";u.push(Object(c.y)(e)),d.push("rotate3d"===t?function(e){var t=Object(o.a)(e,4),r=t[0],i=t[1],a=t[2],l=t[3];return["rotate3d(".concat(r,",").concat(i,",").concat(a,",").concat(x(l,n),")"),M(l,0)]}:function(e){return["".concat(t,"(").concat(e.map((function(e){return x(e,n)})).join(","),")"),M(e,t.startsWith("scale")?1:0)]})}})),u.length&&(s.transform=new S(u,d)),t.call(this,s)}return n}(d.a),S=function(e){Object(a.a)(n,e);var t=Object(l.a)(n);function n(e,r){var o;return Object(i.a)(this,n),(o=t.call(this))._value=null,o.inputs=e,o.transforms=r,o}return Object(r.a)(n,[{key:"get",value:function(){return this._value||(this._value=this._get())}},{key:"_get",value:function(){var e=this,t="",n=!0;return Object(c.k)(this.inputs,(function(r,i){var a=Object(c.q)(r[0]),l=e.transforms[i](c.s.arr(a)?a:r.map(c.q)),s=Object(o.a)(l,2),u=s[0],d=s[1];t+=" "+u,n=n&&d})),n?"none":t}},{key:"observerAdded",value:function(e){var t=this;1==e&&Object(c.k)(this.inputs,(function(e){return Object(c.k)(e,(function(e){return Object(c.r)(e)&&Object(c.c)(e,t)}))}))}},{key:"observerRemoved",value:function(e){var t=this;0==e&&Object(c.k)(this.inputs,(function(e){return Object(c.k)(e,(function(e){return Object(c.r)(e)&&Object(c.x)(e,t)}))}))}},{key:"eventObserved",value:function(e){"change"==e.type&&(this._value=null),Object(c.d)(this,e)}}]),n}(c.a),O=["scrollTop","scrollLeft"];s.Globals.assign({batchedUpdates:u.unstable_batchedUpdates,createStringInterpolator:c.g,colors:c.e});var L=Object(d.d)(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;var n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t,o=r.style,i=r.children,a=r.scrollTop,l=r.scrollLeft,s=f(r,h),u=Object.values(s),c=Object.keys(s).map((function(t){return n||e.hasAttribute(t)?t:m[t]||(m[t]=t.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})))}));for(var d in void 0!==i&&(e.textContent=i),o)if(o.hasOwnProperty(d)){var v=b(d,o[d]);p.test(d)?e.style.setProperty(d,v):e.style[d]=v}c.forEach((function(t,n){e.setAttribute(t,u[n])})),void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l)},createAnimatedStyle:function(e){return new E(e)},getComponentProps:function(e){return f(e,O)}}).animated},function(e,t){},function(e,t){},function(e,t,n){"use strict";e.exports=n(202)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(10).Buffer,o=n(205).Transform;function i(e){o.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(7)(i,o),i.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(o){r=o}n(r)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(n){t=n}e(t)},i.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var i=this._blockOffset;i0;++a)this._length[a]+=l,(l=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*l);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i},function(e,t,n){"use strict";(function(t,r){var o;e.exports=E,E.ReadableState=M;n(46).EventEmitter;var i=function(e,t){return e.listeners(t).length},a=n(126),l=n(23).Buffer,s=t.Uint8Array||function(){};var u,c=n(206);u=c&&c.debuglog?c.debuglog("stream"):function(){};var d,f,h,p=n(207),b=n(127),m=n(128).getHighWaterMark,v=n(51).codes,g=v.ERR_INVALID_ARG_TYPE,_=v.ERR_STREAM_PUSH_AFTER_EOF,y=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(7)(E,a);var k=b.errorOrDestroy,x=["error","close","destroy","pause","resume"];function M(e,t,r){o=o||n(52),e=e||{},"boolean"!==typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(47).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function E(e){if(o=o||n(52),!(this instanceof E))return new E(e);var t=this instanceof o;this._readableState=new M(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function S(e,t,n,r,o){u("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}(e,a);else if(o||(i=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof s||"string"===typeof t||void 0===t||e.objectMode||(n=new g("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),i)k(e,i);else if(a.objectMode||t&&t.length>0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)a.endEmitted?k(e,new w):O(e,a,t,!0);else if(a.ended)k(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):I(e,a)):O(e,a,t,!1)}else r||(a.reading=!1,I(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(N,e))}function N(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function I(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(T,e,t))}function T(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){u("readable nexttick read 0"),e.read(0)}function z(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(H,t,e))}function H(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):j(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&D(this),null;var r,o=t.needReadable;return u("need readable",o),(0===t.length||t.length-e0?P(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){k(this,new y("_read()"))},E.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,u("pipe count=%d opts=%j",o.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?s:m;function l(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",l),n.removeListener("end",s),n.removeListener("end",m),n.removeListener("data",f),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function s(){u("onend"),e.end()}o.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",l);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,B(e))}}(n);e.on("drain",c);var d=!1;function f(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==U(o.pipes,e))&&!d&&(u("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function h(t){u("onerror",t),m(),e.removeListener("error",h),0===i(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),m()}function b(){u("onfinish"),e.removeListener("close",p),m()}function m(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),o.flowing||(u("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,u("on readable",o.length,o.reading),o.length?j(this):o.reading||r.nextTick(R,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(A,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(z,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(u("wrapped data"),n.decoder&&(o=n.decoder.write(o)),!n.objectMode||null!==o&&void 0!==o)&&((n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause())))})),e)void 0===this[o]&&"function"===typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var o=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,n(20),n(19))},function(e,t,n){"use strict";e.exports=c;var r=n(51).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=r.ERR_TRANSFORM_WITH_LENGTH_0,s=n(52);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(s,o),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,o=0|this._b,i=0|this._c,l=0|this._d,s=0|this._e,p=0|this._f,b=0|this._g,m=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+h(n[v-15])+n[v-16];for(var g=0;g<64;++g){var _=m+f(s)+u(s,p,b)+a[g]+n[g]|0,y=d(r)+c(r,o,i)|0;m=b,b=p,p=s,s=l+_|0,l=i,i=o,o=r,r=_+y|0}this._a=r+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=l+this._d|0,this._e=s+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0},s.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=s},function(e,t,n){var r=n(7),o=n(53),i=n(10).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function s(){this.init(),this._w=l,o.call(this,128,112)}function u(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}r(s,o),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,o=0|this._ch,i=0|this._dh,l=0|this._eh,s=0|this._fh,g=0|this._gh,_=0|this._hh,y=0|this._al,w=0|this._bl,k=0|this._cl,x=0|this._dl,M=0|this._el,E=0|this._fl,S=0|this._gl,O=0|this._hl,L=0;L<32;L+=2)t[L]=e.readInt32BE(4*L),t[L+1]=e.readInt32BE(4*L+4);for(;L<160;L+=2){var C=t[L-30],j=t[L-30+1],N=h(C,j),I=p(j,C),T=b(C=t[L-4],j=t[L-4+1]),A=m(j,C),R=t[L-14],z=t[L-14+1],B=t[L-32],P=t[L-32+1],D=I+z|0,H=N+R+v(D,I)|0;H=(H=H+T+v(D=D+A|0,A)|0)+B+v(D=D+P|0,P)|0,t[L]=H,t[L+1]=D}for(var U=0;U<160;U+=2){H=t[U],D=t[U+1];var F=c(n,r,o),W=c(y,w,k),V=d(n,y),q=d(y,n),K=f(l,M),Y=f(M,l),Z=a[U],X=a[U+1],G=u(l,s,g),Q=u(M,E,S),J=O+Y|0,$=_+K+v(J,O)|0;$=($=($=$+G+v(J=J+Q|0,Q)|0)+Z+v(J=J+X|0,X)|0)+H+v(J=J+D|0,D)|0;var ee=q+W|0,te=V+F+v(ee,q)|0;_=g,O=S,g=s,S=E,s=l,E=M,l=i+$+v(M=x+J|0,x)|0,i=o,x=k,o=r,k=w,r=n,w=y,n=$+te+v(y=J+ee|0,J)|0}this._al=this._al+y|0,this._bl=this._bl+w|0,this._cl=this._cl+k|0,this._dl=this._dl+x|0,this._el=this._el+M|0,this._fl=this._fl+E|0,this._gl=this._gl+S|0,this._hl=this._hl+O|0,this._ah=this._ah+n+v(this._al,y)|0,this._bh=this._bh+r+v(this._bl,w)|0,this._ch=this._ch+o+v(this._cl,k)|0,this._dh=this._dh+i+v(this._dl,x)|0,this._eh=this._eh+l+v(this._el,M)|0,this._fh=this._fh+s+v(this._fl,E)|0,this._gh=this._gh+g+v(this._gl,S)|0,this._hh=this._hh+_+v(this._hl,O)|0},s.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=s},function(e,t,n){"use strict";(function(t,r){var o=n(75);e.exports=_;var i,a=n(123);_.ReadableState=g;n(46).EventEmitter;var l=function(e,t){return e.listeners(t).length},s=n(134),u=n(98).Buffer,c=t.Uint8Array||function(){};var d=Object.create(n(63));d.inherits=n(7);var f=n(218),h=void 0;h=f&&f.debuglog?f.debuglog("stream"):function(){};var p,b=n(219),m=n(135);d.inherits(_,s);var v=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var r=t instanceof(i=i||n(48));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=e.readableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(a||0===a)?a:l,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(47).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function _(e){if(i=i||n(48),!(this instanceof _))return new _(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function y(e,t,n,r,o){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,M(e)}(e,a)):(o||(i=function(e,t){var n;r=t,u.isBuffer(r)||r instanceof c||"string"===typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):S(e,a)):w(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),j(e)}function S(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(O,e,t))}function O(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(T,t,e))}function T(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,o=t.needReadable;return h("need readable",o),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:_;function u(t,r){h("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),e.removeListener("close",v),e.removeListener("finish",g),e.removeListener("drain",d),e.removeListener("error",m),e.removeListener("unpipe",u),n.removeListener("end",c),n.removeListener("end",_),n.removeListener("data",b),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function c(){h("onend"),e.end()}i.endEmitted?o.nextTick(s):n.once("end",s),e.on("unpipe",u);var d=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&l(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",d);var f=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==A(i.pipes,e))&&!f&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){h("onerror",t),_(),e.removeListener("error",m),0===l(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",g),_()}function g(){h("onfinish"),e.removeListener("close",v),_()}function _(){h("unpipe"),n.unpipe(e)}return n.on("data",b),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",v),e.once("finish",g),e.emit("pipe",n),i.flowing||(h("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;in)?t=("rmd160"===e?new s:u(e)).update(t).digest():t.lengthn||t!==t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t){var n;if(t.browser)n="utf-8";else if(t.version){n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n}).call(this,n(19))},function(e,t,n){var r=n(138),o=n(95),i=n(96),a=n(10).Buffer,l=n(141),s=n(142),u=n(144),c=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,n){var l=function(e){function t(t){return i(e).update(t).digest()}function n(e){return(new o).update(e).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?r:t}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=l(t):t.length>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var o=0,i=0,a=6;a>=0;a-=2){for(var l=0;l<=24;l+=8)o<<=1,o|=t>>>l+a&1;for(l=0;l<=24;l+=8)o<<=1,o|=e>>>l+a&1}for(a=6;a>=0;a-=2){for(l=1;l<=25;l+=8)i<<=1,i|=t>>>l+a&1;for(l=1;l<=25;l+=8)i<<=1,i|=e>>>l+a&1}n[r+0]=o>>>0,n[r+1]=i>>>0},t.rip=function(e,t,n,r){for(var o=0,i=0,a=0;a<4;a++)for(var l=24;l>=0;l-=8)o<<=1,o|=t>>>l+a&1,o<<=1,o|=e>>>l+a&1;for(a=4;a<8;a++)for(l=24;l>=0;l-=8)i<<=1,i|=t>>>l+a&1,i<<=1,i|=e>>>l+a&1;n[r+0]=o>>>0,n[r+1]=i>>>0},t.pc1=function(e,t,n,r){for(var o=0,i=0,a=7;a>=5;a--){for(var l=0;l<=24;l+=8)o<<=1,o|=t>>l+a&1;for(l=0;l<=24;l+=8)o<<=1,o|=e>>l+a&1}for(l=0;l<=24;l+=8)o<<=1,o|=t>>l+a&1;for(a=1;a<=3;a++){for(l=0;l<=24;l+=8)i<<=1,i|=t>>l+a&1;for(l=0;l<=24;l+=8)i<<=1,i|=e>>l+a&1}for(l=0;l<=24;l+=8)i<<=1,i|=e>>l+a&1;n[r+0]=o>>>0,n[r+1]=i>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,o){for(var i=0,a=0,l=r.length>>>1,s=0;s>>r[s]&1;for(s=l;s>>r[s]&1;n[o+0]=i>>>0,n[o+1]=a>>>0},t.expand=function(e,t,n){var r=0,o=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(i=11;i>=3;i-=4)o|=e>>>i&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=o>>>0};var o=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=o[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=o[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n>>i[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length>>1];n=i.r28shl(n,l),o=i.r28shl(o,l),i.pc2(n,o,e.keys,a)}},s.prototype._update=function(e,t,n,r){var o=this._desState,a=i.readUInt32BE(e,t),l=i.readUInt32BE(e,t+4);i.ip(a,l,o.tmp,0),a=o.tmp[0],l=o.tmp[1],"encrypt"===this.type?this._encrypt(o,a,l,o.tmp,0):this._decrypt(o,a,l,o.tmp,0),a=o.tmp[0],l=o.tmp[1],i.writeUInt32BE(n,a,r),i.writeUInt32BE(n,l,r+4)},s.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r>>0,a=f}i.rip(l,a,r,o)},s.prototype._decrypt=function(e,t,n,r,o){for(var a=n,l=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],c=e.keys[s+1];i.expand(a,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var d=i.substitute(u,c),f=a;a=(l^i.permute(d))>>>0,l=f}i.rip(a,l,r,o)}},function(e,t,n){var r=n(64),o=n(10).Buffer,i=n(148);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return i(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),i=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*n)]);for(var l=0;le;)n.ishrn(1);if(n.isEven()&&n.iadd(l),n.testn(1)||n.iadd(s),t.cmp(s)){if(!t.cmp(u))for(;n.mod(c).cmp(d);)n.iadd(h)}else for(;n.mod(i).cmp(f);)n.iadd(h);if(m(p=n.shrn(1))&&m(n)&&v(p)&&v(n)&&a.test(p)&&a.test(n))return n}}},function(e,t,n){var r=n(21),o=n(103);function i(e){this.rand=e||new o.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var o=new r(this.rand.generate(n))}while(o.cmp(e)>=0);return o},i.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},i.prototype.test=function(e,t,n){var o=e.bitLength(),i=r.mont(e),a=new r(1).toRed(i);t||(t=Math.max(1,o/48|0));for(var l=e.subn(1),s=0;!l.testn(s);s++);for(var u=e.shrn(s),c=l.toRed(i);t>0;t--){var d=this._randrange(new r(2),l);n&&n(d);var f=d.toRed(i).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(c)){for(var h=1;h0;t--){var c=this._randrange(new r(2),a),d=e.gcd(c);if(0!==d.cmpn(1))return d;var f=c.toRed(o).redPow(s);if(0!==f.cmp(i)&&0!==f.cmp(u)){for(var h=1;h0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)a.endEmitted?k(e,new w):O(e,a,t,!0);else if(a.ended)k(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):I(e,a)):O(e,a,t,!1)}else r||(a.reading=!1,I(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(N,e))}function N(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function I(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(T,e,t))}function T(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){u("readable nexttick read 0"),e.read(0)}function z(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(H,t,e))}function H(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):j(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&D(this),null;var r,o=t.needReadable;return u("need readable",o),(0===t.length||t.length-e0?P(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){k(this,new y("_read()"))},E.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,u("pipe count=%d opts=%j",o.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?s:m;function l(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",l),n.removeListener("end",s),n.removeListener("end",m),n.removeListener("data",f),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function s(){u("onend"),e.end()}o.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",l);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,B(e))}}(n);e.on("drain",c);var d=!1;function f(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==U(o.pipes,e))&&!d&&(u("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function h(t){u("onerror",t),m(),e.removeListener("error",h),0===i(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),m()}function b(){u("onfinish"),e.removeListener("close",p),m()}function m(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),o.flowing||(u("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,u("on readable",o.length,o.reading),o.length?j(this):o.reading||r.nextTick(R,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(A,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(z,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(u("wrapped data"),n.decoder&&(o=n.decoder.write(o)),!n.objectMode||null!==o&&void 0!==o)&&((n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause())))})),e)void 0===this[o]&&"function"===typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var o=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,n(20),n(19))},function(e,t,n){"use strict";e.exports=c;var r=n(54).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=r.ERR_TRANSFORM_WITH_LENGTH_0,s=n(55);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length>8,a=255&o;i?n.push(i,a):n.push(a)}return n},r.zero2=o,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(78),r.short=n(264),r.mont=n(265),r.edwards=n(266)},function(e,t,n){"use strict";var r=n(39).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?a(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(39),o=n(65),i=n(162),a=n(34),l=r.sum32,s=r.sum32_4,u=r.sum32_5,c=i.ch32,d=i.maj32,f=i.s0_256,h=i.s1_256,p=i.g0_256,b=i.g1_256,m=o.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r=49&&u<=54?u-49+10:u>=17&&u<=22?u-17+10:u,a|=s}return r(!(240&a),"Invalid character in "+e),o}function s(e,t,n,o){for(var i=0,a=0,l=Math.min(e.length,n),s=t;s=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===t?this._parseHex(e,o):this._parseBase(e,t,o),"-"===e[0]&&(this.negative=1),this._strip(),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<>>26-l&67108863,(l+=24)>=26&&(l-=26,i++);else if("le"===n)for(o=0,i=0;o>>26-l&67108863,(l+=24)>=26&&(l-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)o=l(e,n,n+6),this.words[r]|=o<>>26-i&4194303,(i+=24)>=26&&(i-=26,r++);n+6!==t&&(o=l(e,t,n+6),this.words[r]|=o<>>26-i&4194303),this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,l=Math.min(i,i-a)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(O){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,a=0;a>>24-o&16777215)||a!==this.length-1?d[6-s.length]+s+n:s+n,(o+=2)>=26&&(o-=26,a--)}for(0!==i&&(n=i.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=h[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(e);n=(p=p.idivn(c)).isZero()?b+n:d[u-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,l=67108863&a,s=a/67108864|0;n.words[0]=l;for(var u=1;u>>26,d=67108863&s,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;c+=(a=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,s=0|c}return 0!==s?n.words[u]=0|s:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,o),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,o=0,i=0;o>8&255),n>16&255),6===i?(n>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===i?(n>=0&&(e[n--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i>>26;for(;0!==o&&i>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==i&&a>26,this.words[a]=67108863&t;if(0===i&&a>>13,h=0|a[1],p=8191&h,b=h>>>13,m=0|a[2],v=8191&m,g=m>>>13,_=0|a[3],y=8191&_,w=_>>>13,k=0|a[4],x=8191&k,M=k>>>13,E=0|a[5],S=8191&E,O=E>>>13,L=0|a[6],C=8191&L,j=L>>>13,N=0|a[7],I=8191&N,T=N>>>13,A=0|a[8],R=8191&A,z=A>>>13,B=0|a[9],P=8191&B,D=B>>>13,H=0|l[0],U=8191&H,F=H>>>13,W=0|l[1],V=8191&W,q=W>>>13,K=0|l[2],Y=8191&K,Z=K>>>13,X=0|l[3],G=8191&X,Q=X>>>13,J=0|l[4],$=8191&J,ee=J>>>13,te=0|l[5],ne=8191&te,re=te>>>13,oe=0|l[6],ie=8191&oe,ae=oe>>>13,le=0|l[7],se=8191&le,ue=le>>>13,ce=0|l[8],de=8191&ce,fe=ce>>>13,he=0|l[9],pe=8191&he,be=he>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(u+(r=Math.imul(d,U))|0)+((8191&(o=(o=Math.imul(d,F))+Math.imul(f,U)|0))<<13)|0;u=((i=Math.imul(f,F))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,U),o=(o=Math.imul(p,F))+Math.imul(b,U)|0,i=Math.imul(b,F);var ve=(u+(r=r+Math.imul(d,V)|0)|0)+((8191&(o=(o=o+Math.imul(d,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((i=i+Math.imul(f,q)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),o=(o=Math.imul(v,F))+Math.imul(g,U)|0,i=Math.imul(g,F),r=r+Math.imul(p,V)|0,o=(o=o+Math.imul(p,q)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,q)|0;var ge=(u+(r=r+Math.imul(d,Y)|0)|0)+((8191&(o=(o=o+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((i=i+Math.imul(f,Z)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,U),o=(o=Math.imul(y,F))+Math.imul(w,U)|0,i=Math.imul(w,F),r=r+Math.imul(v,V)|0,o=(o=o+Math.imul(v,q)|0)+Math.imul(g,V)|0,i=i+Math.imul(g,q)|0,r=r+Math.imul(p,Y)|0,o=(o=o+Math.imul(p,Z)|0)+Math.imul(b,Y)|0,i=i+Math.imul(b,Z)|0;var _e=(u+(r=r+Math.imul(d,G)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(f,G)|0))<<13)|0;u=((i=i+Math.imul(f,Q)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(x,U),o=(o=Math.imul(x,F))+Math.imul(M,U)|0,i=Math.imul(M,F),r=r+Math.imul(y,V)|0,o=(o=o+Math.imul(y,q)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(v,Y)|0,o=(o=o+Math.imul(v,Z)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Z)|0,r=r+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,Q)|0;var ye=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(S,U),o=(o=Math.imul(S,F))+Math.imul(O,U)|0,i=Math.imul(O,F),r=r+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(M,V)|0,i=i+Math.imul(M,q)|0,r=r+Math.imul(y,Y)|0,o=(o=o+Math.imul(y,Z)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Z)|0,r=r+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(g,G)|0,i=i+Math.imul(g,Q)|0,r=r+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;u=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,U),o=(o=Math.imul(C,F))+Math.imul(j,U)|0,i=Math.imul(j,F),r=r+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,q)|0,r=r+Math.imul(x,Y)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(M,Y)|0,i=i+Math.imul(M,Z)|0,r=r+Math.imul(y,G)|0,o=(o=o+Math.imul(y,Q)|0)+Math.imul(w,G)|0,i=i+Math.imul(w,Q)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0;var ke=(u+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;u=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(I,U),o=(o=Math.imul(I,F))+Math.imul(T,U)|0,i=Math.imul(T,F),r=r+Math.imul(C,V)|0,o=(o=o+Math.imul(C,q)|0)+Math.imul(j,V)|0,i=i+Math.imul(j,q)|0,r=r+Math.imul(S,Y)|0,o=(o=o+Math.imul(S,Z)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Z)|0,r=r+Math.imul(x,G)|0,o=(o=o+Math.imul(x,Q)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,Q)|0,r=r+Math.imul(y,$)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(g,ne)|0,i=i+Math.imul(g,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,ae)|0;var xe=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(o=(o=o+Math.imul(d,ue)|0)+Math.imul(f,se)|0))<<13)|0;u=((i=i+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,U),o=(o=Math.imul(R,F))+Math.imul(z,U)|0,i=Math.imul(z,F),r=r+Math.imul(I,V)|0,o=(o=o+Math.imul(I,q)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,q)|0,r=r+Math.imul(C,Y)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(j,Y)|0,i=i+Math.imul(j,Z)|0,r=r+Math.imul(S,G)|0,o=(o=o+Math.imul(S,Q)|0)+Math.imul(O,G)|0,i=i+Math.imul(O,Q)|0,r=r+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,r=r+Math.imul(y,ne)|0,o=(o=o+Math.imul(y,re)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,ae)|0,r=r+Math.imul(p,se)|0,o=(o=o+Math.imul(p,ue)|0)+Math.imul(b,se)|0,i=i+Math.imul(b,ue)|0;var Me=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(P,U),o=(o=Math.imul(P,F))+Math.imul(D,U)|0,i=Math.imul(D,F),r=r+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(z,V)|0,i=i+Math.imul(z,q)|0,r=r+Math.imul(I,Y)|0,o=(o=o+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,i=i+Math.imul(T,Z)|0,r=r+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(j,G)|0,i=i+Math.imul(j,Q)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,r=r+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,re)|0)+Math.imul(M,ne)|0,i=i+Math.imul(M,re)|0,r=r+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(v,se)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,ue)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,fe)|0;var Ee=(u+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(f,pe)|0))<<13)|0;u=((i=i+Math.imul(f,be)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,V),o=(o=Math.imul(P,q))+Math.imul(D,V)|0,i=Math.imul(D,q),r=r+Math.imul(R,Y)|0,o=(o=o+Math.imul(R,Z)|0)+Math.imul(z,Y)|0,i=i+Math.imul(z,Z)|0,r=r+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(T,G)|0,i=i+Math.imul(T,Q)|0,r=r+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(j,$)|0,i=i+Math.imul(j,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(O,ne)|0,i=i+Math.imul(O,re)|0,r=r+Math.imul(x,ie)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,ae)|0,r=r+Math.imul(y,se)|0,o=(o=o+Math.imul(y,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(g,de)|0,i=i+Math.imul(g,fe)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(P,Y),o=(o=Math.imul(P,Z))+Math.imul(D,Y)|0,i=Math.imul(D,Z),r=r+Math.imul(R,G)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(z,G)|0,i=i+Math.imul(z,Q)|0,r=r+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(j,ne)|0,i=i+Math.imul(j,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,ae)|0,r=r+Math.imul(x,se)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(M,se)|0,i=i+Math.imul(M,ue)|0,r=r+Math.imul(y,de)|0,o=(o=o+Math.imul(y,fe)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,fe)|0;var Oe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,be)|0)+Math.imul(g,pe)|0))<<13)|0;u=((i=i+Math.imul(g,be)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(P,G),o=(o=Math.imul(P,Q))+Math.imul(D,G)|0,i=Math.imul(D,Q),r=r+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(z,$)|0,i=i+Math.imul(z,ee)|0,r=r+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,re)|0)+Math.imul(T,ne)|0,i=i+Math.imul(T,re)|0,r=r+Math.imul(C,ie)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(j,ie)|0,i=i+Math.imul(j,ae)|0,r=r+Math.imul(S,se)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,ue)|0,r=r+Math.imul(x,de)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,fe)|0;var Le=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(o=(o=o+Math.imul(y,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(P,$),o=(o=Math.imul(P,ee))+Math.imul(D,$)|0,i=Math.imul(D,ee),r=r+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,re)|0)+Math.imul(z,ne)|0,i=i+Math.imul(z,re)|0,r=r+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,ae)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,ae)|0,r=r+Math.imul(C,se)|0,o=(o=o+Math.imul(C,ue)|0)+Math.imul(j,se)|0,i=i+Math.imul(j,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,fe)|0;var Ce=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(o=(o=o+Math.imul(x,be)|0)+Math.imul(M,pe)|0))<<13)|0;u=((i=i+Math.imul(M,be)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(P,ne),o=(o=Math.imul(P,re))+Math.imul(D,ne)|0,i=Math.imul(D,re),r=r+Math.imul(R,ie)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(z,ie)|0,i=i+Math.imul(z,ae)|0,r=r+Math.imul(I,se)|0,o=(o=o+Math.imul(I,ue)|0)+Math.imul(T,se)|0,i=i+Math.imul(T,ue)|0,r=r+Math.imul(C,de)|0,o=(o=o+Math.imul(C,fe)|0)+Math.imul(j,de)|0,i=i+Math.imul(j,fe)|0;var je=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(o=(o=o+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(P,ie),o=(o=Math.imul(P,ae))+Math.imul(D,ie)|0,i=Math.imul(D,ae),r=r+Math.imul(R,se)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(z,se)|0,i=i+Math.imul(z,ue)|0,r=r+Math.imul(I,de)|0,o=(o=o+Math.imul(I,fe)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,fe)|0;var Ne=(u+(r=r+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,be)|0)+Math.imul(j,pe)|0))<<13)|0;u=((i=i+Math.imul(j,be)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(P,se),o=(o=Math.imul(P,ue))+Math.imul(D,se)|0,i=Math.imul(D,ue),r=r+Math.imul(R,de)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(z,de)|0,i=i+Math.imul(z,fe)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(P,de),o=(o=Math.imul(P,fe))+Math.imul(D,de)|0,i=Math.imul(D,fe);var Te=(u+(r=r+Math.imul(R,pe)|0)|0)+((8191&(o=(o=o+Math.imul(R,be)|0)+Math.imul(z,pe)|0))<<13)|0;u=((i=i+Math.imul(z,be)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Ae=(u+(r=Math.imul(P,pe))|0)+((8191&(o=(o=Math.imul(P,be))+Math.imul(D,pe)|0))<<13)|0;return u=((i=Math.imul(D,be))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s[0]=me,s[1]=ve,s[2]=ge,s[3]=_e,s[4]=ye,s[5]=we,s[6]=ke,s[7]=xe,s[8]=Me,s[9]=Ee,s[10]=Se,s[11]=Oe,s[12]=Le,s[13]=Ce,s[14]=je,s[15]=Ne,s[16]=Ie,s[17]=Te,s[18]=Ae,0!==u&&(s[19]=u,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i>>26)|0)>>>26,a&=67108863}n.words[i]=l,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n._strip()}function v(e,t,n){return m(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(b=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):n<63?p(this,e,t):n<1024?m(this,e,t):v(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&i,i>>>=13;for(a=2*t;a>=26,n+=i/67108864|0,n+=a>>>26,this.words[o]=67108863&a}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),l=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=o);u--){var d=0|this.words[u];this.words[u]=c<<26-i|d>>>i,c=d&l}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[o+n]=67108863&i}for(;o>26,this.words[o+n]=67108863&i;if(0===l)return this._strip();for(r(-1===l),l=0,o=0;o>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var l,s=r.length-o.length;if("mod"!==t){(l=new i(null)).length=s+1,l.words=new Array(l.length);for(var u=0;u=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);l&&(l.words[d]=f)}return l&&l._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:l||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(o=l.div.neg()),"div"!==t&&(a=l.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(o=l.div.neg()),{div:o,mod:l.mod}):0!==(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(a=l.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:l.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,l},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),l=new i(0),s=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,b=1;0===(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(l.isOdd()||s.isOdd())&&(l.iadd(c),s.isub(d)),l.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(l),a.isub(s)):(n.isub(t),l.isub(o),s.isub(a))}return{a:l,b:s,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),l=new i(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0===(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var d=0,f=1;0===(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)l.isOdd()&&l.iadd(s),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(l)):(n.isub(t),l.isub(a))}return(o=0===t.cmpn(1)?a:l).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,l&=67108863,this.words[a]=l}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){ro&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(w,y),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new k;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return _[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var l=new i(1).toRed(this),s=l.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var d=this.pow(c,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(l);){for(var b=h,m=0;0!==b.cmp(l);m++)b=b.redSqr();r(m=0;r--){for(var u=t.words[r],c=s-1;c>=0;c--){var d=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++l||0===r&&0===c)&&(o=this.mul(o,n[a]),l=0,a=0)):l=0}s=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},o(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(74)(e))},function(e,t,n){"use strict";var r=t;r.bignum=n(21),r.define=n(283).define,r.base=n(286),r.constants=n(287),r.decoders=n(169),r.encoders=n(167)},function(e,t,n){"use strict";var r=t;r.der=n(168),r.pem=n(284)},function(e,t,n){"use strict";var r=n(7),o=n(109).Buffer,i=n(110),a=n(112);function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){i.call(this,"der",e)}function u(e){return e<10?"0"+e:e}e.exports=l,l.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(s,i),s.prototype._encodeComposite=function(e,t,n,r){var i=function(e,t,n,r){var o;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))o=a.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);o=e}if(o>=31)return r.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=a.tagClassByName[n||"universal"]<<6}(e,t,n,this.reporter);if(r.length<128){var l=o.alloc(2);return l[0]=i,l[1]=r.length,this._createEncoderBuffer([l,r])}for(var s=1,u=r.length;u>=256;u>>=8)s++;var c=o.alloc(2+s);c[0]=i,c[1]=128|s;for(var d=1+s,f=r.length;f>0;d--,f>>=8)c[d]=255&f;return this._createEncoderBuffer([c,r])},s.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=o.alloc(2*e.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,l=0;l=128;s>>=7)a++}for(var u=o.alloc(a),c=u.length-1,d=e.length-1;d>=0;d--){var f=e[d];for(u[c--]=127&f;(f>>=7)>0;)u[c--]=128|127&f}return this._createEncoderBuffer(u)},s.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[u(r.getUTCFullYear()),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[u(r.getUTCFullYear()%100),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!o.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=o.from(n)}if(o.isBuffer(e)){var r=e.length;0===e.length&&r++;var i=o.alloc(r);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,l=e;l>=256;l>>=8)a++;for(var s=new Array(a),u=s.length-1;u>=0;u--)s[u]=255&e,e>>=8;return 128&s[0]&&s.unshift(0),this._createEncoderBuffer(o.from(s))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},s.prototype._skipDefault=function(e,t,n){var r,o=this._baseState;if(null===o.default)return!1;var i=e.join();if(void 0===o.defaultBuffer&&(o.defaultBuffer=this._encodeValue(o.default,t,n).join()),i.length!==o.defaultBuffer.length)return!1;for(r=0;r>6],o=0===(32&n);if(31===(31&n)){var i=n;for(n=0;128===(128&i);){if(i=e.readUInt8(t),e.isError(i))return i;n<<=7,n|=127&i}}else n&=31;return{cls:r,primitive:o,tag:n,tagStr:l.tag[n]}}function d(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0===(128&r))return r;var o=127&r;if(o>4)return e.error("length octect is too long");r=0;for(var i=0;i0?R:null},T)),z&&i.a.createElement("div",{className:a.b.buttonWrapper},i.a.createElement("button",{className:a.b.button,disabled:d,type:"button",onClick:I,"aria-label":N},j)),u)}))},function(e,t,n){"use strict";(function(e){var r=n(9),o=n(4),i=n(13),a=n(0),l=n(114);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debounce:0,scroll:!1},t=e.debounce,n=e.scroll,r=e.polyfill,s=r||("undefined"===typeof window?function e(){Object(i.a)(this,e)}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");var f=Object(a.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),p=Object(o.a)(f,2),b=p[0],m=p[1],v=Object(a.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:b}),g=t?"number"===typeof t?t:t.scroll:null,_=t?"number"===typeof t?t:t.resize:null,y=Object(a.useMemo)((function(){var e=function(){if(v.current.element){var e=v.current.element.getBoundingClientRect(),t={left:e.left,top:e.top,width:e.width,height:e.height,bottom:e.bottom,right:e.right,x:e.x,y:e.y};Object.freeze(t),h(v.current.lastBounds,t)||m(v.current.lastBounds=t)}};return[e,_?Object(l.debounce)(e,_):e,g?Object(l.debounce)(e,g):e]}),[m,g,_]),w=Object(o.a)(y,3),k=w[0],x=w[1],M=w[2];function E(){v.current.scrollContainers&&(v.current.scrollContainers.forEach((function(e){return e.removeEventListener("scroll",M,!0)})),v.current.scrollContainers=null),v.current.resizeObserver&&(v.current.resizeObserver.disconnect(),v.current.resizeObserver=null)}function S(){v.current.element&&(v.current.resizeObserver=new s(M),v.current.resizeObserver.observe(v.current.element),n&&v.current.scrollContainers&&v.current.scrollContainers.forEach((function(e){return e.addEventListener("scroll",M,{capture:!0,passive:!0})})))}var O=function(e){e&&e!==v.current.element&&(E(),v.current.element=e,v.current.scrollContainers=d(e),S())};return c(M,Boolean(n)),u(x),Object(a.useEffect)((function(){E(),S()}),[n,M,x]),Object(a.useEffect)((function(){return E}),[]),[O,b,k]}function u(e){Object(a.useEffect)((function(){var t=e;return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}),[e])}function c(e,t){Object(a.useEffect)((function(){if(t){var n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),function(){window.removeEventListener("scroll",n,!0)}}}),[e,t])}function d(e){var t=[];if(!e||e===document.body)return t;var n=window.getComputedStyle(e);return[n.overflow,n.overflowX,n.overflowY].some((function(e){return"auto"===e||"scroll"===e}))&&t.push(e),[].concat(t,Object(r.a)(d(e.parentElement)))}var f=["x","y","top","bottom","left","right","width","height"],h=function(e,t){return f.every((function(n){return e[n]===t[n]}))};Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(e,"exports").writable&&(e.exports=s),t.a=s}).call(this,n(198)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(117),a=n(67),l=n.n(a),s=1073741823,u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var d=o.a.createContext||function(e,t){var n,o,a="__create-react-context-"+function(){var e="__global_unique_id__";return u[e]=(u[e]||0)+1}()+"__",d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i===1/a:i!==i&&a!==a)?n=0:(n="function"===typeof t?t(r,o):s,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);d.childContextTypes=((n={})[a]=l.a.object.isRequired,n);var f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?s:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?s:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return f.contextTypes=((o={})[a]=l.a.object,o),{Provider:d,Consumer:f}};t.a=d}).call(this,n(20))},function(e,t,n){"use strict";var r=n(122),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var l=s(t),b=s(n),m=0;m=0||(o[n]=e[n]);return o}function d(){return(d=Object.assign||function(e){for(var t=1;tt||i>e&&a=t&&l>=n?i-e-r:a>t&&ln?a-t+o:0}var we=0;function ke(e){return"function"==typeof e?e:xe}function xe(){}function Me(e,t){e&&function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s="function"==typeof a?a:function(e){return e!==a};if(!ve(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],h=e;ve(h)&&s(h);){if((h=null==(c=(u=h).parentElement)?u.getRootNode().host||null:c)===d){f.push(h);break}null!=h&&h===document.body&&_e(h)&&!_e(document.documentElement)||null!=h&&_e(h,l)&&f.push(h)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,b=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),_=g.height,y=g.width,w=g.top,k=g.right,x=g.bottom,M=g.left,E="start"===o||"nearest"===o?w:"end"===o?x:w+_/2,S="center"===i?M+y/2:"end"===i?k:M,O=[],L=0;L=0&&M>=0&&x<=b&&k<=p&&w>=T&&x<=R&&M>=z&&k<=A)return O;var B=getComputedStyle(C),P=parseInt(B.borderLeftWidth,10),D=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),U=parseInt(B.borderBottomWidth,10),F=0,W=0,V="offsetWidth"in C?C.offsetWidth-C.clientWidth-P-H:0,q="offsetHeight"in C?C.offsetHeight-C.clientHeight-D-U:0,K="offsetWidth"in C?0===C.offsetWidth?0:I/C.offsetWidth:0,Y="offsetHeight"in C?0===C.offsetHeight?0:N/C.offsetHeight:0;if(d===C)F="start"===o?E:"end"===o?E-b:"nearest"===o?ye(v,v+b,b,D,U,v+E,v+E+_,_):E-b/2,W="start"===i?S:"center"===i?S-p/2:"end"===i?S-p:ye(m,m+p,p,P,H,m+S,m+S+y,y),F=Math.max(0,F+v),W=Math.max(0,W+m);else{F="start"===o?E-T-D:"end"===o?E-R+U+q:"nearest"===o?ye(T,R,N,D,U+q,E,E+_,_):E-(T+N/2)+q/2,W="start"===i?S-z-P:"center"===i?S-(z+I/2)+V/2:"end"===i?S-A+H+V:ye(z,A,I,P,H+V,S,S+y,y);var Z=C.scrollLeft,X=C.scrollTop;E+=X-(F=Math.max(0,Math.min(X+F/Y,C.scrollHeight-N/Y+q))),S+=Z-(W=Math.max(0,Math.min(Z+W/K,C.scrollWidth-I/K+V)))}O.push({el:C,top:F,left:W})}return O}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function Ee(e,t){return e===t||e.contains&&e.contains(t)}function Se(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a1?n-1:0),o=1;o=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function Be(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var l=Pe(e,a,n,r,o);return-1===l?t>=n?-1:t:l}function Pe(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a=0;l--)if(!r(l).hasAttribute("disabled"))return l;return o?e>0?Pe(1,0,n,r,!1):Pe(-1,n-1,n,r,!1):-1}function De(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(Ee(t,e)||r&&Ee(t,n.activeElement))}))}var He=Se((function(){Fe().textContent=""}),500);function Ue(e,t){var n=Fe(t);e&&(n.textContent=e,He())}function Fe(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var We=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16});!function(){var e=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+Ce(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=Te(t),n.internalSetState(d({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=Te(t),n.internalSetState(d({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,d({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var l=a?e(t):e;l=n.props.stateReducer(t,l),r=l.hasOwnProperty("selectedItem");var s={},u={};return r&&l.selectedItem!==t.selectedItem&&(o=l.selectedItem),l.type=l.type||0,Object.keys(l).forEach((function(e){t[e]!==l[e]&&(i[e]=l[e]),"type"!==e&&(u[e]=l[e],Re(n.props,e)||(s[e]=l[e]))})),a&&l.hasOwnProperty("inputValue")&&n.props.onInputValueChange(l.inputValue,d({},n.getStateAndHelpers(),l)),s}),(function(){ke(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,l=o.ref,s=c(o,["refKey","ref"]),u=(void 0===t?{}:t).suppressRefError,f=void 0!==u&&u;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=f;var h=n.getState().isOpen;return d(((r={})[a]=Le(l,n.rootRef),r.role="combobox",r["aria-expanded"]=h,r["aria-haspopup"]="listbox",r["aria-owns"]=h?n.menuId:null,r["aria-labelledby"]=n.labelId,r),s)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=Be(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=Be(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(d({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=d({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=d({},n.keyDownHandlers,{Home:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Pe(1,0,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}},End:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Pe(-1,n-1,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick;t.onPress;var o=t.onKeyDown,i=t.onKeyUp,a=t.onBlur,l=c(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),s=n.getState().isOpen,u={onClick:Oe(r,n.buttonHandleClick),onKeyDown:Oe(o,n.buttonHandleKeyDown),onKeyUp:Oe(i,n.buttonHandleKeyUp),onBlur:Oe(a,n.buttonHandleBlur)};return d({type:"button",role:"button","aria-label":s?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l.disabled?{}:u,l)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=ze(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(f(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return d({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput;t.onChangeText;var l,s=c(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"]),u={},f=n.getState(),h=f.inputValue,p=f.isOpen,b=f.highlightedIndex;return s.disabled||((l={}).onChange=Oe(i,a,n.inputHandleChange),l.onKeyDown=Oe(r,n.inputHandleKeyDown),l.onBlur=Oe(o,n.inputHandleBlur),u=l),d({"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof b&&b>=0?n.getItemId(b):null,"aria-controls":p?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:h,id:n.inputId},u,s)},n.inputHandleKeyDown=function(e){var t=ze(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(f(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,l=o.ref,s=c(o,["refKey","ref"]),u=(void 0===t?{}:t).suppressRefError,f=void 0!==u&&u;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=f,d(((r={})[a]=Le(l,n.menuRef),r.role="listbox",r["aria-labelledby"]=s&&s["aria-label"]?null:n.labelId,r.id=n.menuId,r),s)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick;r.onPress;var l=r.index,s=r.item,u=void 0===s?void 0:s,f=c(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===l?(n.items.push(u),l=n.items.indexOf(u)):n.items[l]=u;var h=a,p=((t={onMouseMove:Oe(o,(function(){l!==n.getState().highlightedIndex&&(n.setHighlightedIndex(l,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:Oe(i,(function(e){e.preventDefault()}))}).onClick=Oe(h,(function(){n.selectItemAtIndex(l,{type:9})})),t),b=f.disabled?{onMouseDown:p.onMouseDown}:p;return d({id:n.getItemId(l),role:"option","aria-selected":n.getState().highlightedIndex===l},b,f)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=Te(e),n.internalSetState((function(t){var r=t.selectedItem;return d({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=Te(e),n.internalSetState((function(t){var r=t.isOpen;return d({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),ke(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=Se((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(d({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,Ue(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,l=r.defaultIsOpen,s=r.initialIsOpen,u=void 0===s?l:s,h=r.initialInputValue,p=void 0===h?"":h,b=r.initialSelectedItem,m=void 0===b?null:b,v=n.getState({highlightedIndex:a,isOpen:u,inputValue:p,selectedItem:m});return null!=v.selectedItem&&void 0===n.props.initialInputValue&&(v.inputValue=n.props.itemToString(v.selectedItem)),n.state=v,n}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,h(n,r);var o=t.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){return void 0===e&&(e=this.state),Ae(e,this.props)},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=Be(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,l=this.getRootProps,s=this.getToggleButtonProps,u=this.getLabelProps,c=this.getMenuProps,d=this.getInputProps,f=this.getItemProps,h=this.openMenu,p=this.closeMenu,b=this.toggleMenu,m=this.selectItem,v=this.selectItemAtIndex,g=this.selectHighlightedItem,_=this.setHighlightedIndex,y=this.clearSelection,w=this.clearItems;return{getRootProps:l,getToggleButtonProps:s,getLabelProps:u,getMenuProps:c,getInputProps:d,getItemProps:f,reset:this.reset,openMenu:h,closeMenu:p,toggleMenu:b,selectItem:m,selectItemAtIndex:v,selectHighlightedItem:g,setHighlightedIndex:_,clearSelection:y,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this,t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!De(t.target,[e._rootNode,e._menuNode],e.props.environment.document)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=De(t.target,[e._rootNode,e._menuNode],e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},a=this.props.environment;a.addEventListener("mousedown",t),a.addEventListener("mouseup",n),a.addEventListener("touchstart",r),a.addEventListener("touchmove",o),a.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),a.removeEventListener("mousedown",t),a.removeEventListener("mouseup",n),a.removeEventListener("touchstart",r),a.removeEventListener("touchmove",o),a.removeEventListener("touchend",i)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){Re(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=Ne(this.props.children,xe);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=Ne(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(s.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},t}(s.Component);e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:je,itemToString:function(e){return null==e?"":String(e)},onStateChange:xe,onInputValueChange:xe,onUserAction:xe,onChange:xe,onSelect:xe,onOuterClick:xe,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:Me},e.stateChangeTypes=We}();var Ve={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var qe=Se((function(e,t){Ue(e(),t)}),200);function Ke(e){var t=e.id,n=e.labelId,r=e.menuId,o=e.getItemId,i=e.toggleButtonId,a=void 0===t?"downshift-"+Ce():t;return{labelId:n||a+"-label",menuId:r||a+"-menu",getItemId:o||function(e){return a+"-item-"+e},toggleButtonId:i||a+"-toggle-button"}}function Ye(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function Ze(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Xe(e){var t=Object(s.useRef)(e);return t.current=e,t}function Ge(e,t,n){var r=Object(s.useRef)(),o=Object(s.useRef)(),i=Object(s.useCallback)((function(t,n){o.current=n,t=Ae(t,n.props);var r=e(t,n);return n.props.stateReducer(t,d({},n,{changes:r}))}),[e]),a=Object(s.useReducer)(i,t),l=a[0],u=a[1],c=Xe(n),f=Object(s.useCallback)((function(e){return u(d({props:c.current},e))}),[c]),h=o.current;return Object(s.useEffect)((function(){h&&r.current&&r.current!==l&&function(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach((function(r){!function(e,t,n,r){var o=t.props,i=t.type,a="on"+Ze(e)+"Change";o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a](d({type:i},r))}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange(d({type:o},i))}(h,Ae(r.current,h.props),l),r.current=l}),[l,n,h]),[l,f]}var Qe={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:Me,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function Je(e,t,n){void 0===n&&(n=Ve);var r="default"+Ze(t);return r in e?e[r]:n[t]}function $e(e,t,n){if(void 0===n&&(n=Ve),t in e)return e[t];var r="initial"+Ze(t);return r in e?e[r]:Je(e,t,n)}function et(e){var t=$e(e,"selectedItem"),n=$e(e,"isOpen"),r=$e(e,"highlightedIndex"),o=$e(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function tt(e,t,n,r){var o=e.items,i=e.initialHighlightedIndex,a=e.defaultHighlightedIndex,l=t.selectedItem,s=t.highlightedIndex;return 0===o.length?-1:void 0!==i&&s===i?i:void 0!==a?a:l?0===n?o.indexOf(l):Be(n,o.indexOf(l),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function nt(e,t,n,r){var o=Object(s.useRef)({isMouseDown:!1,isTouchMove:!1});return Object(s.useEffect)((function(){var i=function(){o.current.isMouseDown=!0},a=function(i){o.current.isMouseDown=!1,e&&!De(i.target,t.map((function(e){return e.current})),n.document)&&r()},l=function(){o.current.isTouchMove=!1},s=function(){o.current.isTouchMove=!0},u=function(i){!e||o.current.isTouchMove||De(i.target,t.map((function(e){return e.current})),n.document,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",l),n.addEventListener("touchmove",s),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",s),n.removeEventListener("touchend",u)}}),[e,n]),o}function rt(){for(var e=!1,t=Object(s.useRef)(!0),n=arguments.length,r=new Array(n),o=0;o=0&&{selectedItem:o.items[e.highlightedIndex],isOpen:Je(o,"isOpen"),highlightedIndex:Je(o,"highlightedIndex"),inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case 2:n=d({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case 3:n=d({},e.isOpen&&{highlightedIndex:Pe(1,0,o.items.length,t.getItemNodeFromIndex,!1)});break;case 4:n=d({},e.isOpen&&{highlightedIndex:Pe(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)});break;case 7:e.isOpen&&(n=d({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])}));break;case 6:n={isOpen:!0,highlightedIndex:Je(o,"highlightedIndex"),inputValue:t.inputValue};break;case 8:n={highlightedIndex:-1};break;case 11:case 12:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:tt(o,e,0)};break;case 13:n={isOpen:!0,highlightedIndex:tt(o,e,0)};break;case 14:n={isOpen:!1};break;case 15:n={highlightedIndex:t.highlightedIndex};break;case 16:n={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case 19:case 17:n={inputValue:t.inputValue};break;case 18:n={highlightedIndex:Je(o,"highlightedIndex"),isOpen:Je(o,"isOpen"),selectedItem:Je(o,"selectedItem"),inputValue:Je(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return d({},e,n)}function ct(e){void 0===e&&(e={});var t=d({},st,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,l=t.getA11yStatusMessage,u=t.getA11ySelectionMessage,f=t.itemToString,h=function(e,t,n){var r=Object(s.useRef)(),o=Ge(e,t,n),i=o[0],a=o[1];return Object(s.useEffect)((function(){Re(n,"selectedItem")&&(r.current!==n.selectedItem&&a({type:19,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)})),[Ae(i,n),a]}(ut,function(e){var t=et(e),n=t.selectedItem,r=t.inputValue;return""===r&&n&&void 0===e.defaultInputValue&&void 0===e.initialInputValue&&void 0===e.inputValue&&(r=e.itemToString(n)),d({},t,{inputValue:r})}(t),t),p=h[0],b=h[1],m=p.isOpen,v=p.highlightedIndex,g=p.selectedItem,_=p.inputValue,y=Object(s.useRef)(null),w=Object(s.useRef)(),k=Object(s.useRef)(null),x=Object(s.useRef)(null),M=Object(s.useRef)(null);w.current={};var E,S,O,L,C,j=Object(s.useRef)(!0),N=Object(s.useRef)((S=(E=t).id,O=E.inputId,L=c(E,["id","inputId"]),C=void 0===S?"downshift-"+Ce():S,d({inputId:O||C+"-input"},Ke(d({id:S},L))))),I=Object(s.useRef)(),T=Xe({state:p,props:t}),A=function(e){return w.current[N.current.getItemId(e)]};ot(l,[m,v,_,o],d({isInitialMount:j.current,previousResultCount:I.current,items:o,environment:a,itemToString:f},p)),ot(u,[g],d({isInitialMount:j.current,previousResultCount:I.current,items:o,environment:a,itemToString:f},p));var R=it({menuElement:y.current,highlightedIndex:v,isOpen:m,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:A});at({isInitialMount:j.current,props:t,state:p}),Object(s.useEffect)((function(){j.current&&(n||r||m)&&k.current&&k.current.focus()}),[m]),Object(s.useEffect)((function(){j.current||(I.current=o.length)}));var z=nt(m,[M,y,x],a,(function(){b({type:7,selectItem:!1})})),B=rt("getInputProps","getComboboxProps","getMenuProps");Object(s.useEffect)((function(){j.current=!1}),[]);var P=Object(s.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),b({type:0,shiftKey:e.shiftKey,getItemNodeFromIndex:A})},ArrowUp:function(e){e.preventDefault(),b({type:1,shiftKey:e.shiftKey,getItemNodeFromIndex:A})},Home:function(e){e.preventDefault(),b({type:3,getItemNodeFromIndex:A})},End:function(e){e.preventDefault(),b({type:4,getItemNodeFromIndex:A})},Escape:function(){b({type:2})},Enter:function(e){229!==e.which&&(T.current.state.isOpen&&e.preventDefault(),b({type:5,getItemNodeFromIndex:A}))}}}),[b,T]),D=Object(s.useCallback)((function(e){return d({id:N.current.labelId,htmlFor:N.current.inputId},e)}),[]),H=Object(s.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,i=r.refKey,a=void 0===i?"ref":i,l=r.ref,s=c(r,["onMouseLeave","refKey","ref"]),u=(void 0===t?{}:t).suppressRefError;return B("getMenuProps",void 0!==u&&u,a,y),d(((n={})[a]=Le(l,(function(e){y.current=e})),n.id=N.current.menuId,n.role="listbox",n["aria-labelledby"]=N.current.labelId,n.onMouseLeave=Oe(o,(function(){b({type:8})})),n),s)}),[b,B]),U=Object(s.useCallback)((function(e){var t,n,r=void 0===e?{}:e,o=r.item,i=r.index,a=r.refKey,l=void 0===a?"ref":a,s=r.ref,u=r.onMouseMove,f=r.onClick;r.onPress;var h=c(r,["item","index","refKey","ref","onMouseMove","onClick","onPress"]),p=T.current,m=p.props,v=p.state,g=Ye(i,o,m.items);if(g<0)throw new Error("Pass either item or item index in getItemProps!");var _=f;return d(((t={})[l]=Le(s,(function(e){e&&(w.current[N.current.getItemId(g)]=e)})),t.role="option",t["aria-selected"]=""+(g===v.highlightedIndex),t.id=N.current.getItemId(g),t),!h.disabled&&((n={onMouseMove:Oe(u,(function(){i!==v.highlightedIndex&&(R.current=!1,b({type:9,index:i}))}))}).onClick=Oe(_,(function(){b({type:10,index:i}),k.current&&k.current.focus()})),n),h)}),[b,T,R]),F=Object(s.useCallback)((function(e){var t,n=void 0===e?{}:e,r=n.onClick;n.onPress;var o=n.refKey,i=void 0===o?"ref":o,a=n.ref,l=c(n,["onClick","onPress","refKey","ref"]);return d(((t={})[i]=Le(a,(function(e){x.current=e})),t.id=N.current.toggleButtonId,t.tabIndex=-1,t),!l.disabled&&d({},{onClick:Oe(r,(function(){b({type:11}),!T.current.state.isOpen&&k.current&&k.current.focus()}))}),l)}),[b,T]),W=Object(s.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onKeyDown,i=r.onChange,a=r.onInput,l=r.onBlur;r.onChangeText;var s=r.refKey,u=void 0===s?"ref":s,f=r.ref,h=c(r,["onKeyDown","onChange","onInput","onBlur","onChangeText","refKey","ref"]),p=(void 0===t?{}:t).suppressRefError;B("getInputProps",void 0!==p&&p,u,k);var m,v=T.current.state,g={};return h.disabled||((m={}).onChange=Oe(i,a,(function(e){b({type:6,inputValue:e.target.value})})),m.onKeyDown=Oe(o,(function(e){var t=ze(e);t&&P[t]&&P[t](e)})),m.onBlur=Oe(l,(function(){z.current.isMouseDown||b({type:7,selectItem:!0})})),g=m),d(((n={})[u]=Le(f,(function(e){k.current=e})),n.id=N.current.inputId,n["aria-autocomplete"]="list",n["aria-controls"]=N.current.menuId,n),v.isOpen&&v.highlightedIndex>-1&&{"aria-activedescendant":N.current.getItemId(v.highlightedIndex)},{"aria-labelledby":N.current.labelId,autoComplete:"off",value:v.inputValue},g,h)}),[b,P,T,z,B]),V=Object(s.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.refKey,i=void 0===o?"ref":o,a=r.ref,l=c(r,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError;return B("getComboboxProps",void 0!==s&&s,i,M),d(((n={})[i]=Le(a,(function(e){M.current=e})),n.role="combobox",n["aria-haspopup"]="listbox",n["aria-owns"]=N.current.menuId,n["aria-expanded"]=T.current.state.isOpen,n),l)}),[T,B]),q=Object(s.useCallback)((function(){b({type:12})}),[b]),K=Object(s.useCallback)((function(){b({type:14})}),[b]),Y=Object(s.useCallback)((function(){b({type:13})}),[b]),Z=Object(s.useCallback)((function(e){b({type:15,highlightedIndex:e})}),[b]),X=Object(s.useCallback)((function(e){b({type:16,selectedItem:e})}),[b]);return{getItemProps:U,getLabelProps:D,getMenuProps:H,getInputProps:W,getComboboxProps:V,getToggleButtonProps:F,toggleMenu:q,openMenu:Y,closeMenu:K,setHighlightedIndex:Z,setInputValue:Object(s.useCallback)((function(e){b({type:17,inputValue:e})}),[b]),selectItem:X,reset:Object(s.useCallback)((function(){b({type:18})}),[b]),highlightedIndex:v,isOpen:m,selectedItem:g,inputValue:_}}ct.stateChangeTypes=lt;Z.array,Z.array,Z.array,Z.func,Z.func,Z.func,Z.number,Z.number,Z.number,Z.func,Z.func,Z.string,Z.string,Z.shape({addEventListener:Z.func,removeEventListener:Z.func,document:Z.shape({getElementById:Z.func,activeElement:Z.any,body:Z.any})});Object.freeze({__proto__:null,SelectedItemClick:0,SelectedItemKeyDownDelete:1,SelectedItemKeyDownBackspace:2,SelectedItemKeyDownNavigationNext:3,SelectedItemKeyDownNavigationPrevious:4,DropdownKeyDownNavigationPrevious:5,DropdownKeyDownBackspace:6,DropdownClick:7,FunctionAddSelectedItem:8,FunctionRemoveSelectedItem:9,FunctionSetSelectedItems:10,FunctionSetActiveIndex:11,FunctionReset:12});var dt=function(e){var t=e.disabled,n=e.highlightValue,r=e.itemProps,o=e.label,i=e.menuStyles,a=e.multiselect,l=e.selected,s=function(e){return u.a.createElement("span",{className:i.highlighted,dangerouslySetInnerHTML:{__html:(t=e,t.replace(new RegExp(n,"gi"),(function(e){return"".concat(e,"")})))}});var t};return u.a.createElement("li",Object.assign({},r,{"aria-selected":l},t&&{"aria-disabled":!0}),a?u.a.createElement(u.a.Fragment,null,u.a.createElement("span",{className:i.checkbox,"aria-hidden":!0},u.a.createElement(g.a,null)),n?s(o):o):u.a.createElement(u.a.Fragment,null,n?s(o):o,l&&u.a.createElement(g.a,{className:i.selectedIcon})))},ft=function(e){var t=e.getItemProps,n=e.highlightValue,r=e.isOptionDisabled,o=e.menuProps,i=e.menuStyles,a=e.multiselect,l=e.open,s=e.optionLabelField,c=e.optionKeyField,d=e.options,f=e.selectedItem,h=e.selectedItems,p=e.virtualizer,b=!!p,g=b?p.virtualItems:d;return u.a.createElement("ul",Object.assign({},o,{className:Object(v.a)(i.menu)}),l&&u.a.createElement(u.a.Fragment,null,b&&u.a.createElement("li",{key:"total-size","aria-hidden":!0,style:{height:p.totalSize}}),g.map((function(e,o){var l=o,p=null;b&&(l=e.index,p=e);var v=d[l],g=v[s],_=v[c],y=a?function(e,t){return e.some((function(e){return m()(e,t)}))}(h,v):m()(f,v),w="function"==typeof r&&r(v,l),k=t(v,l,y,w,p);return u.a.createElement(dt,{key:_,disabled:w,highlightValue:n,itemProps:k,menuStyles:i,multiselect:a,label:g,selected:y})}))))},ht=n(6),pt=n(85),bt=n(1),mt=function(e){var t=e.ariaLabel,n=void 0===t?"cross-circle":t,r=e.ariaLabelledby,o=e.ariaHidden,i=void 0===o||o,a=e.className,l=void 0===a?"":a,s=e.color,c=e.size,d=void 0===c?"s":c,f=e.style,h=void 0===f?{}:f;return u.a.createElement("svg",{className:[bt.a.icon,bt.a[d],l].filter((function(e){return e})).join(" "),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-label":n,"aria-labelledby":r,"aria-hidden":i,color:s,style:h},u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM15 7.5L16.5 9L13.5 12L16.5 15L15 16.5L12 13.5L9 16.5L7.5 15L10.5 12L7.5 9L9 7.5L12 10.5L15 7.5Z",fill:"currentColor"}))},vt=n(70),gt=n(81),_t={input:"SearchInput-module_input__Addns",hidden:"SearchInput-module_hidden__OcXmJ",button:"SearchInput-module_button__z7NIp search-input_hds-search-input__button__1-cj-",wrapper:"SearchInput-module_wrapper__114JK",root:"SearchInput-module_root__sMwrY",open:"SearchInput-module_open__1zeft",angleIcon:"SearchInput-module_angleIcon__1PdxN",menu:"SearchInput-module_menu__2P8CO",loadingSpinnerContainer:"SearchInput-module_loadingSpinnerContainer__T6ZTc",menuItem:"SearchInput-module_menuItem__zIC_d",highlighted:"SearchInput-module_highlighted__3D7Hh",selected:"SearchInput-module_selected__30K7a",disabled:"SearchInput-module_disabled__akdv5",virtualized:"SearchInput-module_virtualized__xRfea",buttons:"SearchInput-module_buttons__2O_2t search-input_hds-search-input__buttons__3PawT",searchIcon:"SearchInput-module_searchIcon__l1_S4",noToggle:"SearchInput-module_noToggle__2rf7Y",helperText:"SearchInput-module_helperText__2AWSL",loadingSpinner:"SearchInput-module_loadingSpinner__3G_76"};Object(ht.a)(".search-input_hds-icon__5eCQs{--icon-size:100%;background-color:currentcolor;display:inline-block;height:var(--icon-size);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:auto;mask-size:auto;width:var(--icon-size)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-xs__JNXQQ{--icon-size:var(--spacing-layout-2-xs)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-s__1UrrH{--icon-size:var(--spacing-layout-xs)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-m__2xJqk{--icon-size:var(--spacing-layout-s)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-l__9ZoGz{--icon-size:var(--spacing-layout-m)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-xl__33Ryp{--icon-size:var(--spacing-layout-l)}.search-input_hds-icon--search__1OHPF{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1a8 8 0 11-4.798 14.402l-6.401 6.4-1.591-1.59 6.398-6.4A8 8 0 0115 1zm0 2a6 6 0 100 12 6 6 0 000-12z' fill='currentColor'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1a8 8 0 11-4.798 14.402l-6.401 6.4-1.591-1.59 6.398-6.4A8 8 0 0115 1zm0 2a6 6 0 100 12 6 6 0 000-12z' fill='currentColor'/%3E%3C/svg%3E\")}.search-input_hds-search-input__3yDGf{--border-width:2px;--outline-width:3px;--input-height:56px;--helper-color-default:var(--color-black-60);--input-background-default:var(--color-white);--input-border-color-default:var(--color-black-50);--input-border-color-hover:var(--color-black-90);--input-border-color-focus:var(--color-black-90);--input-color-default:var(--color-black-90);--label-color-default:var(--color-black-90)}.search-input_hds-search-input__label__2XXxI{color:var(--label-color-default);display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.search-input_hds-search-input__input-wrapper__2SHOr{display:flex;height:100%;position:relative}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908{-webkit-appearance:none;background-color:var(--input-background-default);border:var(--border-width) solid var(--input-border-color-default);box-sizing:border-box;color:var(--input-color-default);font-size:1.125em;height:var(--input-height);line-height:normal;padding:0 var(--spacing-s);width:100%}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908:hover{border-color:var(--input-border-color-hover);transition:border-color 85ms ease-out}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908:focus{border-color:var(--input-border-color-focus);outline:none}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908:not([readonly]):focus{outline:var(--outline-width) solid var(--color-focus-outline);transform:translateZ(0)}.search-input_hds-search-input__buttons__3PawT{align-items:center;bottom:0;display:flex;font-size:1rem;justify-content:center;margin-right:calc(var(--spacing-s) - var(--spacing-xs) / 2);position:absolute;right:0;top:0}.search-input_hds-search-input__button__1-cj-{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;color:var(--dropdown-color-default);cursor:pointer;display:flex;font:inherit;outline:none;padding:var(--spacing-xs) calc(var(--spacing-xs) / 2)}.search-input_hds-search-input__buttons__3PawT .search-input_hds-search-input__button__1-cj-:focus{outline:var(--outline-width) solid var(--color-focus-outline)}.search-input_hds-search-input__helper-text__25LCS{color:var(--helper-color-default);display:block;font-size:var(--fontsize-body-m);margin-top:var(--spacing-3-xs)}.SearchInput-module_button__z7NIp.SearchInput-module_hidden__OcXmJ,.SearchInput-module_input__Addns:not(:focus).SearchInput-module_hidden__OcXmJ{border:0;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.SearchInput-module_wrapper__114JK:focus-within{box-shadow:0 0 0 var(--focus-outline-width) var(--focus-outline-color)}.SearchInput-module_root__sMwrY{--border-width:2px;--divider-width:1px;--focus-outline-width:3px;--dropdown-height:var(--spacing-3-xl);--menu-item-height:calc(var(--dropdown-height) - var(--border-width) * 2);--icon-size:var(--spacing-m);--menu-z-index:10;--dropdown-background-default:var(--color-white);--dropdown-background-disabled:var(--color-black-10);--dropdown-border-color-default:var(--color-black-50);--dropdown-border-color-hover:var(--color-black-90);--dropdown-border-color-hover-invalid:var(--color-error-dark);--dropdown-border-color-focus:var(--color-black-90);--dropdown-border-color-invalid:var(--color-error);--dropdown-border-color-disabled:var(--color-black-10);--dropdown-color-default:var(--color-black-90);--dropdown-color-disabled:var(--color-black-40);--focus-outline-color:var(--color-coat-of-arms);--helper-color-invalid:var(--color-error);--menu-divider-color:var(--color-black-20);--menu-item-background-default:var(--color-white);--menu-item-background-hover:var(--color-bus);--menu-item-background-selected:var(--color-white);--menu-item-background-selected-hover:var(--color-bus);--menu-item-background-disabled:var(--color-white);--menu-item-color-default:var(--color-black-90);--menu-item-color-hover:var(--color-white);--menu-item-color-selected:var(--color-black-90);--menu-item-color-selected-hover:var(--color-white);--menu-item-color-disabled:var(--color-black-40);--menu-item-icon-color-selected:var(--color-white);--menu-item-icon-color-disabled:var(--color-black-40);--multiselect-checkbox-background-selected:var(--color-bus);--multiselect-checkbox-background-disabled:var(--color-black-10);--multiselect-checkbox-border-default:var(--color-black-50);--multiselect-checkbox-border-hover:var(--color-black-90);--multiselect-checkbox-border-disabled:var(--color-black-10);--multiselect-checkbox-color-default:transparent;--multiselect-checkbox-color-selected:var(--color-white);--multiselect-checkbox-color-selected-disabled:var(--color-white);--placeholder-color:var(--color-black-60);position:relative}.SearchInput-module_open__1zeft.SearchInput-module_root__sMwrY .SearchInput-module_angleIcon__1PdxN{transform:rotateX(180deg)}.SearchInput-module_open__1zeft.SearchInput-module_root__sMwrY .SearchInput-module_menu__2P8CO{display:block}.SearchInput-module_root__sMwrY input{font-family:inherit;margin:0;overflow:auto}.SearchInput-module_wrapper__114JK{background-color:var(--dropdown-background-default);border:var(--border-width) solid var(--dropdown-border-color-default);box-sizing:border-box;min-height:var(--dropdown-height);position:relative;width:100%}.SearchInput-module_wrapper__114JK:focus-within{border-color:var(--dropdown-border-color-focus)}.SearchInput-module_wrapper__114JK:hover{border-color:var(--dropdown-border-color-hover)}.SearchInput-module_wrapper__114JK:focus-within,.SearchInput-module_wrapper__114JK:hover{transition:border-color 85ms ease-out}.SearchInput-module_loadingSpinnerContainer__T6ZTc,.SearchInput-module_menu__2P8CO{border:solid var(--dropdown-border-color-focus);border-top-color:var(--menu-divider-color);border-width:var(--divider-width) var(--border-width) var(--border-width);bottom:0;display:none;left:0;list-style:none;margin:0;outline:none;overflow-y:auto;padding:0;position:absolute;transform:translate(calc(var(--border-width) * -1),100%);width:100%;z-index:var(--menu-z-index)}.SearchInput-module_menuItem__zIC_d{align-items:center;background-color:var(--menu-item-background-default);box-sizing:border-box;color:var(--menu-item-color-default);cursor:pointer;display:flex;font-size:var(--fontsize-body-l);justify-content:space-between;line-height:var(--lineheight-m);min-height:var(--menu-item-height);padding:var(--spacing-xs) var(--spacing-s)}.SearchInput-module_highlighted__3D7Hh.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-hover);color:var(--menu-item-color-hover)}.SearchInput-module_selected__30K7a.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-selected);color:var(--menu-item-color-selected)}.SearchInput-module_highlighted__3D7Hh.SearchInput-module_selected__30K7a.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-selected-hover);color:var(--menu-item-color-selected-hover)}.SearchInput-module_disabled__akdv5.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-disabled);color:var(--menu-item-color-disabled);cursor:not-allowed}.SearchInput-module_virtualized__xRfea.SearchInput-module_menuItem__zIC_d{left:0;position:absolute;top:0;width:100%}.SearchInput-module_root__sMwrY{--helper-color-default:var(--color-black-60)}.SearchInput-module_wrapper__114JK{align-items:center;display:flex}.SearchInput-module_button__z7NIp{color:var(--dropdown-color-default)}.SearchInput-module_button__z7NIp:focus{outline:var(--focus-outline-width) solid var(--focus-outline-color)}.SearchInput-module_searchIcon__l1_S4{color:var(--dropdown-color-default);display:flex}.SearchInput-module_input__Addns{align-self:stretch;appearance:none;background-color:var(--input-background-default);border:none;box-sizing:border-box;color:var(--input-color-default);font-size:var(--fontsize-body-l);height:var(--menu-item-height);outline:none;padding:0 calc(var(--spacing-l) + var(--icon-size)) 0 0;width:100%}.SearchInput-module_input__Addns:first-child{padding-left:var(--spacing-s)}.SearchInput-module_input__Addns.SearchInput-module_noToggle__2rf7Y{padding-right:var(--spacing-s)}.SearchInput-module_input__Addns::placeholder{color:var(--placeholder-color);line-height:normal}.SearchInput-module_input__Addns:disabled::placeholder{color:var(--dropdown-color-disabled)}.SearchInput-module_menuItem__zIC_d .SearchInput-module_highlighted__3D7Hh{font-weight:700}.SearchInput-module_menuItem__zIC_d .SearchInput-module_highlighted__3D7Hh mark{background:none;color:inherit;font-weight:400}.SearchInput-module_helperText__2AWSL{color:var(--helper-color-default);display:block;font-size:var(--fontsize-body-m);margin-top:var(--spacing-3-xs)}.SearchInput-module_loadingSpinnerContainer__T6ZTc{align-items:center;background-color:var(--menu-item-background-default);display:flex;flex-direction:column;padding:var(--spacing-m) 0;text-align:center}.SearchInput-module_loadingSpinner__3G_76{margin-bottom:var(--spacing-2-xs)}");var yt=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return n}(Object(l.a)(Error)),wt=function(e){var t=e.className,n=e.clearButtonAriaLabel,o=void 0===n?"Clear":n,i=e.getSuggestions,a=e.helperText,l=e.highlightSuggestions,c=void 0!==l&&l,d=e.label,f=e.loadingSpinnerFinishedText,h=void 0===f?"Finished loading suggestions":f,p=e.loadingSpinnerText,b=void 0===p?"Loading suggestions":p,m=e.onSubmit,g=e.placeholder,_=e.searchButtonAriaLabel,y=void 0===_?"Search":_,w=e.hideSearchButton,k=void 0!==w&&w,x=e.style,M=e.suggestionKeyField,E=e.suggestionLabelField,S=e.visibleSuggestions,O=void 0===S?8:S,L=e.onChange,C=e.value,j=Object(s.useRef)(!1),N=Object(s.useRef)(null),I="userEnterKeyAction",T=Object(s.useState)(void 0),A=Object(r.a)(T,2),R=A[0],z=A[1],B=Object(s.useState)(""),P=Object(r.a)(B,2),D=P[0],H=P[1],U=C||D,F=function(){return R===ct.stateChangeTypes.InputKeyDownEnter},W=function(e,t,n){var o=Object(s.useRef)(n),i=Object(s.useState)(!1),a=Object(r.a)(i,2),l=a[0],u=a[1],c=Object(s.useRef)((function(){return null})),d=Object(s.useState)([]),f=Object(r.a)(d,2),h=f[0],p=f[1],b=Object(s.useCallback)((function(){p([]),u(!1),c.current()}),[p,c]);return Object(s.useEffect)((function(){return function(){c.current()}}),[c]),Object(s.useEffect)((function(){o.current=n}),[n]),function(e,t,n){var r=Object(s.useCallback)(e,n);Object(s.useEffect)((function(){var e=setTimeout((function(){r()}),200);return function(){clearTimeout(e)}}),[r,200])}((function(){if("function"==typeof t&&!0!==o.current){if(u(!0),c.current(),0===e.length)return u(!1),void p([]);var n=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){if(t)throw new yt;n(e)})).catch((function(e){e instanceof yt||r(e)}))})),cancel:function(){t=!0}}}(t(e)),r=n.promise,i=n.cancel;c.current=i,r.then((function(e){u(!1),Array.isArray(e)&&"function"==typeof p&&!1===o.current&&p(e)}))}}),0,[e,t,p]),{suggestions:h,isLoading:!o.current&&l,clearSuggestions:b}}(U,i,R===ct.stateChangeTypes.ItemClick||R===I||F()),V=W.suggestions,q=W.isLoading,K=W.clearSuggestions,Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=Object(s.useState)(!1),o=Object(r.a)(n,2),i=o[0],a=o[1],l=Object(s.useRef)(null);return Object(s.useEffect)((function(){return clearTimeout(l.current),e?l.current=setTimeout((function(){a(!0)}),t):a(!1),function(){clearTimeout(l.current)}}),[e,t,a]),i}(q,1300),Z=void 0!==C&&L,X=function(e){Z?L(e):H(e)},G=function(e){var t,n=null===(t=N.current)||void 0===t?void 0:t.value;m(void 0!==e?e:n),K()},Q=ct(Object.assign({items:V,onStateChange:function(e){var t,n=ct.stateChangeTypes,r=n.ItemClick,o=n.FunctionReset;if([r,o,n.InputKeyDownEnter].includes(e.type)){var i=e.type===r&&void 0===e.inputValue,a=i?null===(t=N.current)||void 0===t?void 0:t.value:e.inputValue;if(void 0===a)return;i||X(a),e.type!==o&&G(a),z(e.type)}else z(void 0)},itemToString:function(e){return e?"".concat(e[E]):""}},Z&&{inputValue:U})),J=Q.isOpen,$=Q.getLabelProps,ee=Q.getMenuProps,te=Q.getInputProps,ne=Q.getComboboxProps,re=Q.highlightedIndex,oe=Q.getItemProps,ie=Q.reset;return Object(s.useEffect)((function(){j.current?L&&void 0===C&&L(U):j.current=!0}),[L,U]),u.a.createElement("div",{className:Object(v.a)(_t.root,J&&_t.open,t),style:x},d&&u.a.createElement(pt.a,Object.assign({label:d},$())),u.a.createElement("div",{className:Object(v.a)(_t.wrapper),ref:ne().ref},u.a.createElement("input",Object.assign({},te({onKeyUp:function(e){var t=e.key||e.keyCode,n="Enter"===t||13===t;!F()&&n&&G(),z(n?I:void 0)},onKeyDown:function(e){J&&V.length||"Home"!==e.key&&"End"!==e.key||(e.nativeEvent.preventDownshiftDefault=!0)},onChange:function(e){X(e.target.value)},ref:N,role:ne().role,"aria-expanded":ne()["aria-expanded"],"aria-haspopup":ne()["aria-haspopup"],"aria-owns":ne()["aria-owns"]}),{className:Object(v.a)(_t.input),placeholder:g,enterKeyHint:"search"})),u.a.createElement("div",{className:_t.buttons},U.length>0&&u.a.createElement("button",{type:"button","aria-label":o,className:Object(v.a)(_t.button),onClick:function(){ie(),N.current.focus(),K()}},u.a.createElement(mt,{className:_t.searchIcon,"aria-hidden":!0})),!k&&u.a.createElement("button",{type:"button","aria-label":y,className:Object(v.a)(_t.button),onClick:function(){return G()}},u.a.createElement(vt.a,{className:_t.searchIcon,"aria-hidden":!0}))),Y&&u.a.createElement("div",{className:_t.loadingSpinnerContainer,"aria-hidden":!0},u.a.createElement(gt.a,{loadingText:b,loadingFinishedText:h,small:!0,className:_t.loadingSpinner}),b),u.a.createElement(ft,{isOptionDisabled:function(){return!1},multiselect:!1,open:J&&!Y,selectedItem:null,selectedItems:[],highlightValue:c&&U.length>=3&&U,menuStyles:_t,options:V,optionKeyField:"".concat(String(M||E)),optionLabelField:"".concat(String(E)),menuProps:ee({style:{maxHeight:52*O}}),getItemProps:function(e,t,n,r){return oe({item:e,index:t,disabled:r,className:Object(v.a)(_t.menuItem,n&&_t.selected,re===t&&_t.highlighted)})}})),a&&u.a.createElement("div",{className:_t.helperText},a))}},,,,function(e,t,n){"use strict";n(91);var r=n(0),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},function(e,t,n){"use strict";var r=n(91),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,l=60110,s=60112;t.Suspense=60113;var u=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;o=d("react.element"),i=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),l=d("react.context"),s=d("react.forward_ref"),t.Suspense=d("react.suspense"),u=d("react.memo"),c=d("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
;\n }\n);\n\nif (__DEV__) {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n\n/**\n * The public API for rendering a history-aware .\n */\nconst Link = forwardRef(\n (\n {\n component = LinkAnchor,\n replace,\n to,\n innerRef, // TODO: deprecate\n ...rest\n },\n forwardedRef\n ) => {\n return (\n \n {context => {\n invariant(context, \"You should not use outside a \");\n\n const { history } = context;\n\n const location = normalizeToLocation(\n resolveToLocation(to, context.location),\n context.location\n );\n\n const href = location ? history.createHref(location) : \"\";\n const props = {\n ...rest,\n href,\n navigate() {\n const location = resolveToLocation(to, context.location);\n const isDuplicateNavigation = createPath(context.location) === createPath(normalizeToLocation(location));\n const method = (replace || isDuplicateNavigation) ? history.replace : history.push;\n\n method(location);\n }\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(component, props);\n }}\n \n );\n }\n);\n\nif (__DEV__) {\n const toType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object,\n PropTypes.func\n ]);\n const refType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.any })\n ]);\n\n Link.displayName = \"Link\";\n\n Link.propTypes = {\n innerRef: refType,\n onClick: PropTypes.func,\n replace: PropTypes.bool,\n target: PropTypes.string,\n to: toType.isRequired\n };\n}\n\nexport default Link;\n","import React from \"react\";\nimport { __RouterContext as RouterContext, matchPath } from \"react-router\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport Link from \"./Link.js\";\nimport {\n resolveToLocation,\n normalizeToLocation\n} from \"./utils/locationUtils.js\";\n\n// React 15 compat\nconst forwardRefShim = C => C;\nlet { forwardRef } = React;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction joinClassnames(...classnames) {\n return classnames.filter(i => i).join(\" \");\n}\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nconst NavLink = forwardRef(\n (\n {\n \"aria-current\": ariaCurrent = \"page\",\n activeClassName = \"active\", // TODO: deprecate\n activeStyle, // TODO: deprecate\n className: classNameProp,\n exact,\n isActive: isActiveProp,\n location: locationProp,\n sensitive,\n strict,\n style: styleProp,\n to,\n innerRef, // TODO: deprecate\n ...rest\n },\n forwardedRef\n ) => {\n return (\n \n {context => {\n invariant(context, \"You should not use outside a \");\n\n const currentLocation = locationProp || context.location;\n const toLocation = normalizeToLocation(\n resolveToLocation(to, currentLocation),\n currentLocation\n );\n const { pathname: path } = toLocation;\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n const escapedPath =\n path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n const match = escapedPath\n ? matchPath(currentLocation.pathname, {\n path: escapedPath,\n exact,\n sensitive,\n strict\n })\n : null;\n const isActive = !!(isActiveProp\n ? isActiveProp(match, currentLocation)\n : match);\n\n let className =\n typeof classNameProp === \"function\"\n ? classNameProp(isActive)\n : classNameProp;\n\n let style =\n typeof styleProp === \"function\" ? styleProp(isActive) : styleProp;\n\n if (isActive) {\n className = joinClassnames(className, activeClassName);\n style = { ...style, ...activeStyle };\n }\n\n const props = {\n \"aria-current\": (isActive && ariaCurrent) || null,\n className,\n style,\n to: toLocation,\n ...rest\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return ;\n }}\n \n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n\n const ariaCurrentType = PropTypes.oneOf([\n \"page\",\n \"step\",\n \"location\",\n \"date\",\n \"time\",\n \"true\",\n \"false\"\n ]);\n\n NavLink.propTypes = {\n ...Link.propTypes,\n \"aria-current\": ariaCurrentType,\n activeClassName: PropTypes.string,\n activeStyle: PropTypes.object,\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n exact: PropTypes.bool,\n isActive: PropTypes.func,\n location: PropTypes.object,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool,\n style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n };\n}\n\nexport default NavLink;\n","import defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import { defineHidden, is, createInterpolator, eachProp, hasFluidValue, getFluidValue, each, isAnimatedString, useForceUpdate, useLayoutEffect, addFluidObserver, removeFluidObserver, raf, useOnce } from '@react-spring/shared';\nimport * as React from 'react';\nimport { forwardRef, useRef, useCallback, useEffect } from 'react';\n\nconst $node = Symbol.for('Animated:node');\nconst isAnimated = value => !!value && value[$node] === value;\nconst getAnimated = owner => owner && owner[$node];\nconst setAnimated = (owner, node) => defineHidden(owner, $node, node);\nconst getPayload = owner => owner && owner[$node] && owner[$node].getPayload();\nclass Animated {\n constructor() {\n this.payload = void 0;\n setAnimated(this, this);\n }\n\n getPayload() {\n return this.payload || [];\n }\n\n}\n\nclass AnimatedValue extends Animated {\n constructor(_value) {\n super();\n this.done = true;\n this.elapsedTime = void 0;\n this.lastPosition = void 0;\n this.lastVelocity = void 0;\n this.v0 = void 0;\n this.durationProgress = 0;\n this._value = _value;\n\n if (is.num(this._value)) {\n this.lastPosition = this._value;\n }\n }\n\n static create(value) {\n return new AnimatedValue(value);\n }\n\n getPayload() {\n return [this];\n }\n\n getValue() {\n return this._value;\n }\n\n setValue(value, step) {\n if (is.num(value)) {\n this.lastPosition = value;\n\n if (step) {\n value = Math.round(value / step) * step;\n\n if (this.done) {\n this.lastPosition = value;\n }\n }\n }\n\n if (this._value === value) {\n return false;\n }\n\n this._value = value;\n return true;\n }\n\n reset() {\n const {\n done\n } = this;\n this.done = false;\n\n if (is.num(this._value)) {\n this.elapsedTime = 0;\n this.durationProgress = 0;\n this.lastPosition = this._value;\n if (done) this.lastVelocity = null;\n this.v0 = null;\n }\n }\n\n}\n\nclass AnimatedString extends AnimatedValue {\n constructor(value) {\n super(0);\n this._string = null;\n this._toString = void 0;\n this._toString = createInterpolator({\n output: [value, value]\n });\n }\n\n static create(value) {\n return new AnimatedString(value);\n }\n\n getValue() {\n let value = this._string;\n return value == null ? this._string = this._toString(this._value) : value;\n }\n\n setValue(value) {\n if (is.str(value)) {\n if (value == this._string) {\n return false;\n }\n\n this._string = value;\n this._value = 1;\n } else if (super.setValue(value)) {\n this._string = null;\n } else {\n return false;\n }\n\n return true;\n }\n\n reset(goal) {\n if (goal) {\n this._toString = createInterpolator({\n output: [this.getValue(), goal]\n });\n }\n\n this._value = 0;\n super.reset();\n }\n\n}\n\nconst TreeContext = {\n dependencies: null\n};\n\nclass AnimatedObject extends Animated {\n constructor(source) {\n super();\n this.source = source;\n this.setValue(source);\n }\n\n getValue(animated) {\n const values = {};\n eachProp(this.source, (source, key) => {\n if (isAnimated(source)) {\n values[key] = source.getValue(animated);\n } else if (hasFluidValue(source)) {\n values[key] = getFluidValue(source);\n } else if (!animated) {\n values[key] = source;\n }\n });\n return values;\n }\n\n setValue(source) {\n this.source = source;\n this.payload = this._makePayload(source);\n }\n\n reset() {\n if (this.payload) {\n each(this.payload, node => node.reset());\n }\n }\n\n _makePayload(source) {\n if (source) {\n const payload = new Set();\n eachProp(source, this._addToPayload, payload);\n return Array.from(payload);\n }\n }\n\n _addToPayload(source) {\n if (TreeContext.dependencies && hasFluidValue(source)) {\n TreeContext.dependencies.add(source);\n }\n\n const payload = getPayload(source);\n\n if (payload) {\n each(payload, node => this.add(node));\n }\n }\n\n}\n\nclass AnimatedArray extends AnimatedObject {\n constructor(source) {\n super(source);\n }\n\n static create(source) {\n return new AnimatedArray(source);\n }\n\n getValue() {\n return this.source.map(node => node.getValue());\n }\n\n setValue(source) {\n const payload = this.getPayload();\n\n if (source.length == payload.length) {\n return payload.map((node, i) => node.setValue(source[i])).some(Boolean);\n }\n\n super.setValue(source.map(makeAnimated));\n return true;\n }\n\n}\n\nfunction makeAnimated(value) {\n const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue;\n return nodeType.create(value);\n}\n\nfunction getAnimatedType(value) {\n const parentNode = getAnimated(value);\n return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nconst withAnimated = (Component, host) => {\n const hasInstance = !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent;\n return forwardRef((givenProps, givenRef) => {\n const instanceRef = useRef(null);\n const ref = hasInstance && useCallback(value => {\n instanceRef.current = updateRef(givenRef, value);\n }, [givenRef]);\n const [props, deps] = getAnimatedState(givenProps, host);\n const forceUpdate = useForceUpdate();\n\n const callback = () => {\n const instance = instanceRef.current;\n\n if (hasInstance && !instance) {\n return;\n }\n\n const didUpdate = instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false;\n\n if (didUpdate === false) {\n forceUpdate();\n }\n };\n\n const observer = new PropsObserver(callback, deps);\n const observerRef = useRef();\n useLayoutEffect(() => {\n const lastObserver = observerRef.current;\n observerRef.current = observer;\n each(deps, dep => addFluidObserver(dep, observer));\n\n if (lastObserver) {\n each(lastObserver.deps, dep => removeFluidObserver(dep, lastObserver));\n raf.cancel(lastObserver.update);\n }\n });\n useEffect(callback, []);\n useOnce(() => () => {\n const observer = observerRef.current;\n each(observer.deps, dep => removeFluidObserver(dep, observer));\n });\n const usedProps = host.getComponentProps(props.getValue());\n return React.createElement(Component, _extends({}, usedProps, {\n ref: ref\n }));\n });\n};\n\nclass PropsObserver {\n constructor(update, deps) {\n this.update = update;\n this.deps = deps;\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n raf.write(this.update);\n }\n }\n\n}\n\nfunction getAnimatedState(props, host) {\n const dependencies = new Set();\n TreeContext.dependencies = dependencies;\n if (props.style) props = _extends({}, props, {\n style: host.createAnimatedStyle(props.style)\n });\n props = new AnimatedObject(props);\n TreeContext.dependencies = null;\n return [props, dependencies];\n}\n\nfunction updateRef(ref, value) {\n if (ref) {\n if (is.fun(ref)) ref(value);else ref.current = value;\n }\n\n return value;\n}\n\nconst cacheKey = Symbol.for('AnimatedComponent');\nconst createHost = (components, {\n applyAnimatedValues: _applyAnimatedValues = () => false,\n createAnimatedStyle: _createAnimatedStyle = style => new AnimatedObject(style),\n getComponentProps: _getComponentProps = props => props\n} = {}) => {\n const hostConfig = {\n applyAnimatedValues: _applyAnimatedValues,\n createAnimatedStyle: _createAnimatedStyle,\n getComponentProps: _getComponentProps\n };\n\n const animated = Component => {\n const displayName = getDisplayName(Component) || 'Anonymous';\n\n if (is.str(Component)) {\n Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig));\n } else {\n Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig));\n }\n\n Component.displayName = `Animated(${displayName})`;\n return Component;\n };\n\n eachProp(components, (Component, key) => {\n if (is.arr(components)) {\n key = getDisplayName(Component);\n }\n\n animated[key] = animated(Component);\n });\n return {\n animated\n };\n};\n\nconst getDisplayName = arg => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;\n\nexport { Animated, AnimatedArray, AnimatedObject, AnimatedString, AnimatedValue, createHost, getAnimated, getAnimatedType, getPayload, isAnimated, setAnimated };\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","// TODO: Replace with React.createContext once we can assume React 16+\nimport createContext from \"mini-create-react-context\";\n\nconst createNamedContext = name => {\n const context = createContext();\n context.displayName = name;\n\n return context;\n};\n\nexport default createNamedContext;\n","import createNamedContext from \"./createNamedContext\";\n\nconst historyContext = /*#__PURE__*/ createNamedContext(\"Router-History\");\nexport default historyContext;\n","import createNamedContext from \"./createNamedContext\";\n\nconst context = /*#__PURE__*/ createNamedContext(\"Router\");\nexport default context;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"tiny-warning\";\n\nimport HistoryContext from \"./HistoryContext.js\";\nimport RouterContext from \"./RouterContext.js\";\n\n/**\n * The public API for putting history on context.\n */\nclass Router extends React.Component {\n static computeRootMatch(pathname) {\n return { path: \"/\", url: \"/\", params: {}, isExact: pathname === \"/\" };\n }\n\n constructor(props) {\n super(props);\n\n this.state = {\n location: props.history.location\n };\n\n // This is a bit of a hack. We have to start listening for location\n // changes here in the constructor in case there are any s\n // on the initial render. If there are, they will replace/push when\n // they mount and since cDM fires in children before parents, we may\n // get a new location before the is mounted.\n this._isMounted = false;\n this._pendingLocation = null;\n\n if (!props.staticContext) {\n this.unlisten = props.history.listen(location => {\n this._pendingLocation = location;\n });\n }\n }\n\n componentDidMount() {\n this._isMounted = true;\n\n if (this.unlisten) {\n // Any pre-mount location changes have been captured at\n // this point, so unregister the listener.\n this.unlisten();\n }\n if (!this.props.staticContext) {\n this.unlisten = this.props.history.listen(location => {\n if (this._isMounted) {\n this.setState({ location });\n }\n });\n }\n if (this._pendingLocation) {\n this.setState({ location: this._pendingLocation });\n }\n }\n\n componentWillUnmount() {\n if (this.unlisten) {\n this.unlisten();\n this._isMounted = false;\n this._pendingLocation = null;\n }\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nif (__DEV__) {\n Router.propTypes = {\n children: PropTypes.node,\n history: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n };\n\n Router.prototype.componentDidUpdate = function(prevProps) {\n warning(\n prevProps.history === this.props.history,\n \"You cannot change \"\n );\n };\n}\n\nexport default Router;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport warning from \"tiny-warning\";\n\nimport Router from \"./Router.js\";\n\n/**\n * The public API for a that stores location in memory.\n */\nclass MemoryRouter extends React.Component {\n history = createHistory(this.props);\n\n render() {\n return ;\n }\n}\n\nif (__DEV__) {\n MemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n };\n\n MemoryRouter.prototype.componentDidMount = function() {\n warning(\n !this.props.history,\n \" ignores the history prop. To use a custom history, \" +\n \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\"\n );\n };\n}\n\nexport default MemoryRouter;\n","import React from \"react\";\n\nclass Lifecycle extends React.Component {\n componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n }\n\n componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n }\n\n componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n }\n\n render() {\n return null;\n }\n}\n\nexport default Lifecycle;\n","import pathToRegexp from \"path-to-regexp\";\n\nconst cache = {};\nconst cacheLimit = 10000;\nlet cacheCount = 0;\n\nfunction compilePath(path, options) {\n const cacheKey = `${options.end}${options.strict}${options.sensitive}`;\n const pathCache = cache[cacheKey] || (cache[cacheKey] = {});\n\n if (pathCache[path]) return pathCache[path];\n\n const keys = [];\n const regexp = pathToRegexp(path, keys, options);\n const result = { regexp, keys };\n\n if (cacheCount < cacheLimit) {\n pathCache[path] = result;\n cacheCount++;\n }\n\n return result;\n}\n\n/**\n * Public API for matching a URL pathname to a path.\n */\nfunction matchPath(pathname, options = {}) {\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = { path: options };\n }\n\n const { path, exact = false, strict = false, sensitive = false } = options;\n\n const paths = [].concat(path);\n\n return paths.reduce((matched, path) => {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n const { regexp, keys } = compilePath(path, {\n end: exact,\n strict,\n sensitive\n });\n const match = regexp.exec(pathname);\n\n if (!match) return null;\n\n const [url, ...values] = match;\n const isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path, // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact, // whether or not we matched exactly\n params: keys.reduce((memo, key, index) => {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}\n\nexport default matchPath;\n","import React from \"react\";\nimport { isValidElementType } from \"react-is\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport warning from \"tiny-warning\";\n\nimport RouterContext from \"./RouterContext.js\";\nimport matchPath from \"./matchPath.js\";\n\nfunction isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n}\n\nfunction evalChildrenDev(children, props, path) {\n const value = children(props);\n\n warning(\n value !== undefined,\n \"You returned `undefined` from the `children` function of \" +\n `, but you ` +\n \"should have returned a React element or `null`\"\n );\n\n return value || null;\n}\n\n/**\n * The public API for matching a single path and rendering.\n */\nclass Route extends React.Component {\n render() {\n return (\n \n {context => {\n invariant(context, \"You should not use outside a \");\n\n const location = this.props.location || context.location;\n const match = this.props.computedMatch\n ? this.props.computedMatch // already computed the match for us\n : this.props.path\n ? matchPath(location.pathname, this.props)\n : context.match;\n\n const props = { ...context, location, match };\n\n let { children, component, render } = this.props;\n\n // Preact uses an empty array as children by\n // default, so use null if that's the case.\n if (Array.isArray(children) && isEmptyChildren(children)) {\n children = null;\n }\n\n return (\n \n {props.match\n ? children\n ? typeof children === \"function\"\n ? __DEV__\n ? evalChildrenDev(children, props, this.props.path)\n : children(props)\n : children\n : component\n ? React.createElement(component, props)\n : render\n ? render(props)\n : null\n : typeof children === \"function\"\n ? __DEV__\n ? evalChildrenDev(children, props, this.props.path)\n : children(props)\n : null}\n \n );\n }}\n \n );\n }\n}\n\nif (__DEV__) {\n Route.propTypes = {\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n component: (props, propName) => {\n if (props[propName] && !isValidElementType(props[propName])) {\n return new Error(\n `Invalid prop 'component' supplied to 'Route': the prop is not a valid React component`\n );\n }\n },\n exact: PropTypes.bool,\n location: PropTypes.object,\n path: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n render: PropTypes.func,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool\n };\n\n Route.prototype.componentDidMount = function() {\n warning(\n !(\n this.props.children &&\n !isEmptyChildren(this.props.children) &&\n this.props.component\n ),\n \"You should not use and in the same route; will be ignored\"\n );\n\n warning(\n !(\n this.props.children &&\n !isEmptyChildren(this.props.children) &&\n this.props.render\n ),\n \"You should not use and in the same route; will be ignored\"\n );\n\n warning(\n !(this.props.component && this.props.render),\n \"You should not use and in the same route; will be ignored\"\n );\n };\n\n Route.prototype.componentDidUpdate = function(prevProps) {\n warning(\n !(this.props.location && !prevProps.location),\n ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.'\n );\n\n warning(\n !(!this.props.location && prevProps.location),\n ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.'\n );\n };\n}\n\nexport default Route;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport invariant from \"tiny-invariant\";\nimport warning from \"tiny-warning\";\n\nimport Router from \"./Router.js\";\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\n\nfunction addBasename(basename, location) {\n if (!basename) return location;\n\n return {\n ...location,\n pathname: addLeadingSlash(basename) + location.pathname\n };\n}\n\nfunction stripBasename(basename, location) {\n if (!basename) return location;\n\n const base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return {\n ...location,\n pathname: location.pathname.substr(base.length)\n };\n}\n\nfunction createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n}\n\nfunction staticHandler(methodName) {\n return () => {\n invariant(false, \"You cannot %s with \", methodName);\n };\n}\n\nfunction noop() {}\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\nclass StaticRouter extends React.Component {\n navigateTo(location, action) {\n const { basename = \"\", context = {} } = this.props;\n context.action = action;\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }\n\n handlePush = location => this.navigateTo(location, \"PUSH\");\n handleReplace = location => this.navigateTo(location, \"REPLACE\");\n handleListen = () => noop;\n handleBlock = () => noop;\n\n render() {\n const { basename = \"\", context = {}, location = \"/\", ...rest } = this.props;\n\n const history = {\n createHref: path => addLeadingSlash(basename + createURL(path)),\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return ;\n }\n}\n\nif (__DEV__) {\n StaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n };\n\n StaticRouter.prototype.componentDidMount = function() {\n warning(\n !this.props.history,\n \" ignores the history prop. To use a custom history, \" +\n \"use `import { Router }` instead of `import { StaticRouter as Router }`.\"\n );\n };\n}\n\nexport default StaticRouter;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport warning from \"tiny-warning\";\n\nimport RouterContext from \"./RouterContext.js\";\nimport matchPath from \"./matchPath.js\";\n\n/**\n * The public API for rendering the first that matches.\n */\nclass Switch extends React.Component {\n render() {\n return (\n \n {context => {\n invariant(context, \"You should not use outside a \");\n\n const location = this.props.location || context.location;\n\n let element, match;\n\n // We use React.Children.forEach instead of React.Children.toArray().find()\n // here because toArray adds keys to all child elements and we do not want\n // to trigger an unmount/remount for two s that render the same\n // component at different URLs.\n React.Children.forEach(this.props.children, child => {\n if (match == null && React.isValidElement(child)) {\n element = child;\n\n const path = child.props.path || child.props.from;\n\n match = path\n ? matchPath(location.pathname, { ...child.props, path })\n : context.match;\n }\n });\n\n return match\n ? React.cloneElement(element, { location, computedMatch: match })\n : null;\n }}\n \n );\n }\n}\n\nif (__DEV__) {\n Switch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n };\n\n Switch.prototype.componentDidUpdate = function(prevProps) {\n warning(\n !(this.props.location && !prevProps.location),\n ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.'\n );\n\n warning(\n !(!this.props.location && prevProps.location),\n ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.'\n );\n };\n}\n\nexport default Switch;\n","import React from \"react\";\nimport invariant from \"tiny-invariant\";\n\nimport RouterContext from \"./RouterContext.js\";\nimport HistoryContext from \"./HistoryContext.js\";\nimport matchPath from \"./matchPath.js\";\n\nconst useContext = React.useContext;\n\nexport function useHistory() {\n if (__DEV__) {\n invariant(\n typeof useContext === \"function\",\n \"You must use React >= 16.8 in order to use useHistory()\"\n );\n }\n\n return useContext(HistoryContext);\n}\n\nexport function useLocation() {\n if (__DEV__) {\n invariant(\n typeof useContext === \"function\",\n \"You must use React >= 16.8 in order to use useLocation()\"\n );\n }\n\n return useContext(RouterContext).location;\n}\n\nexport function useParams() {\n if (__DEV__) {\n invariant(\n typeof useContext === \"function\",\n \"You must use React >= 16.8 in order to use useParams()\"\n );\n }\n\n const match = useContext(RouterContext).match;\n return match ? match.params : {};\n}\n\nexport function useRouteMatch(path) {\n if (__DEV__) {\n invariant(\n typeof useContext === \"function\",\n \"You must use React >= 16.8 in order to use useRouteMatch()\"\n );\n }\n\n const location = useLocation();\n const match = useContext(RouterContext).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n","module.exports = require(\"regenerator-runtime\");\n","import r,{isValidElement as e}from\"react\";import{a as n}from\"./_commonjsHelpers-ad2a3cad.js\";var t=9007199254740991,o=\"[object Arguments]\",c=\"[object Function]\",a=\"[object GeneratorFunction]\",l=\"object\"==typeof n&&n&&n.Object===Object&&n,i=\"object\"==typeof self&&self&&self.Object===Object&&self,u=l||i||Function(\"return this\")();function s(r,e){for(var n=-1,t=e.length,o=r.length;++n0&&n(l)?e>1?j(l,e-1,n,t,o):s(o,l):t||(o[o.length]=l)}return o}function v(r){return h(r)||function(r){return function(r){return function(r){return!!r&&\"object\"==typeof r}(r)&&function(r){return null!=r&&function(r){return\"number\"==typeof r&&r>-1&&r%1==0&&r<=t}(r.length)&&!function(r){var e=function(r){var e=typeof r;return!!r&&(\"object\"==e||\"function\"==e)}(r)?b.call(r):\"\";return e==c||e==a}(r)}(r)}(r)&&p.call(r,\"callee\")&&(!y.call(r,\"callee\")||b.call(r)==o)}(r)||!!(m&&r&&r[m])}var h=Array.isArray;var g=function(r){return(r?r.length:0)?j(r,1):[]};const A=r=>void 0===r?[]:Array.isArray(r)?r:[r],O=(r,n)=>{const t=[...A(r)],o=t.findIndex((r=>{var t;return e(r)&&(null===(t=r.type)||void 0===t?void 0:t.componentName)===n}));return[o>=0?t.splice(o,1):[],t]},E=e=>{const n=[...A(e)],t=1===n.length&&r.isValidElement(n[0])&&Boolean(n[0].props.children)&&(r.isValidElement(n[0].props.children)||Array.isArray(n[0].props.children));return g(t&&r.isValidElement(n[0])?n[0].props.children:n)};export{A as a,E as b,O as g};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n Buffer = require('buffer').Buffer;\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n }\n\n if (base === 16) {\n this._parseHex(number, start);\n } else {\n this._parseBase(number, base, start);\n }\n\n if (number[0] === '-') {\n this.negative = 1;\n }\n\n this.strip();\n\n if (endian !== 'le') return;\n\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex (str, start, end) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r <<= 4;\n\n // 'a' - 'f'\n if (c >= 49 && c <= 54) {\n r |= c - 49 + 0xa;\n\n // 'A' - 'F'\n } else if (c >= 17 && c <= 22) {\n r |= c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r |= c & 0xf;\n }\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n // Scan 24-bit chunks and add them to the number\n var off = 0;\n for (i = number.length - 6, j = 0; i >= start; i -= 6) {\n w = parseHex(number, i, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n if (i + 6 !== start) {\n w = parseHex(number, start, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n }\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","import{useLayoutEffect as e,useEffect as t,useRef as n}from\"react\";import o from\"lodash.uniqueid\";const r=\"undefined\"!=typeof window&&window.document?e:t,s=(e,t)=>{const s=t&&\"string\"!=typeof t,d=n(s?o(\"custom-theme-\"):\"\").current;return r((()=>{s&&((e,t,n)=>{if(\"undefined\"==typeof window)return;const o=t=>{var o;return null===(o=t.selectorText)||void 0===o?void 0:o.includes(`${e}.${n}`)};try{let r=[...document.styleSheets].findIndex((t=>{try{return[...t.cssRules].findIndex((t=>{var n;return null===(n=t.selectorText)||void 0===n?void 0:n.includes(e)}))>=0}catch(e){return!1}}));if(-1===r){const e=document.createElement(\"style\");document.head.appendChild(e),r=document.styleSheets.length-1}const s=document.styleSheets[r],d=s.cssRules;let c=[...d].findIndex(o);-1===c&&(s.insertRule(`.${e}.${n} { content: '' }`,d.length),c=[...d].findIndex(o));const l=d[c];Object.entries(t).forEach((e=>{let[t,n]=e;return l.style.setProperty(t,n)}))}catch(t){console.warn(`Could not find the stylesheet to update with the \"${e}\" selector!`)}})(e&&e.split(\" \")[0],t,d)}),[e,t,d,s]),d};export{r as a,s as u};\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import setPrototypeOf from \"@babel/runtime/helpers/esm/setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return possibleConstructorReturn(this, result);\n };\n}","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"cross\",ariaLabelledby:o,ariaHidden:i=!0,className:s=\"\",color:t,size:L=\"s\",style:c={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[L],s].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:t,style:c},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M18 7.5L13.5 12L18 16.5L16.5 18L12 13.5L7.5 18L6 16.5L10.5 12L6 7.5L7.5 6L12 10.5L16.5 6L18 7.5Z\",fill:\"currentColor\"}))};export{a as I};\n","import t from\"react\";import{s as e}from\"./style-inject.es-acdf7ad9.js\";import{c as i}from\"./classNames-3b02355b.js\";import{F as o}from\"./FieldLabel-0e3fe396.js\";var n={root:\"TextInput-module_root__2CMNr text-input_hds-text-input__2LODq\",inputWrapper:\"TextInput-module_inputWrapper__3Rvel text-input_hds-text-input__input-wrapper__1OqYG\",input:\"TextInput-module_input__1BlHi text-input_hds-text-input__input__GJm5C\",hasButton:\"TextInput-module_hasButton__2KCM1\",errorText:\"TextInput-module_errorText__3pizm text-input_hds-text-input__error-text__1GLYk\",helperText:\"TextInput-module_helperText__2dLR6 text-input_hds-text-input__helper-text__3V2KM\",invalidText:\"TextInput-module_invalidText__1w4sm text-input_hds-text-input__helper-text__3V2KM\",successText:\"TextInput-module_successText__2NMCP text-input_hds-text-input__success-text__3EOiy\",infoText:\"TextInput-module_infoText__zHOGs text-input_hds-text-input__info-text__3bqzy\",invalid:\"TextInput-module_invalid__2iYo2 text-input_hds-text-input--invalid__1UfKC\",success:\"TextInput-module_success__1kDOm text-input_hds-text-input--success__3dm2J\",readOnly:\"TextInput-module_readOnly__j615N undefined\",buttonWrapper:\"TextInput-module_buttonWrapper___filA text-input_hds-text-input__buttons__1RMzT\",button:\"TextInput-module_button__1ySMX text-input_hds-text-input__button__1Fh0I\"};e(\"@keyframes text-input_fadeIn__2IDZ8{0%{opacity:0}to{opacity:1}}.text-input_hds-text-input__2LODq{--border-width:2px;--outline-width:3px;--input-height:56px;--textarea-height:149px;--icon-size:var(--spacing-m);--helper-color-default:var(--color-black-60);--helper-color-invalid:var(--color-error);--helper-color-success:var(--color-success);--helper-color-info:var(--color-black-90);--helper-color-info-icon:var(--color-coat-of-arms);--icon-color-invalid:var(--color-error);--input-background-default:var(--color-white);--input-background-disabled:var(--color-black-10);--input-border-color-default:var(--color-black-50);--input-border-color-hover:var(--color-black-90);--input-border-color-focus:var(--color-black-90);--input-border-color-invalid:var(--color-error);--input-border-color-disabled:var(--color-black-10);--input-border-color-success:var(--color-success);--input-color-default:var(--color-black-90);--input-color-disabled:var(--color-black-40);--label-color-default:var(--color-black-90);--label-color-invalid:var(--color-black-90);--placeholder-color:var(--color-black-60)}.text-input_hds-text-input__2LODq .text-input_hds-text-input__input__GJm5C{-webkit-appearance:none;background-color:var(--input-background-default);border:var(--border-width) solid var(--input-border-color-default);border-radius:0;box-sizing:border-box;color:var(--input-color-default);font-family:inherit;font-size:1.125em;height:var(--input-height);line-height:normal;margin:0;padding:0 var(--spacing-s);width:100%;will-change:transform,box-shadow}.text-input_hds-text-input__2LODq .text-input_hds-text-input__input__GJm5C:hover{border-color:var(--input-border-color-hover);transition:border-color 85ms ease-out}.text-input_hds-text-input__input-wrapper__1OqYG:focus-within .text-input_hds-text-input__input__GJm5C{border-color:var(--input-border-color-focus);outline:none}.text-input_hds-text-input__2LODq.text-input_hds-text-input--invalid__1UfKC .text-input_hds-text-input__input__GJm5C{border-color:var(--input-border-color-invalid)}.text-input_hds-text-input__2LODq.text-input_hds-text-input--success__3dm2J .text-input_hds-text-input__input__GJm5C{border-color:var(--input-border-color-success)}.text-input_hds-text-input__input-wrapper__1OqYG:focus-within .text-input_hds-text-input__input__GJm5C:not([readonly]){box-shadow:0 0 0 var(--outline-width) var(--color-focus-outline);transform:translateZ(0);transition:85ms ease-out;transition-property:box-shadow,transform}.text-input_hds-text-input__label__15F2V{color:var(--label-color-default);display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.text-input_hds-text-input--invalid__1UfKC .text-input_hds-text-input__label__15F2V{color:var(--label-color-invalid);transition:color 85ms linear}.text-input_hds-text-input__required__z3Hm0{color:var(--color-black-90);display:inline-block;font-size:var(--fontsize-body-xl);line-height:1;margin-left:var(--spacing-2-xs);transform:translateY(var(--spacing-3-xs))}.text-input_hds-text-input__input-wrapper__1OqYG{display:flex;position:relative}.text-input_hds-text-input__2LODq textarea.text-input_hds-text-input__input__GJm5C{font-family:inherit;height:var(--textarea-height);margin:0;min-height:var(--input-height);overflow:auto;padding:var(--spacing-s);resize:vertical}.text-input_hds-text-input__2LODq .text-input_hds-text-input__input__GJm5C::-moz-placeholder{color:var(--placeholder-color);opacity:1}.text-input_hds-text-input__2LODq .text-input_hds-text-input__input__GJm5C::placeholder{color:var(--placeholder-color);opacity:1}.text-input_hds-text-input__helper-text__3V2KM{color:var(--helper-color-default)}.text-input_hds-text-input__error-text__1GLYk,.text-input_hds-text-input__helper-text__3V2KM{display:block;font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-top:var(--spacing-3-xs);white-space:pre-line}.text-input_hds-text-input__error-text__1GLYk{color:var(--helper-color-invalid);padding-left:calc(var(--icon-size) + var(--spacing-2-xs));position:relative}.text-input_hds-text-input__error-text__1GLYk:not(:last-child){margin-bottom:var(--spacing-2-xs)}.text-input_hds-text-input__error-text__1GLYk:before{animation:text-input_fadeIn__2IDZ8 85ms ease-out;background:var(--icon-color-invalid);content:\\\"\\\";height:var(--icon-size);left:0;-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");pointer-events:none;position:absolute;top:0;width:var(--icon-size)}.text-input_hds-text-input__success-text__3EOiy{color:var(--helper-color-success);display:block;font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-top:var(--spacing-3-xs);padding-left:calc(var(--icon-size) + var(--spacing-2-xs));position:relative;white-space:pre-wrap}.text-input_hds-text-input__success-text__3EOiy:not(:last-child){margin-bottom:var(--spacing-2-xs)}.text-input_hds-text-input__success-text__3EOiy:before{animation:text-input_fadeIn__2IDZ8 85ms ease-out;background:var(--helper-color-success);content:\\\"\\\";height:var(--icon-size);left:0;-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 100 18 9 9 0 000-18zm4.5 5L18 9.5 10.5 17 6 12.5 7.5 11l3 3 6-6z'/%3E%3C/g%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 100 18 9 9 0 000-18zm4.5 5L18 9.5 10.5 17 6 12.5 7.5 11l3 3 6-6z'/%3E%3C/g%3E%3C/svg%3E\\\");pointer-events:none;position:absolute;top:0;width:var(--icon-size)}.text-input_hds-text-input__info-text__3bqzy{color:var(--helper-color-info);display:block;font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-top:var(--spacing-3-xs);padding-left:calc(var(--icon-size) + var(--spacing-2-xs));position:relative}.text-input_hds-text-input__info-text__3bqzy:not(:last-child){margin-bottom:var(--spacing-2-xs)}.text-input_hds-text-input__info-text__3bqzy:before{animation:text-input_fadeIn__2IDZ8 85ms ease-out;background:var(--helper-color-info-icon);content:\\\"\\\";height:var(--icon-size);left:0;-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");pointer-events:none;position:absolute;top:0;width:var(--icon-size)}.text-input_hds-text-input__2LODq .text-input_hds-text-input__input__GJm5C[disabled]{background-color:var(--input-background-disabled);border-color:var(--input-border-color-disabled);color:var(--input-color-disabled);cursor:not-allowed}.text-input_hds-text-input__2LODq .text-input_hds-text-input__input__GJm5C[readonly]{background-color:transparent;border:0;color:var(--input-color-default);padding:0;-webkit-text-fill-color:var(--input-color-default)}.text-input_hds-text-input__buttons__1RMzT{align-items:center;bottom:0;display:flex;font-size:1rem;justify-content:center;margin-right:calc(var(--spacing-s) - var(--spacing-xs) / 2);position:absolute;right:0;top:0}.text-input_hds-text-input__button__1Fh0I{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:flex;font:inherit;outline:none;padding:var(--spacing-xs) calc(var(--spacing-xs) / 2)}.text-input_hds-text-input__button__1Fh0I:focus{outline:var(--outline-width) solid var(--color-focus-outline)}.TextInput-module_root__2CMNr{position:relative}.TextInput-module_input__1BlHi.TextInput-module_hasButton__2KCM1{padding-right:calc(2 * var(--spacing-s) + 1.5rem)}.TextInput-module_button__1ySMX:disabled{cursor:not-allowed}.TextInput-module_button__1ySMX:focus{outline:var(--outline-width) solid var(--focus-outline-color)}\");const r=e=>{let{children:r,className:a=\"\",errorText:l,helperText:s,hideLabel:p=!1,id:u,invalid:_=!1,isAriaLabelledBy:d=!1,label:c,labelId:x,onBlur:h,required:v=!1,style:m,successText:g,infoText:b,tooltipLabel:f,tooltipText:w,tooltipButtonLabel:C}=e;return t.createElement(\"div\",{onBlur:h,className:i(n.root,_&&n.invalid,g&&n.success,a),style:m},c&&t.createElement(o,{id:x,inputId:u,isAriaLabelledBy:d,hidden:p,label:c,required:v,tooltipLabel:f,tooltipButtonLabel:C,tooltipText:w}),t.createElement(\"div\",{className:i(n.inputWrapper)},r),l&&t.createElement(\"div\",{className:n.errorText,id:`${u}-error`},l),g&&t.createElement(\"div\",{className:n.successText,id:`${u}-success`},g),b&&t.createElement(\"div\",{className:n.infoText,id:`${u}-info`},b),s&&t.createElement(\"div\",{className:n.helperText,id:`${u}-helper`},s))};export{r as I,n as t};\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","import{_ as o}from\"./tslib.es6-357e9a40.js\";import t from\"react\";import\"./base-4b9fb6d0.js\";import{s as r}from\"./style-inject.es-acdf7ad9.js\";import{c as n}from\"./classNames-3b02355b.js\";import{L as a}from\"./LoadingSpinner-85e82987.js\";var e={button:\"Button-module_button__1msFE button_hds-button__2A0je\",label:\"Button-module_label__a4np1 button_hds-button__label__2EQa-\",fullWidth:\"Button-module_fullWidth__31eVK button_hds-button--fullwidth__1_hG9\",\"size-small\":\"Button-module_size-small__3lizH button_hds-button--small__2NFef\",icon:\"Button-module_icon__O-h7R button_hds-icon__17j8Z\",primary:\"Button-module_primary__2LfKB button_hds-button--primary__2NVvO\",secondary:\"Button-module_secondary__1nABp button_hds-button--secondary__1NOWS\",supplementary:\"Button-module_supplementary__3YKiS button_hds-button--supplementary__GcHcV\",isLoading:\"Button-module_isLoading__3PK75 button_hds-button--loading__2mLjh\",success:\"Button-module_success__CU9nK button_hds-button--success__9hpuD\",danger:\"Button-module_danger__2el15 button_hds-button--danger__dEREN\",\"theme-coat\":\"Button-module_theme-coat__2_3U7 button_hds-button--theme-coat__12cO0\",\"theme-black\":\"Button-module_theme-black__m8giY button_hds-button--theme-black__3K_k4\"};r('.button_hds-button__2A0je{--border-width:2px;--color:inherit;--min-size:44px;--outline-gutter:2px;--outline-width:3px;align-content:flex-start;align-items:center;-webkit-appearance:button;background-color:var(--background-color,transparent);border:var(--border-width) solid var(--border-color,transparent);border-radius:0;color:var(--color);cursor:pointer;display:inline-flex;font-family:inherit;font-size:100%;font-weight:500;justify-content:center;line-height:1.15;margin:0;min-height:var(--min-size);min-width:var(--min-size);padding:0 var(--spacing-2-xs);position:relative;text-transform:none;vertical-align:top}.button_hds-button__2A0je,.button_hds-button__2A0je *,.button_hds-button__2A0je:after,.button_hds-button__2A0je :after,.button_hds-button__2A0je:before,.button_hds-button__2A0je :before{box-sizing:border-box}.button_hds-button__2A0je[type=button],.button_hds-button__2A0je[type=reset],.button_hds-button__2A0je[type=submit]{-webkit-appearance:button}.button_hds-button__2A0je::-moz-focus-inner,.button_hds-button__2A0je[type=button]::-moz-focus-inner,.button_hds-button__2A0je[type=reset]::-moz-focus-inner,.button_hds-button__2A0je[type=submit]::-moz-focus-inner{border-style:none;padding:0}.button_hds-button__2A0je:-moz-focusring,.button_hds-button__2A0je[type=button]:-moz-focusring,.button_hds-button__2A0je[type=reset]:-moz-focusring,.button_hds-button__2A0je[type=submit]:-moz-focusring{outline:1px dotted ButtonText}.button_hds-button__2A0je.button_focus-visible__gEJLP,.button_hds-button__2A0je:focus-visible,.button_hds-button__2A0je:hover{transition-duration:85ms;transition-property:background-color,border-color,color;transition-timing-function:ease-out}.button_hds-button__2A0je:hover{background-color:var(--background-color-hover,transparent);color:var(--color-hover)}.button_hds-button__2A0je.button_focus-visible__gEJLP,.button_hds-button__2A0je:active,.button_hds-button__2A0je:focus-visible{background-color:var(--background-color-focus,transparent);color:var(--color-focus);outline:none}.button_hds-button__2A0je:not(:disabled){border-color:var(--border-color,transparent)}.button_hds-button__2A0je:disabled{background-color:var(--background-color-disabled,transparent);border-color:var(--border-color-disabled,transparent);color:var(--color-disabled);cursor:not-allowed}.button_hds-button__2A0je.button_focus-visible__gEJLP:hover,.button_hds-button__2A0je:active:hover,.button_hds-button__2A0je:focus-visible:hover{background-color:var(--background-color-hover-focus,transparent)}.button_hds-button__2A0je:not(:disabled):hover{border-color:var(--border-color-hover,transparent)}.button_hds-button__2A0je:not(:disabled).button_focus-visible__gEJLP,.button_hds-button__2A0je:not(:disabled):active,.button_hds-button__2A0je:not(:disabled):focus-visible{border-color:var(--border-color-focus,transparent)}.button_hds-button__2A0je:not(:disabled).button_focus-visible__gEJLP:hover,.button_hds-button__2A0je:not(:disabled):active:hover,.button_hds-button__2A0je:not(:disabled):focus-visible:hover{border-color:var(--border-color-hover-focus,transparent);color:var(--color-hover-focus)}.button_hds-button__2A0je:after{--size:100%;border:var(--outline-width) solid transparent;content:\"\";height:var(--size);position:absolute;width:var(--size)}.button_hds-button__2A0je.button_focus-visible__gEJLP:after,.button_hds-button__2A0je:active:after,.button_hds-button__2A0je:focus-visible:after{--size:calc(100% + calc(var(--outline-width) * 2 + var(--border-width) * 2 + var(--outline-gutter) * 2));border-color:var(--focus-outline-color)}.button_hds-button__label__2EQa-,input[type=submit].button_hds-button__2A0je{font-weight:inherit;line-height:1.25em;padding:var(--spacing-s)}input[type=submit].button_hds-button__2A0je{cursor:pointer;padding:var(--spacing-s) var(--spacing-l)}input[type=submit].button_hds-button__2A0je.button_focus-visible__gEJLP,input[type=submit].button_hds-button__2A0je:focus-visible{box-shadow:0 0 0 var(--outline-gutter) var(--submit-input-focus-gutter-color),0 0 0 calc(var(--outline-gutter) + var(--outline-width)) var(--focus-outline-color)}.button_hds-button__label__2EQa-:only-child{margin:0 var(--spacing-2-xs)}.button_hds-button--small__2NFef .button_hds-button__label__2EQa-,input[type=submit].button_hds-button--small__2NFef{line-height:var(--lineheight-s);padding:var(--spacing-2-xs) var(--spacing-xs)}.button_hds-button--supplementary__GcHcV .button_hds-button__label__2EQa-:first-child{padding-right:var(--spacing-2-xs)}.button_hds-button--small__2NFef .button_hds-button__label__2EQa-:only-child{margin:0 var(--spacing-xs)}.button_hds-button--supplementary__GcHcV .button_hds-icon__17j8Z+.button_hds-button__label__2EQa-:last-child{padding-left:var(--spacing-2-xs)}.button_hds-button--supplementary__GcHcV .button_hds-icon__17j8Z+.button_hds-button__label__2EQa-:not(:last-child){padding-left:var(--spacing-2-xs);padding-right:var(--spacing-2-xs)}.button_hds-button--small__2NFef{padding:0}input[type=submit].button_hds-button--small__2NFef{padding:var(--spacing-2-xs) var(--spacing-m)}.button_hds-button--small__2NFef .button_hds-button__label__2EQa-:not(:first-of-type):not(:last-of-type){padding:var(--spacing-2-xs) var(--spacing-2-xs)}.button_hds-button--fullwidth__1_hG9{width:100%}.button_hds-button__2A0je .button_hds-icon__17j8Z{height:var(--spacing-m);margin-left:var(--spacing-s);width:var(--spacing-m)}.button_hds-button__label__2EQa-~.button_hds-icon__17j8Z{margin:0 var(--spacing-s) 0 0}.button_hds-button--small__2NFef .button_hds-icon__17j8Z{margin-left:var(--spacing-2-xs)}.button_hds-button__2A0je .button_hds-button--small__2NFef .button_hds-button__label__2EQa-~.button_hds-icon__17j8Z{margin:0 var(--spacing-2-xs) 0 0}.button_hds-button__2A0je .button_hds-icon__17j8Z:first-of-type:not(:last-of-type){margin:0 0 0 var(--spacing-2-xs)}.button_hds-button__2A0je .button_hds-icon__17j8Z:last-of-type:not(:first-of-type){margin:0 var(--spacing-2-xs) 0 0}.button_hds-button--small__2NFef .button_hds-icon__17j8Z:first-child:not(:last-of-type){margin:0 0 0 var(--spacing-2-xs)}.button_hds-button--small__2NFef .button_hds-icon__17j8Z:last-child:not(:first-of-type){margin:0 var(--spacing-2-xs) 0 0}.button_hds-button--primary__2NVvO{--background-color:var(--color-bus);--background-color-hover:var(--color-bus-dark);--background-color-focus:var(--color-bus);--background-color-hover-focus:var(--color-bus-dark);--background-color-disabled:var(--color-black-20);--border-color:var(--color-bus);--border-color-hover:var(--color-bus-dark);--border-color-focus:var(--color-bus);--border-color-hover-focus:var(--color-bus-dark);--border-color-disabled:var(--color-black-20);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white);--color-disabled:var(--color-white)}.button_hds-button--primary__2NVvO,.button_hds-button--secondary__1NOWS{--focus-outline-color:var(--color-focus-outline);--submit-input-focus-gutter-color:var(--color-white)}.button_hds-button--secondary__1NOWS{--border-color:var(--color-bus);--border-color-hover:var(--color-bus-dark);--border-color-focus:var(--color-bus);--border-color-hover-focus:var(--color-bus-dark);--border-color-disabled:var(--color-black-50)}.button_hds-button--secondary__1NOWS,.button_hds-button--supplementary__GcHcV{--background-color:transparent;--background-color-hover:var(--color-bus-light);--background-color-focus:transparent;--background-color-hover-focus:var(--color-bus-light);--background-color-disabled:transparent;--color:var(--color-bus);--color-hover:var(--color-bus-dark);--color-focus:var(--color-bus);--color-hover-focus:var(--color-bus-dark);--color-disabled:var(--color-black-40)}.button_hds-button--supplementary__GcHcV{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline);--border-color-disabled:transparent;--focus-outline-color:transparent;--submit-input-focus-gutter-color:transparent}.button_hds-button--loading__2mLjh{--background-color:transparent;--background-color-hover:transparent;--background-color-focus:transparent;--background-color-hover-focus:transparent;--background-color-disabled:transparent;--border-color:transparent;--border-color-hover:transparent;--border-color-focus:transparent;--border-color-hover-focus:transparent;--border-color-disabled:transparent;--color:var(--color-black-90);--color-hover:var(--color-black-90);--color-focus:var(--color-black-90);--color-hover-focus:var(--color-black-90);--color-disabled:var(--color-black-90);cursor:wait}.button_hds-button--success__9hpuD{--background-color:var(--color-success);--background-color-hover:var(--color-success-dark);--background-color-focus:var(--color-success);--background-color-hover-focus:var(--color-success-dark);--border-color:var(--color-success);--border-color-hover:var(--color-success-dark);--border-color-focus:var(--color-success);--border-color-hover-focus:var(--color-success-dark)}.button_hds-button--danger__dEREN,.button_hds-button--success__9hpuD{--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white);--focus-outline-color:var(--color-focus-outline)}.button_hds-button--danger__dEREN{--background-color:var(--color-error);--background-color-hover:var(--color-error-dark);--background-color-focus:var(--color-error);--background-color-hover-focus:var(--color-error-dark);--border-color:var(--color-error);--border-color-hover:var(--color-error-dark);--border-color-focus:var(--color-error);--border-color-hover-focus:var(--color-error-dark)}.button_hds-button--primary__2NVvO.button_hds-button--theme-coat__12cO0{--background-color:var(--color-coat-of-arms);--background-color-hover:var(--color-coat-of-arms-dark);--background-color-focus:var(--color-coat-of-arms);--background-color-hover-focus:var(--color-coat-of-arms-dark);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white)}.button_hds-button--primary__2NVvO.button_hds-button--theme-coat__12cO0,.button_hds-button--secondary__1NOWS.button_hds-button--theme-coat__12cO0{--border-color:var(--color-coat-of-arms);--border-color-hover:var(--color-coat-of-arms-dark);--border-color-focus:var(--color-coat-of-arms);--border-color-hover-focus:var(--color-coat-of-arms-dark)}.button_hds-button--secondary__1NOWS.button_hds-button--theme-coat__12cO0,.button_hds-button--supplementary__GcHcV.button_hds-button--theme-coat__12cO0{--background-color:transparent;--background-color-hover:var(--color-coat-of-arms-light);--background-color-focus:transparent;--background-color-hover-focus:var(--color-coat-of-arms-light);--color:var(--color-coat-of-arms);--color-hover:var(--color-coat-of-arms);--color-focus:var(--color-coat-of-arms);--color-hover-focus:var(--color-coat-of-arms)}.button_hds-button--supplementary__GcHcV.button_hds-button--theme-coat__12cO0{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline)}.button_hds-button--primary__2NVvO.button_hds-button--theme-black__3K_k4{--background-color:var(--color-black);--background-color-hover:var(--color-black);--background-color-focus:var(--color-black);--background-color-hover-focus:var(--color-black);--color:var(--color-white);--color-hover:var(--color-white);--color-focus:var(--color-white);--color-hover-focus:var(--color-white)}.button_hds-button--primary__2NVvO.button_hds-button--theme-black__3K_k4,.button_hds-button--secondary__1NOWS.button_hds-button--theme-black__3K_k4{--border-color:var(--color-black);--border-color-hover:var(--color-black);--border-color-focus:var(--color-black);--border-color-hover-focus:var(--color-black)}.button_hds-button--secondary__1NOWS.button_hds-button--theme-black__3K_k4,.button_hds-button--supplementary__GcHcV.button_hds-button--theme-black__3K_k4{--background-color:transparent;--background-color-hover:var(--color-black-5);--background-color-focus:transparent;--background-color-hover-focus:var(--color-black-5);--color:var(--color-black);--color-hover:var(--color-black);--color-focus:var(--color-black);--color-hover-focus:var(--color-black)}.button_hds-button--supplementary__GcHcV.button_hds-button--theme-black__3K_k4{--border-color:transparent;--border-color-hover:transparent;--border-color-focus:var(--color-focus-outline);--border-color-hover-focus:var(--color-focus-outline)}.Button-module_icon__O-h7R svg{max-height:100%;max-width:100%}');const c=t.forwardRef(((r,c)=>{var{children:s,className:u,disabled:l=!1,fullWidth:b,size:_=\"default\",theme:d=\"default\",variant:i=\"primary\",iconLeft:h,iconRight:v,isLoading:f=!1,loadingText:p,onClick:m}=r,g=o(r,[\"children\",\"className\",\"disabled\",\"fullWidth\",\"size\",\"theme\",\"variant\",\"iconLeft\",\"iconRight\",\"isLoading\",\"loadingText\",\"onClick\"]);const k=h?t.createElement(\"div\",{className:e.icon,\"aria-hidden\":\"true\"},h):null,j=v?t.createElement(\"div\",{className:n(e.icon),\"aria-hidden\":\"true\"},v):null;return t.createElement(\"button\",Object.assign({ref:c,disabled:l,\"aria-disabled\":f||l||void 0,\"aria-label\":f?p:void 0,type:\"button\",className:n(e.button,e[i],e[`theme-${d}`],e[`size-${_}`],b?e.fullWidth:\"\",f?e.isLoading:\"\",u),onClick:f?o=>{o.preventDefault()}:m},g),f?t.createElement(a,{small:!0}):k,t.createElement(\"span\",{className:e.label},f?p:s),f?null:j)}));export{c as B};\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;\n","var e=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function n(e,n,o){return e(o={path:n,exports:{},require:function(e,n){return function(){throw new Error(\"Dynamic requires are not currently supported by @rollup/plugin-commonjs\")}(null==n&&o.path)}},o.exports),o.exports}export{e as a,n as c};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","var r=(r,e,o,s,$)=>[e&&`${r}-helper`,o&&`${r}-error`,s&&`${r}-success`,$&&`${r}-info`].filter((r=>r)).join(\" \");export{r as c};\n","import unsupportedIterableToArray from \"@babel/runtime/helpers/esm/unsupportedIterableToArray\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"angle-left\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:n=\"s\",style:c={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[n],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:c},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M10.5 12L15.5 17L14 18.5L7.5 12L14 5.5L15.5 7L10.5 12Z\",fill:\"currentColor\"}))};export{a as I};\n","var Buffer = require('safe-buffer').Buffer\nvar Transform = require('stream').Transform\nvar StringDecoder = require('string_decoder').StringDecoder\nvar inherits = require('inherits')\n\nfunction CipherBase (hashMode) {\n Transform.call(this)\n this.hashMode = typeof hashMode === 'string'\n if (this.hashMode) {\n this[hashMode] = this._finalOrDigest\n } else {\n this.final = this._finalOrDigest\n }\n if (this._final) {\n this.__final = this._final\n this._final = null\n }\n this._decoder = null\n this._encoding = null\n}\ninherits(CipherBase, Transform)\n\nCipherBase.prototype.update = function (data, inputEnc, outputEnc) {\n if (typeof data === 'string') {\n data = Buffer.from(data, inputEnc)\n }\n\n var outData = this._update(data)\n if (this.hashMode) return this\n\n if (outputEnc) {\n outData = this._toString(outData, outputEnc)\n }\n\n return outData\n}\n\nCipherBase.prototype.setAutoPadding = function () {}\nCipherBase.prototype.getAuthTag = function () {\n throw new Error('trying to get auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAuthTag = function () {\n throw new Error('trying to set auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAAD = function () {\n throw new Error('trying to set aad in unsupported state')\n}\n\nCipherBase.prototype._transform = function (data, _, next) {\n var err\n try {\n if (this.hashMode) {\n this._update(data)\n } else {\n this.push(this._update(data))\n }\n } catch (e) {\n err = e\n } finally {\n next(err)\n }\n}\nCipherBase.prototype._flush = function (done) {\n var err\n try {\n this.push(this.__final())\n } catch (e) {\n err = e\n }\n\n done(err)\n}\nCipherBase.prototype._finalOrDigest = function (outputEnc) {\n var outData = this.__final() || Buffer.alloc(0)\n if (outputEnc) {\n outData = this._toString(outData, outputEnc, true)\n }\n return outData\n}\n\nCipherBase.prototype._toString = function (value, enc, fin) {\n if (!this._decoder) {\n this._decoder = new StringDecoder(enc)\n this._encoding = enc\n }\n\n if (this._encoding !== enc) throw new Error('can\\'t switch encodings')\n\n var out = this._decoder.write(value)\n if (fin) {\n out += this._decoder.end()\n }\n\n return out\n}\n\nmodule.exports = CipherBase\n","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"angle-right\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:n=\"s\",style:c={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[n],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:c},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z\",fill:\"currentColor\"}))};export{a as I};\n","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"angle-down\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:n=\"s\",style:d={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[n],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:d},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M12 13.5L17 8.5L18.5 10L12 16.5L5.5 10L7 8.5L12 13.5Z\",fill:\"currentColor\"}))};export{a as I};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function eventListener() {\n if (errorListener !== undefined) {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n var errorListener;\n\n // Adding an error listener is not optional because\n // if an error is thrown on an event emitter we cannot\n // guarantee that the actual event we are waiting will\n // be fired. The result could be a silent way to create\n // memory or file descriptor leaks, which is something\n // we should avoid.\n if (name !== 'error') {\n errorListener = function errorListener(err) {\n emitter.removeListener(name, eventListener);\n reject(err);\n };\n\n emitter.once('error', errorListener);\n }\n\n emitter.once(name, eventListener);\n });\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n pna.nextTick(cb, err);\n};","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","'use strict'\n\n// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nvar MAX_BYTES = 65536\n\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nvar MAX_UINT32 = 4294967295\n\nfunction oldBrowser () {\n throw new Error('Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11')\n}\n\nvar Buffer = require('safe-buffer').Buffer\nvar crypto = global.crypto || global.msCrypto\n\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes\n} else {\n module.exports = oldBrowser\n}\n\nfunction randomBytes (size, cb) {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')\n\n var bytes = Buffer.allocUnsafe(size)\n\n if (size > 0) { // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (var generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))\n }\n } else {\n crypto.getRandomValues(bytes)\n }\n }\n\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes)\n })\n }\n\n return bytes\n}\n","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n'use strict';\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n\n for (var key in obj) {\n keys.push(key);\n }\n\n return keys;\n};\n/**/\n\n\nmodule.exports = Duplex;\n\nvar Readable = require('./_stream_readable');\n\nvar Writable = require('./_stream_writable');\n\nrequire('inherits')(Duplex, Readable);\n\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n'use strict';\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n\n for (var key in obj) {\n keys.push(key);\n }\n\n return keys;\n};\n/**/\n\n\nmodule.exports = Duplex;\n\nvar Readable = require('./_stream_readable');\n\nvar Writable = require('./_stream_writable');\n\nrequire('inherits')(Duplex, Readable);\n\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import r from\"lodash.isfunction\";var t=(t,n)=>{r(t)?t(n.current):t.current=n.current};export{t as m};\n","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"question-circle\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:C=\"s\",style:c={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[C],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:c},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM13 16V18H11V16H13ZM12.0437 5.75C14.0343 5.75 15.7173 7.29464 15.7173 9.42361C15.7173 10.7806 15.2461 11.489 14.161 12.306L13.9187 12.4844C13.1753 13.0295 12.9556 13.3359 12.9386 14.142L12.9375 14.25H10.9375C10.9375 12.6746 11.4591 11.8378 12.6143 10.9622L12.8618 10.7796C13.5685 10.2628 13.7173 10.0539 13.7173 9.42361C13.7173 8.43934 12.9662 7.75 12.0437 7.75C11.1907 7.75 10.4785 8.34077 10.3816 9.20835L10.3734 9.30587L8.37663 9.19182C8.49191 7.17347 10.1344 5.75 12.0437 5.75Z\",fill:\"currentColor\"}))};export{a as I};\n","import o,{useState as t,useRef as e,useEffect as r}from\"react\";import{usePopper as l}from\"react-popper\";import\"./base-4b9fb6d0.js\";import{s as a}from\"./style-inject.es-acdf7ad9.js\";import{I as i}from\"./IconQuestionCircle-b47bde50.js\";import{c as p}from\"./classNames-3b02355b.js\";var d=\"Tooltip-module_button__2x9m0\",s=\"Tooltip-module_root__1Yo9t\",n=\"Tooltip-module_tooltip__3x8S8\",c=\"Tooltip-module_boxShadow__3IzE-\",m=\"Tooltip-module_small__29mxd\",u=\"Tooltip-module_arrow__210Rd\";a(\".Tooltip-module_button__2x9m0{background:none;border:none;color:inherit;cursor:pointer;font:inherit;padding:0}.Tooltip-module_root__1Yo9t{--button-focus-outline-width:3px;--button-focus-outline-color:var(--color-coat-of-arms);--tooltip-arrow-size:8px;--tooltip-background:var(--color-coat-of-arms-light);--tooltip-border-color:var(--color-coat-of-arms);--tooltip-spacing-default:var(--spacing-s);--tooltip-spacing-small:var(--spacing-3-xs) var(--spacing-2-xs)}.Tooltip-module_tooltip__3x8S8{background-color:var(--tooltip-background);font-size:var(--fontsize-body-s);font-weight:400;line-height:24px;max-width:21.875rem;padding:var(--tooltip-spacing-default);z-index:1000}.Tooltip-module_boxShadow__3IzE-{box-shadow:var(--box-shadow-s)}.Tooltip-module_small__29mxd{padding:var(--tooltip-spacing-small)}.Tooltip-module_button__2x9m0>span{display:flex}.Tooltip-module_button__2x9m0:focus{box-shadow:0 0 0 var(--button-focus-outline-width) var(--button-focus-outline-color);outline:none}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=bottom]{border-top:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=top]{border-bottom:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=left]{border-right:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=right]{border-left:8px solid var(--tooltip-border-color)}.Tooltip-module_tooltip__3x8S8 .Tooltip-module_arrow__210Rd{position:absolute}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=bottom] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-bottom:var(--tooltip-arrow-size) solid var(--tooltip-border-color);top:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=top] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-top:var(--tooltip-arrow-size) solid var(--tooltip-border-color);bottom:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=left] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-left:var(--tooltip-arrow-size) solid var(--tooltip-border-color);right:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}.Tooltip-module_tooltip__3x8S8[data-popper-placement^=right] .Tooltip-module_arrow__210Rd{border:var(--tooltip-arrow-size) solid transparent;border-right:var(--tooltip-arrow-size) solid var(--tooltip-border-color);left:calc(-1 * var(--tooltip-spacing-default) - var(--tooltip-arrow-size))}\");const _=a=>{let{boxShadow:_=!1,children:b,placement:v=\"auto\",small:f=!1,buttonLabel:x=\"Tooltip\",tooltipLabel:w=\"Tooltip\",className:T,buttonClassName:g,tooltipClassName:h}=a;const[z,E]=t(!1),S=e(null),k=e(null),[y,N]=t(null),{styles:j,attributes:L,forceUpdate:R}=l(S.current,k.current,{placement:v,modifiers:[{name:\"arrow\",options:{element:y}},{name:\"offset\",options:{offset:[0,10]}}]});r((()=>{null!==R&&!0===z&&R()}),[z,R]);return r((()=>{const o=o=>{const t=o.key||o.keyCode;!z||\"Escape\"!==t&&\"Esc\"!==t&&27!==t||E(!1)},t=o=>{const t=o.target;!z||S.current.contains(t)||k.current.contains(t)||E(!1)};return document.addEventListener(\"keyup\",o),document.addEventListener(\"click\",t),()=>{document.removeEventListener(\"keyup\",o),document.removeEventListener(\"click\",t)}})),o.createElement(\"div\",{className:p(s,T)},o.createElement(\"button\",{ref:S,type:\"button\",className:p(d,g),title:x,\"aria-label\":x,\"aria-expanded\":z,onClick:()=>{E(!z)}},o.createElement(\"span\",{\"aria-hidden\":\"true\"},o.createElement(i,null))),z&&o.createElement(\"section\",Object.assign({\"aria-label\":w,ref:k,className:p(n,f&&m,_&&c,h),style:j.popper},L.popper),b,o.createElement(\"div\",Object.assign({ref:N,className:u,style:j.arrow},L.arrow))))};export{_ as T};\n","import superPropBase from \"@babel/runtime/helpers/esm/superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","'use strict'\nvar inherits = require('inherits')\nvar MD5 = require('md5.js')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Base = require('cipher-base')\n\nfunction Hash (hash) {\n Base.call(this, 'digest')\n\n this._hash = hash\n}\n\ninherits(Hash, Base)\n\nHash.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHash.prototype._final = function () {\n return this._hash.digest()\n}\n\nmodule.exports = function createHash (alg) {\n alg = alg.toLowerCase()\n if (alg === 'md5') return new MD5()\n if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()\n\n return new Hash(sha(alg))\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","module.exports = function xor (a, b) {\n var length = Math.min(a.length, b.length)\n var buffer = new Buffer(length)\n\n for (var i = 0; i < length; ++i) {\n buffer[i] = a[i] ^ b[i]\n }\n\n return buffer\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nconst inherits = require('inherits');\nconst Reporter = require('../base/reporter').Reporter;\nconst Buffer = require('safer-buffer').Buffer;\n\nfunction DecoderBuffer(base, options) {\n Reporter.call(this, options);\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer');\n return;\n }\n\n this.base = base;\n this.offset = 0;\n this.length = base.length;\n}\ninherits(DecoderBuffer, Reporter);\nexports.DecoderBuffer = DecoderBuffer;\n\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {\n if (data instanceof DecoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n Buffer.isBuffer(data.base) &&\n data.constructor.name === 'DecoderBuffer' &&\n typeof data.offset === 'number' &&\n typeof data.length === 'number' &&\n typeof data.save === 'function' &&\n typeof data.restore === 'function' &&\n typeof data.isEmpty === 'function' &&\n typeof data.readUInt8 === 'function' &&\n typeof data.skip === 'function' &&\n typeof data.raw === 'function';\n\n return isCompatible;\n};\n\nDecoderBuffer.prototype.save = function save() {\n return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };\n};\n\nDecoderBuffer.prototype.restore = function restore(save) {\n // Return skipped data\n const res = new DecoderBuffer(this.base);\n res.offset = save.offset;\n res.length = this.offset;\n\n this.offset = save.offset;\n Reporter.prototype.restore.call(this, save.reporter);\n\n return res;\n};\n\nDecoderBuffer.prototype.isEmpty = function isEmpty() {\n return this.offset === this.length;\n};\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {\n if (this.offset + 1 <= this.length)\n return this.base.readUInt8(this.offset++, true);\n else\n return this.error(fail || 'DecoderBuffer overrun');\n};\n\nDecoderBuffer.prototype.skip = function skip(bytes, fail) {\n if (!(this.offset + bytes <= this.length))\n return this.error(fail || 'DecoderBuffer overrun');\n\n const res = new DecoderBuffer(this.base);\n\n // Share reporter state\n res._reporterState = this._reporterState;\n\n res.offset = this.offset;\n res.length = this.offset + bytes;\n this.offset += bytes;\n return res;\n};\n\nDecoderBuffer.prototype.raw = function raw(save) {\n return this.base.slice(save ? save.offset : this.offset, this.length);\n};\n\nfunction EncoderBuffer(value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0;\n this.value = value.map(function(item) {\n if (!EncoderBuffer.isEncoderBuffer(item))\n item = new EncoderBuffer(item, reporter);\n this.length += item.length;\n return item;\n }, this);\n } else if (typeof value === 'number') {\n if (!(0 <= value && value <= 0xff))\n return reporter.error('non-byte EncoderBuffer value');\n this.value = value;\n this.length = 1;\n } else if (typeof value === 'string') {\n this.value = value;\n this.length = Buffer.byteLength(value);\n } else if (Buffer.isBuffer(value)) {\n this.value = value;\n this.length = value.length;\n } else {\n return reporter.error('Unsupported type: ' + typeof value);\n }\n}\nexports.EncoderBuffer = EncoderBuffer;\n\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {\n if (data instanceof EncoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n data.constructor.name === 'EncoderBuffer' &&\n typeof data.length === 'number' &&\n typeof data.join === 'function';\n\n return isCompatible;\n};\n\nEncoderBuffer.prototype.join = function join(out, offset) {\n if (!out)\n out = Buffer.alloc(this.length);\n if (!offset)\n offset = 0;\n\n if (this.length === 0)\n return out;\n\n if (Array.isArray(this.value)) {\n this.value.forEach(function(item) {\n item.join(out, offset);\n offset += item.length;\n });\n } else {\n if (typeof this.value === 'number')\n out[offset] = this.value;\n else if (typeof this.value === 'string')\n out.write(this.value, offset);\n else if (Buffer.isBuffer(this.value))\n this.value.copy(out, offset);\n offset += this.length;\n }\n\n return out;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"check\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:c=\"s\",style:n={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[c],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:n},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M21 7L10 18L4.5 12.5L6 11L10 15L19.5 5.5L21 7Z\",fill:\"currentColor\"}))};export{a as I};\n","import e from\"react\";import{s as a}from\"./Icon.module-72af7a76.js\";const l=l=>{let{ariaLabel:r=\"search\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:c=\"s\",style:n={}}=l;return e.createElement(\"svg\",{className:[a.icon,a[c],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:n},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M15 1C19.4183 1 23 4.58172 23 9C23 13.4183 19.4183 17 15 17C13.2001 17 11.539 16.4056 10.2023 15.4023L3.80101 21.8021L2.21002 20.2111L8.60822 13.8117C7.59861 12.4726 7.00002 10.8062 7.00002 9C7.00002 4.58172 10.5817 1 15 1ZM15 3C11.6863 3 9.00002 5.68629 9.00002 9C9.00002 12.3137 11.6863 15 15 15C18.3137 15 21 12.3137 21 9C21 5.68629 18.3137 3 15 3Z\",fill:\"currentColor\"}))};export{l as I};\n","import{_ as L}from\"./tslib.es6-357e9a40.js\";import e from\"react\";import{s as l}from\"./style-inject.es-acdf7ad9.js\";import{c}from\"./classNames-3b02355b.js\";var t={logo:\"Logo-module_logo__Y2mwP\",small:\"Logo-module_small__1Ecbu\",medium:\"Logo-module_medium__1zyWm\",large:\"Logo-module_large__3Tjj3\"};l(\".Logo-module_logo__Y2mwP{height:100%;max-height:100%;max-width:100%}.Logo-module_small__1Ecbu{height:var(--spacing-l)}.Logo-module_medium__1zyWm{height:var(--spacing-xl)}.Logo-module_large__3Tjj3{height:var(--spacing-2-xl)}\");const m=L=>e.createElement(\"svg\",Object.assign({viewBox:\"0 0 78 36\",title:\"Helsingin kaupunki\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\"},L),e.createElement(\"path\",{d:\"M75.753 2.251v20.7c0 3.95-3.275 7.178-7.31 7.178h-22.26c-2.674 0-5.205.96-7.183 2.739a10.749 10.749 0 00-7.183-2.74H9.509c-4.003 0-7.247-3.21-7.247-7.177V2.25h73.491zM40.187 34.835a8.47 8.47 0 016.012-2.471h22.245c5.268 0 9.556-4.219 9.556-9.413V0H0v22.935c0 5.194 4.256 9.413 9.509 9.413h22.308c2.263 0 4.398.882 6.012 2.471L39.016 36l1.17-1.165z\",fill:\"currentColor\"}),e.createElement(\"path\",{d:\"M67.522 11.676c0 .681-.556 1.177-1.255 1.177-.7 0-1.255-.496-1.255-1.177 0-.682.556-1.178 1.255-1.178.7-.03 1.255.465 1.255 1.178zm-2.352 9.622h2.178v-7.546H65.17v7.546zm-3.909-4.556l2.845 4.556h-2.368l-1.907-3.022-1.033 1.271v1.75h-2.161V10.453h2.16v5.004c0 .93-.11 1.86-.11 1.86h.047s.509-.821.938-1.41l1.653-2.154h2.542l-2.606 2.99zm-6.817-.278c0-1.875-.938-2.898-2.432-2.898-1.271 0-1.939.728-2.32 1.426h-.048l.112-1.24h-2.162v7.546h2.162V16.82c0-.868.524-1.472 1.335-1.472.81 0 1.16.527 1.16 1.534v4.416h2.177l.016-4.834zm-8.931-4.788c0 .681-.557 1.177-1.256 1.177-.7 0-1.255-.496-1.255-1.177 0-.682.556-1.178 1.255-1.178.715-.03 1.256.465 1.256 1.178zm-2.352 9.622h2.177v-7.546H43.16v7.546zm-3.75-2.107c0-.605-.859-.729-1.86-1.008-1.16-.294-2.622-.867-2.622-2.308 0-1.426 1.398-2.324 3.051-2.324 1.541 0 2.956.712 3.544 1.72l-1.86 1.022c-.19-.666-.762-1.193-1.62-1.193-.557 0-1.018.232-1.018.682 0 .573 1.018.635 2.162.991 1.208.372 2.32.915 2.32 2.294 0 1.518-1.446 2.417-3.115 2.417-1.811 0-3.242-.744-3.877-1.952l1.89-1.039c.24.822.922 1.441 1.955 1.441.62 0 1.05-.248 1.05-.743zm-6.882-8.677h-2.177v8.692c0 .775.175 1.348.509 1.705.35.356.89.526 1.636.526.255 0 .525-.03.78-.077.27-.062.476-.14.65-.233l.191-1.425a2.07 2.07 0 01-.46.124c-.128.03-.287.03-.461.03-.286 0-.414-.077-.509-.216-.111-.14-.159-.387-.159-.744v-8.382zm-7.246 4.57c-.795 0-1.446.558-1.621 1.581h3.05c.017-.899-.587-1.58-1.43-1.58zm3.353 3.007H23.63c.095 1.224.794 1.828 1.7 1.828.81 0 1.367-.527 1.494-1.24l1.828 1.007c-.54.961-1.7 1.798-3.322 1.798-2.16 0-3.75-1.472-3.75-3.951 0-2.464 1.62-3.951 3.703-3.951 2.081 0 3.464 1.44 3.464 3.486-.016.604-.111 1.023-.111 1.023zm-11.077 3.207h2.257V10.916h-2.257v4.107h-4.243v-4.091H11.06v10.366h2.256v-4.292h4.243v4.292z\",fill:\"currentColor\"})),a=L=>e.createElement(\"svg\",Object.assign({viewBox:\"0 0 104 36\",title:\"Helsingfors stad\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\"},L),e.createElement(\"path\",{d:\"M103.105 0v22.935c0 5.179-4.266 9.397-9.524 9.397l-34.867.032a8.46 8.46 0 00-5.981 2.471L51.553 36l-1.181-1.165a8.405 8.405 0 00-5.982-2.471H9.476C4.25 32.364 0 28.145 0 22.966V0h103.105zm-2.236 2.235H2.251v20.731c0 3.951 3.243 7.163 7.225 7.163H44.39c2.676 0 5.195.96 7.162 2.739 1.968-1.78 4.486-2.74 7.162-2.74l34.867-.03c4.014 0 7.288-3.212 7.288-7.163v-20.7zM62.02 12.09l2 1.15c-.032 1.007-.489 1.479-1.354 1.479-.205 0-.473-.047-.614-.094v.062c.425.331.944.882.944 1.763 0 1.512-1.464 2.472-3.274 2.472-.834 0-1.558.267-1.558.677 0 .315.267.456.913.456.645 0 1.369-.126 2.203-.126 1.653 0 2.755.661 2.755 2.157 0 1.794-2.015 2.503-4.282 2.503-2.109 0-4.03-.598-4.03-1.952 0-.819.85-1.307 1.622-1.448v-.048c-.582-.173-1.102-.55-1.102-1.212 0-.865.882-1.338 1.779-1.527v-.047c-.834-.33-1.543-1.007-1.543-2.188 0-1.511 1.322-2.55 3.133-2.55.692 0 1.086.142 1.605.142.646 0 .882-.362.882-.945 0-.267-.047-.535-.079-.724zm-1.731 9.54c-.93 0-2.724.078-2.724.786 0 .536.898.787 2.157.803 1.417 0 2.235-.267 2.235-.913 0-.504-.755-.677-1.668-.677zm28.995-8.013c1.527 0 2.928.724 3.526 1.747l-1.842 1.04a1.624 1.624 0 00-1.606-1.213c-.55 0-1.007.236-1.007.677 0 .582 1.007.645 2.157 1.008 1.196.377 2.298.928 2.298 2.33 0 1.542-1.433 2.455-3.101 2.455-1.795 0-3.211-.771-3.841-1.984l1.873-1.054c.252.834.913 1.464 1.936 1.464.598 0 1.023-.268 1.023-.74 0-.614-.85-.756-1.841-1.023-1.165-.315-2.613-.882-2.613-2.346 0-1.448 1.385-2.36 3.038-2.36zm-14.655 0c2.078 0 3.699 1.527 3.699 4.014s-1.606 4.014-3.7 4.014c-2.109 0-3.714-1.527-3.714-4.014s1.605-4.014 3.715-4.014zm-49.68 0c2.063 0 3.432 1.464 3.432 3.542.016.614-.094 1.039-.094 1.039h-4.974c.094 1.243.787 1.857 1.684 1.857.803 0 1.354-.535 1.48-1.26l1.81 1.024c-.535.976-1.684 1.826-3.29 1.826-2.14 0-3.715-1.495-3.715-4.014 0-2.487 1.606-4.014 3.668-4.014zm13.066-.016c1.527 0 2.928.724 3.526 1.748l-1.842 1.039c-.189-.677-.755-1.213-1.605-1.213-.551 0-1.008.237-1.008.677 0 .583 1.008.646 2.14 1.008 1.197.378 2.3.928 2.3 2.33 0 1.542-1.433 2.44-3.086 2.44-1.795 0-3.211-.756-3.841-1.984l1.873-1.055c.236.835.913 1.464 1.936 1.464.583.016 1.008-.236 1.008-.724 0-.614-.85-.74-1.842-1.023-1.165-.3-2.597-.882-2.597-2.345 0-1.449 1.385-2.362 3.038-2.362zM32.3 10.53v8.501c0 .362.047.614.157.756.095.157.22.22.504.22.173 0 .33 0 .456-.031a2.01 2.01 0 00.457-.126l-.189 1.448a2.532 2.532 0 01-.645.236c-.252.047-.52.079-.772.079-.74 0-1.275-.174-1.621-.536-.33-.362-.504-.944-.504-1.731V10.53h2.157zm19.818 3.086c1.48 0 2.408 1.023 2.408 2.928v4.911h-2.156V16.97c0-1.007-.362-1.543-1.165-1.543s-1.322.614-1.322 1.496v4.549h-2.141v-7.666h2.14l-.11 1.26h.048c.378-.71 1.039-1.449 2.298-1.449zm16.733-3.337a3.27 3.27 0 012.739 1.4l-1.858 1.134c-.031-.456-.252-.928-.771-.928-.535 0-.787.409-.787 1.086v.834h1.684v1.637h-1.684v6.029h-2.14v-6.029h-1.181v-1.637h1.18v-.819c0-1.794 1.18-2.707 2.818-2.707zm14.812 3.384c1.086 0 1.684.913 1.684 2.03 0 .505-.078.898-.078.898l-1.936 1.118c.031-.22.126-.74.126-1.26 0-.503-.19-.975-.725-.975-.676 0-.944.63-.944 1.62v4.377h-2.157v-7.65h2.157l-.11 1.259h.047c.378-.74.96-1.417 1.936-1.417zm-70.52-2.723v4.171h4.203v-4.17h2.235v10.514h-2.235v-4.36h-4.203v4.36h-2.235V10.94h2.235zm32.332 2.85v7.665H43.32V13.79h2.156zm29.153 1.463c-1.07 0-1.543 1.008-1.543 2.377 0 1.37.472 2.377 1.543 2.377 1.054 0 1.527-1.007 1.527-2.377 0-1.37-.473-2.377-1.527-2.377zm-14.891-.189c-.724 0-1.307.473-1.307 1.197 0 .74.583 1.212 1.307 1.196.724 0 1.306-.472 1.306-1.196s-.582-1.197-1.306-1.197zm-34.773.095c-.787 0-1.432.566-1.605 1.605h3.038c0-.913-.598-1.605-1.433-1.605zm19.44-4.675c.693 0 1.244.503 1.244 1.196s-.55 1.196-1.243 1.196c-.709 0-1.244-.503-1.244-1.196s.551-1.196 1.244-1.196z\",fill:\"currentColor\"})),s=L=>e.createElement(\"svg\",Object.assign({viewBox:\"0 0 111 40\",title:\"Xельсинки\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\"},L),e.createElement(\"path\",{d:\"M111,0 L111,25.5004366 C111,31.2654012 106.262725,35.9554377 100.439986,35.9554377 L63.3562072,35.9554377 C60.8502714,35.9554377 58.4945561,36.9288232 56.7222777,38.6957928 L55.4161673,40 L54.1094108,38.6957928 C52.3377785,36.9288232 49.9817401,35.9554377 47.4761274,35.9554377 L10.495403,35.9554377 C4.70820006,35.9554377 0,31.2654012 0,25.5004366 L0,0 L111,0 Z M108.516032,2.48617534 L2.48364499,2.48617534 L2.48364499,25.5004366 C2.48364499,29.8942535 6.07795224,33.4692624 10.495403,33.4692624 L47.4761274,33.4692624 C50.4372473,33.4692624 53.2336093,34.5448372 55.4161673,36.5110112 C57.5993714,34.5445138 60.3950872,33.4692624 63.3562072,33.4692624 L100.439986,33.4692624 C104.892973,33.4692624 108.516032,29.8942535 108.516032,25.5004366 L108.516032,2.48617534 Z\"}),e.createElement(\"path\",{d:\"M26.7583027,15.102351 C29.0393923,15.102351 30.5600111,16.7260615 30.5600111,19.0434305 C30.5600111,19.2767644 30.5466196,19.4852293 30.5288503,19.6591371 L30.5060024,19.8506189 L30.5060024,19.8506189 L30.4714217,20.0675005 L30.4714217,20.0675005 L30.441773,20.2105229 L24.9333663,20.2105229 C25.0348055,21.5978398 25.8117522,22.2740355 26.8086992,22.2740355 C27.6638105,22.2740355 28.256947,21.7345249 28.4265488,20.9795155 L28.447879,20.870226 L30.4588949,22.0036866 C29.8673817,23.0860525 28.583239,24.0332439 26.8086992,24.0332439 C24.4264934,24.0332439 22.6858744,22.3759014 22.6858744,19.5676357 C22.6858744,16.7939721 24.4604142,15.102351 26.7583027,15.102351 Z M55.6956097,15.102351 C57.8080647,15.102351 59.0922074,16.5061605 59.3626042,17.8760146 L57.1829538,18.9926592 C57.1829538,17.8591987 56.7432762,16.9291466 55.6956097,16.9291466 C54.5468269,16.9291466 54.0567529,18.0454678 54.0567529,19.5676357 C54.0567529,21.0901271 54.5468269,22.2067717 55.6956097,22.2067717 C56.7432762,22.2067717 57.1829538,21.2763962 57.1829538,20.1429357 L59.3626042,21.2592569 C59.0922074,22.6294344 57.8080647,24.0332439 55.6956097,24.0332439 C53.3638004,24.0332439 51.6403033,22.3419461 51.6403033,19.5676357 C51.6403033,16.7939721 53.3638004,15.102351 55.6956097,15.102351 Z M40.276206,15.1194903 L40.276206,23.8301588 L38.0119152,23.8301588 L38.0119152,16.84442 L35.8380797,16.84442 L35.8380797,20.0077612 C35.8380797,22.1049057 35.2821025,23.5261779 33.4904408,24.0332439 L31.4125526,22.4431653 C33.0006898,22.1049057 33.5414834,21.5299292 33.5414834,19.7878602 L33.5340532,15.1194903 L40.276206,15.1194903 Z M12.0260365,12.1252789 L14.7800783,12.1252789 L16.2717464,14.9725234 L16.2717464,14.9725234 L16.4341748,15.2953441 L16.4341748,15.2953441 L16.6788491,15.8037339 L16.6788491,15.8037339 L16.9768507,16.4553892 L16.9768507,16.4553892 L17.0275702,16.4553892 L17.4430426,15.6010329 L17.4430426,15.6010329 L17.7660509,14.9703444 L17.7660509,14.9703444 L19.2918611,12.1252789 L21.8772683,12.1252789 L18.7678662,17.7579795 L22.2151836,23.8301588 L19.4776175,23.8301588 L17.7880412,20.7347282 L17.3477821,19.8934851 L17.3477821,19.8934851 L16.9936495,19.1957443 L16.9936495,19.1957443 L16.9429299,19.1957443 L16.4296666,20.2017612 L16.4296666,20.2017612 L16.1488613,20.7347282 L16.1488613,20.7347282 L14.4589619,23.8301588 L11.8060362,23.8301588 L15.1858351,17.8423827 L12.0260365,12.1252789 Z M73.6329021,15.3089933 L73.6329021,18.4982052 L76.7384275,18.4982052 L76.7384275,15.3089933 L79.0263013,15.3089933 L79.0263013,23.8301588 L76.7384275,23.8301588 L76.7384275,20.5300262 L73.6329021,20.5300262 L73.6329021,23.8301588 L71.3443822,23.8301588 L71.3443822,15.3089933 L73.6329021,15.3089933 Z M81.7509452,15.3089933 L84.038819,15.3089933 L84.0382826,17.7625146 L84.0382826,17.7625146 L84.0272597,18.2272853 L84.0272597,18.2272853 L84.0073592,18.6676664 L84.0073592,18.6676664 L83.9648394,19.3234809 L83.9648394,19.3234809 L84.0139437,19.3234809 L84.169379,19.0264906 L84.169379,19.0264906 L84.2968993,18.7938994 L84.2968993,18.7938994 L84.513041,18.4178519 L84.513041,18.4178519 L84.6376281,18.2110698 L84.6376281,18.2110698 L84.7713017,17.9974092 L84.7713017,17.9974092 L84.9126187,17.7810904 L84.9126187,17.7810904 L86.5974127,15.3089933 L89.2177098,15.3089933 L86.5851366,18.7937781 L89.3776219,23.8301588 L86.8432573,23.8301588 L85.1087763,20.6778126 L84.038819,22.143065 L84.038819,23.8301588 L81.7509452,23.8301588 L81.7509452,15.3089933 Z M61.4012413,15.3066003 L63.529526,15.3066003 L63.5289835,19.1888185 L63.5289835,19.1888185 L63.5216221,19.5157585 L63.5216221,19.5157585 L63.5077012,19.8578907 L63.5077012,19.8578907 L63.4770492,20.4030472 L63.4770492,20.4030472 L63.4309943,21.0450474 L63.4800987,21.0450474 L63.7716874,20.253641 L63.7716874,20.253641 L63.9311384,19.8405724 L64.0786871,19.4774947 C64.0944245,19.44017 64.1098452,19.4041507 64.1248513,19.3697367 L64.1685284,19.2716101 L65.989588,15.3066003 L68.9419855,15.3066003 L68.9419855,23.8280891 L66.8259768,23.8280891 L66.8267222,19.9455089 L66.8267222,19.9455089 L66.8322848,19.7302493 L66.8322848,19.7302493 L66.8423864,19.5050527 L66.8423864,19.5050527 L66.8719349,19.0505018 L66.8719349,19.0505018 L66.9236002,18.4544812 L66.9236002,18.4544812 L66.9613367,18.0893186 L66.9119094,18.0893186 L66.5976118,18.8667578 L66.5976118,18.8667578 L66.3325494,19.5013201 L66.3325494,19.5013201 L66.1737292,19.8627559 L64.0961641,23.8280891 L61.4012413,23.8280891 L61.4012413,15.3066003 Z M93.1489632,15.3066003 L93.1489632,19.0869579 C93.1489632,19.2860499 93.1422578,19.5145216 93.1323455,19.7434955 L93.1092816,20.193557 L93.1092816,20.193557 L93.0504315,21.0450474 L93.0995358,21.0450474 L93.4288994,20.1548475 L93.4288994,20.1548475 L93.6009648,19.7147112 L93.6009648,19.7147112 L93.7446087,19.3697367 L93.7446087,19.3697367 L93.7882885,19.2716101 L95.6090252,15.3066003 L98.5614226,15.3066003 L98.5614226,23.8280891 L96.445737,23.8280891 L96.4464806,19.9455089 L96.4464806,19.9455089 L96.4520299,19.7302493 L96.4520299,19.7302493 L96.4621074,19.5050527 L96.4621074,19.5050527 L96.4915854,19.0505018 L96.4915854,19.0505018 L96.5349255,18.5406549 L96.5349255,18.5406549 L96.5807739,18.0893186 L96.5313465,18.0893186 L96.173661,18.9724125 L96.173661,18.9724125 L95.9607946,19.4811094 L95.9607946,19.4811094 L95.8453327,19.74729 L95.8453327,19.74729 L95.7934894,19.8627559 L93.7156012,23.8280891 L91.0206784,23.8280891 L91.0206784,15.3066003 L93.1489632,15.3066003 Z M44.9008964,14.9924652 L44.9008964,18.0646121 L47.1054221,18.0646121 C47.6187561,18.0646121 48.0778169,18.1212043 48.4819584,18.234712 C48.8860999,18.3482198 49.2282149,18.5241406 49.5076573,18.7615044 C49.7874227,18.9991915 50.0009619,19.3005853 50.1485979,19.6653624 C50.2959109,20.0301394 50.3695674,20.4612101 50.3695674,20.9582511 C50.3695674,21.407108 50.30851,21.7903179 50.1867184,22.1094978 C50.0642806,22.4280309 49.9082452,22.6941759 49.7176429,22.9076092 C49.5267175,23.1210426 49.3144705,23.2888788 49.0805789,23.4104712 C48.8466872,23.5320635 48.6176414,23.6239045 48.3940875,23.6859942 C48.1705336,23.748084 47.9631325,23.7872134 47.7725302,23.8033826 L47.5649326,23.818905 L47.5649326,23.818905 L47.4001953,23.8266662 L47.4001953,23.8266662 L42.7422445,23.8276364 L42.7422445,14.9924652 L44.9008964,14.9924652 Z M46.5407224,19.7908353 L44.9008964,19.7908353 L44.9008964,22.1014132 L46.7235714,22.1014132 C46.8915598,22.1014132 47.057933,22.0865375 47.2233371,22.0564628 C47.3887411,22.0270349 47.5386385,21.9704427 47.6733523,21.8863629 C47.8080662,21.8026065 47.9162895,21.6865117 47.9976993,21.5377551 C48.0791091,21.3893219 48.119814,21.1959383 48.119814,20.9582511 C48.119814,20.7260615 48.0778169,20.5339715 47.9938227,20.3829512 C47.9098284,20.2316075 47.7957901,20.1126023 47.6504155,20.0262588 C47.5053639,19.9399153 47.3380215,19.8787957 47.1470961,19.8435469 C47.0041444,19.8173528 46.8546508,19.8007996 46.6987517,19.7941601 L46.5407224,19.7908353 Z M26.7583027,16.827604 C25.9162066,16.827604 25.2292817,17.4025896 25.0100089,18.4777051 L24.9840859,18.6207677 L28.3467629,18.6207677 C28.3467629,17.5888497 27.6877312,16.827604 26.7583027,16.827604 Z\"})),h=l=>{var{className:h,dataTestId:o,language:v=\"fi\",size:C=\"full\",style:g}=l,r=L(l,[\"className\",\"dataTestId\",\"language\",\"size\",\"style\"]);const i=Object.assign({className:c(t.logo,\"full\"!==C&&t[C],h),style:g,\"data-testid\":o},r);return\"sv\"===v?e.createElement(a,Object.assign({},i)):\"ru\"===v?e.createElement(s,Object.assign({},i)):e.createElement(m,Object.assign({},i))};export{h as L};\n","import setPrototypeOf from \"@babel/runtime/helpers/esm/setPrototypeOf\";\nimport isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport setPrototypeOf from \"@babel/runtime/helpers/esm/setPrototypeOf\";\nimport isNativeFunction from \"@babel/runtime/helpers/esm/isNativeFunction\";\nimport construct from \"@babel/runtime/helpers/esm/construct\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","export * from '@react-spring/web';\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","'use strict';\n\nif (typeof process === 'undefined' ||\n !process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n","// based on the aes implimentation in triple sec\n// https://github.com/keybase/triplesec\n// which is in turn based on the one from crypto-js\n// https://code.google.com/p/crypto-js/\n\nvar Buffer = require('safe-buffer').Buffer\n\nfunction asUInt32Array (buf) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n\n var len = (buf.length / 4) | 0\n var out = new Array(len)\n\n for (var i = 0; i < len; i++) {\n out[i] = buf.readUInt32BE(i * 4)\n }\n\n return out\n}\n\nfunction scrubVec (v) {\n for (var i = 0; i < v.length; v++) {\n v[i] = 0\n }\n}\n\nfunction cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {\n var SUB_MIX0 = SUB_MIX[0]\n var SUB_MIX1 = SUB_MIX[1]\n var SUB_MIX2 = SUB_MIX[2]\n var SUB_MIX3 = SUB_MIX[3]\n\n var s0 = M[0] ^ keySchedule[0]\n var s1 = M[1] ^ keySchedule[1]\n var s2 = M[2] ^ keySchedule[2]\n var s3 = M[3] ^ keySchedule[3]\n var t0, t1, t2, t3\n var ksRow = 4\n\n for (var round = 1; round < nRounds; round++) {\n t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]\n t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]\n t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]\n t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]\n s0 = t0\n s1 = t1\n s2 = t2\n s3 = t3\n }\n\n t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]\n t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]\n t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]\n t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]\n t0 = t0 >>> 0\n t1 = t1 >>> 0\n t2 = t2 >>> 0\n t3 = t3 >>> 0\n\n return [t0, t1, t2, t3]\n}\n\n// AES constants\nvar RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]\nvar G = (function () {\n // Compute double table\n var d = new Array(256)\n for (var j = 0; j < 256; j++) {\n if (j < 128) {\n d[j] = j << 1\n } else {\n d[j] = (j << 1) ^ 0x11b\n }\n }\n\n var SBOX = []\n var INV_SBOX = []\n var SUB_MIX = [[], [], [], []]\n var INV_SUB_MIX = [[], [], [], []]\n\n // Walk GF(2^8)\n var x = 0\n var xi = 0\n for (var i = 0; i < 256; ++i) {\n // Compute sbox\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63\n SBOX[x] = sx\n INV_SBOX[sx] = x\n\n // Compute multiplication\n var x2 = d[x]\n var x4 = d[x2]\n var x8 = d[x4]\n\n // Compute sub bytes, mix columns tables\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100)\n SUB_MIX[0][x] = (t << 24) | (t >>> 8)\n SUB_MIX[1][x] = (t << 16) | (t >>> 16)\n SUB_MIX[2][x] = (t << 8) | (t >>> 24)\n SUB_MIX[3][x] = t\n\n // Compute inv sub bytes, inv mix columns tables\n t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)\n INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)\n INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)\n INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)\n INV_SUB_MIX[3][sx] = t\n\n if (x === 0) {\n x = xi = 1\n } else {\n x = x2 ^ d[d[d[x8 ^ x2]]]\n xi ^= d[d[xi]]\n }\n }\n\n return {\n SBOX: SBOX,\n INV_SBOX: INV_SBOX,\n SUB_MIX: SUB_MIX,\n INV_SUB_MIX: INV_SUB_MIX\n }\n})()\n\nfunction AES (key) {\n this._key = asUInt32Array(key)\n this._reset()\n}\n\nAES.blockSize = 4 * 4\nAES.keySize = 256 / 8\nAES.prototype.blockSize = AES.blockSize\nAES.prototype.keySize = AES.keySize\nAES.prototype._reset = function () {\n var keyWords = this._key\n var keySize = keyWords.length\n var nRounds = keySize + 6\n var ksRows = (nRounds + 1) * 4\n\n var keySchedule = []\n for (var k = 0; k < keySize; k++) {\n keySchedule[k] = keyWords[k]\n }\n\n for (k = keySize; k < ksRows; k++) {\n var t = keySchedule[k - 1]\n\n if (k % keySize === 0) {\n t = (t << 8) | (t >>> 24)\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n\n t ^= RCON[(k / keySize) | 0] << 24\n } else if (keySize > 6 && k % keySize === 4) {\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n }\n\n keySchedule[k] = keySchedule[k - keySize] ^ t\n }\n\n var invKeySchedule = []\n for (var ik = 0; ik < ksRows; ik++) {\n var ksR = ksRows - ik\n var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]\n\n if (ik < 4 || ksR <= 4) {\n invKeySchedule[ik] = tt\n } else {\n invKeySchedule[ik] =\n G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^\n G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^\n G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^\n G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]\n }\n }\n\n this._nRounds = nRounds\n this._keySchedule = keySchedule\n this._invKeySchedule = invKeySchedule\n}\n\nAES.prototype.encryptBlockRaw = function (M) {\n M = asUInt32Array(M)\n return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)\n}\n\nAES.prototype.encryptBlock = function (M) {\n var out = this.encryptBlockRaw(M)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[1], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[3], 12)\n return buf\n}\n\nAES.prototype.decryptBlock = function (M) {\n M = asUInt32Array(M)\n\n // swap\n var m1 = M[1]\n M[1] = M[3]\n M[3] = m1\n\n var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[3], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[1], 12)\n return buf\n}\n\nAES.prototype.scrub = function () {\n scrubVec(this._keySchedule)\n scrubVec(this._invKeySchedule)\n scrubVec(this._key)\n}\n\nmodule.exports.AES = AES\n","var Buffer = require('safe-buffer').Buffer\nvar MD5 = require('md5.js')\n\n/* eslint-disable camelcase */\nfunction EVP_BytesToKey (password, salt, keyBits, ivLen) {\n if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')\n if (salt) {\n if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')\n if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')\n }\n\n var keyLen = keyBits / 8\n var key = Buffer.alloc(keyLen)\n var iv = Buffer.alloc(ivLen || 0)\n var tmp = Buffer.alloc(0)\n\n while (keyLen > 0 || ivLen > 0) {\n var hash = new MD5()\n hash.update(tmp)\n hash.update(password)\n if (salt) hash.update(salt)\n tmp = hash.digest()\n\n var used = 0\n\n if (keyLen > 0) {\n var keyStart = key.length - keyLen\n used = Math.min(keyLen, tmp.length)\n tmp.copy(key, keyStart, 0, used)\n keyLen -= used\n }\n\n if (used < tmp.length && ivLen > 0) {\n var ivStart = iv.length - ivLen\n var length = Math.min(ivLen, tmp.length - used)\n tmp.copy(iv, ivStart, used, used + length)\n ivLen -= length\n }\n }\n\n tmp.fill(0)\n return { key: key, iv: iv }\n}\n\nmodule.exports = EVP_BytesToKey\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n for (var j = 0; j < naf.length; j += doubles.step) {\n var nafW = 0;\n for (var k = j + doubles.step - 1; k >= j; k--)\n nafW = (nafW << 1) + naf[k];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (var j = 0; j < repr.length; j++) {\n var nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var k = 0; i >= 0 && naf[i] === 0; i--)\n k++;\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n for (var i = 0; i < len; i++) {\n var p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (var i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b] /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3 /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (var j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (var i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (var j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (var j = 0; j < len; j++) {\n var z = tmp[j];\n var p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (var i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ;\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","var asn1 = require('./asn1')\nvar aesid = require('./aesid.json')\nvar fixProc = require('./fixProc')\nvar ciphers = require('browserify-aes')\nvar compat = require('pbkdf2')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = parseKeys\n\nfunction parseKeys (buffer) {\n var password\n if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n password = buffer.passphrase\n buffer = buffer.key\n }\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer)\n }\n\n var stripped = fixProc(buffer, password)\n\n var type = stripped.tag\n var data = stripped.data\n var subtype, ndata\n switch (type) {\n case 'CERTIFICATE':\n ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo\n // falls through\n case 'PUBLIC KEY':\n if (!ndata) {\n ndata = asn1.PublicKey.decode(data, 'der')\n }\n subtype = ndata.algorithm.algorithm.join('.')\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')\n case '1.2.840.10045.2.1':\n ndata.subjectPrivateKey = ndata.subjectPublicKey\n return {\n type: 'ec',\n data: ndata\n }\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')\n return {\n type: 'dsa',\n data: ndata.algorithm.params\n }\n default: throw new Error('unknown key id ' + subtype)\n }\n // throw new Error('unknown key type ' + type)\n case 'ENCRYPTED PRIVATE KEY':\n data = asn1.EncryptedPrivateKey.decode(data, 'der')\n data = decrypt(data, password)\n // falls through\n case 'PRIVATE KEY':\n ndata = asn1.PrivateKey.decode(data, 'der')\n subtype = ndata.algorithm.algorithm.join('.')\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')\n case '1.2.840.10045.2.1':\n return {\n curve: ndata.algorithm.curve,\n privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n }\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')\n return {\n type: 'dsa',\n params: ndata.algorithm.params\n }\n default: throw new Error('unknown key id ' + subtype)\n }\n // throw new Error('unknown key type ' + type)\n case 'RSA PUBLIC KEY':\n return asn1.RSAPublicKey.decode(data, 'der')\n case 'RSA PRIVATE KEY':\n return asn1.RSAPrivateKey.decode(data, 'der')\n case 'DSA PRIVATE KEY':\n return {\n type: 'dsa',\n params: asn1.DSAPrivateKey.decode(data, 'der')\n }\n case 'EC PRIVATE KEY':\n data = asn1.ECPrivateKey.decode(data, 'der')\n return {\n curve: data.parameters.value,\n privateKey: data.privateKey\n }\n default: throw new Error('unknown key type ' + type)\n }\n}\nparseKeys.signature = asn1.signature\nfunction decrypt (data, password) {\n var salt = data.algorithm.decrypt.kde.kdeparams.salt\n var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)\n var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]\n var iv = data.algorithm.decrypt.cipher.iv\n var cipherText = data.subjectPrivateKey\n var keylen = parseInt(algo.split('-')[1], 10) / 8\n var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')\n var cipher = ciphers.createDecipheriv(algo, key, iv)\n var out = []\n out.push(cipher.update(cipherText))\n out.push(cipher.final())\n return Buffer.concat(out)\n}\n","import { eachProp, is, toArray, isAnimatedString, Globals, getFluidValue, useLayoutEffect, each, raf, flush, FluidValue, deprecateInterpolate, callFluidObservers, frameLoop, hasFluidValue, flushCalls, isEqual, getFluidObservers, addFluidObserver, removeFluidObserver, noop, useMemoOne, deprecateDirectCall, useForceUpdate, usePrev, useOnce, createInterpolator, createStringInterpolator } from '@react-spring/shared';\nexport { Globals, createInterpolator } from '@react-spring/shared';\nimport * as React from 'react';\nimport { useContext, useMemo, useRef, useState } from 'react';\nimport { getAnimated, AnimatedValue, getPayload, AnimatedString, getAnimatedType, setAnimated } from '@react-spring/animated';\nexport * from '@react-spring/types/animated';\nexport * from '@react-spring/types/interpolation';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction callProp(value, ...args) {\n return is.fun(value) ? value(...args) : value;\n}\nconst matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key)));\nconst resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;\nconst getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : undefined;\n\nconst noopTransform = value => value;\n\nconst getDefaultProps = (props, transform = noopTransform) => {\n let keys = DEFAULT_PROPS;\n\n if (props.default && props.default !== true) {\n props = props.default;\n keys = Object.keys(props);\n }\n\n const defaults = {};\n\n for (const key of keys) {\n const value = transform(props[key], key);\n\n if (!is.und(value)) {\n defaults[key] = value;\n }\n }\n\n return defaults;\n};\nconst DEFAULT_PROPS = ['config', 'onProps', 'onStart', 'onChange', 'onPause', 'onResume', 'onRest'];\nconst RESERVED_PROPS = {\n config: 1,\n from: 1,\n to: 1,\n ref: 1,\n loop: 1,\n reset: 1,\n pause: 1,\n cancel: 1,\n reverse: 1,\n immediate: 1,\n default: 1,\n delay: 1,\n onProps: 1,\n onStart: 1,\n onChange: 1,\n onPause: 1,\n onResume: 1,\n onRest: 1,\n onResolve: 1,\n items: 1,\n trail: 1,\n sort: 1,\n expires: 1,\n initial: 1,\n enter: 1,\n update: 1,\n leave: 1,\n children: 1,\n onDestroyed: 1,\n keys: 1,\n callId: 1,\n parentId: 1\n};\n\nfunction getForwardProps(props) {\n const forward = {};\n let count = 0;\n eachProp(props, (value, prop) => {\n if (!RESERVED_PROPS[prop]) {\n forward[prop] = value;\n count++;\n }\n });\n\n if (count) {\n return forward;\n }\n}\n\nfunction inferTo(props) {\n const to = getForwardProps(props);\n\n if (to) {\n const out = {\n to\n };\n eachProp(props, (val, key) => key in to || (out[key] = val));\n return out;\n }\n\n return _extends({}, props);\n}\nfunction computeGoal(value) {\n value = getFluidValue(value);\n return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? Globals.createStringInterpolator({\n range: [0, 1],\n output: [value, value]\n })(1) : value;\n}\nfunction hasProps(props) {\n for (const _ in props) return true;\n\n return false;\n}\nfunction isAsyncTo(to) {\n return is.fun(to) || is.arr(to) && is.obj(to[0]);\n}\nfunction detachRefs(ctrl, ref) {\n var _ctrl$ref;\n\n (_ctrl$ref = ctrl.ref) == null ? void 0 : _ctrl$ref.delete(ctrl);\n ref == null ? void 0 : ref.delete(ctrl);\n}\nfunction replaceRef(ctrl, ref) {\n if (ref && ctrl.ref !== ref) {\n var _ctrl$ref2;\n\n (_ctrl$ref2 = ctrl.ref) == null ? void 0 : _ctrl$ref2.delete(ctrl);\n ref.add(ctrl);\n ctrl.ref = ref;\n }\n}\n\nfunction useChain(refs, timeSteps, timeFrame = 1000) {\n useLayoutEffect(() => {\n if (timeSteps) {\n let prevDelay = 0;\n each(refs, (ref, i) => {\n const controllers = ref.current;\n\n if (controllers.length) {\n let delay = timeFrame * timeSteps[i];\n if (isNaN(delay)) delay = prevDelay;else prevDelay = delay;\n each(controllers, ctrl => {\n each(ctrl.queue, props => {\n const memoizedDelayProp = props.delay;\n\n props.delay = key => delay + callProp(memoizedDelayProp || 0, key);\n });\n ctrl.start();\n });\n }\n });\n } else {\n let p = Promise.resolve();\n each(refs, ref => {\n const controllers = ref.current;\n\n if (controllers.length) {\n const queues = controllers.map(ctrl => {\n const q = ctrl.queue;\n ctrl.queue = [];\n return q;\n });\n p = p.then(() => {\n each(controllers, (ctrl, i) => each(queues[i] || [], update => ctrl.queue.push(update)));\n return Promise.all(ref.start());\n });\n }\n });\n }\n });\n}\n\nconst config = {\n default: {\n tension: 170,\n friction: 26\n },\n gentle: {\n tension: 120,\n friction: 14\n },\n wobbly: {\n tension: 180,\n friction: 12\n },\n stiff: {\n tension: 210,\n friction: 20\n },\n slow: {\n tension: 280,\n friction: 60\n },\n molasses: {\n tension: 280,\n friction: 120\n }\n};\n\nconst linear = t => t;\n\nconst defaults = _extends({}, config.default, {\n mass: 1,\n damping: 1,\n easing: linear,\n clamp: false\n});\n\nclass AnimationConfig {\n constructor() {\n this.tension = void 0;\n this.friction = void 0;\n this.frequency = void 0;\n this.damping = void 0;\n this.mass = void 0;\n this.velocity = 0;\n this.restVelocity = void 0;\n this.precision = void 0;\n this.progress = void 0;\n this.duration = void 0;\n this.easing = void 0;\n this.clamp = void 0;\n this.bounce = void 0;\n this.decay = void 0;\n this.round = void 0;\n Object.assign(this, defaults);\n }\n\n}\nfunction mergeConfig(config, newConfig, defaultConfig) {\n if (defaultConfig) {\n defaultConfig = _extends({}, defaultConfig);\n sanitizeConfig(defaultConfig, newConfig);\n newConfig = _extends({}, defaultConfig, newConfig);\n }\n\n sanitizeConfig(config, newConfig);\n Object.assign(config, newConfig);\n\n for (const key in defaults) {\n if (config[key] == null) {\n config[key] = defaults[key];\n }\n }\n\n let {\n mass,\n frequency,\n damping\n } = config;\n\n if (!is.und(frequency)) {\n if (frequency < 0.01) frequency = 0.01;\n if (damping < 0) damping = 0;\n config.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;\n config.friction = 4 * Math.PI * damping * mass / frequency;\n }\n\n return config;\n}\n\nfunction sanitizeConfig(config, props) {\n if (!is.und(props.decay)) {\n config.duration = undefined;\n } else {\n const isTensionConfig = !is.und(props.tension) || !is.und(props.friction);\n\n if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) {\n config.duration = undefined;\n config.decay = undefined;\n }\n\n if (isTensionConfig) {\n config.frequency = undefined;\n }\n }\n}\n\nconst emptyArray = [];\nclass Animation {\n constructor() {\n this.changed = false;\n this.values = emptyArray;\n this.toValues = null;\n this.fromValues = emptyArray;\n this.to = void 0;\n this.from = void 0;\n this.config = new AnimationConfig();\n this.immediate = false;\n }\n\n}\n\nfunction scheduleProps(callId, {\n key,\n props,\n defaultProps,\n state,\n actions\n}) {\n return new Promise((resolve, reject) => {\n var _props$cancel;\n\n let delay;\n let timeout;\n let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);\n\n if (cancel) {\n onStart();\n } else {\n if (!is.und(props.pause)) {\n state.paused = matchProp(props.pause, key);\n }\n\n let pause = defaultProps == null ? void 0 : defaultProps.pause;\n\n if (pause !== true) {\n pause = state.paused || matchProp(pause, key);\n }\n\n delay = callProp(props.delay || 0, key);\n\n if (pause) {\n state.resumeQueue.add(onResume);\n actions.pause();\n } else {\n actions.resume();\n onResume();\n }\n }\n\n function onPause() {\n state.resumeQueue.add(onResume);\n state.timeouts.delete(timeout);\n timeout.cancel();\n delay = timeout.time - raf.now();\n }\n\n function onResume() {\n if (delay > 0 && !Globals.skipAnimation) {\n timeout = raf.setTimeout(onStart, delay);\n state.pauseQueue.add(onPause);\n state.timeouts.add(timeout);\n } else {\n onStart();\n }\n }\n\n function onStart() {\n state.pauseQueue.delete(onPause);\n state.timeouts.delete(timeout);\n\n if (callId <= (state.cancelId || 0)) {\n cancel = true;\n }\n\n try {\n actions.start(_extends({}, props, {\n callId,\n cancel\n }), resolve);\n } catch (err) {\n reject(err);\n }\n }\n });\n}\n\nconst getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some(result => result.cancelled) ? getCancelledResult(target.get()) : results.every(result => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every(result => result.finished));\nconst getNoopResult = value => ({\n value,\n noop: true,\n finished: true,\n cancelled: false\n});\nconst getFinishedResult = (value, finished, cancelled = false) => ({\n value,\n finished,\n cancelled\n});\nconst getCancelledResult = value => ({\n value,\n cancelled: true,\n finished: false\n});\n\nfunction runAsync(to, props, state, target) {\n const {\n callId,\n parentId,\n onRest\n } = props;\n const {\n asyncTo: prevTo,\n promise: prevPromise\n } = state;\n\n if (!parentId && to === prevTo && !props.reset) {\n return prevPromise;\n }\n\n return state.promise = (async () => {\n state.asyncId = callId;\n state.asyncTo = to;\n const defaultProps = getDefaultProps(props, (value, key) => key === 'onRest' ? undefined : value);\n let preventBail;\n let bail;\n const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));\n\n const bailIfEnded = bailSignal => {\n const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);\n\n if (bailResult) {\n bailSignal.result = bailResult;\n bail(bailSignal);\n throw bailSignal;\n }\n };\n\n const animate = (arg1, arg2) => {\n const bailSignal = new BailSignal();\n const skipAnimationSignal = new SkipAniamtionSignal();\n return (async () => {\n if (Globals.skipAnimation) {\n stopAsync(state);\n skipAnimationSignal.result = getFinishedResult(target, false);\n bail(skipAnimationSignal);\n throw skipAnimationSignal;\n }\n\n bailIfEnded(bailSignal);\n const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {\n to: arg1\n });\n props.parentId = callId;\n eachProp(defaultProps, (value, key) => {\n if (is.und(props[key])) {\n props[key] = value;\n }\n });\n const result = await target.start(props);\n bailIfEnded(bailSignal);\n\n if (state.paused) {\n await new Promise(resume => {\n state.resumeQueue.add(resume);\n });\n }\n\n return result;\n })();\n };\n\n let result;\n\n if (Globals.skipAnimation) {\n stopAsync(state);\n return getFinishedResult(target, false);\n }\n\n try {\n let animating;\n\n if (is.arr(to)) {\n animating = (async queue => {\n for (const props of queue) {\n await animate(props);\n }\n })(to);\n } else {\n animating = Promise.resolve(to(animate, target.stop.bind(target)));\n }\n\n await Promise.all([animating.then(preventBail), bailPromise]);\n result = getFinishedResult(target.get(), true, false);\n } catch (err) {\n if (err instanceof BailSignal) {\n result = err.result;\n } else if (err instanceof SkipAniamtionSignal) {\n result = err.result;\n } else {\n throw err;\n }\n } finally {\n if (callId == state.asyncId) {\n state.asyncId = parentId;\n state.asyncTo = parentId ? prevTo : undefined;\n state.promise = parentId ? prevPromise : undefined;\n }\n }\n\n if (is.fun(onRest)) {\n raf.batchedUpdates(() => {\n onRest(result, target, target.item);\n });\n }\n\n return result;\n })();\n}\nfunction stopAsync(state, cancelId) {\n flush(state.timeouts, t => t.cancel());\n state.pauseQueue.clear();\n state.resumeQueue.clear();\n state.asyncId = state.asyncTo = state.promise = undefined;\n if (cancelId) state.cancelId = cancelId;\n}\nclass BailSignal extends Error {\n constructor() {\n super('An async animation has been interrupted. You see this error because you ' + 'forgot to use `await` or `.catch(...)` on its returned promise.');\n this.result = void 0;\n }\n\n}\nclass SkipAniamtionSignal extends Error {\n constructor() {\n super('SkipAnimationSignal');\n this.result = void 0;\n }\n\n}\n\nconst isFrameValue = value => value instanceof FrameValue;\nlet nextId$1 = 1;\nclass FrameValue extends FluidValue {\n constructor(...args) {\n super(...args);\n this.id = nextId$1++;\n this.key = void 0;\n this._priority = 0;\n }\n\n get priority() {\n return this._priority;\n }\n\n set priority(priority) {\n if (this._priority != priority) {\n this._priority = priority;\n\n this._onPriorityChange(priority);\n }\n }\n\n get() {\n const node = getAnimated(this);\n return node && node.getValue();\n }\n\n to(...args) {\n return Globals.to(this, args);\n }\n\n interpolate(...args) {\n deprecateInterpolate();\n return Globals.to(this, args);\n }\n\n toJSON() {\n return this.get();\n }\n\n observerAdded(count) {\n if (count == 1) this._attach();\n }\n\n observerRemoved(count) {\n if (count == 0) this._detach();\n }\n\n _attach() {}\n\n _detach() {}\n\n _onChange(value, idle = false) {\n callFluidObservers(this, {\n type: 'change',\n parent: this,\n value,\n idle\n });\n }\n\n _onPriorityChange(priority) {\n if (!this.idle) {\n frameLoop.sort(this);\n }\n\n callFluidObservers(this, {\n type: 'priority',\n parent: this,\n priority\n });\n }\n\n}\n\nconst $P = Symbol.for('SpringPhase');\nconst HAS_ANIMATED = 1;\nconst IS_ANIMATING = 2;\nconst IS_PAUSED = 4;\nconst hasAnimated = target => (target[$P] & HAS_ANIMATED) > 0;\nconst isAnimating = target => (target[$P] & IS_ANIMATING) > 0;\nconst isPaused = target => (target[$P] & IS_PAUSED) > 0;\nconst setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;\nconst setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;\n\nclass SpringValue extends FrameValue {\n constructor(arg1, arg2) {\n super();\n this.key = void 0;\n this.animation = new Animation();\n this.queue = void 0;\n this.defaultProps = {};\n this._state = {\n paused: false,\n pauseQueue: new Set(),\n resumeQueue: new Set(),\n timeouts: new Set()\n };\n this._pendingCalls = new Set();\n this._lastCallId = 0;\n this._lastToId = 0;\n this._memoizedDuration = 0;\n\n if (!is.und(arg1) || !is.und(arg2)) {\n const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {\n from: arg1\n });\n\n if (is.und(props.default)) {\n props.default = true;\n }\n\n this.start(props);\n }\n }\n\n get idle() {\n return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);\n }\n\n get goal() {\n return getFluidValue(this.animation.to);\n }\n\n get velocity() {\n const node = getAnimated(this);\n return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map(node => node.lastVelocity || 0);\n }\n\n get hasAnimated() {\n return hasAnimated(this);\n }\n\n get isAnimating() {\n return isAnimating(this);\n }\n\n get isPaused() {\n return isPaused(this);\n }\n\n advance(dt) {\n let idle = true;\n let changed = false;\n const anim = this.animation;\n let {\n config,\n toValues\n } = anim;\n const payload = getPayload(anim.to);\n\n if (!payload && hasFluidValue(anim.to)) {\n toValues = toArray(getFluidValue(anim.to));\n }\n\n anim.values.forEach((node, i) => {\n if (node.done) return;\n const to = node.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i];\n let finished = anim.immediate;\n let position = to;\n\n if (!finished) {\n position = node.lastPosition;\n\n if (config.tension <= 0) {\n node.done = true;\n return;\n }\n\n let elapsed = node.elapsedTime += dt;\n const from = anim.fromValues[i];\n const v0 = node.v0 != null ? node.v0 : node.v0 = is.arr(config.velocity) ? config.velocity[i] : config.velocity;\n let velocity;\n\n if (!is.und(config.duration)) {\n let p = 1;\n\n if (config.duration > 0) {\n if (this._memoizedDuration !== config.duration) {\n this._memoizedDuration = config.duration;\n\n if (node.durationProgress > 0) {\n node.elapsedTime = config.duration * node.durationProgress;\n elapsed = node.elapsedTime += dt;\n }\n }\n\n p = (config.progress || 0) + elapsed / this._memoizedDuration;\n p = p > 1 ? 1 : p < 0 ? 0 : p;\n node.durationProgress = p;\n }\n\n position = from + config.easing(p) * (to - from);\n velocity = (position - node.lastPosition) / dt;\n finished = p == 1;\n } else if (config.decay) {\n const decay = config.decay === true ? 0.998 : config.decay;\n const e = Math.exp(-(1 - decay) * elapsed);\n position = from + v0 / (1 - decay) * (1 - e);\n finished = Math.abs(node.lastPosition - position) < 0.1;\n velocity = v0 * e;\n } else {\n velocity = node.lastVelocity == null ? v0 : node.lastVelocity;\n const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001));\n const restVelocity = config.restVelocity || precision / 10;\n const bounceFactor = config.clamp ? 0 : config.bounce;\n const canBounce = !is.und(bounceFactor);\n const isGrowing = from == to ? node.v0 > 0 : from < to;\n let isMoving;\n let isBouncing = false;\n const step = 1;\n const numSteps = Math.ceil(dt / step);\n\n for (let n = 0; n < numSteps; ++n) {\n isMoving = Math.abs(velocity) > restVelocity;\n\n if (!isMoving) {\n finished = Math.abs(to - position) <= precision;\n\n if (finished) {\n break;\n }\n }\n\n if (canBounce) {\n isBouncing = position == to || position > to == isGrowing;\n\n if (isBouncing) {\n velocity = -velocity * bounceFactor;\n position = to;\n }\n }\n\n const springForce = -config.tension * 0.000001 * (position - to);\n const dampingForce = -config.friction * 0.001 * velocity;\n const acceleration = (springForce + dampingForce) / config.mass;\n velocity = velocity + acceleration * step;\n position = position + velocity * step;\n }\n }\n\n node.lastVelocity = velocity;\n\n if (Number.isNaN(position)) {\n console.warn(`Got NaN while animating:`, this);\n finished = true;\n }\n }\n\n if (payload && !payload[i].done) {\n finished = false;\n }\n\n if (finished) {\n node.done = true;\n } else {\n idle = false;\n }\n\n if (node.setValue(position, config.round)) {\n changed = true;\n }\n });\n const node = getAnimated(this);\n const currVal = node.getValue();\n\n if (idle) {\n const finalVal = getFluidValue(anim.to);\n\n if ((currVal !== finalVal || changed) && !config.decay) {\n node.setValue(finalVal);\n\n this._onChange(finalVal);\n } else if (changed && config.decay) {\n this._onChange(currVal);\n }\n\n this._stop();\n } else if (changed) {\n this._onChange(currVal);\n }\n }\n\n set(value) {\n raf.batchedUpdates(() => {\n this._stop();\n\n this._focus(value);\n\n this._set(value);\n });\n return this;\n }\n\n pause() {\n this._update({\n pause: true\n });\n }\n\n resume() {\n this._update({\n pause: false\n });\n }\n\n finish() {\n if (isAnimating(this)) {\n const {\n to,\n config\n } = this.animation;\n raf.batchedUpdates(() => {\n this._onStart();\n\n if (!config.decay) {\n this._set(to, false);\n }\n\n this._stop();\n });\n }\n\n return this;\n }\n\n update(props) {\n const queue = this.queue || (this.queue = []);\n queue.push(props);\n return this;\n }\n\n start(to, arg2) {\n let queue;\n\n if (!is.und(to)) {\n queue = [is.obj(to) ? to : _extends({}, arg2, {\n to\n })];\n } else {\n queue = this.queue || [];\n this.queue = [];\n }\n\n return Promise.all(queue.map(props => this._update(props))).then(results => getCombinedResult(this, results));\n }\n\n stop(cancel) {\n const {\n to\n } = this.animation;\n\n this._focus(this.get());\n\n stopAsync(this._state, cancel && this._lastCallId);\n raf.batchedUpdates(() => this._stop(to, cancel));\n return this;\n }\n\n reset() {\n this._update({\n reset: true\n });\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n this._start();\n } else if (event.type == 'priority') {\n this.priority = event.priority + 1;\n }\n }\n\n _prepareNode(props) {\n const key = this.key || '';\n let {\n to,\n from\n } = props;\n to = is.obj(to) ? to[key] : to;\n\n if (to == null || isAsyncTo(to)) {\n to = undefined;\n }\n\n from = is.obj(from) ? from[key] : from;\n\n if (from == null) {\n from = undefined;\n }\n\n const range = {\n to,\n from\n };\n\n if (!hasAnimated(this)) {\n if (props.reverse) [to, from] = [from, to];\n from = getFluidValue(from);\n\n if (!is.und(from)) {\n this._set(from);\n } else if (!getAnimated(this)) {\n this._set(to);\n }\n }\n\n return range;\n }\n\n _update(_ref, isLoop) {\n let props = _extends({}, _ref);\n\n const {\n key,\n defaultProps\n } = this;\n if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));\n mergeActiveFn(this, props, 'onProps');\n sendEvent(this, 'onProps', props, this);\n\n const range = this._prepareNode(props);\n\n if (Object.isFrozen(this)) {\n throw Error('Cannot animate a `SpringValue` object that is frozen. ' + 'Did you forget to pass your component to `animated(...)` before animating its props?');\n }\n\n const state = this._state;\n return scheduleProps(++this._lastCallId, {\n key,\n props,\n defaultProps,\n state,\n actions: {\n pause: () => {\n if (!isPaused(this)) {\n setPausedBit(this, true);\n flushCalls(state.pauseQueue);\n sendEvent(this, 'onPause', getFinishedResult(this, checkFinished(this, this.animation.to)), this);\n }\n },\n resume: () => {\n if (isPaused(this)) {\n setPausedBit(this, false);\n\n if (isAnimating(this)) {\n this._resume();\n }\n\n flushCalls(state.resumeQueue);\n sendEvent(this, 'onResume', getFinishedResult(this, checkFinished(this, this.animation.to)), this);\n }\n },\n start: this._merge.bind(this, range)\n }\n }).then(result => {\n if (props.loop && result.finished && !(isLoop && result.noop)) {\n const nextProps = createLoopUpdate(props);\n\n if (nextProps) {\n return this._update(nextProps, true);\n }\n }\n\n return result;\n });\n }\n\n _merge(range, props, resolve) {\n if (props.cancel) {\n this.stop(true);\n return resolve(getCancelledResult(this));\n }\n\n const hasToProp = !is.und(range.to);\n const hasFromProp = !is.und(range.from);\n\n if (hasToProp || hasFromProp) {\n if (props.callId > this._lastToId) {\n this._lastToId = props.callId;\n } else {\n return resolve(getCancelledResult(this));\n }\n }\n\n const {\n key,\n defaultProps,\n animation: anim\n } = this;\n const {\n to: prevTo,\n from: prevFrom\n } = anim;\n let {\n to = prevTo,\n from = prevFrom\n } = range;\n\n if (hasFromProp && !hasToProp && (!props.default || is.und(to))) {\n to = from;\n }\n\n if (props.reverse) [to, from] = [from, to];\n const hasFromChanged = !isEqual(from, prevFrom);\n\n if (hasFromChanged) {\n anim.from = from;\n }\n\n from = getFluidValue(from);\n const hasToChanged = !isEqual(to, prevTo);\n\n if (hasToChanged) {\n this._focus(to);\n }\n\n const hasAsyncTo = isAsyncTo(props.to);\n const {\n config\n } = anim;\n const {\n decay,\n velocity\n } = config;\n\n if (hasToProp || hasFromProp) {\n config.velocity = 0;\n }\n\n if (props.config && !hasAsyncTo) {\n mergeConfig(config, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);\n }\n\n let node = getAnimated(this);\n\n if (!node || is.und(to)) {\n return resolve(getFinishedResult(this, true));\n }\n\n const reset = is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key);\n const value = reset ? from : this.get();\n const goal = computeGoal(to);\n const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal);\n const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));\n\n if (hasToChanged) {\n const nodeType = getAnimatedType(to);\n\n if (nodeType !== node.constructor) {\n if (immediate) {\n node = this._set(goal);\n } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the \"to\" prop suggests`);\n }\n }\n\n const goalType = node.constructor;\n let started = hasFluidValue(to);\n let finished = false;\n\n if (!started) {\n const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;\n\n if (hasToChanged || hasValueChanged) {\n finished = isEqual(computeGoal(value), goal);\n started = !finished;\n }\n\n if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config.decay, decay) || !isEqual(config.velocity, velocity)) {\n started = true;\n }\n }\n\n if (finished && isAnimating(this)) {\n if (anim.changed && !reset) {\n started = true;\n } else if (!started) {\n this._stop(prevTo);\n }\n }\n\n if (!hasAsyncTo) {\n if (started || hasFluidValue(prevTo)) {\n anim.values = node.getPayload();\n anim.toValues = hasFluidValue(to) ? null : goalType == AnimatedString ? [1] : toArray(goal);\n }\n\n if (anim.immediate != immediate) {\n anim.immediate = immediate;\n\n if (!immediate && !reset) {\n this._set(prevTo);\n }\n }\n\n if (started) {\n const {\n onRest\n } = anim;\n each(ACTIVE_EVENTS, type => mergeActiveFn(this, props, type));\n const result = getFinishedResult(this, checkFinished(this, prevTo));\n flushCalls(this._pendingCalls, result);\n\n this._pendingCalls.add(resolve);\n\n if (anim.changed) raf.batchedUpdates(() => {\n anim.changed = !reset;\n onRest == null ? void 0 : onRest(result, this);\n\n if (reset) {\n callProp(defaultProps.onRest, result);\n } else {\n anim.onStart == null ? void 0 : anim.onStart(result, this);\n }\n });\n }\n }\n\n if (reset) {\n this._set(value);\n }\n\n if (hasAsyncTo) {\n resolve(runAsync(props.to, props, this._state, this));\n } else if (started) {\n this._start();\n } else if (isAnimating(this) && !hasToChanged) {\n this._pendingCalls.add(resolve);\n } else {\n resolve(getNoopResult(value));\n }\n }\n\n _focus(value) {\n const anim = this.animation;\n\n if (value !== anim.to) {\n if (getFluidObservers(this)) {\n this._detach();\n }\n\n anim.to = value;\n\n if (getFluidObservers(this)) {\n this._attach();\n }\n }\n }\n\n _attach() {\n let priority = 0;\n const {\n to\n } = this.animation;\n\n if (hasFluidValue(to)) {\n addFluidObserver(to, this);\n\n if (isFrameValue(to)) {\n priority = to.priority + 1;\n }\n }\n\n this.priority = priority;\n }\n\n _detach() {\n const {\n to\n } = this.animation;\n\n if (hasFluidValue(to)) {\n removeFluidObserver(to, this);\n }\n }\n\n _set(arg, idle = true) {\n const value = getFluidValue(arg);\n\n if (!is.und(value)) {\n const oldNode = getAnimated(this);\n\n if (!oldNode || !isEqual(value, oldNode.getValue())) {\n const nodeType = getAnimatedType(value);\n\n if (!oldNode || oldNode.constructor != nodeType) {\n setAnimated(this, nodeType.create(value));\n } else {\n oldNode.setValue(value);\n }\n\n if (oldNode) {\n raf.batchedUpdates(() => {\n this._onChange(value, idle);\n });\n }\n }\n }\n\n return getAnimated(this);\n }\n\n _onStart() {\n const anim = this.animation;\n\n if (!anim.changed) {\n anim.changed = true;\n sendEvent(this, 'onStart', getFinishedResult(this, checkFinished(this, anim.to)), this);\n }\n }\n\n _onChange(value, idle) {\n if (!idle) {\n this._onStart();\n\n callProp(this.animation.onChange, value, this);\n }\n\n callProp(this.defaultProps.onChange, value, this);\n\n super._onChange(value, idle);\n }\n\n _start() {\n const anim = this.animation;\n getAnimated(this).reset(getFluidValue(anim.to));\n\n if (!anim.immediate) {\n anim.fromValues = anim.values.map(node => node.lastPosition);\n }\n\n if (!isAnimating(this)) {\n setActiveBit(this, true);\n\n if (!isPaused(this)) {\n this._resume();\n }\n }\n }\n\n _resume() {\n if (Globals.skipAnimation) {\n this.finish();\n } else {\n frameLoop.start(this);\n }\n }\n\n _stop(goal, cancel) {\n if (isAnimating(this)) {\n setActiveBit(this, false);\n const anim = this.animation;\n each(anim.values, node => {\n node.done = true;\n });\n\n if (anim.toValues) {\n anim.onChange = anim.onPause = anim.onResume = undefined;\n }\n\n callFluidObservers(this, {\n type: 'idle',\n parent: this\n });\n const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));\n flushCalls(this._pendingCalls, result);\n\n if (anim.changed) {\n anim.changed = false;\n sendEvent(this, 'onRest', result, this);\n }\n }\n }\n\n}\n\nfunction checkFinished(target, to) {\n const goal = computeGoal(to);\n const value = computeGoal(target.get());\n return isEqual(value, goal);\n}\n\nfunction createLoopUpdate(props, loop = props.loop, to = props.to) {\n let loopRet = callProp(loop);\n\n if (loopRet) {\n const overrides = loopRet !== true && inferTo(loopRet);\n const reverse = (overrides || props).reverse;\n const reset = !overrides || overrides.reset;\n return createUpdate(_extends({}, props, {\n loop,\n default: false,\n pause: undefined,\n to: !reverse || isAsyncTo(to) ? to : undefined,\n from: reset ? props.from : undefined,\n reset\n }, overrides));\n }\n}\nfunction createUpdate(props) {\n const {\n to,\n from\n } = props = inferTo(props);\n const keys = new Set();\n if (is.obj(to)) findDefined(to, keys);\n if (is.obj(from)) findDefined(from, keys);\n props.keys = keys.size ? Array.from(keys) : null;\n return props;\n}\nfunction declareUpdate(props) {\n const update = createUpdate(props);\n\n if (is.und(update.default)) {\n update.default = getDefaultProps(update);\n }\n\n return update;\n}\n\nfunction findDefined(values, keys) {\n eachProp(values, (value, key) => value != null && keys.add(key));\n}\n\nconst ACTIVE_EVENTS = ['onStart', 'onRest', 'onChange', 'onPause', 'onResume'];\n\nfunction mergeActiveFn(target, props, type) {\n target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : undefined;\n}\n\nfunction sendEvent(target, type, ...args) {\n var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;\n\n (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);\n (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);\n}\n\nconst BATCHED_EVENTS = ['onStart', 'onChange', 'onRest'];\nlet nextId = 1;\nclass Controller {\n constructor(props, flush) {\n this.id = nextId++;\n this.springs = {};\n this.queue = [];\n this.ref = void 0;\n this._flush = void 0;\n this._initialProps = void 0;\n this._lastAsyncId = 0;\n this._active = new Set();\n this._changed = new Set();\n this._started = false;\n this._item = void 0;\n this._state = {\n paused: false,\n pauseQueue: new Set(),\n resumeQueue: new Set(),\n timeouts: new Set()\n };\n this._events = {\n onStart: new Map(),\n onChange: new Map(),\n onRest: new Map()\n };\n this._onFrame = this._onFrame.bind(this);\n\n if (flush) {\n this._flush = flush;\n }\n\n if (props) {\n this.start(_extends({\n default: true\n }, props));\n }\n }\n\n get idle() {\n return !this._state.asyncTo && Object.values(this.springs).every(spring => spring.idle);\n }\n\n get item() {\n return this._item;\n }\n\n set item(item) {\n this._item = item;\n }\n\n get() {\n const values = {};\n this.each((spring, key) => values[key] = spring.get());\n return values;\n }\n\n set(values) {\n for (const key in values) {\n const value = values[key];\n\n if (!is.und(value)) {\n this.springs[key].set(value);\n }\n }\n }\n\n update(props) {\n if (props) {\n this.queue.push(createUpdate(props));\n }\n\n return this;\n }\n\n start(props) {\n let {\n queue\n } = this;\n\n if (props) {\n queue = toArray(props).map(createUpdate);\n } else {\n this.queue = [];\n }\n\n if (this._flush) {\n return this._flush(this, queue);\n }\n\n prepareKeys(this, queue);\n return flushUpdateQueue(this, queue);\n }\n\n stop(arg, keys) {\n if (arg !== !!arg) {\n keys = arg;\n }\n\n if (keys) {\n const springs = this.springs;\n each(toArray(keys), key => springs[key].stop(!!arg));\n } else {\n stopAsync(this._state, this._lastAsyncId);\n this.each(spring => spring.stop(!!arg));\n }\n\n return this;\n }\n\n pause(keys) {\n if (is.und(keys)) {\n this.start({\n pause: true\n });\n } else {\n const springs = this.springs;\n each(toArray(keys), key => springs[key].pause());\n }\n\n return this;\n }\n\n resume(keys) {\n if (is.und(keys)) {\n this.start({\n pause: false\n });\n } else {\n const springs = this.springs;\n each(toArray(keys), key => springs[key].resume());\n }\n\n return this;\n }\n\n each(iterator) {\n eachProp(this.springs, iterator);\n }\n\n _onFrame() {\n const {\n onStart,\n onChange,\n onRest\n } = this._events;\n const active = this._active.size > 0;\n const changed = this._changed.size > 0;\n\n if (active && !this._started || changed && !this._started) {\n this._started = true;\n flush(onStart, ([onStart, result]) => {\n result.value = this.get();\n onStart(result, this, this._item);\n });\n }\n\n const idle = !active && this._started;\n const values = changed || idle && onRest.size ? this.get() : null;\n\n if (changed && onChange.size) {\n flush(onChange, ([onChange, result]) => {\n result.value = values;\n onChange(result, this, this._item);\n });\n }\n\n if (idle) {\n this._started = false;\n flush(onRest, ([onRest, result]) => {\n result.value = values;\n onRest(result, this, this._item);\n });\n }\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n this._changed.add(event.parent);\n\n if (!event.idle) {\n this._active.add(event.parent);\n }\n } else if (event.type == 'idle') {\n this._active.delete(event.parent);\n } else return;\n\n raf.onFrame(this._onFrame);\n }\n\n}\nfunction flushUpdateQueue(ctrl, queue) {\n return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(results => getCombinedResult(ctrl, results));\n}\nasync function flushUpdate(ctrl, props, isLoop) {\n const {\n keys,\n to,\n from,\n loop,\n onRest,\n onResolve\n } = props;\n const defaults = is.obj(props.default) && props.default;\n\n if (loop) {\n props.loop = false;\n }\n\n if (to === false) props.to = null;\n if (from === false) props.from = null;\n const asyncTo = is.arr(to) || is.fun(to) ? to : undefined;\n\n if (asyncTo) {\n props.to = undefined;\n props.onRest = undefined;\n\n if (defaults) {\n defaults.onRest = undefined;\n }\n } else {\n each(BATCHED_EVENTS, key => {\n const handler = props[key];\n\n if (is.fun(handler)) {\n const queue = ctrl['_events'][key];\n\n props[key] = ({\n finished,\n cancelled\n }) => {\n const result = queue.get(handler);\n\n if (result) {\n if (!finished) result.finished = false;\n if (cancelled) result.cancelled = true;\n } else {\n queue.set(handler, {\n value: null,\n finished: finished || false,\n cancelled: cancelled || false\n });\n }\n };\n\n if (defaults) {\n defaults[key] = props[key];\n }\n }\n });\n }\n\n const state = ctrl['_state'];\n\n if (props.pause === !state.paused) {\n state.paused = props.pause;\n flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);\n } else if (state.paused) {\n props.pause = true;\n }\n\n const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props));\n const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true;\n\n if (asyncTo || cancel && state.asyncId) {\n promises.push(scheduleProps(++ctrl['_lastAsyncId'], {\n props,\n state,\n actions: {\n pause: noop,\n resume: noop,\n\n start(props, resolve) {\n if (cancel) {\n stopAsync(state, ctrl['_lastAsyncId']);\n resolve(getCancelledResult(ctrl));\n } else {\n props.onRest = onRest;\n resolve(runAsync(asyncTo, props, state, ctrl));\n }\n }\n\n }\n }));\n }\n\n if (state.paused) {\n await new Promise(resume => {\n state.resumeQueue.add(resume);\n });\n }\n\n const result = getCombinedResult(ctrl, await Promise.all(promises));\n\n if (loop && result.finished && !(isLoop && result.noop)) {\n const nextProps = createLoopUpdate(props, loop, to);\n\n if (nextProps) {\n prepareKeys(ctrl, [nextProps]);\n return flushUpdate(ctrl, nextProps, true);\n }\n }\n\n if (onResolve) {\n raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));\n }\n\n return result;\n}\nfunction getSprings(ctrl, props) {\n const springs = _extends({}, ctrl.springs);\n\n if (props) {\n each(toArray(props), props => {\n if (is.und(props.keys)) {\n props = createUpdate(props);\n }\n\n if (!is.obj(props.to)) {\n props = _extends({}, props, {\n to: undefined\n });\n }\n\n prepareSprings(springs, props, key => {\n return createSpring(key);\n });\n });\n }\n\n setSprings(ctrl, springs);\n return springs;\n}\nfunction setSprings(ctrl, springs) {\n eachProp(springs, (spring, key) => {\n if (!ctrl.springs[key]) {\n ctrl.springs[key] = spring;\n addFluidObserver(spring, ctrl);\n }\n });\n}\n\nfunction createSpring(key, observer) {\n const spring = new SpringValue();\n spring.key = key;\n\n if (observer) {\n addFluidObserver(spring, observer);\n }\n\n return spring;\n}\n\nfunction prepareSprings(springs, props, create) {\n if (props.keys) {\n each(props.keys, key => {\n const spring = springs[key] || (springs[key] = create(key));\n spring['_prepareNode'](props);\n });\n }\n}\n\nfunction prepareKeys(ctrl, queue) {\n each(queue, props => {\n prepareSprings(ctrl.springs, props, key => {\n return createSpring(key, ctrl);\n });\n });\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst _excluded$3 = [\"children\"];\nconst SpringContext = _ref => {\n let {\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded$3);\n\n const inherited = useContext(ctx);\n const pause = props.pause || !!inherited.pause,\n immediate = props.immediate || !!inherited.immediate;\n props = useMemoOne(() => ({\n pause,\n immediate\n }), [pause, immediate]);\n const {\n Provider\n } = ctx;\n return React.createElement(Provider, {\n value: props\n }, children);\n};\nconst ctx = makeContext(SpringContext, {});\nSpringContext.Provider = ctx.Provider;\nSpringContext.Consumer = ctx.Consumer;\n\nfunction makeContext(target, init) {\n Object.assign(target, React.createContext(init));\n target.Provider._context = target;\n target.Consumer._context = target;\n return target;\n}\n\nconst SpringRef = () => {\n const current = [];\n\n const SpringRef = function SpringRef(props) {\n deprecateDirectCall();\n const results = [];\n each(current, (ctrl, i) => {\n if (is.und(props)) {\n results.push(ctrl.start());\n } else {\n const update = _getProps(props, ctrl, i);\n\n if (update) {\n results.push(ctrl.start(update));\n }\n }\n });\n return results;\n };\n\n SpringRef.current = current;\n\n SpringRef.add = function (ctrl) {\n if (!current.includes(ctrl)) {\n current.push(ctrl);\n }\n };\n\n SpringRef.delete = function (ctrl) {\n const i = current.indexOf(ctrl);\n if (~i) current.splice(i, 1);\n };\n\n SpringRef.pause = function () {\n each(current, ctrl => ctrl.pause(...arguments));\n return this;\n };\n\n SpringRef.resume = function () {\n each(current, ctrl => ctrl.resume(...arguments));\n return this;\n };\n\n SpringRef.set = function (values) {\n each(current, ctrl => ctrl.set(values));\n };\n\n SpringRef.start = function (props) {\n const results = [];\n each(current, (ctrl, i) => {\n if (is.und(props)) {\n results.push(ctrl.start());\n } else {\n const update = this._getProps(props, ctrl, i);\n\n if (update) {\n results.push(ctrl.start(update));\n }\n }\n });\n return results;\n };\n\n SpringRef.stop = function () {\n each(current, ctrl => ctrl.stop(...arguments));\n return this;\n };\n\n SpringRef.update = function (props) {\n each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));\n return this;\n };\n\n const _getProps = function _getProps(arg, ctrl, index) {\n return is.fun(arg) ? arg(index, ctrl) : arg;\n };\n\n SpringRef._getProps = _getProps;\n return SpringRef;\n};\n\nfunction useSprings(length, props, deps) {\n const propsFn = is.fun(props) && props;\n if (propsFn && !deps) deps = [];\n const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);\n const layoutId = useRef(0);\n const forceUpdate = useForceUpdate();\n const state = useMemo(() => ({\n ctrls: [],\n queue: [],\n\n flush(ctrl, updates) {\n const springs = getSprings(ctrl, updates);\n const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs).some(key => !ctrl.springs[key]);\n return canFlushSync ? flushUpdateQueue(ctrl, updates) : new Promise(resolve => {\n setSprings(ctrl, springs);\n state.queue.push(() => {\n resolve(flushUpdateQueue(ctrl, updates));\n });\n forceUpdate();\n });\n }\n\n }), []);\n const ctrls = useRef([...state.ctrls]);\n const updates = [];\n const prevLength = usePrev(length) || 0;\n useMemo(() => {\n each(ctrls.current.slice(length, prevLength), ctrl => {\n detachRefs(ctrl, ref);\n ctrl.stop(true);\n });\n ctrls.current.length = length;\n declareUpdates(prevLength, length);\n }, [length]);\n useMemo(() => {\n declareUpdates(0, Math.min(prevLength, length));\n }, deps);\n\n function declareUpdates(startIndex, endIndex) {\n for (let i = startIndex; i < endIndex; i++) {\n const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush));\n const update = propsFn ? propsFn(i, ctrl) : props[i];\n\n if (update) {\n updates[i] = declareUpdate(update);\n }\n }\n }\n\n const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));\n const context = useContext(SpringContext);\n const prevContext = usePrev(context);\n const hasContext = context !== prevContext && hasProps(context);\n useLayoutEffect(() => {\n layoutId.current++;\n state.ctrls = ctrls.current;\n const {\n queue\n } = state;\n\n if (queue.length) {\n state.queue = [];\n each(queue, cb => cb());\n }\n\n each(ctrls.current, (ctrl, i) => {\n ref == null ? void 0 : ref.add(ctrl);\n\n if (hasContext) {\n ctrl.start({\n default: context\n });\n }\n\n const update = updates[i];\n\n if (update) {\n replaceRef(ctrl, update.ref);\n\n if (ctrl.ref) {\n ctrl.queue.push(update);\n } else {\n ctrl.start(update);\n }\n }\n });\n });\n useOnce(() => () => {\n each(state.ctrls, ctrl => ctrl.stop(true));\n });\n const values = springs.map(x => _extends({}, x));\n return ref ? [values, ref] : values;\n}\n\nfunction useSpring(props, deps) {\n const isFn = is.fun(props);\n const [[values], ref] = useSprings(1, isFn ? props : [props], isFn ? deps || [] : deps);\n return isFn || arguments.length == 2 ? [values, ref] : values;\n}\n\nconst initSpringRef = () => SpringRef();\n\nconst useSpringRef = () => useState(initSpringRef)[0];\n\nfunction useTrail(length, propsArg, deps) {\n const propsFn = is.fun(propsArg) && propsArg;\n if (propsFn && !deps) deps = [];\n let reverse = true;\n const result = useSprings(length, (i, ctrl) => {\n const props = propsFn ? propsFn(i, ctrl) : propsArg;\n reverse = reverse && props.reverse;\n return props;\n }, deps || [{}]);\n const ref = result[1];\n useLayoutEffect(() => {\n each(ref.current, (ctrl, i) => {\n const parent = ref.current[i + (reverse ? 1 : -1)];\n if (parent) ctrl.start({\n to: parent.springs\n });\n });\n }, deps);\n\n if (propsFn || arguments.length == 3) {\n ref['_getProps'] = (propsArg, ctrl, i) => {\n const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg;\n\n if (props) {\n const parent = ref.current[i + (props.reverse ? 1 : -1)];\n if (parent) props.to = parent.springs;\n return props;\n }\n };\n\n return result;\n }\n\n return result[0];\n}\n\nlet TransitionPhase;\n\n(function (TransitionPhase) {\n TransitionPhase[\"MOUNT\"] = \"mount\";\n TransitionPhase[\"ENTER\"] = \"enter\";\n TransitionPhase[\"UPDATE\"] = \"update\";\n TransitionPhase[\"LEAVE\"] = \"leave\";\n})(TransitionPhase || (TransitionPhase = {}));\n\nfunction useTransition(data, props, deps) {\n const propsFn = is.fun(props) && props;\n const {\n reset,\n sort,\n trail = 0,\n expires = true,\n onDestroyed,\n ref: propsRef,\n config: propsConfig\n } = propsFn ? propsFn() : props;\n const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);\n const items = toArray(data);\n const transitions = [];\n const usedTransitions = useRef(null);\n const prevTransitions = reset ? null : usedTransitions.current;\n useLayoutEffect(() => {\n usedTransitions.current = transitions;\n });\n useOnce(() => () => each(usedTransitions.current, t => {\n if (t.expired) {\n clearTimeout(t.expirationId);\n }\n\n detachRefs(t.ctrl, ref);\n t.ctrl.stop(true);\n }));\n const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);\n const expired = reset && usedTransitions.current || [];\n useLayoutEffect(() => each(expired, ({\n ctrl,\n item,\n key\n }) => {\n detachRefs(ctrl, ref);\n callProp(onDestroyed, item, key);\n }));\n const reused = [];\n if (prevTransitions) each(prevTransitions, (t, i) => {\n if (t.expired) {\n clearTimeout(t.expirationId);\n expired.push(t);\n } else {\n i = reused[i] = keys.indexOf(t.key);\n if (~i) transitions[i] = t;\n }\n });\n each(items, (item, i) => {\n if (!transitions[i]) {\n transitions[i] = {\n key: keys[i],\n item,\n phase: TransitionPhase.MOUNT,\n ctrl: new Controller()\n };\n transitions[i].ctrl.item = item;\n }\n });\n\n if (reused.length) {\n let i = -1;\n const {\n leave\n } = propsFn ? propsFn() : props;\n each(reused, (keyIndex, prevIndex) => {\n const t = prevTransitions[prevIndex];\n\n if (~keyIndex) {\n i = transitions.indexOf(t);\n transitions[i] = _extends({}, t, {\n item: items[keyIndex]\n });\n } else if (leave) {\n transitions.splice(++i, 0, t);\n }\n });\n }\n\n if (is.fun(sort)) {\n transitions.sort((a, b) => sort(a.item, b.item));\n }\n\n let delay = -trail;\n const forceUpdate = useForceUpdate();\n const defaultProps = getDefaultProps(props);\n const changes = new Map();\n each(transitions, (t, i) => {\n const key = t.key;\n const prevPhase = t.phase;\n const p = propsFn ? propsFn() : props;\n let to;\n let phase;\n let propsDelay = callProp(p.delay || 0, key);\n\n if (prevPhase == TransitionPhase.MOUNT) {\n to = p.enter;\n phase = TransitionPhase.ENTER;\n } else {\n const isLeave = keys.indexOf(key) < 0;\n\n if (prevPhase != TransitionPhase.LEAVE) {\n if (isLeave) {\n to = p.leave;\n phase = TransitionPhase.LEAVE;\n } else if (to = p.update) {\n phase = TransitionPhase.UPDATE;\n } else return;\n } else if (!isLeave) {\n to = p.enter;\n phase = TransitionPhase.ENTER;\n } else return;\n }\n\n to = callProp(to, t.item, i);\n to = is.obj(to) ? inferTo(to) : {\n to\n };\n\n if (!to.config) {\n const config = propsConfig || defaultProps.config;\n to.config = callProp(config, t.item, i, phase);\n }\n\n delay += trail;\n\n const payload = _extends({}, defaultProps, {\n delay: propsDelay + delay,\n ref: propsRef,\n immediate: p.immediate,\n reset: false\n }, to);\n\n if (phase == TransitionPhase.ENTER && is.und(payload.from)) {\n const _p = propsFn ? propsFn() : props;\n\n const from = is.und(_p.initial) || prevTransitions ? _p.from : _p.initial;\n payload.from = callProp(from, t.item, i);\n }\n\n const {\n onResolve\n } = payload;\n\n payload.onResolve = result => {\n callProp(onResolve, result);\n const transitions = usedTransitions.current;\n const t = transitions.find(t => t.key === key);\n if (!t) return;\n\n if (result.cancelled && t.phase != TransitionPhase.UPDATE) {\n return;\n }\n\n if (t.ctrl.idle) {\n const idle = transitions.every(t => t.ctrl.idle);\n\n if (t.phase == TransitionPhase.LEAVE) {\n const expiry = callProp(expires, t.item);\n\n if (expiry !== false) {\n const expiryMs = expiry === true ? 0 : expiry;\n t.expired = true;\n\n if (!idle && expiryMs > 0) {\n if (expiryMs <= 0x7fffffff) t.expirationId = setTimeout(forceUpdate, expiryMs);\n return;\n }\n }\n }\n\n if (idle && transitions.some(t => t.expired)) {\n forceUpdate();\n }\n }\n };\n\n const springs = getSprings(t.ctrl, payload);\n changes.set(t, {\n phase,\n springs,\n payload\n });\n });\n const context = useContext(SpringContext);\n const prevContext = usePrev(context);\n const hasContext = context !== prevContext && hasProps(context);\n useLayoutEffect(() => {\n if (hasContext) each(transitions, t => {\n t.ctrl.start({\n default: context\n });\n });\n }, [context]);\n useLayoutEffect(() => {\n each(changes, ({\n phase,\n payload\n }, t) => {\n const {\n ctrl\n } = t;\n t.phase = phase;\n ref == null ? void 0 : ref.add(ctrl);\n\n if (hasContext && phase == TransitionPhase.ENTER) {\n ctrl.start({\n default: context\n });\n }\n\n if (payload) {\n replaceRef(ctrl, payload.ref);\n\n if (ctrl.ref) {\n ctrl.update(payload);\n } else {\n ctrl.start(payload);\n }\n }\n });\n }, reset ? void 0 : deps);\n\n const renderTransitions = render => React.createElement(React.Fragment, null, transitions.map((t, i) => {\n const {\n springs\n } = changes.get(t) || t.ctrl;\n const elem = render(_extends({}, springs), t.item, t, i);\n return elem && elem.type ? React.createElement(elem.type, _extends({}, elem.props, {\n key: is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id,\n ref: elem.ref\n })) : elem;\n }));\n\n return ref ? [renderTransitions, ref] : renderTransitions;\n}\nlet nextKey = 1;\n\nfunction getKeys(items, {\n key,\n keys = key\n}, prevTransitions) {\n if (keys === null) {\n const reused = new Set();\n return items.map(item => {\n const t = prevTransitions && prevTransitions.find(t => t.item === item && t.phase !== TransitionPhase.LEAVE && !reused.has(t));\n\n if (t) {\n reused.add(t);\n return t.key;\n }\n\n return nextKey++;\n });\n }\n\n return is.und(keys) ? items : is.fun(keys) ? items.map(keys) : toArray(keys);\n}\n\nconst _excluded$2 = [\"children\"];\nfunction Spring(_ref) {\n let {\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n return children(useSpring(props));\n}\n\nconst _excluded$1 = [\"items\", \"children\"];\nfunction Trail(_ref) {\n let {\n items,\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n const trails = useTrail(items.length, props);\n return items.map((item, index) => {\n const result = children(item, index);\n return is.fun(result) ? result(trails[index]) : result;\n });\n}\n\nconst _excluded = [\"items\", \"children\"];\nfunction Transition(_ref) {\n let {\n items,\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return useTransition(items, props)(children);\n}\n\nclass Interpolation extends FrameValue {\n constructor(source, args) {\n super();\n this.key = void 0;\n this.idle = true;\n this.calc = void 0;\n this._active = new Set();\n this.source = source;\n this.calc = createInterpolator(...args);\n\n const value = this._get();\n\n const nodeType = getAnimatedType(value);\n setAnimated(this, nodeType.create(value));\n }\n\n advance(_dt) {\n const value = this._get();\n\n const oldValue = this.get();\n\n if (!isEqual(value, oldValue)) {\n getAnimated(this).setValue(value);\n\n this._onChange(value, this.idle);\n }\n\n if (!this.idle && checkIdle(this._active)) {\n becomeIdle(this);\n }\n }\n\n _get() {\n const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));\n return this.calc(...inputs);\n }\n\n _start() {\n if (this.idle && !checkIdle(this._active)) {\n this.idle = false;\n each(getPayload(this), node => {\n node.done = false;\n });\n\n if (Globals.skipAnimation) {\n raf.batchedUpdates(() => this.advance());\n becomeIdle(this);\n } else {\n frameLoop.start(this);\n }\n }\n }\n\n _attach() {\n let priority = 1;\n each(toArray(this.source), source => {\n if (hasFluidValue(source)) {\n addFluidObserver(source, this);\n }\n\n if (isFrameValue(source)) {\n if (!source.idle) {\n this._active.add(source);\n }\n\n priority = Math.max(priority, source.priority + 1);\n }\n });\n this.priority = priority;\n\n this._start();\n }\n\n _detach() {\n each(toArray(this.source), source => {\n if (hasFluidValue(source)) {\n removeFluidObserver(source, this);\n }\n });\n\n this._active.clear();\n\n becomeIdle(this);\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n if (event.idle) {\n this.advance();\n } else {\n this._active.add(event.parent);\n\n this._start();\n }\n } else if (event.type == 'idle') {\n this._active.delete(event.parent);\n } else if (event.type == 'priority') {\n this.priority = toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);\n }\n }\n\n}\n\nfunction isIdle(source) {\n return source.idle !== false;\n}\n\nfunction checkIdle(active) {\n return !active.size || Array.from(active).every(isIdle);\n}\n\nfunction becomeIdle(self) {\n if (!self.idle) {\n self.idle = true;\n each(getPayload(self), node => {\n node.done = true;\n });\n callFluidObservers(self, {\n type: 'idle',\n parent: self\n });\n }\n}\n\nconst to = (source, ...args) => new Interpolation(source, args);\nconst interpolate = (source, ...args) => (deprecateInterpolate(), new Interpolation(source, args));\n\nGlobals.assign({\n createStringInterpolator,\n to: (source, args) => new Interpolation(source, args)\n});\nconst update = frameLoop.advance;\n\nexport { BailSignal, Controller, FrameValue, Interpolation, Spring, SpringContext, SpringRef, SpringValue, Trail, Transition, config, inferTo, interpolate, to, update, useChain, useSpring, useSpringRef, useSprings, useTrail, useTransition };\n","import{_ as n}from\"./tslib.es6-357e9a40.js\";import e,{useState as i,useRef as r,useCallback as o,useEffect as t}from\"react\";import\"./base-4b9fb6d0.js\";import{s as a}from\"./style-inject.es-acdf7ad9.js\";import{c as s}from\"./classNames-3b02355b.js\";import{u as l}from\"./useTheme-e1250e21.js\";import d from\"lodash.uniqueid\";var c=\"LoadingSpinner-module_notificationArea__1arIM\",p=\"LoadingSpinner-module_loadingSpinner__2xHT_\",m=\"LoadingSpinner-module_small__1McRk\",u=\"LoadingSpinner-module_multicolor__1qbEF\";a(\".LoadingSpinner-module_notificationArea__1arIM{border:0;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.LoadingSpinner-module_loadingSpinner__2xHT_{--spinner-size:4rem;--spinner-color:var(--color-coat-of-arms);--spinner-thickness:0.5rem;--spinner-rotation-animation-duration:1.5s;--spinner-color-animation-duration:4.5s;--spinner-color-stage1:var(--color-coat-of-arms);--spinner-color-stage2:var(--color-copper);--spinner-color-stage3:var(--color-suomenlinna);border-top-color:var(--spinner-color);height:var(--spinner-size);position:relative;width:var(--spinner-size)}.LoadingSpinner-module_loadingSpinner__2xHT_ div{animation:LoadingSpinner-module_spinner-rotation-animation__PEk45 var(--spinner-rotation-animation-duration) cubic-bezier(.6,.2,.4,.8) infinite;border:var(--spinner-thickness) solid transparent;border-radius:50%;border-top-color:inherit;box-sizing:border-box;height:100%;position:absolute;width:100%}.LoadingSpinner-module_loadingSpinner__2xHT_ div:nth-child(2){animation-delay:-.15s}.LoadingSpinner-module_loadingSpinner__2xHT_ div:nth-child(3){animation-delay:-.3s}.LoadingSpinner-module_small__1McRk{--spinner-size:1.5rem;--spinner-thickness:0.1875rem}.LoadingSpinner-module_multicolor__1qbEF{animation:LoadingSpinner-module_spinner-color-animation__Yu7Cr var(--spinner-color-animation-duration) cubic-bezier(.6,.2,.4,.9) infinite;border-top-color:var(--spinner-color-stage1)}@keyframes LoadingSpinner-module_spinner-rotation-animation__PEk45{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes LoadingSpinner-module_spinner-color-animation__Yu7Cr{33.3%{border-top-color:var(--spinner-color-stage2)}66.6%{border-top-color:var(--spinner-color-stage3)}}\");const _=\"hds-loading-spinner-notification-area\",g=\"data-active-spinners\",h=()=>\"undefined\"==typeof document?null:document.getElementById(_)||(()=>{const n=document.createElement(\"div\");return n.id=_,n.className=c,n.setAttribute(\"role\",\"status\"),document.body.appendChild(n),n})(),b=a=>{var{className:c,multicolor:_=!1,small:b=!1,theme:v,loadingText:f=\"Page is loading\",loadingFinishedText:S=\"Page has finished loading\"}=a,x=n(a,[\"className\",\"multicolor\",\"small\",\"theme\",\"loadingText\",\"loadingFinishedText\"]);const L=l(p,v);return((n,e)=>{const[a]=i(d()),[s]=i(n),[l]=i(e),c=r(h()),p=o((()=>{null!==c.current&&(c.current.textContent=s)}),[c,s]),m=o((()=>{c.current.textContent=l}),[c,l]),u=o((()=>(c.current.getAttribute(g)||\"\").split(\",\").filter((n=>\"\"!==n))),[c]),_=o((()=>{const n=u();n.push(a),c.current.setAttribute(g,n.join(\",\"))}),[u,c,a]),b=o((()=>{const n=u().filter((n=>n!==a));c.current.setAttribute(g,n.join(\",\"))}),[u,c,a]),v=o((()=>{0===u().length&&(m(),setTimeout((()=>{0===u().length&&c.current.parentNode&&c.current.parentNode.removeChild(c.current)}),1e3))}),[u,m,c]);t((()=>null===c.current?()=>null:(p(),_(),()=>{b(),v()})),[p,_,b,v])})(f,S),e.createElement(\"div\",Object.assign({className:s(p,b&&m,_&&u,L,c)},x),e.createElement(\"div\",null),e.createElement(\"div\",null),e.createElement(\"div\",null))};export{b as L};\n","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import t from\"react\";import{s as e}from\"./style-inject.es-acdf7ad9.js\";import{c as o}from\"./classNames-3b02355b.js\";var i=\"RequiredIndicator-module_indicator__Pt7GX text-input_hds-text-input__required__2K-Bs\";e(\"@keyframes text-input_fadeIn__2iVIH{0%{opacity:0}to{opacity:1}}.text-input_hds-text-input__2YbWJ{--border-width:2px;--outline-width:3px;--input-height:56px;--textarea-height:149px;--icon-size:var(--spacing-m);--helper-color-default:var(--color-black-60);--helper-color-invalid:var(--color-error);--helper-color-success:var(--color-success);--helper-color-info:var(--color-black-90);--helper-color-info-icon:var(--color-coat-of-arms);--icon-color-invalid:var(--color-error);--input-background-default:var(--color-white);--input-background-disabled:var(--color-black-10);--input-border-color-default:var(--color-black-50);--input-border-color-hover:var(--color-black-90);--input-border-color-focus:var(--color-black-90);--input-border-color-invalid:var(--color-error);--input-border-color-disabled:var(--color-black-10);--input-border-color-success:var(--color-success);--input-color-default:var(--color-black-90);--input-color-disabled:var(--color-black-40);--label-color-default:var(--color-black-90);--label-color-invalid:var(--color-black-90);--placeholder-color:var(--color-black-60)}.text-input_hds-text-input__2YbWJ .text-input_hds-text-input__input__BIkQu{-webkit-appearance:none;background-color:var(--input-background-default);border:var(--border-width) solid var(--input-border-color-default);border-radius:0;box-sizing:border-box;color:var(--input-color-default);font-family:inherit;font-size:1.125em;height:var(--input-height);line-height:normal;margin:0;padding:0 var(--spacing-s);width:100%;will-change:transform,box-shadow}.text-input_hds-text-input__2YbWJ .text-input_hds-text-input__input__BIkQu:hover{border-color:var(--input-border-color-hover);transition:border-color 85ms ease-out}.text-input_hds-text-input__input-wrapper__3qg76:focus-within .text-input_hds-text-input__input__BIkQu{border-color:var(--input-border-color-focus);outline:none}.text-input_hds-text-input__2YbWJ.text-input_hds-text-input--invalid__25oHc .text-input_hds-text-input__input__BIkQu{border-color:var(--input-border-color-invalid)}.text-input_hds-text-input__2YbWJ.text-input_hds-text-input--success__28-SV .text-input_hds-text-input__input__BIkQu{border-color:var(--input-border-color-success)}.text-input_hds-text-input__input-wrapper__3qg76:focus-within .text-input_hds-text-input__input__BIkQu:not([readonly]){box-shadow:0 0 0 var(--outline-width) var(--color-focus-outline);transform:translateZ(0);transition:85ms ease-out;transition-property:box-shadow,transform}.text-input_hds-text-input__label__15SYz{color:var(--label-color-default);display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.text-input_hds-text-input--invalid__25oHc .text-input_hds-text-input__label__15SYz{color:var(--label-color-invalid);transition:color 85ms linear}.text-input_hds-text-input__required__2K-Bs{color:var(--color-black-90);display:inline-block;font-size:var(--fontsize-body-xl);line-height:1;margin-left:var(--spacing-2-xs);transform:translateY(var(--spacing-3-xs))}.text-input_hds-text-input__input-wrapper__3qg76{display:flex;position:relative}.text-input_hds-text-input__2YbWJ textarea.text-input_hds-text-input__input__BIkQu{font-family:inherit;height:var(--textarea-height);margin:0;min-height:var(--input-height);overflow:auto;padding:var(--spacing-s);resize:vertical}.text-input_hds-text-input__2YbWJ .text-input_hds-text-input__input__BIkQu::-moz-placeholder{color:var(--placeholder-color);opacity:1}.text-input_hds-text-input__2YbWJ .text-input_hds-text-input__input__BIkQu::placeholder{color:var(--placeholder-color);opacity:1}.text-input_hds-text-input__helper-text__gNPue{color:var(--helper-color-default)}.text-input_hds-text-input__error-text__2Qjmg,.text-input_hds-text-input__helper-text__gNPue{display:block;font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-top:var(--spacing-3-xs);white-space:pre-line}.text-input_hds-text-input__error-text__2Qjmg{color:var(--helper-color-invalid);padding-left:calc(var(--icon-size) + var(--spacing-2-xs));position:relative}.text-input_hds-text-input__error-text__2Qjmg:not(:last-child){margin-bottom:var(--spacing-2-xs)}.text-input_hds-text-input__error-text__2Qjmg:before{animation:text-input_fadeIn__2iVIH 85ms ease-out;background:var(--icon-color-invalid);content:\\\"\\\";height:var(--icon-size);left:0;-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");pointer-events:none;position:absolute;top:0;width:var(--icon-size)}.text-input_hds-text-input__success-text__274NH{color:var(--helper-color-success);display:block;font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-top:var(--spacing-3-xs);padding-left:calc(var(--icon-size) + var(--spacing-2-xs));position:relative;white-space:pre-wrap}.text-input_hds-text-input__success-text__274NH:not(:last-child){margin-bottom:var(--spacing-2-xs)}.text-input_hds-text-input__success-text__274NH:before{animation:text-input_fadeIn__2iVIH 85ms ease-out;background:var(--helper-color-success);content:\\\"\\\";height:var(--icon-size);left:0;-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 100 18 9 9 0 000-18zm4.5 5L18 9.5 10.5 17 6 12.5 7.5 11l3 3 6-6z'/%3E%3C/g%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 100 18 9 9 0 000-18zm4.5 5L18 9.5 10.5 17 6 12.5 7.5 11l3 3 6-6z'/%3E%3C/g%3E%3C/svg%3E\\\");pointer-events:none;position:absolute;top:0;width:var(--icon-size)}.text-input_hds-text-input__info-text__1hF9o{color:var(--helper-color-info);display:block;font-size:var(--fontsize-body-m);line-height:var(--lineheight-l);margin-top:var(--spacing-3-xs);padding-left:calc(var(--icon-size) + var(--spacing-2-xs));position:relative}.text-input_hds-text-input__info-text__1hF9o:not(:last-child){margin-bottom:var(--spacing-2-xs)}.text-input_hds-text-input__info-text__1hF9o:before{animation:text-input_fadeIn__2iVIH 85ms ease-out;background:var(--helper-color-info-icon);content:\\\"\\\";height:var(--icon-size);left:0;-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'/%3E%3Cpath fill='currentColor' d='M12 3a9 9 0 110 18 9 9 0 010-18zm1 13v2h-2v-2h2zm0-10v8h-2V6h2z'/%3E%3C/g%3E%3C/svg%3E\\\");pointer-events:none;position:absolute;top:0;width:var(--icon-size)}.text-input_hds-text-input__2YbWJ .text-input_hds-text-input__input__BIkQu[disabled]{background-color:var(--input-background-disabled);border-color:var(--input-border-color-disabled);color:var(--input-color-disabled);cursor:not-allowed}.text-input_hds-text-input__2YbWJ .text-input_hds-text-input__input__BIkQu[readonly]{background-color:transparent;border:0;color:var(--input-color-default);padding:0;-webkit-text-fill-color:var(--input-color-default)}.text-input_hds-text-input__buttons__1eV1P{align-items:center;bottom:0;display:flex;font-size:1rem;justify-content:center;margin-right:calc(var(--spacing-s) - var(--spacing-xs) / 2);position:absolute;right:0;top:0}.text-input_hds-text-input__button__1JeYJ{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:flex;font:inherit;outline:none;padding:var(--spacing-xs) calc(var(--spacing-xs) / 2)}.text-input_hds-text-input__button__1JeYJ:focus{outline:var(--outline-width) solid var(--color-focus-outline)}\");const r=e=>{let{className:r,style:n}=e;return t.createElement(\"span\",{className:o(i,r),style:n},\"*\")};export{r as R};\n","import{_ as e}from\"./tslib.es6-357e9a40.js\";import t from\"react\";import{s as l}from\"./style-inject.es-acdf7ad9.js\";import{R as o}from\"./RequiredIndicator-6311dba6.js\";import{T as a}from\"./Tooltip-a2381194.js\";var i=\"FieldLabel-module_hidden__3UWxI\",r=\"FieldLabel-module_label__1zrXK\",d=\"FieldLabel-module_tooltipButton__1My3f\";l(\".FieldLabel-module_hidden__3UWxI{border:0;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.FieldLabel-module_label__1zrXK{color:var(--label-color-default,var(--color-black-90));display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.FieldLabel-module_tooltipButton__1My3f{position:absolute;right:0;top:0}\");const n=l=>{var{hidden:n,id:s,inputId:p,isAriaLabelledBy:b,label:m,required:u,tooltipLabel:c,tooltipButtonLabel:_,tooltipText:L}=l,f=e(l,[\"hidden\",\"id\",\"inputId\",\"isAriaLabelledBy\",\"label\",\"required\",\"tooltipLabel\",\"tooltipButtonLabel\",\"tooltipText\"]);return t.createElement(t.Fragment,null,t.createElement(\"label\",Object.assign({id:s},(!b||!s)&&{htmlFor:p},{className:`${r} ${n?i:\"\"}`},f),m,u&&t.createElement(o,null)),L&&t.createElement(a,{buttonClassName:d,tooltipLabel:c,buttonLabel:_},L))};export{n as F};\n","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"angle-up\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:n=\"s\",style:c={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[n],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:c},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M12 11.5L17 16.5L18.5 15L12 8.5L5.5 15L7 16.5L12 11.5Z\",fill:\"currentColor\"}))};export{a as I};\n","import e from\"react\";import{s as a}from\"./Icon.module-72af7a76.js\";const l=l=>{let{ariaLabel:r=\"menu-hamburger\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:n=\"s\",style:m={}}=l;return e.createElement(\"svg\",{className:[a.icon,a[n],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:m},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M22 17V19H2V17H22ZM22 11V13H2V11H22ZM22 5V7H2V5H22Z\",fill:\"currentColor\"}))};export{l as I};\n","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"link-external\",ariaLabelledby:o,ariaHidden:i=!0,className:t=\"\",color:s,size:n=\"s\",style:c={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[n],t].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:s,style:c},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M5 3V19H21V21H3V3H5ZM21 3V12H19V6.413L9.91421 15.5L8.5 14.0858L17.585 5H12V3H21Z\",fill:\"currentColor\"}))};export{a as I};\n","import objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\nimport React, {ReactNode, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react';\n\n// To support SSR, the auto incrementing id counter is stored in a context. This allows\n// it to be reset on every request to ensure the client and server are consistent.\n// There is also a prefix string that is used to support async loading components\n// Each async boundary must be wrapped in an SSR provider, which appends to the prefix\n// and resets the current id counter. This ensures that async loaded components have\n// consistent ids regardless of the loading order.\ninterface SSRContextValue {\n prefix: string,\n current: number,\n isSSR: boolean\n}\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst defaultContext: SSRContextValue = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0,\n isSSR: false\n};\n\nconst SSRContext = React.createContext(defaultContext);\n\nexport interface SSRProviderProps {\n /** Your application here. */\n children: ReactNode\n}\n\n// This is only used in React < 18.\nfunction LegacySSRProvider(props: SSRProviderProps): JSX.Element {\n let cur = useContext(SSRContext);\n let counter = useCounter(cur === defaultContext);\n let [isSSR, setIsSSR] = useState(true);\n let value: SSRContextValue = useMemo(() => ({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0,\n isSSR\n }), [cur, counter, isSSR]);\n\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') {\n // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useLayoutEffect(() => {\n setIsSSR(false);\n }, []);\n }\n\n return (\n \n {props.children}\n \n );\n}\n\nlet warnedAboutSSRProvider = false;\n\n/**\n * When using SSR with React Aria in React 16 or 17, applications must be wrapped in an SSRProvider.\n * This ensures that auto generated ids are consistent between the client and server.\n */\nexport function SSRProvider(props: SSRProviderProps): JSX.Element {\n if (typeof React['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && !warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n warnedAboutSSRProvider = true;\n }\n return <>{props.children};\n }\n return ;\n}\n\nlet canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nlet componentIds = new WeakMap();\n\nfunction useCounter(isDisabled = false) {\n let ctx = useContext(SSRContext);\n let ref = useRef(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;\n if (currentOwner) {\n let prevComponentValue = componentIds.get(currentOwner);\n if (prevComponentValue == null) {\n // On the first render, and first call to useId, store the id and state in our weak map.\n componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n } else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n componentIds.delete(currentOwner);\n }\n }\n\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\n\nfunction useLegacySSRSafeId(defaultId?: string): string {\n let ctx = useContext(SSRContext);\n\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === defaultContext && !canUseDOM) {\n console.warn('When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.');\n }\n\n let counter = useCounter(!!defaultId);\n let prefix = ctx === defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\n\nfunction useModernSSRSafeId(defaultId?: string): string {\n // @ts-ignore\n let id = React.useId();\n let [didSSR] = useState(useIsSSR());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\n\n// Use React.useId in React 18 if available, otherwise fall back to our old implementation.\n/** @private */\nexport const useSSRSafeId = typeof React['useId'] === 'function' ? useModernSSRSafeId : useLegacySSRSafeId;\n\nfunction getSnapshot() {\n return false;\n}\n\nfunction getServerSnapshot() {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction subscribe(onStoreChange: () => void): () => void {\n // noop\n return () => {};\n}\n\n/**\n * Returns whether the component is currently being server side rendered or\n * hydrated on the client. Can be used to delay browser-specific rendering\n * until after hydration.\n */\nexport function useIsSSR(): boolean {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof React['useSyncExternalStore'] === 'function') {\n return React['useSyncExternalStore'](subscribe, getSnapshot, getServerSnapshot);\n }\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let cur = useContext(SSRContext);\n return cur.isSSR;\n}\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect = typeof document !== 'undefined'\n ? React.useLayoutEffect\n : () => {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef, useState} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useSSRSafeId} from '@react-aria/ssr';\nimport {useValueEffect} from './';\n\nlet idsUpdaterMap: Map void> = new Map();\n\n/**\n * If a default is not provided, generate an id.\n * @param defaultId - Default component id.\n */\nexport function useId(defaultId?: string): string {\n let [value, setValue] = useState(defaultId);\n let nextId = useRef(null);\n\n let res = useSSRSafeId(value);\n\n let updateValue = useCallback((val) => {\n nextId.current = val;\n }, []);\n\n idsUpdaterMap.set(res, updateValue);\n\n useLayoutEffect(() => {\n let r = res;\n return () => {\n idsUpdaterMap.delete(r);\n };\n }, [res]);\n\n // This cannot cause an infinite loop because the ref is updated first.\n // eslint-disable-next-line\n useEffect(() => {\n let newId = nextId.current;\n if (newId) {\n nextId.current = null;\n setValue(newId);\n }\n });\n\n return res;\n}\n\n/**\n * Merges two ids.\n * Different ids will trigger a side-effect and re-render components hooked up with `useId`.\n */\nexport function mergeIds(idA: string, idB: string): string {\n if (idA === idB) {\n return idA;\n }\n\n let setIdA = idsUpdaterMap.get(idA);\n if (setIdA) {\n setIdA(idB);\n return idB;\n }\n\n let setIdB = idsUpdaterMap.get(idB);\n if (setIdB) {\n setIdB(idA);\n return idA;\n }\n\n return idB;\n}\n\n/**\n * Used to generate an id, and after render, check if that id is rendered so we know\n * if we can use it in places such as labelledby.\n * @param depArray - When to recalculate if the id is in the DOM.\n */\nexport function useSlotId(depArray: ReadonlyArray = []): string {\n let id = useId();\n let [resolvedId, setResolvedId] = useValueEffect(id);\n let updateId = useCallback(() => {\n setResolvedId(function *() {\n yield id;\n\n yield document.getElementById(id) ? id : undefined;\n });\n }, [id, setResolvedId]);\n\n useLayoutEffect(updateId, [id, updateId, ...depArray]);\n\n return resolvedId;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n return (...args: any[]) => {\n for (let callback of callbacks) {\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject : never;\ntype NullToObject = T extends (null | undefined) ? {} : T;\n// eslint-disable-next-line no-undef, @typescript-eslint/no-unused-vars\ntype UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps(...args: T): UnionToIntersection> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n 'id'\n]);\n\nconst labelablePropNames = new Set([\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-details'\n]);\n\ninterface Options {\n /**\n * If labelling associated aria properties should be included in the filter.\n */\n labelable?: boolean,\n /**\n * A Set of other property names that should be included in the filter.\n */\n propNames?: Set\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n let {labelable, propNames} = opts;\n let filteredProps = {};\n\n for (const prop in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, prop) && (\n DOMPropNames.has(prop) ||\n (labelable && labelablePropNames.has(prop)) ||\n propNames?.has(prop) ||\n propRe.test(prop)\n )\n ) {\n filteredProps[prop] = props[prop];\n }\n }\n\n return filteredProps;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n if (typeof window === 'undefined') {\n return;\n }\n\n let onTransitionStart = (e: TransitionEvent) => {\n // Add the transitioning property to the list for this element.\n let transitions = transitionsByElement.get(e.target);\n if (!transitions) {\n transitions = new Set();\n transitionsByElement.set(e.target, transitions);\n\n // The transitioncancel event must be registered on the element itself, rather than as a global\n // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n e.target.addEventListener('transitioncancel', onTransitionEnd);\n }\n\n transitions.add(e.propertyName);\n };\n\n let onTransitionEnd = (e: TransitionEvent) => {\n // Remove property from list of transitioning properties.\n let properties = transitionsByElement.get(e.target);\n if (!properties) {\n return;\n }\n\n properties.delete(e.propertyName);\n\n // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n if (properties.size === 0) {\n e.target.removeEventListener('transitioncancel', onTransitionEnd);\n transitionsByElement.delete(e.target);\n }\n\n // If no transitioning elements, call all of the queued callbacks.\n if (transitionsByElement.size === 0) {\n for (let cb of transitionCallbacks) {\n cb();\n }\n\n transitionCallbacks.clear();\n }\n };\n\n document.body.addEventListener('transitionrun', onTransitionStart);\n document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n }\n}\n\nexport function runAfterTransition(fn: () => void) {\n // Wait one frame to see if an animation starts, e.g. a transition on mount.\n requestAnimationFrame(() => {\n // If no transitions are running, call the function immediately.\n // Otherwise, add it to a list of callbacks to run at the end of the animation.\n if (transitionsByElement.size === 0) {\n fn();\n } else {\n transitionCallbacks.add(fn);\n }\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\n\ninterface ViewportSize {\n width: number,\n height: number\n}\n\n// @ts-ignore\nlet visualViewport = typeof document !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n let [size, setSize] = useState(() => getViewportSize());\n\n useEffect(() => {\n // Use visualViewport api to track available height even on iOS virtual keyboard opening\n let onResize = () => {\n setSize(size => {\n let newSize = getViewportSize();\n if (newSize.width === size.width && newSize.height === size.height) {\n return size;\n }\n return newSize;\n });\n };\n\n if (!visualViewport) {\n window.addEventListener('resize', onResize);\n } else {\n visualViewport.addEventListener('resize', onResize);\n }\n\n return () => {\n if (!visualViewport) {\n window.removeEventListener('resize', onResize);\n } else {\n visualViewport.removeEventListener('resize', onResize);\n }\n };\n }, []);\n\n return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n return {\n width: visualViewport?.width || window.innerWidth,\n height: visualViewport?.height || window.innerHeight\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps} from '@react-types/shared';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useState} from 'react';\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map();\n\nexport function useDescription(description: string): AriaLabelingProps {\n let [id, setId] = useState(undefined);\n\n useLayoutEffect(() => {\n if (!description) {\n return;\n }\n\n let desc = descriptionNodes.get(description);\n if (!desc) {\n let id = `react-aria-description-${descriptionId++}`;\n setId(id);\n\n let node = document.createElement('div');\n node.id = id;\n node.style.display = 'none';\n node.textContent = description;\n document.body.appendChild(node);\n desc = {refCount: 0, element: node};\n descriptionNodes.set(description, desc);\n } else {\n setId(desc.element.id);\n }\n\n desc.refCount++;\n return () => {\n if (--desc.refCount === 0) {\n desc.element.remove();\n descriptionNodes.delete(description);\n }\n };\n }, [description]);\n\n return {\n 'aria-describedby': description ? id : undefined\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n if (typeof window === 'undefined' || window.navigator == null) {\n return false;\n }\n return (\n window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n ) ||\n re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n : false;\n}\n\nexport function isMac() {\n return testPlatform(/^Mac/i);\n}\n\nexport function isIPhone() {\n return testPlatform(/^iPhone/i);\n}\n\nexport function isIPad() {\n return testPlatform(/^iPad/i) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1);\n}\n\nexport function isIOS() {\n return isIPhone() || isIPad();\n}\n\nexport function isAppleDevice() {\n return isMac() || isIOS();\n}\n\nexport function isWebKit() {\n return testUserAgent(/AppleWebKit/i) && !isChrome();\n}\n\nexport function isChrome() {\n return testUserAgent(/Chrome/i);\n}\n\nexport function isAndroid() {\n return testUserAgent(/Android/i);\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useRef} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport function useEffectEvent(fn) {\n const ref = useRef(null);\n useLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => {\n const f = ref.current;\n return f(...args);\n }, []);\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n // JAWS/NVDA with Firefox.\n if ((event as any).mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n // to detect TalkBack virtual clicks.\n if (isAndroid() && (event as PointerEvent).pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent) {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return (\n (event.width === 0 && event.height === 0) ||\n (event.width === 1 &&\n event.height === 1 &&\n event.pressure === 0 &&\n event.detail === 0 &&\n event.pointerType === 'mouse'\n )\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isIOS, runAfterTransition} from '@react-aria/utils';\n\n// Safari on iOS starts selecting text on long press. The only way to avoid this, it seems,\n// is to add user-select: none to the entire page. Adding it to the pressable element prevents\n// that element from being selected, but nearby elements may still receive selection. We add\n// user-select: none on touch start, and remove it again on touch end to prevent this.\n// This must be implemented using global state to avoid race conditions between multiple elements.\n\n// There are three possible states due to the delay before removing user-select: none after\n// pointer up. The 'default' state always transitions to the 'disabled' state, which transitions\n// to 'restoring'. The 'restoring' state can either transition back to 'disabled' or 'default'.\n\n// For non-iOS devices, we apply user-select: none to the pressed element instead to avoid possible\n// performance issues that arise from applying and removing user-select: none to the entire page\n// (see https://github.com/adobe/react-spectrum/issues/1609).\ntype State = 'default' | 'disabled' | 'restoring';\n\n// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element\n// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually\nlet state: State = 'default';\nlet savedUserSelect = '';\nlet modifiedElementMap = new WeakMap();\n\nexport function disableTextSelection(target?: Element) {\n if (isIOS()) {\n if (state === 'default') {\n savedUserSelect = document.documentElement.style.webkitUserSelect;\n document.documentElement.style.webkitUserSelect = 'none';\n }\n\n state = 'disabled';\n } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n // If not iOS, store the target's original user-select and change to user-select: none\n // Ignore state since it doesn't apply for non iOS\n modifiedElementMap.set(target, target.style.userSelect);\n target.style.userSelect = 'none';\n }\n}\n\nexport function restoreTextSelection(target?: Element) {\n if (isIOS()) {\n // If the state is already default, there's nothing to do.\n // If it is restoring, then there's no need to queue a second restore.\n if (state !== 'disabled') {\n return;\n }\n\n state = 'restoring';\n\n // There appears to be a delay on iOS where selection still might occur\n // after pointer up, so wait a bit before removing user-select.\n setTimeout(() => {\n // Wait for any CSS transitions to complete so we don't recompute style\n // for the whole page in the middle of the animation and cause jank.\n runAfterTransition(() => {\n // Avoid race conditions\n if (state === 'restoring') {\n if (document.documentElement.style.webkitUserSelect === 'none') {\n document.documentElement.style.webkitUserSelect = savedUserSelect || '';\n }\n\n savedUserSelect = '';\n state = 'default';\n }\n });\n }, 300);\n } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n // If not iOS, restore the target's original user-select if any\n // Ignore state since it doesn't apply for non iOS\n if (target && modifiedElementMap.has(target)) {\n let targetOldUserSelect = modifiedElementMap.get(target);\n\n if (target.style.userSelect === 'none') {\n target.style.userSelect = targetOldUserSelect;\n }\n\n if (target.getAttribute('style') === '') {\n target.removeAttribute('style');\n }\n modifiedElementMap.delete(target);\n }\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {PressProps} from './usePress';\nimport React, {MutableRefObject} from 'react';\n\ninterface IPressResponderContext extends PressProps {\n register(): void,\n ref?: MutableRefObject\n}\n\nexport const PressResponderContext = React.createContext(null);\nPressResponderContext.displayName = 'PressResponderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {disableTextSelection, restoreTextSelection} from './textSelection';\nimport {DOMAttributes, FocusableElement, PressEvent as IPressEvent, PointerType, PressEvents} from '@react-types/shared';\nimport {focusWithoutScrolling, isVirtualClick, isVirtualPointerEvent, mergeProps, useEffectEvent, useGlobalListeners, useSyncRef} from '@react-aria/utils';\nimport {PressResponderContext} from './context';\nimport {RefObject, useContext, useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface PressProps extends PressEvents {\n /** Whether the target is in a controlled press state (e.g. an overlay it triggers is open). */\n isPressed?: boolean,\n /** Whether the press events should be disabled. */\n isDisabled?: boolean,\n /** Whether the target should not receive focus on press. */\n preventFocusOnPress?: boolean,\n /**\n * Whether press events should be canceled when the pointer leaves the target while pressed.\n * By default, this is `false`, which means if the pointer returns back over the target while\n * still pressed, onPressStart will be fired again. If set to `true`, the press is canceled\n * when the pointer leaves the target and onPressStart will not be fired if the pointer returns.\n */\n shouldCancelOnPointerExit?: boolean,\n /** Whether text selection should be enabled on the pressable element. */\n allowTextSelectionOnPress?: boolean\n}\n\nexport interface PressHookProps extends PressProps {\n /** A ref to the target element. */\n ref?: RefObject\n}\n\ninterface PressState {\n isPressed: boolean,\n ignoreEmulatedMouseEvents: boolean,\n ignoreClickAfterPress: boolean,\n didFirePressStart: boolean,\n activePointerId: any,\n target: FocusableElement | null,\n isOverTarget: boolean,\n pointerType: PointerType,\n userSelect?: string\n}\n\ninterface EventBase {\n currentTarget: EventTarget,\n shiftKey: boolean,\n ctrlKey: boolean,\n metaKey: boolean,\n altKey: boolean\n}\n\nexport interface PressResult {\n /** Whether the target is currently pressed. */\n isPressed: boolean,\n /** Props to spread on the target element. */\n pressProps: DOMAttributes\n}\n\nfunction usePressResponderContext(props: PressHookProps): PressHookProps {\n // Consume context from and merge with props.\n let context = useContext(PressResponderContext);\n if (context) {\n let {register, ...contextProps} = context;\n props = mergeProps(contextProps, props) as PressHookProps;\n register();\n }\n useSyncRef(context, props.ref);\n\n return props;\n}\n\nclass PressEvent implements IPressEvent {\n type: IPressEvent['type'];\n pointerType: PointerType;\n target: Element;\n shiftKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n altKey: boolean;\n #shouldStopPropagation = true;\n\n constructor(type: IPressEvent['type'], pointerType: PointerType, originalEvent: EventBase) {\n this.type = type;\n this.pointerType = pointerType;\n this.target = originalEvent.currentTarget as Element;\n this.shiftKey = originalEvent.shiftKey;\n this.metaKey = originalEvent.metaKey;\n this.ctrlKey = originalEvent.ctrlKey;\n this.altKey = originalEvent.altKey;\n }\n\n continuePropagation() {\n this.#shouldStopPropagation = false;\n }\n\n get shouldStopPropagation() {\n return this.#shouldStopPropagation;\n }\n}\n\n/**\n * Handles press interactions across mouse, touch, keyboard, and screen readers.\n * It normalizes behavior across browsers and platforms, and handles many nuances\n * of dealing with pointer and keyboard events.\n */\nexport function usePress(props: PressHookProps): PressResult {\n let {\n onPress,\n onPressChange,\n onPressStart,\n onPressEnd,\n onPressUp,\n isDisabled,\n isPressed: isPressedProp,\n preventFocusOnPress,\n shouldCancelOnPointerExit,\n allowTextSelectionOnPress,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: _, // Removing `ref` from `domProps` because TypeScript is dumb\n ...domProps\n } = usePressResponderContext(props);\n\n let [isPressed, setPressed] = useState(false);\n let ref = useRef({\n isPressed: false,\n ignoreEmulatedMouseEvents: false,\n ignoreClickAfterPress: false,\n didFirePressStart: false,\n activePointerId: null,\n target: null,\n isOverTarget: false,\n pointerType: null\n });\n\n let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n let triggerPressStart = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n let state = ref.current;\n if (isDisabled || state.didFirePressStart) {\n return;\n }\n\n let shouldStopPropagation = true;\n if (onPressStart) {\n let event = new PressEvent('pressstart', pointerType, originalEvent);\n onPressStart(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n\n if (onPressChange) {\n onPressChange(true);\n }\n\n state.didFirePressStart = true;\n setPressed(true);\n return shouldStopPropagation;\n });\n\n let triggerPressEnd = useEffectEvent((originalEvent: EventBase, pointerType: PointerType, wasPressed = true) => {\n let state = ref.current;\n if (!state.didFirePressStart) {\n return;\n }\n\n state.ignoreClickAfterPress = true;\n state.didFirePressStart = false;\n\n let shouldStopPropagation = true;\n if (onPressEnd) {\n let event = new PressEvent('pressend', pointerType, originalEvent);\n onPressEnd(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n\n if (onPressChange) {\n onPressChange(false);\n }\n\n setPressed(false);\n\n if (onPress && wasPressed && !isDisabled) {\n let event = new PressEvent('press', pointerType, originalEvent);\n onPress(event);\n shouldStopPropagation &&= event.shouldStopPropagation;\n }\n\n return shouldStopPropagation;\n });\n\n let triggerPressUp = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n if (isDisabled) {\n return;\n }\n\n if (onPressUp) {\n let event = new PressEvent('pressup', pointerType, originalEvent);\n onPressUp(event);\n return event.shouldStopPropagation;\n }\n\n return true;\n });\n\n let cancel = useEffectEvent((e: EventBase) => {\n let state = ref.current;\n if (state.isPressed) {\n if (state.isOverTarget) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n }\n state.isPressed = false;\n state.isOverTarget = false;\n state.activePointerId = null;\n state.pointerType = null;\n removeAllGlobalListeners();\n if (!allowTextSelectionOnPress) {\n restoreTextSelection(state.target);\n }\n }\n });\n\n let cancelOnPointerExit = useEffectEvent((e: EventBase) => {\n if (shouldCancelOnPointerExit) {\n cancel(e);\n }\n });\n\n let pressProps = useMemo(() => {\n let state = ref.current;\n let pressProps: DOMAttributes = {\n onKeyDown(e) {\n if (isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && e.currentTarget.contains(e.target as Element)) {\n if (shouldPreventDefaultKeyboard(e.target as Element, e.key)) {\n e.preventDefault();\n }\n\n // If the event is repeating, it may have started on a different element\n // after which focus moved to the current element. Ignore these events and\n // only handle the first key down event.\n let shouldStopPropagation = true;\n if (!state.isPressed && !e.repeat) {\n state.target = e.currentTarget;\n state.isPressed = true;\n shouldStopPropagation = triggerPressStart(e, 'keyboard');\n\n // Focus may move before the key up event, so register the event on the document\n // instead of the same element where the key down event occurred.\n addGlobalListener(document, 'keyup', onKeyUp, false);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n } else if (e.key === 'Enter' && isHTMLAnchorLink(e.currentTarget)) {\n // If the target is a link, we won't have handled this above because we want the default\n // browser behavior to open the link when pressing Enter. But we still need to prevent\n // default so that elements above do not also handle it (e.g. table row).\n e.stopPropagation();\n }\n },\n onKeyUp(e) {\n if (isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && !e.repeat && e.currentTarget.contains(e.target as Element)) {\n triggerPressUp(createEvent(state.target, e), 'keyboard');\n }\n },\n onClick(e) {\n if (e && !e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (e && e.button === 0) {\n let shouldStopPropagation = true;\n if (isDisabled) {\n e.preventDefault();\n }\n\n // If triggered from a screen reader or by using element.click(),\n // trigger as if it were a keyboard click.\n if (!state.ignoreClickAfterPress && !state.ignoreEmulatedMouseEvents && (state.pointerType === 'virtual' || isVirtualClick(e.nativeEvent))) {\n // Ensure the element receives focus (VoiceOver on iOS does not do this)\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n let stopPressStart = triggerPressStart(e, 'virtual');\n let stopPressUp = triggerPressUp(e, 'virtual');\n let stopPressEnd = triggerPressEnd(e, 'virtual');\n shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;\n }\n\n state.ignoreEmulatedMouseEvents = false;\n state.ignoreClickAfterPress = false;\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n }\n }\n };\n\n let onKeyUp = (e: KeyboardEvent) => {\n if (state.isPressed && isValidKeyboardEvent(e, state.target)) {\n if (shouldPreventDefaultKeyboard(e.target as Element, e.key)) {\n e.preventDefault();\n }\n\n state.isPressed = false;\n let target = e.target as Element;\n let shouldStopPropagation = triggerPressEnd(createEvent(state.target, e), 'keyboard', state.target.contains(target));\n removeAllGlobalListeners();\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n // If the target is a link, trigger the click method to open the URL,\n // but defer triggering pressEnd until onClick event handler.\n if (state.target instanceof HTMLElement && state.target.contains(target) && (isHTMLAnchorLink(state.target) || state.target.getAttribute('role') === 'link')) {\n state.target.click();\n }\n }\n };\n\n if (typeof PointerEvent !== 'undefined') {\n pressProps.onPointerDown = (e) => {\n // Only handle left clicks, and ignore events that bubbled through portals.\n if (e.button !== 0 || !e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n // iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.\n // Ignore and let the onClick handler take care of it instead.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n if (isVirtualPointerEvent(e.nativeEvent)) {\n state.pointerType = 'virtual';\n return;\n }\n\n // Due to browser inconsistencies, especially on mobile browsers, we prevent\n // default on pointer down and handle focusing the pressable element ourselves.\n if (shouldPreventDefault(e.currentTarget as Element)) {\n e.preventDefault();\n }\n\n state.pointerType = e.pointerType;\n\n let shouldStopPropagation = true;\n if (!state.isPressed) {\n state.isPressed = true;\n state.isOverTarget = true;\n state.activePointerId = e.pointerId;\n state.target = e.currentTarget;\n\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n if (!allowTextSelectionOnPress) {\n disableTextSelection(state.target);\n }\n\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n\n addGlobalListener(document, 'pointermove', onPointerMove, false);\n addGlobalListener(document, 'pointerup', onPointerUp, false);\n addGlobalListener(document, 'pointercancel', onPointerCancel, false);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onMouseDown = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (e.button === 0) {\n // Chrome and Firefox on touch Windows devices require mouse down events\n // to be canceled in addition to pointer events, or an extra asynchronous\n // focus event will be fired.\n if (shouldPreventDefault(e.currentTarget as Element)) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n }\n };\n\n pressProps.onPointerUp = (e) => {\n // iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.\n if (!e.currentTarget.contains(e.target as Element) || state.pointerType === 'virtual') {\n return;\n }\n\n // Only handle left clicks\n // Safari on iOS sometimes fires pointerup events, even\n // when the touch isn't over the target, so double check.\n if (e.button === 0 && isOverTarget(e, e.currentTarget)) {\n triggerPressUp(e, state.pointerType || e.pointerType);\n }\n };\n\n // Safari on iOS < 13.2 does not implement pointerenter/pointerleave events correctly.\n // Use pointer move events instead to implement our own hit testing.\n // See https://bugs.webkit.org/show_bug.cgi?id=199803\n let onPointerMove = (e: PointerEvent) => {\n if (e.pointerId !== state.activePointerId) {\n return;\n }\n\n if (isOverTarget(e, state.target)) {\n if (!state.isOverTarget) {\n state.isOverTarget = true;\n triggerPressStart(createEvent(state.target, e), state.pointerType);\n }\n } else if (state.isOverTarget) {\n state.isOverTarget = false;\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n cancelOnPointerExit(e);\n }\n };\n\n let onPointerUp = (e: PointerEvent) => {\n if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0) {\n if (isOverTarget(e, state.target)) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType);\n } else if (state.isOverTarget) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n }\n\n state.isPressed = false;\n state.isOverTarget = false;\n state.activePointerId = null;\n state.pointerType = null;\n removeAllGlobalListeners();\n if (!allowTextSelectionOnPress) {\n restoreTextSelection(state.target);\n }\n }\n };\n\n let onPointerCancel = (e: PointerEvent) => {\n cancel(e);\n };\n\n pressProps.onDragStart = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.\n cancel(e);\n };\n } else {\n pressProps.onMouseDown = (e) => {\n // Only handle left clicks\n if (e.button !== 0 || !e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n // Due to browser inconsistencies, especially on mobile browsers, we prevent\n // default on mouse down and handle focusing the pressable element ourselves.\n if (shouldPreventDefault(e.currentTarget)) {\n e.preventDefault();\n }\n\n if (state.ignoreEmulatedMouseEvents) {\n e.stopPropagation();\n return;\n }\n\n state.isPressed = true;\n state.isOverTarget = true;\n state.target = e.currentTarget;\n state.pointerType = isVirtualClick(e.nativeEvent) ? 'virtual' : 'mouse';\n\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n let shouldStopPropagation = triggerPressStart(e, state.pointerType);\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n addGlobalListener(document, 'mouseup', onMouseUp, false);\n };\n\n pressProps.onMouseEnter = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onMouseLeave = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents) {\n state.isOverTarget = false;\n shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n cancelOnPointerExit(e);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onMouseUp = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (!state.ignoreEmulatedMouseEvents && e.button === 0) {\n triggerPressUp(e, state.pointerType);\n }\n };\n\n let onMouseUp = (e: MouseEvent) => {\n // Only handle left clicks\n if (e.button !== 0) {\n return;\n }\n\n state.isPressed = false;\n removeAllGlobalListeners();\n\n if (state.ignoreEmulatedMouseEvents) {\n state.ignoreEmulatedMouseEvents = false;\n return;\n }\n\n if (isOverTarget(e, state.target)) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType);\n } else if (state.isOverTarget) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n }\n\n state.isOverTarget = false;\n };\n\n pressProps.onTouchStart = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n let touch = getTouchFromEvent(e.nativeEvent);\n if (!touch) {\n return;\n }\n state.activePointerId = touch.identifier;\n state.ignoreEmulatedMouseEvents = true;\n state.isOverTarget = true;\n state.isPressed = true;\n state.target = e.currentTarget;\n state.pointerType = 'touch';\n\n // Due to browser inconsistencies, especially on mobile browsers, we prevent default\n // on the emulated mouse event and handle focusing the pressable element ourselves.\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n if (!allowTextSelectionOnPress) {\n disableTextSelection(state.target);\n }\n\n let shouldStopPropagation = triggerPressStart(e, state.pointerType);\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n addGlobalListener(window, 'scroll', onScroll, true);\n };\n\n pressProps.onTouchMove = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n\n let touch = getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && isOverTarget(touch, e.currentTarget)) {\n if (!state.isOverTarget) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n }\n } else if (state.isOverTarget) {\n state.isOverTarget = false;\n shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n cancelOnPointerExit(e);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onTouchEnd = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n\n let touch = getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && isOverTarget(touch, e.currentTarget)) {\n triggerPressUp(e, state.pointerType);\n shouldStopPropagation = triggerPressEnd(e, state.pointerType);\n } else if (state.isOverTarget) {\n shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n state.isPressed = false;\n state.activePointerId = null;\n state.isOverTarget = false;\n state.ignoreEmulatedMouseEvents = true;\n if (!allowTextSelectionOnPress) {\n restoreTextSelection(state.target);\n }\n removeAllGlobalListeners();\n };\n\n pressProps.onTouchCancel = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n e.stopPropagation();\n if (state.isPressed) {\n cancel(e);\n }\n };\n\n let onScroll = (e: Event) => {\n if (state.isPressed && (e.target as Element).contains(state.target)) {\n cancel({\n currentTarget: state.target,\n shiftKey: false,\n ctrlKey: false,\n metaKey: false,\n altKey: false\n });\n }\n };\n\n pressProps.onDragStart = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n cancel(e);\n };\n }\n\n return pressProps;\n }, [\n addGlobalListener,\n isDisabled,\n preventFocusOnPress,\n removeAllGlobalListeners,\n allowTextSelectionOnPress,\n cancel,\n cancelOnPointerExit,\n triggerPressEnd,\n triggerPressStart,\n triggerPressUp\n ]);\n\n // Remove user-select: none in case component unmounts immediately after pressStart\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n if (!allowTextSelectionOnPress) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n restoreTextSelection(ref.current.target);\n }\n };\n }, [allowTextSelectionOnPress]);\n\n return {\n isPressed: isPressedProp || isPressed,\n pressProps: mergeProps(domProps, pressProps)\n };\n}\n\nfunction isHTMLAnchorLink(target: Element): boolean {\n return target.tagName === 'A' && target.hasAttribute('href');\n}\n\nfunction isValidKeyboardEvent(event: KeyboardEvent, currentTarget: Element): boolean {\n const {key, code} = event;\n const element = currentTarget as HTMLElement;\n const role = element.getAttribute('role');\n // Accessibility for keyboards. Space and Enter only.\n // \"Spacebar\" is for IE 11\n return (\n (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') &&\n !((element instanceof HTMLInputElement && !isValidInputKey(element, key)) ||\n element instanceof HTMLTextAreaElement ||\n element.isContentEditable) &&\n // A link with a valid href should be handled natively,\n // unless it also has role='button' and was triggered using Space.\n (!isHTMLAnchorLink(element) || (role === 'button' && key !== 'Enter')) &&\n // An element with role='link' should only trigger with Enter key\n !(role === 'link' && key !== 'Enter')\n );\n}\n\nfunction getTouchFromEvent(event: TouchEvent): Touch | null {\n const {targetTouches} = event;\n if (targetTouches.length > 0) {\n return targetTouches[0];\n }\n return null;\n}\n\nfunction getTouchById(\n event: TouchEvent,\n pointerId: null | number\n): null | Touch {\n const changedTouches = event.changedTouches;\n for (let i = 0; i < changedTouches.length; i++) {\n const touch = changedTouches[i];\n if (touch.identifier === pointerId) {\n return touch;\n }\n }\n return null;\n}\n\nfunction createEvent(target: FocusableElement, e: EventBase): EventBase {\n return {\n currentTarget: target,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n altKey: e.altKey\n };\n}\n\ninterface Rect {\n top: number,\n right: number,\n bottom: number,\n left: number\n}\n\ninterface EventPoint {\n clientX: number,\n clientY: number,\n width?: number,\n height?: number,\n radiusX?: number,\n radiusY?: number\n}\n\nfunction getPointClientRect(point: EventPoint): Rect {\n let offsetX = (point.width / 2) || point.radiusX || 0;\n let offsetY = (point.height / 2) || point.radiusY || 0;\n\n return {\n top: point.clientY - offsetY,\n right: point.clientX + offsetX,\n bottom: point.clientY + offsetY,\n left: point.clientX - offsetX\n };\n}\n\nfunction areRectanglesOverlapping(a: Rect, b: Rect) {\n // check if they cannot overlap on x axis\n if (a.left > b.right || b.left > a.right) {\n return false;\n }\n // check if they cannot overlap on y axis\n if (a.top > b.bottom || b.top > a.bottom) {\n return false;\n }\n return true;\n}\n\nfunction isOverTarget(point: EventPoint, target: Element) {\n let rect = target.getBoundingClientRect();\n let pointRect = getPointClientRect(point);\n return areRectanglesOverlapping(rect, pointRect);\n}\n\nfunction shouldPreventDefault(target: Element) {\n // We cannot prevent default if the target is a draggable element.\n return !(target instanceof HTMLElement) || !target.draggable;\n}\n\nfunction shouldPreventDefaultKeyboard(target: Element, key: string) {\n if (target instanceof HTMLInputElement) {\n return !isValidInputKey(target, key);\n }\n\n if (target instanceof HTMLButtonElement) {\n return target.type !== 'submit' && target.type !== 'reset';\n }\n\n return true;\n}\n\nconst nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n\nfunction isValidInputKey(target: HTMLInputElement, key: string) {\n // Only space should toggle checkboxes and radios, not enter.\n return target.type === 'checkbox' || target.type === 'radio'\n ? key === ' '\n : nonTextInputTypes.has(target.type);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes} from '@react-types/shared';\nimport {mergeProps} from '@react-aria/utils';\nimport {PressProps, usePress} from './usePress';\nimport React, {ReactElement, RefObject, useRef} from 'react';\n\ninterface PressableProps extends PressProps {\n children: ReactElement\n}\n\nexport const Pressable = React.forwardRef(({children, ...props}: PressableProps, ref: RefObject) => {\n let newRef = useRef();\n ref = ref ?? newRef;\n let {pressProps} = usePress({...props, ref});\n let child = React.Children.only(children);\n return React.cloneElement(\n child,\n // @ts-ignore\n {ref, ...mergeProps(child.props, pressProps)}\n );\n});\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusEvent as ReactFocusEvent, useCallback, useRef} from 'react';\nimport {useEffectEvent, useLayoutEffect} from '@react-aria/utils';\n\nexport class SyntheticFocusEvent implements ReactFocusEvent {\n nativeEvent: FocusEvent;\n target: EventTarget & Target;\n currentTarget: EventTarget & Target;\n relatedTarget: Element;\n bubbles: boolean;\n cancelable: boolean;\n defaultPrevented: boolean;\n eventPhase: number;\n isTrusted: boolean;\n timeStamp: number;\n type: string;\n\n constructor(type: string, nativeEvent: FocusEvent) {\n this.nativeEvent = nativeEvent;\n this.target = nativeEvent.target as EventTarget & Target;\n this.currentTarget = nativeEvent.currentTarget as EventTarget & Target;\n this.relatedTarget = nativeEvent.relatedTarget as Element;\n this.bubbles = nativeEvent.bubbles;\n this.cancelable = nativeEvent.cancelable;\n this.defaultPrevented = nativeEvent.defaultPrevented;\n this.eventPhase = nativeEvent.eventPhase;\n this.isTrusted = nativeEvent.isTrusted;\n this.timeStamp = nativeEvent.timeStamp;\n this.type = type;\n }\n\n isDefaultPrevented(): boolean {\n return this.nativeEvent.defaultPrevented;\n }\n\n preventDefault(): void {\n this.defaultPrevented = true;\n this.nativeEvent.preventDefault();\n }\n\n stopPropagation(): void {\n this.nativeEvent.stopPropagation();\n this.isPropagationStopped = () => true;\n }\n\n isPropagationStopped(): boolean {\n return false;\n }\n\n persist() {}\n}\n\nexport function useSyntheticBlurEvent(onBlur: (e: ReactFocusEvent) => void) {\n let stateRef = useRef({\n isFocused: false,\n observer: null as MutationObserver\n });\n\n // Clean up MutationObserver on unmount. See below.\n // eslint-disable-next-line arrow-body-style\n useLayoutEffect(() => {\n const state = stateRef.current;\n return () => {\n if (state.observer) {\n state.observer.disconnect();\n state.observer = null;\n }\n };\n }, []);\n\n let dispatchBlur = useEffectEvent((e: SyntheticFocusEvent) => {\n onBlur?.(e);\n });\n\n // This function is called during a React onFocus event.\n return useCallback((e: ReactFocusEvent) => {\n // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n if (\n e.target instanceof HTMLButtonElement ||\n e.target instanceof HTMLInputElement ||\n e.target instanceof HTMLTextAreaElement ||\n e.target instanceof HTMLSelectElement\n ) {\n stateRef.current.isFocused = true;\n\n let target = e.target;\n let onBlurHandler = (e: FocusEvent) => {\n stateRef.current.isFocused = false;\n\n if (target.disabled) {\n // For backward compatibility, dispatch a (fake) React synthetic event.\n dispatchBlur(new SyntheticFocusEvent('blur', e));\n }\n\n // We no longer need the MutationObserver once the target is blurred.\n if (stateRef.current.observer) {\n stateRef.current.observer.disconnect();\n stateRef.current.observer = null;\n }\n };\n\n target.addEventListener('focusout', onBlurHandler, {once: true});\n\n stateRef.current.observer = new MutationObserver(() => {\n if (stateRef.current.isFocused && target.disabled) {\n stateRef.current.observer.disconnect();\n let relatedTargetEl = target === document.activeElement ? null : document.activeElement;\n target.dispatchEvent(new FocusEvent('blur', {relatedTarget: relatedTargetEl}));\n target.dispatchEvent(new FocusEvent('focusout', {bubbles: true, relatedTarget: relatedTargetEl}));\n }\n });\n\n stateRef.current.observer.observe(target, {attributes: true, attributeFilter: ['disabled']});\n }\n }, [dispatchBlur]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {isMac, isVirtualClick} from '@react-aria/utils';\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\nexport type Modality = 'keyboard' | 'pointer' | 'virtual';\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent;\ntype Handler = (modality: Modality, e: HandlerEvent) => void;\nexport type FocusVisibleHandler = (isFocusVisible: boolean) => void;\nexport interface FocusVisibleProps {\n /** Whether the element is a text input. */\n isTextInput?: boolean,\n /** Whether the element will be auto focused. */\n autoFocus?: boolean\n}\n\nexport interface FocusVisibleResult {\n /** Whether keyboard focus is visible globally. */\n isFocusVisible: boolean\n}\n\nlet currentModality = null;\nlet changeHandlers = new Set();\nlet hasSetupGlobalListeners = false;\nlet hasEventBeforeFocus = false;\nlet hasBlurredWindowRecently = false;\n\n// Only Tab or Esc keys will make focus visible on text input elements\nconst FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\n\nfunction triggerChangeHandlers(modality: Modality, e: HandlerEvent) {\n for (let handler of changeHandlers) {\n handler(modality, e);\n }\n}\n\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */\nfunction isValidKey(e: KeyboardEvent) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || (!isMac() && e.altKey) || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\n\n\nfunction handleKeyboardEvent(e: KeyboardEvent) {\n hasEventBeforeFocus = true;\n if (isValidKey(e)) {\n currentModality = 'keyboard';\n triggerChangeHandlers('keyboard', e);\n }\n}\n\nfunction handlePointerEvent(e: PointerEvent | MouseEvent) {\n currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n hasEventBeforeFocus = true;\n triggerChangeHandlers('pointer', e);\n }\n}\n\nfunction handleClickEvent(e: MouseEvent) {\n if (isVirtualClick(e)) {\n hasEventBeforeFocus = true;\n currentModality = 'virtual';\n }\n}\n\nfunction handleFocusEvent(e: FocusEvent) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document) {\n return;\n }\n\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n currentModality = 'virtual';\n triggerChangeHandlers('virtual', e);\n }\n\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = false;\n}\n\nfunction handleWindowBlur() {\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = true;\n}\n\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */\nfunction setupGlobalFocusEvents() {\n if (typeof window === 'undefined' || hasSetupGlobalListeners) {\n return;\n }\n\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = HTMLElement.prototype.focus;\n HTMLElement.prototype.focus = function () {\n hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n\n document.addEventListener('keydown', handleKeyboardEvent, true);\n document.addEventListener('keyup', handleKeyboardEvent, true);\n document.addEventListener('click', handleClickEvent, true);\n\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n window.addEventListener('focus', handleFocusEvent, true);\n window.addEventListener('blur', handleWindowBlur, false);\n\n if (typeof PointerEvent !== 'undefined') {\n document.addEventListener('pointerdown', handlePointerEvent, true);\n document.addEventListener('pointermove', handlePointerEvent, true);\n document.addEventListener('pointerup', handlePointerEvent, true);\n } else {\n document.addEventListener('mousedown', handlePointerEvent, true);\n document.addEventListener('mousemove', handlePointerEvent, true);\n document.addEventListener('mouseup', handlePointerEvent, true);\n }\n\n hasSetupGlobalListeners = true;\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalFocusEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalFocusEvents);\n }\n}\n\n/**\n * If true, keyboard focus is visible.\n */\nexport function isFocusVisible(): boolean {\n return currentModality !== 'pointer';\n}\n\nexport function getInteractionModality(): Modality {\n return currentModality;\n}\n\nexport function setInteractionModality(modality: Modality) {\n currentModality = modality;\n triggerChangeHandlers(modality, null);\n}\n\n/**\n * Keeps state of the current modality.\n */\nexport function useInteractionModality(): Modality {\n setupGlobalFocusEvents();\n\n let [modality, setModality] = useState(currentModality);\n useEffect(() => {\n let handler = () => {\n setModality(currentModality);\n };\n\n changeHandlers.add(handler);\n return () => {\n changeHandlers.delete(handler);\n };\n }, []);\n\n return useIsSSR() ? null : modality;\n}\n\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */\nfunction isKeyboardFocusEvent(isTextInput: boolean, modality: Modality, e: HandlerEvent) {\n return !(isTextInput && modality === 'keyboard' && e instanceof KeyboardEvent && !FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\n\n/**\n * Manages focus visible state for the page, and subscribes individual components for updates.\n */\nexport function useFocusVisible(props: FocusVisibleProps = {}): FocusVisibleResult {\n let {isTextInput, autoFocus} = props;\n let [isFocusVisibleState, setFocusVisible] = useState(autoFocus || isFocusVisible());\n useFocusVisibleListener((isFocusVisible) => {\n setFocusVisible(isFocusVisible);\n }, [isTextInput], {isTextInput});\n\n return {isFocusVisible: isFocusVisibleState};\n}\n\n/**\n * Listens for trigger change and reports if focus is visible (i.e., modality is not pointer).\n */\nexport function useFocusVisibleListener(fn: FocusVisibleHandler, deps: ReadonlyArray, opts?: {isTextInput?: boolean}): void {\n setupGlobalFocusEvents();\n\n useEffect(() => {\n let handler = (modality: Modality, e: HandlerEvent) => {\n if (!isKeyboardFocusEvent(opts?.isTextInput, modality, e)) {\n return;\n }\n fn(isFocusVisible());\n };\n changeHandlers.add(handler);\n return () => {\n changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {DOMAttributes} from '@react-types/shared';\nimport {FocusEvent, useCallback, useRef} from 'react';\nimport {useSyntheticBlurEvent} from './utils';\n\nexport interface FocusWithinProps {\n /** Whether the focus within events should be disabled. */\n isDisabled?: boolean,\n /** Handler that is called when the target element or a descendant receives focus. */\n onFocusWithin?: (e: FocusEvent) => void,\n /** Handler that is called when the target element and all descendants lose focus. */\n onBlurWithin?: (e: FocusEvent) => void,\n /** Handler that is called when the the focus within state changes. */\n onFocusWithinChange?: (isFocusWithin: boolean) => void\n}\n\nexport interface FocusWithinResult {\n /** Props to spread onto the target element. */\n focusWithinProps: DOMAttributes\n}\n\n/**\n * Handles focus events for the target and its descendants.\n */\nexport function useFocusWithin(props: FocusWithinProps): FocusWithinResult {\n let {\n isDisabled,\n onBlurWithin,\n onFocusWithin,\n onFocusWithinChange\n } = props;\n let state = useRef({\n isFocusWithin: false\n });\n\n let onBlur = useCallback((e: FocusEvent) => {\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !(e.currentTarget as Element).contains(e.relatedTarget as Element)) {\n state.current.isFocusWithin = false;\n\n if (onBlurWithin) {\n onBlurWithin(e);\n }\n\n if (onFocusWithinChange) {\n onFocusWithinChange(false);\n }\n }\n }, [onBlurWithin, onFocusWithinChange, state]);\n\n let onSyntheticFocus = useSyntheticBlurEvent(onBlur);\n let onFocus = useCallback((e: FocusEvent) => {\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n if (!state.current.isFocusWithin && document.activeElement === e.target) {\n if (onFocusWithin) {\n onFocusWithin(e);\n }\n\n if (onFocusWithinChange) {\n onFocusWithinChange(true);\n }\n\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n }\n }, [onFocusWithin, onFocusWithinChange, onSyntheticFocus]);\n\n if (isDisabled) {\n return {\n focusWithinProps: {\n onFocus: null,\n onBlur: null\n }\n };\n }\n\n return {\n focusWithinProps: {\n onFocus,\n onBlur\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes} from '@react-types/shared';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {CSSProperties, JSXElementConstructor, ReactNode, useMemo, useState} from 'react';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface VisuallyHiddenProps extends DOMAttributes {\n /** The content to visually hide. */\n children?: ReactNode,\n\n /**\n * The element type for the container.\n * @default 'div'\n */\n elementType?: string | JSXElementConstructor,\n\n /** Whether the element should become visible on focus, for example skip links. */\n isFocusable?: boolean\n}\n\nconst styles: CSSProperties = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: '1px',\n whiteSpace: 'nowrap'\n};\n\nexport interface VisuallyHiddenAria {\n visuallyHiddenProps: DOMAttributes\n}\n\n/**\n * Provides props for an element that hides its children visually\n * but keeps content visible to assistive technology.\n */\nexport function useVisuallyHidden(props: VisuallyHiddenProps = {}): VisuallyHiddenAria {\n let {\n style,\n isFocusable\n } = props;\n\n let [isFocused, setFocused] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n isDisabled: !isFocusable,\n onFocusWithinChange: (val) => setFocused(val)\n });\n\n // If focused, don't hide the element.\n let combinedStyles = useMemo(() => {\n if (isFocused) {\n return style;\n } else if (style) {\n return {...styles, ...style};\n } else {\n return styles;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isFocused]);\n\n return {\n visuallyHiddenProps: {\n ...focusWithinProps,\n style: combinedStyles\n }\n };\n}\n\n/**\n * VisuallyHidden hides its children visually, while keeping content visible\n * to screen readers.\n */\nexport function VisuallyHidden(props: VisuallyHiddenProps) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children, elementType: Element = 'div', isFocusable, style, ...otherProps} = props;\n let {visuallyHiddenProps} = useVisuallyHidden(props);\n\n return (\n \n {children}\n \n );\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","'use strict'\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\nvar Buffer = require('safe-buffer').Buffer\n\nvar ARRAY16 = new Array(16)\n\nfunction MD5 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n}\n\ninherits(MD5, HashBase)\n\nMD5.prototype._update = function () {\n var M = ARRAY16\n for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)\n\n var a = this._a\n var b = this._b\n var c = this._c\n var d = this._d\n\n a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)\n d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)\n c = fnF(c, d, a, b, M[2], 0x242070db, 17)\n b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)\n a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)\n d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)\n c = fnF(c, d, a, b, M[6], 0xa8304613, 17)\n b = fnF(b, c, d, a, M[7], 0xfd469501, 22)\n a = fnF(a, b, c, d, M[8], 0x698098d8, 7)\n d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)\n c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)\n b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)\n a = fnF(a, b, c, d, M[12], 0x6b901122, 7)\n d = fnF(d, a, b, c, M[13], 0xfd987193, 12)\n c = fnF(c, d, a, b, M[14], 0xa679438e, 17)\n b = fnF(b, c, d, a, M[15], 0x49b40821, 22)\n\n a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)\n d = fnG(d, a, b, c, M[6], 0xc040b340, 9)\n c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)\n b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)\n a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)\n d = fnG(d, a, b, c, M[10], 0x02441453, 9)\n c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)\n b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)\n a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)\n d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)\n c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)\n b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)\n a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)\n d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)\n c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)\n b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)\n\n a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)\n d = fnH(d, a, b, c, M[8], 0x8771f681, 11)\n c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)\n b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)\n a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)\n d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)\n c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)\n b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)\n a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)\n d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)\n c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)\n b = fnH(b, c, d, a, M[6], 0x04881d05, 23)\n a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)\n d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)\n c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)\n b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)\n\n a = fnI(a, b, c, d, M[0], 0xf4292244, 6)\n d = fnI(d, a, b, c, M[7], 0x432aff97, 10)\n c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)\n b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)\n a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)\n d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)\n c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)\n b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)\n a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)\n d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)\n c = fnI(c, d, a, b, M[6], 0xa3014314, 15)\n b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)\n a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)\n d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)\n c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)\n b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)\n\n this._a = (this._a + a) | 0\n this._b = (this._b + b) | 0\n this._c = (this._c + c) | 0\n this._d = (this._d + d) | 0\n}\n\nMD5.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.allocUnsafe(16)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fnF (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnG (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnH (a, b, c, d, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnI (a, b, c, d, m, k, s) {\n return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0\n}\n\nmodule.exports = MD5\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n callback.apply(this, args);\n };\n}\n\nfunction noop() {}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n\n var writableEnded = stream._writableState && stream._writableState.finished;\n\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n\n var onclose = function onclose() {\n var err;\n\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\n\nmodule.exports = eos;","'use strict'\nvar Buffer = require('buffer').Buffer\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\n\nvar ARRAY16 = new Array(16)\n\nvar zl = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n]\n\nvar zr = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n]\n\nvar sl = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n]\n\nvar sr = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n]\n\nvar hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]\nvar hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]\n\nfunction RIPEMD160 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n}\n\ninherits(RIPEMD160, HashBase)\n\nRIPEMD160.prototype._update = function () {\n var words = ARRAY16\n for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)\n\n var al = this._a | 0\n var bl = this._b | 0\n var cl = this._c | 0\n var dl = this._d | 0\n var el = this._e | 0\n\n var ar = this._a | 0\n var br = this._b | 0\n var cr = this._c | 0\n var dr = this._d | 0\n var er = this._e | 0\n\n // computation\n for (var i = 0; i < 80; i += 1) {\n var tl\n var tr\n if (i < 16) {\n tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])\n tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])\n } else if (i < 32) {\n tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])\n tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])\n } else if (i < 48) {\n tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])\n tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])\n } else if (i < 64) {\n tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])\n tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])\n } else { // if (i<80) {\n tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])\n tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])\n }\n\n al = el\n el = dl\n dl = rotl(cl, 10)\n cl = bl\n bl = tl\n\n ar = er\n er = dr\n dr = rotl(cr, 10)\n cr = br\n br = tr\n }\n\n // update state\n var t = (this._b + cl + dr) | 0\n this._b = (this._c + dl + er) | 0\n this._c = (this._d + el + ar) | 0\n this._d = (this._e + al + br) | 0\n this._e = (this._a + bl + cr) | 0\n this._a = t\n}\n\nRIPEMD160.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n buffer.writeInt32LE(this._e, 16)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fn1 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn2 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn3 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn4 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn5 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0\n}\n\nmodule.exports = RIPEMD160\n","var exports = module.exports = function SHA (algorithm) {\n algorithm = algorithm.toLowerCase()\n\n var Algorithm = exports[algorithm]\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')\n\n return new Algorithm()\n}\n\nexports.sha = require('./sha')\nexports.sha1 = require('./sha1')\nexports.sha224 = require('./sha224')\nexports.sha256 = require('./sha256')\nexports.sha384 = require('./sha384')\nexports.sha512 = require('./sha512')\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};","'use strict';\n\nvar assert = require('minimalistic-assert');\n\nfunction Cipher(options) {\n this.options = options;\n\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n}\nmodule.exports = Cipher;\n\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\n\nCipher.prototype.update = function update(data) {\n if (data.length === 0)\n return [];\n\n if (this.type === 'decrypt')\n return this._updateDecrypt(data);\n else\n return this._updateEncrypt(data);\n};\n\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++)\n this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\n\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\n\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = ((this.bufferOff + data.length) / this.blockSize) | 0;\n var out = new Array(count * this.blockSize);\n\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n\n if (this.bufferOff === this.buffer.length)\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - ((data.length - inputOff) % this.blockSize);\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++)\n this.buffer[this.bufferOff] = data[inputOff];\n\n return out;\n};\n\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n\n return out;\n};\n\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer)\n first = this.update(buffer);\n\n var last;\n if (this.type === 'encrypt')\n last = this._finalEncrypt();\n else\n last = this._finalDecrypt();\n\n if (first)\n return first.concat(last);\n else\n return last;\n};\n\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0)\n return false;\n\n while (off < buffer.length)\n buffer[off++] = 0;\n\n return true;\n};\n\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff))\n return [];\n\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\n\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\n\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n\n return this._unpad(out);\n};\n","var ciphers = require('./encrypter')\nvar deciphers = require('./decrypter')\nvar modes = require('./modes/list.json')\n\nfunction getCiphers () {\n return Object.keys(modes)\n}\n\nexports.createCipher = exports.Cipher = ciphers.createCipher\nexports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv\nexports.createDecipher = exports.Decipher = deciphers.createDecipher\nexports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","var modeModules = {\n ECB: require('./ecb'),\n CBC: require('./cbc'),\n CFB: require('./cfb'),\n CFB8: require('./cfb8'),\n CFB1: require('./cfb1'),\n OFB: require('./ofb'),\n CTR: require('./ctr'),\n GCM: require('./ctr')\n}\n\nvar modes = require('./list.json')\n\nfor (var key in modes) {\n modes[key].module = modeModules[modes[key].mode]\n}\n\nmodule.exports = modes\n","var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n callback.apply(this, args);\n };\n}\n\nfunction noop() {}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n\n var writableEnded = stream._writableState && stream._writableState.finished;\n\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n\n var onclose = function onclose() {\n var err;\n\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\n\nmodule.exports = eos;","var BN = require('bn.js')\nvar randomBytes = require('randombytes')\n\nfunction blind (priv) {\n var r = getr(priv)\n var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()\n return { blinder: blinder, unblinder: r.invm(priv.modulus) }\n}\n\nfunction getr (priv) {\n var len = priv.modulus.byteLength()\n var r\n do {\n r = new BN(randomBytes(len))\n } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))\n return r\n}\n\nfunction crt (msg, priv) {\n var blinds = blind(priv)\n var len = priv.modulus.byteLength()\n var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)\n var c1 = blinded.toRed(BN.mont(priv.prime1))\n var c2 = blinded.toRed(BN.mont(priv.prime2))\n var qinv = priv.coefficient\n var p = priv.prime1\n var q = priv.prime2\n var m1 = c1.redPow(priv.exponent1).fromRed()\n var m2 = c2.redPow(priv.exponent2).fromRed()\n var h = m1.isub(m2).imul(qinv).umod(p).imul(q)\n return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)\n}\ncrt.getr = getr\n\nmodule.exports = crt\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve\n });\n return curve;\n }\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'\n ]\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34'\n ]\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5'\n ]\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'\n ]\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650'\n ]\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9'\n ]\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658'\n ]\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3'\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15'\n }\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre\n ]\n});\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","/* eslint-disable node/no-deprecated-api */\n\n'use strict'\n\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\nvar safer = {}\n\nvar key\n\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue\n if (key === 'SlowBuffer' || key === 'Buffer') continue\n safer[key] = buffer[key]\n}\n\nvar Safer = safer.Buffer = {}\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue\n Safer[key] = Buffer[key]\n}\n\nsafer.Buffer.prototype = Buffer.prototype\n\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value)\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)\n }\n return Buffer(value, encodingOrOffset, length)\n }\n}\n\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size)\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n var buf = Buffer(size)\n if (!fill || fill.length === 0) {\n buf.fill(0)\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n return buf\n }\n}\n\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\n\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n }\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength\n }\n}\n\nmodule.exports = safer\n","'use strict';\n\nconst Reporter = require('../base/reporter').Reporter;\nconst EncoderBuffer = require('../base/buffer').EncoderBuffer;\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst assert = require('minimalistic-assert');\n\n// Supported tags\nconst tags = [\n 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n];\n\n// Public methods list\nconst methods = [\n 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n 'any', 'contains'\n].concat(tags);\n\n// Overrided methods list\nconst overrided = [\n '_peekTag', '_decodeTag', '_use',\n '_decodeStr', '_decodeObjid', '_decodeTime',\n '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n '_encodeNull', '_encodeInt', '_encodeBool'\n];\n\nfunction Node(enc, parent, name) {\n const state = {};\n this._baseState = state;\n\n state.name = name;\n state.enc = enc;\n\n state.parent = parent || null;\n state.children = null;\n\n // State\n state.tag = null;\n state.args = null;\n state.reverseArgs = null;\n state.choice = null;\n state.optional = false;\n state.any = false;\n state.obj = false;\n state.use = null;\n state.useDecoder = null;\n state.key = null;\n state['default'] = null;\n state.explicit = null;\n state.implicit = null;\n state.contains = null;\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = [];\n this._wrap();\n }\n}\nmodule.exports = Node;\n\nconst stateProps = [\n 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n 'implicit', 'contains'\n];\n\nNode.prototype.clone = function clone() {\n const state = this._baseState;\n const cstate = {};\n stateProps.forEach(function(prop) {\n cstate[prop] = state[prop];\n });\n const res = new this.constructor(cstate.parent);\n res._baseState = cstate;\n return res;\n};\n\nNode.prototype._wrap = function wrap() {\n const state = this._baseState;\n methods.forEach(function(method) {\n this[method] = function _wrappedMethod() {\n const clone = new this.constructor(this);\n state.children.push(clone);\n return clone[method].apply(clone, arguments);\n };\n }, this);\n};\n\nNode.prototype._init = function init(body) {\n const state = this._baseState;\n\n assert(state.parent === null);\n body.call(this);\n\n // Filter children\n state.children = state.children.filter(function(child) {\n return child._baseState.parent === this;\n }, this);\n assert.equal(state.children.length, 1, 'Root node can have only one child');\n};\n\nNode.prototype._useArgs = function useArgs(args) {\n const state = this._baseState;\n\n // Filter children and args\n const children = args.filter(function(arg) {\n return arg instanceof this.constructor;\n }, this);\n args = args.filter(function(arg) {\n return !(arg instanceof this.constructor);\n }, this);\n\n if (children.length !== 0) {\n assert(state.children === null);\n state.children = children;\n\n // Replace parent to maintain backward link\n children.forEach(function(child) {\n child._baseState.parent = this;\n }, this);\n }\n if (args.length !== 0) {\n assert(state.args === null);\n state.args = args;\n state.reverseArgs = args.map(function(arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object)\n return arg;\n\n const res = {};\n Object.keys(arg).forEach(function(key) {\n if (key == (key | 0))\n key |= 0;\n const value = arg[key];\n res[value] = key;\n });\n return res;\n });\n }\n};\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function(method) {\n Node.prototype[method] = function _overrided() {\n const state = this._baseState;\n throw new Error(method + ' not implemented for encoding: ' + state.enc);\n };\n});\n\n//\n// Public methods\n//\n\ntags.forEach(function(tag) {\n Node.prototype[tag] = function _tagMethod() {\n const state = this._baseState;\n const args = Array.prototype.slice.call(arguments);\n\n assert(state.tag === null);\n state.tag = tag;\n\n this._useArgs(args);\n\n return this;\n };\n});\n\nNode.prototype.use = function use(item) {\n assert(item);\n const state = this._baseState;\n\n assert(state.use === null);\n state.use = item;\n\n return this;\n};\n\nNode.prototype.optional = function optional() {\n const state = this._baseState;\n\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.def = function def(val) {\n const state = this._baseState;\n\n assert(state['default'] === null);\n state['default'] = val;\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.explicit = function explicit(num) {\n const state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.explicit = num;\n\n return this;\n};\n\nNode.prototype.implicit = function implicit(num) {\n const state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.implicit = num;\n\n return this;\n};\n\nNode.prototype.obj = function obj() {\n const state = this._baseState;\n const args = Array.prototype.slice.call(arguments);\n\n state.obj = true;\n\n if (args.length !== 0)\n this._useArgs(args);\n\n return this;\n};\n\nNode.prototype.key = function key(newKey) {\n const state = this._baseState;\n\n assert(state.key === null);\n state.key = newKey;\n\n return this;\n};\n\nNode.prototype.any = function any() {\n const state = this._baseState;\n\n state.any = true;\n\n return this;\n};\n\nNode.prototype.choice = function choice(obj) {\n const state = this._baseState;\n\n assert(state.choice === null);\n state.choice = obj;\n this._useArgs(Object.keys(obj).map(function(key) {\n return obj[key];\n }));\n\n return this;\n};\n\nNode.prototype.contains = function contains(item) {\n const state = this._baseState;\n\n assert(state.use === null);\n state.contains = item;\n\n return this;\n};\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode(input, options) {\n const state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return input.wrapResult(state.children[0]._decode(input, options));\n\n let result = state['default'];\n let present = true;\n\n let prevKey = null;\n if (state.key !== null)\n prevKey = input.enterKey(state.key);\n\n // Check if tag is there\n if (state.optional) {\n let tag = null;\n if (state.explicit !== null)\n tag = state.explicit;\n else if (state.implicit !== null)\n tag = state.implicit;\n else if (state.tag !== null)\n tag = state.tag;\n\n if (tag === null && !state.any) {\n // Trial and Error\n const save = input.save();\n try {\n if (state.choice === null)\n this._decodeGeneric(state.tag, input, options);\n else\n this._decodeChoice(input, options);\n present = true;\n } catch (e) {\n present = false;\n }\n input.restore(save);\n } else {\n present = this._peekTag(input, tag, state.any);\n\n if (input.isError(present))\n return present;\n }\n }\n\n // Push object on stack\n let prevObj;\n if (state.obj && present)\n prevObj = input.enterObject();\n\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n const explicit = this._decodeTag(input, state.explicit);\n if (input.isError(explicit))\n return explicit;\n input = explicit;\n }\n\n const start = input.offset;\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n let save;\n if (state.any)\n save = input.save();\n const body = this._decodeTag(\n input,\n state.implicit !== null ? state.implicit : state.tag,\n state.any\n );\n if (input.isError(body))\n return body;\n\n if (state.any)\n result = input.raw(save);\n else\n input = body;\n }\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), start, input.length, 'tagged');\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), input.offset, input.length, 'content');\n\n // Select proper method for tag\n if (state.any) {\n // no-op\n } else if (state.choice === null) {\n result = this._decodeGeneric(state.tag, input, options);\n } else {\n result = this._decodeChoice(input, options);\n }\n\n if (input.isError(result))\n return result;\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren(child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options);\n });\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n const data = new DecoderBuffer(result);\n result = this._getUse(state.contains, input._reporterState.obj)\n ._decode(data, options);\n }\n }\n\n // Pop object\n if (state.obj && present)\n result = input.leaveObject(prevObj);\n\n // Set key\n if (state.key !== null && (result !== null || present === true))\n input.leaveKey(prevKey, state.key, result);\n else if (prevKey !== null)\n input.exitKey(prevKey);\n\n return result;\n};\n\nNode.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {\n const state = this._baseState;\n\n if (tag === 'seq' || tag === 'set')\n return null;\n if (tag === 'seqof' || tag === 'setof')\n return this._decodeList(input, tag, state.args[0], options);\n else if (/str$/.test(tag))\n return this._decodeStr(input, tag, options);\n else if (tag === 'objid' && state.args)\n return this._decodeObjid(input, state.args[0], state.args[1], options);\n else if (tag === 'objid')\n return this._decodeObjid(input, null, null, options);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._decodeTime(input, tag, options);\n else if (tag === 'null_')\n return this._decodeNull(input, options);\n else if (tag === 'bool')\n return this._decodeBool(input, options);\n else if (tag === 'objDesc')\n return this._decodeStr(input, tag, options);\n else if (tag === 'int' || tag === 'enum')\n return this._decodeInt(input, state.args && state.args[0], options);\n\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)\n ._decode(input, options);\n } else {\n return input.error('unknown tag: ' + tag);\n }\n};\n\nNode.prototype._getUse = function _getUse(entity, obj) {\n\n const state = this._baseState;\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj);\n assert(state.useDecoder._baseState.parent === null);\n state.useDecoder = state.useDecoder._baseState.children[0];\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone();\n state.useDecoder._baseState.implicit = state.implicit;\n }\n return state.useDecoder;\n};\n\nNode.prototype._decodeChoice = function decodeChoice(input, options) {\n const state = this._baseState;\n let result = null;\n let match = false;\n\n Object.keys(state.choice).some(function(key) {\n const save = input.save();\n const node = state.choice[key];\n try {\n const value = node._decode(input, options);\n if (input.isError(value))\n return false;\n\n result = { type: key, value: value };\n match = true;\n } catch (e) {\n input.restore(save);\n return false;\n }\n return true;\n }, this);\n\n if (!match)\n return input.error('Choice not matched');\n\n return result;\n};\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer(data) {\n return new EncoderBuffer(data, this.reporter);\n};\n\nNode.prototype._encode = function encode(data, reporter, parent) {\n const state = this._baseState;\n if (state['default'] !== null && state['default'] === data)\n return;\n\n const result = this._encodeValue(data, reporter, parent);\n if (result === undefined)\n return;\n\n if (this._skipDefault(result, reporter, parent))\n return;\n\n return result;\n};\n\nNode.prototype._encodeValue = function encode(data, reporter, parent) {\n const state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return state.children[0]._encode(data, reporter || new Reporter());\n\n let result = null;\n\n // Set reporter to share it with a child class\n this.reporter = reporter;\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state['default'] !== null)\n data = state['default'];\n else\n return;\n }\n\n // Encode children first\n let content = null;\n let primitive = false;\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data);\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter);\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter);\n primitive = true;\n } else if (state.children) {\n content = state.children.map(function(child) {\n if (child._baseState.tag === 'null_')\n return child._encode(null, reporter, data);\n\n if (child._baseState.key === null)\n return reporter.error('Child should have a key');\n const prevKey = reporter.enterKey(child._baseState.key);\n\n if (typeof data !== 'object')\n return reporter.error('Child expected, but input is not object');\n\n const res = child._encode(data[child._baseState.key], reporter, data);\n reporter.leaveKey(prevKey);\n\n return res;\n }, this).filter(function(child) {\n return child;\n });\n content = this._createEncoderBuffer(content);\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n // TODO(indutny): this should be thrown on DSL level\n if (!(state.args && state.args.length === 1))\n return reporter.error('Too many args for : ' + state.tag);\n\n if (!Array.isArray(data))\n return reporter.error('seqof/setof, but data is not Array');\n\n const child = this.clone();\n child._baseState.implicit = null;\n content = this._createEncoderBuffer(data.map(function(item) {\n const state = this._baseState;\n\n return this._getUse(state.args[0], data)._encode(item, reporter);\n }, child));\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter);\n } else {\n content = this._encodePrimitive(state.tag, data);\n primitive = true;\n }\n }\n\n // Encode data itself\n if (!state.any && state.choice === null) {\n const tag = state.implicit !== null ? state.implicit : state.tag;\n const cls = state.implicit === null ? 'universal' : 'context';\n\n if (tag === null) {\n if (state.use === null)\n reporter.error('Tag could be omitted only for .use()');\n } else {\n if (state.use === null)\n result = this._encodeComposite(tag, primitive, cls, content);\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null)\n result = this._encodeComposite(state.explicit, false, 'context', result);\n\n return result;\n};\n\nNode.prototype._encodeChoice = function encodeChoice(data, reporter) {\n const state = this._baseState;\n\n const node = state.choice[data.type];\n if (!node) {\n assert(\n false,\n data.type + ' not found in ' +\n JSON.stringify(Object.keys(state.choice)));\n }\n return node._encode(data.value, reporter);\n};\n\nNode.prototype._encodePrimitive = function encodePrimitive(tag, data) {\n const state = this._baseState;\n\n if (/str$/.test(tag))\n return this._encodeStr(data, tag);\n else if (tag === 'objid' && state.args)\n return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);\n else if (tag === 'objid')\n return this._encodeObjid(data, null, null);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._encodeTime(data, tag);\n else if (tag === 'null_')\n return this._encodeNull();\n else if (tag === 'int' || tag === 'enum')\n return this._encodeInt(data, state.args && state.reverseArgs[0]);\n else if (tag === 'bool')\n return this._encodeBool(data);\n else if (tag === 'objDesc')\n return this._encodeStr(data, tag);\n else\n throw new Error('Unsupported tag: ' + tag);\n};\n\nNode.prototype._isNumstr = function isNumstr(str) {\n return /^[0-9 ]*$/.test(str);\n};\n\nNode.prototype._isPrintstr = function isPrintstr(str) {\n return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);\n};\n","'use strict';\n\nconst inherits = require('inherits');\n\nfunction Reporter(options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n };\n}\nexports.Reporter = Reporter;\n\nReporter.prototype.isError = function isError(obj) {\n return obj instanceof ReporterError;\n};\n\nReporter.prototype.save = function save() {\n const state = this._reporterState;\n\n return { obj: state.obj, pathLen: state.path.length };\n};\n\nReporter.prototype.restore = function restore(data) {\n const state = this._reporterState;\n\n state.obj = data.obj;\n state.path = state.path.slice(0, data.pathLen);\n};\n\nReporter.prototype.enterKey = function enterKey(key) {\n return this._reporterState.path.push(key);\n};\n\nReporter.prototype.exitKey = function exitKey(index) {\n const state = this._reporterState;\n\n state.path = state.path.slice(0, index - 1);\n};\n\nReporter.prototype.leaveKey = function leaveKey(index, key, value) {\n const state = this._reporterState;\n\n this.exitKey(index);\n if (state.obj !== null)\n state.obj[key] = value;\n};\n\nReporter.prototype.path = function path() {\n return this._reporterState.path.join('/');\n};\n\nReporter.prototype.enterObject = function enterObject() {\n const state = this._reporterState;\n\n const prev = state.obj;\n state.obj = {};\n return prev;\n};\n\nReporter.prototype.leaveObject = function leaveObject(prev) {\n const state = this._reporterState;\n\n const now = state.obj;\n state.obj = prev;\n return now;\n};\n\nReporter.prototype.error = function error(msg) {\n let err;\n const state = this._reporterState;\n\n const inherited = msg instanceof ReporterError;\n if (inherited) {\n err = msg;\n } else {\n err = new ReporterError(state.path.map(function(elem) {\n return '[' + JSON.stringify(elem) + ']';\n }).join(''), msg.message || msg, msg.stack);\n }\n\n if (!state.options.partial)\n throw err;\n\n if (!inherited)\n state.errors.push(err);\n\n return err;\n};\n\nReporter.prototype.wrapResult = function wrapResult(result) {\n const state = this._reporterState;\n if (!state.options.partial)\n return result;\n\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n };\n};\n\nfunction ReporterError(path, msg) {\n this.path = path;\n this.rethrow(msg);\n}\ninherits(ReporterError, Error);\n\nReporterError.prototype.rethrow = function rethrow(msg) {\n this.message = msg + ' at: ' + (this.path || '(shallow)');\n if (Error.captureStackTrace)\n Error.captureStackTrace(this, ReporterError);\n\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message);\n } catch (e) {\n this.stack = e.stack;\n }\n }\n return this;\n};\n","'use strict';\n\n// Helper\nfunction reverse(map) {\n const res = {};\n\n Object.keys(map).forEach(function(key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key)\n key = key | 0;\n\n const value = map[key];\n res[value] = key;\n });\n\n return res;\n}\n\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n};\nexports.tagClassByName = reverse(exports.tagClass);\n\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n};\nexports.tagByName = reverse(exports.tag);\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","'use strict'\n\nexports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')\nexports.createHash = exports.Hash = require('create-hash')\nexports.createHmac = exports.Hmac = require('create-hmac')\n\nvar algos = require('browserify-sign/algos')\nvar algoKeys = Object.keys(algos)\nvar hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)\nexports.getHashes = function () {\n return hashes\n}\n\nvar p = require('pbkdf2')\nexports.pbkdf2 = p.pbkdf2\nexports.pbkdf2Sync = p.pbkdf2Sync\n\nvar aes = require('browserify-cipher')\n\nexports.Cipher = aes.Cipher\nexports.createCipher = aes.createCipher\nexports.Cipheriv = aes.Cipheriv\nexports.createCipheriv = aes.createCipheriv\nexports.Decipher = aes.Decipher\nexports.createDecipher = aes.createDecipher\nexports.Decipheriv = aes.Decipheriv\nexports.createDecipheriv = aes.createDecipheriv\nexports.getCiphers = aes.getCiphers\nexports.listCiphers = aes.listCiphers\n\nvar dh = require('diffie-hellman')\n\nexports.DiffieHellmanGroup = dh.DiffieHellmanGroup\nexports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup\nexports.getDiffieHellman = dh.getDiffieHellman\nexports.createDiffieHellman = dh.createDiffieHellman\nexports.DiffieHellman = dh.DiffieHellman\n\nvar sign = require('browserify-sign')\n\nexports.createSign = sign.createSign\nexports.Sign = sign.Sign\nexports.createVerify = sign.createVerify\nexports.Verify = sign.Verify\n\nexports.createECDH = require('create-ecdh')\n\nvar publicEncrypt = require('public-encrypt')\n\nexports.publicEncrypt = publicEncrypt.publicEncrypt\nexports.privateEncrypt = publicEncrypt.privateEncrypt\nexports.publicDecrypt = publicEncrypt.publicDecrypt\nexports.privateDecrypt = publicEncrypt.privateDecrypt\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\n// ;[\n// 'createCredentials'\n// ].forEach(function (name) {\n// exports[name] = function () {\n// throw new Error([\n// 'sorry, ' + name + ' is not implemented yet',\n// 'we accept pull requests',\n// 'https://github.com/crypto-browserify/crypto-browserify'\n// ].join('\\n'))\n// }\n// })\n\nvar rf = require('randomfill')\n\nexports.randomFill = rf.randomFill\nexports.randomFillSync = rf.randomFillSync\n\nexports.createCredentials = function () {\n throw new Error([\n 'sorry, createCredentials is not implemented yet',\n 'we accept pull requests',\n 'https://github.com/crypto-browserify/crypto-browserify'\n ].join('\\n'))\n}\n\nexports.constants = {\n 'DH_CHECK_P_NOT_SAFE_PRIME': 2,\n 'DH_CHECK_P_NOT_PRIME': 1,\n 'DH_UNABLE_TO_CHECK_GENERATOR': 4,\n 'DH_NOT_SUITABLE_GENERATOR': 8,\n 'NPN_ENABLED': 1,\n 'ALPN_ENABLED': 1,\n 'RSA_PKCS1_PADDING': 1,\n 'RSA_SSLV23_PADDING': 2,\n 'RSA_NO_PADDING': 3,\n 'RSA_PKCS1_OAEP_PADDING': 4,\n 'RSA_X931_PADDING': 5,\n 'RSA_PKCS1_PSS_PADDING': 6,\n 'POINT_CONVERSION_COMPRESSED': 2,\n 'POINT_CONVERSION_UNCOMPRESSED': 4,\n 'POINT_CONVERSION_HYBRID': 6\n}\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import { Globals } from '@react-spring/core';\nexport * from '@react-spring/core';\nimport { unstable_batchedUpdates } from 'react-dom';\nimport { eachProp, is, toArray, FluidValue, each, getFluidValue, hasFluidValue, addFluidObserver, removeFluidObserver, callFluidObservers, createStringInterpolator, colors } from '@react-spring/shared';\nimport { AnimatedObject, createHost } from '@react-spring/animated';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst _excluded$2 = [\"style\", \"children\", \"scrollTop\", \"scrollLeft\"];\nconst isCustomPropRE = /^--/;\n\nfunction dangerousStyleValue(name, value) {\n if (value == null || typeof value === 'boolean' || value === '') return '';\n if (typeof value === 'number' && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px';\n return ('' + value).trim();\n}\n\nconst attributeCache = {};\nfunction applyAnimatedValues(instance, props) {\n if (!instance.nodeType || !instance.setAttribute) {\n return false;\n }\n\n const isFilterElement = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';\n\n const _ref = props,\n {\n style,\n children,\n scrollTop,\n scrollLeft\n } = _ref,\n attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n const values = Object.values(attributes);\n const names = Object.keys(attributes).map(name => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, n => '-' + n.toLowerCase())));\n\n if (children !== void 0) {\n instance.textContent = children;\n }\n\n for (let name in style) {\n if (style.hasOwnProperty(name)) {\n const value = dangerousStyleValue(name, style[name]);\n\n if (isCustomPropRE.test(name)) {\n instance.style.setProperty(name, value);\n } else {\n instance.style[name] = value;\n }\n }\n }\n\n names.forEach((name, i) => {\n instance.setAttribute(name, values[i]);\n });\n\n if (scrollTop !== void 0) {\n instance.scrollTop = scrollTop;\n }\n\n if (scrollLeft !== void 0) {\n instance.scrollLeft = scrollLeft;\n }\n}\nlet isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n\nconst prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1);\n\nconst prefixes = ['Webkit', 'Ms', 'Moz', 'O'];\nisUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {\n prefixes.forEach(prefix => acc[prefixKey(prefix, prop)] = acc[prop]);\n return acc;\n}, isUnitlessNumber);\n\nconst _excluded$1 = [\"x\", \"y\", \"z\"];\nconst domTransforms = /^(matrix|translate|scale|rotate|skew)/;\nconst pxTransforms = /^(translate)/;\nconst degTransforms = /^(rotate|skew)/;\n\nconst addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;\n\nconst isValueIdentity = (value, id) => is.arr(value) ? value.every(v => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id;\n\nclass AnimatedStyle extends AnimatedObject {\n constructor(_ref) {\n let {\n x,\n y,\n z\n } = _ref,\n style = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n const inputs = [];\n const transforms = [];\n\n if (x || y || z) {\n inputs.push([x || 0, y || 0, z || 0]);\n transforms.push(xyz => [`translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, isValueIdentity(xyz, 0)]);\n }\n\n eachProp(style, (value, key) => {\n if (key === 'transform') {\n inputs.push([value || '']);\n transforms.push(transform => [transform, transform === '']);\n } else if (domTransforms.test(key)) {\n delete style[key];\n if (is.und(value)) return;\n const unit = pxTransforms.test(key) ? 'px' : degTransforms.test(key) ? 'deg' : '';\n inputs.push(toArray(value));\n transforms.push(key === 'rotate3d' ? ([x, y, z, deg]) => [`rotate3d(${x},${y},${z},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : input => [`${key}(${input.map(v => addUnit(v, unit)).join(',')})`, isValueIdentity(input, key.startsWith('scale') ? 1 : 0)]);\n }\n });\n\n if (inputs.length) {\n style.transform = new FluidTransform(inputs, transforms);\n }\n\n super(style);\n }\n\n}\n\nclass FluidTransform extends FluidValue {\n constructor(inputs, transforms) {\n super();\n this._value = null;\n this.inputs = inputs;\n this.transforms = transforms;\n }\n\n get() {\n return this._value || (this._value = this._get());\n }\n\n _get() {\n let transform = '';\n let identity = true;\n each(this.inputs, (input, i) => {\n const arg1 = getFluidValue(input[0]);\n const [t, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));\n transform += ' ' + t;\n identity = identity && id;\n });\n return identity ? 'none' : transform;\n }\n\n observerAdded(count) {\n if (count == 1) each(this.inputs, input => each(input, value => hasFluidValue(value) && addFluidObserver(value, this)));\n }\n\n observerRemoved(count) {\n if (count == 0) each(this.inputs, input => each(input, value => hasFluidValue(value) && removeFluidObserver(value, this)));\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n this._value = null;\n }\n\n callFluidObservers(this, event);\n }\n\n}\n\nconst primitives = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nconst _excluded = [\"scrollTop\", \"scrollLeft\"];\nGlobals.assign({\n batchedUpdates: unstable_batchedUpdates,\n createStringInterpolator,\n colors\n});\nconst host = createHost(primitives, {\n applyAnimatedValues,\n createAnimatedStyle: style => new AnimatedStyle(style),\n getComponentProps: _ref => {\n let props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return props;\n }\n});\nconst animated = host.animated;\n\nexport { animated as a, animated };\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict'\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('readable-stream').Transform\nvar inherits = require('inherits')\n\nfunction throwIfNotStringOrBuffer (val, prefix) {\n if (!Buffer.isBuffer(val) && typeof val !== 'string') {\n throw new TypeError(prefix + ' must be a string or a buffer')\n }\n}\n\nfunction HashBase (blockSize) {\n Transform.call(this)\n\n this._block = Buffer.allocUnsafe(blockSize)\n this._blockSize = blockSize\n this._blockOffset = 0\n this._length = [0, 0, 0, 0]\n\n this._finalized = false\n}\n\ninherits(HashBase, Transform)\n\nHashBase.prototype._transform = function (chunk, encoding, callback) {\n var error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype._flush = function (callback) {\n var error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype.update = function (data, encoding) {\n throwIfNotStringOrBuffer(data, 'Data')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n // consume data\n var block = this._block\n var offset = 0\n while (this._blockOffset + data.length - offset >= this._blockSize) {\n for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]\n this._update()\n this._blockOffset = 0\n }\n while (offset < data.length) block[this._blockOffset++] = data[offset++]\n\n // update length\n for (var j = 0, carry = data.length * 8; carry > 0; ++j) {\n this._length[j] += carry\n carry = (this._length[j] / 0x0100000000) | 0\n if (carry > 0) this._length[j] -= 0x0100000000 * carry\n }\n\n return this\n}\n\nHashBase.prototype._update = function () {\n throw new Error('_update is not implemented')\n}\n\nHashBase.prototype.digest = function (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n var digest = this._digest()\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n // reset state\n this._block.fill(0)\n this._blockOffset = 0\n for (var i = 0; i < 4; ++i) this._length[i] = 0\n\n return digest\n}\n\nHashBase.prototype._digest = function () {\n throw new Error('_digest is not implemented')\n}\n\nmodule.exports = HashBase\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nmodule.exports = Readable;\n/**/\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n\nvar debugUtil = require('util');\n\nvar debug;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = require('./internal/streams/buffer_list');\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.\n\n\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\n\nrequire('inherits')(Readable, Stream);\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')\n\n this.autoDestroy = !!options.autoDestroy; // has it been destroyed\n\n this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n}; // Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n } // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n\n\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n\n return er;\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8\n\n this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:\n\n var p = this._readableState.buffer.head;\n var content = '';\n\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n\n this._readableState.buffer.clear();\n\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n}; // Don't raise the hwm > 1GB\n\n\nvar MAX_HWM = 0x40000000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n } // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true;\n\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n} // Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\n\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n } // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n\n\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n} // at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;\n }\n\n state.readingMore = false;\n} // abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\n\n\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n } // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused\n\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true; // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume'); // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n\n state.paused = false;\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n\n if (!state.reading) {\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n this._readableState.paused = true;\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\n while (state.flowing && stream.read() !== null) {\n ;\n }\n} // wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n\n return createReadableStreamAsyncIterator(this);\n };\n}\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n}); // Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.\n\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\n\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n\n return from(Readable, iterable, opts);\n };\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n\n return -1;\n}","module.exports = require('events').EventEmitter;\n","'use strict'; // undocumented cb() API, needed for core, not for public API\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n\n return this;\n}\n\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\n\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\n\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\n\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n\n return Math.floor(hwm);\n } // Default value\n\n\n return state.objectMode ? 16 : 16 * 1024;\n}\n\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n'use strict';\n\nmodule.exports = Writable;\n/* */\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\n\n\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n/**/\n\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\n\nrequire('inherits')(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called\n\n this.finalCalled = false; // drain event flag.\n\n this.needDrain = false; // at the start of calling end()\n\n this.ending = false; // when end() has been called, and returned\n\n this.ended = false; // when 'finish' is emitted\n\n this.finished = false; // has it been destroyed\n\n this.destroyed = false; // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n\n this.length = 0; // a flag to see when we're in the middle of a write.\n\n this.writing = false; // when true all writes will be buffered until .uncork() call\n\n this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n\n this.sync = true; // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n\n this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n this.onwrite = function (er) {\n onwrite(stream, er);\n }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n this.writecb = null; // the amount that is being written when _write is called.\n\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n\n this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n\n this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')\n\n this.autoDestroy = !!options.autoDestroy; // count buffered requests\n\n this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n\n while (current) {\n out.push(current);\n current = current.next;\n }\n\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex); // legacy.\n\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb\n\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n\n return true;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\n\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n}); // if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er); // this can emit finish, and it will always happen\n // after error\n\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er); // this can emit finish, but finish must\n // always follow error\n\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n} // Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\n\n\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it\n\n\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n\n state.pendingcb++;\n state.lastBufferedRequest = null;\n\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks\n\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n } // ignore unnecessary end() calls.\n\n\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n\n if (err) {\n errorOrDestroy(stream, err);\n }\n\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n\n if (need) {\n prefinish(stream, state);\n\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n } // reuse the free corkReq.\n\n\n state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n'use strict';\n\nmodule.exports = Transform;\n\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n\nvar Duplex = require('./_stream_duplex');\n\nrequire('inherits')(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n}; // This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n}; // Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n]\n\nvar W = new Array(64)\n\nfunction Sha256 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha256, Hash)\n\nSha256.prototype.init = function () {\n this._a = 0x6a09e667\n this._b = 0xbb67ae85\n this._c = 0x3c6ef372\n this._d = 0xa54ff53a\n this._e = 0x510e527f\n this._f = 0x9b05688c\n this._g = 0x1f83d9ab\n this._h = 0x5be0cd19\n\n return this\n}\n\nfunction ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x) {\n return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)\n}\n\nfunction sigma1 (x) {\n return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)\n}\n\nfunction gamma0 (x) {\n return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)\n}\n\nfunction gamma1 (x) {\n return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)\n}\n\nSha256.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n var f = this._f | 0\n var g = this._g | 0\n var h = this._h | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0\n\n for (var j = 0; j < 64; ++j) {\n var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0\n var T2 = (sigma0(a) + maj(a, b, c)) | 0\n\n h = g\n g = f\n f = e\n e = (d + T1) | 0\n d = c\n c = b\n b = a\n a = (T1 + T2) | 0\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n this._f = (f + this._f) | 0\n this._g = (g + this._g) | 0\n this._h = (h + this._h) | 0\n}\n\nSha256.prototype._hash = function () {\n var H = Buffer.allocUnsafe(32)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n H.writeInt32BE(this._h, 28)\n\n return H\n}\n\nmodule.exports = Sha256\n","var inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]\n\nvar W = new Array(160)\n\nfunction Sha512 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha512, Hash)\n\nSha512.prototype.init = function () {\n this._ah = 0x6a09e667\n this._bh = 0xbb67ae85\n this._ch = 0x3c6ef372\n this._dh = 0xa54ff53a\n this._eh = 0x510e527f\n this._fh = 0x9b05688c\n this._gh = 0x1f83d9ab\n this._hh = 0x5be0cd19\n\n this._al = 0xf3bcc908\n this._bl = 0x84caa73b\n this._cl = 0xfe94f82b\n this._dl = 0x5f1d36f1\n this._el = 0xade682d1\n this._fl = 0x2b3e6c1f\n this._gl = 0xfb41bd6b\n this._hl = 0x137e2179\n\n return this\n}\n\nfunction Ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x, xl) {\n return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)\n}\n\nfunction sigma1 (x, xl) {\n return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)\n}\n\nfunction Gamma0 (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)\n}\n\nfunction Gamma0l (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)\n}\n\nfunction Gamma1 (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)\n}\n\nfunction Gamma1l (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)\n}\n\nfunction getCarry (a, b) {\n return (a >>> 0) < (b >>> 0) ? 1 : 0\n}\n\nSha512.prototype._update = function (M) {\n var W = this._w\n\n var ah = this._ah | 0\n var bh = this._bh | 0\n var ch = this._ch | 0\n var dh = this._dh | 0\n var eh = this._eh | 0\n var fh = this._fh | 0\n var gh = this._gh | 0\n var hh = this._hh | 0\n\n var al = this._al | 0\n var bl = this._bl | 0\n var cl = this._cl | 0\n var dl = this._dl | 0\n var el = this._el | 0\n var fl = this._fl | 0\n var gl = this._gl | 0\n var hl = this._hl | 0\n\n for (var i = 0; i < 32; i += 2) {\n W[i] = M.readInt32BE(i * 4)\n W[i + 1] = M.readInt32BE(i * 4 + 4)\n }\n for (; i < 160; i += 2) {\n var xh = W[i - 15 * 2]\n var xl = W[i - 15 * 2 + 1]\n var gamma0 = Gamma0(xh, xl)\n var gamma0l = Gamma0l(xl, xh)\n\n xh = W[i - 2 * 2]\n xl = W[i - 2 * 2 + 1]\n var gamma1 = Gamma1(xh, xl)\n var gamma1l = Gamma1l(xl, xh)\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7h = W[i - 7 * 2]\n var Wi7l = W[i - 7 * 2 + 1]\n\n var Wi16h = W[i - 16 * 2]\n var Wi16l = W[i - 16 * 2 + 1]\n\n var Wil = (gamma0l + Wi7l) | 0\n var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0\n Wil = (Wil + gamma1l) | 0\n Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0\n Wil = (Wil + Wi16l) | 0\n Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0\n\n W[i] = Wih\n W[i + 1] = Wil\n }\n\n for (var j = 0; j < 160; j += 2) {\n Wih = W[j]\n Wil = W[j + 1]\n\n var majh = maj(ah, bh, ch)\n var majl = maj(al, bl, cl)\n\n var sigma0h = sigma0(ah, al)\n var sigma0l = sigma0(al, ah)\n var sigma1h = sigma1(eh, el)\n var sigma1l = sigma1(el, eh)\n\n // t1 = h + sigma1 + ch + K[j] + W[j]\n var Kih = K[j]\n var Kil = K[j + 1]\n\n var chh = Ch(eh, fh, gh)\n var chl = Ch(el, fl, gl)\n\n var t1l = (hl + sigma1l) | 0\n var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0\n t1l = (t1l + chl) | 0\n t1h = (t1h + chh + getCarry(t1l, chl)) | 0\n t1l = (t1l + Kil) | 0\n t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0\n t1l = (t1l + Wil) | 0\n t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0\n\n // t2 = sigma0 + maj\n var t2l = (sigma0l + majl) | 0\n var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0\n\n hh = gh\n hl = gl\n gh = fh\n gl = fl\n fh = eh\n fl = el\n el = (dl + t1l) | 0\n eh = (dh + t1h + getCarry(el, dl)) | 0\n dh = ch\n dl = cl\n ch = bh\n cl = bl\n bh = ah\n bl = al\n al = (t1l + t2l) | 0\n ah = (t1h + t2h + getCarry(al, t1l)) | 0\n }\n\n this._al = (this._al + al) | 0\n this._bl = (this._bl + bl) | 0\n this._cl = (this._cl + cl) | 0\n this._dl = (this._dl + dl) | 0\n this._el = (this._el + el) | 0\n this._fl = (this._fl + fl) | 0\n this._gl = (this._gl + gl) | 0\n this._hl = (this._hl + hl) | 0\n\n this._ah = (this._ah + ah + getCarry(this._al, al)) | 0\n this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0\n this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0\n this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0\n this._eh = (this._eh + eh + getCarry(this._el, el)) | 0\n this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0\n this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0\n this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0\n}\n\nSha512.prototype._hash = function () {\n var H = Buffer.allocUnsafe(64)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n writeInt64BE(this._gh, this._gl, 48)\n writeInt64BE(this._hh, this._hl, 56)\n\n return H\n}\n\nmodule.exports = Sha512\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\nmodule.exports = Readable;\n\n/**/\nvar isArray = require('isarray');\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","module.exports = require('events').EventEmitter;\n","'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n\n cb(er);\n\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}","'use strict'\nvar inherits = require('inherits')\nvar Legacy = require('./legacy')\nvar Base = require('cipher-base')\nvar Buffer = require('safe-buffer').Buffer\nvar md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\n\nvar sha = require('sha.js')\n\nvar ZEROS = Buffer.alloc(128)\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n this._alg = alg\n this._key = key\n if (key.length > blocksize) {\n var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n key = hash.update(key).digest()\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n this._hash.update(ipad)\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._hash.digest()\n var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)\n return hash.update(this._opad).update(h).digest()\n}\n\nmodule.exports = function createHmac (alg, key) {\n alg = alg.toLowerCase()\n if (alg === 'rmd160' || alg === 'ripemd160') {\n return new Hmac('rmd160', key)\n }\n if (alg === 'md5') {\n return new Legacy(md5, key)\n }\n return new Hmac(alg, key)\n}\n","var MD5 = require('md5.js')\n\nmodule.exports = function (buffer) {\n return new MD5().update(buffer).digest()\n}\n","exports.pbkdf2 = require('./lib/async')\nexports.pbkdf2Sync = require('./lib/sync')\n","var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs\n\nmodule.exports = function (iterations, keylen) {\n if (typeof iterations !== 'number') {\n throw new TypeError('Iterations not a number')\n }\n\n if (iterations < 0) {\n throw new TypeError('Bad iterations')\n }\n\n if (typeof keylen !== 'number') {\n throw new TypeError('Key length not a number')\n }\n\n if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */\n throw new TypeError('Bad key length')\n }\n}\n","var defaultEncoding\n/* istanbul ignore next */\nif (process.browser) {\n defaultEncoding = 'utf-8'\n} else if (process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)\n\n defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'\n} else {\n defaultEncoding = 'utf-8'\n}\nmodule.exports = defaultEncoding\n","var md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar toBuffer = require('./to-buffer')\n\nvar ZEROS = Buffer.alloc(128)\nvar sizes = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n rmd160: 20,\n ripemd160: 20\n}\n\nfunction Hmac (alg, key, saltLen) {\n var hash = getDigest(alg)\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n if (key.length > blocksize) {\n key = hash(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])\n var opad = Buffer.allocUnsafe(blocksize + sizes[alg])\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)\n ipad.copy(ipad1, 0, 0, blocksize)\n this.ipad1 = ipad1\n this.ipad2 = ipad\n this.opad = opad\n this.alg = alg\n this.blocksize = blocksize\n this.hash = hash\n this.size = sizes[alg]\n}\n\nHmac.prototype.run = function (data, ipad) {\n data.copy(ipad, this.blocksize)\n var h = this.hash(ipad)\n h.copy(this.opad, this.blocksize)\n return this.hash(this.opad)\n}\n\nfunction getDigest (alg) {\n function shaFunc (data) {\n return sha(alg).update(data).digest()\n }\n function rmd160Func (data) {\n return new RIPEMD160().update(data).digest()\n }\n\n if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func\n if (alg === 'md5') return md5\n return shaFunc\n}\n\nfunction pbkdf2 (password, salt, iterations, keylen, digest) {\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n\n digest = digest || 'sha1'\n\n var hmac = new Hmac(digest, password, salt.length)\n\n var DK = Buffer.allocUnsafe(keylen)\n var block1 = Buffer.allocUnsafe(salt.length + 4)\n salt.copy(block1, 0, 0, salt.length)\n\n var destPos = 0\n var hLen = sizes[digest]\n var l = Math.ceil(keylen / hLen)\n\n for (var i = 1; i <= l; i++) {\n block1.writeUInt32BE(i, salt.length)\n\n var T = hmac.run(block1, hmac.ipad1)\n var U = T\n\n for (var j = 1; j < iterations; j++) {\n U = hmac.run(U, hmac.ipad2)\n for (var k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n T.copy(DK, destPos)\n destPos += hLen\n }\n\n return DK\n}\n\nmodule.exports = pbkdf2\n","var Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (thing, encoding, name) {\n if (Buffer.isBuffer(thing)) {\n return thing\n } else if (typeof thing === 'string') {\n return Buffer.from(thing, encoding)\n } else if (ArrayBuffer.isView(thing)) {\n return Buffer.from(thing.buffer)\n } else {\n throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')\n }\n}\n","'use strict';\n\nexports.readUInt32BE = function readUInt32BE(bytes, off) {\n var res = (bytes[0 + off] << 24) |\n (bytes[1 + off] << 16) |\n (bytes[2 + off] << 8) |\n bytes[3 + off];\n return res >>> 0;\n};\n\nexports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {\n bytes[0 + off] = value >>> 24;\n bytes[1 + off] = (value >>> 16) & 0xff;\n bytes[2 + off] = (value >>> 8) & 0xff;\n bytes[3 + off] = value & 0xff;\n};\n\nexports.ip = function ip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n }\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.rip = function rip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 0; i < 4; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n for (var i = 4; i < 8; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.pc1 = function pc1(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n // 7, 15, 23, 31, 39, 47, 55, 63\n // 6, 14, 22, 30, 39, 47, 55, 63\n // 5, 13, 21, 29, 39, 47, 55, 63\n // 4, 12, 20, 28\n for (var i = 7; i >= 5; i--) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n\n // 1, 9, 17, 25, 33, 41, 49, 57\n // 2, 10, 18, 26, 34, 42, 50, 58\n // 3, 11, 19, 27, 35, 43, 51, 59\n // 36, 44, 52, 60\n for (var i = 1; i <= 3; i++) {\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.r28shl = function r28shl(num, shift) {\n return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));\n};\n\nvar pc2table = [\n // inL => outL\n 14, 11, 17, 4, 27, 23, 25, 0,\n 13, 22, 7, 18, 5, 9, 16, 24,\n 2, 20, 12, 21, 1, 8, 15, 26,\n\n // inR => outR\n 15, 4, 25, 19, 9, 1, 26, 16,\n 5, 11, 23, 8, 12, 7, 17, 0,\n 22, 3, 10, 14, 6, 20, 27, 24\n];\n\nexports.pc2 = function pc2(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n var len = pc2table.length >>> 1;\n for (var i = 0; i < len; i++) {\n outL <<= 1;\n outL |= (inL >>> pc2table[i]) & 0x1;\n }\n for (var i = len; i < pc2table.length; i++) {\n outR <<= 1;\n outR |= (inR >>> pc2table[i]) & 0x1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.expand = function expand(r, out, off) {\n var outL = 0;\n var outR = 0;\n\n outL = ((r & 1) << 5) | (r >>> 27);\n for (var i = 23; i >= 15; i -= 4) {\n outL <<= 6;\n outL |= (r >>> i) & 0x3f;\n }\n for (var i = 11; i >= 3; i -= 4) {\n outR |= (r >>> i) & 0x3f;\n outR <<= 6;\n }\n outR |= ((r & 0x1f) << 1) | (r >>> 31);\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nvar sTable = [\n 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,\n 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,\n 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,\n 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,\n\n 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,\n 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,\n 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,\n 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,\n\n 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,\n 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,\n 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,\n 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,\n\n 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,\n 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,\n 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,\n 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,\n\n 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,\n 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,\n 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,\n 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,\n\n 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,\n 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,\n 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,\n 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,\n\n 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,\n 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,\n 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,\n 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,\n\n 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,\n 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,\n 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,\n 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11\n];\n\nexports.substitute = function substitute(inL, inR) {\n var out = 0;\n for (var i = 0; i < 4; i++) {\n var b = (inL >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n for (var i = 0; i < 4; i++) {\n var b = (inR >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[4 * 0x40 + i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n return out >>> 0;\n};\n\nvar permuteTable = [\n 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,\n 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7\n];\n\nexports.permute = function permute(num) {\n var out = 0;\n for (var i = 0; i < permuteTable.length; i++) {\n out <<= 1;\n out |= (num >>> permuteTable[i]) & 0x1;\n }\n return out >>> 0;\n};\n\nexports.padSplit = function padSplit(num, size, group) {\n var str = num.toString(2);\n while (str.length < size)\n str = '0' + str;\n\n var out = [];\n for (var i = 0; i < size; i += group)\n out.push(str.slice(i, i + group));\n return out.join(' ');\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar utils = require('./utils');\nvar Cipher = require('./cipher');\n\nfunction DESState() {\n this.tmp = new Array(2);\n this.keys = null;\n}\n\nfunction DES(options) {\n Cipher.call(this, options);\n\n var state = new DESState();\n this._desState = state;\n\n this.deriveKeys(state, options.key);\n}\ninherits(DES, Cipher);\nmodule.exports = DES;\n\nDES.create = function create(options) {\n return new DES(options);\n};\n\nvar shiftTable = [\n 1, 1, 2, 2, 2, 2, 2, 2,\n 1, 2, 2, 2, 2, 2, 2, 1\n];\n\nDES.prototype.deriveKeys = function deriveKeys(state, key) {\n state.keys = new Array(16 * 2);\n\n assert.equal(key.length, this.blockSize, 'Invalid key length');\n\n var kL = utils.readUInt32BE(key, 0);\n var kR = utils.readUInt32BE(key, 4);\n\n utils.pc1(kL, kR, state.tmp, 0);\n kL = state.tmp[0];\n kR = state.tmp[1];\n for (var i = 0; i < state.keys.length; i += 2) {\n var shift = shiftTable[i >>> 1];\n kL = utils.r28shl(kL, shift);\n kR = utils.r28shl(kR, shift);\n utils.pc2(kL, kR, state.keys, i);\n }\n};\n\nDES.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._desState;\n\n var l = utils.readUInt32BE(inp, inOff);\n var r = utils.readUInt32BE(inp, inOff + 4);\n\n // Initial Permutation\n utils.ip(l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n\n if (this.type === 'encrypt')\n this._encrypt(state, l, r, state.tmp, 0);\n else\n this._decrypt(state, l, r, state.tmp, 0);\n\n l = state.tmp[0];\n r = state.tmp[1];\n\n utils.writeUInt32BE(out, l, outOff);\n utils.writeUInt32BE(out, r, outOff + 4);\n};\n\nDES.prototype._pad = function _pad(buffer, off) {\n var value = buffer.length - off;\n for (var i = off; i < buffer.length; i++)\n buffer[i] = value;\n\n return true;\n};\n\nDES.prototype._unpad = function _unpad(buffer) {\n var pad = buffer[buffer.length - 1];\n for (var i = buffer.length - pad; i < buffer.length; i++)\n assert.equal(buffer[i], pad);\n\n return buffer.slice(0, buffer.length - pad);\n};\n\nDES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {\n var l = lStart;\n var r = rStart;\n\n // Apply f() x16 times\n for (var i = 0; i < state.keys.length; i += 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(r, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = r;\n r = (l ^ f) >>> 0;\n l = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(r, l, out, off);\n};\n\nDES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {\n var l = rStart;\n var r = lStart;\n\n // Apply f() x16 times\n for (var i = state.keys.length - 2; i >= 0; i -= 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(l, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = l;\n l = (r ^ f) >>> 0;\n r = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(l, r, out, off);\n};\n","var xor = require('buffer-xor')\nvar Buffer = require('safe-buffer').Buffer\nvar incr32 = require('../incr32')\n\nfunction getBlock (self) {\n var out = self._cipher.encryptBlockRaw(self._prev)\n incr32(self._prev)\n return out\n}\n\nvar blockSize = 16\nexports.encrypt = function (self, chunk) {\n var chunkNum = Math.ceil(chunk.length / blockSize)\n var start = self._cache.length\n self._cache = Buffer.concat([\n self._cache,\n Buffer.allocUnsafe(chunkNum * blockSize)\n ])\n for (var i = 0; i < chunkNum; i++) {\n var out = getBlock(self)\n var offset = start + i * blockSize\n self._cache.writeUInt32BE(out[0], offset + 0)\n self._cache.writeUInt32BE(out[1], offset + 4)\n self._cache.writeUInt32BE(out[2], offset + 8)\n self._cache.writeUInt32BE(out[3], offset + 12)\n }\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","function incr32 (iv) {\n var len = iv.length\n var item\n while (len--) {\n item = iv.readUInt8(len)\n if (item === 255) {\n iv.writeUInt8(0, len)\n } else {\n item++\n iv.writeUInt8(item, len)\n break\n }\n }\n}\nmodule.exports = incr32\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\nvar GHASH = require('./ghash')\nvar xor = require('buffer-xor')\nvar incr32 = require('./incr32')\n\nfunction xorTest (a, b) {\n var out = 0\n if (a.length !== b.length) out++\n\n var len = Math.min(a.length, b.length)\n for (var i = 0; i < len; ++i) {\n out += (a[i] ^ b[i])\n }\n\n return out\n}\n\nfunction calcIv (self, iv, ck) {\n if (iv.length === 12) {\n self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])\n return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])\n }\n var ghash = new GHASH(ck)\n var len = iv.length\n var toPad = len % 16\n ghash.update(iv)\n if (toPad) {\n toPad = 16 - toPad\n ghash.update(Buffer.alloc(toPad, 0))\n }\n ghash.update(Buffer.alloc(8, 0))\n var ivBits = len * 8\n var tail = Buffer.alloc(8)\n tail.writeUIntBE(ivBits, 0, 8)\n ghash.update(tail)\n self._finID = ghash.state\n var out = Buffer.from(self._finID)\n incr32(out)\n return out\n}\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n var h = Buffer.alloc(4, 0)\n\n this._cipher = new aes.AES(key)\n var ck = this._cipher.encryptBlock(h)\n this._ghash = new GHASH(ck)\n iv = calcIv(this, iv, ck)\n\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._alen = 0\n this._len = 0\n this._mode = mode\n\n this._authTag = null\n this._called = false\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n if (!this._called && this._alen) {\n var rump = 16 - (this._alen % 16)\n if (rump < 16) {\n rump = Buffer.alloc(rump, 0)\n this._ghash.update(rump)\n }\n }\n\n this._called = true\n var out = this._mode.encrypt(this, chunk)\n if (this._decrypt) {\n this._ghash.update(chunk)\n } else {\n this._ghash.update(out)\n }\n this._len += chunk.length\n return out\n}\n\nStreamCipher.prototype._final = function () {\n if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')\n\n var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))\n if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')\n\n this._authTag = tag\n this._cipher.scrub()\n}\n\nStreamCipher.prototype.getAuthTag = function getAuthTag () {\n if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')\n\n return this._authTag\n}\n\nStreamCipher.prototype.setAuthTag = function setAuthTag (tag) {\n if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')\n\n this._authTag = tag\n}\n\nStreamCipher.prototype.setAAD = function setAAD (buf) {\n if (this._called) throw new Error('Attempting to set AAD in unsupported state')\n\n this._ghash.update(buf)\n this._alen += buf.length\n}\n\nmodule.exports = StreamCipher\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\n\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._mode = mode\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n return this._mode.encrypt(this, chunk, this._decrypt)\n}\n\nStreamCipher.prototype._final = function () {\n this._cipher.scrub()\n}\n\nmodule.exports = StreamCipher\n","var randomBytes = require('randombytes');\nmodule.exports = findPrime;\nfindPrime.simpleSieve = simpleSieve;\nfindPrime.fermatTest = fermatTest;\nvar BN = require('bn.js');\nvar TWENTYFOUR = new BN(24);\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar ONE = new BN(1);\nvar TWO = new BN(2);\nvar FIVE = new BN(5);\nvar SIXTEEN = new BN(16);\nvar EIGHT = new BN(8);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar ELEVEN = new BN(11);\nvar FOUR = new BN(4);\nvar TWELVE = new BN(12);\nvar primes = null;\n\nfunction _getPrimes() {\n if (primes !== null)\n return primes;\n\n var limit = 0x100000;\n var res = [];\n res[0] = 2;\n for (var i = 1, k = 3; k < limit; k += 2) {\n var sqrt = Math.ceil(Math.sqrt(k));\n for (var j = 0; j < i && res[j] <= sqrt; j++)\n if (k % res[j] === 0)\n break;\n\n if (i !== j && res[j] <= sqrt)\n continue;\n\n res[i++] = k;\n }\n primes = res;\n return res;\n}\n\nfunction simpleSieve(p) {\n var primes = _getPrimes();\n\n for (var i = 0; i < primes.length; i++)\n if (p.modn(primes[i]) === 0) {\n if (p.cmpn(primes[i]) === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n return true;\n}\n\nfunction fermatTest(p) {\n var red = BN.mont(p);\n return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;\n}\n\nfunction findPrime(bits, gen) {\n if (bits < 16) {\n // this is what openssl does\n if (gen === 2 || gen === 5) {\n return new BN([0x8c, 0x7b]);\n } else {\n return new BN([0x8c, 0x27]);\n }\n }\n gen = new BN(gen);\n\n var num, n2;\n\n while (true) {\n num = new BN(randomBytes(Math.ceil(bits / 8)));\n while (num.bitLength() > bits) {\n num.ishrn(1);\n }\n if (num.isEven()) {\n num.iadd(ONE);\n }\n if (!num.testn(1)) {\n num.iadd(TWO);\n }\n if (!gen.cmp(TWO)) {\n while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {\n num.iadd(FOUR);\n }\n } else if (!gen.cmp(FIVE)) {\n while (num.mod(TEN).cmp(THREE)) {\n num.iadd(FOUR);\n }\n }\n n2 = num.shrn(1);\n if (simpleSieve(n2) && simpleSieve(num) &&\n fermatTest(n2) && fermatTest(num) &&\n millerRabin.test(n2) && millerRabin.test(num)) {\n return num;\n }\n }\n\n}\n","var bn = require('bn.js');\nvar brorand = require('brorand');\n\nfunction MillerRabin(rand) {\n this.rand = rand || new brorand.Rand();\n}\nmodule.exports = MillerRabin;\n\nMillerRabin.create = function create(rand) {\n return new MillerRabin(rand);\n};\n\nMillerRabin.prototype._randbelow = function _randbelow(n) {\n var len = n.bitLength();\n var min_bytes = Math.ceil(len / 8);\n\n // Generage random bytes until a number less than n is found.\n // This ensures that 0..n-1 have an equal probability of being selected.\n do\n var a = new bn(this.rand.generate(min_bytes));\n while (a.cmp(n) >= 0);\n\n return a;\n};\n\nMillerRabin.prototype._randrange = function _randrange(start, stop) {\n // Generate a random number greater than or equal to start and less than stop.\n var size = stop.sub(start);\n return start.add(this._randbelow(size));\n};\n\nMillerRabin.prototype.test = function test(n, k, cb) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n var prime = true;\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n if (cb)\n cb(a);\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return false;\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s)\n return false;\n }\n\n return prime;\n};\n\nMillerRabin.prototype.getDivisor = function getDivisor(n, k) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n\n var g = n.gcd(a);\n if (g.cmpn(1) !== 0)\n return g;\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return x.fromRed().subn(1).gcd(n);\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s) {\n x = x.redSqr();\n return x.fromRed().subn(1).gcd(n);\n }\n }\n\n return false;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nmodule.exports = Readable;\n/**/\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n\nvar debugUtil = require('util');\n\nvar debug;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = require('./internal/streams/buffer_list');\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.\n\n\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\n\nrequire('inherits')(Readable, Stream);\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')\n\n this.autoDestroy = !!options.autoDestroy; // has it been destroyed\n\n this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n}; // Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n } // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n\n\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n\n return er;\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8\n\n this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:\n\n var p = this._readableState.buffer.head;\n var content = '';\n\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n\n this._readableState.buffer.clear();\n\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n}; // Don't raise the hwm > 1GB\n\n\nvar MAX_HWM = 0x40000000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n } // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true;\n\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n} // Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\n\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n } // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n\n\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n} // at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;\n }\n\n state.readingMore = false;\n} // abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\n\n\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n } // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused\n\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true; // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume'); // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n\n state.paused = false;\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n\n if (!state.reading) {\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n this._readableState.paused = true;\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\n while (state.flowing && stream.read() !== null) {\n ;\n }\n} // wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n\n return createReadableStreamAsyncIterator(this);\n };\n}\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n}); // Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.\n\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\n\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n\n return from(Readable, iterable, opts);\n };\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n\n return -1;\n}","module.exports = require('events').EventEmitter;\n","'use strict'; // undocumented cb() API, needed for core, not for public API\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n\n return this;\n}\n\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\n\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\n\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\n\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n\n return Math.floor(hwm);\n } // Default value\n\n\n return state.objectMode ? 16 : 16 * 1024;\n}\n\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n'use strict';\n\nmodule.exports = Writable;\n/* */\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\n\n\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n/**/\n\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\n\nrequire('inherits')(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called\n\n this.finalCalled = false; // drain event flag.\n\n this.needDrain = false; // at the start of calling end()\n\n this.ending = false; // when end() has been called, and returned\n\n this.ended = false; // when 'finish' is emitted\n\n this.finished = false; // has it been destroyed\n\n this.destroyed = false; // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n\n this.length = 0; // a flag to see when we're in the middle of a write.\n\n this.writing = false; // when true all writes will be buffered until .uncork() call\n\n this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n\n this.sync = true; // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n\n this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n this.onwrite = function (er) {\n onwrite(stream, er);\n }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n this.writecb = null; // the amount that is being written when _write is called.\n\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n\n this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n\n this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')\n\n this.autoDestroy = !!options.autoDestroy; // count buffered requests\n\n this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n\n while (current) {\n out.push(current);\n current = current.next;\n }\n\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex); // legacy.\n\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb\n\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n\n return true;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\n\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n}); // if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er); // this can emit finish, and it will always happen\n // after error\n\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er); // this can emit finish, but finish must\n // always follow error\n\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n} // Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\n\n\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it\n\n\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n\n state.pendingcb++;\n state.lastBufferedRequest = null;\n\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks\n\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n } // ignore unnecessary end() calls.\n\n\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n\n if (err) {\n errorOrDestroy(stream, err);\n }\n\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n\n if (need) {\n prefinish(stream, state);\n\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n } // reuse the free corkReq.\n\n\n state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n'use strict';\n\nmodule.exports = Transform;\n\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n\nvar Duplex = require('./_stream_duplex');\n\nrequire('inherits')(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n}; // This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n}; // Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n Buffer = require('buffer').Buffer;\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n }\n\n if (base === 16) {\n this._parseHex(number, start);\n } else {\n this._parseBase(number, base, start);\n }\n\n if (number[0] === '-') {\n this.negative = 1;\n }\n\n this._strip();\n\n if (endian !== 'le') return;\n\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex (str, start, end) {\n var r = 0;\n var len = Math.min(str.length, end);\n var z = 0;\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r <<= 4;\n\n var b;\n\n // 'a' - 'f'\n if (c >= 49 && c <= 54) {\n b = c - 49 + 0xa;\n\n // 'A' - 'F'\n } else if (c >= 17 && c <= 22) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n\n r |= b;\n z |= b;\n }\n\n assert(!(z & 0xf0), 'Invalid character in ' + str);\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n // Scan 24-bit chunks and add them to the number\n var off = 0;\n for (i = number.length - 6, j = 0; i >= start; i -= 6) {\n w = parseHex(number, i, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n if (i + 6 !== start) {\n w = parseHex(number, start, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n }\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","'use strict';\n\nconst asn1 = exports;\n\nasn1.bignum = require('bn.js');\n\nasn1.define = require('./asn1/api').define;\nasn1.base = require('./asn1/base');\nasn1.constants = require('./asn1/constants');\nasn1.decoders = require('./asn1/decoders');\nasn1.encoders = require('./asn1/encoders');\n","'use strict';\n\nconst encoders = exports;\n\nencoders.der = require('./der');\nencoders.pem = require('./pem');\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DEREncoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n}\nmodule.exports = DEREncoder;\n\nDEREncoder.prototype.encode = function encode(data, reporter) {\n return this.tree._encode(data, reporter).join();\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._encodeComposite = function encodeComposite(tag,\n primitive,\n cls,\n content) {\n const encodedTag = encodeTag(tag, primitive, cls, this.reporter);\n\n // Short form\n if (content.length < 0x80) {\n const header = Buffer.alloc(2);\n header[0] = encodedTag;\n header[1] = content.length;\n return this._createEncoderBuffer([ header, content ]);\n }\n\n // Long form\n // Count octets required to store length\n let lenOctets = 1;\n for (let i = content.length; i >= 0x100; i >>= 8)\n lenOctets++;\n\n const header = Buffer.alloc(1 + 1 + lenOctets);\n header[0] = encodedTag;\n header[1] = 0x80 | lenOctets;\n\n for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)\n header[i] = j & 0xff;\n\n return this._createEncoderBuffer([ header, content ]);\n};\n\nDERNode.prototype._encodeStr = function encodeStr(str, tag) {\n if (tag === 'bitstr') {\n return this._createEncoderBuffer([ str.unused | 0, str.data ]);\n } else if (tag === 'bmpstr') {\n const buf = Buffer.alloc(str.length * 2);\n for (let i = 0; i < str.length; i++) {\n buf.writeUInt16BE(str.charCodeAt(i), i * 2);\n }\n return this._createEncoderBuffer(buf);\n } else if (tag === 'numstr') {\n if (!this._isNumstr(str)) {\n return this.reporter.error('Encoding of string type: numstr supports ' +\n 'only digits and space');\n }\n return this._createEncoderBuffer(str);\n } else if (tag === 'printstr') {\n if (!this._isPrintstr(str)) {\n return this.reporter.error('Encoding of string type: printstr supports ' +\n 'only latin upper and lower case letters, ' +\n 'digits, space, apostrophe, left and rigth ' +\n 'parenthesis, plus sign, comma, hyphen, ' +\n 'dot, slash, colon, equal sign, ' +\n 'question mark');\n }\n return this._createEncoderBuffer(str);\n } else if (/str$/.test(tag)) {\n return this._createEncoderBuffer(str);\n } else if (tag === 'objDesc') {\n return this._createEncoderBuffer(str);\n } else {\n return this.reporter.error('Encoding of string type: ' + tag +\n ' unsupported');\n }\n};\n\nDERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {\n if (typeof id === 'string') {\n if (!values)\n return this.reporter.error('string objid given, but no values map found');\n if (!values.hasOwnProperty(id))\n return this.reporter.error('objid not found in values map');\n id = values[id].split(/[\\s.]+/g);\n for (let i = 0; i < id.length; i++)\n id[i] |= 0;\n } else if (Array.isArray(id)) {\n id = id.slice();\n for (let i = 0; i < id.length; i++)\n id[i] |= 0;\n }\n\n if (!Array.isArray(id)) {\n return this.reporter.error('objid() should be either array or string, ' +\n 'got: ' + JSON.stringify(id));\n }\n\n if (!relative) {\n if (id[1] >= 40)\n return this.reporter.error('Second objid identifier OOB');\n id.splice(0, 2, id[0] * 40 + id[1]);\n }\n\n // Count number of octets\n let size = 0;\n for (let i = 0; i < id.length; i++) {\n let ident = id[i];\n for (size++; ident >= 0x80; ident >>= 7)\n size++;\n }\n\n const objid = Buffer.alloc(size);\n let offset = objid.length - 1;\n for (let i = id.length - 1; i >= 0; i--) {\n let ident = id[i];\n objid[offset--] = ident & 0x7f;\n while ((ident >>= 7) > 0)\n objid[offset--] = 0x80 | (ident & 0x7f);\n }\n\n return this._createEncoderBuffer(objid);\n};\n\nfunction two(num) {\n if (num < 10)\n return '0' + num;\n else\n return num;\n}\n\nDERNode.prototype._encodeTime = function encodeTime(time, tag) {\n let str;\n const date = new Date(time);\n\n if (tag === 'gentime') {\n str = [\n two(date.getUTCFullYear()),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else if (tag === 'utctime') {\n str = [\n two(date.getUTCFullYear() % 100),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else {\n this.reporter.error('Encoding ' + tag + ' time is not supported yet');\n }\n\n return this._encodeStr(str, 'octstr');\n};\n\nDERNode.prototype._encodeNull = function encodeNull() {\n return this._createEncoderBuffer('');\n};\n\nDERNode.prototype._encodeInt = function encodeInt(num, values) {\n if (typeof num === 'string') {\n if (!values)\n return this.reporter.error('String int or enum given, but no values map');\n if (!values.hasOwnProperty(num)) {\n return this.reporter.error('Values map doesn\\'t contain: ' +\n JSON.stringify(num));\n }\n num = values[num];\n }\n\n // Bignum, assume big endian\n if (typeof num !== 'number' && !Buffer.isBuffer(num)) {\n const numArray = num.toArray();\n if (!num.sign && numArray[0] & 0x80) {\n numArray.unshift(0);\n }\n num = Buffer.from(numArray);\n }\n\n if (Buffer.isBuffer(num)) {\n let size = num.length;\n if (num.length === 0)\n size++;\n\n const out = Buffer.alloc(size);\n num.copy(out);\n if (num.length === 0)\n out[0] = 0;\n return this._createEncoderBuffer(out);\n }\n\n if (num < 0x80)\n return this._createEncoderBuffer(num);\n\n if (num < 0x100)\n return this._createEncoderBuffer([0, num]);\n\n let size = 1;\n for (let i = num; i >= 0x100; i >>= 8)\n size++;\n\n const out = new Array(size);\n for (let i = out.length - 1; i >= 0; i--) {\n out[i] = num & 0xff;\n num >>= 8;\n }\n if(out[0] & 0x80) {\n out.unshift(0);\n }\n\n return this._createEncoderBuffer(Buffer.from(out));\n};\n\nDERNode.prototype._encodeBool = function encodeBool(value) {\n return this._createEncoderBuffer(value ? 0xff : 0);\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getEncoder('der').tree;\n};\n\nDERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {\n const state = this._baseState;\n let i;\n if (state['default'] === null)\n return false;\n\n const data = dataBuffer.join();\n if (state.defaultBuffer === undefined)\n state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();\n\n if (data.length !== state.defaultBuffer.length)\n return false;\n\n for (i=0; i < data.length; i++)\n if (data[i] !== state.defaultBuffer[i])\n return false;\n\n return true;\n};\n\n// Utility methods\n\nfunction encodeTag(tag, primitive, cls, reporter) {\n let res;\n\n if (tag === 'seqof')\n tag = 'seq';\n else if (tag === 'setof')\n tag = 'set';\n\n if (der.tagByName.hasOwnProperty(tag))\n res = der.tagByName[tag];\n else if (typeof tag === 'number' && (tag | 0) === tag)\n res = tag;\n else\n return reporter.error('Unknown tag: ' + tag);\n\n if (res >= 0x1f)\n return reporter.error('Multi-octet tag encoding unsupported');\n\n if (!primitive)\n res |= 0x20;\n\n res |= (der.tagClassByName[cls || 'universal'] << 6);\n\n return res;\n}\n","'use strict';\n\nconst decoders = exports;\n\ndecoders.der = require('./der');\ndecoders.pem = require('./pem');\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst bignum = require('bn.js');\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DERDecoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n}\nmodule.exports = DERDecoder;\n\nDERDecoder.prototype.decode = function decode(data, options) {\n if (!DecoderBuffer.isDecoderBuffer(data)) {\n data = new DecoderBuffer(data, options);\n }\n\n return this.tree._decode(data, options);\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._peekTag = function peekTag(buffer, tag, any) {\n if (buffer.isEmpty())\n return false;\n\n const state = buffer.save();\n const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n buffer.restore(state);\n\n return decodedTag.tag === tag || decodedTag.tagStr === tag ||\n (decodedTag.tagStr + 'of') === tag || any;\n};\n\nDERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {\n const decodedTag = derDecodeTag(buffer,\n 'Failed to decode tag of \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n let len = derDecodeLen(buffer,\n decodedTag.primitive,\n 'Failed to get length of \"' + tag + '\"');\n\n // Failure\n if (buffer.isError(len))\n return len;\n\n if (!any &&\n decodedTag.tag !== tag &&\n decodedTag.tagStr !== tag &&\n decodedTag.tagStr + 'of' !== tag) {\n return buffer.error('Failed to match tag: \"' + tag + '\"');\n }\n\n if (decodedTag.primitive || len !== null)\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n\n // Indefinite length... find END tag\n const state = buffer.save();\n const res = this._skipUntilEnd(\n buffer,\n 'Failed to skip indefinite length body: \"' + this.tag + '\"');\n if (buffer.isError(res))\n return res;\n\n len = buffer.offset - state.offset;\n buffer.restore(state);\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n};\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {\n for (;;) {\n const tag = derDecodeTag(buffer, fail);\n if (buffer.isError(tag))\n return tag;\n const len = derDecodeLen(buffer, tag.primitive, fail);\n if (buffer.isError(len))\n return len;\n\n let res;\n if (tag.primitive || len !== null)\n res = buffer.skip(len);\n else\n res = this._skipUntilEnd(buffer, fail);\n\n // Failure\n if (buffer.isError(res))\n return res;\n\n if (tag.tagStr === 'end')\n break;\n }\n};\n\nDERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,\n options) {\n const result = [];\n while (!buffer.isEmpty()) {\n const possibleEnd = this._peekTag(buffer, 'end');\n if (buffer.isError(possibleEnd))\n return possibleEnd;\n\n const res = decoder.decode(buffer, 'der', options);\n if (buffer.isError(res) && possibleEnd)\n break;\n result.push(res);\n }\n return result;\n};\n\nDERNode.prototype._decodeStr = function decodeStr(buffer, tag) {\n if (tag === 'bitstr') {\n const unused = buffer.readUInt8();\n if (buffer.isError(unused))\n return unused;\n return { unused: unused, data: buffer.raw() };\n } else if (tag === 'bmpstr') {\n const raw = buffer.raw();\n if (raw.length % 2 === 1)\n return buffer.error('Decoding of string type: bmpstr length mismatch');\n\n let str = '';\n for (let i = 0; i < raw.length / 2; i++) {\n str += String.fromCharCode(raw.readUInt16BE(i * 2));\n }\n return str;\n } else if (tag === 'numstr') {\n const numstr = buffer.raw().toString('ascii');\n if (!this._isNumstr(numstr)) {\n return buffer.error('Decoding of string type: ' +\n 'numstr unsupported characters');\n }\n return numstr;\n } else if (tag === 'octstr') {\n return buffer.raw();\n } else if (tag === 'objDesc') {\n return buffer.raw();\n } else if (tag === 'printstr') {\n const printstr = buffer.raw().toString('ascii');\n if (!this._isPrintstr(printstr)) {\n return buffer.error('Decoding of string type: ' +\n 'printstr unsupported characters');\n }\n return printstr;\n } else if (/str$/.test(tag)) {\n return buffer.raw().toString();\n } else {\n return buffer.error('Decoding of string type: ' + tag + ' unsupported');\n }\n};\n\nDERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {\n let result;\n const identifiers = [];\n let ident = 0;\n let subident = 0;\n while (!buffer.isEmpty()) {\n subident = buffer.readUInt8();\n ident <<= 7;\n ident |= subident & 0x7f;\n if ((subident & 0x80) === 0) {\n identifiers.push(ident);\n ident = 0;\n }\n }\n if (subident & 0x80)\n identifiers.push(ident);\n\n const first = (identifiers[0] / 40) | 0;\n const second = identifiers[0] % 40;\n\n if (relative)\n result = identifiers;\n else\n result = [first, second].concat(identifiers.slice(1));\n\n if (values) {\n let tmp = values[result.join(' ')];\n if (tmp === undefined)\n tmp = values[result.join('.')];\n if (tmp !== undefined)\n result = tmp;\n }\n\n return result;\n};\n\nDERNode.prototype._decodeTime = function decodeTime(buffer, tag) {\n const str = buffer.raw().toString();\n\n let year;\n let mon;\n let day;\n let hour;\n let min;\n let sec;\n if (tag === 'gentime') {\n year = str.slice(0, 4) | 0;\n mon = str.slice(4, 6) | 0;\n day = str.slice(6, 8) | 0;\n hour = str.slice(8, 10) | 0;\n min = str.slice(10, 12) | 0;\n sec = str.slice(12, 14) | 0;\n } else if (tag === 'utctime') {\n year = str.slice(0, 2) | 0;\n mon = str.slice(2, 4) | 0;\n day = str.slice(4, 6) | 0;\n hour = str.slice(6, 8) | 0;\n min = str.slice(8, 10) | 0;\n sec = str.slice(10, 12) | 0;\n if (year < 70)\n year = 2000 + year;\n else\n year = 1900 + year;\n } else {\n return buffer.error('Decoding ' + tag + ' time is not supported yet');\n }\n\n return Date.UTC(year, mon - 1, day, hour, min, sec, 0);\n};\n\nDERNode.prototype._decodeNull = function decodeNull() {\n return null;\n};\n\nDERNode.prototype._decodeBool = function decodeBool(buffer) {\n const res = buffer.readUInt8();\n if (buffer.isError(res))\n return res;\n else\n return res !== 0;\n};\n\nDERNode.prototype._decodeInt = function decodeInt(buffer, values) {\n // Bigint, return as it is (assume big endian)\n const raw = buffer.raw();\n let res = new bignum(raw);\n\n if (values)\n res = values[res.toString(10)] || res;\n\n return res;\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getDecoder('der').tree;\n};\n\n// Utility methods\n\nfunction derDecodeTag(buf, fail) {\n let tag = buf.readUInt8(fail);\n if (buf.isError(tag))\n return tag;\n\n const cls = der.tagClass[tag >> 6];\n const primitive = (tag & 0x20) === 0;\n\n // Multi-octet tag - load\n if ((tag & 0x1f) === 0x1f) {\n let oct = tag;\n tag = 0;\n while ((oct & 0x80) === 0x80) {\n oct = buf.readUInt8(fail);\n if (buf.isError(oct))\n return oct;\n\n tag <<= 7;\n tag |= oct & 0x7f;\n }\n } else {\n tag &= 0x1f;\n }\n const tagStr = der.tag[tag];\n\n return {\n cls: cls,\n primitive: primitive,\n tag: tag,\n tagStr: tagStr\n };\n}\n\nfunction derDecodeLen(buf, primitive, fail) {\n let len = buf.readUInt8(fail);\n if (buf.isError(len))\n return len;\n\n // Indefinite form\n if (!primitive && len === 0x80)\n return null;\n\n // Definite form\n if ((len & 0x80) === 0) {\n // Short form\n return len;\n }\n\n // Long form\n const num = len & 0x7f;\n if (num > 4)\n return buf.error('length octect is too long');\n\n len = 0;\n for (let i = 0; i < num; i++) {\n len <<= 8;\n const j = buf.readUInt8(fail);\n if (buf.isError(j))\n return j;\n len |= j;\n }\n\n return len;\n}\n","var createHash = require('create-hash')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (seed, len) {\n var t = Buffer.alloc(0)\n var i = 0\n var c\n while (t.length < len) {\n c = i2ops(i++)\n t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])\n }\n return t.slice(0, len)\n}\n\nfunction i2ops (c) {\n var out = Buffer.allocUnsafe(4)\n out.writeUInt32BE(c, 0)\n return out\n}\n","module.exports = function xor (a, b) {\n var len = a.length\n var i = -1\n while (++i < len) {\n a[i] ^= b[i]\n }\n return a\n}\n","var BN = require('bn.js')\nvar Buffer = require('safe-buffer').Buffer\n\nfunction withPublic (paddedMsg, key) {\n return Buffer.from(paddedMsg\n .toRed(BN.mont(key.modulus))\n .redPow(new BN(key.publicExponent))\n .fromRed()\n .toArray())\n}\n\nmodule.exports = withPublic\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n nullTag = '[object Null]',\n proxyTag = '[object Proxy]',\n undefinedTag = '[object Undefined]';\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isFunction;\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","import{_ as e}from\"./tslib.es6-357e9a40.js\";import t from\"react\";import\"./base-4b9fb6d0.js\";import{I as a,t as l}from\"./InputWrapper-749e8bc2.js\";import{c as o}from\"./classNames-3b02355b.js\";import{c as i}from\"./composeAriaDescribedBy-ded78d81.js\";const r=t.forwardRef(((r,s)=>{var{className:n=\"\",children:b,disabled:d=!1,defaultValue:c,errorText:u,helperText:p,hideLabel:m,invalid:x,id:T,label:f,onChange:h=(()=>null),required:L,style:y,successText:B,infoText:j,tooltipLabel:N,tooltipText:g,tooltipButtonLabel:C,type:v=\"text\",buttonIcon:q,buttonAriaLabel:E,onButtonClick:I}=r,k=e(r,[\"className\",\"children\",\"disabled\",\"defaultValue\",\"errorText\",\"helperText\",\"hideLabel\",\"invalid\",\"id\",\"label\",\"onChange\",\"required\",\"style\",\"successText\",\"infoText\",\"tooltipLabel\",\"tooltipText\",\"tooltipButtonLabel\",\"type\",\"buttonIcon\",\"buttonAriaLabel\",\"onButtonClick\"]);const A={className:n,errorText:u,helperText:p,hideLabel:m,id:T,invalid:x,label:f,required:L,style:y,successText:B,infoText:j,tooltipLabel:N,tooltipText:g,tooltipButtonLabel:C},V=i(T,p,u,B,j),O=Boolean(q&&I);return t.createElement(a,Object.assign({},A),t.createElement(\"input\",Object.assign({className:o(l.input,O&&l.hasButton),defaultValue:c,disabled:d,id:T,onChange:h,ref:s,required:L,type:v,\"aria-describedby\":V.length>0?V:null},k)),O&&t.createElement(\"div\",{className:l.buttonWrapper},t.createElement(\"button\",{className:l.button,disabled:d,type:\"button\",onClick:I,\"aria-label\":E},q)),b)}));export{r as T};\n","import { useState, useRef, useMemo, useEffect } from 'react';\nimport { debounce } from 'debounce';\n\nfunction useMeasure({\n debounce: debounce$1,\n scroll,\n polyfill\n} = {\n debounce: 0,\n scroll: false\n}) {\n const ResizeObserver = polyfill || (typeof window === 'undefined' ? class ResizeObserver {} : window.ResizeObserver);\n\n if (!ResizeObserver) {\n throw new Error('This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills');\n }\n\n const [bounds, set] = useState({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0\n }); // keep all state in a ref\n\n const state = useRef({\n element: null,\n scrollContainers: null,\n resizeObserver: null,\n lastBounds: bounds\n }); // set actual debounce values early, so effects know if they should react accordingly\n\n const scrollDebounce = debounce$1 ? typeof debounce$1 === 'number' ? debounce$1 : debounce$1.scroll : null;\n const resizeDebounce = debounce$1 ? typeof debounce$1 === 'number' ? debounce$1 : debounce$1.resize : null; // memoize handlers, so event-listeners know when they should update\n\n const [forceRefresh, resizeChange, scrollChange] = useMemo(() => {\n const callback = () => {\n if (!state.current.element) return;\n const {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n } = state.current.element.getBoundingClientRect();\n const size = {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n };\n Object.freeze(size);\n if (!areBoundsEqual(state.current.lastBounds, size)) set(state.current.lastBounds = size);\n };\n\n return [callback, resizeDebounce ? debounce(callback, resizeDebounce) : callback, scrollDebounce ? debounce(callback, scrollDebounce) : callback];\n }, [set, scrollDebounce, resizeDebounce]); // cleanup current scroll-listeners / observers\n\n function removeListeners() {\n if (state.current.scrollContainers) {\n state.current.scrollContainers.forEach(element => element.removeEventListener('scroll', scrollChange, true));\n state.current.scrollContainers = null;\n }\n\n if (state.current.resizeObserver) {\n state.current.resizeObserver.disconnect();\n state.current.resizeObserver = null;\n }\n } // add scroll-listeners / observers\n\n\n function addListeners() {\n if (!state.current.element) return;\n state.current.resizeObserver = new ResizeObserver(scrollChange);\n state.current.resizeObserver.observe(state.current.element);\n\n if (scroll && state.current.scrollContainers) {\n state.current.scrollContainers.forEach(scrollContainer => scrollContainer.addEventListener('scroll', scrollChange, {\n capture: true,\n passive: true\n }));\n }\n } // the ref we expose to the user\n\n\n const ref = node => {\n if (!node || node === state.current.element) return;\n removeListeners();\n state.current.element = node;\n state.current.scrollContainers = findScrollContainers(node);\n addListeners();\n }; // add general event listeners\n\n\n useOnWindowScroll(scrollChange, Boolean(scroll));\n useOnWindowResize(resizeChange); // respond to changes that are relevant for the listeners\n\n useEffect(() => {\n removeListeners();\n addListeners();\n }, [scroll, scrollChange, resizeChange]); // remove all listeners when the components unmounts\n\n useEffect(() => removeListeners, []);\n return [ref, bounds, forceRefresh];\n} // Adds native resize listener to window\n\n\nfunction useOnWindowResize(onWindowResize) {\n useEffect(() => {\n const cb = onWindowResize;\n window.addEventListener('resize', cb);\n return () => void window.removeEventListener('resize', cb);\n }, [onWindowResize]);\n}\n\nfunction useOnWindowScroll(onScroll, enabled) {\n useEffect(() => {\n if (enabled) {\n const cb = onScroll;\n window.addEventListener('scroll', cb, {\n capture: true,\n passive: true\n });\n return () => void window.removeEventListener('scroll', cb, true);\n }\n }, [onScroll, enabled]);\n} // Returns a list of scroll offsets\n\n\nfunction findScrollContainers(element) {\n const result = [];\n if (!element || element === document.body) return result;\n const {\n overflow,\n overflowX,\n overflowY\n } = window.getComputedStyle(element);\n if ([overflow, overflowX, overflowY].some(prop => prop === 'auto' || prop === 'scroll')) result.push(element);\n return [...result, ...findScrollContainers(element.parentElement)];\n} // Checks if element boundaries are equal\n\n\nconst keys = ['x', 'y', 'top', 'bottom', 'left', 'right', 'width', 'height'];\n\nconst areBoundsEqual = (a, b) => keys.every(key => a[key] === b[key]);\n\nif (typeof module !== 'undefined' && Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(module, 'exports').writable) {\n module.exports = useMeasure;\n}\n\nexport default useMeasure;\n","import React, { Component } from 'react';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport PropTypes from 'prop-types';\nimport warning from 'tiny-warning';\n\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};\n\nfunction getUniqueId() {\n var key = '__global_unique_id__';\n return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;\n}\n\nfunction objectIs(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction createEventEmitter(value) {\n var handlers = [];\n return {\n on: function on(handler) {\n handlers.push(handler);\n },\n off: function off(handler) {\n handlers = handlers.filter(function (h) {\n return h !== handler;\n });\n },\n get: function get() {\n return value;\n },\n set: function set(newValue, changedBits) {\n value = newValue;\n handlers.forEach(function (handler) {\n return handler(value, changedBits);\n });\n }\n };\n}\n\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\n\nfunction createReactContext(defaultValue, calculateChangedBits) {\n var _Provider$childContex, _Consumer$contextType;\n\n var contextProp = '__create-react-context-' + getUniqueId() + '__';\n\n var Provider = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Provider, _Component);\n\n function Provider() {\n var _this;\n\n _this = _Component.apply(this, arguments) || this;\n _this.emitter = createEventEmitter(_this.props.value);\n return _this;\n }\n\n var _proto = Provider.prototype;\n\n _proto.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[contextProp] = this.emitter, _ref;\n };\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.value !== nextProps.value) {\n var oldValue = this.props.value;\n var newValue = nextProps.value;\n var changedBits;\n\n if (objectIs(oldValue, newValue)) {\n changedBits = 0;\n } else {\n changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n\n if (process.env.NODE_ENV !== 'production') {\n warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: ' + changedBits);\n }\n\n changedBits |= 0;\n\n if (changedBits !== 0) {\n this.emitter.set(nextProps.value, changedBits);\n }\n }\n }\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return Provider;\n }(Component);\n\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);\n\n var Consumer = /*#__PURE__*/function (_Component2) {\n _inheritsLoose(Consumer, _Component2);\n\n function Consumer() {\n var _this2;\n\n _this2 = _Component2.apply(this, arguments) || this;\n _this2.state = {\n value: _this2.getValue()\n };\n\n _this2.onUpdate = function (newValue, changedBits) {\n var observedBits = _this2.observedBits | 0;\n\n if ((observedBits & changedBits) !== 0) {\n _this2.setState({\n value: _this2.getValue()\n });\n }\n };\n\n return _this2;\n }\n\n var _proto2 = Consumer.prototype;\n\n _proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var observedBits = nextProps.observedBits;\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;\n };\n\n _proto2.componentDidMount = function componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\n }\n\n var observedBits = this.props.observedBits;\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;\n };\n\n _proto2.componentWillUnmount = function componentWillUnmount() {\n if (this.context[contextProp]) {\n this.context[contextProp].off(this.onUpdate);\n }\n };\n\n _proto2.getValue = function getValue() {\n if (this.context[contextProp]) {\n return this.context[contextProp].get();\n } else {\n return defaultValue;\n }\n };\n\n _proto2.render = function render() {\n return onlyChild(this.props.children)(this.state.value);\n };\n\n return Consumer;\n }(Component);\n\n Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);\n return {\n Provider: Provider,\n Consumer: Consumer\n };\n}\n\nvar index = React.createContext || createReactContext;\n\nexport default index;\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","import{_ as i}from\"./tslib.es6-357e9a40.js\";import l,{isValidElement as n,Children as e}from\"react\";import\"./base-4b9fb6d0.js\";import{s as a}from\"./style-inject.es-acdf7ad9.js\";import{c as s}from\"./classNames-3b02355b.js\";import{I as o}from\"./IconLinkExternal-a09d13a0.js\";var _={link:\"Link-module_link__TeBQo link_hds-link__5Oxo-\",icon:\"Link-module_icon__3ReCc link_icon__i_HqN\",iconLeft:\"Link-module_iconLeft__3j0X3 link_hds-icon-left__1aufP\",verticalAlignMediumIcon:\"Link-module_verticalAlignMediumIcon__12PVa link_vertical-align-medium-icon__3IWi1\",verticalAlignBigIcon:\"Link-module_verticalAlignBigIcon__2L0Ln link_vertical-align-big-icon__3yWNL\",verticalAlignSmallIcon:\"Link-module_verticalAlignSmallIcon__2IwL7 link_vertical-align-small-icon__3lxhH\",disableVisitedStyles:\"Link-module_disableVisitedStyles__3wG_H link_hds-link--disable-visited-styles__2gk1d\",linkS:\"Link-module_linkS__3wxtt link_hds-link--small__2ldrg\",linkM:\"Link-module_linkM__30gsY link_hds-link--medium__xEU_F\",linkL:\"Link-module_linkL__1zczk link_hds-link--large__D3jO3\"};a(\".link_hds-icon__2pRV-{--icon-size:100%;background-color:currentcolor;display:inline-block;height:var(--icon-size);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:auto;mask-size:auto;width:var(--icon-size)}.link_hds-icon__2pRV-.link_hds-icon--size-xs__2RlDP{--icon-size:var(--spacing-layout-2-xs)}.link_hds-icon__2pRV-.link_hds-icon--size-s__2iqHu{--icon-size:var(--spacing-layout-xs)}.link_hds-icon__2pRV-.link_hds-icon--size-m__19mxF{--icon-size:var(--spacing-layout-s)}.link_hds-icon__2pRV-.link_hds-icon--size-l__2JXJt{--icon-size:var(--spacing-layout-m)}.link_hds-icon__2pRV-.link_hds-icon--size-xl__1oFrI{--icon-size:var(--spacing-layout-l)}.link_hds-icon--link-external__1R5f9{-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5 3v16h16v2H3V3h2zm16 0v9h-2V6.413L9.914 15.5 8.5 14.086 17.585 5H12V3h9z' fill='currentColor'/%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5 3v16h16v2H3V3h2zm16 0v9h-2V6.413L9.914 15.5 8.5 14.086 17.585 5H12V3h9z' fill='currentColor'/%3E%3C/svg%3E\\\")}.link_hds-link__5Oxo-{--link-visited-color:#551a8b;--link-color:var(--color-bus);border:3px solid transparent;box-sizing:border-box;color:var(--link-color);text-decoration:underline}.link_hds-link__5Oxo-:visited{color:var(--link-visited-color)}.link_hds-link__5Oxo-:visited svg g path{fill:var(--link-visited-color)}.link_hds-link__5Oxo-:focus{border:3px solid var(--color-focus-outline);outline:none}.link_hds-link__5Oxo-.link_focus-visible__36mmB,.link_hds-link__5Oxo-:focus-visible{outline:none}.link_hds-link__5Oxo- .link_vertical-align-medium-icon__3IWi1{vertical-align:sub}.link_hds-link__5Oxo- .link_vertical-align-big-icon__3yWNL{vertical-align:middle}.link_hds-link__5Oxo- .link_vertical-align-small-icon__3lxhH{vertical-align:text-top}.link_hds-link--disable-visited-styles__2gk1d:visited{color:var(--color-bus)}.link_hds-link--small__2ldrg{font-size:14px}.link_hds-link--medium__xEU_F{font-size:16px}.link_hds-link--large__D3jO3{display:block;font-size:18px;width:-moz-fit-content;width:fit-content}.link_hds-link--small__2ldrg .link_icon__i_HqN{margin-left:7px}.link_hds-link--medium__xEU_F .link_icon__i_HqN{margin-left:var(--spacing-2-xs);margin-top:-3px}.link_hds-link--large__D3jO3 .link_icon__i_HqN{margin-left:var(--spacing-s)}.link_hds-link--small__2ldrg .link_hds-icon-left__1aufP{margin-right:4px;vertical-align:text-top}.link_hds-link--medium__xEU_F .link_hds-icon-left__1aufP{margin-right:8px;vertical-align:sub}.link_hds-link--large__D3jO3 .link_hds-icon-left__1aufP{margin-right:16px;vertical-align:middle}\");const t=i=>n(i)&&Boolean(i.props.children),r=i=>null==i||\"boolean\"==typeof i||\"{}\"===JSON.stringify(i)?\"\":i.toString(),c=i=>i instanceof Array||n(i)?e.toArray(i).reduce(((i,l)=>{let e=\"\";return e=n(l)&&t(l)?c(l.props.children):n(l)&&!t(l)?\"\":r(l),i.concat(e)}),\"\"):r(i),d=l.forwardRef(((n,e)=>{var{ariaLabel:a,children:t,className:r,disableVisitedStyles:d=!1,external:k=!1,href:m,iconLeft:g,openInNewTab:h=!1,openInExternalDomainAriaLabel:v,openInNewTabAriaLabel:u,style:p={},size:x=\"M\"}=n,f=i(n,[\"ariaLabel\",\"children\",\"className\",\"disableVisitedStyles\",\"external\",\"href\",\"iconLeft\",\"openInNewTab\",\"openInExternalDomainAriaLabel\",\"openInNewTabAriaLabel\",\"style\",\"size\"]);const b={L:_.verticalAlignBigIcon,M:_.verticalAlignMediumIcon,S:_.verticalAlignSmallIcon};return l.createElement(\"a\",Object.assign({\"aria-label\":a,className:s(_.link,_[`link${x}`],d?_.disableVisitedStyles:\"\",r),href:m,style:p},h&&{target:\"_blank\",rel:\"noopener\"},(h||k||a)&&{\"aria-label\":(()=>{let i=a||c(t);const l=h?u||\"Avautuu uudessa välilehdessä.\":\"\",n=k?v||\"Siirtyy toiseen sivustoon.\":\"\";return i&&\".\"!==i.slice(-1)&&(i=`${i}.`),[i,l,n].filter((i=>i)).join(\" \")})()},{ref:e},f),g&&l.createElement(\"span\",{className:_.iconLeft,\"aria-hidden\":\"true\"},g),t,k&&l.createElement(o,{size:{L:\"l\",M:\"s\",S:\"xs\"}[x],className:s(_.icon,b[x]),\"aria-hidden\":!0}))}));export{d as L};\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import e from\"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";import t from\"@babel/runtime/helpers/esm/extends\";import n from\"@babel/runtime/helpers/esm/assertThisInitialized\";import o from\"@babel/runtime/helpers/esm/inheritsLoose\";import{c as r}from\"./_commonjsHelpers-ad2a3cad.js\";import i,{useRef as u,useEffect as s,useMemo as c,useCallback as a,cloneElement as l,Component as d,useReducer as p}from\"react\";import f from\"lodash.isequal\";import{c as m}from\"./classNames-3b02355b.js\";import{I as h}from\"./IconCheck-0262f30f.js\";\n/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var g=\"function\"==typeof Symbol&&Symbol.for,v=g?Symbol.for(\"react.element\"):60103,y=g?Symbol.for(\"react.portal\"):60106,I=g?Symbol.for(\"react.fragment\"):60107,_=g?Symbol.for(\"react.strict_mode\"):60108,b=g?Symbol.for(\"react.profiler\"):60114,E=g?Symbol.for(\"react.provider\"):60109,w=g?Symbol.for(\"react.context\"):60110,x=g?Symbol.for(\"react.async_mode\"):60111,O=g?Symbol.for(\"react.concurrent_mode\"):60111,S=g?Symbol.for(\"react.forward_ref\"):60112,N=g?Symbol.for(\"react.suspense\"):60113,D=g?Symbol.for(\"react.suspense_list\"):60120,k=g?Symbol.for(\"react.memo\"):60115,V=g?Symbol.for(\"react.lazy\"):60116,C=g?Symbol.for(\"react.block\"):60121,M=g?Symbol.for(\"react.fundamental\"):60117,P=g?Symbol.for(\"react.responder\"):60118,T=g?Symbol.for(\"react.scope\"):60119;function R(e){if(\"object\"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case v:switch(e=e.type){case x:case O:case I:case b:case _:case N:return e;default:switch(e=e&&e.$$typeof){case w:case S:case V:case k:case E:return e;default:return t}}case y:return t}}}function K(e){return R(e)===O}var A={AsyncMode:x,ConcurrentMode:O,ContextConsumer:w,ContextProvider:E,Element:v,ForwardRef:S,Fragment:I,Lazy:V,Memo:k,Portal:y,Profiler:b,StrictMode:_,Suspense:N,isAsyncMode:function(e){return K(e)||R(e)===x},isConcurrentMode:K,isContextConsumer:function(e){return R(e)===w},isContextProvider:function(e){return R(e)===E},isElement:function(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===v},isForwardRef:function(e){return R(e)===S},isFragment:function(e){return R(e)===I},isLazy:function(e){return R(e)===V},isMemo:function(e){return R(e)===k},isPortal:function(e){return R(e)===y},isProfiler:function(e){return R(e)===b},isStrictMode:function(e){return R(e)===_},isSuspense:function(e){return R(e)===N},isValidElementType:function(e){return\"string\"==typeof e||\"function\"==typeof e||e===I||e===O||e===b||e===_||e===N||e===D||\"object\"==typeof e&&null!==e&&(e.$$typeof===V||e.$$typeof===k||e.$$typeof===E||e.$$typeof===w||e.$$typeof===S||e.$$typeof===M||e.$$typeof===P||e.$$typeof===T||e.$$typeof===C)},typeOf:R},H=r((function(e,t){\"production\"!==process.env.NODE_ENV&&function(){var e=\"function\"==typeof Symbol&&Symbol.for,n=e?Symbol.for(\"react.element\"):60103,o=e?Symbol.for(\"react.portal\"):60106,r=e?Symbol.for(\"react.fragment\"):60107,i=e?Symbol.for(\"react.strict_mode\"):60108,u=e?Symbol.for(\"react.profiler\"):60114,s=e?Symbol.for(\"react.provider\"):60109,c=e?Symbol.for(\"react.context\"):60110,a=e?Symbol.for(\"react.async_mode\"):60111,l=e?Symbol.for(\"react.concurrent_mode\"):60111,d=e?Symbol.for(\"react.forward_ref\"):60112,p=e?Symbol.for(\"react.suspense\"):60113,f=e?Symbol.for(\"react.suspense_list\"):60120,m=e?Symbol.for(\"react.memo\"):60115,h=e?Symbol.for(\"react.lazy\"):60116,g=e?Symbol.for(\"react.block\"):60121,v=e?Symbol.for(\"react.fundamental\"):60117,y=e?Symbol.for(\"react.responder\"):60118,I=e?Symbol.for(\"react.scope\"):60119;function _(e){if(\"object\"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var f=e.type;switch(f){case a:case l:case r:case u:case i:case p:return f;default:var g=f&&f.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case o:return t}}}var b=a,E=l,w=c,x=s,O=n,S=d,N=r,D=h,k=m,V=o,C=u,M=i,P=p,T=!1;function R(e){return _(e)===l}t.AsyncMode=b,t.ConcurrentMode=E,t.ContextConsumer=w,t.ContextProvider=x,t.Element=O,t.ForwardRef=S,t.Fragment=N,t.Lazy=D,t.Memo=k,t.Portal=V,t.Profiler=C,t.StrictMode=M,t.Suspense=P,t.isAsyncMode=function(e){return T||(T=!0,console.warn(\"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\")),R(e)||_(e)===a},t.isConcurrentMode=R,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===s},t.isElement=function(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===r},t.isLazy=function(e){return _(e)===h},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===u},t.isStrictMode=function(e){return _(e)===i},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return\"string\"==typeof e||\"function\"==typeof e||e===r||e===l||e===u||e===i||e===p||e===f||\"object\"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===y||e.$$typeof===I||e.$$typeof===g)},t.typeOf=_}()})),$=r((function(e){\"production\"===process.env.NODE_ENV?e.exports=A:e.exports=H})),F=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var B=function(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",\"5\"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t[\"_\"+String.fromCharCode(n)]=n;var o=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if(\"0123456789\"!==o.join(\"\"))return!1;var r={};return\"abcdefghijklmnopqrst\".split(\"\").forEach((function(e){r[e]=e})),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},r)).join(\"\")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,r=function(e){if(null==e)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}(e),i=1;i>\",i={array:a(\"array\"),bigint:a(\"bigint\"),bool:a(\"boolean\"),func:a(\"function\"),number:a(\"number\"),object:a(\"object\"),string:a(\"string\"),symbol:a(\"symbol\"),any:c(Z),arrayOf:function(e){return c((function(t,n,o,r,i){if(\"function\"!=typeof e)return new s(\"Property `\"+i+\"` of component `\"+o+\"` has invalid PropType notation inside arrayOf.\");var u=t[n];if(!Array.isArray(u))return new s(\"Invalid \"+r+\" `\"+i+\"` of type `\"+p(u)+\"` supplied to `\"+o+\"`, expected an array.\");for(var c=0;c1?\"Invalid arguments supplied to oneOf, expected an array, got \"+arguments.length+\" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).\":\"Invalid argument supplied to oneOf, expected an array.\"),Z;return c((function(t,n,o,r,i){for(var c=t[n],a=0;a0?\", expected one of type [\"+u.join(\", \")+\"]\":\"\")+\".\")}))},shape:function(e){return c((function(t,n,o,r,i){var u=t[n],c=p(u);if(\"object\"!==c)return new s(\"Invalid \"+r+\" `\"+i+\"` of type `\"+c+\"` supplied to `\"+o+\"`, expected `object`.\");for(var a in e){var d=e[a];if(\"function\"!=typeof d)return l(o,r,i,a,f(d));var m=d(u,a,o,r,i+\".\"+a,U);if(m)return m}return null}))},exact:function(e){return c((function(t,n,o,r,i){var u=t[n],c=p(u);if(\"object\"!==c)return new s(\"Invalid \"+r+\" `\"+i+\"` of type `\"+c+\"` supplied to `\"+o+\"`, expected `object`.\");var a=B({},t[n],e);for(var d in a){var m=e[d];if(W(e,d)&&\"function\"!=typeof m)return l(o,r,i,d,f(m));if(!m)return new s(\"Invalid \"+r+\" `\"+i+\"` key `\"+d+\"` supplied to `\"+o+\"`.\\nBad object: \"+JSON.stringify(t[n],null,\" \")+\"\\nValid keys: \"+JSON.stringify(Object.keys(e),null,\" \"));var h=m(u,d,o,r,i+\".\"+d,U);if(h)return h}return null}))}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&\"object\"==typeof t?t:{},this.stack=\"\"}function c(e){if(\"production\"!==process.env.NODE_ENV)var n={},o=0;function i(i,u,c,a,l,d,p){if(a=a||r,d=d||c,p!==U){if(t){var f=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types\");throw f.name=\"Invariant Violation\",f}if(\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof console){var m=a+\":\"+c;!n[m]&&o<3&&(Q(\"You are manually calling a React.PropTypes validation function for the `\"+d+\"` prop on `\"+a+\"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.\"),n[m]=!0,o++)}}return null==u[c]?i?null===u[c]?new s(\"The \"+l+\" `\"+d+\"` is marked as required in `\"+a+\"`, but its value is `null`.\"):new s(\"The \"+l+\" `\"+d+\"` is marked as required in `\"+a+\"`, but its value is `undefined`.\"):null:e(u,c,a,l,d)}var u=i.bind(null,!1);return u.isRequired=i.bind(null,!0),u}function a(e){return c((function(t,n,o,r,i,u){var c=t[n];return p(c)!==e?new s(\"Invalid \"+r+\" `\"+i+\"` of type `\"+f(c)+\"` supplied to `\"+o+\"`, expected `\"+e+\"`.\",{expectedType:e}):null}))}function l(e,t,n,o,r){return new s((e||\"React class\")+\": \"+t+\" type `\"+n+\".\"+o+\"` is invalid; it must be a function, usually from the `prop-types` package, but received `\"+r+\"`.\")}function d(t){switch(typeof t){case\"number\":case\"string\":case\"undefined\":return!0;case\"boolean\":return!t;case\"object\":if(Array.isArray(t))return t.every(d);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e[o]);if(\"function\"==typeof t)return t}(t);if(!r)return!1;var i,u=r.call(t);if(r!==t.entries){for(;!(i=u.next()).done;)if(!d(i.value))return!1}else for(;!(i=u.next()).done;){var s=i.value;if(s&&!d(s[1]))return!1}return!0;default:return!1}}function p(e){var t=typeof e;return Array.isArray(e)?\"array\":e instanceof RegExp?\"object\":function(e,t){return\"symbol\"===e||!!t&&(\"Symbol\"===t[\"@@toStringTag\"]||\"function\"==typeof Symbol&&t instanceof Symbol)}(t,e)?\"symbol\":t}function f(e){if(null==e)return\"\"+e;var t=p(e);if(\"object\"===t){if(e instanceof Date)return\"date\";if(e instanceof RegExp)return\"regexp\"}return t}function m(e){var t=f(e);switch(t){case\"array\":case\"object\":return\"an \"+t;case\"boolean\":case\"date\":case\"regexp\":return\"a \"+t;default:return t}}return s.prototype=Error.prototype,i.checkPropTypes=G,i.resetWarningCache=G.resetWarningCache,i.PropTypes=i,i};function te(){}function ne(){}ne.resetWarningCache=te;var oe=r((function(e){if(\"production\"!==process.env.NODE_ENV){var t=$;e.exports=ee(t.isElement,!0)}else e.exports=function(){function e(e,t,n,o,r,i){if(i!==U){var u=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw u.name=\"Invariant Violation\",u}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ne,resetWarningCache:te};return n.PropTypes=n,n}()})),re=\"function\"==typeof Symbol&&Symbol.for,ie=re?Symbol.for(\"react.element\"):60103,ue=re?Symbol.for(\"react.portal\"):60106,se=re?Symbol.for(\"react.fragment\"):60107,ce=re?Symbol.for(\"react.strict_mode\"):60108,ae=re?Symbol.for(\"react.profiler\"):60114,le=re?Symbol.for(\"react.provider\"):60109,de=re?Symbol.for(\"react.context\"):60110,pe=re?Symbol.for(\"react.async_mode\"):60111,fe=re?Symbol.for(\"react.concurrent_mode\"):60111,me=re?Symbol.for(\"react.forward_ref\"):60112,he=re?Symbol.for(\"react.suspense\"):60113,ge=re?Symbol.for(\"react.suspense_list\"):60120,ve=re?Symbol.for(\"react.memo\"):60115,ye=re?Symbol.for(\"react.lazy\"):60116,Ie=re?Symbol.for(\"react.block\"):60121,_e=re?Symbol.for(\"react.fundamental\"):60117,be=re?Symbol.for(\"react.responder\"):60118,Ee=re?Symbol.for(\"react.scope\"):60119;function we(e){if(\"object\"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ie:switch(e=e.type){case pe:case fe:case se:case ae:case ce:case he:return e;default:switch(e=e&&e.$$typeof){case de:case me:case ye:case ve:case le:return e;default:return t}}case ue:return t}}}function xe(e){return we(e)===fe}var Oe={AsyncMode:pe,ConcurrentMode:fe,ContextConsumer:de,ContextProvider:le,Element:ie,ForwardRef:me,Fragment:se,Lazy:ye,Memo:ve,Portal:ue,Profiler:ae,StrictMode:ce,Suspense:he,isAsyncMode:function(e){return xe(e)||we(e)===pe},isConcurrentMode:xe,isContextConsumer:function(e){return we(e)===de},isContextProvider:function(e){return we(e)===le},isElement:function(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===ie},isForwardRef:function(e){return we(e)===me},isFragment:function(e){return we(e)===se},isLazy:function(e){return we(e)===ye},isMemo:function(e){return we(e)===ve},isPortal:function(e){return we(e)===ue},isProfiler:function(e){return we(e)===ae},isStrictMode:function(e){return we(e)===ce},isSuspense:function(e){return we(e)===he},isValidElementType:function(e){return\"string\"==typeof e||\"function\"==typeof e||e===se||e===fe||e===ae||e===ce||e===he||e===ge||\"object\"==typeof e&&null!==e&&(e.$$typeof===ye||e.$$typeof===ve||e.$$typeof===le||e.$$typeof===de||e.$$typeof===me||e.$$typeof===_e||e.$$typeof===be||e.$$typeof===Ee||e.$$typeof===Ie)},typeOf:we},Se=r((function(e,t){\"production\"!==process.env.NODE_ENV&&function(){var e=\"function\"==typeof Symbol&&Symbol.for,n=e?Symbol.for(\"react.element\"):60103,o=e?Symbol.for(\"react.portal\"):60106,r=e?Symbol.for(\"react.fragment\"):60107,i=e?Symbol.for(\"react.strict_mode\"):60108,u=e?Symbol.for(\"react.profiler\"):60114,s=e?Symbol.for(\"react.provider\"):60109,c=e?Symbol.for(\"react.context\"):60110,a=e?Symbol.for(\"react.async_mode\"):60111,l=e?Symbol.for(\"react.concurrent_mode\"):60111,d=e?Symbol.for(\"react.forward_ref\"):60112,p=e?Symbol.for(\"react.suspense\"):60113,f=e?Symbol.for(\"react.suspense_list\"):60120,m=e?Symbol.for(\"react.memo\"):60115,h=e?Symbol.for(\"react.lazy\"):60116,g=e?Symbol.for(\"react.block\"):60121,v=e?Symbol.for(\"react.fundamental\"):60117,y=e?Symbol.for(\"react.responder\"):60118,I=e?Symbol.for(\"react.scope\"):60119;function _(e){if(\"object\"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var f=e.type;switch(f){case a:case l:case r:case u:case i:case p:return f;default:var g=f&&f.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case o:return t}}}var b=a,E=l,w=c,x=s,O=n,S=d,N=r,D=h,k=m,V=o,C=u,M=i,P=p,T=!1;function R(e){return _(e)===l}t.AsyncMode=b,t.ConcurrentMode=E,t.ContextConsumer=w,t.ContextProvider=x,t.Element=O,t.ForwardRef=S,t.Fragment=N,t.Lazy=D,t.Memo=k,t.Portal=V,t.Profiler=C,t.StrictMode=M,t.Suspense=P,t.isAsyncMode=function(e){return T||(T=!0,console.warn(\"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\")),R(e)||_(e)===a},t.isConcurrentMode=R,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===s},t.isElement=function(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===r},t.isLazy=function(e){return _(e)===h},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===u},t.isStrictMode=function(e){return _(e)===i},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return\"string\"==typeof e||\"function\"==typeof e||e===r||e===l||e===u||e===i||e===p||e===f||\"object\"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===y||e.$$typeof===I||e.$$typeof===g)},t.typeOf=_}()})),Ne=r((function(e){\"production\"===process.env.NODE_ENV?e.exports=Oe:e.exports=Se}));function De(e){return\"object\"==typeof e&&null!=e&&1===e.nodeType}function ke(e,t){return(!t||\"hidden\"!==e)&&\"visible\"!==e&&\"clip\"!==e}function Ve(e,t){if(e.clientHeightt||i>e&&u=t&&s>=n?i-e-o:u>t&&sn?u-t+r:0}var Me=0;function Pe(e){return\"function\"==typeof e?e:Te}function Te(){}function Re(e,t){if(e){var n=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,u=t.boundary,s=t.skipOverflowHiddenElements,c=\"function\"==typeof u?u:function(e){return e!==u};if(!De(e))throw new TypeError(\"Invalid target\");for(var a,l,d=document.scrollingElement||document.documentElement,p=[],f=e;De(f)&&c(f);){if((f=null==(l=(a=f).parentElement)?a.getRootNode().host||null:l)===d){p.push(f);break}null!=f&&f===document.body&&Ve(f)&&!Ve(document.documentElement)||null!=f&&Ve(f,s)&&p.push(f)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),I=y.height,_=y.width,b=y.top,E=y.right,w=y.bottom,x=y.left,O=\"start\"===r||\"nearest\"===r?b:\"end\"===r?w:b+I/2,S=\"center\"===i?x+_/2:\"end\"===i?E:x,N=[],D=0;D=0&&x>=0&&w<=h&&E<=m&&b>=P&&w<=R&&x>=K&&E<=T)return N;var A=getComputedStyle(k),H=parseInt(A.borderLeftWidth,10),$=parseInt(A.borderTopWidth,10),F=parseInt(A.borderRightWidth,10),j=parseInt(A.borderBottomWidth,10),L=0,B=0,U=\"offsetWidth\"in k?k.offsetWidth-k.clientWidth-H-F:0,W=\"offsetHeight\"in k?k.offsetHeight-k.clientHeight-$-j:0,z=\"offsetWidth\"in k?0===k.offsetWidth?0:M/k.offsetWidth:0,Y=\"offsetHeight\"in k?0===k.offsetHeight?0:C/k.offsetHeight:0;if(d===k)L=\"start\"===r?O:\"end\"===r?O-h:\"nearest\"===r?Ce(v,v+h,h,$,j,v+O,v+O+I,I):O-h/2,B=\"start\"===i?S:\"center\"===i?S-m/2:\"end\"===i?S-m:Ce(g,g+m,m,H,F,g+S,g+S+_,_),L=Math.max(0,L+v),B=Math.max(0,B+g);else{L=\"start\"===r?O-P-$:\"end\"===r?O-R+j+W:\"nearest\"===r?Ce(P,R,C,$,j+W,O,O+I,I):O-(P+C/2)+W/2,B=\"start\"===i?S-K-H:\"center\"===i?S-(K+M/2)+U/2:\"end\"===i?S-T+F+U:Ce(K,T,M,H,F+U,S,S+_,_);var q=k.scrollLeft,J=k.scrollTop;O+=J-(L=Math.max(0,Math.min(J+L/Y,k.scrollHeight-C/Y+W))),S+=q-(B=Math.max(0,Math.min(q+B/z,k.scrollWidth-M/z+U)))}N.push({el:k,top:L,left:B})}return N}(e,{boundary:t,block:\"nearest\",scrollMode:\"if-needed\"});n.forEach((function(e){var t=e.el,n=e.top,o=e.left;t.scrollTop=n,t.scrollLeft=o}))}}function Ke(e,t){return e===t||e.contains&&e.contains(t)}function Ae(e,t){var n;function o(){n&&clearTimeout(n)}function r(){for(var r=arguments.length,i=new Array(r),u=0;u1?n-1:0),r=1;r=37&&n<=40&&0!==t.indexOf(\"Arrow\")?\"Arrow\"+t:t}function Xe(e,t,n,o,r){if(void 0===r&&(r=!0),0===n)return-1;var i=n-1;(\"number\"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var u=t+e;u<0?u=r?i:0:u>i&&(u=r?0:i);var s=Ge(e,u,n,o,r);return-1===s?t>=n?-1:t:s}function Ge(e,t,n,o,r){var i=o(t);if(!i||!i.hasAttribute(\"disabled\"))return t;if(e>0){for(var u=t+1;u=0;s--)if(!o(s).hasAttribute(\"disabled\"))return s;return r?e>0?Ge(1,0,n,o,!1):Ge(-1,n-1,n,o,!1):-1}function Qe(e,t,n,o){return void 0===o&&(o=!0),t.some((function(t){return t&&(Ke(t,e)||o&&Ke(t,n.activeElement))}))}function Ze(e,t,n){if(\"production\"!==process.env.NODE_ENV){var o=\"This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props\";Object.keys(e).forEach((function(e){void 0!==t[e]&&void 0===n[e]?console.error('downshift: A component has changed the controlled prop \"'+e+'\" to be uncontrolled. '+o):void 0===t[e]&&void 0!==n[e]&&console.error('downshift: A component has changed the uncontrolled prop \"'+e+'\" to be controlled. '+o)}))}}var et=Ae((function(){nt().textContent=\"\"}),500);function tt(e,t){var n=nt(t);e&&(n.textContent=e,et())}function nt(e){void 0===e&&(e=document);var t=e.getElementById(\"a11y-status-message\");return t||((t=e.createElement(\"div\")).setAttribute(\"id\",\"a11y-status-message\"),t.setAttribute(\"role\",\"status\"),t.setAttribute(\"aria-live\",\"polite\"),t.setAttribute(\"aria-relevant\",\"additions text\"),Object.assign(t.style,{border:\"0\",clip:\"rect(0 0 0 0)\",height:\"1px\",margin:\"-1px\",overflow:\"hidden\",padding:\"0\",position:\"absolute\",width:\"1px\"}),e.body.appendChild(t),t)}var ot=\"production\"!==process.env.NODE_ENV?\"__autocomplete_unknown__\":0,rt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_mouseup__\":1,it=\"production\"!==process.env.NODE_ENV?\"__autocomplete_item_mouseenter__\":2,ut=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_arrow_up__\":3,st=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_arrow_down__\":4,ct=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_escape__\":5,at=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_enter__\":6,lt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_home__\":7,dt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_end__\":8,pt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_click_item__\":9,ft=\"production\"!==process.env.NODE_ENV?\"__autocomplete_blur_input__\":10,mt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_change_input__\":11,ht=\"production\"!==process.env.NODE_ENV?\"__autocomplete_keydown_space_button__\":12,gt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_click_button__\":13,vt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_blur_button__\":14,yt=\"production\"!==process.env.NODE_ENV?\"__autocomplete_controlled_prop_updated_selected_item__\":15,It=\"production\"!==process.env.NODE_ENV?\"__autocomplete_touchend__\":16,_t=Object.freeze({__proto__:null,unknown:ot,mouseUp:rt,itemMouseEnter:it,keyDownArrowUp:ut,keyDownArrowDown:st,keyDownEscape:ct,keyDownEnter:at,keyDownHome:lt,keyDownEnd:dt,clickItem:pt,blurInput:ft,changeInput:mt,keyDownSpaceButton:ht,clickButton:gt,blurButton:vt,controlledPropUpdatedSelectedItem:yt,touchEnd:It}),bt=function(){var r=function(r){function i(o){var i=r.call(this,o)||this;i.id=i.props.id||\"downshift-\"+Fe(),i.menuId=i.props.menuId||i.id+\"-menu\",i.labelId=i.props.labelId||i.id+\"-label\",i.inputId=i.props.inputId||i.id+\"-input\",i.getItemId=i.props.getItemId||function(e){return i.id+\"-item-\"+e},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(e,t){var n=setTimeout((function(){i.timeoutIds=i.timeoutIds.filter((function(e){return e!==n})),e()}),t);i.timeoutIds.push(n)},i.setItemCount=function(e){i.itemCount=e},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(e,n){void 0===e&&(e=i.props.defaultHighlightedIndex),void 0===n&&(n={}),n=ze(n),i.internalSetState(t({highlightedIndex:e},n))},i.clearSelection=function(e){i.internalSetState({selectedItem:null,inputValue:\"\",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},e)},i.selectItem=function(e,n,o){n=ze(n),i.internalSetState(t({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:e,inputValue:i.props.itemToString(e)},n),o)},i.selectItemAtIndex=function(e,t,n){var o=i.items[e];null!=o&&i.selectItem(o,t,n)},i.selectHighlightedItem=function(e,t){return i.selectItemAtIndex(i.getState().highlightedIndex,e,t)},i.internalSetState=function(e,n){var o,r,u={},s=\"function\"==typeof e;return!s&&e.hasOwnProperty(\"inputValue\")&&i.props.onInputValueChange(e.inputValue,t({},i.getStateAndHelpers(),e)),i.setState((function(n){n=i.getState(n);var c=s?e(n):e;c=i.props.stateReducer(n,c),o=c.hasOwnProperty(\"selectedItem\");var a={},l={};return o&&c.selectedItem!==n.selectedItem&&(r=c.selectedItem),c.type=c.type||ot,Object.keys(c).forEach((function(e){n[e]!==c[e]&&(u[e]=c[e]),\"type\"!==e&&(l[e]=c[e],qe(i.props,e)||(a[e]=c[e]))})),s&&c.hasOwnProperty(\"inputValue\")&&i.props.onInputValueChange(c.inputValue,t({},i.getStateAndHelpers(),c)),a}),(function(){Pe(n)(),Object.keys(u).length>1&&i.props.onStateChange(u,i.getStateAndHelpers()),o&&i.props.onSelect(e.selectedItem,i.getStateAndHelpers()),void 0!==r&&i.props.onChange(r,i.getStateAndHelpers()),i.props.onUserAction(u,i.getStateAndHelpers())}))},i.rootRef=function(e){return i._rootNode=e},i.getRootProps=function(n,o){var r,u=void 0===n?{}:n,s=u.refKey,c=void 0===s?\"ref\":s,a=u.ref,l=e(u,[\"refKey\",\"ref\"]),d=(void 0===o?{}:o).suppressRefError,p=void 0!==d&&d;i.getRootProps.called=!0,i.getRootProps.refKey=c,i.getRootProps.suppressRefError=p;var f=i.getState().isOpen;return t(((r={})[c]=$e(a,i.rootRef),r.role=\"combobox\",r[\"aria-expanded\"]=f,r[\"aria-haspopup\"]=\"listbox\",r[\"aria-owns\"]=f?i.menuId:null,r[\"aria-labelledby\"]=i.labelId,r),l)},i.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:st})}else this.internalSetState({isOpen:!0,type:st},(function(){var e=t.getItemCount();if(e>0){var n=Xe(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:st})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:ut})}else this.internalSetState({isOpen:!0,type:ut},(function(){var e=t.getItemCount();if(e>0){var n=Xe(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:ut})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,o=t.highlightedIndex;if(n&&null!=o){e.preventDefault();var r=this.items[o],i=this.getItemNodeFromIndex(o);if(null==r||i&&i.hasAttribute(\"disabled\"))return;this.selectHighlightedItem({type:at})}}},Escape:function(e){e.preventDefault(),this.reset(t({type:ct},!this.state.isOpen&&{selectedItem:null,inputValue:\"\"}))}},i.buttonKeyDownHandlers=t({},i.keyDownHandlers,{\" \":function(e){e.preventDefault(),this.toggleMenu({type:ht})}}),i.inputKeyDownHandlers=t({},i.keyDownHandlers,{Home:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),o=this.getState().isOpen;if(!(n<=0)&&o){var r=Ge(1,0,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(r,{type:lt})}},End:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),o=this.getState().isOpen;if(!(n<=0)&&o){var r=Ge(-1,n-1,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(r,{type:dt})}}}),i.getToggleButtonProps=function(n){var o=void 0===n?{}:n,r=o.onClick;o.onPress;var u=o.onKeyDown,s=o.onKeyUp,c=o.onBlur,a=e(o,[\"onClick\",\"onPress\",\"onKeyDown\",\"onKeyUp\",\"onBlur\"]),l=i.getState().isOpen,d={onClick:He(r,i.buttonHandleClick),onKeyDown:He(u,i.buttonHandleKeyDown),onKeyUp:He(s,i.buttonHandleKeyUp),onBlur:He(c,i.buttonHandleBlur)},p=a.disabled?{}:d;return t({type:\"button\",role:\"button\",\"aria-label\":l?\"close menu\":\"open menu\",\"aria-haspopup\":!0,\"data-toggle\":!0},p,a)},i.buttonHandleKeyUp=function(e){e.preventDefault()},i.buttonHandleKeyDown=function(e){var t=Je(e);i.buttonKeyDownHandlers[t]&&i.buttonKeyDownHandlers[t].call(n(i),e)},i.buttonHandleClick=function(e){e.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&e.target.focus(),\"test\"===process.env.NODE_ENV?i.toggleMenu({type:gt}):i.internalSetTimeout((function(){return i.toggleMenu({type:gt})}))},i.buttonHandleBlur=function(e){var t=e.target;i.internalSetTimeout((function(){i.isMouseDown||null!=i.props.environment.document.activeElement&&i.props.environment.document.activeElement.id===i.inputId||i.props.environment.document.activeElement===t||i.reset({type:vt})}))},i.getLabelProps=function(e){return t({htmlFor:i.inputId,id:i.labelId},e)},i.getInputProps=function(n){var o=void 0===n?{}:n,r=o.onKeyDown,u=o.onBlur,s=o.onChange,c=o.onInput;o.onChangeText;var a=e(o,[\"onKeyDown\",\"onBlur\",\"onChange\",\"onInput\",\"onChangeText\"]),l={};var d,p=i.getState(),f=p.inputValue,m=p.isOpen,h=p.highlightedIndex;a.disabled||((d={}).onChange=He(s,c,i.inputHandleChange),d.onKeyDown=He(r,i.inputHandleKeyDown),d.onBlur=He(u,i.inputHandleBlur),l=d);return t({\"aria-autocomplete\":\"list\",\"aria-activedescendant\":m&&\"number\"==typeof h&&h>=0?i.getItemId(h):null,\"aria-controls\":m?i.menuId:null,\"aria-labelledby\":i.labelId,autoComplete:\"off\",value:f,id:i.inputId},l,a)},i.inputHandleKeyDown=function(e){var t=Je(e);t&&i.inputKeyDownHandlers[t]&&i.inputKeyDownHandlers[t].call(n(i),e)},i.inputHandleChange=function(e){i.internalSetState({type:mt,isOpen:!0,inputValue:e.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout((function(){var e=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);i.isMouseDown||e||i.reset({type:ft})}))},i.menuRef=function(e){i._menuNode=e},i.getMenuProps=function(n,o){var r,u=void 0===n?{}:n,s=u.refKey,c=void 0===s?\"ref\":s,a=u.ref,l=e(u,[\"refKey\",\"ref\"]),d=(void 0===o?{}:o).suppressRefError,p=void 0!==d&&d;return i.getMenuProps.called=!0,i.getMenuProps.refKey=c,i.getMenuProps.suppressRefError=p,t(((r={})[c]=$e(a,i.menuRef),r.role=\"listbox\",r[\"aria-labelledby\"]=l&&l[\"aria-label\"]?null:i.labelId,r.id=i.menuId,r),l)},i.getItemProps=function(n){var o,r=void 0===n?{}:n,u=r.onMouseMove,s=r.onMouseDown,c=r.onClick;r.onPress;var a,l,d=r.index,p=r.item,f=void 0===p?\"production\"===process.env.NODE_ENV?void 0:(a=\"getItemProps\",l=\"item\",void console.error('The property \"'+l+'\" is required in \"'+a+'\"')):p,m=e(r,[\"onMouseMove\",\"onMouseDown\",\"onClick\",\"onPress\",\"index\",\"item\"]);void 0===d?(i.items.push(f),d=i.items.indexOf(f)):i.items[d]=f;var h=c,g=((o={onMouseMove:He(u,(function(){d!==i.getState().highlightedIndex&&(i.setHighlightedIndex(d,{type:it}),i.avoidScrolling=!0,i.internalSetTimeout((function(){return i.avoidScrolling=!1}),250))})),onMouseDown:He(s,(function(e){e.preventDefault()}))}).onClick=He(h,(function(){i.selectItemAtIndex(d,{type:pt})})),o),v=m.disabled?{onMouseDown:g.onMouseDown}:g;return t({id:i.getItemId(d),role:\"option\",\"aria-selected\":i.getState().highlightedIndex===d},v,m)},i.clearItems=function(){i.items=[]},i.reset=function(e,n){void 0===e&&(e={}),e=ze(e),i.internalSetState((function(n){var o=n.selectedItem;return t({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(o)},e)}),n)},i.toggleMenu=function(e,n){void 0===e&&(e={}),e=ze(e),i.internalSetState((function(n){var o=n.isOpen;return t({isOpen:!o},o&&{highlightedIndex:i.props.defaultHighlightedIndex},e)}),(function(){var t=i.getState(),o=t.isOpen,r=t.highlightedIndex;o&&i.getItemCount()>0&&\"number\"==typeof r&&i.setHighlightedIndex(r,e),Pe(n)()}))},i.openMenu=function(e){i.internalSetState({isOpen:!0},e)},i.closeMenu=function(e){i.internalSetState({isOpen:!1},e)},i.updateStatus=Ae((function(){var e=i.getState(),n=i.items[e.highlightedIndex],o=i.getItemCount(),r=i.props.getA11yStatusMessage(t({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:o,highlightedItem:n},e));i.previousResultCount=o,tt(r,i.props.environment.document)}),200);var u=i.props,s=u.defaultHighlightedIndex,c=u.initialHighlightedIndex,a=void 0===c?s:c,l=u.defaultIsOpen,d=u.initialIsOpen,p=void 0===d?l:d,f=u.initialInputValue,m=void 0===f?\"\":f,h=u.initialSelectedItem,g=void 0===h?null:h,v=i.getState({highlightedIndex:a,isOpen:p,inputValue:m,selectedItem:g});return null!=v.selectedItem&&void 0===i.props.initialInputValue&&(v.inputValue=i.props.itemToString(v.selectedItem)),i.state=v,i}o(i,r);var u=i.prototype;return u.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},u.getState=function(e){return void 0===e&&(e=this.state),Ye(e,this.props)},u.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},u.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},u.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},u.moveHighlightedIndex=function(e,t){var n=this,o=this.getItemCount(),r=this.getState().highlightedIndex;if(o>0){var i=Xe(e,r,o,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},u.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,o=e.selectedItem,r=e.isOpen,i=this.props.itemToString,u=this.id,s=this.getRootProps,c=this.getToggleButtonProps,a=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,m=this.closeMenu,h=this.toggleMenu,g=this.selectItem,v=this.selectItemAtIndex,y=this.selectHighlightedItem,I=this.setHighlightedIndex,_=this.clearSelection,b=this.clearItems;return{getRootProps:s,getToggleButtonProps:c,getLabelProps:a,getMenuProps:l,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:m,toggleMenu:h,selectItem:g,selectItemAtIndex:v,selectHighlightedItem:y,setHighlightedIndex:I,clearSelection:_,clearItems:b,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:u,highlightedIndex:t,inputValue:n,isOpen:r,selectedItem:o}},u.componentDidMount=function(){var e=this;\"production\"!==process.env.NODE_ENV&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Et(this._menuNode,this.getMenuProps);var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!Qe(t.target,[e._rootNode,e._menuNode],e.props.environment.document)&&e.getState().isOpen&&e.reset({type:rt},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},o=function(){e.isTouchMove=!1},r=function(){e.isTouchMove=!0},i=function(t){var n=Qe(t.target,[e._rootNode,e._menuNode],e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:It},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener(\"mousedown\",t),u.addEventListener(\"mouseup\",n),u.addEventListener(\"touchstart\",o),u.addEventListener(\"touchmove\",r),u.addEventListener(\"touchend\",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener(\"mousedown\",t),u.removeEventListener(\"mouseup\",n),u.removeEventListener(\"touchstart\",o),u.removeEventListener(\"touchmove\",r),u.removeEventListener(\"touchend\",i)}},u.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,o=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==o},u.componentDidUpdate=function(e,t){\"production\"!==process.env.NODE_ENV&&(Ze(this.state,e,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Et(this._menuNode,this.getMenuProps)),qe(this.props,\"selectedItem\")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:yt,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},u.componentWillUnmount=function(){this.cleanup()},u.render=function(){var e=Le(this.props.children,Te);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=Le(e(this.getStateAndHelpers()));if(!t)return null;if(this.getRootProps.called||this.props.suppressRefError)return\"production\"===process.env.NODE_ENV||this.getRootProps.suppressRefError||this.props.suppressRefError||function(e,t){var n=t.refKey,o=\"ref\"!==n,r=!Be(e);!r||o||Ne.isForwardRef(e)?!r&&o&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"'+n+'\"'):console.error(\"downshift: You returned a non-DOM element. You must specify a refKey in getRootProps\");Ne.isForwardRef(e)||Ue(e)[n]||console.error('downshift: You must apply the ref prop \"'+n+'\" from getRootProps onto your root element.')}(t,this.getRootProps),t;if(Be(t))return l(t,this.getRootProps(Ue(t)));if(\"production\"!==process.env.NODE_ENV)throw new Error(\"downshift: If you return a non-DOM element, you must apply the getRootProps function\")},i}(d);return r.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:je,itemToString:function(e){return null==e?\"\":(\"production\"===process.env.NODE_ENV||(t=e,\"[object Object]\"!==Object.prototype.toString.call(t))||e.hasOwnProperty(\"toString\")||console.warn(\"downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.\",\"The object that was passed:\",e),String(e));var t},onStateChange:Te,onInputValueChange:Te,onUserAction:Te,onChange:Te,onSelect:Te,onOuterClick:Te,selectedItemChanged:function(e,t){return e!==t},environment:\"undefined\"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:Re},r.stateChangeTypes=_t,r}();function Et(e,t){var n=t.refKey;e||console.error('downshift: The ref prop \"'+n+'\" from getMenuProps was not applied correctly on your menu element.')}\"production\"!==process.env.NODE_ENV&&(bt.propTypes={children:oe.func,defaultHighlightedIndex:oe.number,defaultIsOpen:oe.bool,initialHighlightedIndex:oe.number,initialSelectedItem:oe.any,initialInputValue:oe.string,initialIsOpen:oe.bool,getA11yStatusMessage:oe.func,itemToString:oe.func,onChange:oe.func,onSelect:oe.func,onStateChange:oe.func,onInputValueChange:oe.func,onUserAction:oe.func,onOuterClick:oe.func,selectedItemChanged:oe.func,stateReducer:oe.func,itemCount:oe.number,id:oe.string,environment:oe.shape({addEventListener:oe.func,removeEventListener:oe.func,document:oe.shape({getElementById:oe.func,activeElement:oe.any,body:oe.any})}),suppressRefError:oe.bool,scrollIntoView:oe.func,selectedItem:oe.any,isOpen:oe.bool,inputValue:oe.string,highlightedIndex:oe.number,labelId:oe.string,inputId:oe.string,menuId:oe.string,getItemId:oe.func});var wt={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:\"\"};function xt(e,n,o){var r=e.props,i=e.type,u={};Object.keys(n).forEach((function(r){!function(e,n,o,r){var i=n.props,u=n.type,s=\"on\"+Vt(e)+\"Change\";i[s]&&void 0!==r[e]&&r[e]!==o[e]&&i[s](t({type:u},r))}(r,e,n,o),o[r]!==n[r]&&(u[r]=o[r])})),r.onStateChange&&Object.keys(u).length&&r.onStateChange(t({type:i},u))}var Ot=Ae((function(e,t){tt(e(),t)}),200);function St(e){var t=e.id,n=e.labelId,o=e.menuId,r=e.getItemId,i=e.toggleButtonId,u=void 0===t?\"downshift-\"+Fe():t;return{labelId:n||u+\"-label\",menuId:o||u+\"-menu\",getItemId:r||function(e){return u+\"-item-\"+e},toggleButtonId:i||u+\"-toggle-button\"}}function Nt(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function Dt(e,t){return function(n){void 0===n&&(n={}),Object.keys(t).forEach((function(o){oe.checkPropTypes(t,n,o,e.name)}))}}function kt(e){return/^\\S{1}$/.test(e)}function Vt(e){return\"\"+e.slice(0,1).toUpperCase()+e.slice(1)}function Ct(e){var t=u(e);return t.current=e,t}function Mt(e,n,o){var r=u(),i=u(),c=a((function(n,o){i.current=o,n=Ye(n,o.props);var r=e(n,o);return o.props.stateReducer(n,t({},o,{changes:r}))}),[e]),l=p(c,n),d=l[0],f=l[1],m=Ct(o),h=a((function(e){return f(t({props:m.current},e))}),[m]),g=i.current;return s((function(){g&&r.current&&r.current!==d&&xt(g,Ye(r.current,g.props),d),r.current=d}),[d,o,g]),[d,h]}function Pt(e,t,n){var o=Mt(e,t,n),r=o[0],i=o[1];return[Ye(r,n),i]}var Tt={itemToString:function(e){return e?String(e):\"\"},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+\" has been selected.\":\"\"},scrollIntoView:Re,circularNavigation:!1,environment:\"undefined\"==typeof window?{}:window};function Rt(e,t,n){void 0===n&&(n=wt);var o=\"default\"+Vt(t);return o in e?e[o]:n[t]}function Kt(e,t,n){if(void 0===n&&(n=wt),t in e)return e[t];var o=\"initial\"+Vt(t);return o in e?e[o]:Rt(e,t,n)}function At(e){var t=Kt(e,\"selectedItem\"),n=Kt(e,\"isOpen\"),o=Kt(e,\"highlightedIndex\"),r=Kt(e,\"inputValue\");return{highlightedIndex:o<0&&t&&n?e.items.indexOf(t):o,isOpen:n,selectedItem:t,inputValue:r}}function Ht(e,t,n,o){var r=e.items,i=e.initialHighlightedIndex,u=e.defaultHighlightedIndex,s=t.selectedItem,c=t.highlightedIndex;return 0===r.length?-1:void 0!==i&&c===i?i:void 0!==u?u:s?0===n?r.indexOf(s):Xe(n,r.indexOf(s),r.length,o,!1):0===n?-1:n<0?r.length-1:0}function $t(e,t,n,o){var r=u({isMouseDown:!1,isTouchMove:!1});return s((function(){var i=function(){r.current.isMouseDown=!0},u=function(i){r.current.isMouseDown=!1,e&&!Qe(i.target,t.map((function(e){return e.current})),n.document)&&o()},s=function(){r.current.isTouchMove=!1},c=function(){r.current.isTouchMove=!0},a=function(i){!e||r.current.isTouchMove||Qe(i.target,t.map((function(e){return e.current})),n.document,!1)||o()};return n.addEventListener(\"mousedown\",i),n.addEventListener(\"mouseup\",u),n.addEventListener(\"touchstart\",s),n.addEventListener(\"touchmove\",c),n.addEventListener(\"touchend\",a),function(){n.removeEventListener(\"mousedown\",i),n.removeEventListener(\"mouseup\",u),n.removeEventListener(\"touchstart\",s),n.removeEventListener(\"touchmove\",c),n.removeEventListener(\"touchend\",a)}}),[e,n]),r}function Ft(){for(var e=\"production\"!==process.env.NODE_ENV,t=u(!0),n=arguments.length,o=new Array(n),r=0;r=0&&{selectedItem:i.items[a]});break;case sn:o={highlightedIndex:Ht(i,e,1,n.getItemNodeFromIndex),isOpen:!0};break;case cn:o={highlightedIndex:Ht(i,e,-1,n.getItemNodeFromIndex),isOpen:!0};break;case Qt:case Zt:o=t({isOpen:Rt(i,\"isOpen\"),highlightedIndex:Rt(i,\"highlightedIndex\")},e.highlightedIndex>=0&&{selectedItem:i.items[e.highlightedIndex]});break;case Xt:o={highlightedIndex:Ge(1,0,i.items.length,n.getItemNodeFromIndex,!1)};break;case Gt:o={highlightedIndex:Ge(-1,i.items.length-1,i.items.length,n.getItemNodeFromIndex,!1)};break;case Jt:case tn:o={isOpen:!1,highlightedIndex:-1};break;case en:var l=n.key,d=\"\"+e.inputValue+l,p=Ut(d,e.highlightedIndex,i.items,i.itemToString,n.getItemNodeFromIndex);o=t({inputValue:d},p>=0&&{highlightedIndex:p});break;case Yt:o={highlightedIndex:Xe(u?5:1,e.highlightedIndex,i.items.length,n.getItemNodeFromIndex,i.circularNavigation)};break;case qt:o={highlightedIndex:Xe(u?-5:-1,e.highlightedIndex,i.items.length,n.getItemNodeFromIndex,i.circularNavigation)};break;case nn:o={highlightedIndex:-1};break;case un:case ln:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ht(i,e,0)};break;case dn:o={isOpen:!0,highlightedIndex:Ht(i,e,0)};break;case pn:o={isOpen:!1};break;case fn:o={highlightedIndex:n.highlightedIndex};break;case mn:o={selectedItem:n.selectedItem};break;case hn:o={inputValue:n.inputValue};break;case gn:o={highlightedIndex:Rt(i,\"highlightedIndex\"),isOpen:Rt(i,\"isOpen\"),selectedItem:Rt(i,\"selectedItem\"),inputValue:Rt(i,\"inputValue\")};break;default:throw new Error(\"Reducer called without proper action type.\")}return t({},e,o)}var In=\"production\"===process.env.NODE_ENV?null:Dt(_n,Wt);function _n(n){void 0===n&&(n={}),\"production\"!==process.env.NODE_ENV&&In(n);var o=t({},zt,n),r=o.items,i=o.scrollIntoView,l=o.environment,d=o.initialIsOpen,p=o.defaultIsOpen,f=o.itemToString,m=o.getA11ySelectionMessage,h=o.getA11yStatusMessage,g=Pt(yn,At(o),o),v=g[0],y=g[1],I=v.isOpen,_=v.highlightedIndex,b=v.selectedItem,E=v.inputValue,w=u(null),x=u(null),O=u();O.current={};var S=u(!0),N=u(null),D=u(St(o)),k=u(),V=u(!0),C=Ct({state:v,props:o}),M=function(e){return O.current[D.current.getItemId(e)]};jt(h,[I,_,E,r],t({isInitialMount:V.current,previousResultCount:k.current,items:r,environment:l,itemToString:f},v)),jt(m,[b],t({isInitialMount:V.current,previousResultCount:k.current,items:r,environment:l,itemToString:f},v));var P=Lt({menuElement:x.current,highlightedIndex:_,isOpen:I,itemRefs:O,scrollIntoView:i,getItemNodeFromIndex:M});s((function(){V.current&&(N.current=Ae((function(e){e({type:hn,inputValue:\"\"})}),500)),E&&N.current(y)}),[y,E]),Bt({isInitialMount:V.current,props:o,state:v}),s((function(){V.current?(d||p||I)&&x.current&&x.current.focus():I?x.current&&x.current.focus():l.document.activeElement===x.current&&w.current&&(S.current=!1,w.current.focus())}),[I]),s((function(){V.current||(k.current=r.length)}));var T=$t(I,[x,w],l,(function(){y({type:tn})})),R=Ft(\"getMenuProps\",\"getToggleButtonProps\");s((function(){V.current=!1}),[]);var K=c((function(){return{ArrowDown:function(e){e.preventDefault(),y({type:sn,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),y({type:cn,getItemNodeFromIndex:M,shiftKey:e.shiftKey})}}}),[y]),A=c((function(){return{ArrowDown:function(e){e.preventDefault(),y({type:Yt,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),y({type:qt,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),y({type:Xt,getItemNodeFromIndex:M})},End:function(e){e.preventDefault(),y({type:Gt,getItemNodeFromIndex:M})},Escape:function(){y({type:Jt})},Enter:function(e){e.preventDefault(),y({type:Qt})},\" \":function(e){e.preventDefault(),y({type:Zt})}}}),[y]),H=a((function(){y({type:ln})}),[y]),$=a((function(){y({type:pn})}),[y]),F=a((function(){y({type:dn})}),[y]),j=a((function(e){y({type:fn,highlightedIndex:e})}),[y]),L=a((function(e){y({type:mn,selectedItem:e})}),[y]),B=a((function(){y({type:gn})}),[y]),U=a((function(e){y({type:hn,inputValue:e})}),[y]),W=a((function(e){return t({id:D.current.labelId,htmlFor:D.current.toggleButtonId},e)}),[]),z=a((function(n,o){var r,i=void 0===n?{}:n,u=i.onMouseLeave,s=i.refKey,c=void 0===s?\"ref\":s,a=i.onKeyDown,l=i.onBlur,d=i.ref,p=e(i,[\"onMouseLeave\",\"refKey\",\"onKeyDown\",\"onBlur\",\"ref\"]),f=(void 0===o?{}:o).suppressRefError,m=void 0!==f&&f,h=C.current.state;return R(\"getMenuProps\",m,c,x),t(((r={})[c]=$e(d,(function(e){x.current=e})),r.id=D.current.menuId,r.role=\"listbox\",r[\"aria-labelledby\"]=D.current.labelId,r.tabIndex=-1,r),h.isOpen&&h.highlightedIndex>-1&&{\"aria-activedescendant\":D.current.getItemId(h.highlightedIndex)},{onMouseLeave:He(u,(function(){y({type:nn})})),onKeyDown:He(a,(function(e){var t=Je(e);t&&A[t]?A[t](e):kt(t)&&y({type:en,key:t,getItemNodeFromIndex:M})})),onBlur:He(l,(function(){!1!==S.current?!T.current.isMouseDown&&y({type:tn}):S.current=!0}))},p)}),[y,C,A,T,R]);return{getToggleButtonProps:a((function(n,o){var r,i=void 0===n?{}:n,u=i.onClick,s=i.onKeyDown,c=i.refKey,a=void 0===c?\"ref\":c,l=i.ref,d=e(i,[\"onClick\",\"onKeyDown\",\"refKey\",\"ref\"]),p=(void 0===o?{}:o).suppressRefError,f=void 0!==p&&p,m=t(((r={})[a]=$e(l,(function(e){w.current=e})),r.id=D.current.toggleButtonId,r[\"aria-haspopup\"]=\"listbox\",r[\"aria-expanded\"]=C.current.state.isOpen,r[\"aria-labelledby\"]=D.current.labelId+\" \"+D.current.toggleButtonId,r),d);return d.disabled||(m.onClick=He(u,(function(){y({type:un})})),m.onKeyDown=He(s,(function(e){var t=Je(e);t&&K[t]?K[t](e):kt(t)&&y({type:an,key:t,getItemNodeFromIndex:M})}))),R(\"getToggleButtonProps\",f,a,w),m}),[y,C,K,R]),getLabelProps:W,getMenuProps:z,getItemProps:a((function(n){var o,r=void 0===n?{}:n,i=r.item,u=r.index,s=r.onMouseMove,c=r.onClick,a=r.refKey,l=void 0===a?\"ref\":a,d=r.ref,p=e(r,[\"item\",\"index\",\"onMouseMove\",\"onClick\",\"refKey\",\"ref\"]),f=C.current,m=f.state,h=f.props,g=Nt(u,i,h.items);if(g<0)throw new Error(\"Pass either item or item index in getItemProps!\");var v=t(((o={role:\"option\",\"aria-selected\":\"\"+(g===m.highlightedIndex),id:D.current.getItemId(g)})[l]=$e(d,(function(e){e&&(O.current[D.current.getItemId(g)]=e)})),o),p);return p.disabled||(v.onMouseMove=He(s,(function(){u!==m.highlightedIndex&&(P.current=!1,y({type:on,index:u}))})),v.onClick=He(c,(function(){y({type:rn,index:u})}))),v}),[y,C,P]),toggleMenu:H,openMenu:F,closeMenu:$,setHighlightedIndex:j,selectItem:L,reset:B,setInputValue:U,highlightedIndex:_,isOpen:I,selectedItem:b,inputValue:E}}_n.stateChangeTypes=vn;var bn=\"production\"!==process.env.NODE_ENV?\"__input_keydown_arrow_down__\":0,En=\"production\"!==process.env.NODE_ENV?\"__input_keydown_arrow_up__\":1,wn=\"production\"!==process.env.NODE_ENV?\"__input_keydown_escape__\":2,xn=\"production\"!==process.env.NODE_ENV?\"__input_keydown_home__\":3,On=\"production\"!==process.env.NODE_ENV?\"__input_keydown_end__\":4,Sn=\"production\"!==process.env.NODE_ENV?\"__input_keydown_enter__\":5,Nn=\"production\"!==process.env.NODE_ENV?\"__input_change__\":6,Dn=\"production\"!==process.env.NODE_ENV?\"__input_blur__\":7,kn=\"production\"!==process.env.NODE_ENV?\"__menu_mouse_leave__\":8,Vn=\"production\"!==process.env.NODE_ENV?\"__item_mouse_move__\":9,Cn=\"production\"!==process.env.NODE_ENV?\"__item_click__\":10,Mn=\"production\"!==process.env.NODE_ENV?\"__togglebutton_click__\":11,Pn=\"production\"!==process.env.NODE_ENV?\"__function_toggle_menu__\":12,Tn=\"production\"!==process.env.NODE_ENV?\"__function_open_menu__\":13,Rn=\"production\"!==process.env.NODE_ENV?\"__function_close_menu__\":14,Kn=\"production\"!==process.env.NODE_ENV?\"__function_set_highlighted_index__\":15,An=\"production\"!==process.env.NODE_ENV?\"__function_select_item__\":16,Hn=\"production\"!==process.env.NODE_ENV?\"__function_set_input_value__\":17,$n=\"production\"!==process.env.NODE_ENV?\"__function_reset__\":18,Fn=\"production\"!==process.env.NODE_ENV?\"__controlled_prop_updated_selected_item__\":19,jn=Object.freeze({__proto__:null,InputKeyDownArrowDown:bn,InputKeyDownArrowUp:En,InputKeyDownEscape:wn,InputKeyDownHome:xn,InputKeyDownEnd:On,InputKeyDownEnter:Sn,InputChange:Nn,InputBlur:Dn,MenuMouseLeave:kn,ItemMouseMove:Vn,ItemClick:Cn,ToggleButtonClick:Mn,FunctionToggleMenu:Pn,FunctionOpenMenu:Tn,FunctionCloseMenu:Rn,FunctionSetHighlightedIndex:Kn,FunctionSelectItem:An,FunctionSetInputValue:Hn,FunctionReset:$n,ControlledPropUpdatedSelectedItem:Fn});var Ln={items:oe.array.isRequired,itemToString:oe.func,getA11yStatusMessage:oe.func,getA11ySelectionMessage:oe.func,circularNavigation:oe.bool,highlightedIndex:oe.number,defaultHighlightedIndex:oe.number,initialHighlightedIndex:oe.number,isOpen:oe.bool,defaultIsOpen:oe.bool,initialIsOpen:oe.bool,selectedItem:oe.any,initialSelectedItem:oe.any,defaultSelectedItem:oe.any,inputValue:oe.string,defaultInputValue:oe.string,initialInputValue:oe.string,id:oe.string,labelId:oe.string,menuId:oe.string,getItemId:oe.func,inputId:oe.string,toggleButtonId:oe.string,stateReducer:oe.func,onSelectedItemChange:oe.func,onHighlightedIndexChange:oe.func,onStateChange:oe.func,onIsOpenChange:oe.func,onInputValueChange:oe.func,environment:oe.shape({addEventListener:oe.func,removeEventListener:oe.func,document:oe.shape({getElementById:oe.func,activeElement:oe.any,body:oe.any})})};var Bn=t({},Tt,{getA11yStatusMessage:je,circularNavigation:!0});function Un(e,n){var o,r=n.type,i=n.props,u=n.shiftKey;switch(r){case Vn:o={highlightedIndex:n.index};break;case Cn:o={isOpen:Rt(i,\"isOpen\"),highlightedIndex:Rt(i,\"highlightedIndex\"),selectedItem:i.items[n.index],inputValue:i.itemToString(i.items[n.index])};break;case bn:o=e.isOpen?{highlightedIndex:Xe(u?5:1,e.highlightedIndex,i.items.length,n.getItemNodeFromIndex,i.circularNavigation)}:{highlightedIndex:Ht(i,e,1,n.getItemNodeFromIndex),isOpen:!0};break;case En:o=e.isOpen?{highlightedIndex:Xe(u?-5:-1,e.highlightedIndex,i.items.length,n.getItemNodeFromIndex,i.circularNavigation)}:{highlightedIndex:Ht(i,e,-1,n.getItemNodeFromIndex),isOpen:!0};break;case Sn:o=t({},e.isOpen&&e.highlightedIndex>=0&&{selectedItem:i.items[e.highlightedIndex],isOpen:Rt(i,\"isOpen\"),highlightedIndex:Rt(i,\"highlightedIndex\"),inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case wn:o=t({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:\"\"});break;case xn:o=t({},e.isOpen&&{highlightedIndex:Ge(1,0,i.items.length,n.getItemNodeFromIndex,!1)});break;case On:o=t({},e.isOpen&&{highlightedIndex:Ge(-1,i.items.length-1,i.items.length,n.getItemNodeFromIndex,!1)});break;case Dn:e.isOpen&&(o=t({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&n.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])}));break;case Nn:o={isOpen:!0,highlightedIndex:Rt(i,\"highlightedIndex\"),inputValue:n.inputValue};break;case kn:o={highlightedIndex:-1};break;case Mn:case Pn:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ht(i,e,0)};break;case Tn:o={isOpen:!0,highlightedIndex:Ht(i,e,0)};break;case Rn:o={isOpen:!1};break;case Kn:o={highlightedIndex:n.highlightedIndex};break;case An:o={selectedItem:n.selectedItem,inputValue:i.itemToString(n.selectedItem)};break;case Fn:case Hn:o={inputValue:n.inputValue};break;case $n:o={highlightedIndex:Rt(i,\"highlightedIndex\"),isOpen:Rt(i,\"isOpen\"),selectedItem:Rt(i,\"selectedItem\"),inputValue:Rt(i,\"inputValue\")};break;default:throw new Error(\"Reducer called without proper action type.\")}return t({},e,o)}var Wn=\"production\"===process.env.NODE_ENV?null:Dt(zn,Ln);function zn(n){void 0===n&&(n={}),\"production\"!==process.env.NODE_ENV&&Wn(n);var o=t({},Bn,n),r=o.initialIsOpen,i=o.defaultIsOpen,l=o.items,d=o.scrollIntoView,p=o.environment,f=o.getA11yStatusMessage,m=o.getA11ySelectionMessage,h=o.itemToString,g=function(e){var n=At(e),o=n.selectedItem,r=n.inputValue;return\"\"===r&&o&&void 0===e.defaultInputValue&&void 0===e.initialInputValue&&void 0===e.inputValue&&(r=e.itemToString(o)),t({},n,{inputValue:r})}(o),v=function(e,t,n){var o=u(),r=Mt(e,t,n),i=r[0],c=r[1];return s((function(){qe(n,\"selectedItem\")&&(o.current!==n.selectedItem&&c({type:Fn,inputValue:n.itemToString(n.selectedItem)}),o.current=i.selectedItem===o.current?n.selectedItem:i.selectedItem)})),[Ye(i,n),c]}(Un,g,o),y=v[0],I=v[1],_=y.isOpen,b=y.highlightedIndex,E=y.selectedItem,w=y.inputValue,x=u(null),O=u(),S=u(null),N=u(null),D=u(null);O.current={};var k,V,C,M,P,T=u(!0),R=u((V=(k=o).id,C=k.inputId,M=e(k,[\"id\",\"inputId\"]),P=void 0===V?\"downshift-\"+Fe():V,t({inputId:C||P+\"-input\"},St(t({id:V},M))))),K=u(),A=Ct({state:y,props:o}),H=function(e){return O.current[R.current.getItemId(e)]};jt(f,[_,b,w,l],t({isInitialMount:T.current,previousResultCount:K.current,items:l,environment:p,itemToString:h},y)),jt(m,[E],t({isInitialMount:T.current,previousResultCount:K.current,items:l,environment:p,itemToString:h},y));var $=Lt({menuElement:x.current,highlightedIndex:b,isOpen:_,itemRefs:O,scrollIntoView:d,getItemNodeFromIndex:H});Bt({isInitialMount:T.current,props:o,state:y}),s((function(){T.current&&(r||i||_)&&S.current&&S.current.focus()}),[_]),s((function(){T.current||(K.current=l.length)}));var F=$t(_,[D,x,N],p,(function(){I({type:Dn,selectItem:!1})})),j=Ft(\"getInputProps\",\"getComboboxProps\",\"getMenuProps\");s((function(){T.current=!1}),[]);var L=c((function(){return{ArrowDown:function(e){e.preventDefault(),I({type:bn,shiftKey:e.shiftKey,getItemNodeFromIndex:H})},ArrowUp:function(e){e.preventDefault(),I({type:En,shiftKey:e.shiftKey,getItemNodeFromIndex:H})},Home:function(e){e.preventDefault(),I({type:xn,getItemNodeFromIndex:H})},End:function(e){e.preventDefault(),I({type:On,getItemNodeFromIndex:H})},Escape:function(){I({type:wn})},Enter:function(e){229!==e.which&&(A.current.state.isOpen&&e.preventDefault(),I({type:Sn,getItemNodeFromIndex:H}))}}}),[I,A]),B=a((function(e){return t({id:R.current.labelId,htmlFor:R.current.inputId},e)}),[]),U=a((function(n,o){var r,i=void 0===n?{}:n,u=i.onMouseLeave,s=i.refKey,c=void 0===s?\"ref\":s,a=i.ref,l=e(i,[\"onMouseLeave\",\"refKey\",\"ref\"]),d=(void 0===o?{}:o).suppressRefError;return j(\"getMenuProps\",void 0!==d&&d,c,x),t(((r={})[c]=$e(a,(function(e){x.current=e})),r.id=R.current.menuId,r.role=\"listbox\",r[\"aria-labelledby\"]=R.current.labelId,r.onMouseLeave=He(u,(function(){I({type:kn})})),r),l)}),[I,j]),W=a((function(n){var o,r,i=void 0===n?{}:n,u=i.item,s=i.index,c=i.refKey,a=void 0===c?\"ref\":c,l=i.ref,d=i.onMouseMove,p=i.onClick;i.onPress;var f=e(i,[\"item\",\"index\",\"refKey\",\"ref\",\"onMouseMove\",\"onClick\",\"onPress\"]),m=A.current,h=m.props,g=m.state,v=Nt(s,u,h.items);if(v<0)throw new Error(\"Pass either item or item index in getItemProps!\");var y=p;return t(((o={})[a]=$e(l,(function(e){e&&(O.current[R.current.getItemId(v)]=e)})),o.role=\"option\",o[\"aria-selected\"]=\"\"+(v===g.highlightedIndex),o.id=R.current.getItemId(v),o),!f.disabled&&((r={onMouseMove:He(d,(function(){s!==g.highlightedIndex&&($.current=!1,I({type:Vn,index:s}))}))}).onClick=He(y,(function(){I({type:Cn,index:s}),S.current&&S.current.focus()})),r),f)}),[I,A,$]),z=a((function(n){var o,r=void 0===n?{}:n,i=r.onClick;r.onPress;var u=r.refKey,s=void 0===u?\"ref\":u,c=r.ref,a=e(r,[\"onClick\",\"onPress\",\"refKey\",\"ref\"]);return t(((o={})[s]=$e(c,(function(e){N.current=e})),o.id=R.current.toggleButtonId,o.tabIndex=-1,o),!a.disabled&&t({},{onClick:He(i,(function(){I({type:Mn}),!A.current.state.isOpen&&S.current&&S.current.focus()}))}),a)}),[I,A]),Y=a((function(n,o){var r,i=void 0===n?{}:n,u=i.onKeyDown,s=i.onChange,c=i.onInput,a=i.onBlur;i.onChangeText;var l=i.refKey,d=void 0===l?\"ref\":l,p=i.ref,f=e(i,[\"onKeyDown\",\"onChange\",\"onInput\",\"onBlur\",\"onChangeText\",\"refKey\",\"ref\"]),m=(void 0===o?{}:o).suppressRefError;j(\"getInputProps\",void 0!==m&&m,d,S);var h,g=A.current.state,v={};f.disabled||((h={}).onChange=He(s,c,(function(e){I({type:Nn,inputValue:e.target.value})})),h.onKeyDown=He(u,(function(e){var t=Je(e);t&&L[t]&&L[t](e)})),h.onBlur=He(a,(function(){F.current.isMouseDown||I({type:Dn,selectItem:!0})})),v=h);return t(((r={})[d]=$e(p,(function(e){S.current=e})),r.id=R.current.inputId,r[\"aria-autocomplete\"]=\"list\",r[\"aria-controls\"]=R.current.menuId,r),g.isOpen&&g.highlightedIndex>-1&&{\"aria-activedescendant\":R.current.getItemId(g.highlightedIndex)},{\"aria-labelledby\":R.current.labelId,autoComplete:\"off\",value:g.inputValue},v,f)}),[I,L,A,F,j]),q=a((function(n,o){var r,i=void 0===n?{}:n,u=i.refKey,s=void 0===u?\"ref\":u,c=i.ref,a=e(i,[\"refKey\",\"ref\"]),l=(void 0===o?{}:o).suppressRefError;return j(\"getComboboxProps\",void 0!==l&&l,s,D),t(((r={})[s]=$e(c,(function(e){D.current=e})),r.role=\"combobox\",r[\"aria-haspopup\"]=\"listbox\",r[\"aria-owns\"]=R.current.menuId,r[\"aria-expanded\"]=A.current.state.isOpen,r),a)}),[A,j]),J=a((function(){I({type:Pn})}),[I]),X=a((function(){I({type:Rn})}),[I]),G=a((function(){I({type:Tn})}),[I]),Q=a((function(e){I({type:Kn,highlightedIndex:e})}),[I]),Z=a((function(e){I({type:An,selectedItem:e})}),[I]);return{getItemProps:W,getLabelProps:B,getMenuProps:U,getInputProps:Y,getComboboxProps:q,getToggleButtonProps:z,toggleMenu:J,openMenu:G,closeMenu:X,setHighlightedIndex:Q,setInputValue:a((function(e){I({type:Hn,inputValue:e})}),[I]),selectItem:Z,reset:a((function(){I({type:$n})}),[I]),highlightedIndex:b,isOpen:_,selectedItem:E,inputValue:w}}zn.stateChangeTypes=jn;var Yn={activeIndex:-1,selectedItems:[]};function qn(e,t){return Kt(e,t,Yn)}function Jn(e,t){return Rt(e,t,Yn)}function Xn(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&\"\"!==t.value)||0===t.selectionStart&&0===t.selectionEnd}oe.array,oe.array,oe.array,oe.func,oe.func,oe.func,oe.number,oe.number,oe.number,oe.func,oe.func,oe.string,oe.string,oe.shape({addEventListener:oe.func,removeEventListener:oe.func,document:oe.shape({getElementById:oe.func,activeElement:oe.any,body:oe.any})});var Gn={itemToString:Tt.itemToString,stateReducer:Tt.stateReducer,environment:Tt.environment,getA11yRemovalMessage:function(e){var t=e.removedSelectedItem;return(0,e.itemToString)(t)+\" has been removed.\"},keyNavigationNext:\"ArrowRight\",keyNavigationPrevious:\"ArrowLeft\"},Qn=\"production\"!==process.env.NODE_ENV?\"__selected_item_click__\":0,Zn=\"production\"!==process.env.NODE_ENV?\"__selected_item_keydown_delete__\":1,eo=\"production\"!==process.env.NODE_ENV?\"__selected_item_keydown_backspace__\":2,to=\"production\"!==process.env.NODE_ENV?\"__selected_item_keydown_navigation_next__\":3,no=\"production\"!==process.env.NODE_ENV?\"__selected_item_keydown_navigation_previous__\":4,oo=\"production\"!==process.env.NODE_ENV?\"__dropdown_keydown_navigation_previous__\":5,ro=\"production\"!==process.env.NODE_ENV?\"__dropdown_keydown_backspace__\":6,io=\"production\"!==process.env.NODE_ENV?\"__dropdown_click__\":7,uo=\"production\"!==process.env.NODE_ENV?\"__function_add_selected_item__\":8,so=\"production\"!==process.env.NODE_ENV?\"__function_remove_selected_item__\":9,co=\"production\"!==process.env.NODE_ENV?\"__function_set_selected_items__\":10,ao=\"production\"!==process.env.NODE_ENV?\"__function_set_active_index__\":11,lo=\"production\"!==process.env.NODE_ENV?\"__function_reset__\":12,po=Object.freeze({__proto__:null,SelectedItemClick:Qn,SelectedItemKeyDownDelete:Zn,SelectedItemKeyDownBackspace:eo,SelectedItemKeyDownNavigationNext:to,SelectedItemKeyDownNavigationPrevious:no,DropdownKeyDownNavigationPrevious:oo,DropdownKeyDownBackspace:ro,DropdownClick:io,FunctionAddSelectedItem:uo,FunctionRemoveSelectedItem:so,FunctionSetSelectedItems:co,FunctionSetActiveIndex:ao,FunctionReset:lo});function fo(e,n){var o,r=n.type,i=n.index,u=n.props,s=n.selectedItem,c=e.activeIndex,a=e.selectedItems;switch(r){case Qn:o={activeIndex:i};break;case no:o={activeIndex:c-1<0?0:c-1};break;case to:o={activeIndex:c+1>=a.length?-1:c+1};break;case eo:case Zn:var l=c;1===a.length?l=-1:c===a.length-1&&(l=a.length-2),o=t({selectedItems:[].concat(a.slice(0,c),a.slice(c+1))},{activeIndex:l});break;case oo:o={activeIndex:a.length-1};break;case ro:o={selectedItems:a.slice(0,a.length-1)};break;case uo:o={selectedItems:[].concat(a,[s])};break;case io:o={activeIndex:-1};break;case so:var d=c,p=a.indexOf(s);1===a.length?d=-1:p===a.length-1&&(d=a.length-2),o=t({selectedItems:[].concat(a.slice(0,p),a.slice(p+1))},{activeIndex:d});break;case co:o={selectedItems:n.selectedItems};break;case ao:o={activeIndex:n.activeIndex};break;case lo:o={activeIndex:Jn(u,\"activeIndex\"),selectedItems:Jn(u,\"selectedItems\")};break;default:throw new Error(\"Reducer called without proper action type.\")}return t({},e,o)}function mo(n){void 0===n&&(n={});var o=t({},Gn,n),r=o.getA11yRemovalMessage,i=o.itemToString,l=o.environment,d=o.keyNavigationNext,p=o.keyNavigationPrevious,f=Pt(fo,function(e){return{activeIndex:qn(e,\"activeIndex\"),selectedItems:qn(e,\"selectedItems\")}}(o),o),m=f[0],h=f[1],g=m.activeIndex,v=m.selectedItems,y=u(!0),I=u(null),_=u(v),b=u();b.current=[];var E=Ct({state:m,props:o});s((function(){if(!y.current){if(v.length<_.current.length){var e=_.current.find((function(e){return v.indexOf(e)<0}));tt(r({itemToString:i,resultCount:v.length,removedSelectedItem:e,activeIndex:g,activeSelectedItem:v[g]}),l.document)}_.current=v}}),[v.length]),s((function(){y.current||(-1===g&&I.current?I.current.focus():b.current[g]&&b.current[g].focus())}),[g]),Bt({isInitialMount:y.current,props:o,state:m});var w=Ft(\"getDropdownProps\");s((function(){y.current=!1}),[]);var x=c((function(){var e;return(e={})[p]=function(){h({type:no})},e[d]=function(){h({type:to})},e.Delete=function(){h({type:Zn})},e.Backspace=function(){h({type:eo})},e}),[h,d,p]),O=c((function(){var e;return(e={})[p]=function(e){Xn(e)&&h({type:oo})},e.Backspace=function(e){Xn(e)&&h({type:ro})},e}),[h,p]);return{getSelectedItemProps:a((function(n){var o,r=void 0===n?{}:n,i=r.refKey,u=void 0===i?\"ref\":i,s=r.ref,c=r.onClick,a=r.onKeyDown,l=r.selectedItem,d=r.index,p=e(r,[\"refKey\",\"ref\",\"onClick\",\"onKeyDown\",\"selectedItem\",\"index\"]),f=E.current.state;if(Nt(d,l,f.selectedItems)<0)throw new Error(\"Pass either selectedItem or index in getSelectedItemProps!\");return t(((o={})[u]=$e(s,(function(e){e&&b.current.push(e)})),o.tabIndex=d===f.activeIndex?0:-1,o.onClick=He(c,(function(){h({type:Qn,index:d})})),o.onKeyDown=He(a,(function(e){var t=Je(e);t&&x[t]&&x[t](e)})),o),p)}),[h,E,x]),getDropdownProps:a((function(n,o){var r,i=void 0===n?{}:n,u=i.refKey,s=void 0===u?\"ref\":u,c=i.ref,a=i.onKeyDown,l=i.onClick,d=i.preventKeyAction,p=void 0!==d&&d,f=e(i,[\"refKey\",\"ref\",\"onKeyDown\",\"onClick\",\"preventKeyAction\"]),m=(void 0===o?{}:o).suppressRefError;return w(\"getDropdownProps\",void 0!==m&&m,s,I),t(((r={})[s]=$e(c,(function(e){e&&(I.current=e)})),r),!p&&{onKeyDown:He(a,(function(e){var t=Je(e);t&&O[t]&&O[t](e)})),onClick:He(l,(function(){h({type:io})}))},f)}),[h,O,w]),addSelectedItem:a((function(e){h({type:uo,selectedItem:e})}),[h]),removeSelectedItem:a((function(e){h({type:so,selectedItem:e})}),[h]),setSelectedItems:a((function(e){h({type:co,selectedItems:e})}),[h]),setActiveIndex:a((function(e){h({type:ao,activeIndex:e})}),[h]),reset:a((function(){h({type:lo})}),[h]),selectedItems:v,activeIndex:g}}mo.stateChangeTypes=po;const ho=52;function go(e,t){return e.some((e=>f(e,t)))}const vo=e=>{let{disabled:t,highlightValue:n,itemProps:o,label:r,menuStyles:u,multiselect:s,selected:c}=e;const a=e=>{return i.createElement(\"span\",{className:u.highlighted,dangerouslySetInnerHTML:{__html:(t=e,t.replace(new RegExp(n,\"gi\"),(e=>`${e}`)))}});var t};return i.createElement(\"li\",Object.assign({},o,{\"aria-selected\":c},t&&{\"aria-disabled\":!0}),s?i.createElement(i.Fragment,null,i.createElement(\"span\",{className:u.checkbox,\"aria-hidden\":!0},i.createElement(h,null)),n?a(r):r):i.createElement(i.Fragment,null,n?a(r):r,c&&i.createElement(h,{className:u.selectedIcon})))},yo=e=>{let{getItemProps:t,highlightValue:n,isOptionDisabled:o,menuProps:r,menuStyles:u,multiselect:s,open:c,optionLabelField:a,optionKeyField:l,options:d,selectedItem:p,selectedItems:h,virtualizer:g}=e;const v=!!g,y=v?g.virtualItems:d;return i.createElement(\"ul\",Object.assign({},r,{className:m(u.menu)}),c&&i.createElement(i.Fragment,null,v&&i.createElement(\"li\",{key:\"total-size\",\"aria-hidden\":!0,style:{height:g.totalSize}}),y.map(((e,r)=>{let c=r,m=null;v&&(({index:c}=e),m=e);const g=d[c],y=g[a],I=g[l],_=s?go(h,g):f(p,g),b=\"function\"==typeof o&&o(g,c),E=t(g,c,_,b,m);return i.createElement(vo,{key:I,disabled:b,highlightValue:n,itemProps:E,menuStyles:u,multiselect:s,label:y,selected:_})}))))};export{ho as D,zn as a,yo as b,_n as c,go as g,mo as u};\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import e from\"react\";import{s as l}from\"./Icon.module-72af7a76.js\";const a=a=>{let{ariaLabel:r=\"cross-circle\",ariaLabelledby:o,ariaHidden:i=!0,className:s=\"\",color:t,size:c=\"s\",style:L={}}=a;return e.createElement(\"svg\",{className:[l.icon,l[c],s].filter((e=>e)).join(\" \"),role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",\"aria-label\":r,\"aria-labelledby\":o,\"aria-hidden\":i,color:t,style:L},e.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM15 7.5L16.5 9L13.5 12L16.5 15L15 16.5L12 13.5L9 16.5L7.5 15L10.5 12L7.5 9L9 7.5L12 10.5L15 7.5Z\",fill:\"currentColor\"}))};export{a as I};\n","import e,{useCallback as o,useEffect as r,useRef as t,useState as n}from\"react\";import{a,b as i,D as l}from\"./DropdownMenu-8f8b7b13.js\";import\"./base-4b9fb6d0.js\";import{s as c}from\"./style-inject.es-acdf7ad9.js\";import{F as d}from\"./FieldLabel-0e3fe396.js\";import{c as u}from\"./classNames-3b02355b.js\";import{I as s}from\"./IconCrossCircle-d56ba85f.js\";import{I as p}from\"./IconSearch-bb18ce4b.js\";import{L as h}from\"./LoadingSpinner-85e82987.js\";var _={input:\"SearchInput-module_input__Addns\",hidden:\"SearchInput-module_hidden__OcXmJ\",button:\"SearchInput-module_button__z7NIp search-input_hds-search-input__button__1-cj-\",wrapper:\"SearchInput-module_wrapper__114JK\",root:\"SearchInput-module_root__sMwrY\",open:\"SearchInput-module_open__1zeft\",angleIcon:\"SearchInput-module_angleIcon__1PdxN\",menu:\"SearchInput-module_menu__2P8CO\",loadingSpinnerContainer:\"SearchInput-module_loadingSpinnerContainer__T6ZTc\",menuItem:\"SearchInput-module_menuItem__zIC_d\",highlighted:\"SearchInput-module_highlighted__3D7Hh\",selected:\"SearchInput-module_selected__30K7a\",disabled:\"SearchInput-module_disabled__akdv5\",virtualized:\"SearchInput-module_virtualized__xRfea\",buttons:\"SearchInput-module_buttons__2O_2t search-input_hds-search-input__buttons__3PawT\",searchIcon:\"SearchInput-module_searchIcon__l1_S4\",noToggle:\"SearchInput-module_noToggle__2rf7Y\",helperText:\"SearchInput-module_helperText__2AWSL\",loadingSpinner:\"SearchInput-module_loadingSpinner__3G_76\"};c(\".search-input_hds-icon__5eCQs{--icon-size:100%;background-color:currentcolor;display:inline-block;height:var(--icon-size);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:auto;mask-size:auto;width:var(--icon-size)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-xs__JNXQQ{--icon-size:var(--spacing-layout-2-xs)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-s__1UrrH{--icon-size:var(--spacing-layout-xs)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-m__2xJqk{--icon-size:var(--spacing-layout-s)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-l__9ZoGz{--icon-size:var(--spacing-layout-m)}.search-input_hds-icon__5eCQs.search-input_hds-icon--size-xl__33Ryp{--icon-size:var(--spacing-layout-l)}.search-input_hds-icon--search__1OHPF{-webkit-mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1a8 8 0 11-4.798 14.402l-6.401 6.4-1.591-1.59 6.398-6.4A8 8 0 0115 1zm0 2a6 6 0 100 12 6 6 0 000-12z' fill='currentColor'/%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1a8 8 0 11-4.798 14.402l-6.401 6.4-1.591-1.59 6.398-6.4A8 8 0 0115 1zm0 2a6 6 0 100 12 6 6 0 000-12z' fill='currentColor'/%3E%3C/svg%3E\\\")}.search-input_hds-search-input__3yDGf{--border-width:2px;--outline-width:3px;--input-height:56px;--helper-color-default:var(--color-black-60);--input-background-default:var(--color-white);--input-border-color-default:var(--color-black-50);--input-border-color-hover:var(--color-black-90);--input-border-color-focus:var(--color-black-90);--input-color-default:var(--color-black-90);--label-color-default:var(--color-black-90)}.search-input_hds-search-input__label__2XXxI{color:var(--label-color-default);display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.search-input_hds-search-input__input-wrapper__2SHOr{display:flex;height:100%;position:relative}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908{-webkit-appearance:none;background-color:var(--input-background-default);border:var(--border-width) solid var(--input-border-color-default);box-sizing:border-box;color:var(--input-color-default);font-size:1.125em;height:var(--input-height);line-height:normal;padding:0 var(--spacing-s);width:100%}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908:hover{border-color:var(--input-border-color-hover);transition:border-color 85ms ease-out}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908:focus{border-color:var(--input-border-color-focus);outline:none}.search-input_hds-search-input__3yDGf .search-input_hds-search-input__input__3K908:not([readonly]):focus{outline:var(--outline-width) solid var(--color-focus-outline);transform:translateZ(0)}.search-input_hds-search-input__buttons__3PawT{align-items:center;bottom:0;display:flex;font-size:1rem;justify-content:center;margin-right:calc(var(--spacing-s) - var(--spacing-xs) / 2);position:absolute;right:0;top:0}.search-input_hds-search-input__button__1-cj-{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;color:var(--dropdown-color-default);cursor:pointer;display:flex;font:inherit;outline:none;padding:var(--spacing-xs) calc(var(--spacing-xs) / 2)}.search-input_hds-search-input__buttons__3PawT .search-input_hds-search-input__button__1-cj-:focus{outline:var(--outline-width) solid var(--color-focus-outline)}.search-input_hds-search-input__helper-text__25LCS{color:var(--helper-color-default);display:block;font-size:var(--fontsize-body-m);margin-top:var(--spacing-3-xs)}.SearchInput-module_button__z7NIp.SearchInput-module_hidden__OcXmJ,.SearchInput-module_input__Addns:not(:focus).SearchInput-module_hidden__OcXmJ{border:0;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.SearchInput-module_wrapper__114JK:focus-within{box-shadow:0 0 0 var(--focus-outline-width) var(--focus-outline-color)}.SearchInput-module_root__sMwrY{--border-width:2px;--divider-width:1px;--focus-outline-width:3px;--dropdown-height:var(--spacing-3-xl);--menu-item-height:calc(var(--dropdown-height) - var(--border-width) * 2);--icon-size:var(--spacing-m);--menu-z-index:10;--dropdown-background-default:var(--color-white);--dropdown-background-disabled:var(--color-black-10);--dropdown-border-color-default:var(--color-black-50);--dropdown-border-color-hover:var(--color-black-90);--dropdown-border-color-hover-invalid:var(--color-error-dark);--dropdown-border-color-focus:var(--color-black-90);--dropdown-border-color-invalid:var(--color-error);--dropdown-border-color-disabled:var(--color-black-10);--dropdown-color-default:var(--color-black-90);--dropdown-color-disabled:var(--color-black-40);--focus-outline-color:var(--color-coat-of-arms);--helper-color-invalid:var(--color-error);--menu-divider-color:var(--color-black-20);--menu-item-background-default:var(--color-white);--menu-item-background-hover:var(--color-bus);--menu-item-background-selected:var(--color-white);--menu-item-background-selected-hover:var(--color-bus);--menu-item-background-disabled:var(--color-white);--menu-item-color-default:var(--color-black-90);--menu-item-color-hover:var(--color-white);--menu-item-color-selected:var(--color-black-90);--menu-item-color-selected-hover:var(--color-white);--menu-item-color-disabled:var(--color-black-40);--menu-item-icon-color-selected:var(--color-white);--menu-item-icon-color-disabled:var(--color-black-40);--multiselect-checkbox-background-selected:var(--color-bus);--multiselect-checkbox-background-disabled:var(--color-black-10);--multiselect-checkbox-border-default:var(--color-black-50);--multiselect-checkbox-border-hover:var(--color-black-90);--multiselect-checkbox-border-disabled:var(--color-black-10);--multiselect-checkbox-color-default:transparent;--multiselect-checkbox-color-selected:var(--color-white);--multiselect-checkbox-color-selected-disabled:var(--color-white);--placeholder-color:var(--color-black-60);position:relative}.SearchInput-module_open__1zeft.SearchInput-module_root__sMwrY .SearchInput-module_angleIcon__1PdxN{transform:rotateX(180deg)}.SearchInput-module_open__1zeft.SearchInput-module_root__sMwrY .SearchInput-module_menu__2P8CO{display:block}.SearchInput-module_root__sMwrY input{font-family:inherit;margin:0;overflow:auto}.SearchInput-module_wrapper__114JK{background-color:var(--dropdown-background-default);border:var(--border-width) solid var(--dropdown-border-color-default);box-sizing:border-box;min-height:var(--dropdown-height);position:relative;width:100%}.SearchInput-module_wrapper__114JK:focus-within{border-color:var(--dropdown-border-color-focus)}.SearchInput-module_wrapper__114JK:hover{border-color:var(--dropdown-border-color-hover)}.SearchInput-module_wrapper__114JK:focus-within,.SearchInput-module_wrapper__114JK:hover{transition:border-color 85ms ease-out}.SearchInput-module_loadingSpinnerContainer__T6ZTc,.SearchInput-module_menu__2P8CO{border:solid var(--dropdown-border-color-focus);border-top-color:var(--menu-divider-color);border-width:var(--divider-width) var(--border-width) var(--border-width);bottom:0;display:none;left:0;list-style:none;margin:0;outline:none;overflow-y:auto;padding:0;position:absolute;transform:translate(calc(var(--border-width) * -1),100%);width:100%;z-index:var(--menu-z-index)}.SearchInput-module_menuItem__zIC_d{align-items:center;background-color:var(--menu-item-background-default);box-sizing:border-box;color:var(--menu-item-color-default);cursor:pointer;display:flex;font-size:var(--fontsize-body-l);justify-content:space-between;line-height:var(--lineheight-m);min-height:var(--menu-item-height);padding:var(--spacing-xs) var(--spacing-s)}.SearchInput-module_highlighted__3D7Hh.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-hover);color:var(--menu-item-color-hover)}.SearchInput-module_selected__30K7a.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-selected);color:var(--menu-item-color-selected)}.SearchInput-module_highlighted__3D7Hh.SearchInput-module_selected__30K7a.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-selected-hover);color:var(--menu-item-color-selected-hover)}.SearchInput-module_disabled__akdv5.SearchInput-module_menuItem__zIC_d{background-color:var(--menu-item-background-disabled);color:var(--menu-item-color-disabled);cursor:not-allowed}.SearchInput-module_virtualized__xRfea.SearchInput-module_menuItem__zIC_d{left:0;position:absolute;top:0;width:100%}.SearchInput-module_root__sMwrY{--helper-color-default:var(--color-black-60)}.SearchInput-module_wrapper__114JK{align-items:center;display:flex}.SearchInput-module_button__z7NIp{color:var(--dropdown-color-default)}.SearchInput-module_button__z7NIp:focus{outline:var(--focus-outline-width) solid var(--focus-outline-color)}.SearchInput-module_searchIcon__l1_S4{color:var(--dropdown-color-default);display:flex}.SearchInput-module_input__Addns{align-self:stretch;appearance:none;background-color:var(--input-background-default);border:none;box-sizing:border-box;color:var(--input-color-default);font-size:var(--fontsize-body-l);height:var(--menu-item-height);outline:none;padding:0 calc(var(--spacing-l) + var(--icon-size)) 0 0;width:100%}.SearchInput-module_input__Addns:first-child{padding-left:var(--spacing-s)}.SearchInput-module_input__Addns.SearchInput-module_noToggle__2rf7Y{padding-right:var(--spacing-s)}.SearchInput-module_input__Addns::placeholder{color:var(--placeholder-color);line-height:normal}.SearchInput-module_input__Addns:disabled::placeholder{color:var(--dropdown-color-disabled)}.SearchInput-module_menuItem__zIC_d .SearchInput-module_highlighted__3D7Hh{font-weight:700}.SearchInput-module_menuItem__zIC_d .SearchInput-module_highlighted__3D7Hh mark{background:none;color:inherit;font-weight:400}.SearchInput-module_helperText__2AWSL{color:var(--helper-color-default);display:block;font-size:var(--fontsize-body-m);margin-top:var(--spacing-3-xs)}.SearchInput-module_loadingSpinnerContainer__T6ZTc{align-items:center;background-color:var(--menu-item-background-default);display:flex;flex-direction:column;padding:var(--spacing-m) 0;text-align:center}.SearchInput-module_loadingSpinner__3G_76{margin-bottom:var(--spacing-2-xs)}\");class m extends Error{}const b=(e,a,i)=>{const l=t(i),[c,d]=n(!1),u=t((()=>null)),[s,p]=n([]),h=o((()=>{p([]),d(!1),u.current()}),[p,u]);return r((()=>()=>{u.current()}),[u]),r((()=>{l.current=i}),[i]),((e,t,n)=>{const a=o(e,n);r((()=>{const e=setTimeout((()=>{a()}),t);return()=>{clearTimeout(e)}}),[a,t])})((()=>{if(\"function\"!=typeof a||!0===l.current)return;if(d(!0),u.current(),0===e.length)return d(!1),void p([]);const{promise:o,cancel:r}=(e=>{let o=!1;return{promise:new Promise(((r,t)=>{e.then((e=>{if(o)throw new m;r(e)})).catch((e=>{e instanceof m||t(e)}))})),cancel:()=>{o=!0}}})(a(e));u.current=r,o.then((e=>{d(!1),Array.isArray(e)&&\"function\"==typeof p&&!1===l.current&&p(e)}))}),200,[e,a,p]),{suggestions:s,isLoading:!l.current&&c,clearSuggestions:h}},g=o=>{let{className:c,clearButtonAriaLabel:m=\"Clear\",getSuggestions:g,helperText:v,highlightSuggestions:f=!1,label:w,loadingSpinnerFinishedText:I=\"Finished loading suggestions\",loadingSpinnerText:S=\"Loading suggestions\",onSubmit:k,placeholder:x,searchButtonAriaLabel:y=\"Search\",hideSearchButton:z=!1,style:C,suggestionKeyField:T,suggestionLabelField:E,visibleSuggestions:K=8,onChange:N,value:D}=o;const j=t(!1),P=t(null),A=\"userEnterKeyAction\",[L,O]=n(void 0),[J,F]=n(\"\"),H=D||J,M=()=>L===a.stateChangeTypes.InputKeyDownEnter,{suggestions:G,isLoading:Q,clearSuggestions:Y}=b(H,g,L===a.stateChangeTypes.ItemClick||L===A||M()),X=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;const[a,i]=n(!1),l=t(null);return r((()=>(clearTimeout(l.current),e?l.current=setTimeout((()=>{i(!0)}),o):i(!1),()=>{clearTimeout(l.current)})),[e,o,i]),a}(Q,1300),B=void 0!==D&&N,Z=e=>{B?N(e):F(e)},R=e=>{var o;const r=null===(o=P.current)||void 0===o?void 0:o.value;k(void 0!==e?e:r),Y()},{isOpen:V,getLabelProps:$,getMenuProps:U,getInputProps:W,getComboboxProps:q,highlightedIndex:ee,getItemProps:oe,reset:re}=a(Object.assign({items:G,onStateChange(e){var o;const{ItemClick:r,FunctionReset:t,InputKeyDownEnter:n}=a.stateChangeTypes;if([r,t,n].includes(e.type)){const n=e.type===r&&void 0===e.inputValue,a=n?null===(o=P.current)||void 0===o?void 0:o.value:e.inputValue;if(void 0===a)return;n||Z(a),e.type!==t&&R(a),O(e.type)}else O(void 0)},itemToString:e=>e?`${e[E]}`:\"\"},B&&{inputValue:H}));return r((()=>{j.current?N&&void 0===D&&N(H):j.current=!0}),[N,H]),e.createElement(\"div\",{className:u(_.root,V&&_.open,c),style:C},w&&e.createElement(d,Object.assign({label:w},$())),e.createElement(\"div\",{className:u(_.wrapper),ref:q().ref},e.createElement(\"input\",Object.assign({},W({onKeyUp:e=>{const o=e.key||e.keyCode,r=\"Enter\"===o||13===o;!M()&&r&&R(),O(r?A:void 0)},onKeyDown:e=>{V&&G.length||\"Home\"!==e.key&&\"End\"!==e.key||(e.nativeEvent.preventDownshiftDefault=!0)},onChange:e=>{Z(e.target.value)},ref:P,role:q().role,\"aria-expanded\":q()[\"aria-expanded\"],\"aria-haspopup\":q()[\"aria-haspopup\"],\"aria-owns\":q()[\"aria-owns\"]}),{className:u(_.input),placeholder:x,enterKeyHint:\"search\"})),e.createElement(\"div\",{className:_.buttons},H.length>0&&e.createElement(\"button\",{type:\"button\",\"aria-label\":m,className:u(_.button),onClick:()=>{re(),P.current.focus(),Y()}},e.createElement(s,{className:_.searchIcon,\"aria-hidden\":!0})),!z&&e.createElement(\"button\",{type:\"button\",\"aria-label\":y,className:u(_.button),onClick:()=>R()},e.createElement(p,{className:_.searchIcon,\"aria-hidden\":!0}))),X&&e.createElement(\"div\",{className:_.loadingSpinnerContainer,\"aria-hidden\":!0},e.createElement(h,{loadingText:S,loadingFinishedText:I,small:!0,className:_.loadingSpinner}),S),e.createElement(i,{isOptionDisabled:()=>!1,multiselect:!1,open:V&&!X,selectedItem:null,selectedItems:[],highlightValue:f&&H.length>=3&&H,menuStyles:_,options:G,optionKeyField:`${String(T||E)}`,optionLabelField:`${String(E)}`,menuProps:U({style:{maxHeight:l*K}}),getItemProps:(e,o,r,t)=>oe({item:e,index:o,disabled:t,className:u(_.menuItem,r&&_.selected,ee===o&&_.highlighted)})})),v&&e.createElement(\"div\",{className:_.helperText},v))};export{g as S};\n","/** @license React v17.0.1\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","/** @license React v17.0.1\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\n\nvar _require2 = require('util'),\n inspect = _require2.inspect;\n\nvar custom = inspect && inspect.custom || 'inspect';\n\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n\n while (p = p.next) {\n ret += s + p.data;\n }\n\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n\n return ret;\n } // Consumes a specified amount of bytes or characters from the buffered data.\n\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n } // Consumes a specified amount of characters from the buffered data.\n\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Consumes a specified amount of bytes from the buffered data.\n\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Make sure the linked list only shows the minimal necessary information.\n\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread({}, options, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n\n return BufferList;\n}();","'use strict';\n\nvar _Object$setPrototypeO;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar finished = require('./end-of-stream');\n\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\n\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\n\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n\n if (resolve !== null) {\n var data = iter[kStream].read(); // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\n\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\n\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\n\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n\n next: function next() {\n var _this = this;\n\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n\n if (error !== null) {\n return Promise.reject(error);\n }\n\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n } // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n\n\n var lastPromise = this[kLastPromise];\n var promise;\n\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n\n promise = new Promise(this[kHandlePromise]);\n }\n\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\n\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n\n iterator[kError] = err;\n return;\n }\n\n var resolve = iterator[kLastResolve];\n\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\n\nmodule.exports = createReadableStreamAsyncIterator;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\nrequire('inherits')(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar eos;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\n\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\n\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true; // request.destroy just do .end - .abort is what we want\n\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\n\nfunction call(fn) {\n fn();\n}\n\nfunction pipe(from, to) {\n return from.pipe(to);\n}\n\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\n\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\n\nmodule.exports = pipeline;","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha, Hash)\n\nSha.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Sha256 = require('./sha256')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(64)\n\nfunction Sha224 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha224, Sha256)\n\nSha224.prototype.init = function () {\n this._a = 0xc1059ed8\n this._b = 0x367cd507\n this._c = 0x3070dd17\n this._d = 0xf70e5939\n this._e = 0xffc00b31\n this._f = 0x68581511\n this._g = 0x64f98fa7\n this._h = 0xbefa4fa4\n\n return this\n}\n\nSha224.prototype._hash = function () {\n var H = Buffer.allocUnsafe(28)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n\n return H\n}\n\nmodule.exports = Sha224\n","var inherits = require('inherits')\nvar SHA512 = require('./sha512')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(160)\n\nfunction Sha384 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha384, SHA512)\n\nSha384.prototype.init = function () {\n this._ah = 0xcbbb9d5d\n this._bh = 0x629a292a\n this._ch = 0x9159015a\n this._dh = 0x152fecd8\n this._eh = 0x67332667\n this._fh = 0x8eb44a87\n this._gh = 0xdb0c2e0d\n this._hh = 0x47b5481d\n\n this._al = 0xc1059ed8\n this._bl = 0x367cd507\n this._cl = 0x3070dd17\n this._dl = 0xf70e5939\n this._el = 0xffc00b31\n this._fl = 0x68581511\n this._gl = 0x64f98fa7\n this._hl = 0xbefa4fa4\n\n return this\n}\n\nSha384.prototype._hash = function () {\n var H = Buffer.allocUnsafe(48)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n\n return H\n}\n\nmodule.exports = Sha384\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file diff --git a/docs/mobile-menu-react/index.html b/docs/mobile-menu-react/index.html new file mode 100644 index 00000000000..bcdda66f3d5 --- /dev/null +++ b/docs/mobile-menu-react/index.html @@ -0,0 +1,59 @@ +Webpack App
\ No newline at end of file diff --git a/docs/mobile-menu-react/main.4ef22571d9308a1e496e.manager.bundle.js b/docs/mobile-menu-react/main.4ef22571d9308a1e496e.manager.bundle.js new file mode 100644 index 00000000000..833cdfb31be --- /dev/null +++ b/docs/mobile-menu-react/main.4ef22571d9308a1e496e.manager.bundle.js @@ -0,0 +1 @@ +(self.webpackChunkhds_react=self.webpackChunkhds_react||[]).push([[179],{53260:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[709],(()=>(__webpack_exec__(1695),__webpack_exec__(21863),__webpack_exec__(58300),__webpack_exec__(71947),__webpack_exec__(22755),__webpack_exec__(30180),__webpack_exec__(57821),__webpack_exec__(34583),__webpack_exec__(77555))));__webpack_require__.O()}]); \ No newline at end of file diff --git a/docs/mobile-menu-react/main.cc630355.iframe.bundle.js b/docs/mobile-menu-react/main.cc630355.iframe.bundle.js new file mode 100644 index 00000000000..43f4b839007 --- /dev/null +++ b/docs/mobile-menu-react/main.cc630355.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunkhds_react=self.webpackChunkhds_react||[]).push([[179],{"./src/components/accordion/Accordion.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CardAccordion:()=>CardAccordion,CustomAccordion:()=>CustomAccordion,CustomTheme:()=>CustomTheme,Default:()=>Default,InitiallyOpen:()=>InitiallyOpen,Large:()=>Large,Medium:()=>Medium,Small:()=>Small,StackedAccordionCards:()=>StackedAccordionCards,WithoutCloseButton:()=>WithoutCloseButton,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_icons__WEBPACK_IMPORTED_MODULE_5__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/icons/IconAngleUp.tsx")),_icons__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/icons/IconAngleDown.tsx"),_button__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/button/Button.tsx"),_card__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/components/card/Card.tsx"),_dropdown_select__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/components/dropdown/select/Select.tsx"),_Accordion__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/accordion/Accordion.tsx"),_useAccordion__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/accordion/useAccordion.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,title:"Components/Accordion",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"480px"},children:storyFn()})}],parameters:{storySource:{source:"import React from 'react';\n\nimport { IconAngleDown, IconAngleUp } from '../../icons';\nimport { Button } from '../button';\nimport { Card } from '../card';\nimport { Select } from '../dropdown/select';\nimport { Accordion } from './Accordion';\nimport { useAccordion } from './useAccordion';\n\nexport default {\n component: Accordion,\n title: 'Components/Accordion',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { hideNoControlsWarning: true },\n },\n args: {\n heading: 'How to publish data?',\n language: 'en',\n children: 'To publish your data, open your profile settings and click button \"Publish\".',\n style: { maxWidth: '360px' },\n },\n};\n\nexport const Default = (args) => ;\n\nexport const Small = (args) => ;\n\nexport const Medium = (args) => ;\n\nexport const Large = (args) => ;\n\nexport const WithoutCloseButton = (args) => ;\nWithoutCloseButton.storyName = 'Without close button';\n\nexport const StackedAccordionCards = (args) => (\n <>\n

Stacked Accordions in Cards

\n \n \n \n \n);\n\nStackedAccordionCards.storyName = 'Stacked cards';\n\nexport const InitiallyOpen = (args) => ;\nInitiallyOpen.storyName = 'Initially open';\n\nexport const CardAccordion = (args) => (\n <>\n

Card

\n \n

Small card with border

\n \n

Medium card with border

\n \n

Large card with border

\n \n \n);\nCardAccordion.storyName = 'Card';\nCardAccordion.args = {\n style: { marginBottom: 'var(--spacing-m)', maxWidth: '360px' },\n};\n\nexport const CustomTheme = (args) => (\n <>\n \n \n \n);\nCustomTheme.storyName = 'Custom theme';\nCustomTheme.args = {\n style: { marginBottom: 'var(--spacing-m)', maxWidth: '480px' },\n};\n\nexport const CustomAccordion = () => {\n const { isOpen, buttonProps, contentProps } = useAccordion({ initiallyOpen: false });\n const icon = isOpen ? : ;\n return (\n <>\n \n \n \n \n \n \n );\n};\nCustomAccordion.storyName = 'Custom accordion';\nCustomAccordion.args = {};\n",locationsMap:{default:{startLoc:{col:23,line:25},endLoc:{col:56,line:25},startBody:{col:23,line:25},endBody:{col:56,line:25}},small:{startLoc:{col:21,line:27},endLoc:{col:63,line:27},startBody:{col:21,line:27},endBody:{col:63,line:27}},medium:{startLoc:{col:22,line:29},endLoc:{col:64,line:29},startBody:{col:22,line:29},endBody:{col:64,line:29}},large:{startLoc:{col:21,line:31},endLoc:{col:63,line:31},startBody:{col:21,line:31},endBody:{col:63,line:31}},"without-close-button":{startLoc:{col:34,line:33},endLoc:{col:87,line:33},startBody:{col:34,line:33},endBody:{col:87,line:33}},"stacked-accordion-cards":{startLoc:{col:37,line:36},endLoc:{col:1,line:43},startBody:{col:37,line:36},endBody:{col:1,line:43}},"initially-open":{startLoc:{col:29,line:47},endLoc:{col:76,line:47},startBody:{col:29,line:47},endBody:{col:76,line:47}},"card-accordion":{startLoc:{col:29,line:50},endLoc:{col:1,line:61},startBody:{col:29,line:50},endBody:{col:1,line:61}},"custom-theme":{startLoc:{col:27,line:67},endLoc:{col:1,line:111},startBody:{col:27,line:67},endBody:{col:1,line:111}},"custom-accordion":{startLoc:{col:31,line:117},endLoc:{col:1,line:155},startBody:{col:31,line:117},endBody:{col:1,line:155}}}},controls:{hideNoControlsWarning:!0}},args:{heading:"How to publish data?",language:"en",children:'To publish your data, open your profile settings and click button "Publish".',style:{maxWidth:"360px"}}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))},Small=function Small(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{size:"s"}))},Medium=function Medium(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{size:"m"}))},Large=function Large(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{size:"l"}))},WithoutCloseButton=function WithoutCloseButton(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{closeButton:!1}))};WithoutCloseButton.storyName="Without close button";var StackedAccordionCards=function StackedAccordionCards(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h1",{children:"Stacked Accordions in Cards"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,style:{maxWidth:"360px"}})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,style:{maxWidth:"360px",borderTop:0}})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,style:{maxWidth:"360px",borderTop:0}}))]})};StackedAccordionCards.storyName="Stacked cards";var InitiallyOpen=function InitiallyOpen(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{initiallyOpen:!0}))};InitiallyOpen.storyName="Initially open";var CardAccordion=function CardAccordion(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2",{children:"Card"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2",{children:"Small card with border"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,size:"s"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2",{children:"Medium card with border"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,size:"m"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2",{children:"Large card with border"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,size:"l"}))]})};CardAccordion.storyName="Card",CardAccordion.args={style:{marginBottom:"var(--spacing-m)",maxWidth:"360px"}};var CustomTheme=function CustomTheme(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,border:!0,theme:{"--background-color":"var(--color-white)","--border-color":"var(--color-brick)","--padding-horizontal":"var(--spacing-m)","--padding-vertical":"var(--spacing-m)","--header-font-color":"var(--color-black-90)","--header-font-size":"var(--fontsize-heading-l)","--header-font-weight":"400","--header-line-height":"var(--lineheight-s)","--header-letter-spacing":"-0.4px","--button-size":"28px","--button-border-color-hover":"var(--color-coat-of-arms)","--content-font-color":"var(--color-black-90)","--content-font-size":"var(--fontsize-body-m)","--content-line-height":"var(--lineheight-l)"}})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Accordion__WEBPACK_IMPORTED_MODULE_2__.U,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{card:!0,style:{maxWidth:"360px",marginTop:"var(--spacing-s)"},theme:{"--background-color":"var(--color-bus)","--padding-horizontal":"var(--spacing-m)","--padding-vertical":"20px","--header-font-color":"var(--color-white)","--header-font-size":"var(--fontsize-heading-s)","--header-font-weight":"500","--header-letter-spacing":"0.2px","--header-line-height":"1.4","--button-size":"28px","--button-border-color-hover":"var(--color-white)","--content-font-color":"var(--color-white)","--content-font-size":"var(--fontsize-body-m)","--content-line-height":"var(--lineheight-l)"}}))]})};CustomTheme.storyName="Custom theme",CustomTheme.args={style:{marginBottom:"var(--spacing-m)",maxWidth:"480px"}};var CustomAccordion=function CustomAccordion(){var _useAccordion=(0,_useAccordion__WEBPACK_IMPORTED_MODULE_4__.A)({initiallyOpen:!1}),isOpen=_useAccordion.isOpen,buttonProps=_useAccordion.buttonProps,contentProps=_useAccordion.contentProps,icon=isOpen?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_5__.IconAngleUp,{"aria-hidden":!0}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_6__.IconAngleDown,{"aria-hidden":!0});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_7__.z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({iconLeft:icon},buttonProps),{},{children:"Advanced filters"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_card__WEBPACK_IMPORTED_MODULE_8__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({border:!0,"aria-label":"Advanced filters",style:{marginTop:"var(--spacing-m)"}},contentProps),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_dropdown_select__WEBPACK_IMPORTED_MODULE_9__.Ph,{multiselect:!0,label:"Filter by event category",placeholder:"No selected categories",options:[{label:"Culture & arts"},{label:"Sports"},{label:"Museums"},{label:"Music"}],clearButtonAriaLabel:"Clear all selections",selectedItemRemoveButtonAriaLabel:"Remove"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_dropdown_select__WEBPACK_IMPORTED_MODULE_9__.Ph,{multiselect:!0,label:"Filter by event location",placeholder:"No selected locations",options:[{label:"Haaga"},{label:"Herttoniemi"},{label:"Kallio"},{label:"Kamppi"},{label:"Laajasalo"},{label:"Lauttasaari"},{label:"Mellunkylä"},{label:"Pasila"}],clearButtonAriaLabel:"Clear all selections",selectedItemRemoveButtonAriaLabel:"Remove",style:{marginTop:"var(--spacing-s)"}})]}))]})};CustomAccordion.storyName="Custom accordion",CustomAccordion.args={},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Default.parameters),Small.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => '}},Small.parameters),Medium.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => '}},Medium.parameters),Large.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => '}},Large.parameters),WithoutCloseButton.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},WithoutCloseButton.parameters),StackedAccordionCards.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => (\n <>\n

Stacked Accordions in Cards

\n \n \n \n \n)"}},StackedAccordionCards.parameters),InitiallyOpen.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},InitiallyOpen.parameters),CardAccordion.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => (\n <>\n

Card

\n \n

Small card with border

\n \n

Medium card with border

\n \n

Large card with border

\n \n \n)'}},CardAccordion.parameters),CustomTheme.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => (\n <>\n \n \n \n)"}},CustomTheme.parameters),CustomAccordion.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"() => {\n const { isOpen, buttonProps, contentProps } = useAccordion({ initiallyOpen: false });\n const icon = isOpen ? : ;\n return (\n <>\n \n \n \n \n \n \n );\n}"}},CustomAccordion.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/accordion/Accordion.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Small.displayName="Small",Small.__docgenInfo={description:"",displayName:"Small",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#Small"]={docgenInfo:Small.__docgenInfo,name:"Small",path:"src/components/accordion/Accordion.stories.tsx#Small"})}catch(__react_docgen_typescript_loader_error){}try{Medium.displayName="Medium",Medium.__docgenInfo={description:"",displayName:"Medium",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#Medium"]={docgenInfo:Medium.__docgenInfo,name:"Medium",path:"src/components/accordion/Accordion.stories.tsx#Medium"})}catch(__react_docgen_typescript_loader_error){}try{Large.displayName="Large",Large.__docgenInfo={description:"",displayName:"Large",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#Large"]={docgenInfo:Large.__docgenInfo,name:"Large",path:"src/components/accordion/Accordion.stories.tsx#Large"})}catch(__react_docgen_typescript_loader_error){}try{WithoutCloseButton.displayName="WithoutCloseButton",WithoutCloseButton.__docgenInfo={description:"",displayName:"WithoutCloseButton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#WithoutCloseButton"]={docgenInfo:WithoutCloseButton.__docgenInfo,name:"WithoutCloseButton",path:"src/components/accordion/Accordion.stories.tsx#WithoutCloseButton"})}catch(__react_docgen_typescript_loader_error){}try{StackedAccordionCards.displayName="StackedAccordionCards",StackedAccordionCards.__docgenInfo={description:"",displayName:"StackedAccordionCards",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#StackedAccordionCards"]={docgenInfo:StackedAccordionCards.__docgenInfo,name:"StackedAccordionCards",path:"src/components/accordion/Accordion.stories.tsx#StackedAccordionCards"})}catch(__react_docgen_typescript_loader_error){}try{InitiallyOpen.displayName="InitiallyOpen",InitiallyOpen.__docgenInfo={description:"",displayName:"InitiallyOpen",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#InitiallyOpen"]={docgenInfo:InitiallyOpen.__docgenInfo,name:"InitiallyOpen",path:"src/components/accordion/Accordion.stories.tsx#InitiallyOpen"})}catch(__react_docgen_typescript_loader_error){}try{CardAccordion.displayName="CardAccordion",CardAccordion.__docgenInfo={description:"",displayName:"CardAccordion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#CardAccordion"]={docgenInfo:CardAccordion.__docgenInfo,name:"CardAccordion",path:"src/components/accordion/Accordion.stories.tsx#CardAccordion"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accordion/Accordion.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/accordion/Accordion.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/breadcrumb/Breadcrumb.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Example:()=>Example,ExampleInHeader:()=>ExampleInHeader,LastItemIsLink:()=>LastItemIsLink,WithCustomTheme:()=>WithCustomTheme,default:()=>Breadcrumb_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react=__webpack_require__("../../node_modules/react/index.js"),Header=__webpack_require__("./src/components/header/Header.tsx");__webpack_require__("./src/styles/base.css");const Breadcrumb_module_breadcrumb="Breadcrumb_breadcrumb__NEAtt breadcrumb_hds-breadcrumb__BNF6h",Breadcrumb_module_list="Breadcrumb_list__pqona breadcrumb_hds-breadcrumb__list__nNYQO",Breadcrumb_module_mobileList="Breadcrumb_mobileList__SHEas breadcrumb_hds-breadcrumb__list--mobile__2nBYy",Breadcrumb_module_desktopList="Breadcrumb_desktopList__cTrSq breadcrumb_hds-breadcrumb__list--desktop__qOClY",Breadcrumb_module_listItem="Breadcrumb_listItem__PEj7D breadcrumb_hds-breadcrumb__list-item__sW6ea",Breadcrumb_module_activeListItem="Breadcrumb_activeListItem__KFhJD breadcrumb_hds-breadcrumb__list-item--active__1MDtT",Breadcrumb_module_link="Breadcrumb_link__xYu7s breadcrumb_hds-breadcrumb__link__fQvLu",Breadcrumb_module_backArrow="Breadcrumb_backArrow__YGO5y breadcrumb_hds-breadcrumb__back-arrow__O69Ux",Breadcrumb_module_separator="Breadcrumb_separator__CX0dM breadcrumb_hds-breadcrumb__separator__7os0V";var Link=__webpack_require__("./src/components/link/Link.tsx"),IconAngleRight=__webpack_require__("./src/icons/IconAngleRight.tsx"),IconAngleLeft=__webpack_require__("./src/icons/IconAngleLeft.tsx"),classNames=__webpack_require__("./src/utils/classNames.ts"),useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),LinkItem=function LinkItem(_ref){var item=_ref.item;return(0,jsx_runtime.jsx)(Link.r,{href:item.path,className:Breadcrumb_module_link,children:item.title})},Separator=function Separator(_ref2){var _ref2$direction=_ref2.direction,isRightArrow="right"===(void 0===_ref2$direction?"right":_ref2$direction),IconComponent=isRightArrow?IconAngleRight.IconAngleRight:IconAngleLeft.IconAngleLeft,classList=isRightArrow?Breadcrumb_module_separator:Breadcrumb_module_backArrow,size=isRightArrow?"xs":"s";return(0,jsx_runtime.jsx)("span",{className:classList,"aria-hidden":!0,children:(0,jsx_runtime.jsx)(IconComponent,{size})})},BreadcrumbItem=function BreadcrumbItem(_ref3){var item=_ref3.item,showSeparator=_ref3.showSeparator,hasPath=null!==item.path;return(0,jsx_runtime.jsxs)("li",{className:Breadcrumb_module_listItem,children:[hasPath?(0,jsx_runtime.jsx)(LinkItem,{item}):(0,jsx_runtime.jsx)("span",{"aria-current":!0,className:Breadcrumb_module_activeListItem,children:item.title}),showSeparator&&(0,jsx_runtime.jsx)(Separator,{},"separator-".concat(item.title))]})},MobileView=function MobileView(_ref4){var item=_ref4.item;return(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Breadcrumb_module_list,Breadcrumb_module_mobileList),children:[(0,jsx_runtime.jsx)(Separator,{direction:"left"}),(0,jsx_runtime.jsx)(LinkItem,{item})]})},DesktopListView=function DesktopListView(_ref5){var list=_ref5.list;return(0,jsx_runtime.jsx)("ol",{className:(0,classNames.Z)(Breadcrumb_module_list,Breadcrumb_module_desktopList),children:list.map((function(item,index){return(0,jsx_runtime.jsx)(react.Fragment,{children:(0,jsx_runtime.jsx)(BreadcrumbItem,{item,showSeparator:index element",name:"ariaLabel",required:!0,type:{name:"string"}},list:{defaultValue:null,description:"Array of items that should be shown in the breadcrumb.",name:"list",required:!0,type:{name:"BreadcrumbListItem[]"}},theme:{defaultValue:null,description:"Custom theme styles",name:"theme",required:!1,type:{name:"BreadcrumbCustomTheme"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/breadcrumb/Breadcrumb.tsx#Breadcrumb"]={docgenInfo:Breadcrumb.__docgenInfo,name:"Breadcrumb",path:"src/components/breadcrumb/Breadcrumb.tsx#Breadcrumb"})}catch(__react_docgen_typescript_loader_error){}const Breadcrumb_stories={component:Breadcrumb,title:"Components/Breadcrumb",parameters:{storySource:{source:"import React from 'react';\n\nimport { Header } from '../header/Header';\nimport { Breadcrumb } from './Breadcrumb';\nimport { Link } from '../link';\nimport { LanguageOption } from '../header/LanguageContext';\n\nexport default {\n component: Breadcrumb,\n title: 'Components/Breadcrumb',\n parameters: {\n controls: { expanded: true },\n },\n args: {\n ariaLabel: 'Breadcrumb',\n list: [\n { title: 'Front page', path: '/' },\n { title: 'Health and social services', path: '/path' },\n { title: 'Senior services ', path: '/path/2ndLevelPath' },\n { title: 'Informal care', path: '/path/2ndLevelPath/3rdLevelPath' },\n { title: 'Care options', path: null },\n ],\n },\n};\n\nconst languages: LanguageOption[] = [\n { label: 'Suomi', value: 'fi' },\n { label: 'Svenska', value: 'sv' },\n { label: 'English', value: 'en' },\n];\n\nexport const Example = (args) => ;\n\nexport const ExampleInHeader = (args) => {\n return (\n
\n \n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n \n \n event.preventDefault()}\n active\n dropdownLinks={[\n ,\n ,\n ,\n ]}\n />,\n ,\n ,\n ]}\n />,\n ]}\n />\n \n \n \n
\n );\n};\n\nExampleInHeader.storyName = 'Breadcrumb in header';\n\nexport const LastItemIsLink = (args) => (\n \n);\n\nLastItemIsLink.storyName = 'Last item a link';\n\nexport const WithCustomTheme = (args) => (\n \n);\n\nWithCustomTheme.storyName = 'With custom theme';\n",locationsMap:{example:{startLoc:{col:23,line:32},endLoc:{col:57,line:32},startBody:{col:23,line:32},endBody:{col:57,line:32}},"example-in-header":{startLoc:{col:31,line:34},endLoc:{col:1,line:97},startBody:{col:31,line:34},endBody:{col:1,line:97}},"last-item-is-link":{startLoc:{col:30,line:101},endLoc:{col:1,line:112},startBody:{col:30,line:101},endBody:{col:1,line:112}},"with-custom-theme":{startLoc:{col:31,line:116},endLoc:{col:1,line:126},startBody:{col:31,line:116},endBody:{col:1,line:126}}}},controls:{expanded:!0}},args:{ariaLabel:"Breadcrumb",list:[{title:"Front page",path:"/"},{title:"Health and social services",path:"/path"},{title:"Senior services ",path:"/path/2ndLevelPath"},{title:"Informal care",path:"/path/2ndLevelPath/3rdLevelPath"},{title:"Care options",path:null}]}};var languages=[{label:"Suomi",value:"fi"},{label:"Svenska",value:"sv"},{label:"English",value:"en"}],Example=function Example(args){return(0,jsx_runtime.jsx)(Breadcrumb,(0,objectSpread2.Z)({},args))},ExampleInHeader=function ExampleInHeader(args){return(0,jsx_runtime.jsxs)(Header.h,{children:[(0,jsx_runtime.jsx)(Header.h.UniversalBar,{primaryLinkText:"Helsingin kaupunki",primaryLinkHref:"#"}),(0,jsx_runtime.jsx)(Header.h.ActionBar,{title:"Helsingin kaupunki",titleAriaLabel:"Helsingin kaupunki",titleUrl:"https://hel.fi",titleStyle:Header.h.TitleStyleType.normal,logoAriaLabel:"Service logo",logoUrl:"https://hel.fi",menuButtonAriaLabel:"Menu",children:(0,jsx_runtime.jsxs)(Header.h.LanguageSelector,{languages,ariaLabel:"Kielen valinta",children:[(0,jsx_runtime.jsx)("h3",{children:"Tietoa muilla kielillä"}),(0,jsx_runtime.jsx)(Link.r,{external:!0,href:"www.example.com",children:"Selkosuomi"}),(0,jsx_runtime.jsx)(Link.r,{external:!0,href:"www.example.com",children:"Viittomakieli"})]})}),(0,jsx_runtime.jsxs)(Header.h.NavigationMenu,{children:[(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Health and social services",onClick:function onClick(event){return event.preventDefault()},active:!0,dropdownLinks:[(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Senior services",active:!0,dropdownLinks:[(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Informal care",active:!0}),(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Senior centres"}),(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Home care"})]}),(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Data and the rights of the client",dropdownLinks:[(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Requesting client data"}),(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Fees"})]})]}),(0,jsx_runtime.jsx)(Header.h.Link,{href:"#",label:"Child and family services"})]}),(0,jsx_runtime.jsx)(Breadcrumb,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{theme:{"--horizontal-margin-small":"0","--horizontal-margin-medium":"var(--spacing-m)","--horizontal-margin-large":"var(--spacing-xs)","--horizontal-margin-x-large":"var(--spacing-xs)"}}))]})};ExampleInHeader.storyName="Breadcrumb in header";var LastItemIsLink=function LastItemIsLink(args){return(0,jsx_runtime.jsx)(Breadcrumb,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{list:[{title:"Front page",path:"/"},{title:"Health and social services",path:"/path"},{title:"Senior services ",path:"/path/2ndLevelPath"},{title:"Informal care",path:"/path/2ndLevelPath/3rdLevelPath"},{title:"Care options",path:"/path/2ndLevelPath/3rdLevelPath/currentPage"}]}))};LastItemIsLink.storyName="Last item a link";var WithCustomTheme=function WithCustomTheme(args){return(0,jsx_runtime.jsx)(Breadcrumb,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{theme:{"--horizontal-margin-small":"var(--spacing-layout-s)","--horizontal-margin-medium":"var(--spacing-layout-m)","--horizontal-margin-large":"var(--spacing-layout-l)","--horizontal-margin-x-large":"var(--spacing-layout-xl)"}}))};WithCustomTheme.storyName="With custom theme",Example.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},Example.parameters),ExampleInHeader.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n \n \n event.preventDefault()}\n active\n dropdownLinks={[\n ,\n ,\n ,\n ]}\n />,\n ,\n ,\n ]}\n />,\n ]}\n />\n \n \n \n
\n );\n}'}},ExampleInHeader.parameters),LastItemIsLink.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => (\n \n)"}},LastItemIsLink.parameters),WithCustomTheme.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => (\n \n)"}},WithCustomTheme.parameters);try{Example.displayName="Example",Example.__docgenInfo={description:"",displayName:"Example",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/breadcrumb/Breadcrumb.stories.tsx#Example"]={docgenInfo:Example.__docgenInfo,name:"Example",path:"src/components/breadcrumb/Breadcrumb.stories.tsx#Example"})}catch(__react_docgen_typescript_loader_error){}try{ExampleInHeader.displayName="ExampleInHeader",ExampleInHeader.__docgenInfo={description:"",displayName:"ExampleInHeader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/breadcrumb/Breadcrumb.stories.tsx#ExampleInHeader"]={docgenInfo:ExampleInHeader.__docgenInfo,name:"ExampleInHeader",path:"src/components/breadcrumb/Breadcrumb.stories.tsx#ExampleInHeader"})}catch(__react_docgen_typescript_loader_error){}try{LastItemIsLink.displayName="LastItemIsLink",LastItemIsLink.__docgenInfo={description:"",displayName:"LastItemIsLink",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/breadcrumb/Breadcrumb.stories.tsx#LastItemIsLink"]={docgenInfo:LastItemIsLink.__docgenInfo,name:"LastItemIsLink",path:"src/components/breadcrumb/Breadcrumb.stories.tsx#LastItemIsLink"})}catch(__react_docgen_typescript_loader_error){}try{WithCustomTheme.displayName="WithCustomTheme",WithCustomTheme.__docgenInfo={description:"",displayName:"WithCustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/breadcrumb/Breadcrumb.stories.tsx#WithCustomTheme"]={docgenInfo:WithCustomTheme.__docgenInfo,name:"WithCustomTheme",path:"src/components/breadcrumb/Breadcrumb.stories.tsx#WithCustomTheme"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/button/Button.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FullWidth:()=>FullWidth,Icons:()=>Icons,LinkButton:()=>LinkButton,Loading:()=>Loading,LoadingOnClick:()=>LoadingOnClick,Playground:()=>Playground,Primary:()=>Primary,Secondary:()=>Secondary,Small:()=>Small,Supplementary:()=>Supplementary,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@storybook/addon-actions/dist/esm/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js"),_icons__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/icons/IconTrash.tsx"),_icons__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/icons/IconShare.tsx"),_icons__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/icons/IconAngleRight.tsx"),_icons__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/icons/IconFaceSmile.tsx"),_Button__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["label","variant","theme","size","disabled","fullWidth","iconLeft","iconRight","isLoading","loadingText"],onClick=(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("button-click");const __WEBPACK_DEFAULT_EXPORT__={component:_Button__WEBPACK_IMPORTED_MODULE_4__.z,title:"Components/Button",parameters:{storySource:{source:"import React, { useEffect, useState } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { ArgsTable, Stories, Title } from '@storybook/addon-docs/blocks';\n\nimport { IconShare, IconAngleRight, IconFaceSmile, IconTrash } from '../../icons';\nimport { Button } from './Button';\n\nconst onClick = action('button-click');\n\nexport default {\n component: Button,\n title: 'Components/Button',\n parameters: {\n controls: { hideNoControlsWarning: true },\n docs: {\n page: () => (\n <>\n Props\n \n \n \n ),\n },\n },\n};\n\nexport const Primary = () => ;\n\nexport const Secondary = () => (\n \n);\n\nexport const Supplementary = () => (\n \n);\n\nexport const Small = () => (\n \n);\n\nexport const FullWidth = () => (\n \n);\nFullWidth.storyName = 'Full width';\n\nexport const Icons = () => (\n <>\n \n\n
\n
\n\n \n\n
\n
\n\n \n \n);\n\nexport const Loading = () => (\n \n);\n\nexport const LoadingOnClick = (args) => {\n const [isLoading, setIsLoading] = useState(false);\n const onButtonClick: React.MouseEventHandler = () => {\n setIsLoading(true);\n };\n useEffect(() => {\n let timeout;\n if (isLoading) {\n timeout = setTimeout(() => {\n setIsLoading(false);\n }, 5000);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [isLoading]);\n return (\n : undefined }}\n onClick={onButtonClick}\n isLoading={isLoading}\n loadingText=\"Saving your changes\"\n >\n Button\n \n );\n};\nLoadingOnClick.args = {\n variant: 'primary',\n};\n\nexport const Playground = ({\n label,\n variant,\n theme,\n size,\n disabled,\n fullWidth,\n iconLeft,\n iconRight,\n isLoading,\n loadingText,\n ...args\n}) => {\n return (\n : null}\n iconRight={iconRight ? : null}\n isLoading={isLoading}\n loadingText={loadingText}\n {...args}\n >\n {label}\n \n );\n};\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n label: 'Button',\n variant: 'primary',\n theme: 'default',\n size: 'default',\n disabled: false,\n fullWidth: false,\n iconLeft: false,\n iconRight: false,\n isLoading: false,\n loadingText: 'Saving your changes',\n};\n\nPlayground.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'supplementary', 'success', 'danger'],\n control: { type: 'radio' },\n },\n theme: {\n options: ['default', 'coat', 'black'],\n control: { type: 'radio' },\n },\n size: {\n options: ['default', 'small'],\n control: { type: 'radio' },\n },\n};\n\nexport const LinkButton = () => (\n {\n window.open('/');\n }}\n role=\"link\"\n >\n Button used as a link\n \n);\n",locationsMap:{primary:{startLoc:{col:23,line:27},endLoc:{col:70,line:27},startBody:{col:23,line:27},endBody:{col:70,line:27}},secondary:{startLoc:{col:25,line:29},endLoc:{col:1,line:33},startBody:{col:25,line:29},endBody:{col:1,line:33}},supplementary:{startLoc:{col:29,line:35},endLoc:{col:1,line:39},startBody:{col:29,line:35},endBody:{col:1,line:39}},small:{startLoc:{col:21,line:41},endLoc:{col:1,line:45},startBody:{col:21,line:41},endBody:{col:1,line:45}},"full-width":{startLoc:{col:25,line:47},endLoc:{col:1,line:51},startBody:{col:25,line:47},endBody:{col:1,line:51}},icons:{startLoc:{col:21,line:54},endLoc:{col:1,line:74},startBody:{col:21,line:54},endBody:{col:1,line:74}},loading:{startLoc:{col:23,line:76},endLoc:{col:1,line:80},startBody:{col:23,line:76},endBody:{col:1,line:80}},"loading-on-click":{startLoc:{col:30,line:82},endLoc:{col:1,line:108},startBody:{col:30,line:82},endBody:{col:1,line:108}},playground:{startLoc:{col:26,line:113},endLoc:{col:1,line:142},startBody:{col:26,line:113},endBody:{col:1,line:142}},"link-button":{startLoc:{col:26,line:182},endLoc:{col:1,line:191},startBody:{col:26,line:182},endBody:{col:1,line:191}}}},controls:{hideNoControlsWarning:!0},docs:{page:function page(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_2__.Dx,{children:"Props"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_2__.$4,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_2__.fQ,{title:"Examples",includePrimary:!0})]})}}}};var Primary=function Primary(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,children:"Button"})},Secondary=function Secondary(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,variant:"secondary",children:"Button"})},Supplementary=function Supplementary(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,variant:"supplementary",iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_5__.IconTrash,{}),children:"Button"})},Small=function Small(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,size:"small",children:"Button"})},FullWidth=function FullWidth(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,fullWidth:!0,children:"Button"})};FullWidth.storyName="Full width";var Icons=function Icons(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_6__.IconShare,{}),children:"Button"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,iconRight:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_7__.IconAngleRight,{}),children:"Button"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick,iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_6__.IconShare,{}),iconRight:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_7__.IconAngleRight,{}),children:"Button"})]})},Loading=function Loading(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{isLoading:!0,loadingText:"Saving your changes",children:"Button"})},LoadingOnClick=function LoadingOnClick(args){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__.Z)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){var timeout;return isLoading&&(timeout=setTimeout((function(){setIsLoading(!1)}),5e3)),function(){clearTimeout(timeout)}}),[isLoading]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},args),{},{iconLeft:"supplementary"===args.variant?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_5__.IconTrash,{}):void 0})),{},{onClick:function onButtonClick(){setIsLoading(!0)},isLoading,loadingText:"Saving your changes",children:"Button"}))};LoadingOnClick.args={variant:"primary"};var Playground=function Playground(_ref){var label=_ref.label,variant=_ref.variant,theme=_ref.theme,size=_ref.size,disabled=_ref.disabled,fullWidth=_ref.fullWidth,iconLeft=_ref.iconLeft,iconRight=_ref.iconRight,isLoading=_ref.isLoading,loadingText=_ref.loadingText,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_10__.Z)(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({variant,theme,disabled,fullWidth,size,iconLeft:iconLeft?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconFaceSmile,{}):null,iconRight:iconRight?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconFaceSmile,{}):null,isLoading,loadingText},args),{},{children:label}))};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={label:"Button",variant:"primary",theme:"default",size:"default",disabled:!1,fullWidth:!1,iconLeft:!1,iconRight:!1,isLoading:!1,loadingText:"Saving your changes"},Playground.argTypes={variant:{options:["primary","secondary","supplementary","success","danger"],control:{type:"radio"}},theme:{options:["default","coat","black"],control:{type:"radio"}},size:{options:["default","small"],control:{type:"radio"}}};var LinkButton=function LinkButton(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button__WEBPACK_IMPORTED_MODULE_4__.z,{onClick:function onClick(){window.open("/")},role:"link",children:"Button used as a link"})};Primary.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:"() => "}},Primary.parameters),Secondary.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:'() => (\n \n)'}},Secondary.parameters),Supplementary.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:'() => (\n \n)'}},Supplementary.parameters),Small.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:'() => (\n \n)'}},Small.parameters),FullWidth.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:"() => (\n \n)"}},FullWidth.parameters),Icons.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:"() => (\n <>\n \n\n
\n
\n\n \n\n
\n
\n\n \n \n)"}},Icons.parameters),Loading.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:'() => (\n \n)'}},Loading.parameters),LoadingOnClick.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:"(args) => {\n const [isLoading, setIsLoading] = useState(false);\n const onButtonClick: React.MouseEventHandler = () => {\n setIsLoading(true);\n };\n useEffect(() => {\n let timeout;\n if (isLoading) {\n timeout = setTimeout(() => {\n setIsLoading(false);\n }, 5000);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [isLoading]);\n return (\n : undefined }}\n onClick={onButtonClick}\n isLoading={isLoading}\n loadingText=\"Saving your changes\"\n >\n Button\n \n );\n}"}},LoadingOnClick.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:"({\n label,\n variant,\n theme,\n size,\n disabled,\n fullWidth,\n iconLeft,\n iconRight,\n isLoading,\n loadingText,\n ...args\n}) => {\n return (\n : null}\n iconRight={iconRight ? : null}\n isLoading={isLoading}\n loadingText={loadingText}\n {...args}\n >\n {label}\n \n );\n}"}},Playground.parameters),LinkButton.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__.Z)({storySource:{source:"() => (\n {\n window.open('/');\n }}\n role=\"link\"\n >\n Button used as a link\n \n)"}},LinkButton.parameters);try{LoadingOnClick.displayName="LoadingOnClick",LoadingOnClick.__docgenInfo={description:"",displayName:"LoadingOnClick",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button/Button.stories.tsx#LoadingOnClick"]={docgenInfo:LoadingOnClick.__docgenInfo,name:"LoadingOnClick",path:"src/components/button/Button.stories.tsx#LoadingOnClick"})}catch(__react_docgen_typescript_loader_error){}try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"any"}},variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"any"}},theme:{defaultValue:null,description:"",name:"theme",required:!0,type:{name:"any"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"any"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"any"}},fullWidth:{defaultValue:null,description:"",name:"fullWidth",required:!0,type:{name:"any"}},iconLeft:{defaultValue:null,description:"",name:"iconLeft",required:!0,type:{name:"any"}},iconRight:{defaultValue:null,description:"",name:"iconRight",required:!0,type:{name:"any"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"any"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button/Button.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/button/Button.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card/Card.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Empty:()=>Empty,TextHeading:()=>TextHeading,WithBorder:()=>WithBorder,WithBoxShadow:()=>WithBoxShadow,WithCustomTheme:()=>WithCustomTheme,WithOtherComponents:()=>WithOtherComponents,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Card__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/card/Card.tsx")),_button__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Card__WEBPACK_IMPORTED_MODULE_2__.Z,title:"Components/Card",parameters:{storySource:{source:"import React from 'react';\n\nimport { Card } from './Card';\nimport { Button } from '../button';\n\nexport default {\n component: Card,\n title: 'Components/Card',\n parameters: {\n controls: { expanded: true },\n },\n};\n\nexport const Empty = (args) => ;\n\nexport const WithBorder = (args) => ;\nWithBorder.storyName = 'With border';\nWithBorder.args = {\n border: true,\n};\n\nexport const WithBoxShadow = (args) => ;\nWithBoxShadow.storyName = 'With box shadow';\nWithBoxShadow.args = {\n boxShadow: true,\n};\n\nexport const TextHeading = (args) => ;\nTextHeading.storyName = 'With text & heading';\nTextHeading.args = {\n heading: 'Card',\n text:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n};\n\nexport const WithOtherComponents = (args) => (\n \n \n \n);\nWithOtherComponents.storyName = 'With other components';\nWithOtherComponents.args = {\n heading: 'Card',\n text:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n};\n\nexport const WithCustomTheme = (args) => ;\nWithCustomTheme.storyName = 'With custom theme';\nWithCustomTheme.args = {\n border: true,\n heading: 'Card',\n text:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n theme: {\n '--background-color': 'var(--color-white)',\n '--border-color': 'var(--color-black-90)',\n '--border-width': '2px',\n '--color': 'var(--color-black-90)',\n '--padding-horizontal': 'var(--spacing-l)',\n '--padding-vertical': 'var(--spacing-m)',\n },\n};\n",locationsMap:{empty:{startLoc:{col:21,line:14},endLoc:{col:49,line:14},startBody:{col:21,line:14},endBody:{col:49,line:14}},"with-border":{startLoc:{col:26,line:16},endLoc:{col:54,line:16},startBody:{col:26,line:16},endBody:{col:54,line:16}},"with-box-shadow":{startLoc:{col:29,line:22},endLoc:{col:57,line:22},startBody:{col:29,line:22},endBody:{col:57,line:22}},"text-heading":{startLoc:{col:27,line:28},endLoc:{col:55,line:28},startBody:{col:27,line:28},endBody:{col:55,line:28}},"with-other-components":{startLoc:{col:35,line:36},endLoc:{col:1,line:42},startBody:{col:35,line:36},endBody:{col:1,line:42}},"with-custom-theme":{startLoc:{col:31,line:50},endLoc:{col:59,line:50},startBody:{col:31,line:50},endBody:{col:59,line:50}}}},controls:{expanded:!0}}};var Empty=function Empty(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Card__WEBPACK_IMPORTED_MODULE_2__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))},WithBorder=function WithBorder(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Card__WEBPACK_IMPORTED_MODULE_2__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithBorder.storyName="With border",WithBorder.args={border:!0};var WithBoxShadow=function WithBoxShadow(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Card__WEBPACK_IMPORTED_MODULE_2__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithBoxShadow.storyName="With box shadow",WithBoxShadow.args={boxShadow:!0};var TextHeading=function TextHeading(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Card__WEBPACK_IMPORTED_MODULE_2__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};TextHeading.storyName="With text & heading",TextHeading.args={heading:"Card",text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."};var WithOtherComponents=function WithOtherComponents(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Card__WEBPACK_IMPORTED_MODULE_2__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_4__.z,{variant:"secondary",theme:"black",role:"link",children:"Button"})}))};WithOtherComponents.storyName="With other components",WithOtherComponents.args={heading:"Card",text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."};var WithCustomTheme=function WithCustomTheme(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Card__WEBPACK_IMPORTED_MODULE_2__.Z,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithCustomTheme.storyName="With custom theme",WithCustomTheme.args={border:!0,heading:"Card",text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",theme:{"--background-color":"var(--color-white)","--border-color":"var(--color-black-90)","--border-width":"2px","--color":"var(--color-black-90)","--padding-horizontal":"var(--spacing-l)","--padding-vertical":"var(--spacing-m)"}},Empty.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Empty.parameters),WithBorder.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},WithBorder.parameters),WithBoxShadow.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},WithBoxShadow.parameters),TextHeading.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},TextHeading.parameters),WithOtherComponents.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => (\n \n \n \n)'}},WithOtherComponents.parameters),WithCustomTheme.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},WithCustomTheme.parameters);try{Empty.displayName="Empty",Empty.__docgenInfo={description:"",displayName:"Empty",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card/Card.stories.tsx#Empty"]={docgenInfo:Empty.__docgenInfo,name:"Empty",path:"src/components/card/Card.stories.tsx#Empty"})}catch(__react_docgen_typescript_loader_error){}try{WithBorder.displayName="WithBorder",WithBorder.__docgenInfo={description:"",displayName:"WithBorder",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card/Card.stories.tsx#WithBorder"]={docgenInfo:WithBorder.__docgenInfo,name:"WithBorder",path:"src/components/card/Card.stories.tsx#WithBorder"})}catch(__react_docgen_typescript_loader_error){}try{WithBoxShadow.displayName="WithBoxShadow",WithBoxShadow.__docgenInfo={description:"",displayName:"WithBoxShadow",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card/Card.stories.tsx#WithBoxShadow"]={docgenInfo:WithBoxShadow.__docgenInfo,name:"WithBoxShadow",path:"src/components/card/Card.stories.tsx#WithBoxShadow"})}catch(__react_docgen_typescript_loader_error){}try{TextHeading.displayName="TextHeading",TextHeading.__docgenInfo={description:"",displayName:"TextHeading",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card/Card.stories.tsx#TextHeading"]={docgenInfo:TextHeading.__docgenInfo,name:"TextHeading",path:"src/components/card/Card.stories.tsx#TextHeading"})}catch(__react_docgen_typescript_loader_error){}try{WithOtherComponents.displayName="WithOtherComponents",WithOtherComponents.__docgenInfo={description:"",displayName:"WithOtherComponents",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card/Card.stories.tsx#WithOtherComponents"]={docgenInfo:WithOtherComponents.__docgenInfo,name:"WithOtherComponents",path:"src/components/card/Card.stories.tsx#WithOtherComponents"})}catch(__react_docgen_typescript_loader_error){}try{WithCustomTheme.displayName="WithCustomTheme",WithCustomTheme.__docgenInfo={description:"",displayName:"WithCustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card/Card.stories.tsx#WithCustomTheme"]={docgenInfo:WithCustomTheme.__docgenInfo,name:"WithCustomTheme",path:"src/components/card/Card.stories.tsx#WithCustomTheme"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/checkbox/Checkbox.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Custom:()=>Custom,Default:()=>Default,Disabled:()=>Disabled,GroupWithParent:()=>GroupWithParent,Indeterminate:()=>Indeterminate,Invalid:()=>Invalid,Playground:()=>Playground,Selected:()=>Selected,SelectedDisabled:()=>SelectedDisabled,WithHelperText:()=>WithHelperText,WithTooltip:()=>WithTooltip,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js"),_Checkbox__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),_fieldset__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/fieldset/Fieldset.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,title:"Components/Checkbox",parameters:{storySource:{source:"import React, { useReducer, useState } from 'react';\nimport { ArgsTable, Stories, Title } from '@storybook/addon-docs/blocks';\n\nimport { Checkbox } from './Checkbox';\nimport { Fieldset } from '../fieldset';\n\nexport default {\n component: Checkbox,\n title: 'Components/Checkbox',\n parameters: {\n controls: { hideNoControlsWarning: true },\n docs: {\n page: () => (\n <>\n Props\n \n \n \n ),\n },\n },\n};\n\nexport const Default = () => ;\n\nexport const Selected = () => ;\n\nexport const Indeterminate = () => (\n event.preventDefault()} />\n);\n\nexport const Disabled = () => ;\n\nexport const Invalid = () => ;\n\nexport const WithHelperText = () => ;\n\nexport const WithTooltip = (args) => ;\nWithTooltip.args = {\n label: 'label',\n tooltipText: 'tooltip text',\n tooltipLabel: 'tooltip text aria label',\n tooltipButtonLabel: 'tooltip button aria label',\n};\n\nexport const SelectedDisabled = () => ;\nSelectedDisabled.storyName = 'Selected & disabled';\n\nexport const Custom = () => {\n const [checked, setChecked] = useState(false);\n const customStyles = {\n '--size': '40px',\n '--icon-scale': 0.6,\n '--border-width': '3px',\n '--outline-width': '4px',\n '--background-selected': 'var(--color-success)',\n '--background-hover': 'var(--color-success-dark)',\n '--border-color-selected': 'var(--color-success)',\n '--border-color-selected-hover': 'var(--color-success-dark)',\n '--border-color-selected-focus': 'var(--color-success)',\n '--focus-outline-color': 'var(--color-black-20)',\n } as React.CSSProperties;\n return (\n setChecked(!checked)}\n />\n );\n};\nCustom.storyName = 'With custom styles';\n\nexport const GroupWithParent = () => {\n enum CheckboxState {\n checked,\n unchecked,\n indeterminate,\n }\n\n const areAllChecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 4;\n };\n\n const areAllUnchecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 1;\n };\n\n const reducer = (state, action) => {\n switch (action.type) {\n case 'check': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.checked,\n checkbox1: CheckboxState.checked,\n checkbox2: CheckboxState.checked,\n checkbox3: CheckboxState.checked,\n checkbox4: CheckboxState.checked,\n checkbox5: CheckboxState.checked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.checked,\n controllerCheckbox: areAllChecked(state) ? CheckboxState.checked : CheckboxState.indeterminate,\n };\n }\n case 'uncheck': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.unchecked,\n controllerCheckbox: areAllUnchecked(state) ? CheckboxState.unchecked : CheckboxState.indeterminate,\n };\n }\n default:\n throw new Error();\n }\n };\n\n const initialState = {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return (\n
\n {\n if (\n state.controllerCheckbox === CheckboxState.unchecked ||\n state.controllerCheckbox === CheckboxState.indeterminate\n ) {\n dispatch({ type: 'check', payload: 'controllerCheckbox' });\n } else {\n dispatch({ type: 'uncheck', payload: 'controllerCheckbox' });\n }\n }}\n />\n
    \n {Object.entries(state).map((entry) => {\n if (entry[0] === 'controllerCheckbox') {\n return null;\n }\n return (\n
  • \n {\n if (entry[1] === CheckboxState.unchecked) {\n dispatch({ type: 'check', payload: entry[0] });\n } else {\n dispatch({ type: 'uncheck', payload: entry[0] });\n }\n }}\n />\n
  • \n );\n })}\n
\n
\n );\n};\n\nGroupWithParent.storyName = 'Group with a parent';\n\nexport const Playground = (args) => {\n const [checkedItems, setCheckedItems] = useState({});\n const options = ['Option 1', 'Option 2', 'Option 3'];\n\n const handleChange = (e) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n\n const [indeterminateState, setIndeterminateState] = useState('indeterminate');\n\n const handleIndeterminateChange = () => {\n if (indeterminateState === 'indeterminate') {\n setIndeterminateState('checked');\n } else if (indeterminateState === 'checked') {\n setIndeterminateState('unchecked');\n } else {\n setIndeterminateState('indeterminate');\n }\n };\n\n const styles = {\n '--size': `${args.size}px`,\n '--icon-scale': args.iconScale,\n '--border-width': `${args.borderWidth}px`,\n '--outline-width': `${args.outlineWidth}px`,\n '--label-font-size': `${args.labelFontSize}px`,\n '--label-padding': `${args.labelPadding}px`,\n '--background-unselected': args.backgroundUnselected,\n '--background-selected': args.backgroundSelected,\n '--background-hover': args.backgroundHover,\n '--background-disabled': args.backgroundDisabled,\n '--border-color-selected': args.borderColorSelected,\n '--border-color-selected-hover': args.borderColorSelectedHover,\n '--border-color-selected-focus': args.borderColorSelectedFocus,\n '--border-color-unselected': args.borderColorUnselected,\n '--border-color-unselected-hover': args.borderColorUnselectedHover,\n '--border-color-unselected-focus': args.borderColorUnselectedFocus,\n '--border-color-disabled': args.borderColorDisabled,\n '--focus-outline-color': args.focusOutlineColor,\n '--icon-color-unselected': args.iconColorUnselected,\n '--icon-color-selected': args.iconColorSelected,\n '--icon-color-disabled': args.iconColorDisabled,\n '--label-color': args.labelColorDefault,\n '--label-color-disabled': args.labelColorDisabled,\n } as React.CSSProperties;\n\n return (\n <>\n {options.map((item) => (\n \n ))}\n \n \n \n \n );\n};\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n size: 24,\n iconScale: 1,\n borderWidth: 2,\n outlineWidth: 3,\n labelFontSize: 16,\n labelPadding: 8,\n backgroundUnselected: 'rgba(0, 0, 0, 0)',\n backgroundSelected: '#0000bf',\n backgroundHover: '#000098',\n backgroundDisabled: '#e5e5e5',\n borderColorSelected: '#0000bf',\n borderColorSelectedHover: '#000098',\n borderColorSelectedFocus: '#0000bf',\n borderColorUnselected: '#808080',\n borderColorUnselectedHover: '#1a1a1a',\n borderColorUnselectedFocus: '#000000',\n borderColorDisabled: '#e5e5e5',\n focusOutlineColor: '#0072c6',\n iconColorUnselected: 'rgba(0, 0, 0, 0)',\n iconColorSelected: '#ffffff',\n iconColorDisabled: '#ffffff',\n labelColorDefault: '#1a1a1a',\n labelColorDisabled: '#999898',\n};\n\nPlayground.argTypes = {\n size: {\n control: {\n type: 'range',\n min: 10,\n max: 100,\n step: 1,\n },\n },\n iconScale: {\n control: {\n type: 'range',\n min: 0.1,\n max: 1,\n step: 0.05,\n },\n },\n borderWidth: {\n control: {\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n },\n },\n outlineWidth: {\n control: {\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n },\n },\n labelFontSize: {\n control: {\n type: 'range',\n min: 12,\n max: 32,\n step: 1,\n },\n },\n labelPadding: {\n control: {\n type: 'range',\n min: 4,\n max: 32,\n step: 2,\n },\n },\n backgroundUnselected: { control: { type: 'color' } },\n backgroundSelected: { control: { type: 'color' } },\n backgroundHover: { control: { type: 'color' } },\n backgroundDisabled: { control: { type: 'color' } },\n borderColorSelected: { control: { type: 'color' } },\n borderColorSelectedHover: { control: { type: 'color' } },\n borderColorSelectedFocus: { control: { type: 'color' } },\n borderColorUnselected: { control: { type: 'color' } },\n borderColorUnselectedHover: { control: { type: 'color' } },\n borderColorUnselectedFocus: { control: { type: 'color' } },\n borderColorDisabled: { control: { type: 'color' } },\n focusOutlineColor: { control: { type: 'color' } },\n iconColorUnselected: { control: { type: 'color' } },\n iconColorSelected: { control: { type: 'color' } },\n iconColorDisabled: { control: { type: 'color' } },\n labelColorDefault: { control: { type: 'color' } },\n labelColorDisabled: { control: { type: 'color' } },\n};\n",locationsMap:{default:{startLoc:{col:23,line:24},endLoc:{col:68,line:24},startBody:{col:23,line:24},endBody:{col:68,line:24}},selected:{startLoc:{col:24,line:26},endLoc:{col:78,line:26},startBody:{col:24,line:26},endBody:{col:78,line:26}},indeterminate:{startLoc:{col:29,line:28},endLoc:{col:1,line:30},startBody:{col:29,line:28},endBody:{col:1,line:30}},disabled:{startLoc:{col:24,line:32},endLoc:{col:79,line:32},startBody:{col:24,line:32},endBody:{col:79,line:32}},invalid:{startLoc:{col:23,line:34},endLoc:{col:91,line:34},startBody:{col:23,line:34},endBody:{col:91,line:34}},"with-helper-text":{startLoc:{col:30,line:36},endLoc:{col:107,line:36},startBody:{col:30,line:36},endBody:{col:107,line:36}},"with-tooltip":{startLoc:{col:27,line:38},endLoc:{col:77,line:38},startBody:{col:27,line:38},endBody:{col:77,line:38}},"selected-disabled":{startLoc:{col:32,line:46},endLoc:{col:104,line:46},startBody:{col:32,line:46},endBody:{col:104,line:46}},custom:{startLoc:{col:22,line:49},endLoc:{col:1,line:72},startBody:{col:22,line:49},endBody:{col:1,line:72}},"group-with-parent":{startLoc:{col:31,line:75},endLoc:{col:1,line:207},startBody:{col:31,line:75},endBody:{col:1,line:207}},playground:{startLoc:{col:26,line:211},endLoc:{col:1,line:284},startBody:{col:26,line:211},endBody:{col:1,line:284}}}},controls:{hideNoControlsWarning:!0},docs:{page:function page(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.Dx,{children:"Props"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.$4,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.fQ,{title:"Examples",includePrimary:!0})]})}}}};var Default=function Default(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"default",label:"Label"})},Selected=function Selected(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"selected",label:"Label",checked:!0})},Indeterminate=function Indeterminate(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"indeterminate",label:"Label",indeterminate:!0,onChange:function onChange(event){return event.preventDefault()}})},Disabled=function Disabled(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"disabled",label:"Label",disabled:!0})},Invalid=function Invalid(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"invalid",label:"Label",errorText:"Error text"})},WithHelperText=function WithHelperText(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"helper-text",label:"Label",helperText:"Assistive text"})},WithTooltip=function WithTooltip(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({id:"with-tooltip"},args))};WithTooltip.args={label:"label",tooltipText:"tooltip text",tooltipLabel:"tooltip text aria label",tooltipButtonLabel:"tooltip button aria label"};var SelectedDisabled=function SelectedDisabled(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"selected-disabled",label:"Label",checked:!0,disabled:!0})};SelectedDisabled.storyName="Selected & disabled";var Custom=function Custom(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState,2),checked=_useState2[0],setChecked=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"checkbox5",label:"Label",style:{"--size":"40px","--icon-scale":.6,"--border-width":"3px","--outline-width":"4px","--background-selected":"var(--color-success)","--background-hover":"var(--color-success-dark)","--border-color-selected":"var(--color-success)","--border-color-selected-hover":"var(--color-success-dark)","--border-color-selected-focus":"var(--color-success)","--focus-outline-color":"var(--color-black-20)"},checked,onChange:function onChange(){return setChecked(!checked)}})};Custom.storyName="With custom styles";var GroupWithParent=function GroupWithParent(){var CheckboxState=function(CheckboxState){return CheckboxState[CheckboxState.checked=0]="checked",CheckboxState[CheckboxState.unchecked=1]="unchecked",CheckboxState[CheckboxState.indeterminate=2]="indeterminate",CheckboxState}({}),initialState={controllerCheckbox:CheckboxState.unchecked,checkbox1:CheckboxState.unchecked,checkbox2:CheckboxState.unchecked,checkbox3:CheckboxState.unchecked,checkbox4:CheckboxState.unchecked,checkbox5:CheckboxState.unchecked},_useReducer=(0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)((function reducer(state,action){switch(action.type){case"check":var _objectSpread2;return"controllerCheckbox"===action.payload?{controllerCheckbox:CheckboxState.checked,checkbox1:CheckboxState.checked,checkbox2:CheckboxState.checked,checkbox3:CheckboxState.checked,checkbox4:CheckboxState.checked,checkbox5:CheckboxState.checked}:(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},state),{},(_objectSpread2={},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_objectSpread2,action.payload,CheckboxState.checked),(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_objectSpread2,"controllerCheckbox",function areAllChecked(state){var checkedCount=0;return Object.keys(state).forEach((function(key){"controllerCheckbox"!==key&&state[key]===CheckboxState.checked&&(checkedCount+=1)})),4===checkedCount}(state)?CheckboxState.checked:CheckboxState.indeterminate),_objectSpread2));case"uncheck":var _objectSpread3;return"controllerCheckbox"===action.payload?{controllerCheckbox:CheckboxState.unchecked,checkbox1:CheckboxState.unchecked,checkbox2:CheckboxState.unchecked,checkbox3:CheckboxState.unchecked,checkbox4:CheckboxState.unchecked,checkbox5:CheckboxState.unchecked}:(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},state),{},(_objectSpread3={},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_objectSpread3,action.payload,CheckboxState.unchecked),(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_objectSpread3,"controllerCheckbox",function areAllUnchecked(state){var checkedCount=0;return Object.keys(state).forEach((function(key){"controllerCheckbox"!==key&&state[key]===CheckboxState.checked&&(checkedCount+=1)})),1===checkedCount}(state)?CheckboxState.unchecked:CheckboxState.indeterminate),_objectSpread3));default:throw new Error}}),initialState),_useReducer2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_fieldset__WEBPACK_IMPORTED_MODULE_7__.p,{heading:"Group label *",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{"aria-controls":"checkbox1 checkbox2 checkbox3 checkbox4 checkbox5",id:"controllerCheckbox",label:"Label",indeterminate:state.controllerCheckbox===CheckboxState.indeterminate,checked:state.controllerCheckbox===CheckboxState.checked,style:{marginTop:"var(--spacing-xs)"},onChange:function onChange(){state.controllerCheckbox===CheckboxState.unchecked||state.controllerCheckbox===CheckboxState.indeterminate?dispatch({type:"check",payload:"controllerCheckbox"}):dispatch({type:"uncheck",payload:"controllerCheckbox"})}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("ul",{style:{marginLeft:"var(--spacing-s)",paddingInlineStart:"0"},children:Object.entries(state).map((function(entry){return"controllerCheckbox"===entry[0]?null:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{style:{marginTop:"var(--spacing-s)",listStyle:"none"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:entry[0],label:"Label",checked:entry[1]===CheckboxState.checked,onChange:function onChange(){entry[1]===CheckboxState.unchecked?dispatch({type:"check",payload:entry[0]}):dispatch({type:"uncheck",payload:entry[0]})}})},entry[0])}))})]})};GroupWithParent.storyName="Group with a parent";var Playground=function Playground(args){var _useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState3,2),checkedItems=_useState4[0],setCheckedItems=_useState4[1],handleChange=function handleChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)({},item,isChecked)))},_useState5=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("indeterminate"),_useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState5,2),indeterminateState=_useState6[0],setIndeterminateState=_useState6[1],styles={"--size":"".concat(args.size,"px"),"--icon-scale":args.iconScale,"--border-width":"".concat(args.borderWidth,"px"),"--outline-width":"".concat(args.outlineWidth,"px"),"--label-font-size":"".concat(args.labelFontSize,"px"),"--label-padding":"".concat(args.labelPadding,"px"),"--background-unselected":args.backgroundUnselected,"--background-selected":args.backgroundSelected,"--background-hover":args.backgroundHover,"--background-disabled":args.backgroundDisabled,"--border-color-selected":args.borderColorSelected,"--border-color-selected-hover":args.borderColorSelectedHover,"--border-color-selected-focus":args.borderColorSelectedFocus,"--border-color-unselected":args.borderColorUnselected,"--border-color-unselected-hover":args.borderColorUnselectedHover,"--border-color-unselected-focus":args.borderColorUnselectedFocus,"--border-color-disabled":args.borderColorDisabled,"--focus-outline-color":args.focusOutlineColor,"--icon-color-unselected":args.iconColorUnselected,"--icon-color-selected":args.iconColorSelected,"--icon-color-disabled":args.iconColorDisabled,"--label-color":args.labelColorDefault,"--label-color-disabled":args.labelColorDisabled};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[["Option 1","Option 2","Option 3"].map((function(item){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"checkbox-".concat(item),label:item,name:item,checked:checkedItems[item],onChange:handleChange,style:styles},"checkbox-".concat(item))})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"indeterminate-playground",label:"Option 4",style:styles,checked:"checked"===indeterminateState,indeterminate:"indeterminate"===indeterminateState,onChange:function handleIndeterminateChange(){setIndeterminateState("indeterminate"===indeterminateState?"checked":"checked"===indeterminateState?"unchecked":"indeterminate")}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"checkbox7",label:"Option 5",style:styles,disabled:!0}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_3__.X,{id:"checkbox8",label:"Option 6",style:styles,checked:!0,disabled:!0})]})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={size:24,iconScale:1,borderWidth:2,outlineWidth:3,labelFontSize:16,labelPadding:8,backgroundUnselected:"rgba(0, 0, 0, 0)",backgroundSelected:"#0000bf",backgroundHover:"#000098",backgroundDisabled:"#e5e5e5",borderColorSelected:"#0000bf",borderColorSelectedHover:"#000098",borderColorSelectedFocus:"#0000bf",borderColorUnselected:"#808080",borderColorUnselectedHover:"#1a1a1a",borderColorUnselectedFocus:"#000000",borderColorDisabled:"#e5e5e5",focusOutlineColor:"#0072c6",iconColorUnselected:"rgba(0, 0, 0, 0)",iconColorSelected:"#ffffff",iconColorDisabled:"#ffffff",labelColorDefault:"#1a1a1a",labelColorDisabled:"#999898"},Playground.argTypes={size:{control:{type:"range",min:10,max:100,step:1}},iconScale:{control:{type:"range",min:.1,max:1,step:.05}},borderWidth:{control:{type:"range",min:1,max:10,step:1}},outlineWidth:{control:{type:"range",min:1,max:10,step:1}},labelFontSize:{control:{type:"range",min:12,max:32,step:1}},labelPadding:{control:{type:"range",min:4,max:32,step:2}},backgroundUnselected:{control:{type:"color"}},backgroundSelected:{control:{type:"color"}},backgroundHover:{control:{type:"color"}},backgroundDisabled:{control:{type:"color"}},borderColorSelected:{control:{type:"color"}},borderColorSelectedHover:{control:{type:"color"}},borderColorSelectedFocus:{control:{type:"color"}},borderColorUnselected:{control:{type:"color"}},borderColorUnselectedHover:{control:{type:"color"}},borderColorUnselectedFocus:{control:{type:"color"}},borderColorDisabled:{control:{type:"color"}},focusOutlineColor:{control:{type:"color"}},iconColorUnselected:{control:{type:"color"}},iconColorSelected:{control:{type:"color"}},iconColorDisabled:{control:{type:"color"}},labelColorDefault:{control:{type:"color"}},labelColorDisabled:{control:{type:"color"}}},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Default.parameters),Selected.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Selected.parameters),Indeterminate.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => (\n event.preventDefault()} />\n)'}},Indeterminate.parameters),Disabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Disabled.parameters),Invalid.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Invalid.parameters),WithHelperText.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},WithHelperText.parameters),WithTooltip.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'(args) => '}},WithTooltip.parameters),SelectedDisabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},SelectedDisabled.parameters),Custom.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => {\n const [checked, setChecked] = useState(false);\n const customStyles = {\n '--size': '40px',\n '--icon-scale': 0.6,\n '--border-width': '3px',\n '--outline-width': '4px',\n '--background-selected': 'var(--color-success)',\n '--background-hover': 'var(--color-success-dark)',\n '--border-color-selected': 'var(--color-success)',\n '--border-color-selected-hover': 'var(--color-success-dark)',\n '--border-color-selected-focus': 'var(--color-success)',\n '--focus-outline-color': 'var(--color-black-20)',\n } as React.CSSProperties;\n return (\n setChecked(!checked)}\n />\n );\n}"}},Custom.parameters),GroupWithParent.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => {\n enum CheckboxState {\n checked,\n unchecked,\n indeterminate,\n }\n\n const areAllChecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 4;\n };\n\n const areAllUnchecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 1;\n };\n\n const reducer = (state, action) => {\n switch (action.type) {\n case 'check': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.checked,\n checkbox1: CheckboxState.checked,\n checkbox2: CheckboxState.checked,\n checkbox3: CheckboxState.checked,\n checkbox4: CheckboxState.checked,\n checkbox5: CheckboxState.checked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.checked,\n controllerCheckbox: areAllChecked(state) ? CheckboxState.checked : CheckboxState.indeterminate,\n };\n }\n case 'uncheck': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.unchecked,\n controllerCheckbox: areAllUnchecked(state) ? CheckboxState.unchecked : CheckboxState.indeterminate,\n };\n }\n default:\n throw new Error();\n }\n };\n\n const initialState = {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return (\n
\n {\n if (\n state.controllerCheckbox === CheckboxState.unchecked ||\n state.controllerCheckbox === CheckboxState.indeterminate\n ) {\n dispatch({ type: 'check', payload: 'controllerCheckbox' });\n } else {\n dispatch({ type: 'uncheck', payload: 'controllerCheckbox' });\n }\n }}\n />\n
    \n {Object.entries(state).map((entry) => {\n if (entry[0] === 'controllerCheckbox') {\n return null;\n }\n return (\n
  • \n {\n if (entry[1] === CheckboxState.unchecked) {\n dispatch({ type: 'check', payload: entry[0] });\n } else {\n dispatch({ type: 'uncheck', payload: entry[0] });\n }\n }}\n />\n
  • \n );\n })}\n
\n
\n );\n}"}},GroupWithParent.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => {\n const [checkedItems, setCheckedItems] = useState({});\n const options = ['Option 1', 'Option 2', 'Option 3'];\n\n const handleChange = (e) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n\n const [indeterminateState, setIndeterminateState] = useState('indeterminate');\n\n const handleIndeterminateChange = () => {\n if (indeterminateState === 'indeterminate') {\n setIndeterminateState('checked');\n } else if (indeterminateState === 'checked') {\n setIndeterminateState('unchecked');\n } else {\n setIndeterminateState('indeterminate');\n }\n };\n\n const styles = {\n '--size': `${args.size}px`,\n '--icon-scale': args.iconScale,\n '--border-width': `${args.borderWidth}px`,\n '--outline-width': `${args.outlineWidth}px`,\n '--label-font-size': `${args.labelFontSize}px`,\n '--label-padding': `${args.labelPadding}px`,\n '--background-unselected': args.backgroundUnselected,\n '--background-selected': args.backgroundSelected,\n '--background-hover': args.backgroundHover,\n '--background-disabled': args.backgroundDisabled,\n '--border-color-selected': args.borderColorSelected,\n '--border-color-selected-hover': args.borderColorSelectedHover,\n '--border-color-selected-focus': args.borderColorSelectedFocus,\n '--border-color-unselected': args.borderColorUnselected,\n '--border-color-unselected-hover': args.borderColorUnselectedHover,\n '--border-color-unselected-focus': args.borderColorUnselectedFocus,\n '--border-color-disabled': args.borderColorDisabled,\n '--focus-outline-color': args.focusOutlineColor,\n '--icon-color-unselected': args.iconColorUnselected,\n '--icon-color-selected': args.iconColorSelected,\n '--icon-color-disabled': args.iconColorDisabled,\n '--label-color': args.labelColorDefault,\n '--label-color-disabled': args.labelColorDisabled,\n } as React.CSSProperties;\n\n return (\n <>\n {options.map((item) => (\n \n ))}\n \n \n \n \n );\n}"}},Playground.parameters);try{WithTooltip.displayName="WithTooltip",WithTooltip.__docgenInfo={description:"",displayName:"WithTooltip",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/checkbox/Checkbox.stories.tsx#WithTooltip"]={docgenInfo:WithTooltip.__docgenInfo,name:"WithTooltip",path:"src/components/checkbox/Checkbox.stories.tsx#WithTooltip"})}catch(__react_docgen_typescript_loader_error){}try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/checkbox/Checkbox.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/checkbox/Checkbox.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/container/Container.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Example:()=>Example,default:()=>Container_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),objectWithoutProperties=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"));__webpack_require__("./src/styles/base.css");const Container_module_container="Container_container__T6j24 container_hds-container__1LLqG";var classNames=__webpack_require__("./src/utils/classNames.ts"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["children","className"],Container=function Container(_ref){var children=_ref.children,className=_ref.className,rest=(0,objectWithoutProperties.Z)(_ref,_excluded);return(0,jsx_runtime.jsx)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:(0,classNames.Z)(Container_module_container,className)},rest),{},{children}))};try{Container.displayName="Container",Container.__docgenInfo={description:"",displayName:"Container",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/container/Container.tsx#Container"]={docgenInfo:Container.__docgenInfo,name:"Container",path:"src/components/container/Container.tsx#Container"})}catch(__react_docgen_typescript_loader_error){}const Container_stories={parameters:{storySource:{source:"import React from 'react';\n\nimport { Container } from './Container';\n\nexport default {\n component: Container,\n title: 'Components/Container',\n};\n\nexport const Example = (args) => (\n \n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore\n magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n

\n
\n);\n",locationsMap:{example:{startLoc:{col:23,line:10},endLoc:{col:1,line:19},startBody:{col:23,line:10},endBody:{col:1,line:19}}}}},component:Container,title:"Components/Container"};var Example=function Example(args){return(0,jsx_runtime.jsx)(Container,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)("p",{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."})}))};Example.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => (\n \n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore\n magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n

\n
\n)"}},Example.parameters);try{Example.displayName="Example",Example.__docgenInfo={description:"",displayName:"Example",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/container/Container.stories.tsx#Example"]={docgenInfo:Example.__docgenInfo,name:"Example",path:"src/components/container/Container.stories.tsx#Example"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/cookieConsent/CookieConsent.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomContentVersion:()=>CustomContentVersion,DebugVersion:()=>DebugVersion,EnglishModalVersion:()=>EnglishModalVersion,FinnishModalVersion:()=>FinnishModalVersion,PageVersion:()=>PageVersion,SimpleModalVersion:()=>SimpleModalVersion,TunnistamoLoginCookies:()=>TunnistamoLoginCookies,default:()=>CookieConsent_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),toConsumableArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js"),lodash_pick=__webpack_require__("../../node_modules/lodash.pick/index.js"),lodash_pick_default=__webpack_require__.n(lodash_pick),lodash_isobject=__webpack_require__("../../node_modules/lodash.isobject/index.js"),lodash_isobject_default=__webpack_require__.n(lodash_isobject),lodash_isundefined=__webpack_require__("../../node_modules/lodash.isundefined/index.js"),lodash_isundefined_default=__webpack_require__.n(lodash_isundefined),cookie=__webpack_require__("../../node_modules/cookie/index.js");function getNamedCookie(name){return function getAll(){return cookie.parse(document.cookie)}()[name]}function cookieController_createCookieController(options,cookieName){var defaultCookieSetOptions={path:"/",secure:!1,sameSite:"strict",maxAge:void 0},cookieOptions=(0,objectSpread2.Z)((0,objectSpread2.Z)({},defaultCookieSetOptions),options);if("undefined"==typeof window)return{get:function get(){return""},set:function set(){return""}};return{get:function getCookie(){return getNamedCookie(cookieName)||""},set:function setCookie(data){!function setNamedCookie(name,value,options){document.cookie=cookie.serialize(name,value,options)}(cookieName,data,cookieOptions)}}}var COOKIE_NAME="city-of-helsinki-cookie-consents";function convertStringArrayToKeyConsentObject(array){return array.reduce((function(current,key){return current[key]=!1,current}),{})}function mergeConsents(set1,set2,set3){return(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},set1),set2),set3)}function parseConsents(jsonString){if(!jsonString||jsonString.length<2||"{"!==jsonString.charAt(0))return{};try{return JSON.parse(jsonString)}catch(e){return{}}}var getCookieDomainFromUrl=function getCookieDomainFromUrl(){return"undefined"==typeof window?"":window.location.hostname.split(".").slice(-2).join(".")};function createStorage(initialValues){var storage=(0,objectSpread2.Z)({},initialValues),getStorage=function getStorage(){return storage},findConsentSource=function findConsentSource(consentName,targetStorage){return lodash_isundefined_default()(targetStorage.required[consentName])?lodash_isundefined_default()(targetStorage.optional[consentName])?void 0:targetStorage.optional:targetStorage.required},setConsents=function setConsents(keys,value){var copiedStorage=function copyStorage(){return{optional:(0,objectSpread2.Z)({},storage.optional),required:(0,objectSpread2.Z)({},storage.required),unknown:(0,objectSpread2.Z)({},storage.unknown)}}();return keys.forEach((function(key){!function updateConsent(targetStorage,consentName,value){var target=findConsentSource(consentName,targetStorage);if(!target)throw new Error("Unknown consent ".concat(consentName));target[consentName]=value}(copiedStorage,key,value)})),function updateStorage(newStorage){storage=newStorage}(copiedStorage),copiedStorage};return{getAll:function getAll(){return getStorage()},getConsentByName:function getConsentByName(consentName){var target=findConsentSource(consentName,getStorage());return!!target&&target[consentName]},approve:function approve(keys){return setConsents(keys,!0)},reject:function reject(keys){return setConsents(keys,!1)}}}function createConsentController(props){!function verifyConsentProps(_ref){var optionalConsents=_ref.optionalConsents,requiredConsents=_ref.requiredConsents;requiredConsents&&optionalConsents&&requiredConsents.forEach((function(consent){if(optionalConsents.includes(consent))throw new Error("optional consent '".concat(consent,"' found in requiredConsents."))}))}(props);var _props$optionalConsen=props.optionalConsents,optionalConsents=void 0===_props$optionalConsen?[]:_props$optionalConsen,_props$requiredConsen=props.requiredConsents,requiredConsents=void 0===_props$requiredConsen?[]:_props$requiredConsen,allConsents=[].concat((0,toConsumableArray.Z)(optionalConsents),(0,toConsumableArray.Z)(requiredConsents)),cookieController=cookieController_createCookieController({maxAge:31536e3,domain:props.cookieDomain||getCookieDomainFromUrl()},COOKIE_NAME),currentConsentsInCookie=parseConsents(cookieController.get()),required=mergeConsents(convertStringArrayToKeyConsentObject(requiredConsents),lodash_pick_default()(currentConsentsInCookie,requiredConsents)),optional=mergeConsents(convertStringArrayToKeyConsentObject(optionalConsents),lodash_pick_default()(currentConsentsInCookie,optionalConsents)),unknownConsentKeys=Object.keys(currentConsentsInCookie).filter((function(key){return!allConsents.includes(key)})),storage=createStorage({required,optional,unknown:unknownConsentKeys.length?lodash_pick_default()(currentConsentsInCookie,unknownConsentKeys):void 0});return{getRequired:function getRequired(){return storage.getAll().required},getOptional:function getOptional(){return storage.getAll().optional},update:function update(consentName,value){var arr=[consentName];value?storage.approve(arr):storage.reject(arr)},approveAll:function approveAll(){storage.approve(allConsents)},approveRequired:function approveRequired(){storage.approve(requiredConsents)},getRequiredWithoutConsent:function getRequiredWithoutConsent(){return requiredConsents.filter((function(key){return!0!==storage.getConsentByName(key)}))},rejectAll:function rejectAll(){storage.reject(allConsents)},getUnhandledConsents:function getUnhandledConsents(){var storedCookies=parseConsents(cookieController.get());return allConsents.filter((function(key){return lodash_isundefined_default()(storedCookies[key])}))},save:function save(){var currentVersion=function getConsents(){return storage.getAll()}(),consents=mergeConsents(currentVersion.required,currentVersion.optional,currentVersion.unknown);return cookieController.set(function createConsentsString(consents){return lodash_isobject_default()(consents)?JSON.stringify(consents):"{}"}(consents)),consents}}}var objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),lodash_get=__webpack_require__("../../node_modules/lodash.get/index.js"),lodash_get_default=__webpack_require__.n(lodash_get);var _excluded=["commonGroup","groupId","commonCookie"],commonContent=function getCookieContent(){var commonLanguageTranslations={fi:{description:"Eväste vaaditaan jotta käyttäjän kielivalinta säilyisi.",expiration:"Istunto"},sv:{description:"Kakan krävs för att spara användarens språkval.",expiration:"Session"},en:{description:"Required to persist the user's chosen language.",expiration:"Session"}},commonLoginTranslations={fi:{description:"Tunnistautumisistunnon säilymiseksi vaadittu eväste.",expiration:"Istunto"},sv:{description:"Cookie som krävs för att bevara autentiseringssession.",expiration:"Session"},en:{description:"Required to persist the authentication session.",expiration:"Session"}},commonSecurityControlTranslations={fi:{description:"Tietoturvakontrolli",expiration:"365 päivää"},sv:{description:"Datasäkerhetskontroll",expiration:"365 dagar"},en:{description:"A security control",expiration:"365 days"}},commonLoginGroupTranslations={fi:{title:"Kirjautuminen",text:"Kirjautumisevästeitä käytetään käyttäjän kirjautuessa palveluun.",expandAriaLabel:"Näytä kirjautumiseen liittyvien evästeiden tiedot",checkboxAriaDescription:"Kirjautumisevästeitä käytetään käyttäjän kirjautuessa palveluun."},sv:{title:"Inloggning",text:"Inloggningskakor används när användaren loggar in på tjänsten.",expandAriaLabel:"Visa information om inloggningskakor",checkboxAriaDescription:"Inloggningskakor används när användaren loggar in på tjänsten."},en:{title:"Login",text:"Login cookies are used when the user logs in to the service.",expandAriaLabel:"Show cookie information related to login",checkboxAriaDescription:"Login cookies are used when the user logs in to the service."}},commonTrackingCookieDescription_fi="Eväste kerää tietoa kävijän liikkeistä sivustolla.",commonTrackingCookieDescription_sv="Statistiksystemets kaka samlar information om hur webbplatsen används.",commonTrackingCookieDescription_en="This cookie is used to store a few details about the user such as the unique visitor ID.",keycloakUrl="tunnistus.hel.fi";return{texts:{sections:{main:{fi:{title:"{{siteName}} käyttää evästeitä",text:"Tämä sivusto käyttää välttämättömiä evästeitä sivun perustoimintojen ja suorituskyvyn varmistamiseksi. Lisäksi käytämme kohdennusevästeitä käyttäjäkokemuksen parantamiseksi, analytiikkaan ja yksilöidyn sisällön näyttämiseen."},sv:{title:"{{siteName}} använder kakor",text:"Denna webbplats använder obligatoriska kakor för att säkerställa de grundläggande funktionerna och prestandan. Dessutom använder vi inriktningskakor för bättre användarupplevelse, analytik och individualiserat innehåll."},en:{title:"{{siteName}} uses cookies",text:"This website uses required cookies to ensure the basic functionality and performance. In addition, we use targeting cookies to improve the user experience, perform analytics and display personalised content."}},details:{fi:{title:"Tietoa sivustolla käytetyistä evästeistä",text:"Sivustolla käytetyt evästeet on luokiteltu käyttötarkoituksen mukaan. Alla voit lukea eri luokista ja sallia tai kieltää evästeiden käytön."},sv:{title:"Information om kakor som används på webbplatsen",text:"Kakorna som används på webbplatsen har klassificerats enligt användningsändamål. Du kan läsa om de olika klasserna och acceptera eller förbjuda användningen av kakor."},en:{title:"About the cookies used on the website",text:"The cookies used on the website have been classified according to their intended use. Below, you can read about the various categories and accept or reject the use of cookies."}}},ui:{fi:{showSettings:"Näytä evästeasetukset",hideSettings:"Piilota asetukset",approveAllConsents:"Hyväksy kaikki evästeet",approveRequiredAndSelectedConsents:"Hyväksy valitut evästeet",approveOnlyRequiredConsents:"Hyväksy vain välttämättömät evästeet",settingsSaved:"Asetukset tallennettu!",readMore:"Lue lisää"},sv:{showSettings:"Visa kakinställningarna",hideSettings:"Stänga kakinställningarna",approveAllConsents:"Acceptera alla kakor",approveRequiredAndSelectedConsents:"Acceptera valda kakor",approveOnlyRequiredConsents:"Acceptera endast nödvändiga",settingsSaved:"Inställningar sparade!",readMore:"Läs mer"},en:{showSettings:"Show cookie settings",hideSettings:"Hide cookie settings",approveAllConsents:"Accept all cookies",approveRequiredAndSelectedConsents:"Accept selected cookies",approveOnlyRequiredConsents:"Accept required cookies only",settingsSaved:"Settings saved!",readMore:"Read more"}},tableHeadings:{fi:{name:"Nimi",hostName:"Evästeen asettaja",description:"Käyttötarkoitus",expiration:"Voimassaoloaika"},sv:{name:"Namn",hostName:"Den som lagrat kakan",description:"Användning",expiration:"Giltighetstid"},en:{name:"Name",hostName:"Cookie set by",description:"Purpose of use",expiration:"Period of validity"}}},language:{languageOptions:[{code:"fi",label:"Suomeksi (FI)"},{code:"sv",label:"Svenska (SV)"},{code:"en",label:"English (EN)"}],languageSelectorAriaLabel:"Kieli: Suomi. Vaihda kieli. Change language. Ändra språk."},requiredCookies:{fi:{title:"Välttämättömät evästeet",text:"Välttämättömien evästeiden käyttöä ei voi kieltää. Ne mahdollistavat sivuston toiminnan ja vaikuttavat käytettävyyteen.",checkboxAriaDescription:"Välttämättömien evästeiden käyttöä ei voi kieltää. Ne mahdollistavat sivuston toiminnan ja vaikuttavat käytettävyyteen."},sv:{title:"Nödvändig kakor",text:"Du kan inte förbjuda användningen av nödvändiga kakorna. De möjliggör webbplatsens funktioner och påverkar användbarheten.",checkboxAriaDescription:"Du kan inte förbjuda användningen av nödvändiga kakorna. De möjliggör webbplatsens funktioner och påverkar användbarheten."},en:{title:"Necessary cookies",text:"Necessary cookies cannot be rejected. They enable the proper functioning of the website and affect the usability.",checkboxAriaDescription:"Necessary cookies cannot be rejected. They enable the proper functioning of the website and affect the usability."}},optionalCookies:{fi:{title:"Valinnaiset evästeet",text:"Voit hyväksyä tai kieltää valinnaiset evästeet.",checkboxAriaDescription:"Voit hyväksyä tai kieltää valinnaiset evästeet."},sv:{title:"Valfri kakor",text:"Du kan acceptera eller förbjuda de valfria kakorna.",checkboxAriaDescription:"Du kan acceptera eller förbjuda de valfria kakorna."},en:{title:"Optional cookies",text:"You can accept or reject optional cookies.",checkboxAriaDescription:"You can accept or reject optional cookies."}},commonGroups:{login:(0,objectSpread2.Z)({},commonLoginGroupTranslations),marketing:{fi:{title:"Mainonta ja markkinointi",text:"Markkinointievästeiden avulla sivuston käyttäjille voidaan kohdentaa sisältöjä.",expandAriaLabel:"Näytä mainontaan ja markkinointiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Markkinointievästeiden avulla sivuston käyttäjille voidaan kohdentaa sisältöjä."},sv:{title:"Reklam och marknadsföring",text:"Med hjälp av marknadsföringskakor kan innehåll riktas till webbplatsens användare.",expandAriaLabel:"Visa information om reklam- och marknadsföringskakor",checkboxAriaDescription:"Med hjälp av marknadsföringskakor kan innehåll riktas till webbplatsens användare."},en:{title:"Advertising and marketing",text:"Marketing cookies can be used to target content to users of the website.",expandAriaLabel:"Show cookie information related to advertising and marketing",checkboxAriaDescription:"Marketing cookies can be used to target content to users of the website."}},preferences:{fi:{title:"Mieltymykset",text:"Mieltymysevästeet mukauttavat sivuston ulkoasua ja toimintaa käyttäjän tekemien valintojen perusteella.",expandAriaLabel:"Näytä mieltymyksiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Mieltymysevästeet mukauttavat sivuston ulkoasua ja toimintaa käyttäjän tekemien valintojen perusteella."},sv:{title:"Preferenser",text:"Preferenskakor ändrar webbplatsens utseende och funktioner enligt användarens tidigare val.",expandAriaLabel:"Visa information om preferenskakor",checkboxAriaDetextscription:"Preferenskakor ändrar webbplatsens utseende och funktioner enligt användarens tidigare val."},en:{title:"Preferences",text:"Preference cookies customise the layout and operation of the website based on the choices made by the user.",expandAriaLabel:"Show cookie information related to preferences",checkboxAriaDescription:"Preference cookies customise the layout and operation of the website based on the choices made by the user."}},userInputs:{fi:{title:"Käyttäjän syötteet",text:"Syöte-evästeillä voidaan tallentaa käyttäjän palveluun syöttämiä tietoja.",expandAriaLabel:"Näytä käyttäjän syötteisiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Syöte-evästeillä voidaan tallentaa käyttäjän palveluun syöttämiä tietoja."},sv:{title:"Användarens input",text:"Med inputskakor kan man lagra information som användaren matar in i tjänsten.",expandAriaLabel:"Visa information om inputskakor",checkboxAriaDescription:"Med inputskakor kan man lagra information som användaren matar in i tjänsten."},en:{title:"User input",text:"User-input cookies can be used to store information entered by the user in the service.",expandAriaLabel:"Show cookie information related to the user's input",checkboxAriaDescription:"User-input cookies can be used to store information entered by the user in the service."}},informationSecurity:{fi:{title:"Tietoturva",text:"Tietoturvaevästeet mahdollistavat turvallisen tiedonsiirron käyttäjän ja palvelun välillä.",expandAriaLabel:"Näytä tietoturvaan liittyvien evästeiden tiedot",checkboxAriaDescription:"Tietoturvaevästeet mahdollistavat turvallisen tiedonsiirron käyttäjän ja palvelun välillä."},sv:{title:"Datasäkerhet",text:"Datasäkerhetskakor möjliggör en säker dataöverföring mellan användaren och tjänsten.",expandAriaLabel:"Visa information om datasäkerhetskakor",checkboxAriaDescription:"Datasäkerhetskakor möjliggör en säker dataöverföring mellan användaren och tjänsten."},en:{title:"Information security",text:"Security cookies enable secure data transfer between the user and the service.",expandAriaLabel:"Show cookie information related to information security",checkboxAriaDescription:"Security cookies enable secure data transfer between the user and the service."}},socialMedia:{fi:{title:"Sosiaalinen media",text:"Sosiaalisen median evästeet liittyvät erilaisten sosiaalisen median palveluiden ominaisuuksiin.",expandAriaLabel:"Näytä sosiaaliseen mediaan liittyvien evästeiden tiedot",checkboxAriaDescription:"Sosiaalisen median evästeet liittyvät erilaisten sosiaalisen median palveluiden ominaisuuksiin."},sv:{title:"Sociala medier",text:"Sociala medier-kakor förknippas med olika sociala medie-tjänsters egenskaper.",expandAriaLabel:"Visa information om kakor för sociala medier",checkboxAriaDescription:"Sociala medier-kakor förknippas med olika sociala medie-tjänsters egenskaper."},en:{title:"Social media",text:"Social media cookies are related to the characteristics of various social media services.",expandAriaLabel:"Show cookie information related to social media",checkboxAriaDescription:"Social media cookies are related to the characteristics of various social media services."}},accessibility:{fi:{title:"Saavutettavuus",text:"Saavutettavuusevästeet mahdollistavat palvelun joitakin saavutettavuusominaisuuksia.",expandAriaLabel:"Näytä saavutettavuuteen liittyvien evästeiden tiedot",checkboxAriaDescription:"Saavutettavuusevästeet mahdollistavat palvelun joitakin saavutettavuusominaisuuksia."},sv:{title:"Tillgänglighet",text:"Tillgänglighetskakor möjliggör vissa egenskaper för tjänstens tillgänglighet.",expandAriaLabel:"Visa information om tillgänglighetskakor",checkboxAriaDescription:"Tillgänglighetskakor möjliggör vissa egenskaper för tjänstens tillgänglighet."},en:{title:"Accessibility",text:"Accessibility cookies enable some of the service's accessibility features.",expandAriaLabel:"Show cookie information related to accessibility",checkboxAriaDescription:"Accessibility cookies enable some of the service's accessibility features."}},deviceInfo:{fi:{title:"Laitetiedot",text:"Laitetietoevästeet sisältävät sellaisia käyttäjän laitteelta kerättyjä tietoja, joilla varmistetaan palvelun toiminta.",expandAriaLabel:"Näytä laitetietoihin liittyvien evästeiden tiedot",checkboxAriaDescription:"Laitetietoevästeet sisältävät sellaisia käyttäjän laitteelta kerättyjä tietoja, joilla varmistetaan palvelun toiminta."},sv:{title:"Enhetsuppgifter",text:"Kakor för enhetsuppgifterna innehåller sådana uppgifter som samlats in från användarens enhet med vilka tjänstens funktioner säkerställs.",expandAriaLabel:"Visa information om kakor för enhetsuppgifterna",checkboxAriaDescription:"Kakor för enhetsuppgifterna innehåller sådana uppgifter som samlats in från användarens enhet med vilka tjänstens funktioner säkerställs."},en:{title:"Device information",text:"Device information cookies contain information collected from the user's device that ensures the functionality of the service.",expandAriaLabel:"Show cookie information related to device information",checkboxAriaDescription:"Device information cookies contain information collected from the user's device that ensures the functionality of the service."}},chat:{fi:{title:"Chat-palvelut",text:"Chat-palveluiden evästeet mahdollistavat yhteydenpidon käyttäjän ja palvelun välillä.",expandAriaLabel:"Näytä chat-palveluihin liittyvien evästeiden tiedot",checkboxAriaDescription:"Chat-palveluiden evästeet mahdollistavat yhteydenpidon käyttäjän ja palvelun välillä."},sv:{title:"Chattjänster",text:"Kakor för chattjänsterna möjliggör kontakten mellan användaren och tjänsten.",expandAriaLabel:"Visa information om kakor för chattjänsterna",checkboxAriaDescription:"Kakor för chattjänsterna möjliggör kontakten mellan användaren och tjänsten."},en:{title:"Chat services",text:"Chat service cookies enable communication between the user and the service.",expandAriaLabel:"Show cookie information related to chat services",checkboxAriaDescription:"Chat service cookies enable communication between the user and the service."}},thirdParty:{fi:{title:"Kolmannen osapuolen palvelut",text:"Evästeet mahdollistavat ulkopuolisten palvelujen (kuten sosiaalisen median alustojen) toiminnan tällä sivustolla.",expandAriaLabel:"Näytä kolmansiin osapuoliin liittyvien evästeiden tiedot",checkboxAriaDescription:"Evästeet mahdollistavat ulkopuolisten palvelujen (kuten sosiaalisen median alustojen) toiminnan tällä sivustolla."},sv:{title:"Tredje parts tjänster",text:"Kakor möjliggör utomstående tjänsters (såsom sociala medie-plattformar) funktioner på denna webbplats.",expandAriaLabel:"Visa information om tredjepartskakor",checkboxAriaDescription:"Kakor möjliggör utomstående tjänsters (såsom sociala medie-plattformar) funktioner på denna webbplats."},en:{title:"Third-party services",text:"Cookies allow external services (such as social media platforms) to operate on this website.",expandAriaLabel:"Show cookie information related to third parties",checkboxAriaDescription:"Cookies allow external services (such as social media platforms) to operate on this website."}},content:{fi:{title:"Sisällön esittäminen",text:"Evästeitä hyödynnetään erilaisten sisältöjen näyttämiseen käyttäjälle.",expandAriaLabel:"Näytä sisällön esittämiseen liittyvien evästeiden tiedot",checkboxAriaDescription:"Evästeitä hyödynnetään erilaisten sisältöjen näyttämiseen käyttäjälle."},sv:{title:"Visning av innehåll",text:"Kakor utnyttjas för att visa olika innehåll för användaren.",expandAriaLabel:"Visa information om kakor för visning av innehåll",checkboxAriaDescription:"Kakor utnyttjas för att visa olika innehåll för användaren."},en:{title:"Content presentation",text:"Cookies are used to display various types of content to the user.",expandAriaLabel:"Show cookie information related to content presentation",checkboxAriaDescription:"Cookies are used to display various types of content to the user."}},location:{fi:{title:"Sijainti",text:"Sijaintievästeiden avulla voidaan hyödyntää käyttäjän laitteelta saatua sijaintitietoa (GPS).",expandAriaLabel:"Näytä sijaintiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Sijaintievästeiden avulla voidaan hyödyntää käyttäjän laitteelta saatua sijaintitietoa (GPS)."},sv:{title:"Läge",text:"Med hjälp av lägeskakor kan man utnyttja lägesdata som fåtts från användarens enhet (GPS).",expandAriaLabel:"Visa information om lägeskakor",checkboxAriaDescription:"Med hjälp av lägeskakor kan man utnyttja lägesdata som fåtts från användarens enhet (GPS)."},en:{title:"Location",text:"Location cookies can be used to utilise location information (GPS) received from the user's device.",expandAriaLabel:"Show cookie information related to location",checkboxAriaDescription:"Location cookies can be used to utilise location information (GPS) received from the user’s device."}},loadBalancing:{fi:{title:"Kuormantasaus",text:"Kuormantasausevästeiden avulla varmistetaan, että palvelu latautuu ja toimii nopeasti ja tehokkaasti.",expandAriaLabel:"Näytä kuormantasaukseen liittyvien evästeiden tiedot",checkboxAriaDescription:"Kuormantasausevästeiden avulla varmistetaan, että palvelu latautuu ja toimii nopeasti ja tehokkaasti."},sv:{title:"Belastningsutjämning",text:"Med hjälp av belastningsutjämningskakor säkerställer man att tjänsten laddas och fungerar snabbt och effektivt.",expandAriaLabel:"Visa information om belastningsutjämningskakor",checkboxAriaDescription:"Med hjälp av belastningsutjämningskakor säkerställer man att tjänsten laddas och fungerar snabbt och effektivt."},en:{title:"Load balancing",text:"Load-balancing cookies ensure that the service loads and works quickly and efficiently.",expandAriaLabel:"Show cookie information related to load-balancing",checkboxAriaDescription:"Load-balancing cookies ensure that the service loads and works quickly and efficiently."}},essential:{fi:{title:"Perustoimintoihin liittyvät evästeet",text:"Perustoimintoihin liittyviä evästeitä ei voi hylätä. Ne mahdollistavat sivuston kunnollisen toimivuuden ja vaikuttavat käytettävyyteen.",expandAriaLabel:"Näytä perustoimintoihin liittyvien evästeiden tiedot",checkboxAriaDescription:"Sivusto ei toimi ilman näitä"},sv:{title:"Kakor för grundläggande funktioner",text:"Du kan inte förbjuda användningen av kakor för grundläggande funktioner. De möjliggör webbplatsens funktioner och påverkar användbarheten.",expandAriaLabel:"Visa information om kakor för grundläggande funktioner",checkboxAriaDescription:"Du kan inte förbjuda användningen av kakor för grundläggande funktioner. De möjliggör webbplatsens funktioner och påverkar användbarheten."},en:{title:"Cookies related to basic functionalities",text:"Cookies related to basic functionalities cannot be rejected. They enable the proper functioning of the website and affect the usability.",expandAriaLabel:"Show cookie information related to basic functionalities",checkboxAriaDescription:"Cookies related to basic functionalities cannot be rejected. They enable the proper functioning of the website and affect the usability"}},statistics:{fi:{title:"Tilastointi",text:"Tilastointievästeiden keräämää tietoa käytetään verkkosivuston kehittämiseen.",expandAriaLabel:"Näytä tilastointiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Tilastointievästeiden keräämää tietoa käytetään verkkosivuston kehittämiseen."},sv:{title:"Statistik",text:"Data från statistikkakorna används för att utveckla webbplatsen.",expandAriaLabel:"Visa information om statistikkakor",checkboxAriaDescription:"Data från statistikkakorna används för att utveckla webbplatsen."},en:{title:"Statistics",text:"The information collected by statistics cookies is used to develop the website.",expandAriaLabel:"Show cookie information related to statistics",checkboxAriaDescription:"The information collected by statistics cookies is used to develop the website."}},sharedConsents:{fi:{title:"Yhteiset evästeet",text:"Helsingin kaupungin palvelut käyttävät yhteisiä evästeitä. Tallennamme nämä suostumukset, jottei sinun tarvitse hyväksyä samoja evästeitä uudelleen kaupungin muissa palveluissa.",expandAriaLabel:"Näytä yhteisiin evästesuostumuksiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Helsingin kaupungin palvelut käyttävät yhteisiä evästeitä. Tallennamme nämä suostumukset, jottei sinun tarvitse hyväksyä samoja evästeitä uudelleen muissa kaupungin palveluissa."},sv:{title:"Gemensamma kakor",text:"Helsingfors stads tjänster använder gemensamma kakor . Vi lagrar dessa samtycken så att du inte behöver godkänna samma kakor igen i stadens andra tjänster.",expandAriaLabel:"Visa information om kakor för gemensamt samtycke",checkboxAriaDescription:"Helsingfors stads tjänster använder gemensamma kakor . Vi lagrar dessa samtycken så att du inte behöver godkänna samma kakor igen i stadens andra tjänster."},en:{title:"Shared consent",text:"City of Helsinki services use shared consent. We will store these consents so that you do not have to accept the same cookies again on other City services.",expandAriaLabel:"Show cookie information related to shared cookie consent",checkboxAriaDescription:"City of Helsinki services use shared consent. We will store these consents so that you do not have to accept the same cookies again on other City services."}},language:{fi:{title:"Kielivalinnat",text:"Kielievästeisiin tallennetaan käyttäjän tekemät kielivalinnat, jotta valittu kieli säilyisi.",expandAriaLabel:"Näytä kielievästeisiin liittyvien evästeiden tiedot",checkboxAriaDescription:"Kielievästeisiin tallennetaan käyttäjän tekemät kielivalinnat, jotta valittu kieli säilyisi."},sv:{title:"Språkval",text:"I språkkakorna lagras användarens språkval för att minnas vilket språk som har valts.",expandAriaLabel:"Visa information om kakor för språkvalkakor",checkboxAriaDescription:"I språkkakorna lagras användarens språkval för att minnas vilket språk som har valts."},en:{title:"Language settings",text:"Language cookies store the language selections by the user to remember the preferred language.",expandAriaLabel:"Show cookie information related to language settings",checkboxAriaDescription:"Language cookies store the language selections by the user to remember the preferred language."}},tunnistamoLogin:(0,objectSpread2.Z)((0,objectSpread2.Z)({},commonLoginGroupTranslations),{},{cookies:[{commonCookie:"keycloak"},{commonCookie:"keycloak-legacy"},{commonCookie:"keycloak-generic"},{commonCookie:"tunnistamo"},{commonCookie:"tunnistamo-sessionid"},{commonCookie:"suomifi-session"},{commonCookie:"suomifi-saml"},{commonCookie:"suomifi-shibstate"},{commonCookie:"suomifi-shibsession"},{commonCookie:"suomifi-shib-idp-session"},{commonCookie:"suomifi-logtag"}]})},commonCookies:{helConsentCookie:{id:"SET_IN_CODE",hostName:"*.hel.fi",commonGroup:"SET_IN_CODE",fi:{name:"Evästesuostumukset",description:"Sivusto käyttää tätä evästettä tietojen tallentamiseen siitä, ovatko kävijät antaneet hyväksyntänsä tai kieltäytyneet evästeiden käytöstä.",expiration:"1 vuosi"},sv:{name:"Samtycken till kakor",description:"Webbplatsen använder denna kaka för att lagra information om huruvida besökare har godkänt användningen av kakor eller inte.",expiration:"Ett år"},en:{name:"Cookie consents",description:"Used by hel.fi to store information about whether visitors have given or declined the use of cookie categories used on the hel.fi site.",expiration:"1 year"}},cookiehub:{id:"cookiehub",hostName:"cookiehub.com",name:"cookiehub",fi:{description:"Mahdollistaa evästehallinnan hel.fi sivuilla.",expiration:"365 päivää"},sv:{description:"Möjliggör hantering av kakor på hel.fi webbplatsen.",expiration:"365 dagar"},en:{description:"Used by CookieHub to store information about whether visitors have given or declined the use of cookie categories used on the hel.fi site.",expiration:"365 days"}},keycloak:(0,objectSpread2.Z)({id:"keycloak",hostName:keycloakUrl,name:"AUTH_SESSION_ID"},commonLoginTranslations),matomo:{id:"matomo",hostName:"*.hel.fi",name:"_pk_id.*",fi:{description:commonTrackingCookieDescription_fi,expiration:"393 päivää"},sv:{description:commonTrackingCookieDescription_sv,expiration:"393 dagar"},en:{description:commonTrackingCookieDescription_en,expiration:"393 days"}},matomoSession:{id:"matomo-session",hostName:"*.hel.fi",name:"_pk_ses*",fi:{description:commonTrackingCookieDescription_fi,expiration:"30 minuuttia"},sv:{description:commonTrackingCookieDescription_sv,expiration:"30 minuter"},en:{description:commonTrackingCookieDescription_en,expiration:"30 minutes"}},matomoConsent:{id:"matomo-cookie-consent",hostName:"*.hel.fi",name:"mtm_.*",fi:{description:"Evästeeseen tallennetaan suostumus tilastointievästeisiin.",expiration:"400 päivää"},sv:{description:"Kakan lagrar samtycke för användning av statistikkakorna.",expiration:"400 dagar"},en:{description:"Cookie stores consent for using analytics cookies.",expiration:"400 days"}},"cms-session":{id:"cms-session",hostName:"hel.fi",name:"SSESS*",fi:{description:"Sisällönhallintajärjestelmän toimintaan liittyvä eväste.",expiration:"23 päivää"},sv:{description:"En kaka för driften av innehållshanteringssystemet.",expiration:"23 dagar"},en:{description:"A cookie related to the operation of the content management system.",expiration:"23 days"}},tunnistamo:(0,objectSpread2.Z)({id:"tunnistamo",hostName:"api.hel.fi",name:"sso-sessionid"},commonLoginTranslations),"suomifi-session":(0,objectSpread2.Z)({id:"suomifi-session",hostName:"suomi.fi",name:"JSESSIONID"},commonLoginTranslations),"suomifi-logtag":(0,objectSpread2.Z)({id:"suomifi-logtag",hostName:"suomi.fi",name:"E-Identification-LogTag"},commonLoginTranslations),"suomifi-saml":(0,objectSpread2.Z)({id:"suomifi-saml",hostName:"suomi.fi",name:"_opensaml_req_cookie*"},commonLoginTranslations),"suomifi-shibstate":(0,objectSpread2.Z)({id:"suomifi-shibstate",hostName:"suomi.fi",name:"_shibstate_*"},commonLoginTranslations),"suomifi-shibsession":(0,objectSpread2.Z)({id:"suomifi-shibsession",hostName:"suomi.fi",name:"_shibsession_*"},commonLoginTranslations),"suomifi-shib-idp-session":(0,objectSpread2.Z)({id:"suomifi-shib-idp-session",hostName:"suomi.fi",name:"shib_idp_session"},commonLoginTranslations),"tunnistamo-sessionid":(0,objectSpread2.Z)({id:"tunnistamo-sessionid",hostName:"api.hel.fi",name:"tunnistamo_prod-sessionid"},commonLoginTranslations),"keycloak-legacy":(0,objectSpread2.Z)({id:"keycloak-legacy",hostName:keycloakUrl,name:"AUTH_SESSION_ID_LEGACY"},commonLoginTranslations),"keycloak-generic":(0,objectSpread2.Z)({id:"keycloak-generic",hostName:keycloakUrl,name:"KC_*"},commonLoginTranslations),"tunnistamo-csrftoken":(0,objectSpread2.Z)({id:"tunnistamo-csrftoken",hostName:"api.hel.fi",name:"tunnistamo_prod-csrftoken"},commonSecurityControlTranslations),"profiili-csrftoken":(0,objectSpread2.Z)({id:"profiili-csrftoken",hostName:"api.hel.fi",name:"profiili-prod-csrftoken"},commonSecurityControlTranslations),"tunnistamo-login-loadbalancer":(0,objectSpread2.Z)({id:"tunnistamo-login-loadbalancer",hostName:"".concat("api.hel.fi",", ").concat(keycloakUrl)},{fi:{name:"Satunnainen 32 merkin pituinen merkkijono",description:"Verkkoliikenteen tekninen reititys.",expiration:"Istunto"},sv:{name:"En slumpmässig teckensträng med 32 tecken",description:"Teknisk routning av webbtrafiken.",expiration:"Session"},en:{name:"A random 32-character long string",description:"Technical routing of requests.",expiration:"Session"}}),"keycloak-language":(0,objectSpread2.Z)({id:"keycloak-language",name:"KEYCLOAK_LOCALE",hostName:keycloakUrl},commonLanguageTranslations),"suomifi-language":(0,objectSpread2.Z)({id:"suomifi-language",name:"E-Identification-Lang",hostName:"suomi.fi"},commonLanguageTranslations)}}}();function getTexts(language,siteName){var texts=commonContent.texts,textContent={sections:{main:(0,objectSpread2.Z)({},texts.sections.main[language]),details:(0,objectSpread2.Z)({},texts.sections.details[language])},ui:(0,objectSpread2.Z)({},texts.ui[language]),tableHeadings:(0,objectSpread2.Z)({},texts.tableHeadings[language])};return textContent.sections.main.title=textContent.sections.main.title.replace("{{siteName}}",siteName),textContent}function getLanguage(lang,overrides){var language=commonContent.language;return(0,objectSpread2.Z)((0,objectSpread2.Z)({},language),{},{current:lang,onLanguageChange:function onLanguageChange(){}},overrides)}function getCommonCookieGroup(id){var commonGroups=commonContent.commonGroups;if(!commonGroups[id])throw new Error("Unknown common consent group ".concat(id));return commonGroups[id]}function mergeCookieGroupCookieSources(groupSource){var cookiesFromCommonGroup=groupSource.commonGroup?function getCommonCookieGroupTextsCookies(id){return getCommonCookieGroup(id).cookies||[]}(groupSource.commonGroup):[],cookiesFromSource=groupSource.cookies||[];return[].concat((0,toConsumableArray.Z)(cookiesFromCommonGroup),(0,toConsumableArray.Z)(cookiesFromSource))}function getCommonCookie(language,id){var commonCookies=commonContent.commonCookies;if(!commonCookies[id])throw new Error("Unknown common cookie ".concat(id));var dataWithTranslations=commonCookies[id];return(0,objectSpread2.Z)({id:dataWithTranslations.id,hostName:dataWithTranslations.hostName,name:dataWithTranslations.name},commonCookies[id][language])}function setPropsToObject(targetObject,path,value){if(path.includes("_"))throw new Error('String "_" is not allowed in the path to avoid prototype pollution');var splitPath=path.split("."),lastPath=splitPath.pop(),targetPointInObject=splitPath.reduce((function(currentObj,currentPath){return void 0===currentObj[currentPath]&&(currentObj[currentPath]=Object.create(null)),currentObj[currentPath]}),targetObject);return lastPath&&(targetPointInObject[lastPath]=value),targetObject}function mergeObjects(target,source,paths){paths.forEach((function(path){var pickedFromSource=lodash_get_default()(source,path);if(pickedFromSource){var pickedFromTarget=lodash_get_default()(target,path);setPropsToObject(target,path,"string"==typeof pickedFromSource?pickedFromSource||pickedFromTarget:(0,objectSpread2.Z)((0,objectSpread2.Z)({},pickedFromTarget),pickedFromSource))}}))}function buildCookieGroups(props){var _props$requiredCookie,_props$optionalCookie,_props$requiredCookie2,_props$optionalCookie2,requiredCookies=[],optionalCookies=[],groupMap=new Map,currentLanguage=props.currentLanguage,noCommonConsentCookie=props.noCommonConsentCookie,helConsentCookieFound=!1,parseGroup=function parseGroup(groupSource,isRequired){var consentGroup,mapId=groupSource.commonGroup||groupSource.id||groupSource.title;if(!(consentGroup=groupMap.get(mapId))){if(groupSource.commonGroup){["title","text","expandAriaLabel","checkboxAriaDescription"].forEach((function(key){if(groupSource[key])throw new Error("Common group texts cannot be overridden.")}));var groupTexts=function getCommonCookieGroupTexts(language,id){return getCommonCookieGroup(id)[language]}(currentLanguage,groupSource.commonGroup);consentGroup=(0,objectSpread2.Z)((0,objectSpread2.Z)({},groupTexts),{},{cookies:[]})}else consentGroup={title:groupSource.title,text:groupSource.text,expandAriaLabel:groupSource.expandAriaLabel,checkboxAriaDescription:groupSource.checkboxAriaDescription,cookies:[]};groupMap.set(mapId,consentGroup),isRequired?requiredCookies.push(consentGroup):optionalCookies.push(consentGroup)}var cookies=mergeCookieGroupCookieSources(groupSource);cookies.length&&cookies.forEach((function(cookieSource){var _ref=cookieSource,commonCookie=(_ref.commonGroup,_ref.groupId,_ref.commonCookie),cookieProps=(0,objectWithoutProperties.Z)(_ref,_excluded);commonCookie&&["id","name","hostName","description","expiration"].forEach((function(key){if(cookieProps[key])throw new Error("Common cookie properties cannot be overridden.")}));var cookieData=commonCookie?getCommonCookie(currentLanguage,commonCookie):cookieProps;consentGroup.cookies.push(cookieData)}))},parseCookie=function parseCookie(cookie,isRequired){var commonGroup=cookie.commonGroup,groupId=cookie.groupId;if(!(commonGroup||groupId))throw new Error("Cannot add single cookie without a group");parseGroup({commonGroup,id:groupId,cookies:[cookie]},isRequired)};if(null!==(_props$requiredCookie=props.requiredCookies)&&void 0!==_props$requiredCookie&&_props$requiredCookie.groups&&props.requiredCookies.groups.forEach((function(group){parseGroup(group,!0)})),null!==(_props$optionalCookie=props.optionalCookies)&&void 0!==_props$optionalCookie&&_props$optionalCookie.groups&&props.optionalCookies.groups.forEach((function(group){parseGroup(group,!1)})),null!==(_props$requiredCookie2=props.requiredCookies)&&void 0!==_props$requiredCookie2&&_props$requiredCookie2.cookies&&props.requiredCookies.cookies.forEach((function(cookie){parseCookie(cookie,!0),cookie.id===COOKIE_NAME&&(helConsentCookieFound=!0)})),null!==(_props$optionalCookie2=props.optionalCookies)&&void 0!==_props$optionalCookie2&&_props$optionalCookie2.cookies&&props.optionalCookies.cookies.forEach((function(cookie){parseCookie(cookie,!1),cookie.id===COOKIE_NAME&&(helConsentCookieFound=!0)})),!noCommonConsentCookie&&!helConsentCookieFound){var consentCookie=getCommonCookie(currentLanguage,"helConsentCookie");consentCookie.id=COOKIE_NAME,parseGroup({commonGroup:"sharedConsents",cookies:[consentCookie]},!0)}return{requiredCookies,optionalCookies}}function buildConsentCategories(description,overrides,groups){if(overrides||groups&&groups.length){var data=(0,objectSpread2.Z)({},description);return overrides&&mergeObjects(data,overrides,["title","text","checkboxAriaDescription"]),groups&&(data.groups=groups),data}}function createContent(props){var siteName=props.siteName,language=props.language,currentLanguage=props.currentLanguage,optionalCookies=props.optionalCookies,requiredCookies=props.requiredCookies,focusTargetSelector=props.focusTargetSelector,content={texts:getTexts(currentLanguage,siteName),language:getLanguage(currentLanguage,language),focusTargetSelector};props.texts&&mergeObjects(content.texts,props.texts,["sections.main","sections.details","ui","tableHeadings"]);var consentGroups=buildCookieGroups(props),categoryDescriptions=function getCategoryDescriptions(language){var requiredCookies=commonContent.requiredCookies,optionalCookies=commonContent.optionalCookies;return{requiredCookies:requiredCookies[language],optionalCookies:optionalCookies[language]}}(currentLanguage);return content.optionalCookies=buildConsentCategories(categoryDescriptions.optionalCookies,optionalCookies,consentGroups.optionalCookies),content.requiredCookies=buildConsentCategories(categoryDescriptions.requiredCookies,requiredCookies,consentGroups.requiredCookies),content}var jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),ContentContext=(0,react.createContext)((0,objectSpread2.Z)((0,objectSpread2.Z)({},{language:{},texts:{}}),{},{callbacks:{}})),forceFocusToElement=function forceFocusToElement(elementSelector){var focusTarget=document.querySelector(elementSelector);focusTarget&&focusTarget.focus&&(focusTarget.focus(),document.activeElement!==focusTarget&&(focusTarget.setAttribute("tabindex","-1"),focusTarget.focus()))},Provider=function Provider(_ref){var children=_ref.children,contentSource=_ref.contentSource,language=contentSource.currentLanguage,contextData=(0,react.useMemo)((function(){var content=createContent(contentSource),callbacks={onAllConsentsGiven:contentSource.onAllConsentsGiven,onConsentsParsed:contentSource.onConsentsParsed};return(0,objectSpread2.Z)((0,objectSpread2.Z)({},content),{},{callbacks})}),[language]);return(0,jsx_runtime.jsx)(ContentContext.Provider,{value:contextData,children})},useCookieContentContext=function useCookieContentContext(){return(0,react.useContext)(ContentContext)},useUiTexts=function useUiTexts(){return useCookieContentContext().texts.ui},useSectionTexts=function useSectionTexts(section){return useCookieContentContext().texts.sections[section]},useTableData=function useTableData(){return useCookieContentContext().texts.tableHeadings},useContentLanguage=function useContentLanguage(){return useCookieContentContext().language};try{forceFocusToElement.displayName="forceFocusToElement",forceFocusToElement.__docgenInfo={description:"",displayName:"forceFocusToElement",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/contexts/ContentContext.tsx#forceFocusToElement"]={docgenInfo:forceFocusToElement.__docgenInfo,name:"forceFocusToElement",path:"src/components/cookieConsent/contexts/ContentContext.tsx#forceFocusToElement"})}catch(__react_docgen_typescript_loader_error){}try{Provider.displayName="Provider",Provider.__docgenInfo={description:"",displayName:"Provider",props:{cookieDomain:{defaultValue:null,description:"",name:"cookieDomain",required:!1,type:{name:"string"}},contentSource:{defaultValue:null,description:"",name:"contentSource",required:!0,type:{name:"CookieContentSource"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/contexts/ContentContext.tsx#Provider"]={docgenInfo:Provider.__docgenInfo,name:"Provider",path:"src/components/cookieConsent/contexts/ContentContext.tsx#Provider"})}catch(__react_docgen_typescript_loader_error){}try{useSectionTexts.displayName="useSectionTexts",useSectionTexts.__docgenInfo={description:"",displayName:"useSectionTexts",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/contexts/ContentContext.tsx#useSectionTexts"]={docgenInfo:useSectionTexts.__docgenInfo,name:"useSectionTexts",path:"src/components/cookieConsent/contexts/ContentContext.tsx#useSectionTexts"})}catch(__react_docgen_typescript_loader_error){}var ConsentContext=(0,react.createContext)({hasUserHandledAllConsents:function hasUserHandledAllConsents(){return!1},onAction:function onAction(){},getApprovalPercentageForOptional:function getApprovalPercentageForOptional(){return 0},areGroupConsentsApproved:function areGroupConsentsApproved(){return!1}}),getConsentsFromCookieGroup=function getConsentsFromCookieGroup(groups){return groups.reduce((function(ids,currentGroup){return currentGroup.cookies.forEach((function(consentData){ids.push(consentData.id)})),ids}),[])},ConsentContext_Provider=function Provider(_ref){var cookieDomain=_ref.cookieDomain,children=_ref.children,content=useCookieContentContext(),cookies=(0,react.useMemo)((function(){return{requiredCookies:content.requiredCookies,optionalCookies:content.optionalCookies}}),[]),requiredConsents=cookies.requiredCookies?getConsentsFromCookieGroup(cookies.requiredCookies.groups):void 0,optionalConsents=cookies.optionalCookies?getConsentsFromCookieGroup(cookies.optionalCookies.groups):void 0,consentController=(0,react.useMemo)((function(){return createConsentController({requiredConsents,optionalConsents,cookieDomain})}),[]),_useState=(0,react.useState)(0),forceUpdate=(0,slicedToArray.Z)(_useState,2)[1],reRender=(0,react.useCallback)((function(){forceUpdate((function(p){return p+1}))}),[forceUpdate]),consentControllerFunctions=(0,react.useMemo)((function(){var hasUserHandledAllConsents=function hasUserHandledAllConsents(){return 0===consentController.getRequiredWithoutConsent().length&&0===consentController.getUnhandledConsents().length},mergeConsents=function mergeConsents(){return(0,objectSpread2.Z)((0,objectSpread2.Z)({},consentController.getRequired()),consentController.getOptional())},notifyOnAllConsentsGiven=function notifyOnAllConsentsGiven(){content.callbacks.onAllConsentsGiven&&hasUserHandledAllConsents()&&content.callbacks.onAllConsentsGiven(mergeConsents()),content.focusTargetSelector&&forceFocusToElement(content.focusTargetSelector)},setOptional=function setOptional(approved){Object.keys(consentController.getOptional()).forEach((function(optionalConsent){consentController.update(optionalConsent,approved)}))},deselectOptional=function deselectOptional(){setOptional(!1)};return{setOptional,areGroupConsentsApproved:function areGroupConsentsApproved(consentData){var optionalConsentList=consentController.getOptional();return!consentData.reduce((function(hasUnApprovedConsent,consent){return hasUnApprovedConsent||!0!==optionalConsentList[consent.id]}),!1)},getApprovalPercentageForOptional:function getApprovalPercentageForOptional(){var counter=0,approved=0;return Object.values(consentController.getOptional()).forEach((function(isApproved){counter+=1,isApproved&&(approved+=1)})),approved/counter},onAction:function onAction(action,consents,value){"approveAll"===action?function approveAllAndSave(){consentController.approveAll(),consentController.save(),notifyOnAllConsentsGiven()}():"approveRequired"===action?function approveOnlyRequiredAndSave(){deselectOptional(),consentController.approveRequired(),consentController.save(),notifyOnAllConsentsGiven()}():"approveSelectedAndRequired"===action?function approveRequiredAndSaveAllGivenConsents(){consentController.approveRequired(),consentController.save(),notifyOnAllConsentsGiven()}():"changeCookieGroupConsents"===action&&consents?consents.forEach((function(consent){consentController.update(consent,!!value)})):"approveOptional"===action?function selectOptional(){setOptional(!0)}():"unapproveOptional"===action&&deselectOptional(),reRender()},hasUserHandledAllConsents,mergeConsents}}),[consentController,reRender]),contextData={hasUserHandledAllConsents:consentControllerFunctions.hasUserHandledAllConsents,onAction:consentControllerFunctions.onAction,getApprovalPercentageForOptional:consentControllerFunctions.getApprovalPercentageForOptional,areGroupConsentsApproved:consentControllerFunctions.areGroupConsentsApproved};return content.callbacks.onConsentsParsed&&(content.callbacks.onConsentsParsed(consentControllerFunctions.mergeConsents(),consentControllerFunctions.hasUserHandledAllConsents()),content.callbacks.onConsentsParsed=void 0),(0,jsx_runtime.jsx)(ConsentContext.Provider,{value:contextData,children})},useCookieConsentContext=function useCookieConsentContext(){return(0,react.useContext)(ConsentContext)},useConsentActions=function useConsentActions(){return(0,react.useContext)(ConsentContext).onAction},useFocusShift=function useFocusShift(){var focusTargetSelector=useCookieContentContext().focusTargetSelector;if(!focusTargetSelector)throw new Error("Cookie consent modal requires a content.focusTargetSelector to be set");return(0,react.useCallback)((function(){forceFocusToElement(focusTargetSelector)}),[focusTargetSelector])};try{getConsentsFromCookieGroup.displayName="getConsentsFromCookieGroup",getConsentsFromCookieGroup.__docgenInfo={description:"",displayName:"getConsentsFromCookieGroup",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/contexts/ConsentContext.tsx#getConsentsFromCookieGroup"]={docgenInfo:getConsentsFromCookieGroup.__docgenInfo,name:"getConsentsFromCookieGroup",path:"src/components/cookieConsent/contexts/ConsentContext.tsx#getConsentsFromCookieGroup"})}catch(__react_docgen_typescript_loader_error){}try{ConsentContext_Provider.displayName="Provider",ConsentContext_Provider.__docgenInfo={description:"",displayName:"Provider",props:{cookieDomain:{defaultValue:null,description:"",name:"cookieDomain",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/contexts/ConsentContext.tsx#Provider"]={docgenInfo:ConsentContext_Provider.__docgenInfo,name:"Provider",path:"src/components/cookieConsent/contexts/ConsentContext.tsx#Provider"})}catch(__react_docgen_typescript_loader_error){}function CookieConsentContext(props){var cookieDomain=props.cookieDomain,contentSource=props.contentSource,children=props.children;return(0,jsx_runtime.jsx)(Provider,{contentSource,children:(0,jsx_runtime.jsx)(ConsentContext_Provider,{cookieDomain,children})})}try{CookieConsentContext.displayName="CookieConsentContext",CookieConsentContext.__docgenInfo={description:"",displayName:"CookieConsentContext",props:{contentSource:{defaultValue:null,description:"",name:"contentSource",required:!0,type:{name:"CookieContentSource"}},cookieDomain:{defaultValue:null,description:"",name:"cookieDomain",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/contexts/ContextComponent.tsx#CookieConsentContext"]={docgenInfo:CookieConsentContext.__docgenInfo,name:"CookieConsentContext",path:"src/components/cookieConsent/contexts/ContextComponent.tsx#CookieConsentContext"})}catch(__react_docgen_typescript_loader_error){}const CookieConsent_module={accordionButton:"CookieConsent_accordionButton__xSVea",container:"CookieConsent_container__dsEn5",aligner:"CookieConsent_aligner__BpPTD",animateIn:"CookieConsent_animateIn__M+nBi",page:"CookieConsent_page__2AA1O",buttons:"CookieConsent_buttons__g7E1s",emulatedH1:"CookieConsent_emulatedH1__OLXR7 helpers_heading-l__ZCbCh",emulatedH2:"CookieConsent_emulatedH2__T4JhT helpers_heading-m__7mAiU",content:"CookieConsent_content__RLmY5",languageSwitcher:"CookieConsent_languageSwitcher__sYmnz",languageSelectorOverride:"CookieConsent_languageSelectorOverride__P+USi",mainContent:"CookieConsent_mainContent__ii5XZ",textContent:"CookieConsent_textContent__iwsea",list:"CookieConsent_list__imaJ6",detailsAccordionButton:"CookieConsent_detailsAccordionButton__YIPsP",accordionButtonSettingsClosed:"CookieConsent_accordionButtonSettingsClosed__mOY6L",consentCategory:"CookieConsent_consentCategory__eqNHR",consentGroup:"CookieConsent_consentGroup__tB53y",consentGroupContent:"CookieConsent_consentGroupContent__MJ36h",titleWithCheckbox:"CookieConsent_titleWithCheckbox__YRs6y",dataTableContainer:"CookieConsent_dataTableContainer__2eIGW",saveNotification:"CookieConsent_saveNotification__y0AGx",readMoreButton:"CookieConsent_readMoreButton__YYUGw",shrinkOnBlur:"CookieConsent_shrinkOnBlur__ZB-Xt",visuallyHiddenWithoutFocus:"CookieConsent_visuallyHiddenWithoutFocus__Inl2e",hiddenWithoutFocus:"CookieConsent_hiddenWithoutFocus__Sn3EG"};var dist_import=__webpack_require__("../../node_modules/@react-aria/visually-hidden/dist/import.mjs"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),useAccordion=__webpack_require__("./src/components/accordion/useAccordion.ts"),IconAngleUp=__webpack_require__("./src/icons/IconAngleUp.tsx"),IconAngleDown=__webpack_require__("./src/icons/IconAngleDown.tsx"),Card=__webpack_require__("./src/components/card/Card.tsx"),Table=__webpack_require__("./src/components/table/Table.tsx"),classNames=__webpack_require__("./src/utils/classNames.ts");function ConsentGroupDataTable(props){var tableHeadings=useTableData(),consents=props.consents,id=props.id,cols=(0,react.useMemo)((function(){return Object.entries(tableHeadings).map((function(entry){var _entry=(0,slicedToArray.Z)(entry,2);return{key:_entry[0],headerName:_entry[1]}}))}),[tableHeadings]),rows=(0,react.useMemo)((function(){return consents.map((function(consent){return consent}))}),[consents]);return(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(CookieConsent_module.dataTableContainer),children:(0,jsx_runtime.jsx)(Table.i,{id,"data-testid":id,cols,rows,indexKey:"id",renderIndexCol:!1,theme:{"--header-background-color":"var(--color-black-90)"},dense:!0})})}try{ConsentGroupDataTable.displayName="ConsentGroupDataTable",ConsentGroupDataTable.__docgenInfo={description:"",displayName:"ConsentGroupDataTable",props:{consents:{defaultValue:null,description:"",name:"consents",required:!0,type:{name:"CookieData[]"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/consentGroupDataTable/ConsentGroupDataTable.tsx#ConsentGroupDataTable"]={docgenInfo:ConsentGroupDataTable.__docgenInfo,name:"ConsentGroupDataTable",path:"src/components/cookieConsent/consentGroupDataTable/ConsentGroupDataTable.tsx#ConsentGroupDataTable"})}catch(__react_docgen_typescript_loader_error){}function ConsentGroup(props){var group=props.group,isRequired=props.isRequired,id=props.id,_useAccordion=(0,useAccordion.A)({initiallyOpen:!1}),isOpen=_useAccordion.isOpen,buttonProps=_useAccordion.buttonProps,contentProps=_useAccordion.contentProps,groupConsents=group.cookies,cookieConsentContext=useCookieConsentContext(),triggerAction=useConsentActions(),areAllApproved=isRequired||cookieConsentContext.areGroupConsentsApproved(groupConsents),title=group.title,text=group.text,checkboxAriaDescription=group.checkboxAriaDescription,expandAriaLabel=group.expandAriaLabel,Icon=isOpen?IconAngleUp.IconAngleUp:IconAngleDown.IconAngleDown,getGroupIdentifier=function getGroupIdentifier(suffix){return"".concat(id,"-").concat(suffix)},checkboxId=getGroupIdentifier("checkbox"),descriptionElementId=getGroupIdentifier("description"),checkboxProps={onChange:isRequired?function(){}:function(){return triggerAction("changeCookieGroupConsents",groupConsents.map((function(consent){return consent.id})),!areAllApproved)},disabled:isRequired,checked:areAllApproved,id:checkboxId,"data-testid":checkboxId,name:checkboxId,label:title,"aria-describedby":descriptionElementId,style:{"--label-font-size":"var(--fontsize-heading-s)"}};return(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.consentGroup,children:[(0,jsx_runtime.jsx)("div",{className:CookieConsent_module.titleWithCheckbox,children:(0,jsx_runtime.jsx)(Checkbox.X,(0,objectSpread2.Z)({},checkboxProps))}),(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.consentGroupContent,children:[(0,jsx_runtime.jsx)("p",{"aria-hidden":!0,children:text}),(0,jsx_runtime.jsx)(dist_import.T,{id:descriptionElementId,children:checkboxAriaDescription||text}),(0,jsx_runtime.jsx)("button",(0,objectSpread2.Z)((0,objectSpread2.Z)({type:"button",className:CookieConsent_module.accordionButton,"data-testid":getGroupIdentifier("details-toggler"),"aria-label":expandAriaLabel},buttonProps),{},{children:(0,jsx_runtime.jsx)(Icon,{"aria-hidden":!0})})),(0,jsx_runtime.jsx)(Card.Z,(0,objectSpread2.Z)((0,objectSpread2.Z)({},contentProps),{},{"aria-label":title,theme:{"--padding-horizontal":"0","--padding-vertical":"0"},children:(0,jsx_runtime.jsx)(ConsentGroupDataTable,{consents:groupConsents,id:getGroupIdentifier("table")})}))]})]})}try{ConsentGroup.displayName="ConsentGroup",ConsentGroup.__docgenInfo={description:"",displayName:"ConsentGroup",props:{group:{defaultValue:null,description:"",name:"group",required:!0,type:{name:"CookieGroup"}},isRequired:{defaultValue:null,description:"",name:"isRequired",required:!0,type:{name:"boolean"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/consentGroup/ConsentGroup.tsx#ConsentGroup"]={docgenInfo:ConsentGroup.__docgenInfo,name:"ConsentGroup",path:"src/components/cookieConsent/consentGroup/ConsentGroup.tsx#ConsentGroup"})}catch(__react_docgen_typescript_loader_error){}function Category(props){var category=props.category,isRequired=props.isRequired,triggerAction=props.triggerAction,_props$selectPercenta=props.selectPercentage,selectPercentage=void 0===_props$selectPercenta?-1:_props$selectPercenta;if(!category)return null;var allApproved=isRequired||1===selectPercentage,title=category.title,text=category.text,groups=category.groups,checkboxAriaDescription=category.checkboxAriaDescription,checked=isRequired||allApproved,groupId=isRequired?"required":"optional",getConsentGroupIdentifier=function getConsentGroupIdentifier(suffix){return"".concat(groupId,"-consents-").concat(suffix)},checkboxId=getConsentGroupIdentifier("checkbox"),descriptionElementId=getConsentGroupIdentifier("description"),checkboxProps={onChange:triggerAction?function(){return triggerAction(checked?"unapproveOptional":"approveOptional")}:function(){},disabled:isRequired,checked,indeterminate:!isRequired&&!Number.isInteger(selectPercentage),id:checkboxId,"data-testid":checkboxId,name:checkboxId,label:title,"aria-describedby":descriptionElementId,style:{"--label-font-size":"var(--fontsize-heading-m)"}};return(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.consentCategory,children:[(0,jsx_runtime.jsx)("div",{className:CookieConsent_module.titleWithCheckbox,children:(0,jsx_runtime.jsx)(Checkbox.X,(0,objectSpread2.Z)({},checkboxProps))}),(0,jsx_runtime.jsx)("p",{"aria-hidden":!0,children:text}),(0,jsx_runtime.jsx)(dist_import.T,{id:descriptionElementId,children:checkboxAriaDescription||text}),(0,jsx_runtime.jsx)("ul",{className:CookieConsent_module.list,children:groups.map((function(group,index){return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(ConsentGroup,{group,isRequired,id:getConsentGroupIdentifier("group-".concat(index))})},group.title)}))})]})}var MemoizedCategory=react.memo(Category);try{Category.displayName="Category",Category.__docgenInfo={description:"",displayName:"Category",props:{category:{defaultValue:null,description:"",name:"category",required:!1,type:{name:"Category"}},isRequired:{defaultValue:null,description:"",name:"isRequired",required:!1,type:{name:"boolean"}},triggerAction:{defaultValue:null,description:"",name:"triggerAction",required:!1,type:{name:"CookieConsentActionListener"}},selectPercentage:{defaultValue:null,description:"",name:"selectPercentage",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/category/Category.tsx#Category"]={docgenInfo:Category.__docgenInfo,name:"Category",path:"src/components/cookieConsent/category/Category.tsx#Category"})}catch(__react_docgen_typescript_loader_error){}try{MemoizedCategory.displayName="MemoizedCategory",MemoizedCategory.__docgenInfo={description:"",displayName:"MemoizedCategory",props:{category:{defaultValue:null,description:"",name:"category",required:!1,type:{name:"Category"}},isRequired:{defaultValue:null,description:"",name:"isRequired",required:!1,type:{name:"boolean"}},triggerAction:{defaultValue:null,description:"",name:"triggerAction",required:!1,type:{name:"CookieConsentActionListener"}},selectPercentage:{defaultValue:null,description:"",name:"selectPercentage",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/category/Category.tsx#MemoizedCategory"]={docgenInfo:MemoizedCategory.__docgenInfo,name:"MemoizedCategory",path:"src/components/cookieConsent/category/Category.tsx#MemoizedCategory"})}catch(__react_docgen_typescript_loader_error){}function Details(){var content=useCookieContentContext(),consentContext=useCookieConsentContext(),triggerAction=useConsentActions(),selectPercentage=consentContext.getApprovalPercentageForOptional(),_useSectionTexts=useSectionTexts("details"),title=_useSectionTexts.title,text=_useSectionTexts.text,requiredCookies=content.requiredCookies,optionalCookies=content.optionalCookies;return(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.textContent,"data-testid":"cookie-consent-details",children:[(0,jsx_runtime.jsx)("span",{className:CookieConsent_module.emulatedH2,role:"heading","aria-level":2,children:title}),(0,jsx_runtime.jsx)("p",{children:text}),(0,jsx_runtime.jsx)(MemoizedCategory,{category:requiredCookies,isRequired:!0}),(0,jsx_runtime.jsx)(MemoizedCategory,{category:optionalCookies,triggerAction,selectPercentage})]})}var Button=__webpack_require__("./src/components/button/Button.tsx");function Buttons(_ref){var detailsAreShown=_ref.detailsAreShown,_ref$onClick=_ref.onClick,_onClick=void 0===_ref$onClick?function(){}:_ref$onClick,triggerAction=_ref.triggerAction,_useUiTexts=useUiTexts(),approveRequiredAndSelectedConsents=_useUiTexts.approveRequiredAndSelectedConsents,approveOnlyRequiredConsents=_useUiTexts.approveOnlyRequiredConsents,approveAllConsents=_useUiTexts.approveAllConsents,primaryButtonText=detailsAreShown?approveRequiredAndSelectedConsents:approveAllConsents,primaryButtonAction=detailsAreShown?"approveSelectedAndRequired":"approveAll";return(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(CookieConsent_module.buttons,detailsAreShown?"":CookieConsent_module.visuallyHiddenWithoutFocus),children:[(0,jsx_runtime.jsx)(Button.z,{variant:"secondary",onClick:function onClick(){triggerAction(primaryButtonAction),_onClick()},"data-testid":"cookie-consent-approve-button",children:primaryButtonText}),(0,jsx_runtime.jsx)(Button.z,{variant:"secondary",onClick:function onClick(){triggerAction("approveRequired"),_onClick()},"data-testid":"cookie-consent-approve-required-button",children:approveOnlyRequiredConsents})]})}var MemoizedButtons=react.memo(Buttons);try{MemoizedButtons.displayName="MemoizedButtons",MemoizedButtons.__docgenInfo={description:"",displayName:"MemoizedButtons",props:{detailsAreShown:{defaultValue:null,description:"",name:"detailsAreShown",required:!0,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"() => void"}},triggerAction:{defaultValue:null,description:"",name:"triggerAction",required:!0,type:{name:"CookieConsentActionListener"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/buttons/Buttons.tsx#MemoizedButtons"]={docgenInfo:MemoizedButtons.__docgenInfo,name:"MemoizedButtons",path:"src/components/cookieConsent/buttons/Buttons.tsx#MemoizedButtons"})}catch(__react_docgen_typescript_loader_error){}var Notification=__webpack_require__("./src/components/notification/Notification.tsx");function Page(){var content=useCookieContentContext(),triggerAction=useConsentActions(),_content$texts$sectio=content.texts.sections.main,title=_content$texts$sectio.title,text=_content$texts$sectio.text,settingsSaved=content.texts.ui.settingsSaved,_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),showSaveNotification=_useState2[0],setShowSaveNotification=_useState2[1],onButtonClick=(0,react.useCallback)((function(){setShowSaveNotification(!0)}),[setShowSaveNotification]);return(0,jsx_runtime.jsx)("div",{className:CookieConsent_module.page,"data-testid":"cookie-consent",children:(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.content,id:"cookie-consent-content",children:[(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.mainContent,"data-testid":"cookie-consent-information",children:[(0,jsx_runtime.jsx)("h1",{className:"heading-xl",children:title}),(0,jsx_runtime.jsx)("p",{children:text})]}),(0,jsx_runtime.jsx)(Details,{}),showSaveNotification&&(0,jsx_runtime.jsx)(Notification.P,{size:"small",type:"success",label:"Saved",dataTestId:"cookie-consent-save-notification",className:CookieConsent_module.saveNotification,children:settingsSaved}),(0,jsx_runtime.jsx)(MemoizedButtons,{detailsAreShown:!0,onClick:onButtonClick,triggerAction})]})})}function CookiePage(props){var cookieDomain=props.cookieDomain,contentSource=props.contentSource;return(0,jsx_runtime.jsx)(CookieConsentContext,{contentSource,cookieDomain,children:(0,jsx_runtime.jsx)(Page,{})})}try{CookiePage.displayName="CookiePage",CookiePage.__docgenInfo={description:"",displayName:"CookiePage",props:{contentSource:{defaultValue:null,description:"",name:"contentSource",required:!0,type:{name:"CookieContentSource"}},cookieDomain:{defaultValue:null,description:"",name:"cookieDomain",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/cookiePage/CookiePage.tsx#CookiePage"]={docgenInfo:CookiePage.__docgenInfo,name:"CookiePage",path:"src/components/cookieConsent/cookiePage/CookiePage.tsx#CookiePage"})}catch(__react_docgen_typescript_loader_error){}var Navigation=__webpack_require__("./src/components/navigation/Navigation.tsx");function LanguageSwitcher(){var _useContentLanguage=useContentLanguage(),current=_useContentLanguage.current,languageOptions=_useContentLanguage.languageOptions,languageSelectorAriaLabel=_useContentLanguage.languageSelectorAriaLabel,onLanguageChange=_useContentLanguage.onLanguageChange,currentOption=languageOptions.find((function(option){return option.code===current}));return(0,jsx_runtime.jsx)(Navigation.W.LanguageSelector,{label:currentOption.label,buttonAriaLabel:languageSelectorAriaLabel,className:CookieConsent_module.languageSelectorOverride,id:"cookie-consent-language-selector",children:languageOptions.map((function(option){return(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return function setLanguage(code,e){if(e.preventDefault(),code!==current)onLanguageChange(code);else{var languageMenuButton=document.getElementById("".concat("cookie-consent-language-selector","-button"));languageMenuButton&&languageMenuButton.focus()}}(option.code,e)},label:option.label,active:current===option.code,lang:option.code,"data-testid":"cookie-consent-language-option-".concat(option.code)},option.code)}))})}function useEscKey(callBack){(0,react.useEffect)((function(){var handleEscKey=function handleEscKey(event){var key=event.key||event.keyCode;"Escape"!==key&&"Esc"!==key&&27!==key||callBack(event)};return document.addEventListener("keyup",handleEscKey),function(){document.removeEventListener("keyup",handleEscKey)}}),[callBack])}function Content(){var _useAccordion=(0,useAccordion.A)({initiallyOpen:!1}),isOpen=_useAccordion.isOpen,buttonProps=_useAccordion.buttonProps,contentProps=_useAccordion.contentProps,closeAccordion=_useAccordion.closeAccordion,_useUiTexts=useUiTexts(),hideSettings=_useUiTexts.hideSettings,showSettings=_useUiTexts.showSettings,readMore=_useUiTexts.readMore,_useSectionTexts=useSectionTexts("main"),title=_useSectionTexts.title,text=_useSectionTexts.text,triggerAction=useConsentActions(),titleRef=(0,react.useRef)(),Icon=isOpen?IconAngleUp.IconAngleUp:IconAngleDown.IconAngleDown,settingsButtonText=isOpen?hideSettings:showSettings,detailsButtonClassName=isOpen?(0,classNames.Z)(CookieConsent_module.detailsAccordionButton,CookieConsent_module.accordionButton,CookieConsent_module.hiddenWithoutFocus):(0,classNames.Z)(CookieConsent_module.detailsAccordionButton,CookieConsent_module.accordionButton,CookieConsent_module.accordionButtonSettingsClosed,CookieConsent_module.hiddenWithoutFocus),setFocusToTitle=(0,react.useCallback)((function(){title&&titleRef.current&&titleRef.current.focus()}),[titleRef,title]);return(0,react.useEffect)((function(){setFocusToTitle()}),[setFocusToTitle]),useEscKey(closeAccordion),useEscKey(useFocusShift()),(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(CookieConsent_module.content,isOpen?"":CookieConsent_module.shrinkOnBlur),id:"cookie-consent-content",tabIndex:-1,children:[(0,jsx_runtime.jsxs)("div",{className:CookieConsent_module.mainContent,"data-testid":"cookie-consent-information",children:[(0,jsx_runtime.jsx)("span",{className:CookieConsent_module.emulatedH1,role:"heading","aria-level":1,tabIndex:-1,ref:titleRef,children:title}),(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(CookieConsent_module.languageSwitcher,CookieConsent_module.visuallyHiddenWithoutFocus),"data-testid":"cookie-consent-language-switcher",children:(0,jsx_runtime.jsx)(LanguageSwitcher,{})}),(0,jsx_runtime.jsx)("p",{className:CookieConsent_module.visuallyHiddenWithoutFocus,children:text}),(0,jsx_runtime.jsxs)("button",{type:"button",className:(0,classNames.Z)(CookieConsent_module.accordionButton,CookieConsent_module.readMoreButton),onMouseDown:function onMouseDown(e){e.preventDefault(),setFocusToTitle()},children:[(0,jsx_runtime.jsx)("span",{children:readMore}),(0,jsx_runtime.jsx)(IconAngleUp.IconAngleUp,{"aria-hidden":!0})]})]}),(0,jsx_runtime.jsxs)("button",(0,objectSpread2.Z)((0,objectSpread2.Z)({type:"button",className:detailsButtonClassName,"data-testid":"cookie-consent-settings-toggler"},buttonProps),{},{children:[(0,jsx_runtime.jsx)(Icon,{"aria-hidden":!0}),(0,jsx_runtime.jsx)("span",{children:settingsButtonText})]})),(0,jsx_runtime.jsx)(Card.Z,(0,objectSpread2.Z)((0,objectSpread2.Z)({},contentProps),{},{theme:{"--padding-horizontal":"0","--padding-vertical":"0"},children:(0,jsx_runtime.jsx)(Details,{})})),(0,jsx_runtime.jsx)(MemoizedButtons,{detailsAreShown:isOpen,triggerAction})]})}function useModalRenderChecker(){var consentContext=useCookieConsentContext(),contentContext=useCookieContentContext();return!(!contentContext.optionalCookies||0===contentContext.optionalCookies.groups.length)&&!consentContext.hasUserHandledAllConsents()}function Modal(){var shouldShowModal=useModalRenderChecker(),_useState=(0,react.useState)(shouldShowModal),isModalInitiallyShown=(0,slicedToArray.Z)(_useState,1)[0],_useState3=(0,react.useState)(!1),_useState4=(0,slicedToArray.Z)(_useState3,2),popupTimerComplete=_useState4[0],setPopupTimerComplete=_useState4[1],showScreenReaderSaveNotification=isModalInitiallyShown&&!shouldShowModal,settingsSaved=useUiTexts().settingsSaved,forwardedRef=function useModalPlaceHolder(){var placeHolderId="HdsCookieConsentModalPlaceholder",observedElementRef=(0,react.useRef)(null),placeHolderRef=(0,react.useRef)(null),contentObserver=(0,react.useRef)(null),createPlaceholderElement=(0,react.useCallback)((function(){var placeHolderElement=document.createElement("div");return placeHolderElement.setAttribute("data-testid","html-cookie-consent-placeholder"),placeHolderElement.setAttribute("aria-hidden","true"),placeHolderElement.setAttribute("id",placeHolderId),document.body.lastChild.after(placeHolderElement),placeHolderElement}),[]),updatePlaceHolder=(0,react.useCallback)((function(placeHolderElement,contentElement){if(placeHolderElement){var newHeight=contentElement?contentElement.getBoundingClientRect().height:0;placeHolderElement.style.height="".concat(newHeight,"px")}}),[]),setPlaceHolderTransitionDelay=(0,react.useCallback)((function(placeHolderElement){placeHolderElement&&(placeHolderElement.style.transition="height 0.1s ease 0.2s")}),[]),onObservedElementChange=(0,react.useCallback)((function(){updatePlaceHolder(placeHolderRef.current,observedElementRef.current)}),[updatePlaceHolder,placeHolderRef,observedElementRef]),getPlaceHolderElement=(0,react.useCallback)((function(){return document.getElementById(placeHolderId)}),[placeHolderId]),removeContentObserver=(0,react.useCallback)((function(){contentObserver.current&&(contentObserver.current.disconnect(),contentObserver.current=null)}),[contentObserver]),addContentObserver=(0,react.useCallback)((function(observedElement){removeContentObserver(),contentObserver.current=new ResizeObserver(onObservedElementChange),contentObserver.current.observe(observedElement)}),[removeContentObserver,contentObserver,onObservedElementChange]),removePlaceHolder=(0,react.useCallback)((function(){placeHolderRef.current&&(placeHolderRef.current.remove(),placeHolderRef.current=null)}),[placeHolderRef]),createAndStorePlaceHolderElement=(0,react.useCallback)((function(){placeHolderRef.current||(placeHolderRef.current=getPlaceHolderElement()||createPlaceholderElement(),setPlaceHolderTransitionDelay(placeHolderRef.current))}),[placeHolderRef,getPlaceHolderElement,createPlaceholderElement,setPlaceHolderTransitionDelay]),cleanUp=(0,react.useCallback)((function(){removeContentObserver(),removePlaceHolder()}),[removeContentObserver,removePlaceHolder]),refListener=(0,react.useCallback)((function(observedElement){return observedElement&&!placeHolderRef.current&&createAndStorePlaceHolderElement(),observedElementRef.current!==observedElement&&(observedElement?addContentObserver(observedElement):cleanUp(),observedElementRef.current=observedElement),observedElementRef}),[placeHolderRef,cleanUp,observedElementRef,addContentObserver,createAndStorePlaceHolderElement]);return(0,react.useEffect)((function(){return function(){cleanUp()}}),[cleanUp]),refListener}();return(0,react.useEffect)((function(){setTimeout((function(){return setPopupTimerComplete(!0)}),500)}),[]),showScreenReaderSaveNotification?(0,jsx_runtime.jsx)(dist_import.T,{children:(0,jsx_runtime.jsx)("div",{role:"alert","data-testid":"cookie-consent-screen-reader-notification",tabIndex:-1,children:settingsSaved})}):shouldShowModal?(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(CookieConsent_module.container,CookieConsent_module.modal,popupTimerComplete&&CookieConsent_module.animateIn),"data-testid":"cookie-consent",children:(0,jsx_runtime.jsx)("div",{className:CookieConsent_module.aligner,ref:forwardedRef,children:popupTimerComplete&&(0,jsx_runtime.jsx)(Content,{})})}):null}var Accordion=__webpack_require__("./src/components/accordion/Accordion.tsx");function useCookies(props){var _ref=props||{},cookieDomain=_ref.cookieDomain,cookieName=_ref.cookieName;return(0,react.useMemo)((function(){var cookieController=cookieController_createCookieController({domain:cookieDomain||getCookieDomainFromUrl()},cookieName||COOKIE_NAME),getCookie=function getCookie(){return cookieController.get()};return{getCookie,getAllConsents:function getAllConsents(){return parseConsents(getCookie())}}}),[cookieDomain,cookieName])}var react_dom=__webpack_require__("../../node_modules/react-dom/index.js");function Portal(_ref){var rootId=_ref.rootId,children=_ref.children,shouldShowModal=useModalRenderChecker(),containerElementRef=(0,react.useRef)(null),wasPortalCreated=(0,react.useRef)(!1),_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),isDomReady=_useState2[0],setIsDomReady=_useState2[1],getContainerElement=(0,react.useCallback)((function(){return containerElementRef.current||document.getElementById(rootId)}),[rootId,containerElementRef]),getChildNodeCount=(0,react.useCallback)((function(){var container=getContainerElement();return container?container.childNodes.length:0}),[getContainerElement]),removePortal=(0,react.useCallback)((function(){var containerElement=containerElementRef.current||document.getElementById(rootId);containerElementRef.current=null,containerElement&&!getChildNodeCount()&&containerElement.remove()}),[rootId,getChildNodeCount]);return(0,react.useEffect)((function(){if(!shouldShowModal)return removePortal(),function(){};var containerElement=document.getElementById(rootId);return containerElement||((containerElement=document.createElement("div")).setAttribute("id",rootId),containerElement.setAttribute("data-testid","html-cookie-consent-container"),document.body.insertBefore(containerElement,document.body.firstChild)),containerElementRef.current=containerElement,setIsDomReady(!0),function(){removePortal()}}),[rootId,shouldShowModal,setIsDomReady,removePortal]),"undefined"==typeof document?null:0!==getChildNodeCount()||shouldShowModal&&isDomReady?getChildNodeCount()>0&&!wasPortalCreated.current?null:containerElementRef.current?(wasPortalCreated.current=!0,(0,react_dom.createPortal)((0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children}),containerElementRef.current)):null:null}try{Portal.displayName="Portal",Portal.__docgenInfo={description:"",displayName:"Portal",props:{rootId:{defaultValue:null,description:"",name:"rootId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/cookieModal/Portal.tsx#Portal"]={docgenInfo:Portal.__docgenInfo,name:"Portal",path:"src/components/cookieConsent/cookieModal/Portal.tsx#Portal"})}catch(__react_docgen_typescript_loader_error){}function CookieModal(_ref){var contentSource=_ref.contentSource,cookieDomain=_ref.cookieDomain,_ref$rootId=_ref.rootId,rootId=void 0===_ref$rootId?"HdsCookieConsentContainer":_ref$rootId;return(0,jsx_runtime.jsx)(CookieConsentContext,{contentSource,cookieDomain,children:(0,jsx_runtime.jsx)(Portal,{rootId,children:(0,jsx_runtime.jsx)(Modal,{})})})}try{CookieModal.displayName="CookieModal",CookieModal.__docgenInfo={description:"",displayName:"CookieModal",props:{contentSource:{defaultValue:null,description:"",name:"contentSource",required:!0,type:{name:"CookieContentSource"}},cookieDomain:{defaultValue:null,description:"",name:"cookieDomain",required:!1,type:{name:"string"}},rootId:{defaultValue:{value:"HdsCookieConsentContainer"},description:"",name:"rootId",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/cookieModal/CookieModal.tsx#CookieModal"]={docgenInfo:CookieModal.__docgenInfo,name:"CookieModal",path:"src/components/cookieConsent/cookieModal/CookieModal.tsx#CookieModal"})}catch(__react_docgen_typescript_loader_error){}const CookieConsent_stories={component:CookieModal,title:"Components/CookieConsent",parameters:{storySource:{source:"import React, { useState } from 'react';\n\nimport { useCookieConsentContext } from './contexts/ConsentContext';\nimport { Category, CookieData, SupportedLanguage, useCookieContentContext } from './contexts/ContentContext';\nimport { CookieConsentContext } from './contexts/ContextComponent';\nimport { CookiePage } from './cookiePage/CookiePage';\nimport { CookieContentSource } from './content.builder';\nimport { Modal } from './modal/Modal';\nimport { Accordion } from '../accordion';\nimport { useCookies } from './useCookies';\nimport { CookieModal } from './cookieModal/CookieModal';\n\nexport default {\n component: CookieModal,\n title: 'Components/CookieConsent',\n parameters: {\n controls: { expanded: true },\n docs: { disable: true },\n },\n args: {},\n};\n\nconst ForcePageScrollBarForModalTesting = () => {\n return (\n
\n
 
\n

Bottom page

\n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const EnglishModalVersion = (args) => {\n const [language, setLanguage] = useState('en');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: 'Test website',\n currentLanguage: language,\n requiredCookies: {\n groups: [\n {\n commonGroup: 'login',\n cookies: [\n {\n commonCookie: 'tunnistamo',\n },\n {\n commonCookie: 'keycloak',\n },\n ],\n },\n {\n commonGroup: 'essential',\n cookies: [\n {\n commonCookie: 'cms-session',\n },\n ],\n },\n {\n commonGroup: 'loadBalancing',\n cookies: [\n {\n id: 'loadbalancer',\n name: 'Loadbalancer Cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'accessibility',\n cookies: [\n {\n id: 'accessibility',\n name: 'Accessibility cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'userInputs',\n cookies: [\n {\n id: 'userInputs',\n name: 'User inputs cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n optionalCookies: {\n groups: [\n {\n commonGroup: 'marketing',\n cookies: [\n {\n id: 'marketing',\n name: 'Custom Marketing cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'preferences',\n cookies: [\n {\n id: 'preferences1',\n name: 'Preference 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n {\n id: 'preferences2',\n name: 'Preference 2',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1 years',\n },\n {\n id: 'preferences3',\n name: 'Preference 3',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '2h',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n commonCookie: 'matomo',\n },\n {\n commonCookie: 'matomoSession',\n },\n {\n commonCookie: 'matomoConsent',\n },\n {\n commonCookie: 'cookiehub',\n },\n {\n id: 'someOtherConsent',\n name: 'Other consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'location',\n cookies: [\n {\n id: 'location',\n name: 'Location consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'content',\n cookies: [\n {\n id: 'content',\n name: 'Content consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'thirdParty',\n cookies: [\n {\n id: 'thirdParty',\n name: 'ThirdParty consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'chat',\n cookies: [\n {\n id: 'chat',\n name: 'Chat consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'deviceInfo',\n cookies: [\n {\n id: 'deviceInfo',\n name: 'Device info consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'socialMedia',\n cookies: [\n {\n id: 'socialMedia',\n name: 'Social media consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'informationSecurity',\n cookies: [\n {\n id: 'informationSecurity',\n name: 'Information security consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n\n language: {\n onLanguageChange,\n },\n onAllConsentsGiven: (consents) => {\n if (consents.matomo) {\n // start tracking\n // window._paq.push(['setConsentGiven']);\n // window._paq.push(['setCookieConsentGiven']);\n }\n },\n onConsentsParsed: (consents, hasUserHandledAllConsents) => {\n if (consents.matomo === undefined) {\n // tell matomo to wait for consent:\n // window._paq.push(['requireConsent']);\n // window._paq.push(['requireCookieConsent']);\n } else if (consents.matomo === false) {\n // tell matomo to forget conset\n // window._paq.push(['forgetConsentGiven']);\n }\n if (hasUserHandledAllConsents) {\n // cookie consent modal will not be shown\n }\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const MatomoCookieTracker = () => {\n const { getAllConsents } = useCookies();\n const getConsentStatus = (cookieId: string) => {\n const consents = getAllConsents();\n return consents[cookieId];\n };\n const isMatomoCookieApproved = getConsentStatus('matomo');\n return (\n
\n

Example how to track single consent.

\n

Matomo onConsentsParsed is {!isMatomoCookieApproved && NOT} set.*

\n * This won't change in real time\n
\n );\n };\n\n const Application = () => {\n return (\n
\n {}\n

\n This is an example application with cookie consent modal\n

\n

The modal will be shown when required. If user has given consents, it will not be shown.

\n

If hidden, remove the cookie to see the modal again.

\n \n \n
\n );\n };\n\n return (\n <>\n \n \n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const FinnishModalVersion = (args) => {\n const [language, setLanguage] = useState('fi');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: 'Testisivusto',\n currentLanguage: language,\n requiredCookies: {\n groups: [\n {\n commonGroup: 'login',\n cookies: [\n {\n commonCookie: 'tunnistamo',\n },\n {\n commonCookie: 'keycloak',\n },\n ],\n },\n {\n commonGroup: 'essential',\n cookies: [\n {\n commonCookie: 'cms-session',\n },\n ],\n },\n {\n commonGroup: 'loadBalancing',\n cookies: [\n {\n id: 'loadbalancer',\n name: 'Loadbalancer Cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'accessibility',\n cookies: [\n {\n id: 'accessibility',\n name: 'Accessibility cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'userInputs',\n cookies: [\n {\n id: 'userInputs',\n name: 'User inputs cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n optionalCookies: {\n groups: [\n {\n commonGroup: 'marketing',\n cookies: [\n {\n id: 'marketing',\n name: 'Custom Marketing cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'preferences',\n cookies: [\n {\n id: 'preferences1',\n name: 'Preference 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n {\n id: 'preferences2',\n name: 'Preference 2',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1 years',\n },\n {\n id: 'preferences3',\n name: 'Preference 3',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '2h',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n commonCookie: 'matomo',\n },\n {\n commonCookie: 'matomoSession',\n },\n {\n commonCookie: 'matomoConsent',\n },\n {\n commonCookie: 'cookiehub',\n },\n {\n id: 'someOtherConsent',\n name: 'Other consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'location',\n cookies: [\n {\n id: 'location',\n name: 'Location consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'content',\n cookies: [\n {\n id: 'content',\n name: 'Content consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'thirdParty',\n cookies: [\n {\n id: 'thirdParty',\n name: 'ThirdParty consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'chat',\n cookies: [\n {\n id: 'chat',\n name: 'Chat consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'deviceInfo',\n cookies: [\n {\n id: 'deviceInfo',\n name: 'Device info consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'socialMedia',\n cookies: [\n {\n id: 'socialMedia',\n name: 'Social media consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'informationSecurity',\n cookies: [\n {\n id: 'informationSecurity',\n name: 'Information security consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n\n language: {\n onLanguageChange,\n },\n onAllConsentsGiven: (consents) => {\n if (consents.matomo) {\n // start tracking\n // window._paq.push(['setConsentGiven']);\n // window._paq.push(['setCookieConsentGiven']);\n }\n },\n onConsentsParsed: (consents, hasUserHandledAllConsents) => {\n if (consents.matomo === undefined) {\n // tell matomo to wait for consent:\n // window._paq.push(['requireConsent']);\n // window._paq.push(['requireCookieConsent']);\n } else if (consents.matomo === false) {\n // tell matomo to forget conset\n // window._paq.push(['forgetConsentGiven']);\n }\n if (hasUserHandledAllConsents) {\n // cookie consent modal will not be shown\n }\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const MatomoCookieTrackerFinnish = () => {\n const { getAllConsents } = useCookies();\n const getConsentStatus = (cookieId: string) => {\n const consents = getAllConsents();\n return consents[cookieId];\n };\n const isMatomoCookieApproved = getConsentStatus('matomo');\n return (\n
\n

Esimerkki kuinka seurata yhden keksin suostumusta

\n

Matomo suostumusta {isMatomoCookieApproved ? 'on' : EI OLE } asetettu.*

\n * Tämä ei päivity reaaliajassa\n
\n );\n };\n\n const Application = () => {\n return (\n
\n {}\n

\n Tämä on esimerkkisovellus CookieConsent-komponentin käytöstä\n

\n

\n Keksienhallintaikkuna näytetään tarpeen vaatiessa. Jos käyttäjä on suorittanut keksien hyväksymisprosessin,\n ikkunaa ei näytetä.\n

\n

Jos ikkuna on piilossa, poista keksit jotta se tulee taas näkyviin.

\n \n \n
\n );\n };\n\n return (\n <>\n \n \n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const SimpleModalVersion = (args) => {\n const [language, setLanguage] = useState('en');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: `Site title ${language}`,\n currentLanguage: language,\n optionalCookies: {\n cookies: [\n {\n commonGroup: 'essential',\n commonCookie: 'tunnistamo',\n },\n ],\n },\n language: {\n onLanguageChange,\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const Application = () => {\n return (\n
\n {}\n

\n Simplest cookie consent example\n

\n

This is an example how the modal is shown with minimal content parameters.

\n

If modal is not shown, remove the cookie to see the modal again.

\n

Note: it the cookie.required would be true, the modal would never be shown.

\n \n
\n );\n };\n\n return (\n <>\n \n \n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const PageVersion = (args) => {\n const contentSource: CookieContentSource = {\n siteName: 'Test website',\n currentLanguage: 'en',\n texts: {\n sections: {\n main: {\n title: 'Cookie consents as a page!',\n },\n },\n },\n requiredCookies: {\n groups: [\n {\n commonGroup: 'essential',\n cookies: [\n {\n commonCookie: 'tunnistamo',\n },\n {\n id: 'loadbalancer',\n name: 'loadbalancer cookie',\n hostName: 'CDN service',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n {\n commonCookie: 'keycloak',\n },\n ],\n },\n ],\n },\n optionalCookies: {\n groups: [\n {\n commonGroup: 'marketing',\n cookies: [\n {\n id: 'marketing',\n name: 'Marketing 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'preferences',\n cookies: [\n {\n id: 'preferences1',\n name: 'Setting 1',\n hostName: 'UserPreferences',\n description:\n 'Proin sodales maximus est, pulvinar tempus felis tempus quis. Aenean at vestibulum lectus. Aliquam erat volutpat. Nullam venenatis feugiat sem vitae cursus. ',\n expiration: '1 year',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n commonCookie: 'matomo',\n },\n {\n commonCookie: 'matomoSession',\n },\n {\n commonCookie: 'matomoConsent',\n },\n {\n id: 'someOtherConsent',\n name: 'Other analytics site',\n hostName: 'Other analytics',\n description: 'Vel est molestie Quisque vel dui vel est molestie con con',\n expiration: '1 year',\n },\n ],\n },\n ],\n },\n\n onAllConsentsGiven: (consents) => {\n // called when consents are saved\n // handle changes like:\n if (!consents.matomo) {\n // stop matomo tracking\n }\n },\n };\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const CustomContentVersion = (args) => {\n const contentSource: CookieContentSource = {\n siteName: 'Not shown if main title is overridden',\n currentLanguage: 'en',\n texts: {\n sections: {\n main: {\n title: 'Custom main title',\n text: 'Custom main preferences',\n },\n details: {\n title: 'Custom details title',\n text: 'Custom details preferences',\n },\n },\n ui: {\n showSettings: 'Custom show settings',\n hideSettings: 'Custom hide settings',\n approveAllConsents: 'Custom approve all consents',\n approveRequiredAndSelectedConsents: 'Custom approve required and selected consents',\n approveOnlyRequiredConsents: 'Custom approve only required consents',\n settingsSaved: 'Custom settings saved text',\n },\n tableHeadings: {\n name: 'Cookie custom name',\n hostName: 'Host',\n description: 'Cookie purpose',\n expiration: 'Lifespan',\n },\n },\n requiredCookies: {\n title: 'Overridden title of required cookies',\n text: 'Overridden text of required cookies. The default text is not shown.',\n checkboxAriaDescription: 'This is the overridden checkbox aria description of required cookies',\n groups: [\n {\n id: 'my-cookie-group',\n title: 'My required cookie groupcustom title',\n text: 'My required cookie groupcustom text',\n checkboxAriaDescription: 'Custom checkbox aria description for My cookie group',\n expandAriaLabel: 'Custom expand button aria label for My cookie group',\n cookies: [\n {\n id: 'custom-cookie',\n name: 'Custom cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1000 years',\n },\n ],\n },\n {\n title: 'Custom cookie group title',\n text: 'Custom cookie group text',\n checkboxAriaDescription: 'Custom checkbox aria description for custom cookies group',\n expandAriaLabel: 'Custom expand button aria label for custom cookies group',\n cookies: [\n {\n id: 'marketing',\n name: 'Marketing 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n cookies: [\n {\n commonCookie: 'tunnistamo',\n groupId: 'my-cookie-group',\n },\n ],\n },\n optionalCookies: {\n title: 'Overridden title of optional cookies',\n text: 'Overridden text of optional cookies. The default text is not shown.',\n checkboxAriaDescription: 'This is the overridden checkbox aria description of optional cookies',\n groups: [\n {\n title: 'Custom cookies group title',\n text: 'Custom cookies group text',\n checkboxAriaDescription: 'Custom checkbox aria description for custom cookies group',\n expandAriaLabel: 'Custom expand button aria label for custom cookies group',\n cookies: [\n {\n id: 'some-cookie',\n name: 'Setting 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: 'Sessio',\n },\n {\n id: 'some-cookie2',\n name: 'Setting 2',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: 'Sessio',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n id: 'someOtherConsent',\n name: 'Other cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: 'Sessio',\n },\n ],\n },\n ],\n cookies: [\n {\n commonGroup: 'statistics',\n commonCookie: 'matomo',\n },\n ],\n },\n };\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const DebugVersion = (args) => {\n const contentSource: CookieContentSource = {\n siteName: 'Cookie consent debugging',\n currentLanguage: 'fi',\n requiredCookies: {\n cookies: [\n {\n commonGroup: 'statistics',\n commonCookie: 'matomo',\n },\n ],\n },\n optionalCookies: {\n cookies: [\n {\n commonCookie: 'tunnistamo',\n commonGroup: 'essential',\n },\n {\n id: `random-cookie-${Math.random()}-without-consent`,\n commonGroup: 'marketing',\n },\n ],\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const getCategoryCookies = (category?: Category): CookieData[] => {\n if (!category) {\n return [];\n }\n let allCookies: CookieData[] = [];\n category.groups.forEach((group) => {\n allCookies = [...allCookies, ...group.cookies];\n });\n return allCookies;\n };\n\n const Application = () => {\n const consentContext = useCookieConsentContext();\n const content = useCookieContentContext();\n const { hasUserHandledAllConsents } = consentContext;\n const { requiredCookies, optionalCookies } = content;\n const willRenderCookieConsentDialog = hasUserHandledAllConsents();\n const { getAllConsents } = useCookies();\n const storedConsents = getAllConsents();\n const getConsentStatus = (cookieId: string) => {\n return storedConsents[cookieId];\n };\n return (\n
\n

\n Debugging example\n

\n

This is an example how to get all data from the cookie consent context.

\n

\n The same contentSource can be passed to the context and it provides access to the content built from the\n source. There are multiple hooks for getting the context, content, texts, etc. You can also trigger actions to\n store consents.\n

\n

All consents have been given: {String(!willRenderCookieConsentDialog)}

\n

There is a random cookie, so modal is always shown.

\n

\n To see all consents in the cookie, open DevTools, goto Application tab and select Storage/Cookies from the\n side panel\n

\n \n
\n
{JSON.stringify(content, null, 2)}
\n
\n
\n \n

The consents are read from the stored cookie

\n
    \n {getCategoryCookies(requiredCookies).map((cookie) => {\n return (\n
  • \n {cookie.id} has consent stored in cookie: {String(getConsentStatus(cookie.id))}\n
  • \n );\n })}\n
\n
\n \n

The consents are read from the stored cookie

\n
    \n {getCategoryCookies(optionalCookies).map((cookie) => {\n return (\n
  • \n {cookie.id} has consent: {String(getConsentStatus(cookie.id))}\n
  • \n );\n })}\n
\n
\n \n

The stored cookie has these user given consents:

\n
    \n {Object.keys(storedConsents).map((cookieId) => {\n return (\n
  • \n {cookieId}: {String(getConsentStatus(cookieId))}\n
  • \n );\n })}\n
\n
\n
\n );\n };\n\n return (\n \n \n \n \n );\n};\n\nDebugVersion.parameters = {\n loki: { skip: true },\n};\n\n// args is required for docs tab to show source code\n\nexport const TunnistamoLoginCookies = (args) => {\n const [language, setLanguage] = useState('en');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: `Site title ${language}`,\n texts: {\n sections: {\n main: {\n title: 'List all cookies used in Tunnistamo login',\n text:\n 'This is an example how to get consents for all cookies when using Tunnistamo login flow. All used session, language, load balancer and csrf cookies are listed. Tunnistamo uses Tunnistus and Suomi.fi services and cookies of those services are also listed as they have no consent queries of their own.',\n },\n },\n },\n currentLanguage: language,\n requiredCookies: {\n groups: [\n { commonGroup: 'tunnistamoLogin' },\n { commonGroup: 'loadBalancing', cookies: [{ commonCookie: 'tunnistamo-login-loadbalancer' }] },\n {\n commonGroup: 'informationSecurity',\n cookies: [{ commonCookie: 'tunnistamo-csrftoken' }],\n },\n {\n commonGroup: 'language',\n cookies: [{ commonCookie: 'keycloak-language' }, { commonCookie: 'suomifi-language' }],\n },\n ],\n },\n language: {\n onLanguageChange,\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n return (\n <>\n \n \n );\n};\n\nTunnistamoLoginCookies.parameters = {\n loki: { skip: true },\n};\n",locationsMap:{"english-modal-version":{startLoc:{col:35,line:34},endLoc:{col:1,line:328},startBody:{col:35,line:34},endBody:{col:1,line:328}},"finnish-modal-version":{startLoc:{col:35,line:332},endLoc:{col:1,line:629},startBody:{col:35,line:332},endBody:{col:1,line:629}},"simple-modal-version":{startLoc:{col:34,line:633},endLoc:{col:1,line:674},startBody:{col:34,line:633},endBody:{col:1,line:674}},"page-version":{startLoc:{col:27,line:678},endLoc:{col:1,line:778},startBody:{col:27,line:678},endBody:{col:1,line:778}},"custom-content-version":{startLoc:{col:36,line:782},endLoc:{col:1,line:915},startBody:{col:36,line:782},endBody:{col:1,line:915}},"debug-version":{startLoc:{col:28,line:919},endLoc:{col:1,line:1036},startBody:{col:28,line:919},endBody:{col:1,line:1036}},"tunnistamo-login-cookies":{startLoc:{col:38,line:1044},endLoc:{col:1,line:1084},startBody:{col:38,line:1044},endBody:{col:1,line:1084}}}},controls:{expanded:!0},docs:{disable:!0}},args:{}};var ForcePageScrollBarForModalTesting=function ForcePageScrollBarForModalTesting(){return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("div",{style:{height:"100vh"},children:" "}),(0,jsx_runtime.jsx)("p",{children:"Bottom page"})]})},EnglishModalVersion=function EnglishModalVersion(args){var _useState=(0,react.useState)("en"),_useState2=(0,slicedToArray.Z)(_useState,2),language=_useState2[0],setLanguage=_useState2[1],contentSource={siteName:"Test website",currentLanguage:language,requiredCookies:{groups:[{commonGroup:"login",cookies:[{commonCookie:"tunnistamo"},{commonCookie:"keycloak"}]},{commonGroup:"essential",cookies:[{commonCookie:"cms-session"}]},{commonGroup:"loadBalancing",cookies:[{id:"loadbalancer",name:"Loadbalancer Cookie",hostName:"CDN site",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"accessibility",cookies:[{id:"accessibility",name:"Accessibility cookie",hostName:"CDN site",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"userInputs",cookies:[{id:"userInputs",name:"User inputs cookie",hostName:"CDN site",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]}]},optionalCookies:{groups:[{commonGroup:"marketing",cookies:[{id:"marketing",name:"Custom Marketing cookie",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"preferences",cookies:[{id:"preferences1",name:"Preference 1",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"},{id:"preferences2",name:"Preference 2",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1 years"},{id:"preferences3",name:"Preference 3",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"2h"}]},{commonGroup:"statistics",cookies:[{commonCookie:"matomo"},{commonCookie:"matomoSession"},{commonCookie:"matomoConsent"},{commonCookie:"cookiehub"},{id:"someOtherConsent",name:"Other consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"location",cookies:[{id:"location",name:"Location consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"content",cookies:[{id:"content",name:"Content consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"thirdParty",cookies:[{id:"thirdParty",name:"ThirdParty consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"chat",cookies:[{id:"chat",name:"Chat consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"deviceInfo",cookies:[{id:"deviceInfo",name:"Device info consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"socialMedia",cookies:[{id:"socialMedia",name:"Social media consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"informationSecurity",cookies:[{id:"informationSecurity",name:"Information security consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]}]},language:{onLanguageChange:function onLanguageChange(newLang){return setLanguage(newLang)}},onAllConsentsGiven:function onAllConsentsGiven(consents){consents.matomo},onConsentsParsed:function onConsentsParsed(consents,hasUserHandledAllConsents){void 0===consents.matomo||consents.matomo},focusTargetSelector:"#focused-element-after-cookie-consent-closed"},MatomoCookieTracker=function MatomoCookieTracker(){var getAllConsents=useCookies().getAllConsents,isMatomoCookieApproved=function getConsentStatus(cookieId){return getAllConsents()[cookieId]}("matomo");return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{children:"Example how to track single consent."}),(0,jsx_runtime.jsxs)("p",{children:["Matomo onConsentsParsed is ",!isMatomoCookieApproved&&(0,jsx_runtime.jsx)("strong",{children:"NOT"})," set.*"]}),(0,jsx_runtime.jsx)("small",{style:{fontSize:"80%"},children:"* This won't change in real time"})]})},Application=function Application(){var _contentSource$focusT;return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h1",{className:"heading-xl",id:null===(_contentSource$focusT=contentSource.focusTargetSelector)||void 0===_contentSource$focusT?void 0:_contentSource$focusT.replace("#",""),tabIndex:0,children:"This is an example application with cookie consent modal"}),(0,jsx_runtime.jsx)("p",{children:"The modal will be shown when required. If user has given consents, it will not be shown."}),(0,jsx_runtime.jsx)("p",{children:"If hidden, remove the cookie to see the modal again."}),(0,jsx_runtime.jsx)(MatomoCookieTracker,{}),(0,jsx_runtime.jsx)(ForcePageScrollBarForModalTesting,{})]})};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(CookieModal,{contentSource}),(0,jsx_runtime.jsx)(Application,{})]})},FinnishModalVersion=function FinnishModalVersion(args){var _useState3=(0,react.useState)("fi"),_useState4=(0,slicedToArray.Z)(_useState3,2),language=_useState4[0],setLanguage=_useState4[1],contentSource={siteName:"Testisivusto",currentLanguage:language,requiredCookies:{groups:[{commonGroup:"login",cookies:[{commonCookie:"tunnistamo"},{commonCookie:"keycloak"}]},{commonGroup:"essential",cookies:[{commonCookie:"cms-session"}]},{commonGroup:"loadBalancing",cookies:[{id:"loadbalancer",name:"Loadbalancer Cookie",hostName:"CDN site",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"accessibility",cookies:[{id:"accessibility",name:"Accessibility cookie",hostName:"CDN site",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"userInputs",cookies:[{id:"userInputs",name:"User inputs cookie",hostName:"CDN site",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]}]},optionalCookies:{groups:[{commonGroup:"marketing",cookies:[{id:"marketing",name:"Custom Marketing cookie",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"preferences",cookies:[{id:"preferences1",name:"Preference 1",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"},{id:"preferences2",name:"Preference 2",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1 years"},{id:"preferences3",name:"Preference 3",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"2h"}]},{commonGroup:"statistics",cookies:[{commonCookie:"matomo"},{commonCookie:"matomoSession"},{commonCookie:"matomoConsent"},{commonCookie:"cookiehub"},{id:"someOtherConsent",name:"Other consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"location",cookies:[{id:"location",name:"Location consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"content",cookies:[{id:"content",name:"Content consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"thirdParty",cookies:[{id:"thirdParty",name:"ThirdParty consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"chat",cookies:[{id:"chat",name:"Chat consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"deviceInfo",cookies:[{id:"deviceInfo",name:"Device info consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"socialMedia",cookies:[{id:"socialMedia",name:"Social media consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"informationSecurity",cookies:[{id:"informationSecurity",name:"Information security consent",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]}]},language:{onLanguageChange:function onLanguageChange(newLang){return setLanguage(newLang)}},onAllConsentsGiven:function onAllConsentsGiven(consents){consents.matomo},onConsentsParsed:function onConsentsParsed(consents,hasUserHandledAllConsents){void 0===consents.matomo||consents.matomo},focusTargetSelector:"#focused-element-after-cookie-consent-closed"},MatomoCookieTrackerFinnish=function MatomoCookieTrackerFinnish(){var getAllConsents=useCookies().getAllConsents,isMatomoCookieApproved=function getConsentStatus(cookieId){return getAllConsents()[cookieId]}("matomo");return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{children:"Esimerkki kuinka seurata yhden keksin suostumusta"}),(0,jsx_runtime.jsxs)("p",{children:["Matomo suostumusta ",isMatomoCookieApproved?"on":(0,jsx_runtime.jsx)("strong",{children:"EI OLE "})," asetettu.*"]}),(0,jsx_runtime.jsx)("small",{style:{fontSize:"80%"},children:"* Tämä ei päivity reaaliajassa"})]})},Application=function Application(){var _contentSource$focusT2;return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h1",{className:"heading-xl",id:null===(_contentSource$focusT2=contentSource.focusTargetSelector)||void 0===_contentSource$focusT2?void 0:_contentSource$focusT2.replace("#",""),tabIndex:0,children:"Tämä on esimerkkisovellus CookieConsent-komponentin käytöstä"}),(0,jsx_runtime.jsx)("p",{children:"Keksienhallintaikkuna näytetään tarpeen vaatiessa. Jos käyttäjä on suorittanut keksien hyväksymisprosessin, ikkunaa ei näytetä."}),(0,jsx_runtime.jsx)("p",{children:"Jos ikkuna on piilossa, poista keksit jotta se tulee taas näkyviin."}),(0,jsx_runtime.jsx)(MatomoCookieTrackerFinnish,{}),(0,jsx_runtime.jsx)(ForcePageScrollBarForModalTesting,{})]})};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(CookieModal,{contentSource}),(0,jsx_runtime.jsx)(Application,{})]})},SimpleModalVersion=function SimpleModalVersion(args){var _useState5=(0,react.useState)("en"),_useState6=(0,slicedToArray.Z)(_useState5,2),language=_useState6[0],setLanguage=_useState6[1],contentSource={siteName:"Site title ".concat(language),currentLanguage:language,optionalCookies:{cookies:[{commonGroup:"essential",commonCookie:"tunnistamo"}]},language:{onLanguageChange:function onLanguageChange(newLang){return setLanguage(newLang)}},focusTargetSelector:"#focused-element-after-cookie-consent-closed"},Application=function Application(){var _contentSource$focusT3;return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h1",{className:"heading-xl",id:null===(_contentSource$focusT3=contentSource.focusTargetSelector)||void 0===_contentSource$focusT3?void 0:_contentSource$focusT3.replace("#",""),tabIndex:0,children:"Simplest cookie consent example"}),(0,jsx_runtime.jsx)("p",{children:"This is an example how the modal is shown with minimal content parameters."}),(0,jsx_runtime.jsx)("p",{children:"If modal is not shown, remove the cookie to see the modal again."}),(0,jsx_runtime.jsx)("p",{children:"Note: it the cookie.required would be true, the modal would never be shown."}),(0,jsx_runtime.jsx)(ForcePageScrollBarForModalTesting,{})]})};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(CookieModal,{contentSource}),(0,jsx_runtime.jsx)(Application,{})]})},PageVersion=function PageVersion(args){return(0,jsx_runtime.jsx)("main",{children:(0,jsx_runtime.jsx)(CookiePage,{contentSource:{siteName:"Test website",currentLanguage:"en",texts:{sections:{main:{title:"Cookie consents as a page!"}}},requiredCookies:{groups:[{commonGroup:"essential",cookies:[{commonCookie:"tunnistamo"},{id:"loadbalancer",name:"loadbalancer cookie",hostName:"CDN service",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"},{commonCookie:"keycloak"}]}]},optionalCookies:{groups:[{commonGroup:"marketing",cookies:[{id:"marketing",name:"Marketing 1",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]},{commonGroup:"preferences",cookies:[{id:"preferences1",name:"Setting 1",hostName:"UserPreferences",description:"Proin sodales maximus est, pulvinar tempus felis tempus quis. Aenean at vestibulum lectus. Aliquam erat volutpat. Nullam venenatis feugiat sem vitae cursus. ",expiration:"1 year"}]},{commonGroup:"statistics",cookies:[{commonCookie:"matomo"},{commonCookie:"matomoSession"},{commonCookie:"matomoConsent"},{id:"someOtherConsent",name:"Other analytics site",hostName:"Other analytics",description:"Vel est molestie Quisque vel dui vel est molestie con con",expiration:"1 year"}]}]},onAllConsentsGiven:function onAllConsentsGiven(consents){consents.matomo}}})})},CustomContentVersion=function CustomContentVersion(args){return(0,jsx_runtime.jsx)("main",{children:(0,jsx_runtime.jsx)(CookiePage,{contentSource:{siteName:"Not shown if main title is overridden",currentLanguage:"en",texts:{sections:{main:{title:"Custom main title",text:"Custom main preferences"},details:{title:"Custom details title",text:"Custom details preferences"}},ui:{showSettings:"Custom show settings",hideSettings:"Custom hide settings",approveAllConsents:"Custom approve all consents",approveRequiredAndSelectedConsents:"Custom approve required and selected consents",approveOnlyRequiredConsents:"Custom approve only required consents",settingsSaved:"Custom settings saved text"},tableHeadings:{name:"Cookie custom name",hostName:"Host",description:"Cookie purpose",expiration:"Lifespan"}},requiredCookies:{title:"Overridden title of required cookies",text:"Overridden text of required cookies. The default text is not shown.",checkboxAriaDescription:"This is the overridden checkbox aria description of required cookies",groups:[{id:"my-cookie-group",title:"My required cookie groupcustom title",text:"My required cookie groupcustom text",checkboxAriaDescription:"Custom checkbox aria description for My cookie group",expandAriaLabel:"Custom expand button aria label for My cookie group",cookies:[{id:"custom-cookie",name:"Custom cookie",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1000 years"}]},{title:"Custom cookie group title",text:"Custom cookie group text",checkboxAriaDescription:"Custom checkbox aria description for custom cookies group",expandAriaLabel:"Custom expand button aria label for custom cookies group",cookies:[{id:"marketing",name:"Marketing 1",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"1h"}]}],cookies:[{commonCookie:"tunnistamo",groupId:"my-cookie-group"}]},optionalCookies:{title:"Overridden title of optional cookies",text:"Overridden text of optional cookies. The default text is not shown.",checkboxAriaDescription:"This is the overridden checkbox aria description of optional cookies",groups:[{title:"Custom cookies group title",text:"Custom cookies group text",checkboxAriaDescription:"Custom checkbox aria description for custom cookies group",expandAriaLabel:"Custom expand button aria label for custom cookies group",cookies:[{id:"some-cookie",name:"Setting 1",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"Sessio"},{id:"some-cookie2",name:"Setting 2",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"Sessio"}]},{commonGroup:"statistics",cookies:[{id:"someOtherConsent",name:"Other cookie",hostName:"Host name",description:"Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus",expiration:"Sessio"}]}],cookies:[{commonGroup:"statistics",commonCookie:"matomo"}]}}})})},DebugVersion=function DebugVersion(args){var contentSource={siteName:"Cookie consent debugging",currentLanguage:"fi",requiredCookies:{cookies:[{commonGroup:"statistics",commonCookie:"matomo"}]},optionalCookies:{cookies:[{commonCookie:"tunnistamo",commonGroup:"essential"},{id:"random-cookie-".concat(Math.random(),"-without-consent"),commonGroup:"marketing"}]},focusTargetSelector:"#focused-element-after-cookie-consent-closed"},getCategoryCookies=function getCategoryCookies(category){if(!category)return[];var allCookies=[];return category.groups.forEach((function(group){allCookies=[].concat((0,toConsumableArray.Z)(allCookies),(0,toConsumableArray.Z)(group.cookies))})),allCookies},Application=function Application(){var _contentSource$focusT4,consentContext=useCookieConsentContext(),content=useCookieContentContext(),hasUserHandledAllConsents=consentContext.hasUserHandledAllConsents,requiredCookies=content.requiredCookies,optionalCookies=content.optionalCookies,willRenderCookieConsentDialog=hasUserHandledAllConsents(),storedConsents=(0,useCookies().getAllConsents)(),getConsentStatus=function getConsentStatus(cookieId){return storedConsents[cookieId]};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h1",{className:"heading-xl",id:null===(_contentSource$focusT4=contentSource.focusTargetSelector)||void 0===_contentSource$focusT4?void 0:_contentSource$focusT4.replace("#",""),children:"Debugging example"}),(0,jsx_runtime.jsx)("p",{children:"This is an example how to get all data from the cookie consent context."}),(0,jsx_runtime.jsx)("p",{children:"The same contentSource can be passed to the context and it provides access to the content built from the source. There are multiple hooks for getting the context, content, texts, etc. You can also trigger actions to store consents."}),(0,jsx_runtime.jsxs)("p",{children:["All consents have been given: ",String(!willRenderCookieConsentDialog)]}),(0,jsx_runtime.jsx)("p",{children:"There is a random cookie, so modal is always shown."}),(0,jsx_runtime.jsx)("p",{children:"To see all consents in the cookie, open DevTools, goto Application tab and select Storage/Cookies from the side panel"}),(0,jsx_runtime.jsx)(Accordion.U,{heading:"View full content",children:(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)("pre",{children:JSON.stringify(content,null,2)})})}),(0,jsx_runtime.jsxs)(Accordion.U,{heading:"View required cookies and their consets",children:[(0,jsx_runtime.jsx)("p",{children:"The consents are read from the stored cookie"}),(0,jsx_runtime.jsx)("ul",{children:getCategoryCookies(requiredCookies).map((function(cookie){return(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsx)("strong",{children:cookie.id})," has consent stored in cookie: ",String(getConsentStatus(cookie.id))]},cookie.id)}))})]}),(0,jsx_runtime.jsxs)(Accordion.U,{heading:"View optional cookies and their consents",children:[(0,jsx_runtime.jsx)("p",{children:"The consents are read from the stored cookie"}),(0,jsx_runtime.jsx)("ul",{children:getCategoryCookies(optionalCookies).map((function(cookie){return(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsx)("strong",{children:cookie.id})," has consent: ",String(getConsentStatus(cookie.id))]},cookie.id)}))})]}),(0,jsx_runtime.jsxs)(Accordion.U,{heading:"View consents in the stored cookie",children:[(0,jsx_runtime.jsx)("p",{children:"The stored cookie has these user given consents:"}),(0,jsx_runtime.jsx)("ul",{children:Object.keys(storedConsents).map((function(cookieId){return(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsx)("strong",{children:cookieId}),": ",String(getConsentStatus(cookieId))]},cookieId)}))})]})]})};return(0,jsx_runtime.jsxs)(CookieConsentContext,{contentSource,children:[(0,jsx_runtime.jsx)(Application,{}),(0,jsx_runtime.jsx)(Modal,{})]})};DebugVersion.parameters={loki:{skip:!0}};var TunnistamoLoginCookies=function TunnistamoLoginCookies(args){var _useState7=(0,react.useState)("en"),_useState8=(0,slicedToArray.Z)(_useState7,2),language=_useState8[0],setLanguage=_useState8[1],contentSource={siteName:"Site title ".concat(language),texts:{sections:{main:{title:"List all cookies used in Tunnistamo login",text:"This is an example how to get consents for all cookies when using Tunnistamo login flow. All used session, language, load balancer and csrf cookies are listed. Tunnistamo uses Tunnistus and Suomi.fi services and cookies of those services are also listed as they have no consent queries of their own."}}},currentLanguage:language,requiredCookies:{groups:[{commonGroup:"tunnistamoLogin"},{commonGroup:"loadBalancing",cookies:[{commonCookie:"tunnistamo-login-loadbalancer"}]},{commonGroup:"informationSecurity",cookies:[{commonCookie:"tunnistamo-csrftoken"}]},{commonGroup:"language",cookies:[{commonCookie:"keycloak-language"},{commonCookie:"suomifi-language"}]}]},language:{onLanguageChange:function onLanguageChange(newLang){return setLanguage(newLang)}},focusTargetSelector:"#focused-element-after-cookie-consent-closed"};return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(CookiePage,{contentSource})})};TunnistamoLoginCookies.parameters={loki:{skip:!0}},EnglishModalVersion.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const [language, setLanguage] = useState('en');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: 'Test website',\n currentLanguage: language,\n requiredCookies: {\n groups: [\n {\n commonGroup: 'login',\n cookies: [\n {\n commonCookie: 'tunnistamo',\n },\n {\n commonCookie: 'keycloak',\n },\n ],\n },\n {\n commonGroup: 'essential',\n cookies: [\n {\n commonCookie: 'cms-session',\n },\n ],\n },\n {\n commonGroup: 'loadBalancing',\n cookies: [\n {\n id: 'loadbalancer',\n name: 'Loadbalancer Cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'accessibility',\n cookies: [\n {\n id: 'accessibility',\n name: 'Accessibility cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'userInputs',\n cookies: [\n {\n id: 'userInputs',\n name: 'User inputs cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n optionalCookies: {\n groups: [\n {\n commonGroup: 'marketing',\n cookies: [\n {\n id: 'marketing',\n name: 'Custom Marketing cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'preferences',\n cookies: [\n {\n id: 'preferences1',\n name: 'Preference 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n {\n id: 'preferences2',\n name: 'Preference 2',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1 years',\n },\n {\n id: 'preferences3',\n name: 'Preference 3',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '2h',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n commonCookie: 'matomo',\n },\n {\n commonCookie: 'matomoSession',\n },\n {\n commonCookie: 'matomoConsent',\n },\n {\n commonCookie: 'cookiehub',\n },\n {\n id: 'someOtherConsent',\n name: 'Other consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'location',\n cookies: [\n {\n id: 'location',\n name: 'Location consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'content',\n cookies: [\n {\n id: 'content',\n name: 'Content consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'thirdParty',\n cookies: [\n {\n id: 'thirdParty',\n name: 'ThirdParty consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'chat',\n cookies: [\n {\n id: 'chat',\n name: 'Chat consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'deviceInfo',\n cookies: [\n {\n id: 'deviceInfo',\n name: 'Device info consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'socialMedia',\n cookies: [\n {\n id: 'socialMedia',\n name: 'Social media consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'informationSecurity',\n cookies: [\n {\n id: 'informationSecurity',\n name: 'Information security consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n\n language: {\n onLanguageChange,\n },\n onAllConsentsGiven: (consents) => {\n if (consents.matomo) {\n // start tracking\n // window._paq.push(['setConsentGiven']);\n // window._paq.push(['setCookieConsentGiven']);\n }\n },\n onConsentsParsed: (consents, hasUserHandledAllConsents) => {\n if (consents.matomo === undefined) {\n // tell matomo to wait for consent:\n // window._paq.push(['requireConsent']);\n // window._paq.push(['requireCookieConsent']);\n } else if (consents.matomo === false) {\n // tell matomo to forget conset\n // window._paq.push(['forgetConsentGiven']);\n }\n if (hasUserHandledAllConsents) {\n // cookie consent modal will not be shown\n }\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const MatomoCookieTracker = () => {\n const { getAllConsents } = useCookies();\n const getConsentStatus = (cookieId: string) => {\n const consents = getAllConsents();\n return consents[cookieId];\n };\n const isMatomoCookieApproved = getConsentStatus('matomo');\n return (\n
\n

Example how to track single consent.

\n

Matomo onConsentsParsed is {!isMatomoCookieApproved && NOT} set.*

\n * This won't change in real time\n
\n );\n };\n\n const Application = () => {\n return (\n
\n {}\n

\n This is an example application with cookie consent modal\n

\n

The modal will be shown when required. If user has given consents, it will not be shown.

\n

If hidden, remove the cookie to see the modal again.

\n \n \n
\n );\n };\n\n return (\n <>\n \n \n \n );\n}"}},EnglishModalVersion.parameters),FinnishModalVersion.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const [language, setLanguage] = useState('fi');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: 'Testisivusto',\n currentLanguage: language,\n requiredCookies: {\n groups: [\n {\n commonGroup: 'login',\n cookies: [\n {\n commonCookie: 'tunnistamo',\n },\n {\n commonCookie: 'keycloak',\n },\n ],\n },\n {\n commonGroup: 'essential',\n cookies: [\n {\n commonCookie: 'cms-session',\n },\n ],\n },\n {\n commonGroup: 'loadBalancing',\n cookies: [\n {\n id: 'loadbalancer',\n name: 'Loadbalancer Cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'accessibility',\n cookies: [\n {\n id: 'accessibility',\n name: 'Accessibility cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'userInputs',\n cookies: [\n {\n id: 'userInputs',\n name: 'User inputs cookie',\n hostName: 'CDN site',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n optionalCookies: {\n groups: [\n {\n commonGroup: 'marketing',\n cookies: [\n {\n id: 'marketing',\n name: 'Custom Marketing cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'preferences',\n cookies: [\n {\n id: 'preferences1',\n name: 'Preference 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n {\n id: 'preferences2',\n name: 'Preference 2',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1 years',\n },\n {\n id: 'preferences3',\n name: 'Preference 3',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '2h',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n commonCookie: 'matomo',\n },\n {\n commonCookie: 'matomoSession',\n },\n {\n commonCookie: 'matomoConsent',\n },\n {\n commonCookie: 'cookiehub',\n },\n {\n id: 'someOtherConsent',\n name: 'Other consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'location',\n cookies: [\n {\n id: 'location',\n name: 'Location consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'content',\n cookies: [\n {\n id: 'content',\n name: 'Content consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'thirdParty',\n cookies: [\n {\n id: 'thirdParty',\n name: 'ThirdParty consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'chat',\n cookies: [\n {\n id: 'chat',\n name: 'Chat consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'deviceInfo',\n cookies: [\n {\n id: 'deviceInfo',\n name: 'Device info consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'socialMedia',\n cookies: [\n {\n id: 'socialMedia',\n name: 'Social media consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'informationSecurity',\n cookies: [\n {\n id: 'informationSecurity',\n name: 'Information security consent',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n },\n\n language: {\n onLanguageChange,\n },\n onAllConsentsGiven: (consents) => {\n if (consents.matomo) {\n // start tracking\n // window._paq.push(['setConsentGiven']);\n // window._paq.push(['setCookieConsentGiven']);\n }\n },\n onConsentsParsed: (consents, hasUserHandledAllConsents) => {\n if (consents.matomo === undefined) {\n // tell matomo to wait for consent:\n // window._paq.push(['requireConsent']);\n // window._paq.push(['requireCookieConsent']);\n } else if (consents.matomo === false) {\n // tell matomo to forget conset\n // window._paq.push(['forgetConsentGiven']);\n }\n if (hasUserHandledAllConsents) {\n // cookie consent modal will not be shown\n }\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const MatomoCookieTrackerFinnish = () => {\n const { getAllConsents } = useCookies();\n const getConsentStatus = (cookieId: string) => {\n const consents = getAllConsents();\n return consents[cookieId];\n };\n const isMatomoCookieApproved = getConsentStatus('matomo');\n return (\n
\n

Esimerkki kuinka seurata yhden keksin suostumusta

\n

Matomo suostumusta {isMatomoCookieApproved ? 'on' : EI OLE } asetettu.*

\n * Tämä ei päivity reaaliajassa\n
\n );\n };\n\n const Application = () => {\n return (\n
\n {}\n

\n Tämä on esimerkkisovellus CookieConsent-komponentin käytöstä\n

\n

\n Keksienhallintaikkuna näytetään tarpeen vaatiessa. Jos käyttäjä on suorittanut keksien hyväksymisprosessin,\n ikkunaa ei näytetä.\n

\n

Jos ikkuna on piilossa, poista keksit jotta se tulee taas näkyviin.

\n \n \n
\n );\n };\n\n return (\n <>\n \n \n \n );\n}"}},FinnishModalVersion.parameters),SimpleModalVersion.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const [language, setLanguage] = useState('en');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: `Site title ${language}`,\n currentLanguage: language,\n optionalCookies: {\n cookies: [\n {\n commonGroup: 'essential',\n commonCookie: 'tunnistamo',\n },\n ],\n },\n language: {\n onLanguageChange,\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const Application = () => {\n return (\n
\n {}\n

\n Simplest cookie consent example\n

\n

This is an example how the modal is shown with minimal content parameters.

\n

If modal is not shown, remove the cookie to see the modal again.

\n

Note: it the cookie.required would be true, the modal would never be shown.

\n \n
\n );\n };\n\n return (\n <>\n \n \n \n );\n}"}},SimpleModalVersion.parameters),PageVersion.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const contentSource: CookieContentSource = {\n siteName: 'Test website',\n currentLanguage: 'en',\n texts: {\n sections: {\n main: {\n title: 'Cookie consents as a page!',\n },\n },\n },\n requiredCookies: {\n groups: [\n {\n commonGroup: 'essential',\n cookies: [\n {\n commonCookie: 'tunnistamo',\n },\n {\n id: 'loadbalancer',\n name: 'loadbalancer cookie',\n hostName: 'CDN service',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n {\n commonCookie: 'keycloak',\n },\n ],\n },\n ],\n },\n optionalCookies: {\n groups: [\n {\n commonGroup: 'marketing',\n cookies: [\n {\n id: 'marketing',\n name: 'Marketing 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n {\n commonGroup: 'preferences',\n cookies: [\n {\n id: 'preferences1',\n name: 'Setting 1',\n hostName: 'UserPreferences',\n description:\n 'Proin sodales maximus est, pulvinar tempus felis tempus quis. Aenean at vestibulum lectus. Aliquam erat volutpat. Nullam venenatis feugiat sem vitae cursus. ',\n expiration: '1 year',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n commonCookie: 'matomo',\n },\n {\n commonCookie: 'matomoSession',\n },\n {\n commonCookie: 'matomoConsent',\n },\n {\n id: 'someOtherConsent',\n name: 'Other analytics site',\n hostName: 'Other analytics',\n description: 'Vel est molestie Quisque vel dui vel est molestie con con',\n expiration: '1 year',\n },\n ],\n },\n ],\n },\n\n onAllConsentsGiven: (consents) => {\n // called when consents are saved\n // handle changes like:\n if (!consents.matomo) {\n // stop matomo tracking\n }\n },\n };\n\n return (\n
\n \n
\n );\n}"}},PageVersion.parameters),CustomContentVersion.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const contentSource: CookieContentSource = {\n siteName: 'Not shown if main title is overridden',\n currentLanguage: 'en',\n texts: {\n sections: {\n main: {\n title: 'Custom main title',\n text: 'Custom main preferences',\n },\n details: {\n title: 'Custom details title',\n text: 'Custom details preferences',\n },\n },\n ui: {\n showSettings: 'Custom show settings',\n hideSettings: 'Custom hide settings',\n approveAllConsents: 'Custom approve all consents',\n approveRequiredAndSelectedConsents: 'Custom approve required and selected consents',\n approveOnlyRequiredConsents: 'Custom approve only required consents',\n settingsSaved: 'Custom settings saved text',\n },\n tableHeadings: {\n name: 'Cookie custom name',\n hostName: 'Host',\n description: 'Cookie purpose',\n expiration: 'Lifespan',\n },\n },\n requiredCookies: {\n title: 'Overridden title of required cookies',\n text: 'Overridden text of required cookies. The default text is not shown.',\n checkboxAriaDescription: 'This is the overridden checkbox aria description of required cookies',\n groups: [\n {\n id: 'my-cookie-group',\n title: 'My required cookie groupcustom title',\n text: 'My required cookie groupcustom text',\n checkboxAriaDescription: 'Custom checkbox aria description for My cookie group',\n expandAriaLabel: 'Custom expand button aria label for My cookie group',\n cookies: [\n {\n id: 'custom-cookie',\n name: 'Custom cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1000 years',\n },\n ],\n },\n {\n title: 'Custom cookie group title',\n text: 'Custom cookie group text',\n checkboxAriaDescription: 'Custom checkbox aria description for custom cookies group',\n expandAriaLabel: 'Custom expand button aria label for custom cookies group',\n cookies: [\n {\n id: 'marketing',\n name: 'Marketing 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: '1h',\n },\n ],\n },\n ],\n cookies: [\n {\n commonCookie: 'tunnistamo',\n groupId: 'my-cookie-group',\n },\n ],\n },\n optionalCookies: {\n title: 'Overridden title of optional cookies',\n text: 'Overridden text of optional cookies. The default text is not shown.',\n checkboxAriaDescription: 'This is the overridden checkbox aria description of optional cookies',\n groups: [\n {\n title: 'Custom cookies group title',\n text: 'Custom cookies group text',\n checkboxAriaDescription: 'Custom checkbox aria description for custom cookies group',\n expandAriaLabel: 'Custom expand button aria label for custom cookies group',\n cookies: [\n {\n id: 'some-cookie',\n name: 'Setting 1',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: 'Sessio',\n },\n {\n id: 'some-cookie2',\n name: 'Setting 2',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: 'Sessio',\n },\n ],\n },\n {\n commonGroup: 'statistics',\n cookies: [\n {\n id: 'someOtherConsent',\n name: 'Other cookie',\n hostName: 'Host name',\n description:\n 'Description lectus lacinia sed. Phasellus purus nisi, imperdiet id volutpat vel, pellentesque in ex. In pretium maximus finibus',\n expiration: 'Sessio',\n },\n ],\n },\n ],\n cookies: [\n {\n commonGroup: 'statistics',\n commonCookie: 'matomo',\n },\n ],\n },\n };\n\n return (\n
\n \n
\n );\n}"}},CustomContentVersion.parameters),DebugVersion.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const contentSource: CookieContentSource = {\n siteName: 'Cookie consent debugging',\n currentLanguage: 'fi',\n requiredCookies: {\n cookies: [\n {\n commonGroup: 'statistics',\n commonCookie: 'matomo',\n },\n ],\n },\n optionalCookies: {\n cookies: [\n {\n commonCookie: 'tunnistamo',\n commonGroup: 'essential',\n },\n {\n id: `random-cookie-${Math.random()}-without-consent`,\n commonGroup: 'marketing',\n },\n ],\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n const getCategoryCookies = (category?: Category): CookieData[] => {\n if (!category) {\n return [];\n }\n let allCookies: CookieData[] = [];\n category.groups.forEach((group) => {\n allCookies = [...allCookies, ...group.cookies];\n });\n return allCookies;\n };\n\n const Application = () => {\n const consentContext = useCookieConsentContext();\n const content = useCookieContentContext();\n const { hasUserHandledAllConsents } = consentContext;\n const { requiredCookies, optionalCookies } = content;\n const willRenderCookieConsentDialog = hasUserHandledAllConsents();\n const { getAllConsents } = useCookies();\n const storedConsents = getAllConsents();\n const getConsentStatus = (cookieId: string) => {\n return storedConsents[cookieId];\n };\n return (\n
\n

\n Debugging example\n

\n

This is an example how to get all data from the cookie consent context.

\n

\n The same contentSource can be passed to the context and it provides access to the content built from the\n source. There are multiple hooks for getting the context, content, texts, etc. You can also trigger actions to\n store consents.\n

\n

All consents have been given: {String(!willRenderCookieConsentDialog)}

\n

There is a random cookie, so modal is always shown.

\n

\n To see all consents in the cookie, open DevTools, goto Application tab and select Storage/Cookies from the\n side panel\n

\n \n
\n
{JSON.stringify(content, null, 2)}
\n
\n
\n \n

The consents are read from the stored cookie

\n
    \n {getCategoryCookies(requiredCookies).map((cookie) => {\n return (\n
  • \n {cookie.id} has consent stored in cookie: {String(getConsentStatus(cookie.id))}\n
  • \n );\n })}\n
\n
\n \n

The consents are read from the stored cookie

\n
    \n {getCategoryCookies(optionalCookies).map((cookie) => {\n return (\n
  • \n {cookie.id} has consent: {String(getConsentStatus(cookie.id))}\n
  • \n );\n })}\n
\n
\n \n

The stored cookie has these user given consents:

\n
    \n {Object.keys(storedConsents).map((cookieId) => {\n return (\n
  • \n {cookieId}: {String(getConsentStatus(cookieId))}\n
  • \n );\n })}\n
\n
\n
\n );\n };\n\n return (\n \n \n \n \n );\n}"}},DebugVersion.parameters),TunnistamoLoginCookies.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const [language, setLanguage] = useState('en');\n const onLanguageChange = (newLang) => setLanguage(newLang);\n const contentSource: CookieContentSource = {\n siteName: `Site title ${language}`,\n texts: {\n sections: {\n main: {\n title: 'List all cookies used in Tunnistamo login',\n text:\n 'This is an example how to get consents for all cookies when using Tunnistamo login flow. All used session, language, load balancer and csrf cookies are listed. Tunnistamo uses Tunnistus and Suomi.fi services and cookies of those services are also listed as they have no consent queries of their own.',\n },\n },\n },\n currentLanguage: language,\n requiredCookies: {\n groups: [\n { commonGroup: 'tunnistamoLogin' },\n { commonGroup: 'loadBalancing', cookies: [{ commonCookie: 'tunnistamo-login-loadbalancer' }] },\n {\n commonGroup: 'informationSecurity',\n cookies: [{ commonCookie: 'tunnistamo-csrftoken' }],\n },\n {\n commonGroup: 'language',\n cookies: [{ commonCookie: 'keycloak-language' }, { commonCookie: 'suomifi-language' }],\n },\n ],\n },\n language: {\n onLanguageChange,\n },\n focusTargetSelector: '#focused-element-after-cookie-consent-closed',\n };\n\n return (\n <>\n \n \n );\n}"}},TunnistamoLoginCookies.parameters);try{EnglishModalVersion.displayName="EnglishModalVersion",EnglishModalVersion.__docgenInfo={description:"",displayName:"EnglishModalVersion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#EnglishModalVersion"]={docgenInfo:EnglishModalVersion.__docgenInfo,name:"EnglishModalVersion",path:"src/components/cookieConsent/CookieConsent.stories.tsx#EnglishModalVersion"})}catch(__react_docgen_typescript_loader_error){}try{FinnishModalVersion.displayName="FinnishModalVersion",FinnishModalVersion.__docgenInfo={description:"",displayName:"FinnishModalVersion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#FinnishModalVersion"]={docgenInfo:FinnishModalVersion.__docgenInfo,name:"FinnishModalVersion",path:"src/components/cookieConsent/CookieConsent.stories.tsx#FinnishModalVersion"})}catch(__react_docgen_typescript_loader_error){}try{SimpleModalVersion.displayName="SimpleModalVersion",SimpleModalVersion.__docgenInfo={description:"",displayName:"SimpleModalVersion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#SimpleModalVersion"]={docgenInfo:SimpleModalVersion.__docgenInfo,name:"SimpleModalVersion",path:"src/components/cookieConsent/CookieConsent.stories.tsx#SimpleModalVersion"})}catch(__react_docgen_typescript_loader_error){}try{PageVersion.displayName="PageVersion",PageVersion.__docgenInfo={description:"",displayName:"PageVersion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#PageVersion"]={docgenInfo:PageVersion.__docgenInfo,name:"PageVersion",path:"src/components/cookieConsent/CookieConsent.stories.tsx#PageVersion"})}catch(__react_docgen_typescript_loader_error){}try{CustomContentVersion.displayName="CustomContentVersion",CustomContentVersion.__docgenInfo={description:"",displayName:"CustomContentVersion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#CustomContentVersion"]={docgenInfo:CustomContentVersion.__docgenInfo,name:"CustomContentVersion",path:"src/components/cookieConsent/CookieConsent.stories.tsx#CustomContentVersion"})}catch(__react_docgen_typescript_loader_error){}try{DebugVersion.displayName="DebugVersion",DebugVersion.__docgenInfo={description:"",displayName:"DebugVersion",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#DebugVersion"]={docgenInfo:DebugVersion.__docgenInfo,name:"DebugVersion",path:"src/components/cookieConsent/CookieConsent.stories.tsx#DebugVersion"})}catch(__react_docgen_typescript_loader_error){}try{TunnistamoLoginCookies.displayName="TunnistamoLoginCookies",TunnistamoLoginCookies.__docgenInfo={description:"",displayName:"TunnistamoLoginCookies",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cookieConsent/CookieConsent.stories.tsx#TunnistamoLoginCookies"]={docgenInfo:TunnistamoLoginCookies.__docgenInfo,name:"TunnistamoLoginCookies",path:"src/components/cookieConsent/CookieConsent.stories.tsx#TunnistamoLoginCookies"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/dateInput/DateInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Localisation:()=>Localisation,WithDisabledDates:()=>WithDisabledDates,WithExternalClearValueButton:()=>WithExternalClearValueButton,WithMinAndMaxDate:()=>WithMinAndMaxDate,WithSelectedDisabledDates:()=>WithSelectedDisabledDates,WithoutConfirmation:()=>WithoutConfirmation,WithoutDatePicker:()=>WithoutDatePicker,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),date_fns_parse__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("../../node_modules/date-fns/esm/parse/index.js"),date_fns_addDays__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("../../node_modules/date-fns/esm/addDays/index.js"),date_fns_format__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("../../node_modules/date-fns/esm/format/index.js"),date_fns_isWeekend__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("../../node_modules/date-fns/esm/isWeekend/index.js"),date_fns_isSameDay__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("../../node_modules/date-fns/esm/isSameDay/index.js"),date_fns__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/date-fns/esm/addMonths/index.js"),___WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/dateInput/DateInput.tsx"),_button__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/button/Button.tsx"),_icons__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/icons/IconCrossCircle.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:___WEBPACK_IMPORTED_MODULE_2__.W,title:"Components/DateInput",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:"import React, { useState } from 'react';\nimport parse from 'date-fns/parse';\nimport addDays from 'date-fns/addDays';\nimport format from 'date-fns/format';\nimport isWeekend from 'date-fns/isWeekend';\nimport isSameDay from 'date-fns/isSameDay';\nimport { addMonths } from 'date-fns';\n\nimport { DateInput } from '.';\nimport { Button } from '../button';\nimport { IconCrossCircle } from '../../icons';\n\nconst formatHelperTextEnglish = 'Use format D.M.YYYY';\n\nconst argTypes = {\n minDate: {\n control: 'date',\n },\n maxDate: {\n control: 'date',\n },\n};\n\nexport default {\n component: DateInput,\n title: 'Components/DateInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { hideNoControlsWarning: true },\n },\n argTypes,\n args: {\n id: 'date',\n label: 'Choose a date',\n helperText: formatHelperTextEnglish,\n language: 'en',\n disableConfirmation: false,\n disableDatePicker: false,\n onChange: (value: string, valueAsDate: Date) => {\n \n console.log(value, valueAsDate);\n },\n },\n};\n\nexport const Default = (args) => {\n return ;\n};\n\nexport const WithMinAndMaxDate = (args) => {\n const minDate = new Date();\n minDate.setDate(4);\n const maxDate = addMonths(new Date(), 4);\n return ;\n};\n\nWithMinAndMaxDate.parameters = { loki: { skip: true } };\n\nexport const WithoutConfirmation = (args) => {\n return ;\n};\nWithoutConfirmation.storyName = 'Without confirmation';\nWithoutConfirmation.args = {\n disableConfirmation: true,\n};\n\nexport const Localisation = (args) => {\n const bottomMargin = { marginBottom: 'var(--spacing-m)' };\n return (\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n );\n};\n\nexport const WithoutDatePicker = (args) => {\n return ;\n};\nWithoutDatePicker.storyName = 'Without date picker';\nWithoutDatePicker.args = {\n disableDatePicker: true,\n};\n\nexport const WithExternalClearValueButton = (args) => {\n const [value, setValue] = useState('10.2.2022');\n return (\n
\n \n \n
\n );\n};\nWithExternalClearValueButton.storyName = 'With external clear value button';\n\nexport const WithDisabledDates = (args) => {\n const [value, setValue] = useState('');\n const [errorText, setErrorText] = useState(undefined);\n const dateHelperText = 'Only weekdays are available.';\n const helperText = `${dateHelperText} ${formatHelperTextEnglish}`;\n\n React.useEffect(() => {\n if (!value) {\n setErrorText(undefined);\n } else {\n const selectedDate = parse(value, 'dd.M.yyyy', new Date());\n if (isWeekend(selectedDate)) {\n setErrorText(`The date is a weekend day. ${dateHelperText}`);\n } else {\n setErrorText(undefined);\n }\n }\n }, [value]);\n\n return (\n \n );\n};\nWithDisabledDates.storyName = 'With disabled dates';\nWithDisabledDates.parameters = { loki: { skip: true } };\n\nexport const WithSelectedDisabledDates = (args) => {\n const dateFormat = 'dd.M.yyyy';\n const dateValue = new Date(2021, 10, 12);\n const [value, setValue] = useState(format(dateValue, dateFormat));\n const [errorText, setErrorText] = useState(undefined);\n const disabledDates = [addDays(dateValue, 12), addDays(dateValue, 14)];\n const helperText = `Dates ${disabledDates\n .map((d) => format(d, dateFormat))\n .join(' and ')} are disabled. Use other dates instead. ${formatHelperTextEnglish}`;\n const isDisabledDate = (date) => !!disabledDates.find((disabledDate) => isSameDay(disabledDate, date));\n\n React.useEffect(() => {\n if (!value) {\n setErrorText(undefined);\n } else {\n const selectedDate = parse(value, dateFormat, new Date());\n if (isDisabledDate(selectedDate)) {\n setErrorText(`This date is disabled. Please use another date instead.`);\n } else {\n setErrorText(undefined);\n }\n }\n }, [value]);\n\n return (\n \n );\n};\nWithSelectedDisabledDates.storyName = 'With selected disabled dates';\nWithSelectedDisabledDates.parameters = { loki: { skip: true } };\n",locationsMap:{default:{startLoc:{col:23,line:46},endLoc:{col:1,line:48},startBody:{col:23,line:46},endBody:{col:1,line:48}},"with-min-and-max-date":{startLoc:{col:33,line:50},endLoc:{col:1,line:55},startBody:{col:33,line:50},endBody:{col:1,line:55}},"without-confirmation":{startLoc:{col:35,line:59},endLoc:{col:1,line:61},startBody:{col:35,line:59},endBody:{col:1,line:61}},localisation:{startLoc:{col:28,line:67},endLoc:{col:1,line:100},startBody:{col:28,line:67},endBody:{col:1,line:100}},"without-date-picker":{startLoc:{col:33,line:102},endLoc:{col:1,line:104},startBody:{col:33,line:102},endBody:{col:1,line:104}},"with-external-clear-value-button":{startLoc:{col:44,line:110},endLoc:{col:1,line:120},startBody:{col:44,line:110},endBody:{col:1,line:120}},"with-disabled-dates":{startLoc:{col:33,line:123},endLoc:{col:1,line:153},startBody:{col:33,line:123},endBody:{col:1,line:153}},"with-selected-disabled-dates":{startLoc:{col:41,line:157},endLoc:{col:1,line:192},startBody:{col:41,line:157},endBody:{col:1,line:192}}}},controls:{hideNoControlsWarning:!0}},argTypes:{minDate:{control:"date"},maxDate:{control:"date"}},args:{id:"date",label:"Choose a date",helperText:"Use format D.M.YYYY",language:"en",disableConfirmation:!1,disableDatePicker:!1,onChange:function onChange(value,valueAsDate){console.log(value,valueAsDate)}}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))},WithMinAndMaxDate=function WithMinAndMaxDate(args){var minDate=new Date;minDate.setDate(4);var maxDate=(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.Z)(new Date,4);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{minDate,maxDate}))};WithMinAndMaxDate.parameters={loki:{skip:!0}};var WithoutConfirmation=function WithoutConfirmation(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithoutConfirmation.storyName="Without confirmation",WithoutConfirmation.args={disableConfirmation:!0};var Localisation=function Localisation(args){var bottomMargin={marginBottom:"var(--spacing-m)"};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:bottomMargin,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{id:"".concat(args.id,"-fi"),language:"fi",label:"Valitse päivämäärä",helperText:"Use format D.M.YYYY"}))}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:bottomMargin,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{id:"".concat(args.id,"-sv"),language:"sv",label:"Välj ett datum",helperText:"Använd ett format D.M.ÅÅÅÅ"}))}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:bottomMargin,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{id:"".concat(args.id,"-en"),language:"en",label:"Choose a date",helperText:"Käytä muotoa P.K.VVVV"}))})]})},WithoutDatePicker=function WithoutDatePicker(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithoutDatePicker.storyName="Without date picker",WithoutDatePicker.args={disableDatePicker:!0};var WithExternalClearValueButton=function WithExternalClearValueButton(args){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("10.2.2022"),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"date-input--external-clear-value-button",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{value,onChange:setValue})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_6__.z,{variant:"supplementary",onClick:function onClick(){return setValue("")},iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_7__.IconCrossCircle,{"aria-hidden":!0}),children:"Clear value"})]})};WithExternalClearValueButton.storyName="With external clear value button";var WithDisabledDates=function WithDisabledDates(args){var _useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState3,2),value=_useState4[0],setValue=_useState4[1],_useState5=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(void 0),_useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState5,2),errorText=_useState6[0],setErrorText=_useState6[1],helperText="".concat("Only weekdays are available."," ").concat("Use format D.M.YYYY");return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(value){var selectedDate=(0,date_fns_parse__WEBPACK_IMPORTED_MODULE_8__.Z)(value,"dd.M.yyyy",new Date);(0,date_fns_isWeekend__WEBPACK_IMPORTED_MODULE_9__.Z)(selectedDate)?setErrorText("The date is a weekend day. ".concat("Only weekdays are available.")):setErrorText(void 0)}else setErrorText(void 0)}),[value]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{value,onChange:setValue,isDateDisabledBy:date_fns_isWeekend__WEBPACK_IMPORTED_MODULE_9__.Z,helperText,errorText,invalid:!!errorText}))};WithDisabledDates.storyName="With disabled dates",WithDisabledDates.parameters={loki:{skip:!0}};var WithSelectedDisabledDates=function WithSelectedDisabledDates(args){var dateValue=new Date(2021,10,12),_useState7=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((0,date_fns_format__WEBPACK_IMPORTED_MODULE_10__.Z)(dateValue,"dd.M.yyyy")),_useState8=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState7,2),value=_useState8[0],setValue=_useState8[1],_useState9=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(void 0),_useState10=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState9,2),errorText=_useState10[0],setErrorText=_useState10[1],disabledDates=[(0,date_fns_addDays__WEBPACK_IMPORTED_MODULE_11__.Z)(dateValue,12),(0,date_fns_addDays__WEBPACK_IMPORTED_MODULE_11__.Z)(dateValue,14)],helperText="Dates ".concat(disabledDates.map((function(d){return(0,date_fns_format__WEBPACK_IMPORTED_MODULE_10__.Z)(d,"dd.M.yyyy")})).join(" and ")," are disabled. Use other dates instead. ").concat("Use format D.M.YYYY"),isDisabledDate=function isDisabledDate(date){return!!disabledDates.find((function(disabledDate){return(0,date_fns_isSameDay__WEBPACK_IMPORTED_MODULE_12__.Z)(disabledDate,date)}))};return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(value){var selectedDate=(0,date_fns_parse__WEBPACK_IMPORTED_MODULE_8__.Z)(value,"dd.M.yyyy",new Date);isDisabledDate(selectedDate)?setErrorText("This date is disabled. Please use another date instead."):setErrorText(void 0)}else setErrorText(void 0)}),[value]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(___WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{value,onChange:setValue,isDateDisabledBy:isDisabledDate,helperText,errorText,invalid:!!errorText}))};WithSelectedDisabledDates.storyName="With selected disabled dates",WithSelectedDisabledDates.parameters={loki:{skip:!0}},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n return ;\n}"}},Default.parameters),WithMinAndMaxDate.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const minDate = new Date();\n minDate.setDate(4);\n const maxDate = addMonths(new Date(), 4);\n return ;\n}"}},WithMinAndMaxDate.parameters),WithoutConfirmation.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n return ;\n}"}},WithoutConfirmation.parameters),Localisation.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => {\n const bottomMargin = { marginBottom: \'var(--spacing-m)\' };\n return (\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n );\n}'}},Localisation.parameters),WithoutDatePicker.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n return ;\n}"}},WithoutDatePicker.parameters),WithExternalClearValueButton.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const [value, setValue] = useState('10.2.2022');\n return (\n
\n \n \n
\n );\n}"}},WithExternalClearValueButton.parameters),WithDisabledDates.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const [value, setValue] = useState('');\n const [errorText, setErrorText] = useState(undefined);\n const dateHelperText = 'Only weekdays are available.';\n const helperText = `${dateHelperText} ${formatHelperTextEnglish}`;\n\n React.useEffect(() => {\n if (!value) {\n setErrorText(undefined);\n } else {\n const selectedDate = parse(value, 'dd.M.yyyy', new Date());\n if (isWeekend(selectedDate)) {\n setErrorText(`The date is a weekend day. ${dateHelperText}`);\n } else {\n setErrorText(undefined);\n }\n }\n }, [value]);\n\n return (\n \n );\n}"}},WithDisabledDates.parameters),WithSelectedDisabledDates.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const dateFormat = 'dd.M.yyyy';\n const dateValue = new Date(2021, 10, 12);\n const [value, setValue] = useState(format(dateValue, dateFormat));\n const [errorText, setErrorText] = useState(undefined);\n const disabledDates = [addDays(dateValue, 12), addDays(dateValue, 14)];\n const helperText = `Dates ${disabledDates\n .map((d) => format(d, dateFormat))\n .join(' and ')} are disabled. Use other dates instead. ${formatHelperTextEnglish}`;\n const isDisabledDate = (date) => !!disabledDates.find((disabledDate) => isSameDay(disabledDate, date));\n\n React.useEffect(() => {\n if (!value) {\n setErrorText(undefined);\n } else {\n const selectedDate = parse(value, dateFormat, new Date());\n if (isDisabledDate(selectedDate)) {\n setErrorText(`This date is disabled. Please use another date instead.`);\n } else {\n setErrorText(undefined);\n }\n }\n }, [value]);\n\n return (\n \n );\n}"}},WithSelectedDisabledDates.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/dateInput/DateInput.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{WithMinAndMaxDate.displayName="WithMinAndMaxDate",WithMinAndMaxDate.__docgenInfo={description:"",displayName:"WithMinAndMaxDate",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#WithMinAndMaxDate"]={docgenInfo:WithMinAndMaxDate.__docgenInfo,name:"WithMinAndMaxDate",path:"src/components/dateInput/DateInput.stories.tsx#WithMinAndMaxDate"})}catch(__react_docgen_typescript_loader_error){}try{WithoutConfirmation.displayName="WithoutConfirmation",WithoutConfirmation.__docgenInfo={description:"",displayName:"WithoutConfirmation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#WithoutConfirmation"]={docgenInfo:WithoutConfirmation.__docgenInfo,name:"WithoutConfirmation",path:"src/components/dateInput/DateInput.stories.tsx#WithoutConfirmation"})}catch(__react_docgen_typescript_loader_error){}try{Localisation.displayName="Localisation",Localisation.__docgenInfo={description:"",displayName:"Localisation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#Localisation"]={docgenInfo:Localisation.__docgenInfo,name:"Localisation",path:"src/components/dateInput/DateInput.stories.tsx#Localisation"})}catch(__react_docgen_typescript_loader_error){}try{WithoutDatePicker.displayName="WithoutDatePicker",WithoutDatePicker.__docgenInfo={description:"",displayName:"WithoutDatePicker",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#WithoutDatePicker"]={docgenInfo:WithoutDatePicker.__docgenInfo,name:"WithoutDatePicker",path:"src/components/dateInput/DateInput.stories.tsx#WithoutDatePicker"})}catch(__react_docgen_typescript_loader_error){}try{WithExternalClearValueButton.displayName="WithExternalClearValueButton",WithExternalClearValueButton.__docgenInfo={description:"",displayName:"WithExternalClearValueButton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#WithExternalClearValueButton"]={docgenInfo:WithExternalClearValueButton.__docgenInfo,name:"WithExternalClearValueButton",path:"src/components/dateInput/DateInput.stories.tsx#WithExternalClearValueButton"})}catch(__react_docgen_typescript_loader_error){}try{WithDisabledDates.displayName="WithDisabledDates",WithDisabledDates.__docgenInfo={description:"",displayName:"WithDisabledDates",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#WithDisabledDates"]={docgenInfo:WithDisabledDates.__docgenInfo,name:"WithDisabledDates",path:"src/components/dateInput/DateInput.stories.tsx#WithDisabledDates"})}catch(__react_docgen_typescript_loader_error){}try{WithSelectedDisabledDates.displayName="WithSelectedDisabledDates",WithSelectedDisabledDates.__docgenInfo={description:"",displayName:"WithSelectedDisabledDates",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dateInput/DateInput.stories.tsx#WithSelectedDisabledDates"]={docgenInfo:WithSelectedDisabledDates.__docgenInfo,name:"WithSelectedDisabledDates",path:"src/components/dateInput/DateInput.stories.tsx#WithSelectedDisabledDates"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/dialog/Dialog.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Confirmation:()=>Confirmation,ConfirmationWithTerms:()=>ConfirmationWithTerms,Danger:()=>Danger,Default:()=>Default,LongButtonLabels:()=>LongButtonLabels,ScrollableConfirmation:()=>ScrollableConfirmation,WithBoxShadow:()=>WithBoxShadow,WithControlledContent:()=>WithControlledContent,default:()=>Dialog_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js"),Button=__webpack_require__("./src/components/button/Button.tsx"),TextArea=__webpack_require__("./src/components/textarea/TextArea.tsx"),TextInput=__webpack_require__("./src/components/textInput/TextInput.tsx"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_dom=__webpack_require__("../../node_modules/react-dom/index.js");__webpack_require__("./src/styles/base.css");const Dialog_module={"medium-up":"only screen and (min-width: 768px)",dialogVisibleBodyWithHiddenScrollbars:"Dialog_dialogVisibleBodyWithHiddenScrollbars__JmYA7",dialogBackdrop:"Dialog_dialogBackdrop__y8OAO",dialog:"Dialog_dialog__Qe1nH",dialogContainer:"Dialog_dialogContainer__PG0Xs",danger:"Dialog_danger__QBwE9",dialogVisible:"Dialog_dialogVisible__w0jBb",dialogScrollable:"Dialog_dialogScrollable__xhfov",boxShadow:"Dialog_boxShadow__DT3Rq"};var classNames=__webpack_require__("./src/utils/classNames.ts"),useTheme=__webpack_require__("./src/hooks/useTheme.tsx");const DialogActionButtons_module_dialogActionButtons="DialogActionButtons_dialogActionButtons__F197P";var jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),DialogActionButtons=function DialogActionButtons(_ref){var children=_ref.children,className=_ref.className;return(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(DialogActionButtons_module_dialogActionButtons,className),children})};DialogActionButtons.componentName="DialogActionButtons";try{DialogActionButtons.displayName="DialogActionButtons",DialogActionButtons.__docgenInfo={description:"",displayName:"DialogActionButtons",props:{className:{defaultValue:null,description:"className for custom styling",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/dialogActionButtons/DialogActionButtons.tsx#DialogActionButtons"]={docgenInfo:DialogActionButtons.__docgenInfo,name:"DialogActionButtons",path:"src/components/dialog/dialogActionButtons/DialogActionButtons.tsx#DialogActionButtons"})}catch(__react_docgen_typescript_loader_error){}var IconCross=__webpack_require__("./src/icons/IconCross.tsx");const DialogHeader_module_dialogHeaderClose="DialogHeader_dialogHeaderClose__x0sym",DialogHeader_module_dialogHeader="DialogHeader_dialogHeader__pdpXM",DialogHeader_module_dialogHeaderContent="DialogHeader_dialogHeaderContent__x1IcU",DialogHeader_module_dialogTitle="DialogHeader_dialogTitle__sw2N8",DialogHeader_module_dialogTitleLeftIcon="DialogHeader_dialogTitleLeftIcon__sQYOw";var DialogContext=react.createContext({}),DialogHeader=function DialogHeader(_ref){var id=_ref.id,title=_ref.title,iconLeft=_ref.iconLeft,_useContext=(0,react.useContext)(DialogContext),close=_useContext.close,closeButtonLabelText=_useContext.closeButtonLabelText,isReadyToShowDialog=_useContext.isReadyToShowDialog,titleRef=react.useRef();return(0,react.useEffect)((function(){titleRef&&isReadyToShowDialog&&titleRef.current.focus()}),[titleRef,isReadyToShowDialog]),(0,jsx_runtime.jsx)("div",{className:DialogHeader_module_dialogHeader,children:(0,jsx_runtime.jsxs)("div",{className:DialogHeader_module_dialogHeaderContent,children:[close&&(0,jsx_runtime.jsx)("button",{className:DialogHeader_module_dialogHeaderClose,type:"button","aria-label":closeButtonLabelText||"Close",onClick:function onClick(){return close()},children:(0,jsx_runtime.jsx)(IconCross.IconCross,{"aria-hidden":"true"})}),(0,jsx_runtime.jsxs)("h2",{id,tabIndex:-1,className:DialogHeader_module_dialogTitle,ref:titleRef,children:[iconLeft&&(0,jsx_runtime.jsx)("span",{className:DialogHeader_module_dialogTitleLeftIcon,"aria-hidden":"true",children:iconLeft}),title]})]})})};DialogHeader.componentName="DialogHeader";try{DialogHeader.displayName="DialogHeader",DialogHeader.__docgenInfo={description:"",displayName:"DialogHeader",props:{id:{defaultValue:null,description:"The id of the heading element.",name:"id",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"The text of the heading element.",name:"title",required:!0,type:{name:"string"}},iconLeft:{defaultValue:null,description:"Element placed on the left side of the heading element.",name:"iconLeft",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/dialogHeader/DialogHeader.tsx#DialogHeader"]={docgenInfo:DialogHeader.__docgenInfo,name:"DialogHeader",path:"src/components/dialog/dialogHeader/DialogHeader.tsx#DialogHeader"})}catch(__react_docgen_typescript_loader_error){}const DialogContent_module_dialogContent="DialogContent_dialogContent__GM1RQ",DialogContent_module_dialogContentScrollable="DialogContent_dialogContentScrollable__ARSfO";var DialogContent=function DialogContent(_ref){var id=_ref.id,children=_ref.children,scrollable=(0,react.useContext)(DialogContext).scrollable;return(0,jsx_runtime.jsx)("div",{id,className:(0,classNames.Z)(DialogContent_module_dialogContent,scrollable&&DialogContent_module_dialogContentScrollable),children})};DialogContent.componentName="DialogContent";try{DialogContent.displayName="DialogContent",DialogContent.__docgenInfo={description:"",displayName:"DialogContent",props:{id:{defaultValue:null,description:"The id of the content element.",name:"id",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/dialogContent/DialogContent.tsx#DialogContent"]={docgenInfo:DialogContent.__docgenInfo,name:"DialogContent",path:"src/components/dialog/dialogContent/DialogContent.tsx#DialogContent"})}catch(__react_docgen_typescript_loader_error){}var _excluded=["boxShadow","id","isOpen","children","close","closeButtonLabelText","focusAfterCloseElement","focusAfterCloseRef","scrollable","variant","style","theme","className","targetElement"],TabBarrierPosition=function(TabBarrierPosition){return TabBarrierPosition.top="top",TabBarrierPosition.bottom="bottom",TabBarrierPosition}(TabBarrierPosition||{}),defaultBarrierProps={tabIndex:0,"aria-hidden":!0},focusToDialogElement=function focusToDialogElement(position,dialogElement){if(dialogElement){var focusableElements=function findFocusableDialogElements(dialogElement){return dialogElement.querySelectorAll('a, button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')}(dialogElement);focusableElements.length&&focusableElements[position===TabBarrierPosition.top?0:focusableElements.length-1].focus()}},ContentTabBarrier=function ContentTabBarrier(_ref){var onFocus=_ref.onFocus;return(0,jsx_runtime.jsx)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({},defaultBarrierProps),{},{onFocus}))},addDocumentTabBarrier=function addDocumentTabBarrier(position,dialogElement){var element=document.createElement("div");return element.className="hds-dialog-tab-barrier",element.tabIndex=defaultBarrierProps.tabIndex,element["aria-hidden"]=defaultBarrierProps.tabIndex["aria-hidden"],element.addEventListener("focus",(function(){return focusToDialogElement(position,dialogElement)})),position===TabBarrierPosition.top?document.body.insertBefore(element,document.body.firstChild):document.body.appendChild(element),element},Dialog=function Dialog(_ref2){var _ref2$boxShadow=_ref2.boxShadow,boxShadow=void 0!==_ref2$boxShadow&&_ref2$boxShadow,id=_ref2.id,isOpen=_ref2.isOpen,children=_ref2.children,close=_ref2.close,closeButtonLabelText=_ref2.closeButtonLabelText,focusAfterCloseElement=_ref2.focusAfterCloseElement,focusAfterCloseRef=_ref2.focusAfterCloseRef,scrollable=_ref2.scrollable,_ref2$variant=_ref2.variant,variant=void 0===_ref2$variant?"primary":_ref2$variant,style=_ref2.style,theme=_ref2.theme,className=_ref2.className,targetElement=_ref2.targetElement,props=(0,objectWithoutProperties.Z)(_ref2,_excluded),_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),isReadyToShowDialog=_useState2[0],setIsReadyToShowDialog=_useState2[1],dialogContextProps={isReadyToShowDialog,scrollable,close,closeButtonLabelText},customThemeClass=(0,useTheme.F)(Dialog_module.dialogContainer,theme),dialogRef=(0,react.createRef)(),bodyRightPaddingStyleRef=(0,react.useRef)(null);(0,react.useEffect)((function(){if(isOpen&&void 0!==dialogRef)return addDocumentTabBarrier(TabBarrierPosition.top,dialogRef.current),addDocumentTabBarrier(TabBarrierPosition.bottom,dialogRef.current),function(){document.querySelectorAll(".hds-dialog-tab-barrier").forEach((function(element){element.remove()}))}}),[dialogRef,isOpen]);var ariaLabelledby=props["aria-labelledby"],ariaDescribedby=props["aria-describedby"],onKeyDown=(0,react.useCallback)((function(event){close&&"Escape"===event.key&&close()}),[close]),getElementToFocusAfterClose=(0,react.useCallback)((function(){return focusAfterCloseElement||focusAfterCloseRef&&focusAfterCloseRef.current}),[focusAfterCloseElement,focusAfterCloseRef]);(0,react.useEffect)((function(){if(isOpen){var documentScrollbarWidth=window.innerWidth-document.body.offsetWidth;if(documentScrollbarWidth>0){bodyRightPaddingStyleRef.current=document.body.style.paddingRight;var bodyPaddingRightInPixels=parseInt(window.getComputedStyle(document.body).paddingRight,10);document.body.style.paddingRight="".concat(bodyPaddingRightInPixels+documentScrollbarWidth,"px")}document.body.classList.add(Dialog_module.dialogVisibleBodyWithHiddenScrollbars),document.documentElement.classList.add(Dialog_module.dialogVisibleBodyWithHiddenScrollbars),document.addEventListener("keydown",onKeyDown,!1),setIsReadyToShowDialog(!0)}return function(){if(isOpen){setIsReadyToShowDialog(!1),document.body.classList.remove(Dialog_module.dialogVisibleBodyWithHiddenScrollbars),document.documentElement.classList.remove(Dialog_module.dialogVisibleBodyWithHiddenScrollbars),document.removeEventListener("keydown",onKeyDown,!1),document.body.style.paddingRight=bodyRightPaddingStyleRef.current||"";var elementToFocus=getElementToFocusAfterClose();elementToFocus&&elementToFocus.focus()}}}),[isOpen,getElementToFocusAfterClose]);return isOpen?react_dom.createPortal(function renderDialogComponent(){return(0,jsx_runtime.jsx)(DialogContext.Provider,{value:dialogContextProps,children:(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Dialog_module.dialogContainer,customThemeClass),children:[(0,jsx_runtime.jsx)(ContentTabBarrier,{onFocus:function onFocus(){return focusToDialogElement(TabBarrierPosition.bottom,dialogRef.current)}}),(0,jsx_runtime.jsx)("div",{tabIndex:-1,className:Dialog_module.dialogBackdrop}),(0,jsx_runtime.jsx)("div",{ref:dialogRef,role:"dialog","aria-modal":"true",id,className:(0,classNames.Z)(Dialog_module.dialog,isReadyToShowDialog&&Dialog_module.dialogVisible,scrollable&&Dialog_module.dialogScrollable,Dialog_module[variant],boxShadow&&Dialog_module.boxShadow,className),style,"aria-labelledby":ariaLabelledby,"aria-describedby":ariaDescribedby,children}),(0,jsx_runtime.jsx)(ContentTabBarrier,{onFocus:function onFocus(){return focusToDialogElement(TabBarrierPosition.top,dialogRef.current)}})]})})}(),targetElement||document.body):null};Dialog.Header=DialogHeader,Dialog.Content=DialogContent,Dialog.ActionButtons=DialogActionButtons;try{Dialog.displayName="Dialog",Dialog.__docgenInfo={description:"",displayName:"Dialog",props:{id:{defaultValue:null,description:"The id of the dialog element.",name:"id",required:!0,type:{name:"string"}},"aria-labelledby":{defaultValue:null,description:"The id of the heading element.",name:"aria-labelledby",required:!0,type:{name:"string"}},"aria-describedby":{defaultValue:null,description:"The id of the content description element which is usually a paragraph. The paragraph should be part of the content.",name:"aria-describedby",required:!1,type:{name:"string"}},boxShadow:{defaultValue:{value:"false"},description:"Boolean indicating whether dialog has box shadow or not.",name:"boxShadow",required:!1,type:{name:"boolean"}},isOpen:{defaultValue:null,description:"When `true`, dialog is visible,",name:"isOpen",required:!0,type:{name:"boolean"}},focusAfterCloseRef:{defaultValue:null,description:"The element ref which will get focus after the dialog is closed.",name:"focusAfterCloseRef",required:!1,type:{name:"RefObject"}},focusAfterCloseElement:{defaultValue:null,description:"The element which will get focus after the dialog is closed.",name:"focusAfterCloseElement",required:!1,type:{name:"HTMLElement"}},scrollable:{defaultValue:null,description:"When `true` dialog content is scrollable if needed. Use only for long text contents.",name:"scrollable",required:!1,type:{name:"boolean"}},variant:{defaultValue:{value:"primary"},description:"Defines the dialog variant",name:"variant",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"danger"'}]}},style:{defaultValue:null,description:"Additional styles",name:"style",required:!1,type:{name:"CSSProperties"}},theme:{defaultValue:null,description:"Custom theme styles",name:"theme",required:!1,type:{name:"DialogCustomTheme"}},className:{defaultValue:null,description:"Additional class names to apply to the dialog.",name:"className",required:!1,type:{name:"string"}},targetElement:{defaultValue:null,description:"Target element where dialog is rendered. The dialog is rendered into the document.body by default.",name:"targetElement",required:!1,type:{name:"HTMLElement"}},close:{defaultValue:null,description:"A function to set isOpen property to `false`. The dialog header will have a close-button if this property exists. The dialog will also close on Escape keypress.",name:"close",required:!1,type:{name:"() => void"}},closeButtonLabelText:{defaultValue:null,description:"The aria-label for the close button. Required with close property.",name:"closeButtonLabelText",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/Dialog.tsx#Dialog"]={docgenInfo:Dialog.__docgenInfo,name:"Dialog",path:"src/components/dialog/Dialog.tsx#Dialog"})}catch(__react_docgen_typescript_loader_error){}try{Dialog.Header.displayName="Dialog.Header",Dialog.Header.__docgenInfo={description:"",displayName:"Dialog.Header",props:{id:{defaultValue:null,description:"The id of the heading element.",name:"id",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"The text of the heading element.",name:"title",required:!0,type:{name:"string"}},iconLeft:{defaultValue:null,description:"Element placed on the left side of the heading element.",name:"iconLeft",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/Dialog.tsx#Dialog.Header"]={docgenInfo:Dialog.Header.__docgenInfo,name:"Dialog.Header",path:"src/components/dialog/Dialog.tsx#Dialog.Header"})}catch(__react_docgen_typescript_loader_error){}try{Dialog.Content.displayName="Dialog.Content",Dialog.Content.__docgenInfo={description:"",displayName:"Dialog.Content",props:{id:{defaultValue:null,description:"The id of the content element.",name:"id",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/Dialog.tsx#Dialog.Content"]={docgenInfo:Dialog.Content.__docgenInfo,name:"Dialog.Content",path:"src/components/dialog/Dialog.tsx#Dialog.Content"})}catch(__react_docgen_typescript_loader_error){}try{Dialog.ActionButtons.displayName="Dialog.ActionButtons",Dialog.ActionButtons.__docgenInfo={description:"",displayName:"Dialog.ActionButtons",props:{className:{defaultValue:null,description:"className for custom styling",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/Dialog.tsx#Dialog.ActionButtons"]={docgenInfo:Dialog.ActionButtons.__docgenInfo,name:"Dialog.ActionButtons",path:"src/components/dialog/Dialog.tsx#Dialog.ActionButtons"})}catch(__react_docgen_typescript_loader_error){}var IconPlusCircle=__webpack_require__("./src/icons/IconPlusCircle.tsx"),IconAlertCircle=__webpack_require__("./src/icons/IconAlertCircle.tsx"),IconTrash=__webpack_require__("./src/icons/IconTrash.tsx"),IconInfoCircle=__webpack_require__("./src/icons/IconInfoCircle.tsx"),DateInput=__webpack_require__("./src/components/dateInput/DateInput.tsx");const Dialog_stories={component:Dialog,title:"Components/Dialog",parameters:{storySource:{source:"import React, { useRef, useState } from 'react';\n\nimport { Button } from '../button/Button';\nimport { TextArea } from '../textarea/TextArea';\nimport { TextInput } from '../textInput/TextInput';\nimport { Dialog } from './Dialog';\nimport { IconAlertCircle, IconInfoCircle, IconPlusCircle, IconTrash } from '../../icons';\nimport { DateInput } from '../dateInput';\n\nconst argTypes = {\n variant: {\n options: ['primary', 'danger'],\n control: { type: 'radio' },\n defaultValue: 'primary',\n },\n};\n\nexport default {\n component: Dialog,\n title: 'Components/Dialog',\n parameters: {\n controls: { expanded: true },\n loki: { skip: true },\n },\n args: {\n id: 'example-dialog',\n scrollable: false,\n boxShadow: false,\n theme: {},\n style: {},\n closeButtonLabelText: 'Close',\n },\n argTypes,\n};\n\nexport const Default = (args) => {\n const openButtonRef = useRef(null);\n const [open, setOpen] = useState(false);\n const close = () => setOpen(false);\n const titleId = 'custom-dialog-title';\n const descriptionId = 'custom-dialog-content';\n\n return (\n <>\n \n \n } />\n \n

\n Add a new item by filling the information below. All fields are mandatory.\n

\n \n
\n \n
\n \n
\n \n {\n // Add operations here\n close();\n }}\n >\n Add item\n \n \n \n \n \n );\n};\n\n// This dialog story is part of Loki's visual regression tests. It is open by default, and it is not part of the Storybooks' docs section.\nexport const WithBoxShadow = (args) => {\n const dialogTargetElement = document.getElementById('root'); // Because of the story regression tests, we need to render the dialog into the root element\n const openButtonRef = useRef(null);\n const [open, setOpen] = useState(true);\n const close = () => setOpen(false);\n const titleId = 'custom-dialog-title';\n const descriptionId = 'custom-dialog-content';\n\n return (\n <>\n \n \n } />\n \n

\n Add a new item by filling the information below. All fields are mandatory.\n

\n \n
\n \n
\n \n {\n // Add operations here\n close();\n }}\n >\n Add item\n \n \n \n \n \n );\n};\n\nWithBoxShadow.storyName = 'With box shadow';\n\nWithBoxShadow.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n loki: { skip: false },\n};\n\n// This dialog story is part of Loki's visual regression tests. It is open by default, and it is not part of the Storybooks' docs section.\nexport const Confirmation = (args) => {\n const dialogTargetElement = document.getElementById('root'); // Because of the story regression tests, we need to render the dialog into the root element\n const openConfirmationButtonRef = useRef(null);\n const [open, setOpen] = useState(true);\n const close = () => setOpen(false);\n const titleId = 'confirmation-dialog-title';\n const descriptionId = 'confirmation-dialog-description';\n\n return (\n <>\n \n \n } />\n \n

\n Are you sure you want to continue?\n

\n
\n \n {\n // Add confirm operations here\n close();\n }}\n >\n Confirm\n \n \n \n \n \n );\n};\n\nConfirmation.storyName = 'Confirmation';\n\nConfirmation.args = {\n id: 'confirmation-dialog',\n};\n\nConfirmation.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n loki: { skip: false },\n};\n\n// This dialog story is part of Loki's visual regression tests. It is open by default, and it is not part of the Storybooks' docs section.\nexport const Danger = (args) => {\n const dialogTargetElement = document.getElementById('root'); // Because of the story regression tests, we need to render the dialog into the root element\n const openDangerButtonRef = useRef(null);\n const [open, setOpen] = useState(true);\n const close = () => setOpen(false);\n const titleId = 'danger-dialog-title';\n const descriptionId = 'danger-dialog-description';\n\n return (\n <>\n \n \n } />\n \n

\n Are you sure you want to delete the item?\n

\n
\n \n \n }\n onClick={() => {\n // Add confirm operations here\n close();\n }}\n >\n Delete\n \n \n \n \n );\n};\n\nDanger.storyName = 'Danger';\n\nDanger.args = {\n id: 'danger-dialog',\n};\n\nDanger.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n loki: { skip: false },\n};\n\n// This dialog story is part of Loki's visual regression tests. It is open by default, and it is not part of the Storybooks' docs section.\nexport const ScrollableConfirmation = (args) => {\n const dialogTargetElement = document.getElementById('root'); // Because of the story regression tests, we need to render the dialog into the root element\n const openScrollableConfirmationButtonRef = useRef(null);\n const [open, setOpen] = useState(true);\n const close = () => setOpen(false);\n const titleId = 'confirmation-scrollable-title';\n const descriptionId = 'confirmation-scrollable-description';\n\n return (\n <>\n \n \n } />\n \n

Are you sure you want to continue?

\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n
\n \n {\n // Add confirm operations here\n close();\n }}\n >\n Confirm\n \n \n \n \n \n );\n};\n\nScrollableConfirmation.storyName = 'Scrollable confirmation';\n\nScrollableConfirmation.args = {\n id: 'confirmation-scrollable-dialog',\n};\n\nScrollableConfirmation.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n loki: { skip: false },\n};\n\n// This dialog story is part of Loki's visual regression tests. It is open by default, and it is not part of the Storybooks' docs section.\nexport const LongButtonLabels = (args) => {\n const dialogTargetElement = document.getElementById('root'); // Because of the story regression tests, we need to render the dialog into the root element\n const openDialogButtonRef = useRef(null);\n const [open, setOpen] = useState(true);\n const close = () => setOpen(false);\n const titleId = 'dialog-with-long-labels-title';\n\n return (\n <>\n \n \n } />\n \n

Are you sure you want to continue?

\n
\n \n {\n // Add confirm operations here\n close();\n }}\n >\n Confirm this thing now with a long label\n \n \n \n \n \n );\n};\n\nLongButtonLabels.storyName = 'With long button labels';\n\nLongButtonLabels.args = {\n id: 'dialog-with-long-button-labels',\n};\n\nLongButtonLabels.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n loki: { skip: false },\n};\n\n// This dialog story is not part of the Storybooks' docs section.\nexport const ConfirmationWithTerms = (args) => {\n const openConfirmationButtonRef = useRef(null);\n const [open, setOpen] = useState(false);\n const [termsOpen, setTermsOpen] = useState(false);\n const close = () => setOpen(false);\n const openTermsButtonRef = useRef(null);\n const closeTerms = () => setTermsOpen(false);\n const openTermsDialog = () => setTermsOpen(true);\n const confirmationTitleId = 'confirmation-title';\n const confirmationDescriptionId = 'confirmation-description';\n const termsTitleId = 'terms-title';\n const termsDescriptionId = 'terms-description';\n\n return (\n <>\n \n \n }\n />\n \n

\n Do you want to accept terms of the service?\n
\n
\n }\n ref={openTermsButtonRef}\n onClick={() => openTermsDialog()}\n >\n Open service terms dialog\n \n

\n
\n \n {\n // Add confirm operations here\n close();\n }}\n >\n Accept terms\n \n \n \n \n \n \n \n

\n These are the terms of the service.\n

\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem\n aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni\n dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore\n magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis\n suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in\n ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas\n nulla pariatur?\n

\n
\n \n {\n closeTerms();\n }}\n >\n Close\n \n \n \n \n );\n};\n\nConfirmationWithTerms.storyName = 'Confirmation dialog with terms dialog';\n\nConfirmationWithTerms.parameters = {\n loki: { skip: true },\n};\n\nConfirmationWithTerms.args = {\n id: 'confirmation-dialog',\n termsId: 'terms-dialog',\n};\n\nConfirmationWithTerms.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nexport const WithControlledContent = (args) => {\n const openButtonRef = useRef(null);\n const [open, setOpen] = useState(false);\n const close = () => setOpen(false);\n const titleId = 'custom-dialog-title';\n const descriptionId = 'custom-dialog-content';\n const [textInputValue, setTextInputValue] = useState('');\n const [textAreaInputValue, setTextAreaInputValue] = useState('');\n\n return (\n <>\n \n \n } />\n \n

\n Add a new item by filling the information below. All fields are mandatory.\n

\n setTextInputValue(event.target.value)}\n value={textInputValue}\n required\n />\n
\n setTextAreaInputValue(event.target.value)}\n value={textAreaInputValue}\n required\n />\n
\n \n {\n // Add operations here\n close();\n }}\n >\n Add item\n \n \n \n \n \n );\n};\n\nWithControlledContent.storyName = 'With controlled content';\nWithControlledContent.parameters = {\n loki: { skip: true },\n};\n",locationsMap:{default:{startLoc:{col:23,line:36},endLoc:{col:1,line:100},startBody:{col:23,line:36},endBody:{col:1,line:100}},"with-box-shadow":{startLoc:{col:29,line:103},endLoc:{col:1,line:163},startBody:{col:29,line:103},endBody:{col:1,line:163}},confirmation:{startLoc:{col:28,line:180},endLoc:{col:1,line:223},startBody:{col:28,line:180},endBody:{col:1,line:223}},danger:{startLoc:{col:22,line:244},endLoc:{col:1,line:290},startBody:{col:22,line:244},endBody:{col:1,line:290}},"scrollable-confirmation":{startLoc:{col:38,line:311},endLoc:{col:1,line:425},startBody:{col:38,line:311},endBody:{col:1,line:425}},"long-button-labels":{startLoc:{col:32,line:446},endLoc:{col:1,line:485},startBody:{col:32,line:446},endBody:{col:1,line:485}},"confirmation-with-terms":{startLoc:{col:37,line:506},endLoc:{col:1,line:604},startBody:{col:37,line:506},endBody:{col:1,line:604}},"with-controlled-content":{startLoc:{col:37,line:628},endLoc:{col:1,line:691},startBody:{col:37,line:628},endBody:{col:1,line:691}}}},controls:{expanded:!0},loki:{skip:!0}},args:{id:"example-dialog",scrollable:!1,boxShadow:!1,theme:{},style:{},closeButtonLabelText:"Close"},argTypes:{variant:{options:["primary","danger"],control:{type:"radio"},defaultValue:"primary"}}};var Default=function Default(args){var openButtonRef=(0,react.useRef)(null),_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),open=_useState2[0],setOpen=_useState2[1],close=function close(){return setOpen(!1)};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,scrollable:args.scrollable,boxShadow:args.boxShadow,theme:args.theme,style:args.style,variant:args.variant,closeButtonLabelText:args.closeButtonLabelText,"aria-labelledby":"custom-dialog-title","aria-describedby":"custom-dialog-content",isOpen:open,focusAfterCloseRef:openButtonRef,close,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:"custom-dialog-title",title:"Add new item",iconLeft:(0,jsx_runtime.jsx)(IconPlusCircle.IconPlusCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsxs)(Dialog.Content,{children:[(0,jsx_runtime.jsx)("p",{id:"custom-dialog-content",className:"text-body",style:{marginTop:"0"},children:"Add a new item by filling the information below. All fields are mandatory."}),(0,jsx_runtime.jsx)(TextInput.o,{id:"item-name",label:"Item name",placeholder:"E.g. Item 1",helperText:"Item's name must be unique.",required:!0}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(TextArea.K,{id:"item-description",label:"Item description",placeholder:"E.g. Item 1 is the first item of the system.",required:!0}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(DateInput.W,{id:"item-date",label:"Item date",required:!0,helperText:"Use format D.M.YYYY"})]}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Add item"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel"})]})]})]})},WithBoxShadow=function WithBoxShadow(args){var dialogTargetElement=document.getElementById("root"),openButtonRef=(0,react.useRef)(null),_useState3=(0,react.useState)(!0),_useState4=(0,slicedToArray.Z)(_useState3,2),open=_useState4[0],setOpen=_useState4[1],close=function close(){return setOpen(!1)};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,"aria-labelledby":"custom-dialog-title","aria-describedby":"custom-dialog-content",boxShadow:!0,isOpen:open,focusAfterCloseRef:openButtonRef,close,closeButtonLabelText:"Close",targetElement:dialogTargetElement,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:"custom-dialog-title",title:"Add new item",iconLeft:(0,jsx_runtime.jsx)(IconPlusCircle.IconPlusCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsxs)(Dialog.Content,{children:[(0,jsx_runtime.jsx)("p",{id:"custom-dialog-content",className:"text-body",style:{marginTop:"0"},children:"Add a new item by filling the information below. All fields are mandatory."}),(0,jsx_runtime.jsx)(TextInput.o,{id:"item-name",label:"Item name",placeholder:"E.g. Item 1",helperText:"Item's name must be unique.",required:!0}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(TextArea.K,{id:"item-description",label:"Item description",placeholder:"E.g. Item 1 is the first item of the system.",required:!0})]}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Add item"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel"})]})]})]})};WithBoxShadow.storyName="With box shadow",WithBoxShadow.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0},loki:{skip:!1}};var Confirmation=function Confirmation(args){var dialogTargetElement=document.getElementById("root"),openConfirmationButtonRef=(0,react.useRef)(null),_useState5=(0,react.useState)(!0),_useState6=(0,slicedToArray.Z)(_useState5,2),open=_useState6[0],setOpen=_useState6[1],close=function close(){return setOpen(!1)},titleId="confirmation-dialog-title";return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openConfirmationButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Confirmation Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,"aria-labelledby":titleId,"aria-describedby":"confirmation-dialog-description",isOpen:open,focusAfterCloseRef:openConfirmationButtonRef,targetElement:dialogTargetElement,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:titleId,title:"Confirm dialog",iconLeft:(0,jsx_runtime.jsx)(IconAlertCircle.IconAlertCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsx)(Dialog.Content,{children:(0,jsx_runtime.jsx)("p",{id:"confirmation-dialog-description",className:"text-body",style:{marginTop:"0"},children:"Are you sure you want to continue?"})}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Confirm"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel"})]})]})]})};Confirmation.storyName="Confirmation",Confirmation.args={id:"confirmation-dialog"},Confirmation.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0},loki:{skip:!1}};var Danger=function Danger(args){var dialogTargetElement=document.getElementById("root"),openDangerButtonRef=(0,react.useRef)(null),_useState7=(0,react.useState)(!0),_useState8=(0,slicedToArray.Z)(_useState7,2),open=_useState8[0],setOpen=_useState8[1],close=function close(){return setOpen(!1)};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{variant:"danger",ref:openDangerButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Danger Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{variant:"danger",id:args.id,"aria-labelledby":"danger-dialog-title","aria-describedby":"danger-dialog-description",isOpen:open,focusAfterCloseRef:openDangerButtonRef,targetElement:dialogTargetElement,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:"danger-dialog-title",title:"Delete item",iconLeft:(0,jsx_runtime.jsx)(IconAlertCircle.IconAlertCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsx)(Dialog.Content,{children:(0,jsx_runtime.jsx)("p",{id:"danger-dialog-description",className:"text-body",style:{marginTop:"0"},children:"Are you sure you want to delete the item?"})}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{theme:"black",variant:"secondary",onClick:close,children:"Cancel"}),(0,jsx_runtime.jsx)(Button.z,{variant:"danger",iconLeft:(0,jsx_runtime.jsx)(IconTrash.IconTrash,{"aria-hidden":"true"}),onClick:function onClick(){close()},children:"Delete"})]})]})]})};Danger.storyName="Danger",Danger.args={id:"danger-dialog"},Danger.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0},loki:{skip:!1}};var ScrollableConfirmation=function ScrollableConfirmation(args){var dialogTargetElement=document.getElementById("root"),openScrollableConfirmationButtonRef=(0,react.useRef)(null),_useState9=(0,react.useState)(!0),_useState10=(0,slicedToArray.Z)(_useState9,2),open=_useState10[0],setOpen=_useState10[1],close=function close(){return setOpen(!1)},titleId="confirmation-scrollable-title";return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openScrollableConfirmationButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Scrollable Confirmation Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,style:{width:"800px"},"aria-labelledby":titleId,"aria-describedby":"confirmation-scrollable-description",isOpen:open,focusAfterCloseRef:openScrollableConfirmationButtonRef,targetElement:dialogTargetElement,scrollable:!0,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:titleId,title:"Confirm dialog",iconLeft:(0,jsx_runtime.jsx)(IconAlertCircle.IconAlertCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsxs)(Dialog.Content,{children:[(0,jsx_runtime.jsx)("h3",{id:"confirmation-scrollable-description",children:"Are you sure you want to continue?"}),(0,jsx_runtime.jsx)("p",{className:"text-body",children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"}),(0,jsx_runtime.jsx)("p",{className:"text-body",children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"}),(0,jsx_runtime.jsx)("p",{className:"text-body",children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"}),(0,jsx_runtime.jsx)("p",{className:"text-body",children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"}),(0,jsx_runtime.jsx)("p",{children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"}),(0,jsx_runtime.jsx)("p",{children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"})]}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Confirm"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel"})]})]})]})};ScrollableConfirmation.storyName="Scrollable confirmation",ScrollableConfirmation.args={id:"confirmation-scrollable-dialog"},ScrollableConfirmation.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0},loki:{skip:!1}};var LongButtonLabels=function LongButtonLabels(args){var dialogTargetElement=document.getElementById("root"),openDialogButtonRef=(0,react.useRef)(null),_useState11=(0,react.useState)(!0),_useState12=(0,slicedToArray.Z)(_useState11,2),open=_useState12[0],setOpen=_useState12[1],close=function close(){return setOpen(!1)},titleId="dialog-with-long-labels-title";return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openDialogButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,"aria-labelledby":titleId,isOpen:open,focusAfterCloseRef:openDialogButtonRef,targetElement:dialogTargetElement,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:titleId,title:"Confirm dialog",iconLeft:(0,jsx_runtime.jsx)(IconAlertCircle.IconAlertCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsx)(Dialog.Content,{children:(0,jsx_runtime.jsx)("h3",{style:{marginTop:"0"},children:"Are you sure you want to continue?"})}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Confirm this thing now with a long label"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel and go back to the beginning"})]})]})]})};LongButtonLabels.storyName="With long button labels",LongButtonLabels.args={id:"dialog-with-long-button-labels"},LongButtonLabels.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0},loki:{skip:!1}};var ConfirmationWithTerms=function ConfirmationWithTerms(args){var openConfirmationButtonRef=(0,react.useRef)(null),_useState13=(0,react.useState)(!1),_useState14=(0,slicedToArray.Z)(_useState13,2),open=_useState14[0],setOpen=_useState14[1],_useState15=(0,react.useState)(!1),_useState16=(0,slicedToArray.Z)(_useState15,2),termsOpen=_useState16[0],setTermsOpen=_useState16[1],close=function close(){return setOpen(!1)},openTermsButtonRef=(0,react.useRef)(null),closeTerms=function closeTerms(){return setTermsOpen(!1)};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openConfirmationButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Accept Terms Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,style:{width:"800px"},"aria-labelledby":"confirmation-title","aria-describedby":"confirmation-description",isOpen:open,focusAfterCloseRef:openConfirmationButtonRef,children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:"confirmation-title",title:"Accept terms dialog",iconLeft:(0,jsx_runtime.jsx)(IconAlertCircle.IconAlertCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsx)(Dialog.Content,{children:(0,jsx_runtime.jsxs)("p",{id:"confirmation-description",className:"text-body",style:{marginTop:"0"},children:["Do you want to accept terms of the service?",(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(Button.z,{variant:"secondary",iconLeft:(0,jsx_runtime.jsx)(IconInfoCircle.IconInfoCircle,{"aria-hidden":"true"}),ref:openTermsButtonRef,onClick:function onClick(){return function openTermsDialog(){return setTermsOpen(!0)}()},children:"Open service terms dialog"})]})}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Accept terms"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel"})]})]}),(0,jsx_runtime.jsxs)(Dialog,{id:args.termsId,"aria-labelledby":"terms-title","aria-describedby":"terms-description",isOpen:termsOpen,focusAfterCloseRef:openTermsButtonRef,close:closeTerms,closeButtonLabelText:"Close terms dialog",children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:"terms-title",title:"Service terms"}),(0,jsx_runtime.jsxs)(Dialog.Content,{children:[(0,jsx_runtime.jsx)("p",{id:"terms-description",className:"text-body",children:"These are the terms of the service."}),(0,jsx_runtime.jsx)("p",{className:"text-body",children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"})]}),(0,jsx_runtime.jsx)(Dialog.ActionButtons,{children:(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){closeTerms()},children:"Close"})})]})]})};ConfirmationWithTerms.storyName="Confirmation dialog with terms dialog",ConfirmationWithTerms.parameters={loki:{skip:!0}},ConfirmationWithTerms.args={id:"confirmation-dialog",termsId:"terms-dialog"},ConfirmationWithTerms.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}};var WithControlledContent=function WithControlledContent(args){var openButtonRef=(0,react.useRef)(null),_useState17=(0,react.useState)(!1),_useState18=(0,slicedToArray.Z)(_useState17,2),open=_useState18[0],setOpen=_useState18[1],close=function close(){return setOpen(!1)},_useState19=(0,react.useState)(""),_useState20=(0,slicedToArray.Z)(_useState19,2),textInputValue=_useState20[0],setTextInputValue=_useState20[1],_useState21=(0,react.useState)(""),_useState22=(0,slicedToArray.Z)(_useState21,2),textAreaInputValue=_useState22[0],setTextAreaInputValue=_useState22[1];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Button.z,{ref:openButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open Dialog"}),(0,jsx_runtime.jsxs)(Dialog,{id:args.id,"aria-labelledby":"custom-dialog-title","aria-describedby":"custom-dialog-content",isOpen:open,focusAfterCloseRef:openButtonRef,close,closeButtonLabelText:"Close",children:[(0,jsx_runtime.jsx)(Dialog.Header,{id:"custom-dialog-title",title:"Add new item",iconLeft:(0,jsx_runtime.jsx)(IconPlusCircle.IconPlusCircle,{"aria-hidden":"true"})}),(0,jsx_runtime.jsxs)(Dialog.Content,{children:[(0,jsx_runtime.jsx)("p",{id:"custom-dialog-content",className:"text-body",style:{marginTop:"0"},children:"Add a new item by filling the information below. All fields are mandatory."}),(0,jsx_runtime.jsx)(TextInput.o,{id:"item-name",label:"Item name",placeholder:"E.g. Item 1",helperText:"Item's name must be unique.",onChange:function onChange(event){return setTextInputValue(event.target.value)},value:textInputValue,required:!0}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(TextArea.K,{id:"item-description",label:"Item description",placeholder:"E.g. Item 1 is the first item of the system.",onChange:function onChange(event){return setTextAreaInputValue(event.target.value)},value:textAreaInputValue,required:!0})]}),(0,jsx_runtime.jsxs)(Dialog.ActionButtons,{children:[(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){close()},children:"Add item"}),(0,jsx_runtime.jsx)(Button.z,{onClick:close,variant:"secondary",children:"Cancel"})]})]})]})};WithControlledContent.storyName="With controlled content",WithControlledContent.parameters={loki:{skip:!0}},Default.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const openButtonRef = useRef(null);\n const [open, setOpen] = useState(false);\n const close = () => setOpen(false);\n const titleId = \'custom-dialog-title\';\n const descriptionId = \'custom-dialog-content\';\n\n return (\n <>\n \n \n
\n);\n\nexport const Default = (args) => {getContent()};\n\nexport const Large = (args) => {getContent()};\nLarge.args = {\n size: 'large',\n};\n",locationsMap:{default:{startLoc:{col:23,line:31},endLoc:{col:86,line:31},startBody:{col:23,line:31},endBody:{col:86,line:31}},large:{startLoc:{col:21,line:33},endLoc:{col:84,line:33},startBody:{col:21,line:33},endBody:{col:84,line:33}}}},controls:{hideNoControlsWarning:!0}},decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],args:{label:"Form contains following errors"}};var getContent=function getContent(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("ul",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li",{children:["Error 1: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{href:"#field1",children:"Please enter your first name"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li",{children:["Error 2: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{href:"#field2",children:"Please enter your last name"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li",{children:["Error 3: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{href:"#field3",children:"Please enter a valid email address"})]})]})},Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ErrorSummary__WEBPACK_IMPORTED_MODULE_2__.X,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{children:getContent()}))},Large=function Large(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ErrorSummary__WEBPACK_IMPORTED_MODULE_2__.X,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{children:getContent()}))};Large.args={size:"large"},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {getContent()}"}},Default.parameters),Large.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {getContent()}"}},Large.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/errorSummary/ErrorSummary.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/errorSummary/ErrorSummary.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Large.displayName="Large",Large.__docgenInfo={description:"",displayName:"Large",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/errorSummary/ErrorSummary.stories.tsx#Large"]={docgenInfo:Large.__docgenInfo,name:"Large",path:"src/components/errorSummary/ErrorSummary.stories.tsx#Large"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/fieldset/Fieldset.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithBorder:()=>WithBorder,WithHelperText:()=>WithHelperText,WithSelectionGroup:()=>WithSelectionGroup,WithTooltip:()=>WithTooltip,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_Fieldset__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/fieldset/Fieldset.tsx"),_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/textInput/TextInput.tsx"),_radioButton_RadioButton__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/radioButton/RadioButton.tsx"),_selectionGroup_SelectionGroup__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/selectionGroup/SelectionGroup.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Fieldset__WEBPACK_IMPORTED_MODULE_2__.p,title:"Components/Fieldset",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"600px"},children:storyFn()})}],parameters:{storySource:{source:'import React, { useState } from \'react\';\n\nimport { Fieldset } from \'./Fieldset\';\nimport { TextInput } from \'../textInput/TextInput\';\nimport { RadioButton } from \'../radioButton/RadioButton\';\nimport { SelectionGroup } from \'../selectionGroup/SelectionGroup\';\n\nexport default {\n component: Fieldset,\n title: \'Components/Fieldset\',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n args: {\n border: false,\n heading: \'Applicant information\',\n },\n};\n\nexport const Default = (args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n};\n\nexport const WithBorder = (args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n};\n\nWithBorder.args = {\n border: true,\n};\n\nexport const WithSelectionGroup = (args) => {\n const fileFormats = [\n { label: \'Text\', value: \'txt\' },\n { label: \'CSV\', value: \'csv\' },\n { label: \'HTML\', value: \'html\' },\n ];\n\n const [radioValue, setRadioValue] = useState(fileFormats[0].value);\n\n return (\n
\n \n \n {fileFormats.map(({ value, label }) => (\n setRadioValue((event.target as HTMLInputElement).value)}\n />\n ))}\n \n
\n );\n};\n\nWithSelectionGroup.args = {\n border: true,\n heading: \'File information\',\n};\n\nexport const WithTooltip = (args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n};\n\nWithTooltip.args = {\n tooltipText: \'tooltip text\',\n tooltipLabel: \'tooltip text aria label\',\n tooltipButtonLabel: \'tooltip button aria label\',\n};\n\nexport const WithHelperText = (args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n};\n\nWithHelperText.args = {\n heading: \'Fieldset with Assistive text\',\n helperText: \'Assistive text\',\n};\n',locationsMap:{default:{startLoc:{col:23,line:21},endLoc:{col:1,line:44},startBody:{col:23,line:21},endBody:{col:1,line:44}},"with-border":{startLoc:{col:26,line:46},endLoc:{col:1,line:73},startBody:{col:26,line:46},endBody:{col:1,line:73}},"with-selection-group":{startLoc:{col:34,line:79},endLoc:{col:1,line:105},startBody:{col:34,line:79},endBody:{col:1,line:105}},"with-tooltip":{startLoc:{col:27,line:112},endLoc:{col:1,line:139},startBody:{col:27,line:112},endBody:{col:1,line:139}},"with-helper-text":{startLoc:{col:30,line:147},endLoc:{col:1,line:174},startBody:{col:30,line:147},endBody:{col:1,line:174}}}},controls:{expanded:!0}},args:{border:!1,heading:"Applicant information"}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Fieldset__WEBPACK_IMPORTED_MODULE_2__.p,{heading:args.heading,border:args.border,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"grid",gridGap:"12px 16px",gridTemplateColumns:"repeat(auto-fill, minmax(245px, 1fr))"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"first-name",name:"first-name",label:"First name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"last-name",name:"last-name",label:"Last name"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginTop:"12px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"social-security-number",name:"social-security-number",label:"Social security number",placeholder:"Eg. 111299-1234"})})]})},WithBorder=function WithBorder(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Fieldset__WEBPACK_IMPORTED_MODULE_2__.p,{heading:args.heading,border:args.border,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"grid",gridGap:"12px 16px",gridTemplateColumns:"repeat(auto-fill, minmax(245px, 1fr))"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"first-name",name:"first-name",label:"First name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"last-name",name:"last-name",label:"Last name"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginTop:"12px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"social-security-number",name:"social-security-number",label:"Social security number",placeholder:"Eg. 111299-1234"})})]})};WithBorder.args={border:!0};var WithSelectionGroup=function WithSelectionGroup(args){var fileFormats=[{label:"Text",value:"txt"},{label:"CSV",value:"csv"},{label:"HTML",value:"html"}],_useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(fileFormats[0].value),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState,2),radioValue=_useState2[0],setRadioValue=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Fieldset__WEBPACK_IMPORTED_MODULE_2__.p,{heading:args.heading,border:args.border,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"file-name",name:"file-name",label:"File name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_selectionGroup_SelectionGroup__WEBPACK_IMPORTED_MODULE_5__.M,{label:"File format",style:{marginTop:"12px"},children:fileFormats.map((function(_ref){var value=_ref.value,label=_ref.label;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radioButton_RadioButton__WEBPACK_IMPORTED_MODULE_6__.E,{id:"radio-".concat(value),value,label,checked:radioValue===value,onChange:function onChange(event){return setRadioValue(event.target.value)}},"radio-".concat(value))}))})]})};WithSelectionGroup.args={border:!0,heading:"File information"};var WithTooltip=function WithTooltip(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Fieldset__WEBPACK_IMPORTED_MODULE_2__.p,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"grid",gridGap:"12px 16px",gridTemplateColumns:"repeat(auto-fill, minmax(245px, 1fr))"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"first-name",name:"first-name",label:"First name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"last-name",name:"last-name",label:"Last name"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginTop:"12px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"social-security-number",name:"social-security-number",label:"Social security number",placeholder:"Eg. 111299-1234"})})]}))};WithTooltip.args={tooltipText:"tooltip text",tooltipLabel:"tooltip text aria label",tooltipButtonLabel:"tooltip button aria label"};var WithHelperText=function WithHelperText(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Fieldset__WEBPACK_IMPORTED_MODULE_2__.p,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"grid",gridGap:"12px 16px",gridTemplateColumns:"repeat(auto-fill, minmax(245px, 1fr))"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"first-name",name:"first-name",label:"First name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"last-name",name:"last-name",label:"Last name"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginTop:"12px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_textInput_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:"social-security-number",name:"social-security-number",label:"Social security number",placeholder:"Eg. 111299-1234"})})]}))};WithHelperText.args={heading:"Fieldset with Assistive text",helperText:"Assistive text"},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n}'}},Default.parameters),WithBorder.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n}'}},WithBorder.parameters),WithSelectionGroup.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({storySource:{source:"(args) => {\n const fileFormats = [\n { label: 'Text', value: 'txt' },\n { label: 'CSV', value: 'csv' },\n { label: 'HTML', value: 'html' },\n ];\n\n const [radioValue, setRadioValue] = useState(fileFormats[0].value);\n\n return (\n
\n \n \n {fileFormats.map(({ value, label }) => (\n setRadioValue((event.target as HTMLInputElement).value)}\n />\n ))}\n \n
\n );\n}"}},WithSelectionGroup.parameters),WithTooltip.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n}'}},WithTooltip.parameters),WithHelperText.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n \n \n \n \n
\n );\n}'}},WithHelperText.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fieldset/Fieldset.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/fieldset/Fieldset.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{WithBorder.displayName="WithBorder",WithBorder.__docgenInfo={description:"",displayName:"WithBorder",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fieldset/Fieldset.stories.tsx#WithBorder"]={docgenInfo:WithBorder.__docgenInfo,name:"WithBorder",path:"src/components/fieldset/Fieldset.stories.tsx#WithBorder"})}catch(__react_docgen_typescript_loader_error){}try{WithSelectionGroup.displayName="WithSelectionGroup",WithSelectionGroup.__docgenInfo={description:"",displayName:"WithSelectionGroup",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fieldset/Fieldset.stories.tsx#WithSelectionGroup"]={docgenInfo:WithSelectionGroup.__docgenInfo,name:"WithSelectionGroup",path:"src/components/fieldset/Fieldset.stories.tsx#WithSelectionGroup"})}catch(__react_docgen_typescript_loader_error){}try{WithTooltip.displayName="WithTooltip",WithTooltip.__docgenInfo={description:"",displayName:"WithTooltip",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fieldset/Fieldset.stories.tsx#WithTooltip"]={docgenInfo:WithTooltip.__docgenInfo,name:"WithTooltip",path:"src/components/fieldset/Fieldset.stories.tsx#WithTooltip"})}catch(__react_docgen_typescript_loader_error){}try{WithHelperText.displayName="WithHelperText",WithHelperText.__docgenInfo={description:"",displayName:"WithHelperText",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fieldset/Fieldset.stories.tsx#WithHelperText"]={docgenInfo:WithHelperText.__docgenInfo,name:"WithHelperText",path:"src/components/fieldset/Fieldset.stories.tsx#WithHelperText"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/fileInput/FileInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Disabled:()=>Disabled,DisabledDragAndDrop:()=>DisabledDragAndDrop,Multiple:()=>Multiple,Playground:()=>Playground,Required:()=>Required,Single:()=>Single,WithDefaultValue:()=>WithDefaultValue,WithDragAndDrop:()=>WithDragAndDrop,WithTooltip:()=>WithTooltip,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@storybook/addon-actions/dist/esm/index.js"),_FileInput__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/fileInput/FileInput.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),onFilesChanged=function onFilesChanged(files){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("filesChanged")(files)};const __WEBPACK_DEFAULT_EXPORT__={component:_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,title:"Components/FileInput",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:"import React from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport { FileInput } from './FileInput';\n\nconst onFilesChanged = (files: File[] | undefined) => action('filesChanged')(files);\n\nexport default {\n component: FileInput,\n title: 'Components/FileInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n args: {\n id: 'file-input',\n label: 'Choose files',\n buttonLabel: '',\n language: 'en',\n maxSize: 1.5 * 1024 * 1024,\n accept: '.png,.jpg',\n },\n};\n\nexport const Single = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nSingle.args = {\n label: 'Choose a file',\n};\n\nexport const Multiple = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nMultiple.args = {\n multiple: true,\n};\n\nexport const WithDefaultValue = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nWithDefaultValue.args = {\n accept: '',\n defaultValue: [\n new File(['string content'], 'dummy.txt', { type: 'text/plain' }),\n new File(['string content with more text'], 'anotherDummy.txt', { type: 'text/plain' }),\n ],\n multiple: true,\n};\n\nexport const WithDragAndDrop = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nWithDragAndDrop.args = {\n multiple: true,\n dragAndDrop: true,\n};\n\nexport const WithTooltip = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\nWithTooltip.args = {\n accept: 'image/*',\n tooltipLabel: 'More info',\n tooltipButtonLabel: 'Click to view more info',\n tooltipText: 'The file input will accept most of the known image formats. Please notice the size limit.',\n};\n\nexport const Disabled = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nDisabled.args = {\n disabled: true,\n label: 'Choose a file',\n accept: '.png,.jpg,.pdf,.json',\n};\n\nexport const DisabledDragAndDrop = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nDisabledDragAndDrop.args = {\n disabled: true,\n multiple: true,\n dragAndDrop: true,\n accept: '.png,.jpg,.pdf,.json',\n};\n\nexport const Required = (args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n};\n\nRequired.args = {\n label: 'Choose a file',\n accept: 'image/*',\n};\n\nexport const Playground = (args) => {\n const onChange = (files) => {\n onFilesChanged(files);\n };\n\n return ;\n};\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n id: 'file-input',\n label: 'Choose files',\n buttonLabel: '',\n language: 'en',\n multiple: false,\n maxSize: 300 * 1024,\n accept: '.png,.jpg,.pdf,.json',\n defaultValue: undefined,\n disabled: false,\n required: false,\n helperText: '',\n errorText: '',\n infoText: '',\n dragAndDrop: false,\n dragAndDropLabel: 'DragAndDropLabel',\n dragAndDropInputLabel: 'DragAndDropInputLabel',\n};\n\nPlayground.argTypes = {\n language: {\n options: ['fi', 'en', 'sv'],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{single:{startLoc:{col:22,line:25},endLoc:{col:1,line:30},startBody:{col:22,line:25},endBody:{col:1,line:30}},multiple:{startLoc:{col:24,line:36},endLoc:{col:1,line:41},startBody:{col:24,line:36},endBody:{col:1,line:41}},"with-default-value":{startLoc:{col:32,line:47},endLoc:{col:1,line:52},startBody:{col:32,line:47},endBody:{col:1,line:52}},"with-drag-and-drop":{startLoc:{col:31,line:63},endLoc:{col:1,line:68},startBody:{col:31,line:63},endBody:{col:1,line:68}},"with-tooltip":{startLoc:{col:27,line:75},endLoc:{col:1,line:80},startBody:{col:27,line:75},endBody:{col:1,line:80}},disabled:{startLoc:{col:24,line:88},endLoc:{col:1,line:93},startBody:{col:24,line:88},endBody:{col:1,line:93}},"disabled-drag-and-drop":{startLoc:{col:35,line:101},endLoc:{col:1,line:106},startBody:{col:35,line:101},endBody:{col:1,line:106}},required:{startLoc:{col:24,line:115},endLoc:{col:1,line:120},startBody:{col:24,line:115},endBody:{col:1,line:120}},playground:{startLoc:{col:26,line:127},endLoc:{col:1,line:133},startBody:{col:26,line:127},endBody:{col:1,line:133}}}},controls:{expanded:!0}},args:{id:"file-input",label:"Choose files",buttonLabel:"",language:"en",maxSize:1572864,accept:".png,.jpg"}};var Single=function Single(args){var _React$useState=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState,2),files=_React$useState2[0],setFiles=_React$useState2[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};Single.args={label:"Choose a file"};var Multiple=function Multiple(args){var _React$useState3=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState3,2),files=_React$useState4[0],setFiles=_React$useState4[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};Multiple.args={multiple:!0};var WithDefaultValue=function WithDefaultValue(args){var _React$useState5=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState5,2),files=_React$useState6[0],setFiles=_React$useState6[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};WithDefaultValue.args={accept:"",defaultValue:[new File(["string content"],"dummy.txt",{type:"text/plain"}),new File(["string content with more text"],"anotherDummy.txt",{type:"text/plain"})],multiple:!0};var WithDragAndDrop=function WithDragAndDrop(args){var _React$useState7=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState8=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState7,2),files=_React$useState8[0],setFiles=_React$useState8[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};WithDragAndDrop.args={multiple:!0,dragAndDrop:!0};var WithTooltip=function WithTooltip(args){var _React$useState9=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState10=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState9,2),files=_React$useState10[0],setFiles=_React$useState10[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};WithTooltip.args={accept:"image/*",tooltipLabel:"More info",tooltipButtonLabel:"Click to view more info",tooltipText:"The file input will accept most of the known image formats. Please notice the size limit."};var Disabled=function Disabled(args){var _React$useState11=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState12=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState11,2),files=_React$useState12[0],setFiles=_React$useState12[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};Disabled.args={disabled:!0,label:"Choose a file",accept:".png,.jpg,.pdf,.json"};var DisabledDragAndDrop=function DisabledDragAndDrop(args){var _React$useState13=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState14=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState13,2),files=_React$useState14[0],setFiles=_React$useState14[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};DisabledDragAndDrop.args={disabled:!0,multiple:!0,dragAndDrop:!0,accept:".png,.jpg,.pdf,.json"};var Required=function Required(args){var _React$useState15=react__WEBPACK_IMPORTED_MODULE_0__.useState(),_React$useState16=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_React$useState15,2),files=_React$useState16[0],setFiles=_React$useState16[1];return onFilesChanged(files),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:setFiles}))};Required.args={label:"Choose a file",accept:"image/*"};var Playground=function Playground(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_FileInput__WEBPACK_IMPORTED_MODULE_3__.S,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({},args),{},{onChange:function onChange(files){onFilesChanged(files)}}))};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={id:"file-input",label:"Choose files",buttonLabel:"",language:"en",multiple:!1,maxSize:307200,accept:".png,.jpg,.pdf,.json",defaultValue:void 0,disabled:!1,required:!1,helperText:"",errorText:"",infoText:"",dragAndDrop:!1,dragAndDropLabel:"DragAndDropLabel",dragAndDropInputLabel:"DragAndDropInputLabel"},Playground.argTypes={language:{options:["fi","en","sv"],control:{type:"radio"}}},Single.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},Single.parameters),Multiple.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},Multiple.parameters),WithDefaultValue.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},WithDefaultValue.parameters),WithDragAndDrop.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},WithDragAndDrop.parameters),WithTooltip.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},WithTooltip.parameters),Disabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},Disabled.parameters),DisabledDragAndDrop.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},DisabledDragAndDrop.parameters),Required.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [files, setFiles] = React.useState();\n onFilesChanged(files);\n\n return ;\n}"}},Required.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const onChange = (files) => {\n onFilesChanged(files);\n };\n\n return ;\n}"}},Playground.parameters);try{Single.displayName="Single",Single.__docgenInfo={description:"",displayName:"Single",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#Single"]={docgenInfo:Single.__docgenInfo,name:"Single",path:"src/components/fileInput/FileInput.stories.tsx#Single"})}catch(__react_docgen_typescript_loader_error){}try{Multiple.displayName="Multiple",Multiple.__docgenInfo={description:"",displayName:"Multiple",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#Multiple"]={docgenInfo:Multiple.__docgenInfo,name:"Multiple",path:"src/components/fileInput/FileInput.stories.tsx#Multiple"})}catch(__react_docgen_typescript_loader_error){}try{WithDefaultValue.displayName="WithDefaultValue",WithDefaultValue.__docgenInfo={description:"",displayName:"WithDefaultValue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#WithDefaultValue"]={docgenInfo:WithDefaultValue.__docgenInfo,name:"WithDefaultValue",path:"src/components/fileInput/FileInput.stories.tsx#WithDefaultValue"})}catch(__react_docgen_typescript_loader_error){}try{WithDragAndDrop.displayName="WithDragAndDrop",WithDragAndDrop.__docgenInfo={description:"",displayName:"WithDragAndDrop",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#WithDragAndDrop"]={docgenInfo:WithDragAndDrop.__docgenInfo,name:"WithDragAndDrop",path:"src/components/fileInput/FileInput.stories.tsx#WithDragAndDrop"})}catch(__react_docgen_typescript_loader_error){}try{WithTooltip.displayName="WithTooltip",WithTooltip.__docgenInfo={description:"",displayName:"WithTooltip",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#WithTooltip"]={docgenInfo:WithTooltip.__docgenInfo,name:"WithTooltip",path:"src/components/fileInput/FileInput.stories.tsx#WithTooltip"})}catch(__react_docgen_typescript_loader_error){}try{Disabled.displayName="Disabled",Disabled.__docgenInfo={description:"",displayName:"Disabled",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#Disabled"]={docgenInfo:Disabled.__docgenInfo,name:"Disabled",path:"src/components/fileInput/FileInput.stories.tsx#Disabled"})}catch(__react_docgen_typescript_loader_error){}try{DisabledDragAndDrop.displayName="DisabledDragAndDrop",DisabledDragAndDrop.__docgenInfo={description:"",displayName:"DisabledDragAndDrop",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#DisabledDragAndDrop"]={docgenInfo:DisabledDragAndDrop.__docgenInfo,name:"DisabledDragAndDrop",path:"src/components/fileInput/FileInput.stories.tsx#DisabledDragAndDrop"})}catch(__react_docgen_typescript_loader_error){}try{Required.displayName="Required",Required.__docgenInfo={description:"",displayName:"Required",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#Required"]={docgenInfo:Required.__docgenInfo,name:"Required",path:"src/components/fileInput/FileInput.stories.tsx#Required"})}catch(__react_docgen_typescript_loader_error){}try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/fileInput/FileInput.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/fileInput/FileInput.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/footer/Footer.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomSection:()=>CustomSection,CustomTheme:()=>CustomTheme,Example:()=>Example,Minimal:()=>Minimal,NoNav:()=>NoNav,Sitemap:()=>Sitemap,UtilityGroups:()=>UtilityGroups,default:()=>Footer_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react=__webpack_require__("../../node_modules/react/index.js");__webpack_require__("./src/styles/base.css");const Footer_module={"small-down":"only screen and (max-width: 767.98px)","x-small-down":"only screen and (max-width: 575.98px)","x-large-up":"only screen and (min-width: 1248px)",footer:"Footer_footer__cOQNQ","theme-dark":"Footer_theme-dark__1NEU8",koros:"Footer_koros__I+xrB",basic:"Footer_basic__1Db+c",beat:"Footer_beat__kRlXB",pulse:"Footer_pulse__LFjs4",wave:"Footer_wave__W7Qob",vibration:"Footer_vibration__EQwy8",footerContent:"Footer_footerContent__whS9R",footerSections:"Footer_footerSections__6lJ2-",title:"Footer_title__3NBAw",titleWrapper:"Footer_titleWrapper__V8CwB"};var Koros=__webpack_require__("./src/components/koros/Koros.tsx"),classNames=__webpack_require__("./src/utils/classNames.ts");const FooterNavigation_module_navigation="FooterNavigation_navigation__9pnjp";var getChildren=__webpack_require__("./src/utils/getChildren.ts"),FooterVariant=function(FooterVariant){return FooterVariant.Base="base",FooterVariant.Navigation="navigation",FooterVariant.Utility="utility",FooterVariant}({}),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),FooterNavigation=function FooterNavigation(_ref){var ariaLabel=_ref.ariaLabel,children=_ref.children,role=_ref.role,childElements=(0,getChildren.fL)(children);return(0,jsx_runtime.jsx)("div",{className:FooterNavigation_module_navigation,"aria-label":ariaLabel,role,children:childElements.map((function(child,childIndex){return(0,jsx_runtime.jsx)(react.Fragment,{children:(0,react.isValidElement)(child)?(0,react.cloneElement)(child,{variant:FooterVariant.Navigation}):child},childIndex)}))})};FooterNavigation.componentName="FooterNavigation";try{FooterNavigation.displayName="FooterNavigation",FooterNavigation.__docgenInfo={description:"",displayName:"FooterNavigation",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Navigation.",name:"ariaLabel",required:!1,type:{name:"string"}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerNavigation/FooterNavigation.tsx#FooterNavigation"]={docgenInfo:FooterNavigation.__docgenInfo,name:"FooterNavigation",path:"src/components/footer/components/footerNavigation/FooterNavigation.tsx#FooterNavigation"})}catch(__react_docgen_typescript_loader_error){}var useMediaQuery=__webpack_require__("./src/hooks/useMediaQuery.ts");const FooterNavigationGroup_module_navigationGroup="FooterNavigationGroup_navigationGroup__xkLOU",FooterNavigationGroup_module_navigationGroupList="FooterNavigationGroup_navigationGroupList__WUJuk";var FooterNavigationGroup=function FooterNavigationGroup(_ref){var className=_ref.className,children=_ref.children,id=_ref.id,headingLink=_ref.headingLink,shouldRenderOnlyMainLinks=(0,useMediaQuery.kR)("l"),childElements=(0,getChildren.fL)(children),renderHeading=function renderHeading(){return(0,react.isValidElement)(headingLink)?(0,react.cloneElement)(headingLink,{variant:FooterVariant.Navigation}):headingLink};return shouldRenderOnlyMainLinks?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:renderHeading()}):(0,jsx_runtime.jsx)("div",{id,className:(0,classNames.Z)(FooterNavigationGroup_module_navigationGroup,className),children:(0,jsx_runtime.jsxs)("div",{className:FooterNavigationGroup_module_navigationGroupList,children:[renderHeading(),childElements.map((function(child,childIndex){return(0,jsx_runtime.jsx)(react.Fragment,{children:(0,react.isValidElement)(child)?(0,react.cloneElement)(child,{variant:FooterVariant.Navigation,subItem:!0}):child},childIndex)}))]})})};FooterNavigationGroup.componentName="FooterNavigationGroup";try{FooterNavigationGroup.displayName="FooterNavigationGroup",FooterNavigationGroup.__docgenInfo={description:"",displayName:"FooterNavigationGroup",props:{className:{defaultValue:null,description:"Additional class names to apply.",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"ID of the navigation group element.",name:"id",required:!1,type:{name:"string"}},headingLink:{defaultValue:null,description:'Footer.GroupHeading component to display at the top of the group. On smaller screens only this will be displayed.\n@example ```ts\nheadingLink={}\n```',name:"headingLink",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerNavigationGroup/FooterNavigationGroup.tsx#FooterNavigationGroup"]={docgenInfo:FooterNavigationGroup.__docgenInfo,name:"FooterNavigationGroup",path:"src/components/footer/components/footerNavigationGroup/FooterNavigationGroup.tsx#FooterNavigationGroup"})}catch(__react_docgen_typescript_loader_error){}var objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");const FooterGroupHeading_module={"medium-down":"only screen and (max-width: 991.98px)",heading:"FooterGroupHeading_heading__G3Q+u",navigation:"FooterGroupHeading_navigation__rMCyo",utility:"FooterGroupHeading_utility__AKppp"};var _excluded=["as","children","className","href","label","variant"],FooterGroupHeading=function FooterGroupHeading(_ref){var LinkComponent=_ref.as,children=_ref.children,className=_ref.className,href=_ref.href,label=_ref.label,variant=_ref.variant,rest=(0,objectWithoutProperties.Z)(_ref,_excluded),Item=react.useMemo((function(){return LinkComponent?react.isValidElement(LinkComponent)?LinkComponent.type:LinkComponent:href?"a":"span"}),[LinkComponent,href]);return(0,jsx_runtime.jsxs)(Item,(0,objectSpread2.Z)((0,objectSpread2.Z)({className:(0,classNames.Z)(FooterGroupHeading_module.heading,variant&&FooterGroupHeading_module[variant],className),href},rest),{},{children:[label&&label,children]}))};FooterGroupHeading.componentName="FooterGroupHeading";try{FooterGroupHeading.displayName="FooterGroupHeading",FooterGroupHeading.__docgenInfo={description:"",displayName:"FooterGroupHeading",props:{as:{defaultValue:null,description:"Element or component to use instead of the default native link.",name:"as",required:!1,type:{name:"ElementType"}},href:{defaultValue:null,description:"Hypertext Reference of the heading link.",name:"href",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"Id for the heading element.",name:"id",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"The label for the heading.",name:"label",required:!1,type:{name:"ReactNode"}},variant:{defaultValue:null,description:"Internal variant to change styles based on context.\n@internal",name:"variant",required:!1,type:{name:"enum",value:[{value:'"navigation"'},{value:'"utility"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerGroupHeading/FooterGroupHeading.tsx#FooterGroupHeading"]={docgenInfo:FooterGroupHeading.__docgenInfo,name:"FooterGroupHeading",path:"src/components/footer/components/footerGroupHeading/FooterGroupHeading.tsx#FooterGroupHeading"})}catch(__react_docgen_typescript_loader_error){}const FooterLink_module={"medium-down":"only screen and (max-width: 991.98px)","large-down":"only screen and (max-width: 1247.98px)",item:"FooterLink_item__CDXoK",base:"FooterLink_base__VYIVw",icon:"FooterLink_icon__Nm+jQ link_icon__piHiC",navigation:"FooterLink_navigation__Hm6x2",utility:"FooterLink_utility__DLo3J",subItem:"FooterLink_subItem__Il9ZQ",subItemIcon:"FooterLink_subItemIcon__cFiiq"};var Link=__webpack_require__("./src/components/link/Link.tsx"),IconAngleRight=__webpack_require__("./src/icons/IconAngleRight.tsx"),IconLinkExternal=__webpack_require__("./src/icons/IconLinkExternal.tsx"),FooterLink_excluded=["ariaLabel","as","className","icon","external","label","subItem","variant"],FooterLink=function FooterLink(_ref){var ariaLabel=_ref.ariaLabel,LinkComponent=_ref.as,className=_ref.className,icon=_ref.icon,_ref$external=_ref.external,external=void 0!==_ref$external&&_ref$external,label=_ref.label,_ref$subItem=_ref.subItem,subItem=void 0!==_ref$subItem&&_ref$subItem,variant=_ref.variant,rest=(0,objectWithoutProperties.Z)(_ref,FooterLink_excluded),Item=react.isValidElement(LinkComponent)?LinkComponent.type:LinkComponent;return(0,jsx_runtime.jsxs)(Item,(0,objectSpread2.Z)((0,objectSpread2.Z)({"aria-label":ariaLabel,className:(0,classNames.Z)(FooterLink_module.item,subItem&&FooterLink_module.subItem,variant&&FooterLink_module[variant],className)},rest),{},{children:[icon,subItem&&(0,jsx_runtime.jsx)(IconAngleRight.IconAngleRight,{className:FooterLink_module.subItemIcon,"aria-hidden":!0}),label&&(0,jsx_runtime.jsx)("span",{children:label}),external&&label&&(0,jsx_runtime.jsx)(IconLinkExternal.IconLinkExternal,{size:variant===FooterVariant.Base?"xs":"s",className:FooterLink_module.icon,"aria-hidden":!0})]}))};FooterLink.defaultProps={as:Link.r};try{FooterLink.displayName="FooterLink",FooterLink.__docgenInfo={description:"",displayName:"FooterLink",props:{ariaLabel:{defaultValue:null,description:"aria-label for providing detailed information for screen readers about a link.",name:"ariaLabel",required:!1,type:{name:"string"}},as:{defaultValue:{value:"React.forwardRef(\n (\n {\n ariaLabel,\n children,\n className,\n disableVisitedStyles = false,\n external = false,\n href,\n iconLeft,\n openInNewTab = false,\n openInExternalDomainAriaLabel,\n openInNewTabAriaLabel,\n style = {},\n size = 'M',\n ...rest\n }: LinkProps,\n ref: React.Ref,\n ) => {\n const composeAriaLabel = () => {\n let childrenText = ariaLabel || getTextFromReactChildren(children);\n const newTabText = openInNewTab ? openInNewTabAriaLabel || 'Avautuu uudessa välilehdessä.' : '';\n const externalText = external ? openInExternalDomainAriaLabel || 'Siirtyy toiseen sivustoon.' : '';\n\n if (childrenText && childrenText.slice(-1) !== '.') {\n childrenText = `${childrenText}.`;\n }\n\n return [childrenText, newTabText, externalText].filter((text) => text).join(' ');\n };\n\n const mapLinkSizeToExternalIconSize: LinkToIconSizeMappingType = {\n L: 'l',\n M: 's',\n S: 'xs',\n };\n const mapLinkSizeToIconVerticalStyling = {\n L: styles.verticalAlignBigIcon,\n M: styles.verticalAlignMediumIcon,\n S: styles.verticalAlignSmallIcon,\n };\n\n return (\n \n {iconLeft && (\n \n {iconLeft}\n \n )}\n {children}\n {external && (\n \n )}\n \n );\n },\n)"},description:"Element or component to use instead of the default link.\n@example ```ts\nas={CustomLink}\n```",name:"as",required:!1,type:{name:"ElementType"}},external:{defaultValue:{value:"false"},description:"Boolean indicating whether the link will lead user to external domain.",name:"external",required:!1,type:{name:"boolean"}},icon:{defaultValue:null,description:"Icon placed on the left side of the item label.",name:"icon",required:!1,type:{name:"ReactNode"}},label:{defaultValue:null,description:"The label for the item.",name:"label",required:!1,type:{name:"string"}},openInNewTab:{defaultValue:null,description:"Boolean indicating whether the link will open in new tab.",name:"openInNewTab",required:!1,type:{name:"boolean"}},openInNewTabAriaLabel:{defaultValue:null,description:"The aria-label for opening link in a new tab.",name:"openInNewTabAriaLabel",required:!1,type:{name:"string"}},openInExternalDomainAriaLabel:{defaultValue:null,description:"The aria-label for opening link in an external domain.",name:"openInExternalDomainAriaLabel",required:!1,type:{name:"string"}},subItem:{defaultValue:{value:"false"},description:"Set this if this item appears in footer navigation group.\n@internal",name:"subItem",required:!1,type:{name:"boolean"}},variant:{defaultValue:null,description:"Defines the FooterLink variant.\n@internal",name:"variant",required:!1,type:{name:"enum",value:[{value:'"base"'},{value:'"navigation"'},{value:'"utility"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerLink/FooterLink.tsx#FooterLink"]={docgenInfo:FooterLink.__docgenInfo,name:"FooterLink",path:"src/components/footer/components/footerLink/FooterLink.tsx#FooterLink"})}catch(__react_docgen_typescript_loader_error){}const FooterUtilities_module_divider="FooterUtilities_divider__obq3h",FooterUtilities_module_links="FooterUtilities_links__VQgmC",FooterUtilities_module_soMe="FooterUtilities_soMe__WaDTn",FooterUtilities_module_utilities="FooterUtilities_utilities__Wtl8V",FooterUtilities_module_widerLinks="FooterUtilities_widerLinks__7M1cm";var FooterUtilities=function FooterUtilities(_ref){var ariaLabel=_ref.ariaLabel,children=_ref.children,soMeLinks=_ref.soMeLinks,soMeSectionProps=_ref.soMeSectionProps,role=_ref.role,childElements=(0,getChildren.fL)(children);return(0,jsx_runtime.jsxs)("div",{className:FooterUtilities_module_utilities,"aria-label":ariaLabel,role,children:[(0,jsx_runtime.jsx)("hr",{className:FooterUtilities_module_divider,"aria-hidden":!0}),(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(FooterUtilities_module_links,!soMeLinks&&FooterUtilities_module_widerLinks),children:childElements.map((function(child,childIndex){return(0,jsx_runtime.jsx)(react.Fragment,{children:(0,react.isValidElement)(child)?(0,react.cloneElement)(child,{variant:FooterVariant.Utility}):child},childIndex)}))}),soMeLinks&&(0,jsx_runtime.jsx)("section",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:FooterUtilities_module_soMe},soMeSectionProps),{},{children:soMeLinks.map((function(link,index){return(0,react.isValidElement)(link)?(0,react.cloneElement)(link,{variant:null,key:index}):null}))}))]})};try{FooterUtilities.displayName="FooterUtilities",FooterUtilities.__docgenInfo={description:"",displayName:"FooterUtilities",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Utilities.",name:"ariaLabel",required:!1,type:{name:"string"}},children:{defaultValue:null,description:"Children elements to render.",name:"children",required:!0,type:{name:"ReactNode"}},soMeLinks:{defaultValue:null,description:"List of Link components to display in the social media section.",name:"soMeLinks",required:!1,type:{name:"ReactNode[]"}},soMeSectionProps:{defaultValue:null,description:"Props that will be passed to the native `
` element.\nCan be used to pass aria attributes that describes the SoMe section to screen reader users.",name:"soMeSectionProps",required:!1,type:{name:'Pick, HTMLElement>, "key" | keyof HTMLAttributes>'}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerUtilities/FooterUtilities.tsx#FooterUtilities"]={docgenInfo:FooterUtilities.__docgenInfo,name:"FooterUtilities",path:"src/components/footer/components/footerUtilities/FooterUtilities.tsx#FooterUtilities"})}catch(__react_docgen_typescript_loader_error){}const FooterUtilityGroup_module_utilityGroup="FooterUtilityGroup_utilityGroup__na72q";var FooterUtilityGroup=function FooterUtilityGroup(_ref){var className=_ref.className,children=_ref.children,id=_ref.id,headingLink=_ref.headingLink,childElements=(0,getChildren.fL)(children);return(0,jsx_runtime.jsx)("div",{id,className:(0,classNames.Z)(FooterUtilityGroup_module_utilityGroup,className),children:(0,jsx_runtime.jsxs)("div",{className:FooterUtilityGroup_module_utilityGroup,children:[(0,react.isValidElement)(headingLink)?(0,react.cloneElement)(headingLink,{variant:FooterVariant.Utility}):headingLink,childElements.map((function(child,childIndex){return(0,jsx_runtime.jsx)(react.Fragment,{children:(0,react.isValidElement)(child)?(0,react.cloneElement)(child,{variant:FooterVariant.Utility}):child},childIndex)}))]})})};FooterUtilityGroup.componentName="FooterUtilityGroup";try{FooterUtilityGroup.displayName="FooterUtilityGroup",FooterUtilityGroup.__docgenInfo={description:"",displayName:"FooterUtilityGroup",props:{className:{defaultValue:null,description:"Additional class names to apply.",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"ID of the group element.",name:"id",required:!1,type:{name:"string"}},headingLink:{defaultValue:null,description:'FooterGroupHeading component to display at the top of the group.\n@example ```ts\nheadingLink={}\n```',name:"headingLink",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerUtilityGroup/FooterUtilityGroup.tsx#FooterUtilityGroup"]={docgenInfo:FooterUtilityGroup.__docgenInfo,name:"FooterUtilityGroup",path:"src/components/footer/components/footerUtilityGroup/FooterUtilityGroup.tsx#FooterUtilityGroup"})}catch(__react_docgen_typescript_loader_error){}const FooterBase_module={"x-small-down":"only screen and (max-width: 575.98px)","small-down":"only screen and (max-width: 767.98px)","small-up":"only screen and (min-width: 576px)","medium-down":"only screen and (max-width: 991.98px)","medium-up":"only screen and (min-width: 768px)","large-up":"only screen and (min-width: 992px)",backToTopButton:"FooterBase_backToTopButton__CPdpq",divider:"FooterBase_divider__MyW5k",base:"FooterBase_base__THFrL",baseActions:"FooterBase_baseActions__gSD4T",copyright:"FooterBase_copyright__+VWAh",links:"FooterBase_links__p9viR",logoWrapper:"FooterBase_logoWrapper__OfqPD",separator:"FooterBase_separator__4nls6",copyrightDot:"FooterBase_copyrightDot__oMrfO"};var Logo=__webpack_require__("./src/components/logo/Logo.tsx"),IconArrowUp=__webpack_require__("./src/icons/IconArrowUp.tsx"),toConsumableArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");var handleBackToTop=function handleBackToTop(){var _window,_getKeyboardFocusable;null===(_window=window)||void 0===_window||_window.scrollTo({top:0}),null===(_getKeyboardFocusable=function(){var element=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return(0,toConsumableArray.Z)(element.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter((function(el){return!el.hasAttribute("disabled")&&el.offsetWidth>0&&el.offsetHeight>0}))}()[0])||void 0===_getKeyboardFocusable||_getKeyboardFocusable.focus()},FooterBase=function FooterBase(_ref){var ariaLabel=_ref.ariaLabel,backToTopLabel=_ref.backToTopLabel,children=_ref.children,copyrightHolder=_ref.copyrightHolder,copyrightText=_ref.copyrightText,logoHref=_ref.logoHref,_ref$logoLanguage=_ref.logoLanguage,logoLanguage=void 0===_ref$logoLanguage?"fi":_ref$logoLanguage,onBackToTopClick=_ref.onBackToTopClick,role=_ref.role,_ref$showBackToTopBut=_ref.showBackToTopButton,showBackToTopButton=void 0===_ref$showBackToTopBut||_ref$showBackToTopBut,_ref$year=_ref.year,year=void 0===_ref$year?(new Date).getFullYear():_ref$year,childElements=(0,getChildren.fL)(children);return(0,jsx_runtime.jsxs)("div",{className:FooterBase_module.base,"aria-label":ariaLabel,role,children:[(0,jsx_runtime.jsx)("hr",{className:FooterBase_module.divider,"aria-hidden":!0}),(0,jsx_runtime.jsx)("div",{className:FooterBase_module.logoWrapper,children:(0,jsx_runtime.jsx)(FooterLink,{tabIndex:0,icon:(0,jsx_runtime.jsx)(Logo.T,{size:"medium",language:logoLanguage,"aria-hidden":!0}),href:logoHref})}),(copyrightHolder||copyrightText)&&(0,jsx_runtime.jsxs)("div",{className:FooterBase_module.copyright,children:[(0,jsx_runtime.jsxs)("span",{className:FooterBase_module.copyrightHolder,children:["© ",copyrightHolder," ",year]}),copyrightText&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:FooterBase_module.copyrightDot,children:"•"}),(0,jsx_runtime.jsx)("span",{className:FooterBase_module.copyrightText,children:copyrightText})]})]}),(0,jsx_runtime.jsxs)("div",{className:FooterBase_module.baseActions,children:[children&&(0,jsx_runtime.jsx)("div",{className:FooterBase_module.links,children:childElements.map((function(child,index){return(0,react.isValidElement)(child)?(0,jsx_runtime.jsxs)(react.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:FooterBase_module.separator,children:"|"}),(0,react.cloneElement)(child,{variant:FooterVariant.Base})]},index):null}))}),showBackToTopButton&&(0,jsx_runtime.jsxs)("button",{type:"button",role:"link",className:FooterBase_module.backToTopButton,onClick:function onClick(e){return"function"==typeof onBackToTopClick?onBackToTopClick(e):handleBackToTop()},children:[backToTopLabel,(0,jsx_runtime.jsx)(IconArrowUp.IconArrowUp,{"aria-hidden":"true"})]})]})]})};try{FooterBase.displayName="FooterBase",FooterBase.__docgenInfo={description:"",displayName:"FooterBase",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Base.",name:"ariaLabel",required:!1,type:{name:"string"}},backToTopLabel:{defaultValue:null,description:'Label for the "Back to top" button.',name:"backToTopLabel",required:!1,type:{name:"ReactNode"}},copyrightHolder:{defaultValue:null,description:"Text to be displayed next to the copyright symbol.",name:"copyrightHolder",required:!1,type:{name:"ReactNode"}},copyrightText:{defaultValue:null,description:"Text to be displayed after the copyright holder text.",name:"copyrightText",required:!1,type:{name:"ReactNode"}},logoHref:{defaultValue:null,description:"Link for the logo. Should direct to the main page.",name:"logoHref",required:!1,type:{name:"string"}},logoLanguage:{defaultValue:{value:"fi"},description:"The language of the Helsinki-logo.",name:"logoLanguage",required:!1,type:{name:"string"}},onBackToTopClick:{defaultValue:null,description:'Callback fired when the "Back to top" button is clicked.',name:"onBackToTopClick",required:!1,type:{name:"(event: MouseEvent) => void"}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}},showBackToTopButton:{defaultValue:{value:"true"},description:'Whether the "Back to top" button should be shown.',name:"showBackToTopButton",required:!1,type:{name:"boolean"}},year:{defaultValue:{value:"new Date().getFullYear()"},description:"Set the year for copyright text. This can be useful in automated tests when a static year is set so the tests don't fail after a new year.",name:"year",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerBase/FooterBase.tsx#FooterBase"]={docgenInfo:FooterBase.__docgenInfo,name:"FooterBase",path:"src/components/footer/components/footerBase/FooterBase.tsx#FooterBase"})}catch(__react_docgen_typescript_loader_error){}const FooterCustom_module_divider="FooterCustom_divider__mFn4f",FooterCustom_module_custom="FooterCustom_custom__BYcFI";var FooterCustom=function FooterCustom(_ref){var ariaLabel=_ref.ariaLabel,children=_ref.children,className=_ref.className,id=_ref.id,role=_ref.role;return(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(FooterCustom_module_custom,className),id,"aria-label":ariaLabel,role,children:[(0,jsx_runtime.jsx)("hr",{className:FooterCustom_module_divider,"aria-hidden":!0}),children]})};try{FooterCustom.displayName="FooterCustom",FooterCustom.__docgenInfo={description:"",displayName:"FooterCustom",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Custom.",name:"ariaLabel",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"Additional class names to apply.",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"ID of the navigation element.",name:"id",required:!1,type:{name:"string"}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/components/footerCustom/FooterCustom.tsx#FooterCustom"]={docgenInfo:FooterCustom.__docgenInfo,name:"FooterCustom",path:"src/components/footer/components/footerCustom/FooterCustom.tsx#FooterCustom"})}catch(__react_docgen_typescript_loader_error){}var useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),Footer=function Footer(_ref){var ariaLabel=_ref.ariaLabel,children=_ref.children,className=_ref.className,footerProps=_ref.footerProps,_ref$korosType=_ref.korosType,korosType=void 0===_ref$korosType?"basic":_ref$korosType,_ref$theme=_ref.theme,theme=void 0===_ref$theme?"light":_ref$theme,title=_ref.title,customThemeClass=(0,useTheme.F)(Footer_module.footer,theme);return(0,jsx_runtime.jsxs)("footer",(0,objectSpread2.Z)((0,objectSpread2.Z)({},footerProps),{},{className:(0,classNames.Z)(Footer_module.footer,Footer_module["koros-".concat(korosType)],"string"==typeof theme&&Footer_module["theme-".concat(theme)],customThemeClass,className),"aria-label":ariaLabel,children:[(0,jsx_runtime.jsx)(Koros.N,{className:(0,classNames.Z)(Footer_module.koros,Footer_module[korosType]),type:korosType}),(0,jsx_runtime.jsx)("div",{className:Footer_module.footerContent,children:(0,jsx_runtime.jsxs)("div",{className:Footer_module.footerSections,children:[title&&(0,jsx_runtime.jsx)("h2",{className:Footer_module.title,children:title}),children]})})]}))};Footer.Navigation=FooterNavigation,Footer.NavigationGroup=FooterNavigationGroup,Footer.GroupHeading=FooterGroupHeading,Footer.Link=FooterLink,Footer.Utilities=FooterUtilities,Footer.UtilityGroup=FooterUtilityGroup,Footer.Base=FooterBase,Footer.Custom=FooterCustom;try{Footer.displayName="Footer",Footer.__docgenInfo={description:"",displayName:"Footer",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.",name:"ariaLabel",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"Additional class names to apply to the footer.",name:"className",required:!1,type:{name:"string"}},footerProps:{defaultValue:null,description:"Props that will be passed to the native `
` element.",name:"footerProps",required:!1,type:{name:'Pick, HTMLElement>, "key" | keyof HTMLAttributes>'}},korosType:{defaultValue:{value:"basic"},description:"Koros type to use in the footer.",name:"korosType",required:!1,type:{name:"enum",value:[{value:'"basic"'},{value:'"beat"'},{value:'"pulse"'},{value:'"wave"'},{value:'"vibration"'},{value:'"calm"'}]}},theme:{defaultValue:{value:"light"},description:"Defines the footer theme.",name:"theme",required:!1,type:{name:"FooterTheme"}},title:{defaultValue:null,description:"The title of the service shown on top of the the footer.",name:"title",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer"]={docgenInfo:Footer.__docgenInfo,name:"Footer",path:"src/components/footer/Footer.tsx#Footer"})}catch(__react_docgen_typescript_loader_error){}try{Footer.Navigation.displayName="Footer.Navigation",Footer.Navigation.__docgenInfo={description:"",displayName:"Footer.Navigation",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Navigation.",name:"ariaLabel",required:!1,type:{name:"string"}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.Navigation"]={docgenInfo:Footer.Navigation.__docgenInfo,name:"Footer.Navigation",path:"src/components/footer/Footer.tsx#Footer.Navigation"})}catch(__react_docgen_typescript_loader_error){}try{Footer.NavigationGroup.displayName="Footer.NavigationGroup",Footer.NavigationGroup.__docgenInfo={description:"",displayName:"Footer.NavigationGroup",props:{className:{defaultValue:null,description:"Additional class names to apply.",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"ID of the navigation group element.",name:"id",required:!1,type:{name:"string"}},headingLink:{defaultValue:null,description:'Footer.GroupHeading component to display at the top of the group. On smaller screens only this will be displayed.\n@example ```ts\nheadingLink={}\n```',name:"headingLink",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.NavigationGroup"]={docgenInfo:Footer.NavigationGroup.__docgenInfo,name:"Footer.NavigationGroup",path:"src/components/footer/Footer.tsx#Footer.NavigationGroup"})}catch(__react_docgen_typescript_loader_error){}try{Footer.GroupHeading.displayName="Footer.GroupHeading",Footer.GroupHeading.__docgenInfo={description:"",displayName:"Footer.GroupHeading",props:{as:{defaultValue:null,description:"Element or component to use instead of the default native link.",name:"as",required:!1,type:{name:"ElementType"}},href:{defaultValue:null,description:"Hypertext Reference of the heading link.",name:"href",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"Id for the heading element.",name:"id",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"The label for the heading.",name:"label",required:!1,type:{name:"ReactNode"}},variant:{defaultValue:null,description:"Internal variant to change styles based on context.\n@internal",name:"variant",required:!1,type:{name:"enum",value:[{value:'"navigation"'},{value:'"utility"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.GroupHeading"]={docgenInfo:Footer.GroupHeading.__docgenInfo,name:"Footer.GroupHeading",path:"src/components/footer/Footer.tsx#Footer.GroupHeading"})}catch(__react_docgen_typescript_loader_error){}try{Footer.Link.displayName="Footer.Link",Footer.Link.__docgenInfo={description:"",displayName:"Footer.Link",props:{ariaLabel:{defaultValue:null,description:"aria-label for providing detailed information for screen readers about a link.",name:"ariaLabel",required:!1,type:{name:"string"}},as:{defaultValue:{value:"React.forwardRef(\n (\n {\n ariaLabel,\n children,\n className,\n disableVisitedStyles = false,\n external = false,\n href,\n iconLeft,\n openInNewTab = false,\n openInExternalDomainAriaLabel,\n openInNewTabAriaLabel,\n style = {},\n size = 'M',\n ...rest\n }: LinkProps,\n ref: React.Ref,\n ) => {\n const composeAriaLabel = () => {\n let childrenText = ariaLabel || getTextFromReactChildren(children);\n const newTabText = openInNewTab ? openInNewTabAriaLabel || 'Avautuu uudessa välilehdessä.' : '';\n const externalText = external ? openInExternalDomainAriaLabel || 'Siirtyy toiseen sivustoon.' : '';\n\n if (childrenText && childrenText.slice(-1) !== '.') {\n childrenText = `${childrenText}.`;\n }\n\n return [childrenText, newTabText, externalText].filter((text) => text).join(' ');\n };\n\n const mapLinkSizeToExternalIconSize: LinkToIconSizeMappingType = {\n L: 'l',\n M: 's',\n S: 'xs',\n };\n const mapLinkSizeToIconVerticalStyling = {\n L: styles.verticalAlignBigIcon,\n M: styles.verticalAlignMediumIcon,\n S: styles.verticalAlignSmallIcon,\n };\n\n return (\n \n {iconLeft && (\n \n {iconLeft}\n \n )}\n {children}\n {external && (\n \n )}\n \n );\n },\n)"},description:"Element or component to use instead of the default link.\n@example ```ts\nas={CustomLink}\n```",name:"as",required:!1,type:{name:"ElementType"}},external:{defaultValue:{value:"false"},description:"Boolean indicating whether the link will lead user to external domain.",name:"external",required:!1,type:{name:"boolean"}},icon:{defaultValue:null,description:"Icon placed on the left side of the item label.",name:"icon",required:!1,type:{name:"ReactNode"}},label:{defaultValue:null,description:"The label for the item.",name:"label",required:!1,type:{name:"string"}},openInNewTab:{defaultValue:null,description:"Boolean indicating whether the link will open in new tab.",name:"openInNewTab",required:!1,type:{name:"boolean"}},openInNewTabAriaLabel:{defaultValue:null,description:"The aria-label for opening link in a new tab.",name:"openInNewTabAriaLabel",required:!1,type:{name:"string"}},openInExternalDomainAriaLabel:{defaultValue:null,description:"The aria-label for opening link in an external domain.",name:"openInExternalDomainAriaLabel",required:!1,type:{name:"string"}},subItem:{defaultValue:{value:"false"},description:"Set this if this item appears in footer navigation group.\n@internal",name:"subItem",required:!1,type:{name:"boolean"}},variant:{defaultValue:null,description:"Defines the FooterLink variant.\n@internal",name:"variant",required:!1,type:{name:"enum",value:[{value:'"base"'},{value:'"navigation"'},{value:'"utility"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.Link"]={docgenInfo:Footer.Link.__docgenInfo,name:"Footer.Link",path:"src/components/footer/Footer.tsx#Footer.Link"})}catch(__react_docgen_typescript_loader_error){}try{Footer.Utilities.displayName="Footer.Utilities",Footer.Utilities.__docgenInfo={description:"",displayName:"Footer.Utilities",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Utilities.",name:"ariaLabel",required:!1,type:{name:"string"}},children:{defaultValue:null,description:"Children elements to render.",name:"children",required:!0,type:{name:"ReactNode"}},soMeLinks:{defaultValue:null,description:"List of Link components to display in the social media section.",name:"soMeLinks",required:!1,type:{name:"ReactNode[]"}},soMeSectionProps:{defaultValue:null,description:"Props that will be passed to the native `
` element.\nCan be used to pass aria attributes that describes the SoMe section to screen reader users.",name:"soMeSectionProps",required:!1,type:{name:'Pick, HTMLElement>, "key" | keyof HTMLAttributes>'}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.Utilities"]={docgenInfo:Footer.Utilities.__docgenInfo,name:"Footer.Utilities",path:"src/components/footer/Footer.tsx#Footer.Utilities"})}catch(__react_docgen_typescript_loader_error){}try{Footer.UtilityGroup.displayName="Footer.UtilityGroup",Footer.UtilityGroup.__docgenInfo={description:"",displayName:"Footer.UtilityGroup",props:{className:{defaultValue:null,description:"Additional class names to apply.",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"ID of the group element.",name:"id",required:!1,type:{name:"string"}},headingLink:{defaultValue:null,description:'FooterGroupHeading component to display at the top of the group.\n@example ```ts\nheadingLink={}\n```',name:"headingLink",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.UtilityGroup"]={docgenInfo:Footer.UtilityGroup.__docgenInfo,name:"Footer.UtilityGroup",path:"src/components/footer/Footer.tsx#Footer.UtilityGroup"})}catch(__react_docgen_typescript_loader_error){}try{Footer.Base.displayName="Footer.Base",Footer.Base.__docgenInfo={description:"",displayName:"Footer.Base",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Base.",name:"ariaLabel",required:!1,type:{name:"string"}},backToTopLabel:{defaultValue:null,description:'Label for the "Back to top" button.',name:"backToTopLabel",required:!1,type:{name:"ReactNode"}},copyrightHolder:{defaultValue:null,description:"Text to be displayed next to the copyright symbol.",name:"copyrightHolder",required:!1,type:{name:"ReactNode"}},copyrightText:{defaultValue:null,description:"Text to be displayed after the copyright holder text.",name:"copyrightText",required:!1,type:{name:"ReactNode"}},logoHref:{defaultValue:null,description:"Link for the logo. Should direct to the main page.",name:"logoHref",required:!1,type:{name:"string"}},logoLanguage:{defaultValue:{value:"fi"},description:"The language of the Helsinki-logo.",name:"logoLanguage",required:!1,type:{name:"string"}},onBackToTopClick:{defaultValue:null,description:'Callback fired when the "Back to top" button is clicked.',name:"onBackToTopClick",required:!1,type:{name:"(event: MouseEvent) => void"}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}},showBackToTopButton:{defaultValue:{value:"true"},description:'Whether the "Back to top" button should be shown.',name:"showBackToTopButton",required:!1,type:{name:"boolean"}},year:{defaultValue:{value:"new Date().getFullYear()"},description:"Set the year for copyright text. This can be useful in automated tests when a static year is set so the tests don't fail after a new year.",name:"year",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.Base"]={docgenInfo:Footer.Base.__docgenInfo,name:"Footer.Base",path:"src/components/footer/Footer.tsx#Footer.Base"})}catch(__react_docgen_typescript_loader_error){}try{Footer.Custom.displayName="Footer.Custom",Footer.Custom.__docgenInfo={description:"",displayName:"Footer.Custom",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing Footer.Custom.",name:"ariaLabel",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"Additional class names to apply.",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"ID of the navigation element.",name:"id",required:!1,type:{name:"string"}},role:{defaultValue:null,description:"ARIA role to describe the contents.",name:"role",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.tsx#Footer.Custom"]={docgenInfo:Footer.Custom.__docgenInfo,name:"Footer.Custom",path:"src/components/footer/Footer.tsx#Footer.Custom"})}catch(__react_docgen_typescript_loader_error){}var IconFacebook=__webpack_require__("./src/icons/IconFacebook.tsx"),IconTwitter=__webpack_require__("./src/icons/IconTwitter.tsx"),IconInstagram=__webpack_require__("./src/icons/IconInstagram.tsx"),IconYoutube=__webpack_require__("./src/icons/IconYoutube.tsx"),IconTiktok=__webpack_require__("./src/icons/IconTiktok.tsx"),IconLinkedin=__webpack_require__("./src/icons/IconLinkedin.tsx"),createArray=function createArray(length){return Array.from({length},(function(value,index){return index}))},Utilities=function Utilities(){return(0,jsx_runtime.jsxs)(Footer.Utilities,{soMeLinks:function someLinks(){return[(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Facebook-tili",ariaLabel:"Helsingin kaupungin Facebook-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconFacebook.IconFacebook,{"aria-hidden":!0}),href:"https://facebook.com"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Twitter-tili",ariaLabel:"Helsingin kaupungin Twitter-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconTwitter.IconTwitter,{"aria-hidden":!0}),href:"https://twitter.com"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Instagram-tili",ariaLabel:"Helsingin kaupungin Instagram-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconInstagram.IconInstagram,{"aria-hidden":!0}),href:"https://instagram.com"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Youtube-tili",ariaLabel:"Helsingin kaupungin Youtube-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconYoutube.IconYoutube,{"aria-hidden":!0}),href:"https://youtube.com"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Tiktok-tili",ariaLabel:"Helsingin kaupungin Tiktok-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconTiktok.IconTiktok,{"aria-hidden":!0}),href:"https://tiktok.com"})]}(),children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Contact us"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Give feedback"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Support"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"About"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Github page",external:!0,openInNewTab:!0})]})},Base=function Base(){return(0,jsx_runtime.jsx)(Footer.Base,{copyrightHolder:"Copyright",copyrightText:"All rights reserved",backToTopLabel:"Back to top",children:createArray(5).map((function(index){return(0,jsx_runtime.jsx)(Footer.Link,(0,objectSpread2.Z)({href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Link",className:"test"},4===index&&{external:!0,openInNewTab:!0}),index)}))})};const Footer_stories={component:Footer,title:"Components/Footer",subcomponents:{FooterNavigation,FooterLink,FooterNavigationGroup,FooterGroupHeading,FooterUtilities,FooterUtilityGroup,FooterBase,FooterCustom},parameters:{storySource:{source:'import React from \'react\';\n\nimport { Footer } from \'./Footer\';\nimport { IconFacebook, IconInstagram, IconLinkedin, IconTiktok, IconTwitter, IconYoutube } from \'../../icons\';\nimport { FooterGroupHeading } from \'./components/footerGroupHeading/FooterGroupHeading\';\nimport { FooterLink } from \'./components/footerLink/FooterLink\';\nimport { FooterNavigationGroup } from \'./components/footerNavigationGroup/FooterNavigationGroup\';\nimport { FooterNavigation } from \'./components/footerNavigation/FooterNavigation\';\nimport { FooterUtilities } from \'./components/footerUtilities/FooterUtilities\';\nimport { FooterUtilityGroup } from \'./components/footerUtilityGroup/FooterUtilityGroup\';\nimport { FooterBase } from \'./components/footerBase/FooterBase\';\nimport { FooterCustom } from \'./components/footerCustom/FooterCustom\';\n\nconst createArray = (length: number): number[] => Array.from({ length }, (value, index) => index);\n\nconst Utilities = () => {\n const someLinks = () => {\n return [\n }\n href="https://facebook.com"\n />,\n }\n href="https://twitter.com"\n />,\n }\n href="https://instagram.com"\n />,\n }\n href="https://youtube.com"\n />,\n }\n href="https://tiktok.com"\n />,\n ];\n };\n return (\n \n e.preventDefault()} label="Contact us" />\n e.preventDefault()} label="Give feedback" />\n e.preventDefault()} label="Support" />\n e.preventDefault()} label="About" />\n e.preventDefault()}\n label="Github page"\n external\n openInNewTab\n />\n \n );\n};\n\nconst Base = () => (\n \n {createArray(5).map((index) => (\n e.preventDefault()}\n label="Link"\n className="test"\n {...(index === 4 && { external: true, openInNewTab: true })}\n />\n ))}\n \n);\n\nexport default {\n component: Footer,\n title: \'Components/Footer\',\n subcomponents: {\n FooterNavigation,\n FooterLink,\n FooterNavigationGroup,\n FooterGroupHeading,\n FooterUtilities,\n FooterUtilityGroup,\n FooterBase,\n FooterCustom,\n },\n parameters: {\n controls: { expanded: true },\n layout: \'fullscreen\',\n },\n args: { title: \'Helsinki Design System\', korosType: \'basic\', theme: \'light\' },\n argTypes: {\n korosType: { control: { type: \'radio\', options: [\'basic\', \'beat\', \'calm\', \'pulse\', \'wave\', \'vibration\'] } },\n theme: { control: { type: \'inline-radio\', options: [\'light\', \'dark\'] } },\n title: { control: { type: \'text\' } },\n },\n};\n\nexport const NoNav = (args) => (\n
\n \n \n
\n);\nNoNav.storyName = \'No navigation\';\n\nexport const CustomTheme = (args) => (\n
\n \n {createArray(8).map((index) => (\n e.preventDefault()} label="Nav item" />\n ))}\n \n \n \n
\n);\nCustomTheme.storyName = \'Custom theme\';\nCustomTheme.args = {\n theme: {\n \'--footer-background\': \'var(--color-engel)\',\n \'--footer-color\': \'var(--color-black-90)\',\n \'--footer-divider-color\': \'var(--color-black-90)\',\n \'--footer-focus-outline-color\': \'var(--color-black-90)\',\n },\n};\nCustomTheme.argTypes = {\n theme: {\n control: {\n type: \'object\',\n },\n },\n};\n\nexport const Sitemap = (args) => (\n
\n \n {createArray(4).map((index) => (\n }\n >\n {createArray(6).map((subIndex) => {\n return (\n e.preventDefault()}\n label="Sub page"\n subItem\n />\n );\n })}\n \n ))}\n \n \n \n
\n);\n\nexport const Example = (args) => (\n
\n \n \n \n \n \n \n \n \n \n
\n);\n\nexport const UtilityGroups = (args) => (\n
\n \n \n \n \n \n \n \n \n \n \n {createArray(3).map((index) => (\n e.preventDefault()}\n label="Group heading link"\n />\n }\n >\n {createArray(6).map((subIndex) => {\n return (\n e.preventDefault()}\n label="Group link"\n />\n );\n })}\n \n ))}\n }>\n \n \n \n \n \n \n
\n);\n\nexport const CustomSection = (args) => (\n
\n \n {createArray(8).map((index) => (\n e.preventDefault()} label="Nav item" />\n ))}\n \n \n \n \n \n \n \n \n \n \n \n
\n);\n\nexport const Minimal = (args) => (\n
\n \n
\n);\n',locationsMap:{"no-nav":{startLoc:{col:21,line:118},endLoc:{col:1,line:123},startBody:{col:21,line:118},endBody:{col:1,line:123}},"custom-theme":{startLoc:{col:27,line:126},endLoc:{col:1,line:136},startBody:{col:27,line:126},endBody:{col:1,line:136}},sitemap:{startLoc:{col:23,line:154},endLoc:{col:1,line:179},startBody:{col:23,line:154},endBody:{col:1,line:179}},example:{startLoc:{col:23,line:181},endLoc:{col:1,line:262},startBody:{col:23,line:181},endBody:{col:1,line:262}},"utility-groups":{startLoc:{col:29,line:264},endLoc:{col:1,line:353},startBody:{col:29,line:264},endBody:{col:1,line:353}},"custom-section":{startLoc:{col:29,line:355},endLoc:{col:1,line:376},startBody:{col:29,line:355},endBody:{col:1,line:376}},minimal:{startLoc:{col:23,line:378},endLoc:{col:1,line:382},startBody:{col:23,line:378},endBody:{col:1,line:382}}}},controls:{expanded:!0},layout:"fullscreen"},args:{title:"Helsinki Design System",korosType:"basic",theme:"light"},argTypes:{korosType:{control:{type:"radio",options:["basic","beat","calm","pulse","wave","vibration"]}},theme:{control:{type:"inline-radio",options:["light","dark"]}},title:{control:{type:"text"}}}};var NoNav=function NoNav(args){return(0,jsx_runtime.jsxs)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:[(0,jsx_runtime.jsx)(Utilities,{}),(0,jsx_runtime.jsx)(Base,{})]}))};NoNav.storyName="No navigation";var CustomTheme=function CustomTheme(args){return(0,jsx_runtime.jsxs)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:[(0,jsx_runtime.jsx)(Footer.Navigation,{children:createArray(8).map((function(index){return(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Nav item"},index)}))}),(0,jsx_runtime.jsx)(Utilities,{}),(0,jsx_runtime.jsx)(Base,{})]}))};CustomTheme.storyName="Custom theme",CustomTheme.args={theme:{"--footer-background":"var(--color-engel)","--footer-color":"var(--color-black-90)","--footer-divider-color":"var(--color-black-90)","--footer-focus-outline-color":"var(--color-black-90)"}},CustomTheme.argTypes={theme:{control:{type:"object"}}};var Sitemap=function Sitemap(args){return(0,jsx_runtime.jsxs)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:[(0,jsx_runtime.jsx)(Footer.Navigation,{children:createArray(4).map((function(index){return(0,jsx_runtime.jsx)(Footer.NavigationGroup,{headingLink:(0,jsx_runtime.jsx)(Footer.GroupHeading,{href:"https://yourpath.com",label:"Main Page"}),children:createArray(6).map((function(subIndex){return(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Sub page",subItem:!0},subIndex)}))},index)}))}),(0,jsx_runtime.jsx)(Utilities,{}),(0,jsx_runtime.jsx)(Base,{})]}))},Example=function Example(args){return(0,jsx_runtime.jsxs)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({footerProps:{lang:"fi"}},args),{},{children:[(0,jsx_runtime.jsxs)(Footer.Navigation,{children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"https://asiointi.hel.fi/wps/portal/login?locale=fi",label:"Sähköinen asiointi"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://palvelukartta.hel.fi/",label:"Palvelut kartalla"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/yritystenhelsinki",label:"Yritysten Helsinki"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/rekry/fi",label:"Avoimet työpaikat"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://helsinkikanava.fi/fi_FI/",label:"Videoita kaupungista"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://helmet.fi/",label:"Kirjastot verkossa"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://reittiopas.fi/",label:"Reittiopas"})]}),(0,jsx_runtime.jsxs)(Footer.Utilities,{soMeSectionProps:{"aria-label":"Helsinki sosiaalisessa mediassa"},soMeLinks:[(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Facebook-tili",ariaLabel:"Helsingin kaupungin Facebook-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconFacebook.IconFacebook,{"aria-hidden":"true"}),href:"https://facebook.com/helsinginkaupunki/"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Twitter-tili",ariaLabel:"Helsingin kaupungin Twitter-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconTwitter.IconTwitter,{"aria-hidden":"true"}),href:"https://twitter.com/helsinki"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Instagram-tili",ariaLabel:"Helsingin kaupungin Instagram-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconInstagram.IconInstagram,{"aria-hidden":"true"}),href:"https://instagram.com/helsinki/"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin LinkedIn-tili",ariaLabel:"Helsingin kaupungin LinkedIn-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconLinkedin.IconLinkedin,{"aria-hidden":"true"}),href:"https://linkedin.com/company/city-of-helsinki"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Youtube-tili",ariaLabel:"Helsingin kaupungin Youtube-tili",external:!0,openInNewTab:!0,icon:(0,jsx_runtime.jsx)(IconYoutube.IconYoutube,{"aria-hidden":"true"}),href:"https://youtube.com/channel/UCzJFvpjRB62oRoep4oRgwjg"})],children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/helsinki/fi/kaupunki-ja-hallinto/osallistu-ja-vaikuta/ota-yhteytta/ota-yhteytta",label:"Yhteystiedot"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/helsinki/fi/kaupunki-ja-hallinto/osallistu-ja-vaikuta/palaute/anna-palautetta",label:"Anna ja lue palautetta"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/kanslia/neuvonta-fi",label:"Chat-neuvonta"})]}),(0,jsx_runtime.jsxs)(Footer.Base,{copyrightHolder:"Helsingin kaupunki",copyrightText:"Kaikki oikeudet pidetään",backToTopLabel:"Sivun alkuun",children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/helsinki/fi/kaupunki-ja-hallinto/tietoa-helsingista/tietoa-hel-fista/",label:"Tietoa palvelusta"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://www.hel.fi/helsinki/fi/kaupunki-ja-hallinto/tietoa-helsingista/saavutettavuus/saavutettavuus-helfi-sivustolla/",label:"Saavutettavuusseloste"})]})]}))},UtilityGroups=function UtilityGroups(args){return(0,jsx_runtime.jsxs)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({footerProps:{lang:"fi"}},args),{},{children:[(0,jsx_runtime.jsxs)(Footer.Navigation,{children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"https://asiointi.hel.fi/wps/portal/login?locale=fi",label:"Sähköinen asiointi"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://palvelukartta.hel.fi/",label:"Palvelut kartalla"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/yritystenhelsinki",label:"Yritysten Helsinki"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/rekry/fi",label:"Avoimet työpaikat"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://helsinkikanava.fi/fi_FI/",label:"Videoita kaupungista"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://helmet.fi/",label:"Kirjastot verkossa"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://reittiopas.fi/",label:"Reittiopas"})]}),(0,jsx_runtime.jsxs)(Footer.Utilities,{children:[createArray(3).map((function(index){return(0,jsx_runtime.jsx)(Footer.UtilityGroup,{headingLink:(0,jsx_runtime.jsx)(Footer.GroupHeading,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Group heading link"}),children:createArray(6).map((function(subIndex){return(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Group link"},subIndex)}))},index)})),(0,jsx_runtime.jsxs)(Footer.UtilityGroup,{headingLink:(0,jsx_runtime.jsx)(Footer.GroupHeading,{label:"Social media"}),children:[(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Facebook-tili",label:"Facebook",ariaLabel:"Helsingin kaupungin Facebook-tili",openInNewTabAriaLabel:"Avautuu uudessa välilehdessä.",openInExternalDomainAriaLabel:"Siirtyy toiseen sivustoon.",icon:(0,jsx_runtime.jsx)(IconFacebook.IconFacebook,{"aria-hidden":"true"}),href:"https://facebook.com/helsinginkaupunki/"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Facebook-tili",label:"Facebook",ariaLabel:"Helsingin kaupungin Facebook-tili",openInNewTabAriaLabel:"Avautuu uudessa välilehdessä.",openInExternalDomainAriaLabel:"Siirtyy toiseen sivustoon.",icon:(0,jsx_runtime.jsx)(IconFacebook.IconFacebook,{"aria-hidden":"true"}),href:"https://facebook.com/helsinginkaupunki/"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Twitter-tili",label:"Twitter",ariaLabel:"Helsingin kaupungin Twitter-tili",openInNewTabAriaLabel:"Avautuu uudessa välilehdessä.",openInExternalDomainAriaLabel:"Siirtyy toiseen sivustoon.",icon:(0,jsx_runtime.jsx)(IconTwitter.IconTwitter,{"aria-hidden":"true"}),href:"https://twitter.com/helsinki"}),(0,jsx_runtime.jsx)(Footer.Link,{title:"Helsingin kaupungin Instagram-tili",label:"Instagram",ariaLabel:"Helsingin kaupungin Instagram-tili",openInNewTabAriaLabel:"Avautuu uudessa välilehdessä.",openInExternalDomainAriaLabel:"Siirtyy toiseen sivustoon.",icon:(0,jsx_runtime.jsx)(IconInstagram.IconInstagram,{"aria-hidden":"true"}),href:"https://instagram.com/helsinki/"})]},6)]}),(0,jsx_runtime.jsxs)(Footer.Base,{copyrightHolder:"Helsingin kaupunki",copyrightText:"Kaikki oikeudet pidetään",backToTopLabel:"Sivun alkuun",children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"https://hel.fi/helsinki/fi/kaupunki-ja-hallinto/tietoa-helsingista/tietoa-hel-fista/",label:"Tietoa palvelusta"}),(0,jsx_runtime.jsx)(Footer.Link,{href:"https://www.hel.fi/helsinki/fi/kaupunki-ja-hallinto/tietoa-helsingista/saavutettavuus/saavutettavuus-helfi-sivustolla/",label:"Saavutettavuusseloste"})]})]}))},CustomSection=function CustomSection(args){return(0,jsx_runtime.jsxs)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:[(0,jsx_runtime.jsx)(Footer.Navigation,{children:createArray(8).map((function(index){return(0,jsx_runtime.jsx)(Footer.Link,{href:"https://google.com",onClick:function onClick(e){return e.preventDefault()},label:"Nav item"},index)}))}),(0,jsx_runtime.jsx)(Utilities,{}),(0,jsx_runtime.jsxs)(Footer.Custom,{children:[(0,jsx_runtime.jsx)(Footer.GroupHeading,{label:"Partners",id:"partners"}),(0,jsx_runtime.jsxs)("div",{"aria-label":"partners",style:{display:"flex",flexDirection:"row",gap:"12px 24px",flexWrap:"wrap",marginTop:"8px"},children:[(0,jsx_runtime.jsx)(Footer.Link,{href:"www.google.com",label:"Partner 1",external:!0,openInNewTab:!0}),(0,jsx_runtime.jsx)(Footer.Link,{href:"www.google.com",label:"Partner 1",external:!0,openInNewTab:!0}),(0,jsx_runtime.jsx)(Footer.Link,{href:"www.google.com",label:"Partner 1",external:!0,openInNewTab:!0})]})]}),(0,jsx_runtime.jsx)(Base,{})]}))},Minimal=function Minimal(args){return(0,jsx_runtime.jsx)(Footer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(Footer.Base,{backToTopLabel:"Back to top"})}))};NoNav.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => (\n
\n \n \n
\n)"}},NoNav.parameters),CustomTheme.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => (\n
\n \n {createArray(8).map((index) => (\n e.preventDefault()} label="Nav item" />\n ))}\n \n \n \n
\n)'}},CustomTheme.parameters),Sitemap.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => (\n
\n \n {createArray(4).map((index) => (\n }\n >\n {createArray(6).map((subIndex) => {\n return (\n e.preventDefault()}\n label="Sub page"\n subItem\n />\n );\n })}\n \n ))}\n \n \n \n
\n)'}},Sitemap.parameters),Example.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => (\n
\n \n \n \n \n \n \n \n \n \n
\n)'}},Example.parameters),UtilityGroups.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => (\n
\n \n \n \n \n \n \n \n \n \n \n {createArray(3).map((index) => (\n e.preventDefault()}\n label="Group heading link"\n />\n }\n >\n {createArray(6).map((subIndex) => {\n return (\n e.preventDefault()}\n label="Group link"\n />\n );\n })}\n \n ))}\n }>\n \n \n \n \n \n \n
\n)'}},UtilityGroups.parameters),CustomSection.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => (\n
\n \n {createArray(8).map((index) => (\n e.preventDefault()} label="Nav item" />\n ))}\n \n \n \n \n \n \n \n \n \n \n \n
\n)'}},CustomSection.parameters),Minimal.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => (\n
\n \n
\n)'}},Minimal.parameters);try{NoNav.displayName="NoNav",NoNav.__docgenInfo={description:"",displayName:"NoNav",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#NoNav"]={docgenInfo:NoNav.__docgenInfo,name:"NoNav",path:"src/components/footer/Footer.stories.tsx#NoNav"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/footer/Footer.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}try{Sitemap.displayName="Sitemap",Sitemap.__docgenInfo={description:"",displayName:"Sitemap",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#Sitemap"]={docgenInfo:Sitemap.__docgenInfo,name:"Sitemap",path:"src/components/footer/Footer.stories.tsx#Sitemap"})}catch(__react_docgen_typescript_loader_error){}try{Example.displayName="Example",Example.__docgenInfo={description:"",displayName:"Example",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#Example"]={docgenInfo:Example.__docgenInfo,name:"Example",path:"src/components/footer/Footer.stories.tsx#Example"})}catch(__react_docgen_typescript_loader_error){}try{UtilityGroups.displayName="UtilityGroups",UtilityGroups.__docgenInfo={description:"",displayName:"UtilityGroups",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#UtilityGroups"]={docgenInfo:UtilityGroups.__docgenInfo,name:"UtilityGroups",path:"src/components/footer/Footer.stories.tsx#UtilityGroups"})}catch(__react_docgen_typescript_loader_error){}try{CustomSection.displayName="CustomSection",CustomSection.__docgenInfo={description:"",displayName:"CustomSection",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#CustomSection"]={docgenInfo:CustomSection.__docgenInfo,name:"CustomSection",path:"src/components/footer/Footer.stories.tsx#CustomSection"})}catch(__react_docgen_typescript_loader_error){}try{Minimal.displayName="Minimal",Minimal.__docgenInfo={description:"",displayName:"Minimal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/footer/Footer.stories.tsx#Minimal"]={docgenInfo:Minimal.__docgenInfo,name:"Minimal",path:"src/components/footer/Footer.stories.tsx#Minimal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/header/Header.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Minimal:()=>Minimal,MinimalWithLocalization:()=>MinimalWithLocalization,WithFullFeatures:()=>WithFullFeatures,WithFullFeaturesDarkTheme:()=>WithFullFeaturesDarkTheme,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@storybook/addon-actions/dist/esm/index.js"),_Header__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/header/Header.tsx"),_components_headerUniversalBar_HeaderUniversalBar__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/header/components/headerUniversalBar/HeaderUniversalBar.tsx"),_components_headerActionBar_HeaderActionBar__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/header/components/headerActionBar/HeaderActionBar.tsx"),_components_headerLink_HeaderLink__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/header/components/headerLink/HeaderLink.tsx"),_components_headerNavigationMenu__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/header/components/headerNavigationMenu/HeaderNavigationMenu.tsx"),_icons__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/icons/IconSearch.tsx"),_icons__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/icons/IconUser.tsx"),_link_Link__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/components/link/Link.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Header__WEBPACK_IMPORTED_MODULE_3__.h,title:"Components/Header",subcomponents:{HeaderUniversalBar:_components_headerUniversalBar_HeaderUniversalBar__WEBPACK_IMPORTED_MODULE_4__.V,HeaderNavigationMenu:_components_headerNavigationMenu__WEBPACK_IMPORTED_MODULE_5__.p,HeaderActionBar:_components_headerActionBar_HeaderActionBar__WEBPACK_IMPORTED_MODULE_6__.K,HeaderLink:_components_headerLink_HeaderLink__WEBPACK_IMPORTED_MODULE_7__.K},parameters:{storySource:{source:'import React, { useState } from \'react\';\nimport { action } from \'@storybook/addon-actions\';\n\nimport { Header } from \'./Header\';\nimport { HeaderUniversalBar } from \'./components/headerUniversalBar/HeaderUniversalBar\';\nimport { HeaderActionBar } from \'./components/headerActionBar/HeaderActionBar\';\nimport { HeaderLink } from \'./components/headerLink/HeaderLink\';\nimport { HeaderNavigationMenu } from \'./components/headerNavigationMenu\';\nimport { LanguageOption } from \'./LanguageContext\';\nimport { IconSearch, IconUser } from \'../../icons\';\nimport { Link } from \'../link/Link\';\n\nexport default {\n component: Header,\n title: \'Components/Header\',\n subcomponents: {\n HeaderUniversalBar,\n HeaderNavigationMenu,\n HeaderActionBar,\n HeaderLink,\n },\n parameters: {\n controls: { expanded: true },\n layout: \'fullscreen\',\n },\n args: {},\n};\n\nconst languageChangedAction = action(\'language:onChange\');\nconst searchSubmitAction = action(\'search:onSubmit\');\nconst searchChangeAction = action(\'search:onChange\');\n\nconst languages: LanguageOption[] = [\n { label: \'Suomi\', value: \'fi\' },\n { label: \'Svenska\', value: \'sv\' },\n { label: \'English\', value: \'en\' },\n];\n\nexport const WithFullFeatures = (args) => (\n <>\n
\n \n \n \n \n \n \n\n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n } id="action-bar-search">\n \n \n \n\n \n event.preventDefault()}\n openDropdownAriaButtonLabel="Avaa Sosiaali- ja terveyspalvelut alavalikko"\n closeDropdownAriaButtonLabel="Sulje Sosiaali- ja terveyspalvelut alavalikko"\n dropdownLinks={[\n ,\n ,\n ]}\n />,\n ,\n ,\n ]}\n />,\n ]}\n />\n ,\n ,\n ]}\n />,\n ,\n ,\n ,\n ]}\n />,\n ]}\n />\n , ]}\n />,\n ]}\n />,\n ]}\n />\n \n
\n \n);\n\nexport const WithFullFeaturesDarkTheme = (args) => (\n <>\n
\n \n \n \n \n \n \n\n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n } id="action-bar-search">\n \n \n \n\n \n event.preventDefault()}\n active\n dropdownLinks={[\n ,\n ,\n ]}\n />,\n ,\n ,\n ]}\n />,\n ]}\n />\n ,\n ,\n ]}\n />,\n ,\n ,\n ,\n ]}\n />,\n ]}\n />\n , ]}\n />,\n ]}\n />,\n ]}\n />\n \n
\n \n);\n\nWithFullFeaturesDarkTheme.args = {\n theme: \'dark\',\n};\n\nexport const Minimal = (args) => {\n return (\n
\n \n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n } id="action-bar-search">\n \n \n } id="action-bar-login">\n

Kirjautumisvalinnat

\n
\n \n\n \n \n \n \n \n
\n );\n};\n\nexport const MinimalWithLocalization = (args) => {\n const [lang, setLang] = useState(\'fi\');\n\n const translations = {\n en: {\n \'header-title\': \'Helsinki city\',\n \'header-aria-label\': \'Helsinki city\',\n \'header-login\': \'Login\',\n \'header-search\': \'Search\',\n \'header-menu-title\': \'Other languages\',\n \'front-page\': \'Huvudsida\',\n },\n fi: {\n \'header-title\': \'Helsingin kaupunki\',\n \'header-aria-label\': \'Helsingin kaupunki\',\n \'header-login\': \'Kirjaudu\',\n \'header-search\': \'Haku\',\n \'header-menu-title\': \'Tietoa muilla kielillä\',\n \'front-page\': \'Etusivu\',\n },\n sv: {\n \'header-title\': \'Helsingfors Stad\',\n \'header-aria-label\': \'Helsingfors Stad\',\n \'header-login\': \'Logga in\',\n \'header-search\': \'Sök\',\n \'header-menu-title\': \'Andra språk\',\n \'front-page\': \'Home\',\n },\n };\n\n const languageChangedAction2 = (lg: string) => setLang(lg);\n\n return (\n
\n \n \n \n

{translations[lang][\'header-menu-title\']}

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n }\n id="action-bar-search"\n >\n \n \n }\n id="action-bar-login"\n >\n

Kirjautumisvalinnat

\n \n \n\n \n \n \n \n \n
\n );\n};\n',locationsMap:{"with-full-features":{startLoc:{col:32,line:39},endLoc:{col:1,line:157},startBody:{col:32,line:39},endBody:{col:1,line:157}},"with-full-features-dark-theme":{startLoc:{col:41,line:159},endLoc:{col:1,line:261},startBody:{col:41,line:159},endBody:{col:1,line:261}},minimal:{startLoc:{col:23,line:267},endLoc:{col:1,line:302},startBody:{col:23,line:267},endBody:{col:1,line:302}},"minimal-with-localization":{startLoc:{col:39,line:304},endLoc:{col:1,line:384},startBody:{col:39,line:304},endBody:{col:1,line:384}}}},controls:{expanded:!0},layout:"fullscreen"},args:{}};var languageChangedAction=(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("language:onChange"),searchSubmitAction=(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("search:onSubmit"),searchChangeAction=(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("search:onChange"),languages=[{label:"Suomi",value:"fi"},{label:"Svenska",value:"sv"},{label:"English",value:"en"}],WithFullFeatures=function WithFullFeatures(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{onDidChangeLanguage:languageChangedAction,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.SkipLink,{skipTo:"#content",label:"Skip To Content"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.UniversalBar,{primaryLinkText:"Helsingin kaupunki",primaryLinkHref:"#",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Uutiset"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Asioi verkossa"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Anna palautetta"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBar,{title:"Helsingin kaupunki",frontPageLabel:"Etusivu",titleAriaLabel:"Helsingin kaupunki",titleHref:"https://hel.fi",logoAriaLabel:"Service logo",logoHref:"https://hel.fi",menuButtonAriaLabel:"Menu",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.LanguageSelector,{languages,ariaLabel:"Kielen valinta",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"Tietoa muilla kielillä"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Selkosuomi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Viittomakieli"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBarItem,{label:"Haku",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_10__.IconSearch,{}),id:"action-bar-search",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Search,{label:"Hae palvelusta",onChange:searchChangeAction,onSubmit:searchSubmitAction})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.NavigationMenu,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Sosiaali- ja terveyspalvelut",onClick:function onClick(event){return event.preventDefault()},openDropdownAriaButtonLabel:"Avaa Sosiaali- ja terveyspalvelut alavalikko",closeDropdownAriaButtonLabel:"Sulje Sosiaali- ja terveyspalvelut alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Terveydenhoito",openDropdownAriaButtonLabel:"Avaa Terveydenhoito alavalikko",closeDropdownAriaButtonLabel:"Sulje Terveydenhoito alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Hammashoito"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Julkinen terveydenhoito"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Senioripalvelut",openDropdownAriaButtonLabel:"Avaa Senioripalvelut alavalikko",closeDropdownAriaButtonLabel:"Sulje Senioripalvelut alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Viriketoiminta"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kuntouttavat palvelut"})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kasvatus ja koulutus",openDropdownAriaButtonLabel:"Avaa Kasvatus ja koulutus alavalikko",closeDropdownAriaButtonLabel:"Sulje Kasvatus ja koulutus alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kasvatus",openDropdownAriaButtonLabel:"Avaa Kasvatus alavalikko",closeDropdownAriaButtonLabel:"Sulje Kasvatus alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Varhaiskasvatus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Esiopetus"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Koulutus",openDropdownAriaButtonLabel:"Avaa Koulutus alavalikko",closeDropdownAriaButtonLabel:"Sulje Koulutus alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Perusopetus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Toisen asteen koulutus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Työväenopistot"})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Yritykset ja työ",openDropdownAriaButtonLabel:"Avaa Yritykset ja työ alavalikko",closeDropdownAriaButtonLabel:"Sulje Yritykset ja työ alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Työnantajat",openDropdownAriaButtonLabel:"Avaa Työnantajat alavalikko",closeDropdownAriaButtonLabel:"Sulje Työnantajat alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Yritykset"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Yrittäjät"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Työntekijät",openDropdownAriaButtonLabel:"Avaa Työntekijät alavalikko",closeDropdownAriaButtonLabel:"Sulje Työntekijät alavalikko",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Avoimet työpaikat"})]})]})]})]}))})},WithFullFeaturesDarkTheme=function WithFullFeaturesDarkTheme(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{onDidChangeLanguage:languageChangedAction,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.SkipLink,{skipTo:"#content",label:"Skip To Content"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.UniversalBar,{primaryLinkText:"Helsingin kaupunki",primaryLinkHref:"#",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Uutiset"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Asioi verkossa"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Anna palautetta"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBar,{title:"Helsingin kaupunki",frontPageLabel:"Etusivu",titleAriaLabel:"Helsingin kaupunki",titleHref:"https://hel.fi",logoAriaLabel:"Service logo",logoHref:"https://hel.fi",menuButtonAriaLabel:"Menu",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.LanguageSelector,{languages,ariaLabel:"Kielen valinta",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"Tietoa muilla kielillä"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Selkosuomi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Viittomakieli"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBarItem,{label:"Haku",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_10__.IconSearch,{}),id:"action-bar-search",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Search,{label:"Hae palvelusta",onChange:searchChangeAction,onSubmit:searchSubmitAction})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.NavigationMenu,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Sosiaali- ja terveyspalvelut",onClick:function onClick(event){return event.preventDefault()},active:!0,dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",active:!0,label:"Terveydenhoito",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{active:!0,href:"#",label:"Hammashoito"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Julkinen terveydenhoito"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Senioripalvelut",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Viriketoiminta"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kuntouttavat palvelut"})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kasvatus ja koulutus",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kasvatus",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Varhaiskasvatus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Esiopetus"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Koulutus",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Perusopetus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Toisen asteen koulutus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Työväenopistot"})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Yritykset ja työ",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Työnantajat",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Yritykset"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Yrittäjät"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Työntekijät",dropdownLinks:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Avoimet työpaikat"})]})]})]})]}))})};WithFullFeaturesDarkTheme.args={theme:"dark"};var Minimal=function Minimal(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{onDidChangeLanguage:languageChangedAction,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.SkipLink,{skipTo:"#content",label:"Skip To Content"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBar,{title:"Helsingin kaupunki",titleAriaLabel:"Helsingin kaupunki",titleHref:"https://hel.fi",frontPageLabel:"Etusivu",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.LanguageSelector,{languages,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"Tietoa muilla kielillä"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Selkosuomi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Viittomakieli"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBarItem,{label:"Haku",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_10__.IconSearch,{}),id:"action-bar-search",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Search,{onChange:searchChangeAction,onSubmit:searchSubmitAction,label:"Haku"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBarItem,{label:"Kirjaudu",fixedRightPosition:!0,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconUser,{}),id:"action-bar-login",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"Kirjautumisvalinnat"})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.NavigationMenu,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Sosiaali- ja terveyspalvelut"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kasvatus ja koulutus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Asuminen"})]})]}))},MinimalWithLocalization=function MinimalWithLocalization(args){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("fi"),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__.Z)(_useState,2),lang=_useState2[0],setLang=_useState2[1],translations={en:{"header-title":"Helsinki city","header-aria-label":"Helsinki city","header-login":"Login","header-search":"Search","header-menu-title":"Other languages","front-page":"Huvudsida"},fi:{"header-title":"Helsingin kaupunki","header-aria-label":"Helsingin kaupunki","header-login":"Kirjaudu","header-search":"Haku","header-menu-title":"Tietoa muilla kielillä","front-page":"Etusivu"},sv:{"header-title":"Helsingfors Stad","header-aria-label":"Helsingfors Stad","header-login":"Logga in","header-search":"Sök","header-menu-title":"Andra språk","front-page":"Home"}};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{onDidChangeLanguage:function languageChangedAction2(lg){return setLang(lg)},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.SkipLink,{skipTo:"#content",label:"Skip To Content"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBar,{title:translations[lang]["header-title"],titleAriaLabel:translations[lang]["header-aria-label"],titleHref:"https://hel.fi",frontPageLabel:translations[lang]["front-page"],children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.LanguageSelector,{languages,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:translations[lang]["header-menu-title"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Selkosuomi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_link_Link__WEBPACK_IMPORTED_MODULE_9__.r,{external:!0,href:"www.example.com",children:"Viittomakieli"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBarItem,{fullWidth:!0,label:translations[lang]["header-search"],icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_10__.IconSearch,{}),id:"action-bar-search",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Search,{onChange:searchChangeAction,onSubmit:searchSubmitAction,label:translations[lang]["header-search"]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.ActionBarItem,{label:translations[lang]["header-login"],fixedRightPosition:!0,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconUser,{}),id:"action-bar-login",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"Kirjautumisvalinnat"})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.NavigationMenu,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Sosiaali- ja terveyspalvelut"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Kasvatus ja koulutus"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_3__.h.Link,{href:"#",label:"Asuminen"})]})]}))};WithFullFeatures.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:'(args) => (\n <>\n
\n \n \n \n \n \n \n\n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n } id="action-bar-search">\n \n \n \n\n \n event.preventDefault()}\n openDropdownAriaButtonLabel="Avaa Sosiaali- ja terveyspalvelut alavalikko"\n closeDropdownAriaButtonLabel="Sulje Sosiaali- ja terveyspalvelut alavalikko"\n dropdownLinks={[\n ,\n ,\n ]}\n />,\n ,\n ,\n ]}\n />,\n ]}\n />\n ,\n ,\n ]}\n />,\n ,\n ,\n ,\n ]}\n />,\n ]}\n />\n , ]}\n />,\n ]}\n />,\n ]}\n />\n \n
\n \n)'}},WithFullFeatures.parameters),WithFullFeaturesDarkTheme.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:'(args) => (\n <>\n
\n \n \n \n \n \n \n\n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n } id="action-bar-search">\n \n \n \n\n \n event.preventDefault()}\n active\n dropdownLinks={[\n ,\n ,\n ]}\n />,\n ,\n ,\n ]}\n />,\n ]}\n />\n ,\n ,\n ]}\n />,\n ,\n ,\n ,\n ]}\n />,\n ]}\n />\n , ]}\n />,\n ]}\n />,\n ]}\n />\n \n
\n \n)'}},WithFullFeaturesDarkTheme.parameters),Minimal.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n

Tietoa muilla kielillä

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n } id="action-bar-search">\n \n \n } id="action-bar-login">\n

Kirjautumisvalinnat

\n
\n \n\n \n \n \n \n \n
\n );\n}'}},Minimal.parameters),MinimalWithLocalization.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"(args) => {\n const [lang, setLang] = useState('fi');\n\n const translations = {\n en: {\n 'header-title': 'Helsinki city',\n 'header-aria-label': 'Helsinki city',\n 'header-login': 'Login',\n 'header-search': 'Search',\n 'header-menu-title': 'Other languages',\n 'front-page': 'Huvudsida',\n },\n fi: {\n 'header-title': 'Helsingin kaupunki',\n 'header-aria-label': 'Helsingin kaupunki',\n 'header-login': 'Kirjaudu',\n 'header-search': 'Haku',\n 'header-menu-title': 'Tietoa muilla kielillä',\n 'front-page': 'Etusivu',\n },\n sv: {\n 'header-title': 'Helsingfors Stad',\n 'header-aria-label': 'Helsingfors Stad',\n 'header-login': 'Logga in',\n 'header-search': 'Sök',\n 'header-menu-title': 'Andra språk',\n 'front-page': 'Home',\n },\n };\n\n const languageChangedAction2 = (lg: string) => setLang(lg);\n\n return (\n
\n \n \n \n

{translations[lang]['header-menu-title']}

\n \n Selkosuomi\n \n \n Viittomakieli\n \n
\n\n }\n id=\"action-bar-search\"\n >\n \n \n }\n id=\"action-bar-login\"\n >\n

Kirjautumisvalinnat

\n \n \n\n \n \n \n \n \n
\n );\n}"}},MinimalWithLocalization.parameters);try{WithFullFeatures.displayName="WithFullFeatures",WithFullFeatures.__docgenInfo={description:"",displayName:"WithFullFeatures",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header/Header.stories.tsx#WithFullFeatures"]={docgenInfo:WithFullFeatures.__docgenInfo,name:"WithFullFeatures",path:"src/components/header/Header.stories.tsx#WithFullFeatures"})}catch(__react_docgen_typescript_loader_error){}try{WithFullFeaturesDarkTheme.displayName="WithFullFeaturesDarkTheme",WithFullFeaturesDarkTheme.__docgenInfo={description:"",displayName:"WithFullFeaturesDarkTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header/Header.stories.tsx#WithFullFeaturesDarkTheme"]={docgenInfo:WithFullFeaturesDarkTheme.__docgenInfo,name:"WithFullFeaturesDarkTheme",path:"src/components/header/Header.stories.tsx#WithFullFeaturesDarkTheme"})}catch(__react_docgen_typescript_loader_error){}try{Minimal.displayName="Minimal",Minimal.__docgenInfo={description:"",displayName:"Minimal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header/Header.stories.tsx#Minimal"]={docgenInfo:Minimal.__docgenInfo,name:"Minimal",path:"src/components/header/Header.stories.tsx#Minimal"})}catch(__react_docgen_typescript_loader_error){}try{MinimalWithLocalization.displayName="MinimalWithLocalization",MinimalWithLocalization.__docgenInfo={description:"",displayName:"MinimalWithLocalization",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header/Header.stories.tsx#MinimalWithLocalization"]={docgenInfo:MinimalWithLocalization.__docgenInfo,name:"MinimalWithLocalization",path:"src/components/header/Header.stories.tsx#MinimalWithLocalization"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/hero/Hero.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AllHeroes:()=>AllHeroes,BackgroundImage:()=>BackgroundImage,DiagonalKoros:()=>DiagonalKoros,EmbeddedToPage:()=>EmbeddedToPage,ImageBottom:()=>ImageBottom,ImageLeft:()=>ImageLeft,ImageRight:()=>ImageRight,PlaygroundForKoros:()=>PlaygroundForKoros,PlaygroundForTheme:()=>PlaygroundForTheme,WithoutImage:()=>WithoutImage,WithoutImageAndKoros:()=>WithoutImageAndKoros,WithoutImageKorosOverlay:()=>WithoutImageKorosOverlay,default:()=>Hero_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),defineProperty=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),objectWithoutProperties=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"));__webpack_require__("./src/styles/base.css");const Hero_module={"large-up":"only screen and (min-width: 992px)",hero:"Hero_hero__pPV-s hero_hds-hero__mpYBf",title:"Hero_title__0riIs hero_hds-hero__title__o-vId",text:"Hero_text__tKE+X hero_hds-hero__text__O1feG",container:"Hero_container__X5qLO hero_hds-hero__container__OFZF6",content:"Hero_content__klxe- hero_hds-hero__content__g152N",singleColumn:"Hero_singleColumn__MGHpX hero_hds-hero__content--single-column__PXJRa",twoColumns:"Hero_twoColumns__8zVOk hero_hds-hero__content--two-columns__WU2sJ",twoColumnsImageContainer:"Hero_twoColumnsImageContainer__EIXxa hero_hds-hero__content--two-columns__image-container__CCT+o",card:"Hero_card__jI0-y hero_hds-hero__card__tEpO9",centeredContent:"Hero_centeredContent__5ZUhw hero_hds-hero__card--centered-content__LmI+u",image:"Hero_image__7lTXb hero_hds-hero__image__9aYZd",imageBelowKoros:"Hero_imageBelowKoros__iQl-j hero_hds-hero__image-below-koros__K+jPn",withBackgroundContainer:"Hero_withBackgroundContainer__uL45a hero_hds-hero--with-background__container__qeWA4",withBackgroundBackground:"Hero_withBackgroundBackground__zD10B hero_hds-hero--with-background__background__ddu6y",backgroundImage:"Hero_backgroundImage__ezRhh hero_hds-hero--background-image__rJkML",backgroundImageKoros:"Hero_backgroundImageKoros__UDiFT hero_hds-hero--background-image__koros__-rcMC",diagonalKoros:"Hero_diagonalKoros__VkZ4o hero_hds-hero--diagonal-koros__sQEyP",diagonalKorosWithBackgroundContainer:"Hero_diagonalKorosWithBackgroundContainer__xCw1M hero_hds-hero--diagonal-koros__sQEyP hero_hds-hero--with-background__container__qeWA4",diagonalKorosAndBackground:"Hero_diagonalKorosAndBackground__LRN6q hero_hds-hero--diagonal-koros__koros-and-background__VaJ1L",contentColums:"Hero_contentColums__2SJjX hero_hds-hero--with-background__content-columns__Ceek0",emptyColumn:"Hero_emptyColumn__vQqms hero_hds-hero--with-background__empty-column__Zx-VW",imageLeft:"Hero_imageLeft__oeDh+ hero_hds-hero--image-left__V4wF4",imageRight:"Hero_imageRight__NgWoL hero_hds-hero--image-right__mwVcG",korosContainer:"Hero_korosContainer__Ktzlt hero_hds-hero__koros-container__A2gNI",korosContainerInwardKoros:"Hero_korosContainerInwardKoros__s0qdz hero_hds-hero__koros-container--inward-koros__CffRO",korosContainerOverflowBottom:"Hero_korosContainerOverflowBottom__uTKk6 hero_hds-hero__koros-container--overflow-bottom__L-oFy",korosAndImageContainer:"Hero_korosAndImageContainer__UvQT3 hero_hds-hero__koros-and-image-container__aB6W-",korosAligner:"Hero_korosAligner__E3AX2 hero_hds-hero--diagonal-koros__koros-aligner__UHSoi"};var classNames=__webpack_require__("./src/utils/classNames.ts"),useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),Koros=__webpack_require__("./src/components/koros/Koros.tsx"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["className","children"],Text=function Text(props){var className=props.className,children=props.children,elementProps=(0,objectWithoutProperties.Z)(props,_excluded),classList=(0,classNames.Z)(Hero_module.text,className);return(0,jsx_runtime.jsx)("p",(0,objectSpread2.Z)((0,objectSpread2.Z)({},elementProps),{},{className:classList,children}))};try{Text.displayName="Text",Text.__docgenInfo={description:"",displayName:"Text",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Text.tsx#Text"]={docgenInfo:Text.__docgenInfo,name:"Text",path:"src/components/hero/Text.tsx#Text"})}catch(__react_docgen_typescript_loader_error){}var Title_excluded=["headingLevel","className","children"],Title=function Title(props){var _props$headingLevel=props.headingLevel,headingLevel=void 0===_props$headingLevel?1:_props$headingLevel,className=props.className,children=props.children,elementProps=(0,objectWithoutProperties.Z)(props,Title_excluded),classList=(0,classNames.Z)(Hero_module.title,className),TagName="h".concat(headingLevel);return(0,jsx_runtime.jsx)(TagName,(0,objectSpread2.Z)((0,objectSpread2.Z)({},elementProps),{},{className:classList,children}))};try{Title.displayName="Title",Title.__docgenInfo={description:"",displayName:"Title",props:{headingLevel:{defaultValue:{value:"1"},description:"Heading level",name:"headingLevel",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Title.tsx#Title"]={docgenInfo:Title.__docgenInfo,name:"Title",path:"src/components/hero/Title.tsx#Title"})}catch(__react_docgen_typescript_loader_error){}var Hero_excluded=["children","variant","imageSrc","centeredContent","theme","koros"],_excluded2=["inward","containerClassName","style"],Hero=function Hero(_ref){var children=_ref.children,variant=_ref.variant,imageSrc=_ref.imageSrc,centeredContent=_ref.centeredContent,theme=_ref.theme,koros=_ref.koros,elementAttributes=(0,objectWithoutProperties.Z)(_ref,Hero_excluded),editableTheme=(0,objectSpread2.Z)({},theme);if(editableTheme["--koros-color"]||(editableTheme["--koros-color"]="var(--background-color)"),"backgroundImage"===variant&&(editableTheme["--top-koros-color"]="var(--background-color)",editableTheme["--bottom-koros-color"]="var(--koros-color)"),!editableTheme["--koros-height"]){var korosHeight=(0,Koros.X)(koros||{});korosHeight&&(editableTheme["--koros-height"]="".concat(korosHeight,"px"))}var currentVariant=variant||(imageSrc?"imageLeft":"noImage"),customThemeClass=(0,useTheme.F)(Hero_module.hero,editableTheme),korosStyle=(0,objectSpread2.Z)((0,objectSpread2.Z)({},koros),{},{style:{fill:"var(--koros-color)"}}),heroElementAttributes=(0,objectSpread2.Z)((0,objectSpread2.Z)({},elementAttributes),{},{className:(0,classNames.Z)(Hero_module.hero,customThemeClass,Hero_module[currentVariant],elementAttributes.className)}),Image=function Image(){return(0,jsx_runtime.jsx)("img",{className:Hero_module.image,src:imageSrc,"aria-hidden":!0,alt:""})},ImageAsBackground=function ImageAsBackground(props){return(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(Hero_module.withBackgroundBackground,props&&props.className),children:(0,jsx_runtime.jsx)(Image,{})})},TwoColumsImage=function TwoColumsImage(){return(0,jsx_runtime.jsx)("div",{className:Hero_module.twoColumnsImageContainer,children:(0,jsx_runtime.jsx)(Image,{})},"imageContainer-".concat(currentVariant))},Content=function Content(){var classNameList=centeredContent?(0,classNames.Z)(Hero_module.card,Hero_module.centeredContent):(0,classNames.Z)(Hero_module.card);return(0,jsx_runtime.jsx)("div",{className:classNameList,children})},KorosInContainer=function KorosInContainer(props){var inward=props.inward,containerClassName=props.containerClassName,style=props.style,korosProps=(0,objectWithoutProperties.Z)(props,_excluded2),className=containerClassName||(!0!==inward?Hero_module.korosContainer:Hero_module.korosContainerInwardKoros);return(0,jsx_runtime.jsx)("div",{className,children:(0,jsx_runtime.jsx)(Koros.N,(0,objectSpread2.Z)({},(0,objectSpread2.Z)((0,objectSpread2.Z)({},korosProps),{},{style,shift:!1,compact:!1})))})};if("backgroundImage"===currentVariant)return(0,jsx_runtime.jsx)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({},heroElementAttributes),{},{children:(0,jsx_runtime.jsxs)("div",{className:Hero_module.withBackgroundContainer,children:[(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Hero_module.withBackgroundBackground),children:[(0,jsx_runtime.jsx)(Image,{}),(0,jsx_runtime.jsx)(KorosInContainer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},korosStyle),{},{containerClassName:Hero_module.backgroundImageKoros}))]}),(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Hero_module.content),children:[(0,jsx_runtime.jsx)(Content,{}),(0,jsx_runtime.jsx)("div",{className:Hero_module.emptyColumn})]})]})}));if("diagonalKoros"===currentVariant)return(0,jsx_runtime.jsx)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({},heroElementAttributes),{},{children:(0,jsx_runtime.jsxs)("div",{className:Hero_module.diagonalKorosWithBackgroundContainer,children:[(0,jsx_runtime.jsx)("div",{className:Hero_module.content,children:(0,jsx_runtime.jsxs)("div",{className:Hero_module.contentColums,children:[(0,jsx_runtime.jsx)(Content,{}),(0,jsx_runtime.jsx)("div",{className:Hero_module.emptyColumn})]})}),(0,jsx_runtime.jsx)("div",{className:Hero_module.korosAligner,children:(0,jsx_runtime.jsx)("div",{className:Hero_module.diagonalKorosAndBackground,children:(0,jsx_runtime.jsx)(KorosInContainer,(0,objectSpread2.Z)({},korosStyle))})}),(0,jsx_runtime.jsx)(ImageAsBackground,{className:Hero_module.diagonalKorosBackgroundContainer})]})}));var hideKoros=!(null==koros||!koros.hide),flipVertical=null==koros?void 0:koros.flipVertical,hasImage=!!imageSrc&&"noImage"!==currentVariant,columnStyle=hasImage&&"imageBottom"!==currentVariant?Hero_module.twoColumns:Hero_module.singleColumn;return(0,jsx_runtime.jsxs)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({},heroElementAttributes),{},{children:[(0,jsx_runtime.jsx)("div",{className:Hero_module.container,children:(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Hero_module.content,columnStyle),children:[hasImage&&"imageLeft"===currentVariant&&(0,jsx_runtime.jsx)(TwoColumsImage,{}),(0,jsx_runtime.jsx)(Content,{}),hasImage&&"imageRight"===currentVariant&&(0,jsx_runtime.jsx)(TwoColumsImage,{})]},"content")}),!hasImage&&!hideKoros&&(0,jsx_runtime.jsx)(KorosInContainer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},korosStyle),{},{inward:!flipVertical,flipVertical,containerClassName:flipVertical?Hero_module.korosContainerOverflowBottom:void 0})),hasImage&&(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Hero_module.korosAndImageContainer),children:[(0,jsx_runtime.jsx)(KorosInContainer,(0,objectSpread2.Z)((0,objectSpread2.Z)({},korosStyle),{},{flipVertical:!1!==flipVertical})),(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(Hero_module.imageBelowKoros),children:(0,jsx_runtime.jsx)(Image,{})},"imageContainer")]},"korosAndImageContainer")]}))};Hero.Title=Title,Hero.Text=Text;try{Hero.displayName="Hero",Hero.__docgenInfo={description:"",displayName:"Hero",props:{centeredContent:{defaultValue:null,description:"Should texts be centered. Use when there is no image.",name:"centeredContent",required:!1,type:{name:"boolean"}},imageSrc:{defaultValue:null,description:"Image source",name:"imageSrc",required:!1,type:{name:"string"}},koros:{defaultValue:null,description:'Koros properties. Accepts also boolean "hide", which hides the koros.\n@see KorosProps',name:"koros",required:!1,type:{name:'Omit & { hide?: boolean; }'}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"HeroCustomTheme"}},variant:{defaultValue:null,description:"Defines the hero variant",name:"variant",required:!1,type:{name:"enum",value:[{value:'"imageLeft"'},{value:'"imageRight"'},{value:'"backgroundImage"'},{value:'"imageBottom"'},{value:'"diagonalKoros"'},{value:'"noImage"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.tsx#Hero"]={docgenInfo:Hero.__docgenInfo,name:"Hero",path:"src/components/hero/Hero.tsx#Hero"})}catch(__react_docgen_typescript_loader_error){}try{Hero.Title.displayName="Hero.Title",Hero.Title.__docgenInfo={description:"",displayName:"Hero.Title",props:{headingLevel:{defaultValue:{value:"1"},description:"Heading level",name:"headingLevel",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.tsx#Hero.Title"]={docgenInfo:Hero.Title.__docgenInfo,name:"Hero.Title",path:"src/components/hero/Hero.tsx#Hero.Title"})}catch(__react_docgen_typescript_loader_error){}try{Hero.Text.displayName="Hero.Text",Hero.Text.__docgenInfo={description:"",displayName:"Hero.Text",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.tsx#Hero.Text"]={docgenInfo:Hero.Text.__docgenInfo,name:"Hero.Text",path:"src/components/hero/Hero.tsx#Hero.Text"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/button/Button.tsx"),placeholder_1920x1080=__webpack_require__("./src/assets/img/placeholder_1920x1080.jpg"),Navigation=__webpack_require__("./src/components/navigation/Navigation.tsx"),Section=__webpack_require__("./src/components/section/Section.tsx");const Hero_stories={component:Hero,title:"Components/Hero",parameters:{storySource:{source:"import React from 'react';\n\nimport { Hero, HeroCustomTheme, HeroProps } from './Hero';\nimport { Button } from '../button/Button';\n// @ts-ignore\nimport imageFile from '../../assets/img/placeholder_1920x1080.jpg';\nimport { Navigation } from '../navigation/Navigation';\nimport { Section } from '../section/Section';\n\nexport default {\n component: Hero,\n title: 'Components/Hero',\n parameters: {\n controls: { expanded: true },\n },\n args: {},\n};\n\ntype DefaultContentProps = {\n title?: string;\n text?: string;\n buttonTheme?: 'black' | 'white';\n};\n\nconst variantSelection = {\n defaultValue: 'noImage',\n control: {\n type: 'select',\n options: ['imageLeft', 'imageRight', 'backgroundImage', 'imageBottom', 'diagonalKoros', 'noImage'],\n },\n};\n\nconst korosPosition = {\n defaultValue: '45%',\n control: 'text',\n description: 'Position of the koros in the variant \"diagonalKoros\".',\n};\n\nconst defaultText =\n 'Nullam ut nunc consectetur, accumsan nunc sed, luctus nisl. Curabitur lacinia tristique est, sit amet egestas velit elementum sit amet. Nam lacinia volutpat erat vel faucibus.';\n\nconst imageLeftOrRightTheme = { '--background-color': '#c2a251', '--color': '#000' };\nconst noImageOptions = ['', 'Without image', 'Without image II', 'Without image and koros'];\n\nconst getThemePropertyDescriptionAsSummary = (themeVariable: string) => ({\n table: {\n type: {\n summary: `Storybook control for a theme variable, not an actual component property. Given value is set to theme property as \"${themeVariable}\".`,\n },\n },\n});\n\nconst getKorosPropertyDescriptionAsSummary = () => ({\n table: {\n type: {\n summary: `Storybook control for a koros property, not an actual component property. Given value is set to the \"koros\" property of the component.`,\n },\n },\n});\n\nconst getDisabledControl = (control: string, notUsed?: boolean) => {\n const description = notUsed\n ? `*** ${control} is not used in this variant ***`\n : `*** ${control} is not passed to the component in this story ***`;\n return {\n [control]: {\n description,\n control: false,\n table: {\n type: {\n summary: 'Disabled',\n },\n },\n },\n };\n};\n\nconst getDefaultArgs = (variant: HeroProps['variant'], preset?: string): HeroProps => {\n const defaultValuePicker = (args: Record) => {\n return Object.entries(args).reduce((currentObject, [prop, value]) => {\n if (value.defaultValue) {\n return {\n ...currentObject,\n [prop]: value.defaultValue,\n };\n }\n return currentObject;\n }, {});\n };\n \n if (variant === 'noImage') {\n if (preset === noImageOptions[1]) {\n return defaultValuePicker(WithoutImage.argTypes);\n }\n if (preset === noImageOptions[2]) {\n return defaultValuePicker(WithoutImageKorosOverlay.argTypes);\n }\n return defaultValuePicker(WithoutImageAndKoros.argTypes);\n }\n\n switch (variant) {\n case 'backgroundImage':\n return defaultValuePicker(BackgroundImage.argTypes);\n case 'imageLeft':\n return defaultValuePicker(ImageLeft.argTypes);\n case 'imageRight':\n return defaultValuePicker(ImageRight.argTypes);\n case 'imageBottom':\n return defaultValuePicker(ImageBottom.argTypes);\n case 'diagonalKoros':\n return defaultValuePicker(DiagonalKoros.argTypes);\n default:\n return {};\n }\n};\n\nconst defaultImageSrcArg = {\n imageSrc: {\n defaultValue: imageFile,\n control: 'text',\n },\n};\nconst createCenteredContentArg = (defaultValue: boolean) => ({\n centeredContent: {\n defaultValue,\n control: 'boolean',\n },\n});\nconst createThemeArg = (themeProps: HeroCustomTheme) => ({\n theme: {\n defaultValue: { ...themeProps },\n control: 'object',\n },\n});\n\nconst createKorosArg = (korosProps: HeroProps['koros']) => ({\n koros: {\n defaultValue: { ...korosProps },\n control: 'object',\n },\n});\n\nconst createVariantArg = (defaultValue: HeroProps['variant']) => ({\n variant: {\n ...variantSelection,\n defaultValue,\n },\n});\n\nconst DefaultContent = (props: DefaultContentProps) => {\n const { title, text, buttonTheme } = props;\n const h1Text = title || 'Welcome to the hero story';\n const paragraphText = text || defaultText;\n const blackButtonStyle = {\n '--background-color': '#000',\n '--color': '#fff',\n '--border-color': '#000',\n '--color-focus': '#fff',\n '--background-color-focus': '#000',\n '--background-color-hover': '#fff',\n '--background-color-hover-focus': '#fff',\n };\n const whiteButtonStyle = {\n '--background-color': '#fff',\n '--color': '#000',\n '--border-color': '#fff',\n '--color-focus': '#000',\n '--color-hover': '#fff',\n '--color-hover-focus': '#fff',\n '--background-color-focus': '#fff',\n '--background-color-hover': '#000',\n '--border-color-hover': '#fff',\n '--background-color-hover-focus': '#000',\n };\n const buttonStyle = buttonTheme !== 'black' ? whiteButtonStyle : blackButtonStyle;\n return (\n <>\n {h1Text}\n {paragraphText}\n \n Click me\n \n \n );\n};\n\nconst NavigationComponent = () => (\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang=\"fi\" label=\"Suomeksi\" />\n e.preventDefault()} lang=\"sv\" label=\"På svenska\" />\n e.preventDefault()} lang=\"en\" label=\"In English\" />\n e.preventDefault()} lang=\"fr\" label=\"En français\" />\n e.preventDefault()} lang=\"de\" label=\"Auf deutsch\" />\n e.preventDefault()} lang=\"ru\" label=\"По-русски\" />\n \n \n \n);\n\nexport const ImageLeft = (args) => {\n return (\n \n \n \n );\n};\nImageLeft.argTypes = {\n ...defaultImageSrcArg,\n ...createThemeArg(imageLeftOrRightTheme),\n ...createVariantArg('imageLeft'),\n};\n\nexport const ImageRight = (args) => {\n return (\n \n \n \n );\n};\nImageRight.argTypes = {\n ...getDisabledControl('variant'),\n ...defaultImageSrcArg,\n ...createThemeArg(imageLeftOrRightTheme),\n ...createVariantArg('imageRight'),\n};\n\nexport const WithoutImage = (args) => {\n return (\n \n \n \n );\n};\n\nWithoutImage.argTypes = {\n ...getDisabledControl('imageSrc', true),\n ...createThemeArg({\n '--background-color': '#9fc9eb',\n '--color': '#000',\n '--koros-color': '#009246',\n '--koros-height': '82px',\n }),\n ...createKorosArg({ type: 'pulse' }),\n ...createVariantArg('noImage'),\n ...createCenteredContentArg(true),\n};\n\nexport const WithoutImageKorosOverlay = (args) => {\n return (\n \n \n \n );\n};\n\nWithoutImageKorosOverlay.argTypes = {\n ...getDisabledControl('imageSrc', true),\n ...createThemeArg({\n '--background-color': '#000',\n '--color': '#fff',\n '--koros-color': '#000',\n }),\n ...createKorosArg({ flipVertical: true }),\n ...createVariantArg('noImage'),\n ...createCenteredContentArg(false),\n};\n\nexport const WithoutImageAndKoros = (args) => {\n return (\n \n \n \n );\n};\n\nWithoutImageAndKoros.argTypes = {\n ...getDisabledControl('imageSrc', true),\n ...createThemeArg({\n '--background-color': '#fff',\n '--color': '#000',\n }),\n ...createKorosArg({ hide: true }),\n ...createVariantArg('noImage'),\n ...createCenteredContentArg(false),\n};\n\nexport const BackgroundImage = (args) => {\n return (\n \n \n \n );\n};\n\nBackgroundImage.argTypes = {\n ...defaultImageSrcArg,\n ...createThemeArg({\n '--background-color': '#fff',\n }),\n ...createVariantArg('backgroundImage'),\n};\n\nexport const DiagonalKoros = (args) => {\n return (\n \n \n \n );\n};\n\nDiagonalKoros.argTypes = {\n ...defaultImageSrcArg,\n ...createThemeArg({\n '--background-color': '#f5a3c7',\n '--color': '#000',\n }),\n ...createVariantArg('diagonalKoros'),\n};\n\nexport const ImageBottom = (args) => {\n return (\n \n \n \n );\n};\nImageBottom.storyName = 'Bottom image';\nImageBottom.argTypes = {\n ...defaultImageSrcArg,\n ...createThemeArg({\n '--background-color': '#fff',\n '--image-position': 'bottom left',\n }),\n ...createVariantArg('imageBottom'),\n};\n\nexport const PlaygroundForKoros = (args) => {\n const heroProps: HeroProps = {\n koros: {\n type: args.type,\n dense: !!args.dense,\n hide: !!args.hide,\n ...args.koros,\n },\n theme: {\n '--background-color': '#9fc9eb',\n '--koros-color': args.color || '#9fc9eb',\n '--diagonal-koros-position': args.diagonalKorosPosition,\n ...args.theme,\n },\n imageSrc: imageFile,\n variant: args.variant,\n };\n return (\n
\n \n \n \n \n
\n

Applied theme:

\n
{JSON.stringify(heroProps.theme, null, 2)}
\n
\n
\n

Applied koros:

\n
{JSON.stringify(heroProps.koros, null, 2)}
\n
\n
\n );\n};\n\nPlaygroundForKoros.argTypes = {\n ...getDisabledControl('centeredContent'),\n ...getDisabledControl('imageSrc'),\n type: {\n defaultValue: 'basic',\n description: 'Koros type',\n control: {\n type: 'select',\n options: ['basic', 'beat', 'pulse', 'storm', 'wave', 'calm'],\n },\n ...getKorosPropertyDescriptionAsSummary(),\n },\n color: {\n control: { type: 'color' },\n description: 'Koros color. Default is \"--background-color\"',\n ...getThemePropertyDescriptionAsSummary('--koros-color'),\n },\n hide: {\n control: 'boolean',\n description: 'Hide koros. Most variants override this setting.',\n ...getKorosPropertyDescriptionAsSummary(),\n },\n dense: {\n control: 'boolean',\n description: 'Use dense koros version or not',\n ...getKorosPropertyDescriptionAsSummary(),\n },\n diagonalKorosPosition: {\n ...korosPosition,\n ...getThemePropertyDescriptionAsSummary('--diagonal-koros-position'),\n },\n flipVertical: {\n control: 'boolean',\n description: 'Flip koros vertically. Most variants override this setting.',\n ...getKorosPropertyDescriptionAsSummary(),\n },\n ...createVariantArg('diagonalKoros'),\n};\n\nexport const EmbeddedToPage = (args) => {\n const { preset, variant } = args;\n const props = getDefaultArgs(variant, preset);\n const NoImage = () => {\n if (preset === noImageOptions[1]) {\n return ;\n }\n if (preset === noImageOptions[2]) {\n return ;\n }\n return ;\n };\n return (\n
\n \n {variant === 'imageRight' && }\n {variant === 'imageLeft' && }\n {variant === 'backgroundImage' && (\n \n )}\n {variant === 'diagonalKoros' && }\n {variant === 'noImage' && }\n {variant === 'imageBottom' && }\n
\n

Component after hero

\n This component shows padding after hero\n
\n
\n );\n};\n\nEmbeddedToPage.argTypes = {\n ...getDisabledControl('koros'),\n ...getDisabledControl('theme'),\n ...getDisabledControl('imageSrc'),\n ...getDisabledControl('centeredContent'),\n ...createVariantArg('noImage'),\n preset: {\n defaultValue: noImageOptions[1],\n control: {\n type: 'select',\n options: noImageOptions,\n },\n table: {\n type: {\n summary:\n 'Changes to another version of the \"noImage\" variant. Storybook control, not an actual component property',\n },\n },\n },\n};\n\nconst demoPadding = '55px';\nconst demoBgColor = '#f5a3c7';\n\nexport const PlaygroundForTheme = (args) => {\n const argsAsTheme = {\n '--background-color': args.backgroundColor,\n '--color': args.color,\n '--image-position': args.imagePosition,\n '--koros-color': args.korosColor,\n '--diagonal-koros-position': args.diagonalKorosPosition,\n '--horizontal-padding-small': args.horizontalPaddingSmall,\n '--horizontal-padding-medium': args.horizontalPaddingMedium,\n '--horizontal-padding-large': args.horizontalPaddingLarge,\n '--horizontal-padding-x-large': args.horizontalPaddingXLarge,\n ...args.theme,\n };\n\n const theme = Object.fromEntries(Object.entries(argsAsTheme).filter(([, value]) => !!value));\n const heroProps: HeroProps = {\n koros: args.koros,\n theme,\n imageSrc: imageFile,\n variant: args.variant,\n };\n return (\n
\n \n \n \n \n
\n

This text should align with the hero content box on all screen sizes

\n
\n
\n

Applied theme:

\n
{JSON.stringify(theme, null, 2)}
\n
\n
\n );\n};\n\nPlaygroundForTheme.argTypes = {\n ...getDisabledControl('centeredContent'),\n ...getDisabledControl('imageSrc'),\n backgroundColor: {\n defaultValue: demoBgColor,\n control: 'color',\n description: 'Background color. Also koros color, if not set.',\n ...getThemePropertyDescriptionAsSummary('--background-color'),\n },\n color: {\n defaultValue: '',\n control: 'color',\n description: 'Text color.',\n ...getThemePropertyDescriptionAsSummary('--color'),\n },\n korosColor: {\n defaultValue: '',\n control: 'color',\n description: 'Optional koros color. Default is \"--background-color\"',\n ...getThemePropertyDescriptionAsSummary('--koros-color'),\n },\n imagePosition: {\n defaultValue: '',\n description:\n 'How image is aligned to its container when image is larger than the container. Value can be any valid value for css rule \"object-fit\"',\n control: {\n type: 'select',\n options: [\n 'top left',\n 'top center',\n 'top right',\n 'center left',\n 'center center',\n 'center right',\n 'bottom left',\n 'bottom center',\n 'bottom right',\n '',\n ],\n },\n ...getThemePropertyDescriptionAsSummary('--image-position'),\n },\n diagonalKorosPosition: {\n ...korosPosition,\n ...getThemePropertyDescriptionAsSummary('--diagonal-koros-position'),\n },\n horizontalPaddingSmall: {\n defaultValue: demoPadding,\n control: 'text',\n description: 'Horizontal padding on small screens <768px.',\n ...getThemePropertyDescriptionAsSummary('--horizontal-padding-small'),\n },\n horizontalPaddingMedium: {\n defaultValue: demoPadding,\n control: 'text',\n description: 'Horizontal padding on medium screens >=768px.',\n ...getThemePropertyDescriptionAsSummary('--horizontal-padding-medium'),\n },\n horizontalPaddingLarge: {\n defaultValue: demoPadding,\n control: 'text',\n description: 'Horizontal padding on large screens >=992px.',\n ...getThemePropertyDescriptionAsSummary('--horizontal-padding-large'),\n },\n horizontalPaddingXLarge: {\n defaultValue: demoPadding,\n control: 'text',\n description: 'Horizontal padding on x-large screens >=1248px.',\n ...getThemePropertyDescriptionAsSummary('--horizontal-padding-x-large'),\n },\n ...createVariantArg('backgroundImage'),\n};\n\nexport const AllHeroes = () => {\n const Divider = () => {\n return
;\n };\n\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n );\n};\n\nAllHeroes.argTypes = {\n ...getDisabledControl('koros'),\n ...getDisabledControl('theme'),\n ...getDisabledControl('imageSrc'),\n ...getDisabledControl('centeredContent'),\n ...getDisabledControl('variant'),\n};\n",locationsMap:{"image-left":{startLoc:{col:25,line:223},endLoc:{col:1,line:229},startBody:{col:25,line:223},endBody:{col:1,line:229}},"image-right":{startLoc:{col:26,line:236},endLoc:{col:1,line:242},startBody:{col:26,line:236},endBody:{col:1,line:242}},"without-image":{startLoc:{col:28,line:250},endLoc:{col:1,line:256},startBody:{col:28,line:250},endBody:{col:1,line:256}},"without-image-koros-overlay":{startLoc:{col:40,line:271},endLoc:{col:1,line:277},startBody:{col:40,line:271},endBody:{col:1,line:277}},"without-image-and-koros":{startLoc:{col:36,line:291},endLoc:{col:1,line:297},startBody:{col:36,line:291},endBody:{col:1,line:297}},"background-image":{startLoc:{col:31,line:310},endLoc:{col:1,line:316},startBody:{col:31,line:310},endBody:{col:1,line:316}},"diagonal-koros":{startLoc:{col:29,line:326},endLoc:{col:1,line:332},startBody:{col:29,line:326},endBody:{col:1,line:332}},"image-bottom":{startLoc:{col:27,line:343},endLoc:{col:1,line:349},startBody:{col:27,line:343},endBody:{col:1,line:349}},"playground-for-koros":{startLoc:{col:34,line:360},endLoc:{col:1,line:400},startBody:{col:34,line:360},endBody:{col:1,line:400}},"embedded-to-page":{startLoc:{col:30,line:441},endLoc:{col:1,line:470},startBody:{col:30,line:441},endBody:{col:1,line:470}},"playground-for-theme":{startLoc:{col:34,line:496},endLoc:{col:1,line:547},startBody:{col:34,line:496},endBody:{col:1,line:547}},"all-heroes":{startLoc:{col:25,line:622},endLoc:{col:1,line:648},startBody:{col:25,line:622},endBody:{col:1,line:648}}}},controls:{expanded:!0}},args:{}};var variantSelection={defaultValue:"noImage",control:{type:"select",options:["imageLeft","imageRight","backgroundImage","imageBottom","diagonalKoros","noImage"]}},korosPosition={defaultValue:"45%",control:"text",description:'Position of the koros in the variant "diagonalKoros".'},imageLeftOrRightTheme={"--background-color":"#c2a251","--color":"#000"},noImageOptions=["","Without image","Without image II","Without image and koros"],getThemePropertyDescriptionAsSummary=function getThemePropertyDescriptionAsSummary(themeVariable){return{table:{type:{summary:'Storybook control for a theme variable, not an actual component property. Given value is set to theme property as "'.concat(themeVariable,'".')}}}},getDisabledControl=function getDisabledControl(control,notUsed){var description="*** ".concat(control,notUsed?" is not used in this variant ***":" is not passed to the component in this story ***");return(0,defineProperty.Z)({},control,{description,control:!1,table:{type:{summary:"Disabled"}}})},getDefaultArgs=function getDefaultArgs(variant,preset){var defaultValuePicker=function defaultValuePicker(args){return Object.entries(args).reduce((function(currentObject,_ref2){var _ref3=(0,slicedToArray.Z)(_ref2,2),prop=_ref3[0],value=_ref3[1];return value.defaultValue?(0,objectSpread2.Z)((0,objectSpread2.Z)({},currentObject),{},(0,defineProperty.Z)({},prop,value.defaultValue)):currentObject}),{})};if("noImage"===variant)return defaultValuePicker(preset===noImageOptions[1]?WithoutImage.argTypes:preset===noImageOptions[2]?WithoutImageKorosOverlay.argTypes:WithoutImageAndKoros.argTypes);switch(variant){case"backgroundImage":return defaultValuePicker(BackgroundImage.argTypes);case"imageLeft":return defaultValuePicker(ImageLeft.argTypes);case"imageRight":return defaultValuePicker(ImageRight.argTypes);case"imageBottom":return defaultValuePicker(ImageBottom.argTypes);case"diagonalKoros":return defaultValuePicker(DiagonalKoros.argTypes);default:return{}}},defaultImageSrcArg={imageSrc:{defaultValue:placeholder_1920x1080,control:"text"}},createCenteredContentArg=function createCenteredContentArg(defaultValue){return{centeredContent:{defaultValue,control:"boolean"}}},createThemeArg=function createThemeArg(themeProps){return{theme:{defaultValue:(0,objectSpread2.Z)({},themeProps),control:"object"}}},createKorosArg=function createKorosArg(korosProps){return{koros:{defaultValue:(0,objectSpread2.Z)({},korosProps),control:"object"}}},createVariantArg=function createVariantArg(defaultValue){return{variant:(0,objectSpread2.Z)((0,objectSpread2.Z)({},variantSelection),{},{defaultValue})}},DefaultContent=function DefaultContent(props){var title=props.title,text=props.text,buttonTheme=props.buttonTheme,h1Text=title||"Welcome to the hero story",paragraphText=text||"Nullam ut nunc consectetur, accumsan nunc sed, luctus nisl. Curabitur lacinia tristique est, sit amet egestas velit elementum sit amet. Nam lacinia volutpat erat vel faucibus.",buttonStyle="black"!==buttonTheme?{"--background-color":"#fff","--color":"#000","--border-color":"#fff","--color-focus":"#000","--color-hover":"#fff","--color-hover-focus":"#fff","--background-color-focus":"#fff","--background-color-hover":"#000","--border-color-hover":"#fff","--background-color-hover-focus":"#000"}:{"--background-color":"#000","--color":"#fff","--border-color":"#000","--color-focus":"#fff","--background-color-focus":"#000","--background-color-hover":"#fff","--background-color-hover-focus":"#fff"};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Hero.Title,{children:h1Text}),(0,jsx_runtime.jsx)(Hero.Text,{children:paragraphText}),(0,jsx_runtime.jsx)(Button.z,{variant:"secondary",role:"link",style:buttonTheme?buttonStyle:{},children:"Click me"})]})},NavigationComponent=function NavigationComponent(){return(0,jsx_runtime.jsxs)(Navigation.W,{menuToggleAriaLabel:"Menu",skipTo:"#content",skipToContentLabel:"Skip to main content",children:[(0,jsx_runtime.jsxs)(Navigation.W.Row,{ariaLabel:"Main navigation",children:[(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",active:!0,onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsxs)(Navigation.W.Dropdown,{label:"Dropdown",children:[(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]})]}),(0,jsx_runtime.jsx)(Navigation.W.Actions,{children:(0,jsx_runtime.jsxs)(Navigation.W.LanguageSelector,{label:"FI",children:[(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fi",label:"Suomeksi"}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"sv",label:"På svenska"}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"en",label:"In English"}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fr",label:"En français"}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"de",label:"Auf deutsch"}),(0,jsx_runtime.jsx)(Navigation.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"ru",label:"По-русски"})]})})]})},ImageLeft=function ImageLeft(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{buttonTheme:"black"})}))};ImageLeft.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},defaultImageSrcArg),createThemeArg(imageLeftOrRightTheme)),createVariantArg("imageLeft"));var ImageRight=function ImageRight(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{buttonTheme:"black"})}))};ImageRight.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("variant")),defaultImageSrcArg),createThemeArg(imageLeftOrRightTheme)),createVariantArg("imageRight"));var WithoutImage=function WithoutImage(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{})}))};WithoutImage.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("imageSrc",!0)),createThemeArg({"--background-color":"#9fc9eb","--color":"#000","--koros-color":"#009246","--koros-height":"82px"})),createKorosArg({type:"pulse"})),createVariantArg("noImage")),createCenteredContentArg(!0));var WithoutImageKorosOverlay=function WithoutImageKorosOverlay(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{buttonTheme:"white"})}))};WithoutImageKorosOverlay.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("imageSrc",!0)),createThemeArg({"--background-color":"#000","--color":"#fff","--koros-color":"#000"})),createKorosArg({flipVertical:!0})),createVariantArg("noImage")),createCenteredContentArg(!1));var WithoutImageAndKoros=function WithoutImageAndKoros(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{})}))};WithoutImageAndKoros.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("imageSrc",!0)),createThemeArg({"--background-color":"#fff","--color":"#000"})),createKorosArg({hide:!0})),createVariantArg("noImage")),createCenteredContentArg(!1));var BackgroundImage=function BackgroundImage(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{buttonTheme:"black"})}))};BackgroundImage.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},defaultImageSrcArg),createThemeArg({"--background-color":"#fff"})),createVariantArg("backgroundImage"));var DiagonalKoros=function DiagonalKoros(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{buttonTheme:"black"})}))};DiagonalKoros.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},defaultImageSrcArg),createThemeArg({"--background-color":"#f5a3c7","--color":"#000"})),createVariantArg("diagonalKoros"));var ImageBottom=function ImageBottom(args){return(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{})}))};ImageBottom.storyName="Bottom image",ImageBottom.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},defaultImageSrcArg),createThemeArg({"--background-color":"#fff","--image-position":"bottom left"})),createVariantArg("imageBottom"));var PlaygroundForKoros=function PlaygroundForKoros(args){var heroProps={koros:(0,objectSpread2.Z)({type:args.type,dense:!!args.dense,hide:!!args.hide},args.koros),theme:(0,objectSpread2.Z)({"--background-color":"#9fc9eb","--koros-color":args.color||"#9fc9eb","--diagonal-koros-position":args.diagonalKorosPosition},args.theme),imageSrc:placeholder_1920x1080,variant:args.variant};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("style",{children:"\n .theme {\n padding: 20px;\n font-size:10px;\n }\n "}),(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},heroProps),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{})})),(0,jsx_runtime.jsxs)("div",{className:"theme",children:[(0,jsx_runtime.jsx)("p",{children:"Applied theme:"}),(0,jsx_runtime.jsx)("pre",{children:JSON.stringify(heroProps.theme,null,2)})]}),(0,jsx_runtime.jsxs)("div",{className:"theme",children:[(0,jsx_runtime.jsx)("p",{children:"Applied koros:"}),(0,jsx_runtime.jsx)("pre",{children:JSON.stringify(heroProps.koros,null,2)})]})]})};PlaygroundForKoros.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("centeredContent")),getDisabledControl("imageSrc")),{},{type:(0,objectSpread2.Z)({defaultValue:"basic",description:"Koros type",control:{type:"select",options:["basic","beat","pulse","storm","wave","calm"]}},{table:{type:{summary:'Storybook control for a koros property, not an actual component property. Given value is set to the "koros" property of the component.'}}}),color:(0,objectSpread2.Z)({control:{type:"color"},description:'Koros color. Default is "--background-color"'},getThemePropertyDescriptionAsSummary("--koros-color")),hide:(0,objectSpread2.Z)({control:"boolean",description:"Hide koros. Most variants override this setting."},{table:{type:{summary:'Storybook control for a koros property, not an actual component property. Given value is set to the "koros" property of the component.'}}}),dense:(0,objectSpread2.Z)({control:"boolean",description:"Use dense koros version or not"},{table:{type:{summary:'Storybook control for a koros property, not an actual component property. Given value is set to the "koros" property of the component.'}}}),diagonalKorosPosition:(0,objectSpread2.Z)((0,objectSpread2.Z)({},korosPosition),getThemePropertyDescriptionAsSummary("--diagonal-koros-position")),flipVertical:(0,objectSpread2.Z)({control:"boolean",description:"Flip koros vertically. Most variants override this setting."},{table:{type:{summary:'Storybook control for a koros property, not an actual component property. Given value is set to the "koros" property of the component.'}}})},createVariantArg("diagonalKoros"));var EmbeddedToPage=function EmbeddedToPage(args){var preset=args.preset,variant=args.variant,props=getDefaultArgs(variant,preset),NoImage=function NoImage(){return preset===noImageOptions[1]?(0,jsx_runtime.jsx)(WithoutImage,(0,objectSpread2.Z)({},props)):preset===noImageOptions[2]?(0,jsx_runtime.jsx)(WithoutImageKorosOverlay,(0,objectSpread2.Z)({},props)):(0,jsx_runtime.jsx)(WithoutImageAndKoros,(0,objectSpread2.Z)({},props))};return(0,jsx_runtime.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,jsx_runtime.jsx)(NavigationComponent,{}),"imageRight"===variant&&(0,jsx_runtime.jsx)(ImageRight,(0,objectSpread2.Z)({},props)),"imageLeft"===variant&&(0,jsx_runtime.jsx)(ImageLeft,(0,objectSpread2.Z)({},props)),"backgroundImage"===variant&&(0,jsx_runtime.jsx)(BackgroundImage,(0,objectSpread2.Z)({},(0,objectSpread2.Z)((0,objectSpread2.Z)({},props),{},{theme:{"--koros-color":"var(--color-fog)"}}))),"diagonalKoros"===variant&&(0,jsx_runtime.jsx)(DiagonalKoros,(0,objectSpread2.Z)({},props)),"noImage"===variant&&(0,jsx_runtime.jsx)(NoImage,(0,objectSpread2.Z)({},props)),"imageBottom"===variant&&(0,jsx_runtime.jsx)(ImageBottom,(0,objectSpread2.Z)({},props)),(0,jsx_runtime.jsxs)(Section.$,{color:"secondary",children:[(0,jsx_runtime.jsx)("h1",{className:"heading-xl",children:"Component after hero"}),"This component shows padding after hero"]})]})};EmbeddedToPage.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("koros")),getDisabledControl("theme")),getDisabledControl("imageSrc")),getDisabledControl("centeredContent")),createVariantArg("noImage")),{},{preset:{defaultValue:noImageOptions[1],control:{type:"select",options:noImageOptions},table:{type:{summary:'Changes to another version of the "noImage" variant. Storybook control, not an actual component property'}}}});var PlaygroundForTheme=function PlaygroundForTheme(args){var argsAsTheme=(0,objectSpread2.Z)({"--background-color":args.backgroundColor,"--color":args.color,"--image-position":args.imagePosition,"--koros-color":args.korosColor,"--diagonal-koros-position":args.diagonalKorosPosition,"--horizontal-padding-small":args.horizontalPaddingSmall,"--horizontal-padding-medium":args.horizontalPaddingMedium,"--horizontal-padding-large":args.horizontalPaddingLarge,"--horizontal-padding-x-large":args.horizontalPaddingXLarge},args.theme),theme=Object.fromEntries(Object.entries(argsAsTheme).filter((function(_ref4){return!!(0,slicedToArray.Z)(_ref4,2)[1]}))),heroProps={koros:args.koros,theme,imageSrc:placeholder_1920x1080,variant:args.variant};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("style",{children:"\n .oddly-padded {\n padding: 20px ".concat("55px",";\n background:").concat("#f5a3c7",";\n }\n .oddly-padded p{\n max-width: var(--container-width-xl);\n margin: 0 auto;\n }\n .theme {\n padding: 20px 20px 20px ").concat("55px",";\n font-size:10px;\n }\n ")}),(0,jsx_runtime.jsx)(Hero,(0,objectSpread2.Z)((0,objectSpread2.Z)({},heroProps),{},{children:(0,jsx_runtime.jsx)(DefaultContent,{})})),(0,jsx_runtime.jsx)("div",{className:"oddly-padded",children:(0,jsx_runtime.jsx)("p",{children:"This text should align with the hero content box on all screen sizes"})}),(0,jsx_runtime.jsxs)("div",{className:"theme",children:[(0,jsx_runtime.jsx)("p",{children:"Applied theme:"}),(0,jsx_runtime.jsx)("pre",{children:JSON.stringify(theme,null,2)})]})]})};PlaygroundForTheme.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("centeredContent")),getDisabledControl("imageSrc")),{},{backgroundColor:(0,objectSpread2.Z)({defaultValue:"#f5a3c7",control:"color",description:"Background color. Also koros color, if not set."},getThemePropertyDescriptionAsSummary("--background-color")),color:(0,objectSpread2.Z)({defaultValue:"",control:"color",description:"Text color."},getThemePropertyDescriptionAsSummary("--color")),korosColor:(0,objectSpread2.Z)({defaultValue:"",control:"color",description:'Optional koros color. Default is "--background-color"'},getThemePropertyDescriptionAsSummary("--koros-color")),imagePosition:(0,objectSpread2.Z)({defaultValue:"",description:'How image is aligned to its container when image is larger than the container. Value can be any valid value for css rule "object-fit"',control:{type:"select",options:["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right",""]}},getThemePropertyDescriptionAsSummary("--image-position")),diagonalKorosPosition:(0,objectSpread2.Z)((0,objectSpread2.Z)({},korosPosition),getThemePropertyDescriptionAsSummary("--diagonal-koros-position")),horizontalPaddingSmall:(0,objectSpread2.Z)({defaultValue:"55px",control:"text",description:"Horizontal padding on small screens <768px."},getThemePropertyDescriptionAsSummary("--horizontal-padding-small")),horizontalPaddingMedium:(0,objectSpread2.Z)({defaultValue:"55px",control:"text",description:"Horizontal padding on medium screens >=768px."},getThemePropertyDescriptionAsSummary("--horizontal-padding-medium")),horizontalPaddingLarge:(0,objectSpread2.Z)({defaultValue:"55px",control:"text",description:"Horizontal padding on large screens >=992px."},getThemePropertyDescriptionAsSummary("--horizontal-padding-large")),horizontalPaddingXLarge:(0,objectSpread2.Z)({defaultValue:"55px",control:"text",description:"Horizontal padding on x-large screens >=1248px."},getThemePropertyDescriptionAsSummary("--horizontal-padding-x-large"))},createVariantArg("backgroundImage"));var AllHeroes=function AllHeroes(){var Divider=function Divider(){return(0,jsx_runtime.jsx)("div",{style:{height:"50px"}})};return(0,jsx_runtime.jsxs)("div",{style:{display:"flex",flexDirection:"column",backgroundColor:"#eafad4"},children:[(0,jsx_runtime.jsx)(NavigationComponent,{}),(0,jsx_runtime.jsx)(ImageLeft,(0,objectSpread2.Z)({},getDefaultArgs("imageLeft"))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(BackgroundImage,(0,objectSpread2.Z)({},(0,objectSpread2.Z)((0,objectSpread2.Z)({},getDefaultArgs("backgroundImage")),{},{theme:{"--koros-color":"#eafad4"}}))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(ImageRight,(0,objectSpread2.Z)({},getDefaultArgs("imageRight"))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(WithoutImage,(0,objectSpread2.Z)({},getDefaultArgs("noImage",noImageOptions[1]))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(DiagonalKoros,(0,objectSpread2.Z)({},getDefaultArgs("diagonalKoros"))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(WithoutImageKorosOverlay,(0,objectSpread2.Z)({},getDefaultArgs("noImage",noImageOptions[2]))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(ImageBottom,(0,objectSpread2.Z)({},getDefaultArgs("imageBottom"))),(0,jsx_runtime.jsx)(Divider,{}),(0,jsx_runtime.jsx)(WithoutImageAndKoros,(0,objectSpread2.Z)({},getDefaultArgs("noImage",noImageOptions[3]))),(0,jsx_runtime.jsx)(Divider,{})]})};AllHeroes.argTypes=(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},getDisabledControl("koros")),getDisabledControl("theme")),getDisabledControl("imageSrc")),getDisabledControl("centeredContent")),getDisabledControl("variant")),ImageLeft.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n \n \n \n );\n}'}},ImageLeft.parameters),ImageRight.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n \n \n \n );\n}'}},ImageRight.parameters),WithoutImage.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n return (\n \n \n \n );\n}"}},WithoutImage.parameters),WithoutImageKorosOverlay.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n \n \n \n );\n}'}},WithoutImageKorosOverlay.parameters),WithoutImageAndKoros.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n return (\n \n \n \n );\n}"}},WithoutImageAndKoros.parameters),BackgroundImage.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n \n \n \n );\n}'}},BackgroundImage.parameters),DiagonalKoros.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n \n \n \n );\n}'}},DiagonalKoros.parameters),ImageBottom.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n return (\n \n \n \n );\n}"}},ImageBottom.parameters),PlaygroundForKoros.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const heroProps: HeroProps = {\n koros: {\n type: args.type,\n dense: !!args.dense,\n hide: !!args.hide,\n ...args.koros,\n },\n theme: {\n '--background-color': '#9fc9eb',\n '--koros-color': args.color || '#9fc9eb',\n '--diagonal-koros-position': args.diagonalKorosPosition,\n ...args.theme,\n },\n imageSrc: imageFile,\n variant: args.variant,\n };\n return (\n
\n \n \n \n \n
\n

Applied theme:

\n
{JSON.stringify(heroProps.theme, null, 2)}
\n
\n
\n

Applied koros:

\n
{JSON.stringify(heroProps.koros, null, 2)}
\n
\n
\n );\n}"}},PlaygroundForKoros.parameters),EmbeddedToPage.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const { preset, variant } = args;\n const props = getDefaultArgs(variant, preset);\n const NoImage = () => {\n if (preset === noImageOptions[1]) {\n return ;\n }\n if (preset === noImageOptions[2]) {\n return ;\n }\n return ;\n };\n return (\n
\n \n {variant === 'imageRight' && }\n {variant === 'imageLeft' && }\n {variant === 'backgroundImage' && (\n \n )}\n {variant === 'diagonalKoros' && }\n {variant === 'noImage' && }\n {variant === 'imageBottom' && }\n
\n

Component after hero

\n This component shows padding after hero\n
\n
\n );\n}"}},EmbeddedToPage.parameters),PlaygroundForTheme.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const argsAsTheme = {\n '--background-color': args.backgroundColor,\n '--color': args.color,\n '--image-position': args.imagePosition,\n '--koros-color': args.korosColor,\n '--diagonal-koros-position': args.diagonalKorosPosition,\n '--horizontal-padding-small': args.horizontalPaddingSmall,\n '--horizontal-padding-medium': args.horizontalPaddingMedium,\n '--horizontal-padding-large': args.horizontalPaddingLarge,\n '--horizontal-padding-x-large': args.horizontalPaddingXLarge,\n ...args.theme,\n };\n\n const theme = Object.fromEntries(Object.entries(argsAsTheme).filter(([, value]) => !!value));\n const heroProps: HeroProps = {\n koros: args.koros,\n theme,\n imageSrc: imageFile,\n variant: args.variant,\n };\n return (\n
\n \n \n \n \n
\n

This text should align with the hero content box on all screen sizes

\n
\n
\n

Applied theme:

\n
{JSON.stringify(theme, null, 2)}
\n
\n
\n );\n}"}},PlaygroundForTheme.parameters),AllHeroes.parameters=(0,objectSpread2.Z)({storySource:{source:"() => {\n const Divider = () => {\n return
;\n };\n\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n );\n}"}},AllHeroes.parameters);try{ImageLeft.displayName="ImageLeft",ImageLeft.__docgenInfo={description:"",displayName:"ImageLeft",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#ImageLeft"]={docgenInfo:ImageLeft.__docgenInfo,name:"ImageLeft",path:"src/components/hero/Hero.stories.tsx#ImageLeft"})}catch(__react_docgen_typescript_loader_error){}try{ImageRight.displayName="ImageRight",ImageRight.__docgenInfo={description:"",displayName:"ImageRight",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#ImageRight"]={docgenInfo:ImageRight.__docgenInfo,name:"ImageRight",path:"src/components/hero/Hero.stories.tsx#ImageRight"})}catch(__react_docgen_typescript_loader_error){}try{WithoutImage.displayName="WithoutImage",WithoutImage.__docgenInfo={description:"",displayName:"WithoutImage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#WithoutImage"]={docgenInfo:WithoutImage.__docgenInfo,name:"WithoutImage",path:"src/components/hero/Hero.stories.tsx#WithoutImage"})}catch(__react_docgen_typescript_loader_error){}try{WithoutImageKorosOverlay.displayName="WithoutImageKorosOverlay",WithoutImageKorosOverlay.__docgenInfo={description:"",displayName:"WithoutImageKorosOverlay",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#WithoutImageKorosOverlay"]={docgenInfo:WithoutImageKorosOverlay.__docgenInfo,name:"WithoutImageKorosOverlay",path:"src/components/hero/Hero.stories.tsx#WithoutImageKorosOverlay"})}catch(__react_docgen_typescript_loader_error){}try{WithoutImageAndKoros.displayName="WithoutImageAndKoros",WithoutImageAndKoros.__docgenInfo={description:"",displayName:"WithoutImageAndKoros",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#WithoutImageAndKoros"]={docgenInfo:WithoutImageAndKoros.__docgenInfo,name:"WithoutImageAndKoros",path:"src/components/hero/Hero.stories.tsx#WithoutImageAndKoros"})}catch(__react_docgen_typescript_loader_error){}try{BackgroundImage.displayName="BackgroundImage",BackgroundImage.__docgenInfo={description:"",displayName:"BackgroundImage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#BackgroundImage"]={docgenInfo:BackgroundImage.__docgenInfo,name:"BackgroundImage",path:"src/components/hero/Hero.stories.tsx#BackgroundImage"})}catch(__react_docgen_typescript_loader_error){}try{DiagonalKoros.displayName="DiagonalKoros",DiagonalKoros.__docgenInfo={description:"",displayName:"DiagonalKoros",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#DiagonalKoros"]={docgenInfo:DiagonalKoros.__docgenInfo,name:"DiagonalKoros",path:"src/components/hero/Hero.stories.tsx#DiagonalKoros"})}catch(__react_docgen_typescript_loader_error){}try{ImageBottom.displayName="ImageBottom",ImageBottom.__docgenInfo={description:"",displayName:"ImageBottom",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#ImageBottom"]={docgenInfo:ImageBottom.__docgenInfo,name:"ImageBottom",path:"src/components/hero/Hero.stories.tsx#ImageBottom"})}catch(__react_docgen_typescript_loader_error){}try{PlaygroundForKoros.displayName="PlaygroundForKoros",PlaygroundForKoros.__docgenInfo={description:"",displayName:"PlaygroundForKoros",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#PlaygroundForKoros"]={docgenInfo:PlaygroundForKoros.__docgenInfo,name:"PlaygroundForKoros",path:"src/components/hero/Hero.stories.tsx#PlaygroundForKoros"})}catch(__react_docgen_typescript_loader_error){}try{EmbeddedToPage.displayName="EmbeddedToPage",EmbeddedToPage.__docgenInfo={description:"",displayName:"EmbeddedToPage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#EmbeddedToPage"]={docgenInfo:EmbeddedToPage.__docgenInfo,name:"EmbeddedToPage",path:"src/components/hero/Hero.stories.tsx#EmbeddedToPage"})}catch(__react_docgen_typescript_loader_error){}try{PlaygroundForTheme.displayName="PlaygroundForTheme",PlaygroundForTheme.__docgenInfo={description:"",displayName:"PlaygroundForTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hero/Hero.stories.tsx#PlaygroundForTheme"]={docgenInfo:PlaygroundForTheme.__docgenInfo,name:"PlaygroundForTheme",path:"src/components/hero/Hero.stories.tsx#PlaygroundForTheme"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/highlight/Highlight.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DefaultHighlight:()=>DefaultHighlight,DefaultQuote:()=>DefaultQuote,HighlightCustomAccentColor:()=>HighlightCustomAccentColor,HighlightCustomTextColor:()=>HighlightCustomTextColor,HighlightLarge:()=>HighlightLarge,HighlightSmall:()=>HighlightSmall,QuoteCustomAccentColor:()=>QuoteCustomAccentColor,QuoteCustomTextColor:()=>QuoteCustomTextColor,QuoteLarge:()=>QuoteLarge,QuoteSmall:()=>QuoteSmall,default:()=>Highlight_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),classNames=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/utils/classNames.ts")),useTheme=__webpack_require__("./src/hooks/useTheme.tsx");const Highlight_module={highlight:"Highlight_highlight__oDH8D highlight_hds-highlight__9de8e",highlightBlockquote:"Highlight_highlightBlockquote__n9dcE highlight_hds-blockquote__JvIxQ",text:"Highlight_text__IaHD9 highlight_hds-highlight__text__oEkQ7","size-s":"Highlight_size-s__hz2Ki highlight_hds-highlight--small__fbqUC","size-l":"Highlight_size-l__Eam1p highlight_hds-highlight--large__I-3J8",quote:"Highlight_quote__uPH4p highlight_hds-highlight__quote__Onvbj",reference:"Highlight_reference__kp6Rg highlight_hds-highlight__reference__EaWzI"};var jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),Highlight=function Highlight(_ref){var theme=_ref.theme,size=_ref.size,type=_ref.type,text=_ref.text,reference=_ref.reference,customThemeClass=(0,useTheme.F)(Highlight_module.highlight,theme||{}),isQuote=type&&"quote"===type;return(0,jsx_runtime.jsxs)("figure",{className:(0,classNames.Z)(Highlight_module.highlight,size&&Highlight_module["size-".concat(size)],customThemeClass),children:[(0,jsx_runtime.jsx)("blockquote",{className:Highlight_module.highlightBlockquote,children:(0,jsx_runtime.jsx)("p",{className:(0,classNames.Z)(Highlight_module.text,isQuote&&Highlight_module.quote),children:text})}),reference&&(0,jsx_runtime.jsxs)("figcaption",{className:Highlight_module.reference,children:["—⁠",reference]})]})};try{Highlight.displayName="Highlight",Highlight.__docgenInfo={description:"",displayName:"Highlight",props:{theme:{defaultValue:null,description:"Highlight Theme",name:"theme",required:!1,type:{name:"HighlightTheme"}},size:{defaultValue:null,description:"Highlight size. Currently highlight comes in three sizes",name:"size",required:!1,type:{name:"enum",value:[{value:'"s"'},{value:'"m"'},{value:'"l"'}]}},type:{defaultValue:null,description:"Highlight type",name:"type",required:!1,type:{name:"enum",value:[{value:'"highlight"'},{value:'"quote"'}]}},text:{defaultValue:null,description:"Highlight or Quote text",name:"text",required:!0,type:{name:"string"}},reference:{defaultValue:null,description:"Reference text. Used with quote",name:"reference",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.tsx#Highlight"]={docgenInfo:Highlight.__docgenInfo,name:"Highlight",path:"src/components/highlight/Highlight.tsx#Highlight"})}catch(__react_docgen_typescript_loader_error){}const Highlight_stories={component:Highlight,title:"Components/Highlight",parameters:{storySource:{source:"import React from 'react';\n\nimport { Highlight } from './Highlight';\n\nexport default {\n component: Highlight,\n title: 'Components/Highlight',\n parameters: {\n controls: { expanded: true },\n },\n};\n\nconst customColor = '#00005e';\n\nconst quoteArgs = { text: 'Add an interesting quote here', type: 'quote', reference: 'First name Last name. Title.' };\n\nconst highlightArgs = {\n text:\n 'You may select an highlight from the article to be displayed here. Select an excerpt that you want the user to pay attention to.',\n};\n\nexport const DefaultHighlight = (args) => ;\nDefaultHighlight.args = {\n ...highlightArgs,\n};\n\nexport const HighlightSmall = (args) => ;\nHighlightSmall.args = {\n ...highlightArgs,\n size: 'small',\n};\n\nexport const HighlightLarge = (args) => ;\nHighlightLarge.args = {\n ...highlightArgs,\n size: 'l',\n};\n\nexport const HighlightCustomAccentColor = (args) => ;\nHighlightCustomAccentColor.args = {\n ...highlightArgs,\n theme: {\n '--accent-line-color': customColor,\n },\n};\n\nexport const HighlightCustomTextColor = (args) => ;\nHighlightCustomTextColor.args = {\n ...highlightArgs,\n theme: {\n '--text-color': customColor,\n },\n};\n\nexport const DefaultQuote = (args) => ;\nDefaultQuote.args = {\n ...quoteArgs,\n};\n\nexport const QuoteLarge = (args) => ;\nQuoteLarge.args = {\n ...quoteArgs,\n size: 'l',\n};\n\nexport const QuoteSmall = (args) => ;\nQuoteSmall.args = {\n ...quoteArgs,\n size: 's',\n};\n\nexport const QuoteCustomAccentColor = (args) => ;\nQuoteCustomAccentColor.args = {\n ...quoteArgs,\n theme: {\n '--accent-line-color': customColor,\n },\n};\n\nexport const QuoteCustomTextColor = (args) => ;\nQuoteCustomTextColor.args = {\n ...quoteArgs,\n theme: {\n '--text-color': customColor,\n },\n};\n",locationsMap:{"default-highlight":{startLoc:{col:32,line:22},endLoc:{col:65,line:22},startBody:{col:32,line:22},endBody:{col:65,line:22}},"highlight-small":{startLoc:{col:30,line:27},endLoc:{col:63,line:27},startBody:{col:30,line:27},endBody:{col:63,line:27}},"highlight-large":{startLoc:{col:30,line:33},endLoc:{col:63,line:33},startBody:{col:30,line:33},endBody:{col:63,line:33}},"highlight-custom-accent-color":{startLoc:{col:42,line:39},endLoc:{col:75,line:39},startBody:{col:42,line:39},endBody:{col:75,line:39}},"highlight-custom-text-color":{startLoc:{col:40,line:47},endLoc:{col:73,line:47},startBody:{col:40,line:47},endBody:{col:73,line:47}},"default-quote":{startLoc:{col:28,line:55},endLoc:{col:61,line:55},startBody:{col:28,line:55},endBody:{col:61,line:55}},"quote-large":{startLoc:{col:26,line:60},endLoc:{col:59,line:60},startBody:{col:26,line:60},endBody:{col:59,line:60}},"quote-small":{startLoc:{col:26,line:66},endLoc:{col:59,line:66},startBody:{col:26,line:66},endBody:{col:59,line:66}},"quote-custom-accent-color":{startLoc:{col:38,line:72},endLoc:{col:71,line:72},startBody:{col:38,line:72},endBody:{col:71,line:72}},"quote-custom-text-color":{startLoc:{col:36,line:80},endLoc:{col:69,line:80},startBody:{col:36,line:80},endBody:{col:69,line:80}}}},controls:{expanded:!0}}};var quoteArgs={text:"Add an interesting quote here",type:"quote",reference:"First name Last name. Title."},highlightArgs={text:"You may select an highlight from the article to be displayed here. Select an excerpt that you want the user to pay attention to."},DefaultHighlight=function DefaultHighlight(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};DefaultHighlight.args=(0,objectSpread2.Z)({},highlightArgs);var HighlightSmall=function HighlightSmall(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};HighlightSmall.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},highlightArgs),{},{size:"small"});var HighlightLarge=function HighlightLarge(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};HighlightLarge.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},highlightArgs),{},{size:"l"});var HighlightCustomAccentColor=function HighlightCustomAccentColor(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};HighlightCustomAccentColor.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},highlightArgs),{},{theme:{"--accent-line-color":"#00005e"}});var HighlightCustomTextColor=function HighlightCustomTextColor(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};HighlightCustomTextColor.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},highlightArgs),{},{theme:{"--text-color":"#00005e"}});var DefaultQuote=function DefaultQuote(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};DefaultQuote.args=(0,objectSpread2.Z)({},quoteArgs);var QuoteLarge=function QuoteLarge(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};QuoteLarge.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},quoteArgs),{},{size:"l"});var QuoteSmall=function QuoteSmall(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};QuoteSmall.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},quoteArgs),{},{size:"s"});var QuoteCustomAccentColor=function QuoteCustomAccentColor(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};QuoteCustomAccentColor.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},quoteArgs),{},{theme:{"--accent-line-color":"#00005e"}});var QuoteCustomTextColor=function QuoteCustomTextColor(args){return(0,jsx_runtime.jsx)(Highlight,(0,objectSpread2.Z)({},args))};QuoteCustomTextColor.args=(0,objectSpread2.Z)((0,objectSpread2.Z)({},quoteArgs),{},{theme:{"--text-color":"#00005e"}}),DefaultHighlight.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},DefaultHighlight.parameters),HighlightSmall.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},HighlightSmall.parameters),HighlightLarge.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},HighlightLarge.parameters),HighlightCustomAccentColor.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},HighlightCustomAccentColor.parameters),HighlightCustomTextColor.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},HighlightCustomTextColor.parameters),DefaultQuote.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},DefaultQuote.parameters),QuoteLarge.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},QuoteLarge.parameters),QuoteSmall.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},QuoteSmall.parameters),QuoteCustomAccentColor.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},QuoteCustomAccentColor.parameters),QuoteCustomTextColor.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},QuoteCustomTextColor.parameters);try{DefaultHighlight.displayName="DefaultHighlight",DefaultHighlight.__docgenInfo={description:"",displayName:"DefaultHighlight",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#DefaultHighlight"]={docgenInfo:DefaultHighlight.__docgenInfo,name:"DefaultHighlight",path:"src/components/highlight/Highlight.stories.tsx#DefaultHighlight"})}catch(__react_docgen_typescript_loader_error){}try{HighlightSmall.displayName="HighlightSmall",HighlightSmall.__docgenInfo={description:"",displayName:"HighlightSmall",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#HighlightSmall"]={docgenInfo:HighlightSmall.__docgenInfo,name:"HighlightSmall",path:"src/components/highlight/Highlight.stories.tsx#HighlightSmall"})}catch(__react_docgen_typescript_loader_error){}try{HighlightLarge.displayName="HighlightLarge",HighlightLarge.__docgenInfo={description:"",displayName:"HighlightLarge",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#HighlightLarge"]={docgenInfo:HighlightLarge.__docgenInfo,name:"HighlightLarge",path:"src/components/highlight/Highlight.stories.tsx#HighlightLarge"})}catch(__react_docgen_typescript_loader_error){}try{HighlightCustomAccentColor.displayName="HighlightCustomAccentColor",HighlightCustomAccentColor.__docgenInfo={description:"",displayName:"HighlightCustomAccentColor",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#HighlightCustomAccentColor"]={docgenInfo:HighlightCustomAccentColor.__docgenInfo,name:"HighlightCustomAccentColor",path:"src/components/highlight/Highlight.stories.tsx#HighlightCustomAccentColor"})}catch(__react_docgen_typescript_loader_error){}try{HighlightCustomTextColor.displayName="HighlightCustomTextColor",HighlightCustomTextColor.__docgenInfo={description:"",displayName:"HighlightCustomTextColor",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#HighlightCustomTextColor"]={docgenInfo:HighlightCustomTextColor.__docgenInfo,name:"HighlightCustomTextColor",path:"src/components/highlight/Highlight.stories.tsx#HighlightCustomTextColor"})}catch(__react_docgen_typescript_loader_error){}try{DefaultQuote.displayName="DefaultQuote",DefaultQuote.__docgenInfo={description:"",displayName:"DefaultQuote",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#DefaultQuote"]={docgenInfo:DefaultQuote.__docgenInfo,name:"DefaultQuote",path:"src/components/highlight/Highlight.stories.tsx#DefaultQuote"})}catch(__react_docgen_typescript_loader_error){}try{QuoteLarge.displayName="QuoteLarge",QuoteLarge.__docgenInfo={description:"",displayName:"QuoteLarge",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#QuoteLarge"]={docgenInfo:QuoteLarge.__docgenInfo,name:"QuoteLarge",path:"src/components/highlight/Highlight.stories.tsx#QuoteLarge"})}catch(__react_docgen_typescript_loader_error){}try{QuoteSmall.displayName="QuoteSmall",QuoteSmall.__docgenInfo={description:"",displayName:"QuoteSmall",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#QuoteSmall"]={docgenInfo:QuoteSmall.__docgenInfo,name:"QuoteSmall",path:"src/components/highlight/Highlight.stories.tsx#QuoteSmall"})}catch(__react_docgen_typescript_loader_error){}try{QuoteCustomAccentColor.displayName="QuoteCustomAccentColor",QuoteCustomAccentColor.__docgenInfo={description:"",displayName:"QuoteCustomAccentColor",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#QuoteCustomAccentColor"]={docgenInfo:QuoteCustomAccentColor.__docgenInfo,name:"QuoteCustomAccentColor",path:"src/components/highlight/Highlight.stories.tsx#QuoteCustomAccentColor"})}catch(__react_docgen_typescript_loader_error){}try{QuoteCustomTextColor.displayName="QuoteCustomTextColor",QuoteCustomTextColor.__docgenInfo={description:"",displayName:"QuoteCustomTextColor",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/highlight/Highlight.stories.tsx#QuoteCustomTextColor"]={docgenInfo:QuoteCustomTextColor.__docgenInfo,name:"QuoteCustomTextColor",path:"src/components/highlight/Highlight.stories.tsx#QuoteCustomTextColor"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/imageWithCard/ImageWithCard.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Hover:()=>Hover,HoverFullWidth:()=>HoverFullWidth,Playground:()=>Playground,Split:()=>Split,SplitFullWidth:()=>SplitFullWidth,default:()=>ImageWithCard_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),blocks=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js")),classNames=(__webpack_require__("./src/styles/base.css"),__webpack_require__("./src/utils/classNames.ts"));const ImageWithCard_module={wrapper:"ImageWithCard_wrapper__nLwcq",image:"ImageWithCard_image__Zbe9i",cardContainer:"ImageWithCard_cardContainer__XrK+a",card:"ImageWithCard_card__DHQyY helpers_text-body__t2yVb",rightAlignment:"ImageWithCard_rightAlignment__vwITo",leftAlignment:"ImageWithCard_leftAlignment__+x+LS",splitLayout:"ImageWithCard_splitLayout__XBkte",hoverLayout:"ImageWithCard_hoverLayout__zSkEn",fullWidth:"ImageWithCard_fullWidth__rIndJ",primary:"ImageWithCard_primary__AHsiC",secondary:"ImageWithCard_secondary__sMFDp",tertiary:"ImageWithCard_tertiary__nYixT"};var jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),ImageWithCard=function ImageWithCard(_ref){var src=_ref.src,_ref$fullWidth=_ref.fullWidth,fullWidth=void 0!==_ref$fullWidth&&_ref$fullWidth,children=_ref.children,_ref$cardAlignment=_ref.cardAlignment,cardAlignment=void 0===_ref$cardAlignment?"left":_ref$cardAlignment,_ref$color=_ref.color,color=void 0===_ref$color?"plain":_ref$color,_ref$cardLayout=_ref.cardLayout,cardLayout=void 0===_ref$cardLayout?null:_ref$cardLayout,_ref$className=_ref.className,className=void 0===_ref$className?null:_ref$className;return(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(ImageWithCard_module.wrapper,ImageWithCard_module["".concat(cardAlignment,"Alignment")],cardLayout&&ImageWithCard_module["".concat(cardLayout,"Layout")],ImageWithCard_module[color],fullWidth&&ImageWithCard_module.fullWidth,className),children:[(0,jsx_runtime.jsx)("div",{className:ImageWithCard_module.image,style:{backgroundImage:"url(".concat(src,")")}}),children&&(0,jsx_runtime.jsx)("div",{className:ImageWithCard_module.cardContainer,children:(0,jsx_runtime.jsx)("div",{className:ImageWithCard_module.card,children})})]})};try{ImageWithCard.displayName="ImageWithCard",ImageWithCard.__docgenInfo={description:"",displayName:"ImageWithCard",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}},fullWidth:{defaultValue:{value:"false"},description:"",name:"fullWidth",required:!1,type:{name:"boolean"}},cardAlignment:{defaultValue:{value:"left"},description:"",name:"cardAlignment",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'}]}},cardLayout:{defaultValue:{value:"null"},description:"",name:"cardLayout",required:!1,type:{name:"enum",value:[{value:'"split"'},{value:'"hover"'}]}},color:{defaultValue:{value:"plain"},description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"plain"'}]}},className:{defaultValue:{value:"null"},description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/imageWithCard/ImageWithCard.tsx#ImageWithCard"]={docgenInfo:ImageWithCard.__docgenInfo,name:"ImageWithCard",path:"src/components/imageWithCard/ImageWithCard.tsx#ImageWithCard"})}catch(__react_docgen_typescript_loader_error){}var placeholder_1920x1080=__webpack_require__("./src/assets/img/placeholder_1920x1080.jpg"),contentText="Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident.",content=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h2",{className:"heading-l",children:"Lorem ipsum"}),(0,jsx_runtime.jsx)("p",{style:{margin:"var(--spacing-l) 0"},children:contentText})]});const ImageWithCard_stories={component:ImageWithCard,title:"Components/ImageWithCard",parameters:{storySource:{source:"import React from 'react';\nimport { ArgsTable, Title } from '@storybook/addon-docs/blocks';\n\nimport { ImageWithCard } from './ImageWithCard';\nimport imageFile from '../../assets/img/placeholder_1920x1080.jpg';\n\nconst contentTitle = 'Lorem ipsum';\nconst contentText =\n 'Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident.';\n\nconst content = (\n <>\n

{contentTitle}

\n

{contentText}

\n \n);\n\nexport default {\n component: ImageWithCard,\n title: 'Components/ImageWithCard',\n parameters: {\n controls: { hideNoControlsWarning: true },\n layout: 'fullscreen',\n docs: {\n page: () => (\n <>\n Props\n \n \n ),\n },\n },\n};\n\nexport const Default = () => {content};\n\nexport const Hover = () => (\n \n {content}\n \n);\n\nexport const HoverFullWidth = () => (\n \n {content}\n \n);\nHoverFullWidth.storyName = 'Hover full width';\n\nexport const Split = () => (\n \n {content}\n \n);\n\nexport const SplitFullWidth = () => (\n \n {content}\n \n);\nSplitFullWidth.storyName = 'Split full width';\n\nexport const Playground = (args) => (\n \n

{args.title}

\n

{args.text}

\n \n);\n\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n title: contentTitle,\n text: contentText,\n color: 'plain',\n fullWidth: false,\n cardAlignment: 'left',\n cardLayout: null,\n};\n\nPlayground.argTypes = {\n color: {\n options: ['plain', 'primary', 'secondary', 'tertiary'],\n control: { type: 'radio' },\n },\n cardAlignment: {\n options: ['left', 'right'],\n control: { type: 'radio' },\n },\n cardLayout: {\n options: ['hover', 'split', null],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{default:{startLoc:{col:23,line:35},endLoc:{col:85,line:35},startBody:{col:23,line:35},endBody:{col:85,line:35}},hover:{startLoc:{col:21,line:37},endLoc:{col:1,line:41},startBody:{col:21,line:37},endBody:{col:1,line:41}},"hover-full-width":{startLoc:{col:30,line:43},endLoc:{col:1,line:47},startBody:{col:30,line:43},endBody:{col:1,line:47}},split:{startLoc:{col:21,line:50},endLoc:{col:1,line:54},startBody:{col:21,line:50},endBody:{col:1,line:54}},"split-full-width":{startLoc:{col:30,line:56},endLoc:{col:1,line:60},startBody:{col:30,line:56},endBody:{col:1,line:60}},playground:{startLoc:{col:26,line:63},endLoc:{col:1,line:74},startBody:{col:26,line:63},endBody:{col:1,line:74}}}},controls:{hideNoControlsWarning:!0},layout:"fullscreen",docs:{page:function page(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.Dx,{children:"Props"}),(0,jsx_runtime.jsx)(blocks.$4,{})]})}}}};var Default=function Default(){return(0,jsx_runtime.jsx)(ImageWithCard,{src:placeholder_1920x1080,children:content})},Hover=function Hover(){return(0,jsx_runtime.jsx)(ImageWithCard,{cardLayout:"hover",src:placeholder_1920x1080,children:content})},HoverFullWidth=function HoverFullWidth(){return(0,jsx_runtime.jsx)(ImageWithCard,{cardLayout:"hover",fullWidth:!0,src:placeholder_1920x1080,children:content})};HoverFullWidth.storyName="Hover full width";var Split=function Split(){return(0,jsx_runtime.jsx)(ImageWithCard,{cardLayout:"split",src:placeholder_1920x1080,children:content})},SplitFullWidth=function SplitFullWidth(){return(0,jsx_runtime.jsx)(ImageWithCard,{cardLayout:"split",fullWidth:!0,src:placeholder_1920x1080,children:content})};SplitFullWidth.storyName="Split full width";var Playground=function Playground(args){return(0,jsx_runtime.jsxs)(ImageWithCard,{color:args.color,cardAlignment:args.cardAlignment,fullWidth:args.fullWidth,cardLayout:args.cardLayout,src:placeholder_1920x1080,children:[(0,jsx_runtime.jsx)("h2",{style:{fontSize:"var(--fontsize-heading-l)"},children:args.title}),(0,jsx_runtime.jsx)("p",{style:{margin:"var(--spacing-l) 0"},children:args.text})]})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={title:"Lorem ipsum",text:contentText,color:"plain",fullWidth:!1,cardAlignment:"left",cardLayout:null},Playground.argTypes={color:{options:["plain","primary","secondary","tertiary"],control:{type:"radio"}},cardAlignment:{options:["left","right"],control:{type:"radio"}},cardLayout:{options:["hover","split",null],control:{type:"radio"}}},Default.parameters=(0,objectSpread2.Z)({storySource:{source:"() => {content}"}},Default.parameters),Hover.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},Hover.parameters),HoverFullWidth.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},HoverFullWidth.parameters),Split.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},Split.parameters),SplitFullWidth.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},SplitFullWidth.parameters),Playground.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => (\n \n

{args.title}

\n

{args.text}

\n \n)"}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/imageWithCard/ImageWithCard.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/imageWithCard/ImageWithCard.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/koros/Koros.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,Beat:()=>Beat,Calm:()=>Calm,CustomColor:()=>CustomColor,Dense:()=>Dense,ExactFit:()=>ExactFit,Flipped:()=>Flipped,Playground:()=>Playground,Pulse:()=>Pulse,Rotated:()=>Rotated,RotatedInContainer:()=>RotatedInContainer,Vibration:()=>Vibration,Wave:()=>Wave,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js")),_Koros__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/koros/Koros.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Koros__WEBPACK_IMPORTED_MODULE_3__.N,title:"Components/Koros",parameters:{storySource:{source:"import React from 'react';\nimport { ArgsTable, Stories, Title } from '@storybook/addon-docs/blocks';\n\nimport { getShapeHeight, Koros } from './Koros';\n\nexport default {\n component: Koros,\n title: 'Components/Koros',\n parameters: {\n controls: { hideNoControlsWarning: true },\n docs: {\n page: () => (\n <>\n Props\n \n \n \n ),\n },\n },\n};\n\nexport const Basic = () => ;\n\nexport const Beat = () => ;\n\nexport const Pulse = () => ;\n\nexport const Vibration = () => ;\n\nexport const Wave = () => ;\n\nexport const Calm = () => ;\n\nexport const Dense = () => (\n <>\n \n
\n \n
\n \n
\n \n
\n \n \n);\n\nexport const Flipped = (args) => (\n <>\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n);\n\nFlipped.args = {\n flipVertical: true,\n};\n\nexport const Rotated = (args) => ;\n\nRotated.args = {\n type: 'basic',\n flipVertical: false,\n rotate: '45deg',\n};\n\nexport const RotatedInContainer = () => {\n const rootStyle = { '--koros-height': '85px', '--hero-height': '300px', '--hero-width': '500px' };\n\n return (\n \n \n \n
\n );\n};\n\nexport const CustomColor = () => ;\n\nexport const ExactFit = (args) => {\n const korosProps = {\n style: { fill: 'var(--color-coat-of-arms)' },\n ...args,\n };\n\n const containerStyle = {\n height: `${getShapeHeight(korosProps)}px`,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'flex-end',\n } as React.CSSProperties;\n\n return (\n
\n \n
\n );\n};\n\nexport const Playground = (args) => ;\n\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n type: 'basic',\n flipVertical: false,\n rotate: '',\n};\n\nPlayground.argTypes = {\n type: {\n options: ['basic', 'beat', 'pulse', 'vibration', 'wave'],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{basic:{startLoc:{col:21,line:23},endLoc:{col:36,line:23},startBody:{col:21,line:23},endBody:{col:36,line:23}},beat:{startLoc:{col:20,line:25},endLoc:{col:47,line:25},startBody:{col:20,line:25},endBody:{col:47,line:25}},pulse:{startLoc:{col:21,line:27},endLoc:{col:49,line:27},startBody:{col:21,line:27},endBody:{col:49,line:27}},vibration:{startLoc:{col:25,line:29},endLoc:{col:57,line:29},startBody:{col:25,line:29},endBody:{col:57,line:29}},wave:{startLoc:{col:20,line:31},endLoc:{col:47,line:31},startBody:{col:20,line:31},endBody:{col:47,line:31}},calm:{startLoc:{col:20,line:33},endLoc:{col:47,line:33},startBody:{col:20,line:33},endBody:{col:47,line:33}},dense:{startLoc:{col:21,line:35},endLoc:{col:1,line:47},startBody:{col:21,line:35},endBody:{col:1,line:47}},flipped:{startLoc:{col:23,line:49},endLoc:{col:1,line:65},startBody:{col:23,line:49},endBody:{col:1,line:65}},rotated:{startLoc:{col:23,line:71},endLoc:{col:113,line:71},startBody:{col:23,line:71},endBody:{col:113,line:71}},"rotated-in-container":{startLoc:{col:34,line:79},endLoc:{col:1,line:114},startBody:{col:34,line:79},endBody:{col:1,line:114}},"custom-color":{startLoc:{col:27,line:116},endLoc:{col:88,line:116},startBody:{col:27,line:116},endBody:{col:88,line:116}},"exact-fit":{startLoc:{col:24,line:118},endLoc:{col:1,line:137},startBody:{col:24,line:118},endBody:{col:1,line:137}},playground:{startLoc:{col:26,line:139},endLoc:{col:116,line:139},startBody:{col:26,line:139},endBody:{col:116,line:139}}}},controls:{hideNoControlsWarning:!0},docs:{page:function page(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.Dx,{children:"Props"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.$4,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.fQ,{title:"Examples",includePrimary:!0})]})}}}};var Basic=function Basic(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{})},Beat=function Beat(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"beat"})},Pulse=function Pulse(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"pulse"})},Vibration=function Vibration(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"vibration"})},Wave=function Wave(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"wave"})},Calm=function Calm(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"calm"})},Dense=function Dense(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{dense:!0}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{dense:!0,type:"beat"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{dense:!0,type:"pulse"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{dense:!0,type:"vibration"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{dense:!0,type:"wave"})]})},Flipped=function Flipped(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{flipVertical:args.flipVertical}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"beat",flipVertical:args.flipVertical}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"pulse",flipVertical:args.flipVertical}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"vibration",flipVertical:args.flipVertical}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:"wave",flipVertical:args.flipVertical})]})};Flipped.args={flipVertical:!0};var Rotated=function Rotated(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:args.type,flipVertical:args.flipVertical,rotate:args.rotate})};Rotated.args={type:"basic",flipVertical:!1,rotate:"45deg"};var RotatedInContainer=function RotatedInContainer(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{style:(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},{"--koros-height":"85px","--hero-height":"300px","--hero-width":"500px"}),{},{backgroundColor:"var(--color-silver-light)",height:"var(--hero-height)",maxWidth:"100%",overflow:"hidden",position:"relative",width:"var(--hero-width)"}),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{backgroundColor:"var(--color-coat-of-arms)",clipPath:"polygon(0 0, var(--hero-height) 0, 0 100%, 0% 100%)",height:"100%"}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{style:{fill:"var(--color-coat-of-arms)",left:"calc(-1 * var(--koros-height))",position:"absolute",top:"var(--koros-height)",transformOrigin:"center",width:"calc(2 * var(--hero-height))"},rotate:"135deg"})]})},CustomColor=function CustomColor(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{style:{fill:"var(--color-coat-of-arms)"}})},ExactFit=function ExactFit(args){var korosProps=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({style:{fill:"var(--color-coat-of-arms)"}},args),containerStyle={height:"".concat((0,_Koros__WEBPACK_IMPORTED_MODULE_3__.X)(korosProps),"px"),overflow:"hidden",display:"flex",flexDirection:"row",justifyContent:"flex-end"};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:containerStyle,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},korosProps))})},Playground=function Playground(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Koros__WEBPACK_IMPORTED_MODULE_3__.N,{type:args.type,flipVertical:args.flipVertical,rotate:args.rotate})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={type:"basic",flipVertical:!1,rotate:""},Playground.argTypes={type:{options:["basic","beat","pulse","vibration","wave"],control:{type:"radio"}}},Basic.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => "}},Basic.parameters),Beat.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Beat.parameters),Pulse.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Pulse.parameters),Vibration.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Vibration.parameters),Wave.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Wave.parameters),Calm.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Calm.parameters),Dense.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => (\n <>\n \n
\n \n
\n \n
\n \n
\n \n \n)'}},Dense.parameters),Flipped.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'(args) => (\n <>\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n)'}},Flipped.parameters),Rotated.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => "}},Rotated.parameters),RotatedInContainer.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => {\n const rootStyle = { '--koros-height': '85px', '--hero-height': '300px', '--hero-width': '500px' };\n\n return (\n \n \n \n
\n );\n}"}},RotatedInContainer.parameters),CustomColor.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => "}},CustomColor.parameters),ExactFit.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => {\n const korosProps = {\n style: { fill: 'var(--color-coat-of-arms)' },\n ...args,\n };\n\n const containerStyle = {\n height: `${getShapeHeight(korosProps)}px`,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'flex-end',\n } as React.CSSProperties;\n\n return (\n
\n \n
\n );\n}"}},ExactFit.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => "}},Playground.parameters);try{Flipped.displayName="Flipped",Flipped.__docgenInfo={description:"",displayName:"Flipped",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/koros/Koros.stories.tsx#Flipped"]={docgenInfo:Flipped.__docgenInfo,name:"Flipped",path:"src/components/koros/Koros.stories.tsx#Flipped"})}catch(__react_docgen_typescript_loader_error){}try{Rotated.displayName="Rotated",Rotated.__docgenInfo={description:"",displayName:"Rotated",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/koros/Koros.stories.tsx#Rotated"]={docgenInfo:Rotated.__docgenInfo,name:"Rotated",path:"src/components/koros/Koros.stories.tsx#Rotated"})}catch(__react_docgen_typescript_loader_error){}try{ExactFit.displayName="ExactFit",ExactFit.__docgenInfo={description:"",displayName:"ExactFit",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/koros/Koros.stories.tsx#ExactFit"]={docgenInfo:ExactFit.__docgenInfo,name:"ExactFit",path:"src/components/koros/Koros.stories.tsx#ExactFit"})}catch(__react_docgen_typescript_loader_error){}try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/koros/Koros.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/koros/Koros.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/link/Link.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,ExternalLinks:()=>ExternalLinks,InternalLinks:()=>InternalLinks,OpenInNewTabLink:()=>OpenInNewTabLink,default:()=>__WEBPACK_DEFAULT_EXPORT__,inlineLinks:()=>inlineLinks,standaloneLink:()=>standaloneLink,visitedStylesDisabled:()=>visitedStylesDisabled,withCustomIcon:()=>withCustomIcon});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Link__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/link/Link.tsx")),_icons__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/icons/IconDocument.tsx"),_icons__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/icons/IconPhone.tsx"),_icons__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/icons/IconEnvelope.tsx"),_icons__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/icons/IconPhoto.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Link__WEBPACK_IMPORTED_MODULE_2__.r,title:"Components/Link",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"600px"},children:storyFn()})}],parameters:{storySource:{source:'import React from \'react\';\n\nimport { Link } from \'./Link\';\nimport { IconDocument, IconEnvelope, IconPhone, IconPhoto } from \'../../icons\';\n\nexport default {\n component: Link,\n title: \'Components/Link\',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n args: {\n href: \'/?path=/docs/components-link--internal-links\',\n },\n};\n\nexport const Default = (args) => Default link;\n\nexport const InternalLinks = (args) => {\n return (\n <>\n \n Internal link size S\n \n
\n
\n \n Internal link size M\n \n
\n
\n \n Internal link size L\n \n \n );\n};\nInternalLinks.storyName = \'Internal links\';\nInternalLinks.argTypes = {\n size: {\n control: false,\n },\n external: {\n control: false,\n },\n};\n\nexport const ExternalLinks = (args) => {\n return (\n <>\n \n External link size S\n \n
\n
\n \n External link size M\n \n
\n
\n \n External link size L\n \n \n );\n};\n\nExternalLinks.storyName = \'External links\';\nExternalLinks.argTypes = {\n size: {\n control: false,\n },\n external: {\n control: false,\n },\n};\n\nexport const OpenInNewTabLink = (args) => (\n \n Link that opens in a new tab\n \n);\nOpenInNewTabLink.storyName = \'Link that opens in a new tab\';\nOpenInNewTabLink.args = {\n openInNewTabAriaLabel: \'Opens in a new tab.\',\n openInExternalDomainAriaLabel: \'Opens a different website\',\n openInNewTab: true,\n external: true,\n};\n\nexport const visitedStylesDisabled = (args) => (\n \n Link without visited styles\n \n);\nvisitedStylesDisabled.storyName = \'Link without visited styles\';\nvisitedStylesDisabled.args = {\n disableVisitedStyles: true,\n};\n\nexport const inlineLinks = (args) => {\n return (\n <>\n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore\n magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n \n Inline link\n \n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\n pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est\n laborum.\n

\n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore\n magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n \n Inline link\n \n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\n pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est\n laborum.\n

\n \n );\n};\n\ninlineLinks.storyName = \'Inline links\';\ninlineLinks.argTypes = {\n size: {\n control: false,\n },\n};\n\nexport const standaloneLink = (args) => {\n return (\n \n Standalone link\n \n );\n};\n\nstandaloneLink.storyName = \'Standalone link\';\n\nexport const withCustomIcon = (args) => {\n return (\n
\n
\n

Small

\n } size="S" href="/#">\n Document link\n \n
\n
\n } size="S" href="/#">\n Phone link\n \n
\n
\n } size="S" href="/#">\n Envelope link\n \n
\n
\n } size="S" href="/#">\n Photo link\n \n
\n
\n

Medium

\n } size="M" href="/#">\n Document link\n \n
\n
\n } size="M" href="/#">\n Phone link\n \n
\n
\n } size="M" href="/#">\n Envelope link\n \n
\n
\n } size="M" href="/#">\n Photo link\n \n
\n
\n

Large

\n } size="L" href="/#">\n Document link\n \n
\n
\n } size="L" href="/#">\n Phone Link\n \n
\n
\n } size="L" href="/#">\n Envelope Link\n \n
\n
\n } size="L" href="/#">\n Photo Link\n \n
\n
\n );\n};\n\nwithCustomIcon.storyName = \'With a custom icon\';\nwithCustomIcon.argTypes = {\n size: {\n control: false,\n },\n};\n',locationsMap:{default:{startLoc:{col:23,line:18},endLoc:{col:68,line:18},startBody:{col:23,line:18},endBody:{col:68,line:18}},"internal-links":{startLoc:{col:29,line:20},endLoc:{col:1,line:38},startBody:{col:29,line:20},endBody:{col:1,line:38}},"external-links":{startLoc:{col:29,line:49},endLoc:{col:1,line:85},startBody:{col:29,line:49},endBody:{col:1,line:85}},"open-in-new-tab-link":{startLoc:{col:32,line:97},endLoc:{col:1,line:108},startBody:{col:32,line:97},endBody:{col:1,line:108}},"visited-styles-disabled":{startLoc:{col:37,line:117},endLoc:{col:1,line:121},startBody:{col:37,line:117},endBody:{col:1,line:121}},"inline-links":{startLoc:{col:27,line:127},endLoc:{col:1,line:152},startBody:{col:27,line:127},endBody:{col:1,line:152}},"standalone-link":{startLoc:{col:30,line:161},endLoc:{col:1,line:167},startBody:{col:30,line:161},endBody:{col:1,line:167}},"with-custom-icon":{startLoc:{col:30,line:171},endLoc:{col:1,line:239},startBody:{col:30,line:171},endBody:{col:1,line:239}}}},controls:{expanded:!0}},args:{href:"/?path=/docs/components-link--internal-links"}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{children:"Default link"}))},InternalLinks=function InternalLinks(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{href:args.href,size:"S",children:"Internal link size S"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{href:args.href,size:"M",children:"Internal link size M"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{href:args.href,size:"L",children:"Internal link size L"}))]})};InternalLinks.storyName="Internal links",InternalLinks.argTypes={size:{control:!1},external:{control:!1}};var ExternalLinks=function ExternalLinks(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{external:!0,openInExternalDomainAriaLabel:"Opens a different website",size:"S",href:"https://hds.hel.fi",children:"External link size S"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{external:!0,openInExternalDomainAriaLabel:"Opens a different website",size:"M",href:"https://hds.hel.fi",children:"External link size M"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{external:!0,openInExternalDomainAriaLabel:"Opens a different website",size:"L",href:"https://hds.hel.fi",children:"External link size L"}))]})};ExternalLinks.storyName="External links",ExternalLinks.argTypes={size:{control:!1},external:{control:!1}};var OpenInNewTabLink=function OpenInNewTabLink(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{href:"https://hds.hel.fi",external:args.external,openInExternalDomainAriaLabel:args.openInExternalDomainAriaLabel,openInNewTabAriaLabel:args.openInNewTabAriaLabel,openInNewTab:args.openInNewTab,children:"Link that opens in a new tab"}))};OpenInNewTabLink.storyName="Link that opens in a new tab",OpenInNewTabLink.args={openInNewTabAriaLabel:"Opens in a new tab.",openInExternalDomainAriaLabel:"Opens a different website",openInNewTab:!0,external:!0};var visitedStylesDisabled=function visitedStylesDisabled(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{href:args.href,disableVisitedStyles:args.disableVisitedStyles,children:"Link without visited styles"}))};visitedStylesDisabled.storyName="Link without visited styles",visitedStylesDisabled.args={disableVisitedStyles:!0};var inlineLinks=function inlineLinks(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{style:{fontSize:"14px"},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({size:"S"},args),{},{external:!0,openInExternalDomainAriaLabel:"Opens a different website",children:"Inline link"})),"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{style:{fontSize:"16px"},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{external:!0,openInExternalDomainAriaLabel:"Opens a different website",children:"Inline link"})),"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."]})]})};inlineLinks.storyName="Inline links",inlineLinks.argTypes={size:{control:!1}};var standaloneLink=function standaloneLink(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{size:"L",style:{display:"block",marginBottom:"20px",width:"fit-content"},children:"Standalone link"}))};standaloneLink.storyName="Standalone link";var withCustomIcon=function withCustomIcon(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"grid",columnGap:"10px",gridTemplateColumns:"1fr 1fr 1fr"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:"Small"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_4__.IconDocument,{size:"xs","aria-hidden":!0}),size:"S",href:"/#",children:"Document link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_5__.IconPhone,{size:"xs","aria-hidden":!0}),size:"S",href:"/#",children:"Phone link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_6__.IconEnvelope,{size:"xs","aria-hidden":!0}),size:"S",href:"/#",children:"Envelope link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_7__.IconPhoto,{size:"xs","aria-hidden":!0}),size:"S",href:"/#",children:"Photo link"}))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:"Medium"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_4__.IconDocument,{size:"s","aria-hidden":!0}),size:"M",href:"/#",children:"Document link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_5__.IconPhone,{size:"s","aria-hidden":!0}),size:"M",href:"/#",children:"Phone link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_6__.IconEnvelope,{size:"s","aria-hidden":!0}),size:"M",href:"/#",children:"Envelope link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_7__.IconPhoto,{size:"s","aria-hidden":!0}),size:"M",href:"/#",children:"Photo link"}))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:"Large"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_4__.IconDocument,{size:"l","aria-hidden":!0}),size:"L",href:"/#",children:"Document link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_5__.IconPhone,{size:"l","aria-hidden":!0}),size:"L",href:"/#",children:"Phone Link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_6__.IconEnvelope,{size:"l","aria-hidden":!0}),size:"L",href:"/#",children:"Envelope Link"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_2__.r,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{iconLeft:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_7__.IconPhoto,{size:"l","aria-hidden":!0}),size:"L",href:"/#",children:"Photo Link"}))]})]})};withCustomIcon.storyName="With a custom icon",withCustomIcon.argTypes={size:{control:!1}},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => Default link"}},Default.parameters),InternalLinks.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => {\n return (\n <>\n \n Internal link size S\n \n
\n
\n \n Internal link size M\n \n
\n
\n \n Internal link size L\n \n \n );\n}'}},InternalLinks.parameters),ExternalLinks.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => {\n return (\n <>\n \n External link size S\n \n
\n
\n \n External link size M\n \n
\n
\n \n External link size L\n \n \n );\n}'}},ExternalLinks.parameters),OpenInNewTabLink.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => (\n \n Link that opens in a new tab\n \n)'}},OpenInNewTabLink.parameters),visitedStylesDisabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => (\n \n Link without visited styles\n \n)"}},visitedStylesDisabled.parameters),inlineLinks.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => {\n return (\n <>\n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore\n magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n \n Inline link\n \n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\n pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est\n laborum.\n

\n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore\n magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n \n Inline link\n \n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\n pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est\n laborum.\n

\n \n );\n}'}},inlineLinks.parameters),standaloneLink.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n return (\n \n Standalone link\n \n );\n}"}},standaloneLink.parameters),withCustomIcon.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'(args) => {\n return (\n
\n
\n

Small

\n } size="S" href="/#">\n Document link\n \n
\n
\n } size="S" href="/#">\n Phone link\n \n
\n
\n } size="S" href="/#">\n Envelope link\n \n
\n
\n } size="S" href="/#">\n Photo link\n \n
\n
\n

Medium

\n } size="M" href="/#">\n Document link\n \n
\n
\n } size="M" href="/#">\n Phone link\n \n
\n
\n } size="M" href="/#">\n Envelope link\n \n
\n
\n } size="M" href="/#">\n Photo link\n \n
\n
\n

Large

\n } size="L" href="/#">\n Document link\n \n
\n
\n } size="L" href="/#">\n Phone Link\n \n
\n
\n } size="L" href="/#">\n Envelope Link\n \n
\n
\n } size="L" href="/#">\n Photo Link\n \n
\n
\n );\n}'}},withCustomIcon.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/link/Link.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{InternalLinks.displayName="InternalLinks",InternalLinks.__docgenInfo={description:"",displayName:"InternalLinks",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#InternalLinks"]={docgenInfo:InternalLinks.__docgenInfo,name:"InternalLinks",path:"src/components/link/Link.stories.tsx#InternalLinks"})}catch(__react_docgen_typescript_loader_error){}try{ExternalLinks.displayName="ExternalLinks",ExternalLinks.__docgenInfo={description:"",displayName:"ExternalLinks",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#ExternalLinks"]={docgenInfo:ExternalLinks.__docgenInfo,name:"ExternalLinks",path:"src/components/link/Link.stories.tsx#ExternalLinks"})}catch(__react_docgen_typescript_loader_error){}try{OpenInNewTabLink.displayName="OpenInNewTabLink",OpenInNewTabLink.__docgenInfo={description:"",displayName:"OpenInNewTabLink",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#OpenInNewTabLink"]={docgenInfo:OpenInNewTabLink.__docgenInfo,name:"OpenInNewTabLink",path:"src/components/link/Link.stories.tsx#OpenInNewTabLink"})}catch(__react_docgen_typescript_loader_error){}try{visitedStylesDisabled.displayName="visitedStylesDisabled",visitedStylesDisabled.__docgenInfo={description:"",displayName:"visitedStylesDisabled",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#visitedStylesDisabled"]={docgenInfo:visitedStylesDisabled.__docgenInfo,name:"visitedStylesDisabled",path:"src/components/link/Link.stories.tsx#visitedStylesDisabled"})}catch(__react_docgen_typescript_loader_error){}try{inlineLinks.displayName="inlineLinks",inlineLinks.__docgenInfo={description:"",displayName:"inlineLinks",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#inlineLinks"]={docgenInfo:inlineLinks.__docgenInfo,name:"inlineLinks",path:"src/components/link/Link.stories.tsx#inlineLinks"})}catch(__react_docgen_typescript_loader_error){}try{standaloneLink.displayName="standaloneLink",standaloneLink.__docgenInfo={description:"",displayName:"standaloneLink",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#standaloneLink"]={docgenInfo:standaloneLink.__docgenInfo,name:"standaloneLink",path:"src/components/link/Link.stories.tsx#standaloneLink"})}catch(__react_docgen_typescript_loader_error){}try{withCustomIcon.displayName="withCustomIcon",withCustomIcon.__docgenInfo={description:"",displayName:"withCustomIcon",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/link/Link.stories.tsx#withCustomIcon"]={docgenInfo:withCustomIcon.__docgenInfo,name:"withCustomIcon",path:"src/components/link/Link.stories.tsx#withCustomIcon"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/linkbox/LinkboxEmpty.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,External:()=>External,LargeSize:()=>LargeSize,MediumSize:()=>MediumSize,SmallSize:()=>SmallSize,WithBorder:()=>WithBorder,WithoutBackground:()=>WithoutBackground,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Linkbox__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/linkbox/Linkbox.tsx")),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,title:"Components/Linkbox/Empty for custom content",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:'import React from \'react\';\n\nimport { Linkbox } from \'./Linkbox\';\n\nexport default {\n component: Linkbox,\n title: \'Components/Linkbox/Empty for custom content\',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n backgrounds: {\n default: \'gray\',\n values: [{ name: \'gray\', value: \'#efefef\' }],\n },\n controls: { expanded: true },\n },\n};\n\nexport const Default = () => (\n
\n \n
\n \n
\n);\n\nexport const WithBorder = () => (\n
\n \n
\n \n
\n);\n\nexport const WithoutBackground = () => (\n
\n \n
\n \n
\n);\n\nexport const External = () => (\n
\n \n
\n \n
\n);\n\nexport const SmallSize = () => (\n
\n \n
\n \n
\n);\n\nexport const MediumSize = () => (\n
\n \n
\n \n
\n);\n\nexport const LargeSize = () => (\n
\n \n
\n \n
\n);\n',locationsMap:{default:{startLoc:{col:23,line:18},endLoc:{col:1,line:24},startBody:{col:23,line:18},endBody:{col:1,line:24}},"with-border":{startLoc:{col:26,line:26},endLoc:{col:1,line:32},startBody:{col:26,line:26},endBody:{col:1,line:32}},"without-background":{startLoc:{col:33,line:34},endLoc:{col:1,line:40},startBody:{col:33,line:34},endBody:{col:1,line:40}},external:{startLoc:{col:24,line:42},endLoc:{col:1,line:48},startBody:{col:24,line:42},endBody:{col:1,line:48}},"small-size":{startLoc:{col:25,line:50},endLoc:{col:1,line:56},startBody:{col:25,line:50},endBody:{col:1,line:56}},"medium-size":{startLoc:{col:26,line:58},endLoc:{col:1,line:64},startBody:{col:26,line:58},endBody:{col:1,line:64}},"large-size":{startLoc:{col:25,line:66},endLoc:{col:1,line:72},startBody:{col:25,line:66},endBody:{col:1,line:72}}}},backgrounds:{default:"gray",values:[{name:"gray",value:"#efefef"}]},controls:{expanded:!0}}};var Default=function Default(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"224px"}})})})},WithBorder=function WithBorder(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",border:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"224px"}})})})},WithoutBackground=function WithoutBackground(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",noBackground:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"224px"}})})})},External=function External(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",external:!0,openInNewTab:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"224px"}})})})},SmallSize=function SmallSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"288px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",size:"small",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"192px"}})})})},MediumSize=function MediumSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",size:"medium",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"224px"}})})})},LargeSize=function LargeSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"400px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",size:"large",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{height:"296px"}})})})};Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},Default.parameters),WithBorder.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},WithBorder.parameters),WithoutBackground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},WithoutBackground.parameters),External.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},External.parameters),SmallSize.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},SmallSize.parameters),MediumSize.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},MediumSize.parameters),LargeSize.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n \n
\n)'}},LargeSize.parameters)},"./src/components/linkbox/LinkboxWithHeadingAndTitle.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,External:()=>External,LargeSize:()=>LargeSize,MediumSize:()=>MediumSize,SmallSize:()=>SmallSize,WithBorder:()=>WithBorder,WithoutBackground:()=>WithoutBackground,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Linkbox__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/linkbox/Linkbox.tsx")),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,title:"Components/Linkbox/With text and heading",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:'import React from \'react\';\n\nimport { Linkbox } from \'./Linkbox\';\n\nexport default {\n component: Linkbox,\n title: \'Components/Linkbox/With text and heading\',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n backgrounds: {\n default: \'gray\',\n values: [{ name: \'gray\', value: \'#efefef\' }],\n },\n controls: { expanded: true },\n },\n};\n\nexport const Default = () => (\n
\n \n
\n);\n\nexport const WithBorder = () => (\n
\n \n
\n);\n\nexport const WithoutBackground = () => (\n
\n \n
\n);\n\nexport const External = () => (\n
\n \n
\n);\n\nexport const SmallSize = () => (\n
\n \n
\n);\n\nexport const MediumSize = () => (\n
\n \n
\n);\n\nexport const LargeSize = () => (\n \n);\n',locationsMap:{default:{startLoc:{col:23,line:18},endLoc:{col:1,line:28},startBody:{col:23,line:18},endBody:{col:1,line:28}},"with-border":{startLoc:{col:26,line:30},endLoc:{col:1,line:41},startBody:{col:26,line:30},endBody:{col:1,line:41}},"without-background":{startLoc:{col:33,line:43},endLoc:{col:1,line:54},startBody:{col:33,line:43},endBody:{col:1,line:54}},external:{startLoc:{col:24,line:56},endLoc:{col:1,line:68},startBody:{col:24,line:56},endBody:{col:1,line:68}},"small-size":{startLoc:{col:25,line:70},endLoc:{col:1,line:81},startBody:{col:25,line:70},endBody:{col:1,line:81}},"medium-size":{startLoc:{col:26,line:83},endLoc:{col:1,line:94},startBody:{col:26,line:83},endBody:{col:1,line:94}},"large-size":{startLoc:{col:25,line:96},endLoc:{col:1,line:105},startBody:{col:25,line:96},endBody:{col:1,line:105}}}},backgrounds:{default:"gray",values:[{name:"gray",value:"#efefef"}]},controls:{expanded:!0}}};var Default=function Default(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text"})})},WithBorder=function WithBorder(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",border:!0})})},WithoutBackground=function WithoutBackground(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",noBackground:!0})})},External=function External(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",external:!0,openInNewTab:!0})})},SmallSize=function SmallSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"288px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",size:"small"})})},MediumSize=function MediumSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"320px"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",size:"medium"})})},LargeSize=function LargeSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Linkbox__WEBPACK_IMPORTED_MODULE_2__.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",size:"large"})};Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},Default.parameters),WithBorder.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},WithBorder.parameters),WithoutBackground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},WithoutBackground.parameters),External.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},External.parameters),SmallSize.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},SmallSize.parameters),MediumSize.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},MediumSize.parameters),LargeSize.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n)'}},LargeSize.parameters)},"./src/components/linkbox/LinkboxWithImage.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,External:()=>External,LargeSize:()=>LargeSize,MediumSize:()=>MediumSize,SmallSize:()=>SmallSize,WithBorder:()=>WithBorder,WithoutBackground:()=>WithoutBackground,default:()=>LinkboxWithImage_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),Linkbox=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/linkbox/Linkbox.tsx"));const placeholder_medium_namespaceObject=__webpack_require__.p+"f3b374ad3ff135c4f79b.png",placeholder_large_namespaceObject=__webpack_require__.p+"ac06baf0acb35bb93c0b.png";var jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js");const LinkboxWithImage_stories={component:Linkbox.R,title:"Components/Linkbox/With image",decorators:[function(storyFn){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"567px"},children:storyFn()})}],parameters:{storySource:{source:'import React from \'react\';\n\nimport { Linkbox } from \'./Linkbox\';\n\n// @ts-ignore\nimport smallImage from \'../../assets/img/linkbox/placeholder-small.png\';\n// @ts-ignore\nimport mediumImage from \'../../assets/img/linkbox/placeholder-medium.png\';\n// @ts-ignore\nimport largeImage from \'../../assets/img/linkbox/placeholder-large.png\';\n\n\nexport default {\n component: Linkbox,\n title: \'Components/Linkbox/With image\',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n backgrounds: {\n default: \'gray\',\n values: [{ name: \'gray\', value: \'#efefef\' }],\n },\n controls: { expanded: true },\n },\n};\n\nexport const Default = () => (\n
\n \n
\n);\n\nexport const WithBorder = () => (\n
\n \n
\n);\n\nexport const WithoutBackground = () => (\n
\n \n
\n);\n\nexport const External = () => (\n
\n \n
\n);\n\nexport const SmallSize = () => (\n
\n \n
\n);\n\nexport const MediumSize = () => (\n
\n \n
\n);\n\nexport const LargeSize = () => (\n
\n \n
\n);\n',locationsMap:{default:{startLoc:{col:23,line:26},endLoc:{col:1,line:37},startBody:{col:23,line:26},endBody:{col:1,line:37}},"with-border":{startLoc:{col:26,line:39},endLoc:{col:1,line:51},startBody:{col:26,line:39},endBody:{col:1,line:51}},"without-background":{startLoc:{col:33,line:53},endLoc:{col:1,line:65},startBody:{col:33,line:53},endBody:{col:1,line:65}},external:{startLoc:{col:24,line:67},endLoc:{col:1,line:80},startBody:{col:24,line:67},endBody:{col:1,line:80}},"small-size":{startLoc:{col:25,line:82},endLoc:{col:1,line:94},startBody:{col:25,line:82},endBody:{col:1,line:94}},"medium-size":{startLoc:{col:26,line:96},endLoc:{col:1,line:108},startBody:{col:26,line:96},endBody:{col:1,line:108}},"large-size":{startLoc:{col:25,line:110},endLoc:{col:1,line:122},startBody:{col:25,line:110},endBody:{col:1,line:122}}}},backgrounds:{default:"gray",values:[{name:"gray",value:"#efefef"}]},controls:{expanded:!0}}};var Default=function Default(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"384px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",imgProps:{src:placeholder_medium_namespaceObject,width:384,height:245}})})},WithBorder=function WithBorder(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"384px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",border:!0,imgProps:{src:placeholder_medium_namespaceObject,width:384,height:245}})})},WithoutBackground=function WithoutBackground(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"384px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",noBackground:!0,imgProps:{src:placeholder_medium_namespaceObject,width:384,height:245}})})},External=function External(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"384px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",external:!0,openInNewTab:!0,imgProps:{src:placeholder_medium_namespaceObject,width:384,height:245}})})},SmallSize=function SmallSize(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"284px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",imgProps:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAHCCAYAAAAzc7dkAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAACWKADAAQAAAABAAABwgAAAACRdu29AAAc8klEQVR4Ae3dS4uc1RYG4N0mIEGNQkwcaSSCE02UoCMRFceKmQUkEgj+DsnvEEGcmIGIoJmIouhIRMEbIYoJUYPE28ALGWjMYZd00+lUPFXlWl1ff+spELs7VW/VetYevNSle+X8+fOXmwsBAgQIECBAgECYwHVhSYIIECBAgAABAgQmAgqWg0CAAAECBAgQCBZQsIJBxREgQIAAAQIEFCxngAABAgQIECAQLKBgBYOKI0CAAAECBAgoWM4AAQIECBAgQCBYQMEKBhVHgAABAgQIEFCwnAECBAgQIECAQLCAghUMKo4AAQIECBAgoGA5AwQIECBAgACBYAEFKxhUHAECBAgQIEBAwXIGCBAgQIAAAQLBAgpWMKg4AgQIECBAgICC5QwQIECAAAECBIIFFKxgUHEECBAgQIAAAQXLGSBAgAABAgQIBAsoWMGg4ggQIECAAAECCpYzQIAAAQIECBAIFlCwgkHFESBAgAABAgQULGeAAAECBAgQIBAsoGAFg4ojQIAAAQIECChYzgABAgQIECBAIFhAwQoGFUeAAAECBAgQULCcAQIECBAgQIBAsICCFQwqjgABAgQIECCgYDkDBAgQIECAAIFgAQUrGFQcAQIECBAgQEDBcgYIECBAgAABAsECClYwqDgCBAgQIECAgILlDBAgQIAAAQIEggUUrGBQcQQIECBAgAABBcsZIECAAAECBAgECyhYwaDiCBAgQIAAAQIKljNAgAABAgQIEAgWULCCQcURIECAAAECBBQsZ4AAAQIECBAgECygYAWDiiNAgAABAgQIKFjOAAECBAgQIEAgWEDBCgYVR4AAAQIECBBQsJwBAgQIECBAgECwgIIVDCqOAAECBAgQIKBgOQMECBAgQIAAgWABBSsYVBwBAgQIECBAQMFyBggQIECAAAECwQIKVjCoOAIECBAgQICAguUMECBAgAABAgSCBRSsYFBxBAgQIECAAAEFyxkgQIAAAQIECAQLKFjBoOIIECBAgAABAgqWM0CAAAECBAgQCBZQsIJBxREgQIAAAQIEFCxngAABAgQIECAQLKBgBYOKI0CAAAECBAgoWM4AAQIECBAgQCBYQMEKBhVHgAABAgQIEFCwnAECBAgQIECAQLCAghUMKo4AAQIECBAgoGA5AwQIECBAgACBYAEFKxhUHAECBAgQIEBAwXIGCBAgQIAAAQLBAgpWMKg4AgQIECBAgICC5QwQIECAAAECBIIFFKxgUHEECBAgQIAAAQXLGSBAgAABAgQIBAsoWMGg4ggQIECAAAECCpYzQIAAAQIECBAIFlCwgkHFESBAgAABAgQULGeAAAECBAgQIBAsoGAFg4ojQIAAAQIECChYzgABAgQIECBAIFhAwQoGFUeAAAECBAgQULCcAQIECBAgQIBAsICCFQwqjgABAgQIECCgYDkDBAgQIECAAIFgAQUrGFQcAQIECBAgQEDBcgYIECBAgAABAsECClYwqDgCBAgQIECAgILlDBAgQIAAAQIEggUUrGBQcQQIECBAgAABBcsZIECAAAECBAgECyhYwaDiCBAgQIAAAQIKljNAgAABAgQIEAgWULCCQcURIECAAAECBBQsZ4AAAQIECBAgECygYAWDiiNAgAABAgQIKFjOAAECBAgQIEAgWEDBCgYVR4AAAQIECBBQsJwBAgQIECBAgECwgIIVDCqOAAECBAgQIKBgOQMECBAgQIAAgWABBSsYVBwBAgQIECBAQMFyBggQIECAAAECwQIKVjCoOAIECBAgQICAguUMECBAgAABAgSCBRSsYFBxBAgQIECAAAEFyxkgQIAAAQIECAQLKFjBoOIIECBAgAABAgqWM0CAAAECBAgQCBZQsIJBxREgQIAAAQIEFCxngAABAgQIECAQLKBgBYOKI0CAAAECBAgoWM4AAQIECBAgQCBYQMEKBhVHgAABAgQIEFCwnAECBAgQIECAQLCAghUMKo4AAQIECBAgoGA5AwQIECBAgACBYAEFKxhUHAECBAgQIEBAwXIGCBAgQIAAAQLBAgpWMKg4AgQIECBAgICC5QwQIECAAAECBIIFFKxgUHEECBAgQIAAAQXLGSBAgAABAgQIBAsoWMGg4ggQIECAAAECCpYzQIAAAQIECBAIFlCwgkHFESBAgAABAgQULGeAAAECBAgQIBAsoGAFg4ojQIAAAQIECChYzgABAgQIECBAIFhAwQoGFUeAAAECBAgQULCcAQIECBAgQIBAsICCFQwqjgABAgQIECCgYDkDBAgQIECAAIFgAQUrGFQcAQIECBAgQEDBcgYIECBAgAABAsECClYwqDgCBAgQIECAgILlDBAgQIAAAQIEggUUrGBQcQQIECBAgAABBcsZIECAAAECBAgECyhYwaDiCBAgQIAAAQIKljNAgAABAgQIEAgWULCCQcURIECAAAECBBQsZ4AAAQIECBAgECygYAWDiiNAgAABAgQIKFjOAAECBAgQIEAgWEDBCgYVR4AAAQIECBBQsJwBAgQIECBAgECwgIIVDCqOAAECBAgQIKBgOQMECBAgQIAAgWABBSsYVBwBAgQIECBAQMFyBggQIECAAAECwQIKVjCoOAIECBAgQICAguUMECBAgAABAgSCBRSsYFBxBAgQIECAAAEFyxkgQIAAAQIECAQLKFjBoOIIECBAgAABAgqWM0CAAAECBAgQCBZQsIJBxREgQIAAAQIEFCxngAABAgQIECAQLKBgBYOKI0CAAAECBAgoWM4AAQIECBAgQCBYQMEKBhVHgAABAgQIEFCwnAECBAgQIECAQLCAghUMKo4AAQIECBAgoGA5AwQIECBAgACBYAEFKxhUHAECBAgQIEBAwXIGCBAgQIAAAQLBAgpWMKg4AgQIECBAgICC5QwQIECAAAECBIIFFKxgUHEECBAgQIAAAQXLGSBAgAABAgQIBAsoWMGg4ggQIECAAAECCpYzQIAAAQIECBAIFlCwgkHFESBAgAABAgQULGeAAAECBAgQIBAsoGAFg4ojQIAAAQIECChYzgABAgQIECBAIFhAwQoGFUeAAAECBAgQULCcAQIECBAgQIBAsICCFQwqjgABAgQIECCgYDkDBAgQIECAAIFgAQUrGFQcAQIECBAgQEDBcgYIECBAgAABAsECClYwqDgCBAgQIECAgILlDBAgQIAAAQIEggUUrGBQcQQIECBAgAABBcsZIECAAAECBAgECyhYwaDiCBAgQIAAAQIKljNAgAABAgQIEAgWULCCQcURIECAAAECBBQsZ4AAAQIECBAgECygYAWDiiNAgAABAgQIKFjOAAECBAgQIEAgWEDBCgYVR4AAAQIECBBQsJwBAgQIECBAgECwgIIVDCqOAAECBAgQIKBgOQMECBAgQIAAgWABBSsYVBwBAgQIECBAQMFyBggQIECAAAECwQIKVjCoOAIECBAgQICAguUMECBAgAABAgSCBRSsYFBxBAgQIECAAAEFyxkgQIAAAQIECAQLKFjBoOIIECBAgAABAgqWM0CAAAECBAgQCBbYHpwnjgCBwgLHjx/f0tM/99xzW/rxe/AECAxHwDNYw9mFR0KAAAECBAiMREDBGskijUGAAAECBAgMR0DBGs4uPBICBAgQIEBgJAIK1kgWaQwCBAgQIEBgOAIK1nB24ZEQIECAAAECIxHwKcKRLNIYBIYsMLRP5231TzsOedceGwEC/wh4BstJIECAAAECBAgECyhYwaDiCBAgQIAAAQIKljNAgAABAgQIEAgWULCCQcURIECAAAECBBQsZ4AAAQIECBAgECzgU4TBoOIIEJhf4MyZM+2LL75o33zzTfv1118nATt37mx33HFHu+eee9q+ffvmD3ULAgQILFFAwVoivrsmUF3g559/bq+//no7d+7cVRQ//fRT6/99/PHHbe/eve2JJ55ou3btuup6fkCAAIEhCniJcIhb8ZgIFBDoz1a98MILU8vVxvF7AevX7bdxIUCAwFYQULC2wpY8RgIjE+jPXJ04caJdvHhx5sn6dftt+m1dCBAgMHQBBWvoG/L4CIxQoL8sOE+5WiXot+m3dSFAgMDQBRSsoW/I4yMwMoH+hvZp77madcx+257hQoAAgSELeJP7kLfjsREYoUD/tOC0y7Zt29pjjz3WDhw4MPnnTz/9tL3zzjvt0qVLV129Z/hk4VUsfkCAwIAEFKwBLcNDIVBB4FpvVO/l6qGHHlojWP36rbfeWvvZ6hfXylj9d/8nQIDAsgW8RLjsDbh/AsUEVn/P1caxV5+5Wv/zaT/r/36tjPW39TUBAgSWKaBgLVPffRMgQIAAAQKjFFCwRrlWQxEYrkD/De3TLv09Vxsv037Wr3OtjI239z0BAgSWJeA9WMuSd78Eigr0P3/Tf0P7xkt/Q3u/rL4suPom943X69/3DBcCBAgMWUDBGvJ2PDYCIxTof1uw//mbjZf+acH+hvZpb2rfeN2e4UKAAIEhC3iJcMjb8dgIjFCg/3qF/rcFF7302/oVDYvquR0BApsloGBtlrT7IUBgTaD/4eYdO3asfT/rF/02/bYuBAgQGLqAgjX0DXl8BEYosGvXrnb48OG5SlYvV/02/bYuBAgQGLqAgjX0DXl8BEYq0N+ofuzYsZleLuwvC/brenP7SA+DsQiMUMCb3Ee4VCMR2CoC/dmoo0ePTv62YP/zN/03tK/+EtH+qxh6oepvaPeeq62yUY+TAIFVAQVrVcL/CRBYmkAvUErU0vjdMQECCQJeIkxAFUmAAAECBAjUFlCwau/f9AQIECBAgECCgJcIE1BFEiCwuQKXL19u586da59//nn74Ycf2u+//z75b2Vlpd14443thhtuaHv27Gn79++f6U31m/vo3RsBAmMUULDGuFUzERiYwCeffNLuu+++lEfV/6TO22+/vfbm+I138ssvv7T+37fffts++ugjf8dwI5DvCRBIEVCwUliFEiCwXuC1115rvQg9+eST7eabb17/Twt//dtvv7U33nijffnll3NlrH5Kca4buTIBAgTmFPAerDnBXJ0AgcUEzpw5055//vn23XffLRaw7lb9ZcCeNW+5WhfhSwIECKQKKFipvMIJEFgv8Mcff7SXXnpp8nuv1v98nq/7S30vvvhi689guRAgQGCoAgrWUDfjcREYqcCff/7ZXn755fbVV1/NPeHXX389KWgXL16c+7ZuQIAAgc0U8B6szdR2XwQITAT++uuvduLEiXbo0KF27733zqTSPyHY38t16dKla17/tttuaw8++ODkl5b2Tw/2S3/WrL88+cEHH0w+YXjNG/sHAgQIBAooWIGYoggQmF3g77//bq+++mr78ccf2yOPPNKuu276E+r9eu+//3579913/zX80UcfbQ8//PBVObfccks7ePBgu//++2fK+dc78Y8ECBCYUUDBmhHK1QgQWFxg+/btrT9rtfHSf3/Ve++9106fPt0eeOCByTNPN9100+Rq/Zmn/pLghx9+2C5cuLDxpmvfb9u2rT311FP/95mwXuB6kbv11lvbK6+8snZ7XxAgQCBDQMHKUJVJgMAVAocPH568JDitZPUr9gJ18uTJK24zyze9uPXsu+66a5arT67T/3i0gjUzlysSILCgwPTn5BcMczMCBAhME+gF6Omnn27XX3/9tH9e6Gc7duxozzzzzFzlaqE7ciMCBAgsIKBgLYDmJgQIzC9w5513tmPHjoX8otH+MuLRo0fb7bffPv8DcQsCBAhsgoCCtQnI7oIAgX8Edu/ePSlZ+/btW5jk7rvvbs8+++zkbwsuHOKGBAgQSBbwHqxkYPEECFwp0J99OnLkSPvss8/am2++OfmjzFdeY/p3O3fubI8//ng7cODA9Cv4KQECBAYkoGANaBkeCoFKAvv375988u/s2bPt1KlT7fvvv5/8zqr+6cF+6b/Hqv+3Z8+eyfX27t3bVlZWKhGZlQCBLSygYG3h5XnoBLa6QC9M/eXC//KS4VY38PgJEBingPdgjXOvpiJAgAABAgSWKKBgLRHfXRMgQIAAAQLjFFCwxrlXUxEgQIAAAQJLFFCwlojvrgkQIECAAIFxCihY49yrqQgQIECAAIElCvgU4RLx3TWBKgLHjx+vMqo5CRAgMBHwDJaDQIAAAQIECBAIFlCwgkHFESBAgAABAgQULGeAAAECBAgQIBAsoGAFg4ojQIAAAQIECChYzgABAgQIECBAIFhg5fz585eDM8URIECAAAECBEoLeAar9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gIKVun1G54AAQIECBDIEFCwMlRlEiBAgAABAqUFFKzS6zc8AQIECBAgkCGgYGWoyiRAgAABAgRKCyhYpddveAIECBAgQCBDQMHKUJVJgAABAgQIlBZQsEqv3/AECBAgQIBAhoCClaEqkwABAgQIECgtoGCVXr/hCRAgQIAAgQwBBStDVSYBAgQIECBQWkDBKr1+wxMgQIAAAQIZAgpWhqpMAgQIECBAoLSAglV6/YYnQIAAAQIEMgQUrAxVmQQIECBAgEBpAQWr9PoNT4AAAQIECGQIKFgZqjIJECBAgACB0gL/A4w4lwCgj36GAAAAAElFTkSuQmCC",width:284,height:181},size:"small"})})},MediumSize=function MediumSize(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"384px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",imgProps:{src:placeholder_medium_namespaceObject,width:384,height:245},size:"medium"})})},LargeSize=function LargeSize(){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"567px"},children:(0,jsx_runtime.jsx)(Linkbox.R,{linkboxAriaLabel:"Linkbox: HDS",linkAriaLabel:"HDS",href:"https://hds.hel.fi",heading:"Linkbox title",text:"Linkbox text",imgProps:{src:placeholder_large_namespaceObject,width:567,height:363},size:"large"})})};Default.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},Default.parameters),WithBorder.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},WithBorder.parameters),WithoutBackground.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},WithoutBackground.parameters),External.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},External.parameters),SmallSize.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},SmallSize.parameters),MediumSize.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},MediumSize.parameters),LargeSize.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n
\n \n
\n)'}},LargeSize.parameters)},"./src/components/loadingSpinner/LoadingSpinner.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomTheme:()=>CustomTheme,Default:()=>Default,MultipleSpinners:()=>MultipleSpinners,Small:()=>Small,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/loadingSpinner/LoadingSpinner.tsx"),_button__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={parameters:{storySource:{source:"import React, { useState } from 'react';\n\nimport { LoadingSpinner } from './LoadingSpinner';\nimport { Button } from '../button';\n\nexport default {\n component: LoadingSpinner,\n title: 'Components/LoadingSpinner',\n};\n\nexport const Default = (args) => ;\n\nexport const Small = (args) => ;\nSmall.args = {\n small: true,\n};\n\nexport const CustomTheme = (args) => (\n <>\n \n
\n \n \n);\nCustomTheme.storyName = 'Custom theme';\nCustomTheme.args = {\n theme: {\n '--spinner-color': 'var(--color-tram)',\n '--spinner-color-stage1': 'var(--color-coat-of-arms)',\n '--spinner-color-stage2': 'var(--color-tram)',\n '--spinner-color-stage3': 'var(--color-metro)',\n },\n};\n\nexport const MultipleSpinners = (args) => {\n const [showSpinner1, setShowSpinner1] = useState(false);\n const [showSpinner2, setShowSpinner2] = useState(false);\n const [showSpinner3, setShowSpinner3] = useState(false);\n\n return (\n <>\n
\n \n
\n
\n \n
\n
\n \n
\n {showSpinner1 && }\n {showSpinner2 && }\n {showSpinner3 && }\n \n );\n};\nMultipleSpinners.storyName = 'Multiple spinners';\n",locationsMap:{default:{startLoc:{col:23,line:11},endLoc:{col:61,line:11},startBody:{col:23,line:11},endBody:{col:61,line:11}},small:{startLoc:{col:21,line:13},endLoc:{col:59,line:13},startBody:{col:21,line:13},endBody:{col:59,line:13}},"custom-theme":{startLoc:{col:27,line:18},endLoc:{col:1,line:24},startBody:{col:27,line:18},endBody:{col:1,line:24}},"multiple-spinners":{startLoc:{col:32,line:35},endLoc:{col:1,line:62},startBody:{col:32,line:35},endBody:{col:1,line:62}}}}},component:_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,title:"Components/LoadingSpinner"};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))},Small=function Small(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};Small.args={small:!0};var CustomTheme=function CustomTheme(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{multicolor:!1})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{multicolor:!0}))]})};CustomTheme.storyName="Custom theme",CustomTheme.args={theme:{"--spinner-color":"var(--color-tram)","--spinner-color-stage1":"var(--color-coat-of-arms)","--spinner-color-stage2":"var(--color-tram)","--spinner-color-stage3":"var(--color-metro)"}};var MultipleSpinners=function MultipleSpinners(args){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState,2),showSpinner1=_useState2[0],setShowSpinner1=_useState2[1],_useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState3,2),showSpinner2=_useState4[0],setShowSpinner2=_useState4[1],_useState5=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState5,2),showSpinner3=_useState6[0],setShowSpinner3=_useState6[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginBottom:"var(--spacing-s)"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{onClick:function onClick(){return setShowSpinner1(!showSpinner1)},children:[showSpinner1?"Remove":"Add"," loading spinner #1"]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginBottom:"var(--spacing-s)"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{onClick:function onClick(){return setShowSpinner2(!showSpinner2)},children:[showSpinner2?"Remove":"Add"," loading spinner #2"]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{marginBottom:"var(--spacing-s)"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{onClick:function onClick(){return setShowSpinner3(!showSpinner3)},children:[showSpinner3?"Remove":"Add"," loading spinner #3"]})}),showSpinner1&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args)),showSpinner2&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args)),showSpinner3&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_LoadingSpinner__WEBPACK_IMPORTED_MODULE_2__.T,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))]})};MultipleSpinners.storyName="Multiple spinners",Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Default.parameters),Small.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Small.parameters),CustomTheme.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => (\n <>\n \n
\n \n \n)"}},CustomTheme.parameters),MultipleSpinners.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const [showSpinner1, setShowSpinner1] = useState(false);\n const [showSpinner2, setShowSpinner2] = useState(false);\n const [showSpinner3, setShowSpinner3] = useState(false);\n\n return (\n <>\n
\n \n
\n
\n \n
\n
\n \n
\n {showSpinner1 && }\n {showSpinner2 && }\n {showSpinner3 && }\n \n );\n}"}},MultipleSpinners.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/loadingSpinner/LoadingSpinner.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/loadingSpinner/LoadingSpinner.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Small.displayName="Small",Small.__docgenInfo={description:"",displayName:"Small",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/loadingSpinner/LoadingSpinner.stories.tsx#Small"]={docgenInfo:Small.__docgenInfo,name:"Small",path:"src/components/loadingSpinner/LoadingSpinner.stories.tsx#Small"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/loadingSpinner/LoadingSpinner.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/loadingSpinner/LoadingSpinner.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}try{MultipleSpinners.displayName="MultipleSpinners",MultipleSpinners.__docgenInfo={description:"",displayName:"MultipleSpinners",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/loadingSpinner/LoadingSpinner.stories.tsx#MultipleSpinners"]={docgenInfo:MultipleSpinners.__docgenInfo,name:"MultipleSpinners",path:"src/components/loadingSpinner/LoadingSpinner.stories.tsx#MultipleSpinners"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/logo/Logo.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Playground:()=>Playground,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Logo__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/logo/Logo.tsx")),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Logo__WEBPACK_IMPORTED_MODULE_2__.T,title:"Components/Logo",parameters:{storySource:{source:"import React from 'react';\n\nimport { Logo } from './Logo';\n\nexport default {\n component: Logo,\n title: 'Components/Logo',\n parameters: {\n controls: { hideNoControlsWarning: true },\n },\n};\n\nexport const Playground = (args) => ;\n\nPlayground.args = {\n language: 'fi',\n size: 'full',\n};\n\nPlayground.argTypes = {\n language: {\n options: ['fi', 'sv', 'ru'],\n control: { type: 'radio' },\n },\n size: {\n options: ['full', 'small', 'medium', 'large'],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{playground:{startLoc:{col:26,line:13},endLoc:{col:86,line:13},startBody:{col:26,line:13},endBody:{col:86,line:13}}}},controls:{hideNoControlsWarning:!0}}};var Playground=function Playground(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Logo__WEBPACK_IMPORTED_MODULE_2__.T,{language:args.language,size:args.size})};Playground.args={language:"fi",size:"full"},Playground.argTypes={language:{options:["fi","sv","ru"],control:{type:"radio"}},size:{options:["full","small","medium","large"],control:{type:"radio"}}},Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/logo/Logo.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/logo/Logo.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/navigation/Navigation.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomTheme:()=>CustomTheme,Default:()=>Default,DropdownLinks:()=>DropdownLinks,Example:()=>Example,Inline:()=>Inline,WithoutTitleUrl:()=>WithoutTitleUrl,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_Navigation__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/navigation/Navigation.tsx"),_navigationRow_NavigationRow__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/navigation/navigationRow/NavigationRow.tsx"),_navigationItem_NavigationItem__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/navigation/navigationItem/NavigationItem.tsx"),_navigationUser_NavigationUser__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/navigation/navigationUser/NavigationUser.tsx"),_navigationSearch_NavigationSearch__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/navigation/navigationSearch/NavigationSearch.tsx"),_navigationLanguageSelector_NavigationLanguageSelector__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/components/navigation/navigationLanguageSelector/NavigationLanguageSelector.tsx"),_navigationDropdown_NavigationDropdown__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/navigation/navigationDropdown/NavigationDropdown.tsx"),_icons__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/icons/IconSignout.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["searchLabel","searchPlaceholder","authenticated","userName"],_excluded2=["searchLabel","searchPlaceholder","authenticated","userName"],_excluded3=["searchLabel","searchPlaceholder","authenticated","userName"],_excluded4=["userName"],_excluded5=["searchLabel","searchPlaceholder","authenticated","userName"],_excluded6=["searchLabel","searchPlaceholder","authenticated","userName"];const __WEBPACK_DEFAULT_EXPORT__={component:_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,title:"Components/Navigation",subcomponents:{NavigationRow:_navigationRow_NavigationRow__WEBPACK_IMPORTED_MODULE_3__.w,NavigationItem:_navigationItem_NavigationItem__WEBPACK_IMPORTED_MODULE_4__.D,NavigationDropdown:_navigationDropdown_NavigationDropdown__WEBPACK_IMPORTED_MODULE_5__.m,NavigationSearch:_navigationSearch_NavigationSearch__WEBPACK_IMPORTED_MODULE_6__.f,NavigationUser:_navigationUser_NavigationUser__WEBPACK_IMPORTED_MODULE_7__.H,NavigationLanguageSelector:_navigationLanguageSelector_NavigationLanguageSelector__WEBPACK_IMPORTED_MODULE_8__.S},parameters:{storySource:{source:'\nimport React, { useState } from \'react\';\n\nimport { Navigation } from \'./Navigation\';\nimport { NavigationRow } from \'./navigationRow/NavigationRow\';\nimport { NavigationItem } from \'./navigationItem/NavigationItem\';\nimport { NavigationUser } from \'./navigationUser/NavigationUser\';\nimport { NavigationSearch } from \'./navigationSearch/NavigationSearch\';\nimport { NavigationLanguageSelector } from \'./navigationLanguageSelector/NavigationLanguageSelector\';\nimport { NavigationDropdown } from \'./navigationDropdown/NavigationDropdown\';\nimport { IconSignout } from \'../../icons\';\n\ntype LanguageOption = {\n label: string;\n value: string;\n};\n\nexport default {\n component: Navigation,\n title: \'Components/Navigation\',\n subcomponents: {\n NavigationRow,\n NavigationItem,\n NavigationDropdown,\n NavigationSearch,\n NavigationUser,\n NavigationLanguageSelector,\n },\n parameters: {\n controls: { expanded: true },\n layout: \'fullscreen\',\n },\n args: {\n title: \'Helsinki Design System\',\n titleAriaLabel: \'Helsinki: Helsinki Design System\',\n titleUrl: \'https://hel.fi\',\n theme: \'light\',\n menuToggleAriaLabel: \'Menu\',\n skipTo: \'#content\',\n skipToContentLabel: \'Skip to main content\',\n searchLabel: \'Search\',\n searchPlaceholder: \'Search page\',\n authenticated: false,\n userName: \'John Doe\',\n },\n argTypes: {\n theme: { control: { type: \'inline-radio\', options: [\'light\', \'dark\'] } },\n },\n};\n\nexport const Default = ({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n);\n\nexport const Inline = ({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => {\n return (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n );\n};\n\nexport const CustomTheme = ({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => {\n return (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n );\n};\nCustomTheme.storyName = \'Custom theme\';\nCustomTheme.args = {\n theme: {\n \'--header-background-color\': \'var(--color-engel)\',\n \'--header-color\': \'var(--color-black-90)\',\n \'--header-divider-color\': \'var(--color-black-20)\',\n \'--header-focus-outline-color\': \'var(--color-black)\',\n \'--mobile-menu-background-color\': \'var(--color-white)\',\n \'--mobile-menu-color\': \'var(--color-black-90)\',\n \'--navigation-row-background-color\': \'var(--color-white)\',\n \'--navigation-row-color\': \'var(--color-black-90)\',\n \'--navigation-row-focus-outline-color\': \'var(--color-coat-of-arms)\',\n },\n};\nCustomTheme.argTypes = {\n theme: {\n control: {\n type: \'object\',\n },\n },\n};\n\nexport const Example = ({ userName, ...args }) => {\n const i18n = {\n title: {\n fi: \'Helsingin kaupunki\',\n sv: \'Helsingfors stad\',\n en: \'City of Helsinki\',\n },\n titleAria: {\n fi: \'Helsinki: Helsingin kaupunki\',\n sv: \'Helsingfors: Helsingfors stad\',\n en: \'Helsinki: City of Helsinki\',\n },\n menuName: {\n fi: \'Päänavigointi\',\n sv: \'Huvudnavigering\',\n en: \'Main navigation\',\n },\n menuToggleAria: {\n fi: \'Valikko\',\n sv: \'Meny\',\n en: \'Menu\',\n },\n search: {\n fi: \'Hae\',\n sv: \'Sök\',\n en: \'Search\',\n },\n searchPlaceholder: {\n fi: \'Hae sivustolta\',\n sv: \'Sök på webbplatsen\',\n en: \'Search page\',\n },\n login: {\n fi: \'Kirjaudu sisään\',\n sv: \'Logga in\',\n en: \'Sign in\',\n },\n loginAria: {\n fi: \'Käyttäjä:\',\n sv: \'Användare:\',\n en: \'User:\',\n },\n logout: {\n fi: \'Kirjaudu ulos\',\n sv: \'Logga ut\',\n en: \'Sign out\',\n },\n skip: {\n fi: \'Siirry sivun pääsisältöön\',\n sv: \'Gå till huvudinnehåll\',\n en: \'Skip to main content\',\n },\n languageSelectorLabel: {\n fi: \'Kieli: Suomi. Vaihda kieli. Change language. Ändra språk.\',\n sv: \'Språk: Svenska. Ändra språk. Vaihda kieli. Change language.\',\n en: \'Language: English. Change language. Vaihda kieli. Ändra språk.\',\n },\n navigation: [\n {\n fi: \'Kaupunki ja hallinto\',\n sv: \'Staden och förvaltning\',\n en: \'City administration\',\n },\n {\n fi: \'Liikenne ja kartat\',\n sv: \'Kartor och trafik\',\n en: \'Maps and transport\',\n },\n {\n fi: \'Kasvatus ja koulutus\',\n sv: \'Fostran och utbildning\',\n en: \'Childhood and education\',\n },\n {\n fi: \'Kulttuuri ja vapaa-aika\',\n sv: \'Kultur och fritid\',\n en: \'Culture and leisure\',\n },\n ],\n navigationDropdown: {\n label: {\n fi: \'Asuminen ja ympäristö\',\n sv: \'Boende och miljö\',\n en: \'Housing and environment\',\n },\n options: [\n {\n fi: \'Asuminen\',\n sv: \'Boende\',\n en: \'Housing\',\n },\n {\n fi: \'Kaavoitus ja suunnittelu\',\n sv: \'Planläggning\',\n en: \'Planning\',\n },\n {\n fi: \'Rakentaminen\',\n sv: \'Byggande\',\n en: \'Construction\',\n },\n ],\n },\n };\n const languages: LanguageOption[] = [\n { label: \'Suomeksi\', value: \'fi\' },\n { label: \'På svenska\', value: \'sv\' },\n { label: \'In English\', value: \'en\' },\n ];\n\n const [authenticated, setAuthenticated] = useState(false);\n const [language, setLanguage] = useState(\'fi\');\n const [active, setActive] = useState();\n\n // show helsingfors logo if swedish is selected as the language\n const logoLanguage = language === \'sv\' ? \'sv\' : \'fi\';\n\n return (\n <>\n {/* @ts-ignore */}\n \n {/* NAVIGATION ROW */}\n \n {i18n.navigation.map((item, index) => {\n return (\n {\n e.preventDefault();\n setActive(`link-${index}`);\n }}\n />\n );\n })}\n \n {i18n.navigationDropdown.options.map((option, index) => {\n return (\n {\n e.preventDefault();\n setActive(\'dropdown\');\n }}\n />\n );\n })}\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n setAuthenticated(true)}\n userName={userName}\n >\n {\n e.preventDefault();\n setAuthenticated(false);\n }}\n variant="supplementary"\n label={i18n.logout[language]}\n icon={}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n {languages.map((lang) => {\n return (\n {\n e.preventDefault();\n setLanguage(lang.value);\n }}\n lang={lang.value}\n label={lang.label}\n />\n );\n })}\n \n \n \n \n );\n};\n\nexport const DropdownLinks = ({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => {\n return (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()}>\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()}>\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()}>\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()}\n buttonAriaLabel="Submenu"\n >\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n \n \n \n );\n};\n\nexport const WithoutTitleUrl = ({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n);\n\nWithoutTitleUrl.args = {\n title: \'Helsinki Design System\',\n titleAriaLabel: \'Helsinki: Helsinki Design System\',\n titleUrl: undefined,\n theme: \'light\',\n menuToggleAriaLabel: \'Menu\',\n skipTo: \'#content\',\n skipToContentLabel: \'Skip to main content\',\n searchLabel: \'Search\',\n searchPlaceholder: \'Search page\',\n authenticated: false,\n userName: \'John Doe\',\n};\n\nWithoutTitleUrl.parameters = {\n loki: { skip: true }, // The visuals are identical to Default\n};\n\nWithoutTitleUrl.storyName = \'Without title url\';\n',locationsMap:{default:{startLoc:{col:23,line:51},endLoc:{col:1,line:96},startBody:{col:23,line:51},endBody:{col:1,line:96}},inline:{startLoc:{col:22,line:98},endLoc:{col:1,line:143},startBody:{col:22,line:98},endBody:{col:1,line:143}},"custom-theme":{startLoc:{col:27,line:145},endLoc:{col:1,line:192},startBody:{col:27,line:145},endBody:{col:1,line:192}},example:{startLoc:{col:23,line:215},endLoc:{col:1,line:426},startBody:{col:23,line:215},endBody:{col:1,line:426}},"dropdown-links":{startLoc:{col:29,line:428},endLoc:{col:1,line:493},startBody:{col:29,line:428},endBody:{col:1,line:493}},"without-title-url":{startLoc:{col:31,line:495},endLoc:{col:1,line:540},startBody:{col:31,line:495},endBody:{col:1,line:540}}}},controls:{expanded:!0},layout:"fullscreen"},args:{title:"Helsinki Design System",titleAriaLabel:"Helsinki: Helsinki Design System",titleUrl:"https://hel.fi",theme:"light",menuToggleAriaLabel:"Menu",skipTo:"#content",skipToContentLabel:"Skip to main content",searchLabel:"Search",searchPlaceholder:"Search page",authenticated:!1,userName:"John Doe"},argTypes:{theme:{control:{type:"inline-radio",options:["light","dark"]}}}};var Default=function Default(_ref){var searchLabel=_ref.searchLabel,searchPlaceholder=_ref.searchPlaceholder,authenticated=_ref.authenticated,userName=_ref.userName,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Row,{ariaLabel:"Main navigation",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",active:!0,onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Dropdown,{label:"Dropdown",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Actions,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Search,{searchLabel,searchPlaceholder}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.User,{authenticated,label:"Sign in",userName,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Link",href:"#",variant:"secondary",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Sign out",href:"#",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconSignout,{"aria-hidden":!0}),variant:"supplementary",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.LanguageSelector,{label:"FI",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fi",label:"Suomeksi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"sv",label:"På svenska"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"en",label:"In English"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fr",label:"En français"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"de",label:"Auf deutsch"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"ru",label:"По-русски"})]})]})]}))},Inline=function Inline(_ref2){var searchLabel=_ref2.searchLabel,searchPlaceholder=_ref2.searchPlaceholder,authenticated=_ref2.authenticated,userName=_ref2.userName,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_ref2,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Row,{variant:"inline",ariaLabel:"Main navigation",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",active:!0,onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Dropdown,{label:"Dropdown",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Actions,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Search,{searchLabel,searchPlaceholder}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.User,{authenticated,label:"Sign in",userName,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Link",href:"#",variant:"secondary",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Sign out",href:"#",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconSignout,{"aria-hidden":!0}),variant:"supplementary",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.LanguageSelector,{label:"FI",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fi",label:"Suomeksi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"sv",label:"På svenska"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"en",label:"In English"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fr",label:"En français"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"de",label:"Auf deutsch"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"ru",label:"По-русски"})]})]})]}))},CustomTheme=function CustomTheme(_ref3){var searchLabel=_ref3.searchLabel,searchPlaceholder=_ref3.searchPlaceholder,authenticated=_ref3.authenticated,userName=_ref3.userName,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_ref3,_excluded3);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Row,{ariaLabel:"Main navigation",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",active:!0,onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Dropdown,{label:"Dropdown",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Actions,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Search,{searchLabel,searchPlaceholder}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.User,{authenticated,label:"Sign in",userName,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Link",href:"#",variant:"secondary",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Sign out",href:"#",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconSignout,{"aria-hidden":!0}),variant:"supplementary",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.LanguageSelector,{label:"FI",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fi",label:"Suomeksi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"sv",label:"På svenska"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"en",label:"In English"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fr",label:"En français"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"de",label:"Auf deutsch"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"ru",label:"По-русски"})]})]})]}))};CustomTheme.storyName="Custom theme",CustomTheme.args={theme:{"--header-background-color":"var(--color-engel)","--header-color":"var(--color-black-90)","--header-divider-color":"var(--color-black-20)","--header-focus-outline-color":"var(--color-black)","--mobile-menu-background-color":"var(--color-white)","--mobile-menu-color":"var(--color-black-90)","--navigation-row-background-color":"var(--color-white)","--navigation-row-color":"var(--color-black-90)","--navigation-row-focus-outline-color":"var(--color-coat-of-arms)"}},CustomTheme.argTypes={theme:{control:{type:"object"}}};var Example=function Example(_ref4){var userName=_ref4.userName,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_ref4,_excluded4),i18n={title:{fi:"Helsingin kaupunki",sv:"Helsingfors stad",en:"City of Helsinki"},titleAria:{fi:"Helsinki: Helsingin kaupunki",sv:"Helsingfors: Helsingfors stad",en:"Helsinki: City of Helsinki"},menuName:{fi:"Päänavigointi",sv:"Huvudnavigering",en:"Main navigation"},menuToggleAria:{fi:"Valikko",sv:"Meny",en:"Menu"},search:{fi:"Hae",sv:"Sök",en:"Search"},searchPlaceholder:{fi:"Hae sivustolta",sv:"Sök på webbplatsen",en:"Search page"},login:{fi:"Kirjaudu sisään",sv:"Logga in",en:"Sign in"},loginAria:{fi:"Käyttäjä:",sv:"Användare:",en:"User:"},logout:{fi:"Kirjaudu ulos",sv:"Logga ut",en:"Sign out"},skip:{fi:"Siirry sivun pääsisältöön",sv:"Gå till huvudinnehåll",en:"Skip to main content"},languageSelectorLabel:{fi:"Kieli: Suomi. Vaihda kieli. Change language. Ändra språk.",sv:"Språk: Svenska. Ändra språk. Vaihda kieli. Change language.",en:"Language: English. Change language. Vaihda kieli. Ändra språk."},navigation:[{fi:"Kaupunki ja hallinto",sv:"Staden och förvaltning",en:"City administration"},{fi:"Liikenne ja kartat",sv:"Kartor och trafik",en:"Maps and transport"},{fi:"Kasvatus ja koulutus",sv:"Fostran och utbildning",en:"Childhood and education"},{fi:"Kulttuuri ja vapaa-aika",sv:"Kultur och fritid",en:"Culture and leisure"}],navigationDropdown:{label:{fi:"Asuminen ja ympäristö",sv:"Boende och miljö",en:"Housing and environment"},options:[{fi:"Asuminen",sv:"Boende",en:"Housing"},{fi:"Kaavoitus ja suunnittelu",sv:"Planläggning",en:"Planning"},{fi:"Rakentaminen",sv:"Byggande",en:"Construction"}]}},_useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__.Z)(_useState,2),authenticated=_useState2[0],setAuthenticated=_useState2[1],_useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("fi"),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__.Z)(_useState3,2),language=_useState4[0],setLanguage=_useState4[1],_useState5=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),_useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__.Z)(_useState5,2),active=_useState6[0],setActive=_useState6[1],logoLanguage="sv"===language?"sv":"fi";return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({},args),{},{logoLanguage,title:i18n.title[language],titleAriaLabel:i18n.titleAria[language],skipToContentLabel:i18n.skip[language],menuToggleAriaLabel:i18n.menuToggleAria[language],children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Row,{ariaLabel:i18n.menuName[language],children:[i18n.navigation.map((function(item,index){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",active:active==="link-".concat(index),label:item[language],onClick:function onClick(e){e.preventDefault(),setActive("link-".concat(index))}},item[language])})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Dropdown,{active:"dropdown"===active,label:i18n.navigationDropdown.label[language],children:i18n.navigationDropdown.options.map((function(option,index){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:option[language],href:"#",onClick:function onClick(e){e.preventDefault(),setActive("dropdown")}},index)}))})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Actions,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Search,{searchLabel:i18n.search[language],searchPlaceholder:i18n.searchPlaceholder[language]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.User,{authenticated,buttonAriaLabel:"".concat(i18n.loginAria[language]," ").concat(userName),label:i18n.login[language],onSignIn:function onSignIn(){return setAuthenticated(!0)},userName,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){e.preventDefault(),setAuthenticated(!1)},variant:"supplementary",label:i18n.logout[language],icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconSignout,{"aria-hidden":!0})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.LanguageSelector,{label:language.toUpperCase(),buttonAriaLabel:i18n.languageSelectorLabel[language],children:[{label:"Suomeksi",value:"fi"},{label:"På svenska",value:"sv"},{label:"In English",value:"en"}].map((function(lang){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){e.preventDefault(),setLanguage(lang.value)},lang:lang.value,label:lang.label},lang.value)}))})]})]}))})},DropdownLinks=function DropdownLinks(_ref5){var searchLabel=_ref5.searchLabel,searchPlaceholder=_ref5.searchPlaceholder,authenticated=_ref5.authenticated,userName=_ref5.userName,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_ref5,_excluded5);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Row,{ariaLabel:"Main navigation",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.DropdownLink,{label:"Dropdown Link",href:"#",onClick:function onClick(e){return e.preventDefault()},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.DropdownLink,{label:"Dropdown Link",href:"#",active:!0,onClick:function onClick(e){return e.preventDefault()},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.DropdownLink,{label:"Dropdown Link",href:"#",onClick:function onClick(e){return e.preventDefault()},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.DropdownLink,{label:"Dropdown Link",href:"#",onClick:function onClick(e){return e.preventDefault()},buttonAriaLabel:"Submenu",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Actions,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Search,{searchLabel,searchPlaceholder}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.User,{authenticated,label:"Sign in",userName,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Link",href:"#",variant:"secondary",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Sign out",href:"#",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconSignout,{"aria-hidden":!0}),variant:"supplementary",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.LanguageSelector,{label:"FI",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fi",label:"Suomeksi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"sv",label:"På svenska"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"en",label:"In English"})]})]})]}))},WithoutTitleUrl=function WithoutTitleUrl(_ref6){var searchLabel=_ref6.searchLabel,searchPlaceholder=_ref6.searchPlaceholder,authenticated=_ref6.authenticated,userName=_ref6.userName,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_ref6,_excluded6);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({},args),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Row,{ariaLabel:"Main navigation",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",active:!0,onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Dropdown,{label:"Dropdown",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",label:"Link",onClick:function onClick(e){return e.preventDefault()}})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Actions,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Search,{searchLabel,searchPlaceholder}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.User,{authenticated,label:"Sign in",userName,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Link",href:"#",variant:"secondary",onClick:function onClick(e){return e.preventDefault()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{label:"Sign out",href:"#",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.IconSignout,{"aria-hidden":!0}),variant:"supplementary",onClick:function onClick(e){return e.preventDefault()}})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.LanguageSelector,{label:"FI",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fi",label:"Suomeksi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"sv",label:"På svenska"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"en",label:"In English"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"fr",label:"En français"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"de",label:"Auf deutsch"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Navigation__WEBPACK_IMPORTED_MODULE_2__.W.Item,{href:"#",onClick:function onClick(e){return e.preventDefault()},lang:"ru",label:"По-русски"})]})]})]}))};WithoutTitleUrl.args={title:"Helsinki Design System",titleAriaLabel:"Helsinki: Helsinki Design System",titleUrl:void 0,theme:"light",menuToggleAriaLabel:"Menu",skipTo:"#content",skipToContentLabel:"Skip to main content",searchLabel:"Search",searchPlaceholder:"Search page",authenticated:!1,userName:"John Doe"},WithoutTitleUrl.parameters={loki:{skip:!0}},WithoutTitleUrl.storyName="Without title url",Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({storySource:{source:'({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n)'}},Default.parameters),Inline.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({storySource:{source:'({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => {\n return (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n );\n}'}},Inline.parameters),CustomTheme.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({storySource:{source:'({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => {\n return (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n );\n}'}},CustomTheme.parameters),Example.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({storySource:{source:"({ userName, ...args }) => {\n const i18n = {\n title: {\n fi: 'Helsingin kaupunki',\n sv: 'Helsingfors stad',\n en: 'City of Helsinki',\n },\n titleAria: {\n fi: 'Helsinki: Helsingin kaupunki',\n sv: 'Helsingfors: Helsingfors stad',\n en: 'Helsinki: City of Helsinki',\n },\n menuName: {\n fi: 'Päänavigointi',\n sv: 'Huvudnavigering',\n en: 'Main navigation',\n },\n menuToggleAria: {\n fi: 'Valikko',\n sv: 'Meny',\n en: 'Menu',\n },\n search: {\n fi: 'Hae',\n sv: 'Sök',\n en: 'Search',\n },\n searchPlaceholder: {\n fi: 'Hae sivustolta',\n sv: 'Sök på webbplatsen',\n en: 'Search page',\n },\n login: {\n fi: 'Kirjaudu sisään',\n sv: 'Logga in',\n en: 'Sign in',\n },\n loginAria: {\n fi: 'Käyttäjä:',\n sv: 'Användare:',\n en: 'User:',\n },\n logout: {\n fi: 'Kirjaudu ulos',\n sv: 'Logga ut',\n en: 'Sign out',\n },\n skip: {\n fi: 'Siirry sivun pääsisältöön',\n sv: 'Gå till huvudinnehåll',\n en: 'Skip to main content',\n },\n languageSelectorLabel: {\n fi: 'Kieli: Suomi. Vaihda kieli. Change language. Ändra språk.',\n sv: 'Språk: Svenska. Ändra språk. Vaihda kieli. Change language.',\n en: 'Language: English. Change language. Vaihda kieli. Ändra språk.',\n },\n navigation: [\n {\n fi: 'Kaupunki ja hallinto',\n sv: 'Staden och förvaltning',\n en: 'City administration',\n },\n {\n fi: 'Liikenne ja kartat',\n sv: 'Kartor och trafik',\n en: 'Maps and transport',\n },\n {\n fi: 'Kasvatus ja koulutus',\n sv: 'Fostran och utbildning',\n en: 'Childhood and education',\n },\n {\n fi: 'Kulttuuri ja vapaa-aika',\n sv: 'Kultur och fritid',\n en: 'Culture and leisure',\n },\n ],\n navigationDropdown: {\n label: {\n fi: 'Asuminen ja ympäristö',\n sv: 'Boende och miljö',\n en: 'Housing and environment',\n },\n options: [\n {\n fi: 'Asuminen',\n sv: 'Boende',\n en: 'Housing',\n },\n {\n fi: 'Kaavoitus ja suunnittelu',\n sv: 'Planläggning',\n en: 'Planning',\n },\n {\n fi: 'Rakentaminen',\n sv: 'Byggande',\n en: 'Construction',\n },\n ],\n },\n };\n const languages: LanguageOption[] = [\n { label: 'Suomeksi', value: 'fi' },\n { label: 'På svenska', value: 'sv' },\n { label: 'In English', value: 'en' },\n ];\n\n const [authenticated, setAuthenticated] = useState(false);\n const [language, setLanguage] = useState('fi');\n const [active, setActive] = useState();\n\n // show helsingfors logo if swedish is selected as the language\n const logoLanguage = language === 'sv' ? 'sv' : 'fi';\n\n return (\n <>\n {/* @ts-ignore */}\n \n {/* NAVIGATION ROW */}\n \n {i18n.navigation.map((item, index) => {\n return (\n {\n e.preventDefault();\n setActive(`link-${index}`);\n }}\n />\n );\n })}\n \n {i18n.navigationDropdown.options.map((option, index) => {\n return (\n {\n e.preventDefault();\n setActive('dropdown');\n }}\n />\n );\n })}\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n setAuthenticated(true)}\n userName={userName}\n >\n {\n e.preventDefault();\n setAuthenticated(false);\n }}\n variant=\"supplementary\"\n label={i18n.logout[language]}\n icon={}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n {languages.map((lang) => {\n return (\n {\n e.preventDefault();\n setLanguage(lang.value);\n }}\n lang={lang.value}\n label={lang.label}\n />\n );\n })}\n \n \n \n \n );\n}"}},Example.parameters),DropdownLinks.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({storySource:{source:'({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => {\n return (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()}>\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()}>\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()}>\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()}\n buttonAriaLabel="Submenu"\n >\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n \n \n \n );\n}'}},DropdownLinks.parameters),WithoutTitleUrl.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_10__.Z)({storySource:{source:'({ searchLabel, searchPlaceholder, authenticated, userName, ...args }) => (\n // @ts-ignore\n \n {/* NAVIGATION ROW */}\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n e.preventDefault()} />\n \n \n\n {/* NAVIGATION ACTIONS */}\n \n {/* SEARCH */}\n \n\n {/* USER */}\n \n e.preventDefault()} />\n }\n variant="supplementary"\n onClick={(e) => e.preventDefault()}\n />\n \n\n {/* LANGUAGE SELECTOR */}\n \n e.preventDefault()} lang="fi" label="Suomeksi" />\n e.preventDefault()} lang="sv" label="På svenska" />\n e.preventDefault()} lang="en" label="In English" />\n e.preventDefault()} lang="fr" label="En français" />\n e.preventDefault()} lang="de" label="Auf deutsch" />\n e.preventDefault()} lang="ru" label="По-русски" />\n \n \n \n)'}},WithoutTitleUrl.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{searchLabel:{defaultValue:null,description:"",name:"searchLabel",required:!0,type:{name:"any"}},searchPlaceholder:{defaultValue:null,description:"",name:"searchPlaceholder",required:!0,type:{name:"any"}},authenticated:{defaultValue:null,description:"",name:"authenticated",required:!0,type:{name:"any"}},userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/navigation/Navigation.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/navigation/Navigation.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Inline.displayName="Inline",Inline.__docgenInfo={description:"",displayName:"Inline",props:{searchLabel:{defaultValue:null,description:"",name:"searchLabel",required:!0,type:{name:"any"}},searchPlaceholder:{defaultValue:null,description:"",name:"searchPlaceholder",required:!0,type:{name:"any"}},authenticated:{defaultValue:null,description:"",name:"authenticated",required:!0,type:{name:"any"}},userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/navigation/Navigation.stories.tsx#Inline"]={docgenInfo:Inline.__docgenInfo,name:"Inline",path:"src/components/navigation/Navigation.stories.tsx#Inline"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{searchLabel:{defaultValue:null,description:"",name:"searchLabel",required:!0,type:{name:"any"}},searchPlaceholder:{defaultValue:null,description:"",name:"searchPlaceholder",required:!0,type:{name:"any"}},authenticated:{defaultValue:null,description:"",name:"authenticated",required:!0,type:{name:"any"}},userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/navigation/Navigation.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/navigation/Navigation.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}try{Example.displayName="Example",Example.__docgenInfo={description:"",displayName:"Example",props:{userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/navigation/Navigation.stories.tsx#Example"]={docgenInfo:Example.__docgenInfo,name:"Example",path:"src/components/navigation/Navigation.stories.tsx#Example"})}catch(__react_docgen_typescript_loader_error){}try{DropdownLinks.displayName="DropdownLinks",DropdownLinks.__docgenInfo={description:"",displayName:"DropdownLinks",props:{searchLabel:{defaultValue:null,description:"",name:"searchLabel",required:!0,type:{name:"any"}},searchPlaceholder:{defaultValue:null,description:"",name:"searchPlaceholder",required:!0,type:{name:"any"}},authenticated:{defaultValue:null,description:"",name:"authenticated",required:!0,type:{name:"any"}},userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/navigation/Navigation.stories.tsx#DropdownLinks"]={docgenInfo:DropdownLinks.__docgenInfo,name:"DropdownLinks",path:"src/components/navigation/Navigation.stories.tsx#DropdownLinks"})}catch(__react_docgen_typescript_loader_error){}try{WithoutTitleUrl.displayName="WithoutTitleUrl",WithoutTitleUrl.__docgenInfo={description:"",displayName:"WithoutTitleUrl",props:{searchLabel:{defaultValue:null,description:"",name:"searchLabel",required:!0,type:{name:"any"}},searchPlaceholder:{defaultValue:null,description:"",name:"searchPlaceholder",required:!0,type:{name:"any"}},authenticated:{defaultValue:null,description:"",name:"authenticated",required:!0,type:{name:"any"}},userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/navigation/Navigation.stories.tsx#WithoutTitleUrl"]={docgenInfo:WithoutTitleUrl.__docgenInfo,name:"WithoutTitleUrl",path:"src/components/navigation/Navigation.stories.tsx#WithoutTitleUrl"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/notification/Notification.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Alert:()=>Alert,AutoClose:()=>AutoClose,Default:()=>Default,Dismissible:()=>Dismissible,Error:()=>Error,Invisible:()=>Invisible,Large:()=>Large,Playground:()=>Playground,Small:()=>Small,Success:()=>Success,WithBoxShadow:()=>WithBoxShadow,WithCustomAriaLabel:()=>WithCustomAriaLabel,WithCustomHeadingLevel:()=>WithCustomHeadingLevel,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_Notification__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/notification/Notification.tsx"),_button__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),props={label:"Label"},content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.";const __WEBPACK_DEFAULT_EXPORT__={component:_Notification__WEBPACK_IMPORTED_MODULE_2__.P,title:"Components/Notification",parameters:{storySource:{source:"import React, { useEffect, useRef, useState } from 'react';\n\nimport { Notification, NotificationSizeInline, NotificationSizeToast } from './Notification';\nimport { Button } from '../button';\n\nconst props = {\n label: 'Label',\n};\nconst content =\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.';\n\nexport default {\n component: Notification,\n title: 'Components/Notification',\n parameters: {\n controls: { hideNoControlsWarning: true },\n },\n decorators: [(storyFn) =>
{storyFn()}
],\n};\n\nexport const Default = () => {content};\n\nexport const Alert = () => (\n \n {content}\n \n);\n\nexport const Error = () => (\n \n {content}\n \n);\n\nexport const Success = () => (\n \n {content}\n \n);\n\nexport const Small = () => (\n \n Message\n \n);\n\nexport const Large = () => (\n \n {content}\n \n);\n\nexport const WithBoxShadow = () => (\n \n {content}\n \n);\n\nWithBoxShadow.storyName = 'With box shadow';\n\nexport const Invisible = () => {\n const [open, setOpen] = useState(false);\n return (\n <>\n \n {open && (\n \n I'm only seen by screen readers\n \n )}\n \n );\n};\n\nexport const Dismissible = () => {\n const [open, setOpen] = useState(true);\n const showButtonRef = useRef(null);\n const onClose = () => {\n setOpen(false);\n if (showButtonRef.current) {\n showButtonRef.current.focus();\n }\n };\n\n return (\n <>\n {!open && (\n \n )}\n {open && (\n onClose()} closeButtonLabelText=\"Close notification\">\n {content}\n \n )}\n \n );\n};\n\nexport const AutoClose = () => {\n const [open, setOpen] = useState(false);\n const showButtonRef = useRef(null);\n const onClose = () => {\n setOpen(false);\n if (showButtonRef.current) {\n showButtonRef.current.focus();\n }\n };\n\n return (\n <>\n {!open && (\n \n )}\n {open && (\n <>\n onClose()}\n >\n {content}\n \n \n {content}\n \n \n )}\n \n );\n};\n\nexport const WithCustomAriaLabel = () => (\n \n {content}\n \n);\n\nWithCustomAriaLabel.parameters = {\n loki: { skip: true },\n};\n\nWithCustomAriaLabel.storyName = 'With a custom aria-label';\n\nexport const WithCustomHeadingLevel = () => (\n \n {content}\n \n);\n\nWithCustomHeadingLevel.parameters = {\n loki: { skip: true },\n};\n\nWithCustomHeadingLevel.storyName = 'With a custom aria-level';\n\nexport const Playground = (args) => {\n const [open, setOpen] = useState(true);\n\n useEffect(() => {\n if (args.position === 'inline') setOpen(true);\n }, [args.position]);\n\n let typedSize;\n args.position === 'inline'\n ? (typedSize = args.size as NotificationSizeInline)\n : (typedSize = args.size as NotificationSizeToast);\n\n return (\n <>\n setOpen(!open)}\n >\n Toggle notification\n \n {open && (\n setOpen(false)}\n position={args.position}\n size={typedSize}\n dismissible={args.dismissible}\n closeButtonLabelText={args.closeButtonLabelText}\n headingLevel={args.headingLevel}\n >\n {args.body}\n \n )}\n \n );\n};\n\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n label: 'Label',\n body: content,\n closeButtonLabelText: 'Close notification',\n type: 'info',\n size: 'default',\n position: 'inline',\n invisible: false,\n dismissible: false,\n autoClose: false,\n displayAutoCloseProgress: true,\n autoCloseDuration: 6000,\n headingLevel: 2,\n};\n\nPlayground.argTypes = {\n type: {\n options: ['info', 'success', 'alert', 'error'],\n control: { type: 'radio' },\n },\n size: {\n options: ['default', 'small', 'large'],\n control: { type: 'radio' },\n },\n position: {\n options: ['inline', 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right'],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{default:{startLoc:{col:23,line:21},endLoc:{col:78,line:21},startBody:{col:23,line:21},endBody:{col:78,line:21}},alert:{startLoc:{col:21,line:23},endLoc:{col:1,line:27},startBody:{col:21,line:23},endBody:{col:1,line:27}},error:{startLoc:{col:21,line:29},endLoc:{col:1,line:33},startBody:{col:21,line:29},endBody:{col:1,line:33}},success:{startLoc:{col:23,line:35},endLoc:{col:1,line:39},startBody:{col:23,line:35},endBody:{col:1,line:39}},small:{startLoc:{col:21,line:41},endLoc:{col:1,line:45},startBody:{col:21,line:41},endBody:{col:1,line:45}},large:{startLoc:{col:21,line:47},endLoc:{col:1,line:51},startBody:{col:21,line:47},endBody:{col:1,line:51}},"with-box-shadow":{startLoc:{col:29,line:53},endLoc:{col:1,line:57},startBody:{col:29,line:53},endBody:{col:1,line:57}},invisible:{startLoc:{col:25,line:61},endLoc:{col:1,line:73},startBody:{col:25,line:61},endBody:{col:1,line:73}},dismissible:{startLoc:{col:27,line:75},endLoc:{col:1,line:99},startBody:{col:27,line:75},endBody:{col:1,line:99}},"auto-close":{startLoc:{col:25,line:101},endLoc:{col:1,line:142},startBody:{col:25,line:101},endBody:{col:1,line:142}},"with-custom-aria-label":{startLoc:{col:35,line:144},endLoc:{col:1,line:148},startBody:{col:35,line:144},endBody:{col:1,line:148}},"with-custom-heading-level":{startLoc:{col:38,line:156},endLoc:{col:1,line:160},startBody:{col:38,line:156},endBody:{col:1,line:160}},playground:{startLoc:{col:26,line:168},endLoc:{col:1,line:213},startBody:{col:26,line:168},endBody:{col:1,line:213}}}},controls:{hideNoControlsWarning:!0}},decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}]};var Default=function Default(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{children:content}))},Alert=function Alert(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{type:"alert",children:content}))},Error=function Error(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{type:"error",children:content}))},Success=function Success(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{type:"success",children:content}))},Small=function Small(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,{label:"Only visible for screen readers",size:"small",children:"Message"})},Large=function Large(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{size:"large",children:content}))},WithBoxShadow=function WithBoxShadow(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{boxShadow:!0,children:content}))};WithBoxShadow.storyName="With box shadow";var Invisible=function Invisible(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState,2),open=_useState2[0],setOpen=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{onClick:function onClick(){return setOpen(!open)},children:"Toggle notification"}),open&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,{label:"Invisible notification",invisible:!0,children:"I'm only seen by screen readers"})]})},Dismissible=function Dismissible(){var _useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!0),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState3,2),open=_useState4[0],setOpen=_useState4[1],showButtonRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[!open&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{ref:showButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open notification"}),open&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{dismissible:!0,onClose:function onClose(){return function onClose(){setOpen(!1),showButtonRef.current&&showButtonRef.current.focus()}()},closeButtonLabelText:"Close notification",children:content}))]})},AutoClose=function AutoClose(){var _useState5=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),_useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState5,2),open=_useState6[0],setOpen=_useState6[1],showButtonRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[!open&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{ref:showButtonRef,onClick:function onClick(){return setOpen(!0)},children:"Open notification"}),open&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,{label:"With progress bar",position:"top-left",autoClose:!0,autoCloseDuration:3e3,onClose:function onClose(){return function onClose(){setOpen(!1),showButtonRef.current&&showButtonRef.current.focus()}()},children:content}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,{label:"Without progress bar",position:"top-center",autoClose:!0,autoCloseDuration:3e3,displayAutoCloseProgress:!1,children:content})]})]})},WithCustomAriaLabel=function WithCustomAriaLabel(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{notificationAriaLabel:"Custom aria label",children:content}))};WithCustomAriaLabel.parameters={loki:{skip:!0}},WithCustomAriaLabel.storyName="With a custom aria-label";var WithCustomHeadingLevel=function WithCustomHeadingLevel(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},props),{},{headingLevel:3,children:content}))};WithCustomHeadingLevel.parameters={loki:{skip:!0}},WithCustomHeadingLevel.storyName="With a custom aria-level";var Playground=function Playground(args){var typedSize,_useState7=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!0),_useState8=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState7,2),open=_useState8[0],setOpen=_useState8[1];return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){"inline"===args.position&&setOpen(!0)}),[args.position]),typedSize=(args.position,args.size),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{style:{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},onClick:function onClick(){return setOpen(!open)},children:"Toggle notification"}),open&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_Notification__WEBPACK_IMPORTED_MODULE_2__.P,{autoClose:args.autoClose,autoCloseDuration:args.autoCloseDuration,displayAutoCloseProgress:args.displayAutoCloseProgress,invisible:args.invisible,label:args.label,type:args.type,onClose:function onClose(){return setOpen(!1)},position:args.position,size:typedSize,dismissible:args.dismissible,closeButtonLabelText:args.closeButtonLabelText,headingLevel:args.headingLevel,children:args.body})]})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={label:"Label",body:content,closeButtonLabelText:"Close notification",type:"info",size:"default",position:"inline",invisible:!1,dismissible:!1,autoClose:!1,displayAutoCloseProgress:!0,autoCloseDuration:6e3,headingLevel:2},Playground.argTypes={type:{options:["info","success","alert","error"],control:{type:"radio"}},size:{options:["default","small","large"],control:{type:"radio"}},position:{options:["inline","top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],control:{type:"radio"}}},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"() => {content}"}},Default.parameters),Alert.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},Alert.parameters),Error.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},Error.parameters),Success.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},Success.parameters),Small.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n Message\n \n)'}},Small.parameters),Large.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},Large.parameters),WithBoxShadow.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"() => (\n \n {content}\n \n)"}},WithBoxShadow.parameters),Invisible.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => {\n const [open, setOpen] = useState(false);\n return (\n <>\n \n {open && (\n \n I'm only seen by screen readers\n \n )}\n \n );\n}'}},Invisible.parameters),Dismissible.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => {\n const [open, setOpen] = useState(true);\n const showButtonRef = useRef(null);\n const onClose = () => {\n setOpen(false);\n if (showButtonRef.current) {\n showButtonRef.current.focus();\n }\n };\n\n return (\n <>\n {!open && (\n \n )}\n {open && (\n onClose()} closeButtonLabelText="Close notification">\n {content}\n \n )}\n \n );\n}'}},Dismissible.parameters),AutoClose.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => {\n const [open, setOpen] = useState(false);\n const showButtonRef = useRef(null);\n const onClose = () => {\n setOpen(false);\n if (showButtonRef.current) {\n showButtonRef.current.focus();\n }\n };\n\n return (\n <>\n {!open && (\n \n )}\n {open && (\n <>\n onClose()}\n >\n {content}\n \n \n {content}\n \n \n )}\n \n );\n}'}},AutoClose.parameters),WithCustomAriaLabel.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:'() => (\n \n {content}\n \n)'}},WithCustomAriaLabel.parameters),WithCustomHeadingLevel.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"() => (\n \n {content}\n \n)"}},WithCustomHeadingLevel.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const [open, setOpen] = useState(true);\n\n useEffect(() => {\n if (args.position === 'inline') setOpen(true);\n }, [args.position]);\n\n let typedSize;\n args.position === 'inline'\n ? (typedSize = args.size as NotificationSizeInline)\n : (typedSize = args.size as NotificationSizeToast);\n\n return (\n <>\n setOpen(!open)}\n >\n Toggle notification\n \n {open && (\n setOpen(false)}\n position={args.position}\n size={typedSize}\n dismissible={args.dismissible}\n closeButtonLabelText={args.closeButtonLabelText}\n headingLevel={args.headingLevel}\n >\n {args.body}\n \n )}\n \n );\n}"}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/notification/Notification.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/notification/Notification.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/numberInput/NumberInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomStep:()=>CustomStep,Default:()=>Default,Disabled:()=>Disabled,WithDefaultValue:()=>WithDefaultValue,WithMinAndMax:()=>WithMinAndMax,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_NumberInput__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./src/components/numberInput/NumberInput.tsx")),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_NumberInput__WEBPACK_IMPORTED_MODULE_2__.Y,title:"Components/NumberInput",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"300px"},children:storyFn()})}],parameters:{storySource:{source:"import React from 'react';\n\nimport { NumberInput } from './NumberInput';\n\nexport default {\n component: NumberInput,\n title: 'Components/NumberInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n};\n\nexport const Default = (args) => ;\nDefault.args = {\n id: 'Default',\n helperText: 'Assistive text',\n label: 'Label',\n minusStepButtonAriaLabel: 'Decrease by one',\n plusStepButtonAriaLabel: 'Increase by one',\n unit: '€',\n};\n\nexport const CustomStep = (args) => ;\nCustomStep.storyName = 'With a custom step value';\nCustomStep.args = {\n id: 'CustomStep',\n step: 10,\n helperText: 'Assistive text for input with steps of 10',\n label: 'Label for step test',\n minusStepButtonAriaLabel: 'Decrease by ten',\n plusStepButtonAriaLabel: 'Increase by ten',\n unit: '€',\n};\n\nexport const Disabled = (args) => ;\nDisabled.storyName = 'Disabled';\nDisabled.args = {\n id: 'Disabled',\n step: 10,\n helperText: 'Assistive text',\n label: 'Label for disabled',\n minusStepButtonAriaLabel: 'Decrease by ten',\n plusStepButtonAriaLabel: 'Increase by ten',\n unit: '€',\n disabled: true,\n};\n\nexport const WithMinAndMax = (args) => ;\nWithMinAndMax.storyName = 'With min and max value';\nWithMinAndMax.args = {\n id: 'WithMinAndMax',\n step: 1,\n min: 15,\n max: 40,\n helperText: 'Assistive text',\n label: 'Label for min 15 max 40',\n minusStepButtonAriaLabel: 'Decrease by one',\n plusStepButtonAriaLabel: 'Increase by one',\n unit: '€',\n};\n\nexport const WithDefaultValue = (args) => ;\nWithDefaultValue.storyName = 'With a default value';\nWithDefaultValue.args = {\n id: 'WithDefaultValue',\n step: 10,\n defaultValue: 20,\n helperText: 'Assistive text',\n label: 'Label for default 20, step 10',\n minusStepButtonAriaLabel: 'Decrease by ten',\n plusStepButtonAriaLabel: 'Increase by ten',\n unit: '€',\n};\n",locationsMap:{default:{startLoc:{col:23,line:14},endLoc:{col:58,line:14},startBody:{col:23,line:14},endBody:{col:58,line:14}},"custom-step":{startLoc:{col:26,line:24},endLoc:{col:61,line:24},startBody:{col:26,line:24},endBody:{col:61,line:24}},disabled:{startLoc:{col:24,line:36},endLoc:{col:59,line:36},startBody:{col:24,line:36},endBody:{col:59,line:36}},"with-min-and-max":{startLoc:{col:29,line:49},endLoc:{col:64,line:49},startBody:{col:29,line:49},endBody:{col:64,line:49}},"with-default-value":{startLoc:{col:32,line:63},endLoc:{col:67,line:63},startBody:{col:32,line:63},endBody:{col:67,line:63}}}},controls:{expanded:!0}}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_NumberInput__WEBPACK_IMPORTED_MODULE_2__.Y,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};Default.args={id:"Default",helperText:"Assistive text",label:"Label",minusStepButtonAriaLabel:"Decrease by one",plusStepButtonAriaLabel:"Increase by one",unit:"€"};var CustomStep=function CustomStep(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_NumberInput__WEBPACK_IMPORTED_MODULE_2__.Y,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};CustomStep.storyName="With a custom step value",CustomStep.args={id:"CustomStep",step:10,helperText:"Assistive text for input with steps of 10",label:"Label for step test",minusStepButtonAriaLabel:"Decrease by ten",plusStepButtonAriaLabel:"Increase by ten",unit:"€"};var Disabled=function Disabled(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_NumberInput__WEBPACK_IMPORTED_MODULE_2__.Y,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};Disabled.storyName="Disabled",Disabled.args={id:"Disabled",step:10,helperText:"Assistive text",label:"Label for disabled",minusStepButtonAriaLabel:"Decrease by ten",plusStepButtonAriaLabel:"Increase by ten",unit:"€",disabled:!0};var WithMinAndMax=function WithMinAndMax(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_NumberInput__WEBPACK_IMPORTED_MODULE_2__.Y,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithMinAndMax.storyName="With min and max value",WithMinAndMax.args={id:"WithMinAndMax",step:1,min:15,max:40,helperText:"Assistive text",label:"Label for min 15 max 40",minusStepButtonAriaLabel:"Decrease by one",plusStepButtonAriaLabel:"Increase by one",unit:"€"};var WithDefaultValue=function WithDefaultValue(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_NumberInput__WEBPACK_IMPORTED_MODULE_2__.Y,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args))};WithDefaultValue.storyName="With a default value",WithDefaultValue.args={id:"WithDefaultValue",step:10,defaultValue:20,helperText:"Assistive text",label:"Label for default 20, step 10",minusStepButtonAriaLabel:"Decrease by ten",plusStepButtonAriaLabel:"Increase by ten",unit:"€"},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Default.parameters),CustomStep.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},CustomStep.parameters),Disabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},Disabled.parameters),WithMinAndMax.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},WithMinAndMax.parameters),WithDefaultValue.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => "}},WithDefaultValue.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/numberInput/NumberInput.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/numberInput/NumberInput.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{CustomStep.displayName="CustomStep",CustomStep.__docgenInfo={description:"",displayName:"CustomStep",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/numberInput/NumberInput.stories.tsx#CustomStep"]={docgenInfo:CustomStep.__docgenInfo,name:"CustomStep",path:"src/components/numberInput/NumberInput.stories.tsx#CustomStep"})}catch(__react_docgen_typescript_loader_error){}try{Disabled.displayName="Disabled",Disabled.__docgenInfo={description:"",displayName:"Disabled",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/numberInput/NumberInput.stories.tsx#Disabled"]={docgenInfo:Disabled.__docgenInfo,name:"Disabled",path:"src/components/numberInput/NumberInput.stories.tsx#Disabled"})}catch(__react_docgen_typescript_loader_error){}try{WithMinAndMax.displayName="WithMinAndMax",WithMinAndMax.__docgenInfo={description:"",displayName:"WithMinAndMax",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/numberInput/NumberInput.stories.tsx#WithMinAndMax"]={docgenInfo:WithMinAndMax.__docgenInfo,name:"WithMinAndMax",path:"src/components/numberInput/NumberInput.stories.tsx#WithMinAndMax"})}catch(__react_docgen_typescript_loader_error){}try{WithDefaultValue.displayName="WithDefaultValue",WithDefaultValue.__docgenInfo={description:"",displayName:"WithDefaultValue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/numberInput/NumberInput.stories.tsx#WithDefaultValue"]={docgenInfo:WithDefaultValue.__docgenInfo,name:"WithDefaultValue",path:"src/components/numberInput/NumberInput.stories.tsx#WithDefaultValue"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/pagination/Pagination.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,CustomTheme:()=>CustomTheme,Playground:()=>Playground,WithTruncation:()=>WithTruncation,WithoutPrevAndNextButtons:()=>WithoutPrevAndNextButtons,default:()=>Pagination_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js"),toConsumableArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),dist_import=__webpack_require__("../../node_modules/@react-aria/visually-hidden/dist/import.mjs");__webpack_require__("./src/styles/base.css");const Pagination_module={container:"Pagination_container__foAKJ pagination_hds-pagination-container__RDEe-",hideNextButton:"Pagination_hideNextButton__yC6Bn",buttonPrevious:"Pagination_buttonPrevious__TgCuR pagination_hds-pagination__button-prev__zx8i-",buttonNext:"Pagination_buttonNext__l2UKM pagination_hds-pagination__button-next__b5ZQ5",pagination:"Pagination_pagination__hDKaT pagination_hds-pagination__dbixm",pages:"Pagination_pages__Q5UsW pagination_hds-pagination__pages__VbDcc",itemEllipsis:"Pagination_itemEllipsis__KrXD8 pagination_hds-pagination__item-ellipsis__38wXN",itemLink:"Pagination_itemLink__MV-kF pagination_hds-pagination__item-link__XnfJ7",itemLinkActive:"Pagination_itemLinkActive__8nHXW pagination_hds-pagination__item-link--active__dHGJr"};var classNames=__webpack_require__("./src/utils/classNames.ts"),Button=__webpack_require__("./src/components/button/Button.tsx"),IconAngleLeft=__webpack_require__("./src/icons/IconAngleLeft.tsx"),IconAngleRight=__webpack_require__("./src/icons/IconAngleRight.tsx"),useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),mapLangToNext=function mapLangToNext(language){return{fi:"Seuraava",sv:"Nästa",en:"Next"}[language]},mapLangToPrevious=function mapLangToPrevious(language){return{fi:"Edellinen",sv:"Föregående",en:"Previous"}[language]},mapLangToPageAriaLabel=function mapLangToPageAriaLabel(pageNumber,language){return{fi:"Sivu ".concat(pageNumber),sv:"Sida ".concat(pageNumber),en:"Page ".concat(pageNumber)}[language]},mapLangToPageTitle=function mapLangToPageTitle(pageNumber,language,currentPage){return currentPage?{fi:"Nykyinen sivu",sv:"Nuvarande sida",en:"Current page"}[language]:{fi:"Sivu ".concat(pageNumber),sv:"Sida ".concat(pageNumber),en:"Page ".concat(pageNumber)}[language]},mapLangToOpenedPage=function mapLangToOpenedPage(pageNumber,language){return{fi:"Avattu sivu ".concat(pageNumber),sv:"Öppnad sida ".concat(pageNumber),en:"Opened page ".concat(pageNumber)}[language]},range=function range(start,end){var length=end-start+1;return Array.from({length},(function(_,i){return start+i}))},Ellipsis=function(Ellipsis){return Ellipsis.start="start-ellipsis",Ellipsis.end="end-ellipsis",Ellipsis}(Ellipsis||{}),Pagination=function Pagination(_ref2){var _ref2$dataTestId=_ref2.dataTestId,dataTestId=void 0===_ref2$dataTestId?"hds-pagination":_ref2$dataTestId,_ref2$hideNextButton=_ref2.hideNextButton,hideNextButton=void 0!==_ref2$hideNextButton&&_ref2$hideNextButton,_ref2$hidePrevButton=_ref2.hidePrevButton,hidePrevButton=void 0!==_ref2$hidePrevButton&&_ref2$hidePrevButton,_ref2$language=_ref2.language,language=void 0===_ref2$language?"fi":_ref2$language,onChange=_ref2.onChange,pageCount=_ref2.pageCount,pageHref=_ref2.pageHref,pageIndex=_ref2.pageIndex,paginationAriaLabel=_ref2.paginationAriaLabel,_ref2$siblingCount=_ref2.siblingCount,siblingCount=void 0===_ref2$siblingCount?1:_ref2$siblingCount,theme=_ref2.theme,initialPageIndex=(0,react.useRef)(pageIndex),_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),hasUserChangedPage=_useState2[0],setHasUserChangedPage=_useState2[1];(0,react.useEffect)((function(){!1===hasUserChangedPage&&pageIndex!==initialPageIndex.current&&setHasUserChangedPage(!0)}),[pageIndex,hasUserChangedPage]);var itemList=(0,react.useMemo)((function(){return function createPaginationItemList(_ref){var pageCount=_ref.pageCount,pageIndex=_ref.pageIndex,siblingCount=_ref.siblingCount,endPages=range(Math.max(pageCount,2),pageCount),startPages=range(1,Math.min(1,pageCount)),siblingsStart=Math.max(Math.min(pageIndex+1-siblingCount,pageCount-1-2*siblingCount-1),3),siblingsEnd=Math.min(Math.max(pageIndex+1+siblingCount,1+2*siblingCount+2),endPages.length>0?endPages[0]-2:pageCount-1);return[].concat((0,toConsumableArray.Z)(startPages),(0,toConsumableArray.Z)(siblingsStart>3?["start-ellipsis"]:pageCount-1>2?[2]:[]),(0,toConsumableArray.Z)(range(siblingsStart,siblingsEnd)),(0,toConsumableArray.Z)(siblingsEnd1?[pageCount-1]:[]),(0,toConsumableArray.Z)(endPages))}({pageCount,pageIndex,siblingCount})}),[pageCount,pageIndex,siblingCount]),customThemeClass=(0,useTheme.F)(Pagination_module.pagination,theme);return pageCount<=0?null:(0,jsx_runtime.jsx)("div",{className:Pagination_module.container,children:(0,jsx_runtime.jsxs)("nav",{className:(0,classNames.Z)(Pagination_module.pagination,customThemeClass,hideNextButton?Pagination_module.hideNextButton:""),role:"navigation","aria-label":paginationAriaLabel,"data-next":mapLangToNext(language),"data-testid":dataTestId,children:[(0,jsx_runtime.jsx)(dist_import.T,{children:(0,jsx_runtime.jsx)("span",{"aria-atomic":!0,"aria-live":"polite",children:hasUserChangedPage?mapLangToOpenedPage(pageIndex+1,language):""})}),!hidePrevButton&&(0,jsx_runtime.jsx)(Button.z,{className:Pagination_module.buttonPrevious,"data-testid":"".concat(dataTestId,"-previous-button"),disabled:0===pageIndex||1===pageCount,onClick:function onClick(event){return onChange(event,pageIndex-1)},variant:"supplementary",theme:"black",iconLeft:(0,jsx_runtime.jsx)(IconAngleLeft.IconAngleLeft,{}),children:mapLangToPrevious(language)}),(0,jsx_runtime.jsx)("ul",{className:Pagination_module.pages,children:itemList.map((function(pageItem){return pageItem===Ellipsis.start||pageItem===Ellipsis.end?(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)("span",{className:Pagination_module.itemEllipsis,children:"..."})},pageItem):(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)("a",{className:(0,classNames.Z)(Pagination_module.itemLink,pageIndex+1===pageItem?Pagination_module.itemLinkActive:""),"data-testid":"".concat(dataTestId,"-page-").concat(pageItem),href:pageHref(pageItem),onClick:onChange?function(event){return onChange(event,pageItem-1)}:void 0,title:mapLangToPageTitle(pageItem,language,pageItem===pageIndex+1),"aria-label":mapLangToPageAriaLabel(pageItem,language),"aria-current":pageIndex+1===pageItem&&"page",children:pageItem})},pageItem)}))}),!hideNextButton&&(0,jsx_runtime.jsx)(Button.z,{className:Pagination_module.buttonNext,"data-testid":"".concat(dataTestId,"-next-button"),disabled:pageIndex===pageCount-1||1===pageCount,onClick:function onClick(event){return onChange(event,pageIndex+1)},variant:"supplementary",theme:"black",iconRight:(0,jsx_runtime.jsx)(IconAngleRight.IconAngleRight,{className:Pagination_module.angleRightIcon}),children:mapLangToNext(language)})]})})};try{Pagination.displayName="Pagination",Pagination.__docgenInfo={description:"",displayName:"Pagination",props:{dataTestId:{defaultValue:{value:"hds-pagination"},description:"Data test id of pagination",name:"dataTestId",required:!1,type:{name:"string"}},hideNextButton:{defaultValue:{value:"false"},description:"If true, hide the next-page button",name:"hideNextButton",required:!1,type:{name:"boolean"}},hidePrevButton:{defaultValue:{value:"false"},description:"If true, hide the previous-page button",name:"hidePrevButton",required:!1,type:{name:"boolean"}},language:{defaultValue:{value:"fi"},description:"The language of the pagination component.",name:"language",required:!1,type:{name:"enum",value:[{value:'"en"'},{value:'"fi"'},{value:'"sv"'}]}},onChange:{defaultValue:null,description:"Callback fired when the page is changed",name:"onChange",required:!1,type:{name:"(event: MouseEvent | MouseEvent, index: number) => void"}},pageCount:{defaultValue:null,description:"The total number of pages",name:"pageCount",required:!0,type:{name:"number"}},pageHref:{defaultValue:null,description:"A function for generating the href of pages",name:"pageHref",required:!0,type:{name:"(index: number) => string"}},pageIndex:{defaultValue:null,description:"The active page index",name:"pageIndex",required:!0,type:{name:"number"}},paginationAriaLabel:{defaultValue:null,description:"Aria-label for the pagination nav element",name:"paginationAriaLabel",required:!0,type:{name:"string"}},siblingCount:{defaultValue:{value:"1"},description:"Number of always visible pages before and after the current page",name:"siblingCount",required:!1,type:{name:"number"}},theme:{defaultValue:null,description:"Theme prop for customisation of the Pagination component",name:"theme",required:!1,type:{name:"PaginationCustomTheme"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagination/Pagination.tsx#Pagination"]={docgenInfo:Pagination.__docgenInfo,name:"Pagination",path:"src/components/pagination/Pagination.tsx#Pagination"})}catch(__react_docgen_typescript_loader_error){}const Pagination_stories={component:Pagination,title:"Components/Pagination",parameters:{storySource:{source:"import React, { useState } from 'react';\n\nimport { Pagination } from './Pagination';\n\nexport default {\n component: Pagination,\n title: 'Components/Pagination',\n parameters: {\n controls: { expanded: true },\n },\n args: {},\n};\n\n// args is required for docs tab to show source code\n\nexport const Basic = (args) => {\n const [pageIndex, setPageIndex] = useState(0);\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={5}\n pageHref={() => '#'}\n pageIndex={pageIndex}\n paginationAriaLabel=\"Pagination\"\n />\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const WithTruncation = (args) => {\n const [pageIndexPagination1, setPageIndexPagination1] = useState(7);\n const [pageIndexPagination2, setPageIndexPagination2] = useState(7);\n const [pageIndexPagination3, setPageIndexPagination3] = useState(7);\n\n return (\n <>\n {\n event.preventDefault();\n setPageIndexPagination1(index);\n }}\n pageCount={68}\n pageHref={() => '#'}\n pageIndex={pageIndexPagination1}\n paginationAriaLabel=\"Pagination 1\"\n siblingCount={0}\n />\n {\n event.preventDefault();\n setPageIndexPagination2(index);\n }}\n pageCount={68}\n pageHref={() => '#'}\n pageIndex={pageIndexPagination2}\n paginationAriaLabel=\"Pagination 2\"\n />\n {\n event.preventDefault();\n setPageIndexPagination3(index);\n }}\n pageCount={68}\n pageHref={() => '#'}\n pageIndex={pageIndexPagination3}\n paginationAriaLabel=\"Pagination 3\"\n siblingCount={2}\n />\n \n );\n};\n\nWithTruncation.storyName = 'With truncation';\n\n// args is required for docs tab to show source code\n\nexport const WithoutPrevAndNextButtons = (args) => {\n const [pageIndex, setPageIndex] = useState(7);\n\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={68}\n pageHref={() => '#'}\n pageIndex={pageIndex}\n paginationAriaLabel=\"Pagination\"\n />\n );\n};\n\nWithoutPrevAndNextButtons.storyName = 'Without prev and next buttons';\n\n// args is required for docs tab to show source code\n\nexport const CustomTheme = (args) => {\n const theme = {\n '--active-page-background-color': 'var(--color-bus)',\n };\n\n const [pageIndex, setPageIndex] = useState(0);\n\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={5}\n pageHref={() => '#'}\n pageIndex={pageIndex}\n paginationAriaLabel=\"Pagination\"\n theme={theme}\n />\n );\n};\n\nCustomTheme.storyName = 'Custom theme';\n\nexport const Playground = (args) => {\n const [pageIndex, setPageIndex] = useState(7);\n\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={args.pageCount}\n pageHref={() => '#'}\n pageIndex={pageIndex}\n paginationAriaLabel={args.paginationAriaLabel}\n siblingCount={args.siblingCount}\n theme={args.theme}\n />\n );\n};\n\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n loki: { skip: true },\n};\n\nPlayground.args = {\n dataTestId: 'hds-pagination',\n hideNextButton: false,\n hidePrevButton: false,\n language: 'en',\n pageCount: 68,\n siblingCount: 2,\n paginationAriaLabel: 'Pagination',\n theme: {\n '--active-page-background-color': 'var(--color-bus)',\n },\n};\n\nPlayground.argTypes = {\n language: {\n options: ['fi', 'en', 'sv'],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{basic:{startLoc:{col:21,line:16},endLoc:{col:1,line:31},startBody:{col:21,line:16},endBody:{col:1,line:31}},"with-truncation":{startLoc:{col:30,line:35},endLoc:{col:1,line:79},startBody:{col:30,line:35},endBody:{col:1,line:79}},"without-prev-and-next-buttons":{startLoc:{col:41,line:85},endLoc:{col:1,line:103},startBody:{col:41,line:85},endBody:{col:1,line:103}},"custom-theme":{startLoc:{col:27,line:109},endLoc:{col:1,line:130},startBody:{col:27,line:109},endBody:{col:1,line:130}},playground:{startLoc:{col:26,line:134},endLoc:{col:1,line:155},startBody:{col:26,line:134},endBody:{col:1,line:155}}}},controls:{expanded:!0}},args:{}};var Basic=function Basic(args){var _useState=(0,react.useState)(0),_useState2=(0,slicedToArray.Z)(_useState,2),pageIndex=_useState2[0],setPageIndex=_useState2[1];return(0,jsx_runtime.jsx)(Pagination,{language:"en",onChange:function onChange(event,index){event.preventDefault(),setPageIndex(index)},pageCount:5,pageHref:function pageHref(){return"#"},pageIndex,paginationAriaLabel:"Pagination"})},WithTruncation=function WithTruncation(args){var _useState3=(0,react.useState)(7),_useState4=(0,slicedToArray.Z)(_useState3,2),pageIndexPagination1=_useState4[0],setPageIndexPagination1=_useState4[1],_useState5=(0,react.useState)(7),_useState6=(0,slicedToArray.Z)(_useState5,2),pageIndexPagination2=_useState6[0],setPageIndexPagination2=_useState6[1],_useState7=(0,react.useState)(7),_useState8=(0,slicedToArray.Z)(_useState7,2),pageIndexPagination3=_useState8[0],setPageIndexPagination3=_useState8[1];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Pagination,{language:"en",onChange:function onChange(event,index){event.preventDefault(),setPageIndexPagination1(index)},pageCount:68,pageHref:function pageHref(){return"#"},pageIndex:pageIndexPagination1,paginationAriaLabel:"Pagination 1",siblingCount:0}),(0,jsx_runtime.jsx)(Pagination,{language:"en",onChange:function onChange(event,index){event.preventDefault(),setPageIndexPagination2(index)},pageCount:68,pageHref:function pageHref(){return"#"},pageIndex:pageIndexPagination2,paginationAriaLabel:"Pagination 2"}),(0,jsx_runtime.jsx)(Pagination,{language:"en",onChange:function onChange(event,index){event.preventDefault(),setPageIndexPagination3(index)},pageCount:68,pageHref:function pageHref(){return"#"},pageIndex:pageIndexPagination3,paginationAriaLabel:"Pagination 3",siblingCount:2})]})};WithTruncation.storyName="With truncation";var WithoutPrevAndNextButtons=function WithoutPrevAndNextButtons(args){var _useState9=(0,react.useState)(7),_useState10=(0,slicedToArray.Z)(_useState9,2),pageIndex=_useState10[0],setPageIndex=_useState10[1];return(0,jsx_runtime.jsx)(Pagination,{hideNextButton:!0,hidePrevButton:!0,language:"en",onChange:function onChange(event,index){event.preventDefault(),setPageIndex(index)},pageCount:68,pageHref:function pageHref(){return"#"},pageIndex,paginationAriaLabel:"Pagination"})};WithoutPrevAndNextButtons.storyName="Without prev and next buttons";var CustomTheme=function CustomTheme(args){var _useState11=(0,react.useState)(0),_useState12=(0,slicedToArray.Z)(_useState11,2),pageIndex=_useState12[0],setPageIndex=_useState12[1];return(0,jsx_runtime.jsx)(Pagination,{language:"en",onChange:function onChange(event,index){event.preventDefault(),setPageIndex(index)},pageCount:5,pageHref:function pageHref(){return"#"},pageIndex,paginationAriaLabel:"Pagination",theme:{"--active-page-background-color":"var(--color-bus)"}})};CustomTheme.storyName="Custom theme";var Playground=function Playground(args){var _useState13=(0,react.useState)(7),_useState14=(0,slicedToArray.Z)(_useState13,2),pageIndex=_useState14[0],setPageIndex=_useState14[1];return(0,jsx_runtime.jsx)(Pagination,{dataTestId:args.dataTestId,hideNextButton:args.hideNextButton,hidePrevButton:args.hidePrevButton,language:args.language,onChange:function onChange(event,index){event.preventDefault(),setPageIndex(index)},pageCount:args.pageCount,pageHref:function pageHref(){return"#"},pageIndex,paginationAriaLabel:args.paginationAriaLabel,siblingCount:args.siblingCount,theme:args.theme})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0},loki:{skip:!0}},Playground.args={dataTestId:"hds-pagination",hideNextButton:!1,hidePrevButton:!1,language:"en",pageCount:68,siblingCount:2,paginationAriaLabel:"Pagination",theme:{"--active-page-background-color":"var(--color-bus)"}},Playground.argTypes={language:{options:["fi","en","sv"],control:{type:"radio"}}},Basic.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const [pageIndex, setPageIndex] = useState(0);\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={5}\n pageHref={() => \'#\'}\n pageIndex={pageIndex}\n paginationAriaLabel="Pagination"\n />\n );\n}'}},Basic.parameters),WithTruncation.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const [pageIndexPagination1, setPageIndexPagination1] = useState(7);\n const [pageIndexPagination2, setPageIndexPagination2] = useState(7);\n const [pageIndexPagination3, setPageIndexPagination3] = useState(7);\n\n return (\n <>\n {\n event.preventDefault();\n setPageIndexPagination1(index);\n }}\n pageCount={68}\n pageHref={() => \'#\'}\n pageIndex={pageIndexPagination1}\n paginationAriaLabel="Pagination 1"\n siblingCount={0}\n />\n {\n event.preventDefault();\n setPageIndexPagination2(index);\n }}\n pageCount={68}\n pageHref={() => \'#\'}\n pageIndex={pageIndexPagination2}\n paginationAriaLabel="Pagination 2"\n />\n {\n event.preventDefault();\n setPageIndexPagination3(index);\n }}\n pageCount={68}\n pageHref={() => \'#\'}\n pageIndex={pageIndexPagination3}\n paginationAriaLabel="Pagination 3"\n siblingCount={2}\n />\n \n );\n}'}},WithTruncation.parameters),WithoutPrevAndNextButtons.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const [pageIndex, setPageIndex] = useState(7);\n\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={68}\n pageHref={() => \'#\'}\n pageIndex={pageIndex}\n paginationAriaLabel="Pagination"\n />\n );\n}'}},WithoutPrevAndNextButtons.parameters),CustomTheme.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const theme = {\n '--active-page-background-color': 'var(--color-bus)',\n };\n\n const [pageIndex, setPageIndex] = useState(0);\n\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={5}\n pageHref={() => '#'}\n pageIndex={pageIndex}\n paginationAriaLabel=\"Pagination\"\n theme={theme}\n />\n );\n}"}},CustomTheme.parameters),Playground.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const [pageIndex, setPageIndex] = useState(7);\n\n return (\n {\n event.preventDefault();\n setPageIndex(index);\n }}\n pageCount={args.pageCount}\n pageHref={() => '#'}\n pageIndex={pageIndex}\n paginationAriaLabel={args.paginationAriaLabel}\n siblingCount={args.siblingCount}\n theme={args.theme}\n />\n );\n}"}},Playground.parameters);try{Basic.displayName="Basic",Basic.__docgenInfo={description:"",displayName:"Basic",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagination/Pagination.stories.tsx#Basic"]={docgenInfo:Basic.__docgenInfo,name:"Basic",path:"src/components/pagination/Pagination.stories.tsx#Basic"})}catch(__react_docgen_typescript_loader_error){}try{WithTruncation.displayName="WithTruncation",WithTruncation.__docgenInfo={description:"",displayName:"WithTruncation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagination/Pagination.stories.tsx#WithTruncation"]={docgenInfo:WithTruncation.__docgenInfo,name:"WithTruncation",path:"src/components/pagination/Pagination.stories.tsx#WithTruncation"})}catch(__react_docgen_typescript_loader_error){}try{WithoutPrevAndNextButtons.displayName="WithoutPrevAndNextButtons",WithoutPrevAndNextButtons.__docgenInfo={description:"",displayName:"WithoutPrevAndNextButtons",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagination/Pagination.stories.tsx#WithoutPrevAndNextButtons"]={docgenInfo:WithoutPrevAndNextButtons.__docgenInfo,name:"WithoutPrevAndNextButtons",path:"src/components/pagination/Pagination.stories.tsx#WithoutPrevAndNextButtons"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagination/Pagination.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/pagination/Pagination.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagination/Pagination.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/pagination/Pagination.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/passwordInput/PasswordInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AutoCompleteOn:()=>AutoCompleteOn,Default:()=>Default,Disabled:()=>Disabled,InitiallyRevealed:()=>InitiallyRevealed,Invalid:()=>Invalid,Success:()=>Success,WithDefaultValue:()=>WithDefaultValue,WithExternalShowPasswordButton:()=>WithExternalShowPasswordButton,default:()=>PasswordInput_stories});var slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react=__webpack_require__("../../node_modules/react/index.js"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");__webpack_require__("./src/styles/base.css");const PasswordInput_module_disabledShowPasswordButton="PasswordInput_disabledShowPasswordButton__5nnnF";var IconEyeCrossed=__webpack_require__("./src/icons/IconEyeCrossed.tsx"),IconEye=__webpack_require__("./src/icons/IconEye.tsx"),InputWrapper=__webpack_require__("./src/internal/input-wrapper/InputWrapper.tsx"),classNames=__webpack_require__("./src/utils/classNames.ts"),TextInput_module=__webpack_require__("./src/components/textInput/TextInput.module.css"),composeAriaDescribedBy=__webpack_require__("./src/utils/composeAriaDescribedBy.ts"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["className","errorText","helperText","hideLabel","id","invalid","label","required","style","successText","infoText","tooltipLabel","tooltipText","tooltipButtonLabel","concealPasswordButtonAriaLabel","disabled","includeShowPasswordButton","initiallyRevealed","onBlur","revealPasswordButtonAriaLabel","type"],PasswordInput=react.forwardRef((function(_ref,ref){var revealPassword,setRevealPassword,className=_ref.className,errorText=_ref.errorText,helperText=_ref.helperText,hideLabel=_ref.hideLabel,id=_ref.id,invalid=_ref.invalid,label=_ref.label,required=_ref.required,style=_ref.style,successText=_ref.successText,infoText=_ref.infoText,tooltipLabel=_ref.tooltipLabel,tooltipText=_ref.tooltipText,tooltipButtonLabel=_ref.tooltipButtonLabel,concealPasswordButtonAriaLabel=_ref.concealPasswordButtonAriaLabel,_ref$disabled=_ref.disabled,disabled=void 0!==_ref$disabled&&_ref$disabled,_ref$includeShowPassw=_ref.includeShowPasswordButton,includeShowPasswordButton=void 0===_ref$includeShowPassw||_ref$includeShowPassw,_ref$initiallyReveale=_ref.initiallyRevealed,initiallyRevealed=void 0!==_ref$initiallyReveale&&_ref$initiallyReveale,onBlur=_ref.onBlur,revealPasswordButtonAriaLabel=_ref.revealPasswordButtonAriaLabel,type=_ref.type,passwordInputProps=(0,objectWithoutProperties.Z)(_ref,_excluded),wrapperProps={className,errorText,helperText,hideLabel,id,invalid,label,required,style,successText,infoText,tooltipLabel,tooltipText,tooltipButtonLabel};if(includeShowPasswordButton){var _useState=(0,react.useState)(initiallyRevealed),_useState2=(0,slicedToArray.Z)(_useState,2);revealPassword=_useState2[0],setRevealPassword=_useState2[1]}var ariaDescribedBy=(0,composeAriaDescribedBy.Z)(id,helperText,errorText,successText,infoText);return(0,jsx_runtime.jsxs)(InputWrapper.S,(0,objectSpread2.Z)((0,objectSpread2.Z)({onBlur:function handleOnBlur(event){event.currentTarget.contains(event.relatedTarget)||includeShowPasswordButton&&revealPassword&&setRevealPassword(!1),"function"==typeof onBlur&&onBlur(event)}},wrapperProps),{},{children:[(0,jsx_runtime.jsx)("input",(0,objectSpread2.Z)({className:(0,classNames.Z)(TextInput_module.Z.input,includeShowPasswordButton&&TextInput_module.Z.hasButton),disabled,id,ref,required,type:function resolveType(){return includeShowPasswordButton?revealPassword?"text":"password":type||"password"}(),"aria-describedby":ariaDescribedBy.length>0?ariaDescribedBy:null},passwordInputProps)),includeShowPasswordButton&&(0,jsx_runtime.jsx)("div",{className:TextInput_module.Z.buttonWrapper,children:(0,jsx_runtime.jsxs)("button",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:TextInput_module.Z.button,type:"button",disabled},function getButtonProps(){return revealPassword?{"aria-label":concealPasswordButtonAriaLabel,onClick:function onClick(){return setRevealPassword(!1)}}:{"aria-label":revealPasswordButtonAriaLabel,onClick:function onClick(){return setRevealPassword(!0)}}}()),{},{children:[revealPassword&&(0,jsx_runtime.jsx)(IconEyeCrossed.IconEyeCrossed,{"aria-hidden":!0,className:disabled?PasswordInput_module_disabledShowPasswordButton:""}),!revealPassword&&(0,jsx_runtime.jsx)(IconEye.IconEye,{"aria-hidden":!0,className:disabled?PasswordInput_module_disabledShowPasswordButton:""})]}))})]}))}));try{PasswordInput.displayName="PasswordInput",PasswordInput.__docgenInfo={description:"",displayName:"PasswordInput",props:{className:{defaultValue:null,description:"Additional class names to apply to the text input",name:"className",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"The id of the input element",name:"id",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Override or extend the styles applied to the component",name:"style",required:!1,type:{name:"CSSProperties"}},label:{defaultValue:null,description:"The label for the input",name:"label",required:!0,type:{name:"string"}},disabled:{defaultValue:{value:"false"},description:"If `true`, the input will be disabled",name:"disabled",required:!1,type:{name:"boolean"}},type:{defaultValue:null,description:"Type of the password input. Only applied when includeShowPasswordButton is false.\nUse this if you wish to not have show password button, or you wish to apply external show password button.",name:"type",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"The value of the input element, required for a controlled component",name:"value",required:!1,type:{name:"string & (string | number | readonly string[])"}},defaultValue:{defaultValue:null,description:"The default input element value. Use when the component is not controlled",name:"defaultValue",required:!1,type:{name:"string & (string | number | readonly string[])"}},placeholder:{defaultValue:null,description:"Short hint displayed in the input before the user enters a value",name:"placeholder",required:!1,type:{name:"string"}},onChange:{defaultValue:null,description:"Callback fired when the state is changed",name:"onChange",required:!1,type:{name:"ChangeEventHandler"}},readOnly:{defaultValue:null,description:"If `true`, prevents the user from changing the value of the field (not from interacting with the field)",name:"readOnly",required:!1,type:{name:"boolean"}},required:{defaultValue:null,description:"If `true`, the label is displayed as required and the `input` element will be required",name:"required",required:!1,type:{name:"boolean"}},errorText:{defaultValue:null,description:"The error text content that will be shown below the input",name:"errorText",required:!1,type:{name:"string"}},helperText:{defaultValue:null,description:"The helper text content that will be shown below the input",name:"helperText",required:!1,type:{name:"string"}},tooltipText:{defaultValue:null,description:"The text content of the tooltip",name:"tooltipText",required:!1,type:{name:"string"}},tooltipLabel:{defaultValue:null,description:"Aria-label text for the tooltip",name:"tooltipLabel",required:!1,type:{name:"string"}},tooltipButtonLabel:{defaultValue:null,description:"Aria-label text for the tooltip trigger button",name:"tooltipButtonLabel",required:!1,type:{name:"string"}},hideLabel:{defaultValue:null,description:"Hides the label above the input",name:"hideLabel",required:!1,type:{name:"boolean"}},invalid:{defaultValue:null,description:"If `true`, the input will be displayed in an invalid state.",name:"invalid",required:!1,type:{name:"boolean"}},successText:{defaultValue:null,description:"The success text content that will be shown below the input",name:"successText",required:!1,type:{name:"string"}},infoText:{defaultValue:null,description:"The info text content that will be shown below the input",name:"infoText",required:!1,type:{name:"string"}},concealPasswordButtonAriaLabel:{defaultValue:null,description:"The aria-label for conceal password button",name:"concealPasswordButtonAriaLabel",required:!1,type:{name:"string"}},includeShowPasswordButton:{defaultValue:{value:"true"},description:"Boolean value for whether the component will include show / hide password button. Defaults to true.",name:"includeShowPasswordButton",required:!1,type:{name:"boolean"}},initiallyRevealed:{defaultValue:{value:"false"},description:"Boolean value for whether the component will initially reveal the password or not.\nOnly applied when includeShowPasswordButton is true. Defaults to false.",name:"initiallyRevealed",required:!1,type:{name:"boolean"}},revealPasswordButtonAriaLabel:{defaultValue:null,description:"The aria-label for reveal password button",name:"revealPasswordButtonAriaLabel",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.tsx#PasswordInput"]={docgenInfo:PasswordInput.__docgenInfo,name:"PasswordInput",path:"src/components/passwordInput/PasswordInput.tsx#PasswordInput"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/button/Button.tsx");const PasswordInput_stories={component:PasswordInput,title:"Components/PasswordInput",decorators:[function(storyFn){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:"import React, { useState } from 'react';\n\nimport { PasswordInput } from './PasswordInput';\nimport { Button } from '../button';\nimport { IconEye, IconEyeCrossed } from '../../icons';\n\nexport default {\n component: PasswordInput,\n title: 'Components/PasswordInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n args: {},\n};\n\nexport const Default = (args) => ;\nDefault.args = {\n id: 'Default',\n helperText: 'Assistive text',\n label: 'Label',\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\n\nexport const Disabled = (args) => ;\nDisabled.storyName = 'Disabled';\nDisabled.args = {\n id: 'Disabled',\n helperText: 'Assistive text',\n defaultValue: '0451234567',\n label: 'Label for disabled',\n disabled: true,\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\n\nexport const WithDefaultValue = (args) => ;\nWithDefaultValue.storyName = 'WithDefaultValue';\nWithDefaultValue.args = {\n id: 'WithDefaultValue',\n helperText: 'Assistive text',\n defaultValue: '0451234567',\n label: 'Label for with default value',\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\n\nexport const InitiallyRevealed = (args) => ;\nInitiallyRevealed.storyName = 'InitiallyRevealed';\nInitiallyRevealed.args = {\n id: 'InitiallyRevealed',\n helperText: 'Assistive text',\n defaultValue: '0451234567',\n label: 'Label for initially revealed',\n initiallyRevealed: true,\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\nexport const AutoCompleteOn = (args) => ;\nAutoCompleteOn.storyName = 'Autocomplete on';\nAutoCompleteOn.args = {\n id: 'Autocomplete on',\n helperText: 'Assistive text',\n label: 'Label for autocomplete on',\n autoComplete: 'on',\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\n\nexport const Success = (args) => ;\nSuccess.storyName = 'Success';\nSuccess.args = {\n id: 'Success',\n helperText: 'Assistive text',\n label: 'Label for success input',\n successText: 'Success text',\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\n\nexport const Invalid = (args) => ;\nInvalid.storyName = 'Invalid';\nInvalid.args = {\n id: 'Error',\n invalid: true,\n helperText: 'Assistive text',\n label: 'Label for invalid input',\n errorText: 'Error text',\n revealPasswordButtonAriaLabel: 'Show password',\n concealPasswordButtonAriaLabel: 'Hide password',\n};\n\nexport const WithExternalShowPasswordButton = () => {\n const [revealPassword, setRevealPassword] = useState(false);\n return (\n
\n \n setRevealPassword(!revealPassword)}\n iconLeft={revealPassword ? : }\n >\n {revealPassword ? 'Hide password' : 'Show password'}\n \n
\n );\n};\n\nWithExternalShowPasswordButton.storyName = 'With external show password button';\n",locationsMap:{default:{startLoc:{col:23,line:17},endLoc:{col:60,line:17},startBody:{col:23,line:17},endBody:{col:60,line:17}},disabled:{startLoc:{col:24,line:26},endLoc:{col:61,line:26},startBody:{col:24,line:26},endBody:{col:61,line:26}},"with-default-value":{startLoc:{col:32,line:38},endLoc:{col:69,line:38},startBody:{col:32,line:38},endBody:{col:69,line:38}},"initially-revealed":{startLoc:{col:33,line:49},endLoc:{col:70,line:49},startBody:{col:33,line:49},endBody:{col:70,line:49}},"auto-complete-on":{startLoc:{col:30,line:60},endLoc:{col:67,line:60},startBody:{col:30,line:60},endBody:{col:67,line:60}},success:{startLoc:{col:23,line:71},endLoc:{col:60,line:71},startBody:{col:23,line:71},endBody:{col:60,line:71}},invalid:{startLoc:{col:23,line:82},endLoc:{col:60,line:82},startBody:{col:23,line:82},endBody:{col:60,line:82}},"with-external-show-password-button":{startLoc:{col:46,line:94},endLoc:{col:1,line:114},startBody:{col:46,line:94},endBody:{col:1,line:114}}}},controls:{expanded:!0}},args:{}};var Default=function Default(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};Default.args={id:"Default",helperText:"Assistive text",label:"Label",revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var Disabled=function Disabled(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};Disabled.storyName="Disabled",Disabled.args={id:"Disabled",helperText:"Assistive text",defaultValue:"0451234567",label:"Label for disabled",disabled:!0,revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var WithDefaultValue=function WithDefaultValue(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};WithDefaultValue.storyName="WithDefaultValue",WithDefaultValue.args={id:"WithDefaultValue",helperText:"Assistive text",defaultValue:"0451234567",label:"Label for with default value",revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var InitiallyRevealed=function InitiallyRevealed(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};InitiallyRevealed.storyName="InitiallyRevealed",InitiallyRevealed.args={id:"InitiallyRevealed",helperText:"Assistive text",defaultValue:"0451234567",label:"Label for initially revealed",initiallyRevealed:!0,revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var AutoCompleteOn=function AutoCompleteOn(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};AutoCompleteOn.storyName="Autocomplete on",AutoCompleteOn.args={id:"Autocomplete on",helperText:"Assistive text",label:"Label for autocomplete on",autoComplete:"on",revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var Success=function Success(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};Success.storyName="Success",Success.args={id:"Success",helperText:"Assistive text",label:"Label for success input",successText:"Success text",revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var Invalid=function Invalid(args){return(0,jsx_runtime.jsx)(PasswordInput,(0,objectSpread2.Z)({},args))};Invalid.storyName="Invalid",Invalid.args={id:"Error",invalid:!0,helperText:"Assistive text",label:"Label for invalid input",errorText:"Error text",revealPasswordButtonAriaLabel:"Show password",concealPasswordButtonAriaLabel:"Hide password"};var WithExternalShowPasswordButton=function WithExternalShowPasswordButton(){var _useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),revealPassword=_useState2[0],setRevealPassword=_useState2[1];return(0,jsx_runtime.jsxs)("div",{className:"password-input--external-show-password-button",children:[(0,jsx_runtime.jsx)(PasswordInput,{label:"Label for external show password button",id:"external-password-button",includeShowPasswordButton:!1,helperText:"Assistive text",type:revealPassword?"text":"password"}),(0,jsx_runtime.jsx)(Button.z,{variant:"supplementary",onClick:function onClick(){return setRevealPassword(!revealPassword)},iconLeft:revealPassword?(0,jsx_runtime.jsx)(IconEyeCrossed.IconEyeCrossed,{"aria-hidden":!0}):(0,jsx_runtime.jsx)(IconEye.IconEye,{"aria-hidden":!0}),children:revealPassword?"Hide password":"Show password"})]})};WithExternalShowPasswordButton.storyName="With external show password button",Default.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},Default.parameters),Disabled.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},Disabled.parameters),WithDefaultValue.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},WithDefaultValue.parameters),InitiallyRevealed.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},InitiallyRevealed.parameters),AutoCompleteOn.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},AutoCompleteOn.parameters),Success.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},Success.parameters),Invalid.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},Invalid.parameters),WithExternalShowPasswordButton.parameters=(0,objectSpread2.Z)({storySource:{source:'() => {\n const [revealPassword, setRevealPassword] = useState(false);\n return (\n
\n \n setRevealPassword(!revealPassword)}\n iconLeft={revealPassword ? : }\n >\n {revealPassword ? \'Hide password\' : \'Show password\'}\n \n
\n );\n}'}},WithExternalShowPasswordButton.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/passwordInput/PasswordInput.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Disabled.displayName="Disabled",Disabled.__docgenInfo={description:"",displayName:"Disabled",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#Disabled"]={docgenInfo:Disabled.__docgenInfo,name:"Disabled",path:"src/components/passwordInput/PasswordInput.stories.tsx#Disabled"})}catch(__react_docgen_typescript_loader_error){}try{WithDefaultValue.displayName="WithDefaultValue",WithDefaultValue.__docgenInfo={description:"",displayName:"WithDefaultValue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#WithDefaultValue"]={docgenInfo:WithDefaultValue.__docgenInfo,name:"WithDefaultValue",path:"src/components/passwordInput/PasswordInput.stories.tsx#WithDefaultValue"})}catch(__react_docgen_typescript_loader_error){}try{InitiallyRevealed.displayName="InitiallyRevealed",InitiallyRevealed.__docgenInfo={description:"",displayName:"InitiallyRevealed",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#InitiallyRevealed"]={docgenInfo:InitiallyRevealed.__docgenInfo,name:"InitiallyRevealed",path:"src/components/passwordInput/PasswordInput.stories.tsx#InitiallyRevealed"})}catch(__react_docgen_typescript_loader_error){}try{AutoCompleteOn.displayName="AutoCompleteOn",AutoCompleteOn.__docgenInfo={description:"",displayName:"AutoCompleteOn",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#AutoCompleteOn"]={docgenInfo:AutoCompleteOn.__docgenInfo,name:"AutoCompleteOn",path:"src/components/passwordInput/PasswordInput.stories.tsx#AutoCompleteOn"})}catch(__react_docgen_typescript_loader_error){}try{Success.displayName="Success",Success.__docgenInfo={description:"",displayName:"Success",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#Success"]={docgenInfo:Success.__docgenInfo,name:"Success",path:"src/components/passwordInput/PasswordInput.stories.tsx#Success"})}catch(__react_docgen_typescript_loader_error){}try{Invalid.displayName="Invalid",Invalid.__docgenInfo={description:"",displayName:"Invalid",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/passwordInput/PasswordInput.stories.tsx#Invalid"]={docgenInfo:Invalid.__docgenInfo,name:"Invalid",path:"src/components/passwordInput/PasswordInput.stories.tsx#Invalid"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/phoneInput/PhoneInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Disabled:()=>Disabled,WithCountryCode:()=>WithCountryCode,WithDefaultValue:()=>WithDefaultValue,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("../../node_modules/@storybook/addon-actions/dist/esm/index.js")),_PhoneInput__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/phoneInput/PhoneInput.tsx"),_dropdown_combobox__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/dropdown/combobox/Combobox.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_PhoneInput__WEBPACK_IMPORTED_MODULE_3__.s,title:"Components/PhoneInput",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{maxWidth:"300px"},children:storyFn()})}],parameters:{storySource:{source:"import React from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport { PhoneInput } from './PhoneInput';\nimport { Combobox } from '../dropdown/combobox';\n\nexport default {\n component: PhoneInput,\n title: 'Components/PhoneInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n args: {},\n};\n\nexport const Default = (args) => ;\nDefault.args = {\n id: 'Default',\n helperText: 'Assistive text',\n label: 'Label',\n};\n\nexport const Disabled = (args) => ;\nDisabled.storyName = 'Disabled';\nDisabled.args = {\n id: 'Disabled',\n helperText: 'Assistive text',\n defaultValue: '0451234567',\n label: 'Label for disabled',\n disabled: true,\n};\n\nexport const WithDefaultValue = (args) => ;\nWithDefaultValue.storyName = 'With a default value';\nWithDefaultValue.args = {\n id: 'WithDefaultValue',\n defaultValue: '0451234567',\n helperText: 'Assistive text',\n label: 'Label for default value',\n};\n\nexport const WithCountryCode = (args) => {\n const options = [{ label: 'Finland (+358)' }, { label: 'UK (+46)' }];\n return (\n <>\n

\n Work phone\n

\n
\n action('onBlur')}\n onChange={(change) => action('onChange')(change)}\n onFocus={() => action('onFocus')}\n required\n toggleButtonAriaLabel=\"Choose country code\"\n />\n \n
\n \n );\n};\n\nWithCountryCode.storyName = 'With select countrycode';\nWithCountryCode.args = {\n id: 'WithCountryCode',\n defaultValue: '0451234567',\n 'aria-describedby': 'work-phone',\n label: 'Phone number',\n required: true,\n};\nWithCountryCode.decorators = [(storyFn) =>
{storyFn()}
];\n",locationsMap:{default:{startLoc:{col:23,line:17},endLoc:{col:57,line:17},startBody:{col:23,line:17},endBody:{col:57,line:17}},disabled:{startLoc:{col:24,line:24},endLoc:{col:58,line:24},startBody:{col:24,line:24},endBody:{col:58,line:24}},"with-default-value":{startLoc:{col:32,line:34},endLoc:{col:66,line:34},startBody:{col:32,line:34},endBody:{col:66,line:34}},"with-country-code":{startLoc:{col:31,line:43},endLoc:{col:1,line:68},startBody:{col:31,line:43},endBody:{col:1,line:68}}}},controls:{expanded:!0}},args:{}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_PhoneInput__WEBPACK_IMPORTED_MODULE_3__.s,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args))};Default.args={id:"Default",helperText:"Assistive text",label:"Label"};var Disabled=function Disabled(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_PhoneInput__WEBPACK_IMPORTED_MODULE_3__.s,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args))};Disabled.storyName="Disabled",Disabled.args={id:"Disabled",helperText:"Assistive text",defaultValue:"0451234567",label:"Label for disabled",disabled:!0};var WithDefaultValue=function WithDefaultValue(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_PhoneInput__WEBPACK_IMPORTED_MODULE_3__.s,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args))};WithDefaultValue.storyName="With a default value",WithDefaultValue.args={id:"WithDefaultValue",defaultValue:"0451234567",helperText:"Assistive text",label:"Label for default value"};var WithCountryCode=function WithCountryCode(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p",{id:"work-phone",style:{fontSize:"18px",fontWeight:"bold"},children:"Work phone"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"200px 300px",columnGap:"16px"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dropdown_combobox__WEBPACK_IMPORTED_MODULE_5__.h,{id:"hds-select-1",label:"Country code",helper:"Assistive text","aria-describedby":"work-phone",options:[{label:"Finland (+358)"},{label:"UK (+46)"}],defaultValue:{label:"Finland (+358)"},onBlur:function onBlur(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("onBlur")},onChange:function onChange(change){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("onChange")(change)},onFocus:function onFocus(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("onFocus")},required:!0,toggleButtonAriaLabel:"Choose country code"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_PhoneInput__WEBPACK_IMPORTED_MODULE_3__.s,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args))]})]})};WithCountryCode.storyName="With select countrycode",WithCountryCode.args={id:"WithCountryCode",defaultValue:"0451234567","aria-describedby":"work-phone",label:"Phone number",required:!0},WithCountryCode.decorators=[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{maxWidth:"516px"},children:storyFn()})}],Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => "}},Default.parameters),Disabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => "}},Disabled.parameters),WithDefaultValue.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => "}},WithDefaultValue.parameters),WithCountryCode.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => {\n const options = [{ label: 'Finland (+358)' }, { label: 'UK (+46)' }];\n return (\n <>\n

\n Work phone\n

\n
\n action('onBlur')}\n onChange={(change) => action('onChange')(change)}\n onFocus={() => action('onFocus')}\n required\n toggleButtonAriaLabel=\"Choose country code\"\n />\n \n
\n \n );\n}"}},WithCountryCode.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/phoneInput/PhoneInput.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/phoneInput/PhoneInput.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Disabled.displayName="Disabled",Disabled.__docgenInfo={description:"",displayName:"Disabled",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/phoneInput/PhoneInput.stories.tsx#Disabled"]={docgenInfo:Disabled.__docgenInfo,name:"Disabled",path:"src/components/phoneInput/PhoneInput.stories.tsx#Disabled"})}catch(__react_docgen_typescript_loader_error){}try{WithDefaultValue.displayName="WithDefaultValue",WithDefaultValue.__docgenInfo={description:"",displayName:"WithDefaultValue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/phoneInput/PhoneInput.stories.tsx#WithDefaultValue"]={docgenInfo:WithDefaultValue.__docgenInfo,name:"WithDefaultValue",path:"src/components/phoneInput/PhoneInput.stories.tsx#WithDefaultValue"})}catch(__react_docgen_typescript_loader_error){}try{WithCountryCode.displayName="WithCountryCode",WithCountryCode.__docgenInfo={description:"",displayName:"WithCountryCode",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/phoneInput/PhoneInput.stories.tsx#WithCountryCode"]={docgenInfo:WithCountryCode.__docgenInfo,name:"WithCountryCode",path:"src/components/phoneInput/PhoneInput.stories.tsx#WithCountryCode"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/radioButton/RadioButton.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Custom:()=>Custom,Default:()=>Default,Disabled:()=>Disabled,Playground:()=>Playground,Selected:()=>Selected,SelectedDisabled:()=>SelectedDisabled,WithHelperText:()=>WithHelperText,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js"),_RadioButton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/radioButton/RadioButton.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,title:"Components/RadioButton",parameters:{storySource:{source:"import React, { useState } from 'react';\nimport { ArgsTable, Stories, Title } from '@storybook/addon-docs/blocks';\n\nimport { RadioButton } from './RadioButton';\n\nexport default {\n component: RadioButton,\n title: 'Components/RadioButton',\n parameters: {\n controls: { hideNoControlsWarning: true },\n docs: {\n page: () => (\n <>\n Props\n \n \n \n ),\n },\n },\n};\n\nexport const Default = () => ;\n\nexport const Selected = () => ;\n\nexport const Disabled = () => ;\n\nexport const SelectedDisabled = () => ;\nSelectedDisabled.storyName = 'Selected & disabled';\n\nexport const Custom = () => {\n const [radioValue, setRadioValue] = useState('');\n const options = ['foo', 'bar'];\n\n const customStyles = {\n '--size': '36px',\n '--icon-scale': 0.65,\n '--border-width': '3px',\n '--outline-width': '4px',\n '--border-color-selected': 'var(--color-success)',\n '--border-color-selected-hover': 'var(--color-success-dark)',\n '--border-color-selected-focus': 'var(--color-success)',\n '--icon-color-selected': 'var(--color-success)',\n '--icon-color-hover': 'var(--color-success-dark)',\n '--focus-outline-color': 'var(--color-black-20)',\n } as React.CSSProperties;\n\n return (\n <>\n {options.map((option) => (\n setRadioValue((event.target as HTMLInputElement).value)}\n />\n ))}\n \n );\n};\nCustom.storyName = 'With custom styles';\n\nexport const WithHelperText = () => ;\n\nexport const Playground = (args) => {\n const [radioValue, setRadioValue] = useState('');\n const options = ['foo', 'bar', 'baz'];\n\n const styles = {\n '--size': `${args.size}px`,\n '--icon-scale': args.iconScale,\n '--border-width': `${args.borderWidth}px`,\n '--outline-width': `${args.outlineWidth}px`,\n '--label-font-size': `${args.labelFontSize}px`,\n '--label-padding': `${args.labelPadding}px`,\n '--background': args.background,\n '--background-hover': args.backgroundHover,\n '--background-focus': args.backgroundFocus,\n '--background-unselected-disabled': args.backgroundUnselectedDisabled,\n '--background-selected-disabled': args.backgroundSelectedDisabled,\n '--border-color-focus': args.borderColorFocus,\n '--border-color-selected': args.borderColorSelected,\n '--border-color-selected-hover': args.borderColorSelectedHover,\n '--border-color-selected-disabled': args.borderColorSelectedDisabled,\n '--border-color-unselected': args.borderColorUnselected,\n '--border-color-unselected-hover': args.borderColorUnselectedHover,\n '--border-color-unselected-disabled': args.borderColorUnselectedDisabled,\n '--focus-outline-color': args.focusOutlineColor,\n '--icon-color-unselected': args.iconColorUnselected,\n '--icon-color-selected': args.iconColorSelected,\n '--icon-color-disabled': args.iconColorDisabled,\n '--label-color': args.labelColorDefault,\n '--label-color-disabled': args.labelColorDisabled,\n } as React.CSSProperties;\n\n return (\n <>\n {options.map((option) => (\n setRadioValue((event.target as HTMLInputElement).value)}\n />\n ))}\n \n \n \n );\n};\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n size: 24,\n iconScale: 0.5,\n borderWidth: 2,\n outlineWidth: 3,\n labelFontSize: 16,\n labelPadding: 8,\n background: '#ffffff',\n backgroundHover: '#ffffff',\n backgroundFocus: '#ffffff',\n backgroundUnselectedDisabled: '#e5e5e5',\n backgroundSelectedDisabled: '#ffffff',\n borderColorFocus: '#1a1a1a',\n borderColorSelected: '#0000bf',\n borderColorSelectedHover: '#000098',\n borderColorSelectedDisabled: '#cccccc',\n borderColorUnselected: '#808080',\n borderColorUnselectedHover: '#1a1a1a',\n borderColorUnselectedDisabled: '#e5e5e5',\n focusOutlineColor: '#0072c6',\n iconColorUnselected: 'rgba(0, 0, 0, 0)',\n iconColorSelected: '#0000bf',\n iconColorDisabled: '#e5e5e5',\n labelColorDefault: '#1a1a1a',\n labelColorDisabled: '#999898',\n};\n\nPlayground.argTypes = {\n size: {\n control: {\n type: 'range',\n min: 10,\n max: 100,\n step: 1,\n },\n },\n iconScale: {\n control: {\n type: 'range',\n min: 0.1,\n max: 0.9,\n step: 0.05,\n },\n },\n borderWidth: {\n control: {\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n },\n },\n outlineWidth: {\n control: {\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n },\n },\n labelFontSize: {\n control: {\n type: 'range',\n min: 12,\n max: 32,\n step: 1,\n },\n },\n labelPadding: {\n control: {\n type: 'range',\n min: 4,\n max: 32,\n step: 2,\n },\n },\n background: { control: { type: 'color' } },\n backgroundHover: { control: { type: 'color' } },\n backgroundFocus: { control: { type: 'color' } },\n backgroundUnselectedDisabled: { control: { type: 'color' } },\n backgroundSelectedDisabled: { control: { type: 'color' } },\n borderColorFocus: { control: { type: 'color' } },\n borderColorSelected: { control: { type: 'color' } },\n borderColorSelectedHover: { control: { type: 'color' } },\n borderColorSelectedDisabled: { control: { type: 'color' } },\n borderColorUnselected: { control: { type: 'color' } },\n borderColorUnselectedHover: { control: { type: 'color' } },\n borderColorUnselectedDisabled: { control: { type: 'color' } },\n focusOutlineColor: { control: { type: 'color' } },\n iconColorUnselected: { control: { type: 'color' } },\n iconColorSelected: { control: { type: 'color' } },\n iconColorDisabled: { control: { type: 'color' } },\n labelColorDefault: { control: { type: 'color' } },\n labelColorDisabled: { control: { type: 'color' } },\n};\n",locationsMap:{default:{startLoc:{col:23,line:23},endLoc:{col:69,line:23},startBody:{col:23,line:23},endBody:{col:69,line:23}},selected:{startLoc:{col:24,line:25},endLoc:{col:79,line:25},startBody:{col:24,line:25},endBody:{col:79,line:25}},disabled:{startLoc:{col:24,line:27},endLoc:{col:80,line:27},startBody:{col:24,line:27},endBody:{col:80,line:27}},"selected-disabled":{startLoc:{col:32,line:29},endLoc:{col:96,line:29},startBody:{col:32,line:29},endBody:{col:96,line:29}},custom:{startLoc:{col:22,line:32},endLoc:{col:1,line:64},startBody:{col:22,line:32},endBody:{col:1,line:64}},"with-helper-text":{startLoc:{col:30,line:67},endLoc:{col:116,line:67},startBody:{col:30,line:67},endBody:{col:116,line:67}},playground:{startLoc:{col:26,line:69},endLoc:{col:1,line:117},startBody:{col:26,line:69},endBody:{col:1,line:117}}}},controls:{hideNoControlsWarning:!0},docs:{page:function page(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.Dx,{children:"Props"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.$4,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.fQ,{title:"Examples",includePrimary:!0})]})}}}};var Default=function Default(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio",label:"Label"})},Selected=function Selected(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio2",label:"Label",checked:!0})},Disabled=function Disabled(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio3",label:"Label",disabled:!0})},SelectedDisabled=function SelectedDisabled(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio4",label:"Label",checked:!0,disabled:!0})};SelectedDisabled.storyName="Selected & disabled";var Custom=function Custom(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState,2),radioValue=_useState2[0],setRadioValue=_useState2[1],customStyles={"--size":"36px","--icon-scale":.65,"--border-width":"3px","--outline-width":"4px","--border-color-selected":"var(--color-success)","--border-color-selected-hover":"var(--color-success-dark)","--border-color-selected-focus":"var(--color-success)","--icon-color-selected":"var(--color-success)","--icon-color-hover":"var(--color-success-dark)","--focus-outline-color":"var(--color-black-20)"};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["foo","bar"].map((function(option){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio-".concat(option),value:option,label:"Label",style:customStyles,checked:radioValue===option,onChange:function onChange(event){return setRadioValue(event.target.value)}},"radio-".concat(option))}))})};Custom.storyName="With custom styles";var WithHelperText=function WithHelperText(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio-with-helper",label:"Label",helperText:"Assistive text"})},Playground=function Playground(args){var _useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_useState3,2),radioValue=_useState4[0],setRadioValue=_useState4[1],styles={"--size":"".concat(args.size,"px"),"--icon-scale":args.iconScale,"--border-width":"".concat(args.borderWidth,"px"),"--outline-width":"".concat(args.outlineWidth,"px"),"--label-font-size":"".concat(args.labelFontSize,"px"),"--label-padding":"".concat(args.labelPadding,"px"),"--background":args.background,"--background-hover":args.backgroundHover,"--background-focus":args.backgroundFocus,"--background-unselected-disabled":args.backgroundUnselectedDisabled,"--background-selected-disabled":args.backgroundSelectedDisabled,"--border-color-focus":args.borderColorFocus,"--border-color-selected":args.borderColorSelected,"--border-color-selected-hover":args.borderColorSelectedHover,"--border-color-selected-disabled":args.borderColorSelectedDisabled,"--border-color-unselected":args.borderColorUnselected,"--border-color-unselected-hover":args.borderColorUnselectedHover,"--border-color-unselected-disabled":args.borderColorUnselectedDisabled,"--focus-outline-color":args.focusOutlineColor,"--icon-color-unselected":args.iconColorUnselected,"--icon-color-selected":args.iconColorSelected,"--icon-color-disabled":args.iconColorDisabled,"--label-color":args.labelColorDefault,"--label-color-disabled":args.labelColorDisabled};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[["foo","bar","baz"].map((function(option){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio-".concat(option),value:option,label:"Label",style:styles,checked:radioValue===option,onChange:function onChange(event){return setRadioValue(event.target.value)}},"radio-".concat(option))})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio4",label:"Label",style:styles,disabled:!0}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_RadioButton__WEBPACK_IMPORTED_MODULE_3__.E,{id:"radio5",label:"Label",style:styles,disabled:!0,checked:!0})]})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={size:24,iconScale:.5,borderWidth:2,outlineWidth:3,labelFontSize:16,labelPadding:8,background:"#ffffff",backgroundHover:"#ffffff",backgroundFocus:"#ffffff",backgroundUnselectedDisabled:"#e5e5e5",backgroundSelectedDisabled:"#ffffff",borderColorFocus:"#1a1a1a",borderColorSelected:"#0000bf",borderColorSelectedHover:"#000098",borderColorSelectedDisabled:"#cccccc",borderColorUnselected:"#808080",borderColorUnselectedHover:"#1a1a1a",borderColorUnselectedDisabled:"#e5e5e5",focusOutlineColor:"#0072c6",iconColorUnselected:"rgba(0, 0, 0, 0)",iconColorSelected:"#0000bf",iconColorDisabled:"#e5e5e5",labelColorDefault:"#1a1a1a",labelColorDisabled:"#999898"},Playground.argTypes={size:{control:{type:"range",min:10,max:100,step:1}},iconScale:{control:{type:"range",min:.1,max:.9,step:.05}},borderWidth:{control:{type:"range",min:1,max:10,step:1}},outlineWidth:{control:{type:"range",min:1,max:10,step:1}},labelFontSize:{control:{type:"range",min:12,max:32,step:1}},labelPadding:{control:{type:"range",min:4,max:32,step:2}},background:{control:{type:"color"}},backgroundHover:{control:{type:"color"}},backgroundFocus:{control:{type:"color"}},backgroundUnselectedDisabled:{control:{type:"color"}},backgroundSelectedDisabled:{control:{type:"color"}},borderColorFocus:{control:{type:"color"}},borderColorSelected:{control:{type:"color"}},borderColorSelectedHover:{control:{type:"color"}},borderColorSelectedDisabled:{control:{type:"color"}},borderColorUnselected:{control:{type:"color"}},borderColorUnselectedHover:{control:{type:"color"}},borderColorUnselectedDisabled:{control:{type:"color"}},focusOutlineColor:{control:{type:"color"}},iconColorUnselected:{control:{type:"color"}},iconColorSelected:{control:{type:"color"}},iconColorDisabled:{control:{type:"color"}},labelColorDefault:{control:{type:"color"}},labelColorDisabled:{control:{type:"color"}}},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => '}},Default.parameters),Selected.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => '}},Selected.parameters),Disabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => '}},Disabled.parameters),SelectedDisabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => '}},SelectedDisabled.parameters),Custom.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"() => {\n const [radioValue, setRadioValue] = useState('');\n const options = ['foo', 'bar'];\n\n const customStyles = {\n '--size': '36px',\n '--icon-scale': 0.65,\n '--border-width': '3px',\n '--outline-width': '4px',\n '--border-color-selected': 'var(--color-success)',\n '--border-color-selected-hover': 'var(--color-success-dark)',\n '--border-color-selected-focus': 'var(--color-success)',\n '--icon-color-selected': 'var(--color-success)',\n '--icon-color-hover': 'var(--color-success-dark)',\n '--focus-outline-color': 'var(--color-black-20)',\n } as React.CSSProperties;\n\n return (\n <>\n {options.map((option) => (\n setRadioValue((event.target as HTMLInputElement).value)}\n />\n ))}\n \n );\n}"}},Custom.parameters),WithHelperText.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => '}},WithHelperText.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:"(args) => {\n const [radioValue, setRadioValue] = useState('');\n const options = ['foo', 'bar', 'baz'];\n\n const styles = {\n '--size': `${args.size}px`,\n '--icon-scale': args.iconScale,\n '--border-width': `${args.borderWidth}px`,\n '--outline-width': `${args.outlineWidth}px`,\n '--label-font-size': `${args.labelFontSize}px`,\n '--label-padding': `${args.labelPadding}px`,\n '--background': args.background,\n '--background-hover': args.backgroundHover,\n '--background-focus': args.backgroundFocus,\n '--background-unselected-disabled': args.backgroundUnselectedDisabled,\n '--background-selected-disabled': args.backgroundSelectedDisabled,\n '--border-color-focus': args.borderColorFocus,\n '--border-color-selected': args.borderColorSelected,\n '--border-color-selected-hover': args.borderColorSelectedHover,\n '--border-color-selected-disabled': args.borderColorSelectedDisabled,\n '--border-color-unselected': args.borderColorUnselected,\n '--border-color-unselected-hover': args.borderColorUnselectedHover,\n '--border-color-unselected-disabled': args.borderColorUnselectedDisabled,\n '--focus-outline-color': args.focusOutlineColor,\n '--icon-color-unselected': args.iconColorUnselected,\n '--icon-color-selected': args.iconColorSelected,\n '--icon-color-disabled': args.iconColorDisabled,\n '--label-color': args.labelColorDefault,\n '--label-color-disabled': args.labelColorDisabled,\n } as React.CSSProperties;\n\n return (\n <>\n {options.map((option) => (\n setRadioValue((event.target as HTMLInputElement).value)}\n />\n ))}\n \n \n \n );\n}"}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/radioButton/RadioButton.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/radioButton/RadioButton.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/searchInput/SearchInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithCustomSearchButton:()=>WithCustomSearchButton,WithDefaultValue:()=>WithDefaultValue,WithSuggestions:()=>WithSuggestions,WithSuggestionsAndHighlighting:()=>WithSuggestionsAndHighlighting,WithSuggestionsSpinner:()=>WithSuggestionsSpinner,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_SearchInput__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/searchInput/SearchInput.tsx"),_button__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,title:"Components/SearchInput",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"420px"},children:storyFn()})}],parameters:{storySource:{source:"\n\nimport React, { useRef, useState } from 'react';\n\nimport { SearchInput } from './SearchInput';\nimport { Button } from '../button';\n\nexport default {\n component: SearchInput,\n title: 'Components/SearchInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n },\n};\n\nconst fruits = [\n 'Apple',\n 'Apricot',\n 'Avocado',\n 'Banana',\n 'Blackberry',\n 'Blueberry',\n 'Cherry',\n 'Coconut',\n 'Cranberry',\n 'Date',\n 'Dragonfruit',\n 'Fig',\n 'Gooseberry',\n 'Grape',\n 'Honeyberry',\n 'Jackfruit',\n 'Kiwifruit',\n 'Lemon',\n 'Lime',\n 'Mango',\n 'Melon',\n 'Nectarine',\n 'Orange',\n 'Papaya',\n 'Passionfruit',\n 'Peach',\n 'Pear',\n 'Pineapple',\n 'Raspberry',\n 'Satsuma',\n 'Start fruit',\n 'Strawberry',\n 'Tangelo',\n 'Tomato',\n].map((fruit) => ({ value: fruit }));\n\nconst asynchronousSearchOperation = (inputValue: string, timeout = 0) => {\n return new Promise>((resolve) => {\n const filteredItems = fruits.filter((fruit) => {\n return fruit.value.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;\n });\n setTimeout(() => {\n resolve(filteredItems);\n }, timeout);\n });\n};\n\nconst longLastingAsynchronousSearchOperation = (inputValue: string) => asynchronousSearchOperation(inputValue, 5000);\n\nexport const Default = (args) => {\n const onSubmit = (value: string) => {\n console.log('Search for:', value);\n };\n return ;\n};\nDefault.args = {\n label: 'Search',\n helperText: 'Assistive text',\n placeholder: 'Placeholder',\n};\n\nexport const WithCustomSearchButton = (args) => {\n const currentValue = useRef('');\n\n const onChange = (value: string) => {\n console.log('Input value changed:', value);\n currentValue.current = value;\n };\n\n const onSubmit = (string) => {\n console.log('Search for:', string);\n };\n\n const doSearch = () => {\n if (currentValue.current) console.log('Search:', currentValue.current);\n };\n\n return (\n
\n \n \n \n
\n );\n};\n\nexport const WithSuggestions = (args) => {\n type SuggestionItemType = {\n value: string;\n };\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await asynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n />\n );\n};\nWithSuggestions.storyName = 'With suggestions';\nWithSuggestions.args = {\n label: 'Search for a fruit',\n helperText: 'Assistive text',\n placeholder: 'Placeholder',\n};\n\nexport const WithSuggestionsAndHighlighting = (args) => {\n type SuggestionItemType = {\n value: string;\n };\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await asynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n />\n );\n};\nWithSuggestionsAndHighlighting.storyName = 'With suggestions and highlighting';\nWithSuggestionsAndHighlighting.args = {\n label: 'Search for a fruit',\n helperText: 'Assistive text',\n highlightSuggestions: true,\n placeholder: 'Placeholder',\n};\n\nexport const WithSuggestionsSpinner = (args) => {\n type SuggestionItemType = {\n value: string;\n };\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await longLastingAsynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onChange = (value: string) => {\n console.log('input value changed:', value);\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n onChange={onChange}\n />\n );\n};\nWithSuggestionsSpinner.storyName = 'With suggestions & spinner';\nWithSuggestionsSpinner.args = {\n label: 'Search for a fruit',\n helperText: 'Assistive text',\n placeholder: 'Placeholder',\n};\n\nexport const WithDefaultValue = (args) => {\n type SuggestionItemType = {\n value: string;\n };\n const [searchValue, setSearchValue] = useState(args.value);\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await asynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n const onChange = (value: string) => {\n console.log('Changed value: ', value);\n setSearchValue(value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n value={searchValue}\n onChange={onChange}\n />\n );\n};\nWithDefaultValue.storyName = 'With default value';\nWithDefaultValue.args = {\n label: 'Search for a fruit',\n helperText: 'Assistive text',\n placeholder: 'Placeholder',\n value: 'Banana',\n};\n",locationsMap:{default:{startLoc:{col:23,line:67},endLoc:{col:1,line:72},startBody:{col:23,line:67},endBody:{col:1,line:72}},"with-custom-search-button":{startLoc:{col:38,line:79},endLoc:{col:1,line:131},startBody:{col:38,line:79},endBody:{col:1,line:131}},"with-suggestions":{startLoc:{col:31,line:133},endLoc:{col:1,line:155},startBody:{col:31,line:133},endBody:{col:1,line:155}},"with-suggestions-and-highlighting":{startLoc:{col:46,line:163},endLoc:{col:1,line:185},startBody:{col:46,line:163},endBody:{col:1,line:185}},"with-suggestions-spinner":{startLoc:{col:38,line:194},endLoc:{col:1,line:221},startBody:{col:38,line:194},endBody:{col:1,line:221}},"with-default-value":{startLoc:{col:32,line:229},endLoc:{col:1,line:259},startBody:{col:32,line:229},endBody:{col:1,line:259}}}},controls:{expanded:!0}}};var fruits=["Apple","Apricot","Avocado","Banana","Blackberry","Blueberry","Cherry","Coconut","Cranberry","Date","Dragonfruit","Fig","Gooseberry","Grape","Honeyberry","Jackfruit","Kiwifruit","Lemon","Lime","Mango","Melon","Nectarine","Orange","Papaya","Passionfruit","Peach","Pear","Pineapple","Raspberry","Satsuma","Start fruit","Strawberry","Tangelo","Tomato"].map((function(fruit){return{value:fruit}})),asynchronousSearchOperation=function asynchronousSearchOperation(inputValue){var timeout=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(resolve){var filteredItems=fruits.filter((function(fruit){return fruit.value.toLowerCase().indexOf(inputValue.toLowerCase())>-1}));setTimeout((function(){resolve(filteredItems)}),timeout)}))},longLastingAsynchronousSearchOperation=function longLastingAsynchronousSearchOperation(inputValue){return asynchronousSearchOperation(inputValue,5e3)},Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{onSubmit:function onSubmit(value){console.log("Search for:",value)}}))};Default.args={label:"Search",helperText:"Assistive text",placeholder:"Placeholder"};var WithCustomSearchButton=function WithCustomSearchButton(args){var currentValue=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)("");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"flex",flexWrap:"wrap"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("style",{children:"\n .search-button {\n margin-left: 10px;\n }\n\n @media only screen and (max-width: ".concat(getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-m"),") {\n .search-input,\n .search-button {\n width: 100%;\n }\n\n .search-button {\n margin-left: 0;\n margin-top: 10px;\n }\n }\n ")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({className:"search-input"},args),{},{hideSearchButton:!0,onSubmit:function onSubmit(string){console.log("Search for:",string)},onChange:function onChange(value){console.log("Input value changed:",value),currentValue.current=value},placeholder:"Placeholder"})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_button__WEBPACK_IMPORTED_MODULE_4__.z,{className:"search-button",onClick:function doSearch(){currentValue.current&&console.log("Search:",currentValue.current)},children:"Search"})]})},WithSuggestions=function WithSuggestions(args){var getSuggestions=function(){var _ref=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().mark((function _callee(inputValue){var suggestions;return(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,asynchronousSearchOperation(inputValue);case 2:return suggestions=_context.sent,_context.abrupt("return",suggestions);case 4:case"end":return _context.stop()}}),_callee)})));return function getSuggestions(_x){return _ref.apply(this,arguments)}}();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{suggestionLabelField:"value",getSuggestions,onSubmit:function onSubmit(value){console.log("Submitted value:",value)}}))};WithSuggestions.storyName="With suggestions",WithSuggestions.args={label:"Search for a fruit",helperText:"Assistive text",placeholder:"Placeholder"};var WithSuggestionsAndHighlighting=function WithSuggestionsAndHighlighting(args){var getSuggestions=function(){var _ref2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().mark((function _callee2(inputValue){var suggestions;return(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().wrap((function _callee2$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.next=2,asynchronousSearchOperation(inputValue);case 2:return suggestions=_context2.sent,_context2.abrupt("return",suggestions);case 4:case"end":return _context2.stop()}}),_callee2)})));return function getSuggestions(_x2){return _ref2.apply(this,arguments)}}();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{suggestionLabelField:"value",getSuggestions,onSubmit:function onSubmit(value){console.log("Submitted value:",value)}}))};WithSuggestionsAndHighlighting.storyName="With suggestions and highlighting",WithSuggestionsAndHighlighting.args={label:"Search for a fruit",helperText:"Assistive text",highlightSuggestions:!0,placeholder:"Placeholder"};var WithSuggestionsSpinner=function WithSuggestionsSpinner(args){var getSuggestions=function(){var _ref3=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().mark((function _callee3(inputValue){var suggestions;return(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:return _context3.next=2,longLastingAsynchronousSearchOperation(inputValue);case 2:return suggestions=_context3.sent,_context3.abrupt("return",suggestions);case 4:case"end":return _context3.stop()}}),_callee3)})));return function getSuggestions(_x3){return _ref3.apply(this,arguments)}}();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{suggestionLabelField:"value",getSuggestions,onSubmit:function onSubmit(value){console.log("Submitted value:",value)},onChange:function onChange(value){console.log("input value changed:",value)}}))};WithSuggestionsSpinner.storyName="With suggestions & spinner",WithSuggestionsSpinner.args={label:"Search for a fruit",helperText:"Assistive text",placeholder:"Placeholder"};var WithDefaultValue=function WithDefaultValue(args){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(args.value),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState,2),searchValue=_useState2[0],setSearchValue=_useState2[1],getSuggestions=function(){var _ref4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().mark((function _callee4(inputValue){var suggestions;return(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__.Z)().wrap((function _callee4$(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:return _context4.next=2,asynchronousSearchOperation(inputValue);case 2:return suggestions=_context4.sent,_context4.abrupt("return",suggestions);case 4:case"end":return _context4.stop()}}),_callee4)})));return function getSuggestions(_x4){return _ref4.apply(this,arguments)}}();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SearchInput__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({},args),{},{suggestionLabelField:"value",getSuggestions,onSubmit:function onSubmit(value){console.log("Submitted value:",value)},value:searchValue,onChange:function onChange(value){console.log("Changed value: ",value),setSearchValue(value)}}))};WithDefaultValue.storyName="With default value",WithDefaultValue.args={label:"Search for a fruit",helperText:"Assistive text",placeholder:"Placeholder",value:"Banana"},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const onSubmit = (value: string) => {\n console.log('Search for:', value);\n };\n return ;\n}"}},Default.parameters),WithCustomSearchButton.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n const currentValue = useRef('');\n\n const onChange = (value: string) => {\n console.log('Input value changed:', value);\n currentValue.current = value;\n };\n\n const onSubmit = (string) => {\n console.log('Search for:', string);\n };\n\n const doSearch = () => {\n if (currentValue.current) console.log('Search:', currentValue.current);\n };\n\n return (\n
\n \n \n \n
\n );\n}"}},WithCustomSearchButton.parameters),WithSuggestions.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n type SuggestionItemType = {\n value: string;\n };\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await asynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n />\n );\n}"}},WithSuggestions.parameters),WithSuggestionsAndHighlighting.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n type SuggestionItemType = {\n value: string;\n };\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await asynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n />\n );\n}"}},WithSuggestionsAndHighlighting.parameters),WithSuggestionsSpinner.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n type SuggestionItemType = {\n value: string;\n };\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await longLastingAsynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onChange = (value: string) => {\n console.log('input value changed:', value);\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n onChange={onChange}\n />\n );\n}"}},WithSuggestionsSpinner.parameters),WithDefaultValue.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({storySource:{source:"(args) => {\n type SuggestionItemType = {\n value: string;\n };\n const [searchValue, setSearchValue] = useState(args.value);\n\n const getSuggestions = async (inputValue: string): Promise => {\n const suggestions = await asynchronousSearchOperation(inputValue);\n return suggestions;\n };\n\n const onSubmit = (value: string) => {\n console.log('Submitted value:', value);\n };\n\n const onChange = (value: string) => {\n console.log('Changed value: ', value);\n setSearchValue(value);\n };\n\n return (\n \n {...args}\n suggestionLabelField=\"value\"\n getSuggestions={getSuggestions}\n onSubmit={onSubmit}\n value={searchValue}\n onChange={onChange}\n />\n );\n}"}},WithDefaultValue.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/searchInput/SearchInput.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/searchInput/SearchInput.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{WithCustomSearchButton.displayName="WithCustomSearchButton",WithCustomSearchButton.__docgenInfo={description:"",displayName:"WithCustomSearchButton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/searchInput/SearchInput.stories.tsx#WithCustomSearchButton"]={docgenInfo:WithCustomSearchButton.__docgenInfo,name:"WithCustomSearchButton",path:"src/components/searchInput/SearchInput.stories.tsx#WithCustomSearchButton"})}catch(__react_docgen_typescript_loader_error){}try{WithSuggestions.displayName="WithSuggestions",WithSuggestions.__docgenInfo={description:"",displayName:"WithSuggestions",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/searchInput/SearchInput.stories.tsx#WithSuggestions"]={docgenInfo:WithSuggestions.__docgenInfo,name:"WithSuggestions",path:"src/components/searchInput/SearchInput.stories.tsx#WithSuggestions"})}catch(__react_docgen_typescript_loader_error){}try{WithSuggestionsAndHighlighting.displayName="WithSuggestionsAndHighlighting",WithSuggestionsAndHighlighting.__docgenInfo={description:"",displayName:"WithSuggestionsAndHighlighting",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/searchInput/SearchInput.stories.tsx#WithSuggestionsAndHighlighting"]={docgenInfo:WithSuggestionsAndHighlighting.__docgenInfo,name:"WithSuggestionsAndHighlighting",path:"src/components/searchInput/SearchInput.stories.tsx#WithSuggestionsAndHighlighting"})}catch(__react_docgen_typescript_loader_error){}try{WithSuggestionsSpinner.displayName="WithSuggestionsSpinner",WithSuggestionsSpinner.__docgenInfo={description:"",displayName:"WithSuggestionsSpinner",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/searchInput/SearchInput.stories.tsx#WithSuggestionsSpinner"]={docgenInfo:WithSuggestionsSpinner.__docgenInfo,name:"WithSuggestionsSpinner",path:"src/components/searchInput/SearchInput.stories.tsx#WithSuggestionsSpinner"})}catch(__react_docgen_typescript_loader_error){}try{WithDefaultValue.displayName="WithDefaultValue",WithDefaultValue.__docgenInfo={description:"",displayName:"WithDefaultValue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/searchInput/SearchInput.stories.tsx#WithDefaultValue"]={docgenInfo:WithDefaultValue.__docgenInfo,name:"WithDefaultValue",path:"src/components/searchInput/SearchInput.stories.tsx#WithDefaultValue"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/section/Section.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Multiple:()=>Multiple,Plain:()=>Plain,Playground:()=>Playground,Primary:()=>Primary,Secondary:()=>Secondary,Tertiary:()=>Tertiary,WithKoros:()=>WithKoros,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js")),_Section__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/section/Section.tsx"),_assets_img_placeholder_1920x1080_jpg__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/assets/img/placeholder_1920x1080.jpg"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),placeholderText="Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.",placeholderImg=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("img",{src:_assets_img_placeholder_1920x1080_jpg__WEBPACK_IMPORTED_MODULE_3__,alt:"",style:{display:"block",width:"100%"}});const __WEBPACK_DEFAULT_EXPORT__={component:_Section__WEBPACK_IMPORTED_MODULE_4__.$,title:"Components/Section",parameters:{storySource:{source:'import React from \'react\';\nimport { ArgsTable, Title } from \'@storybook/addon-docs/blocks\';\n\nimport { Section } from \'./Section\';\nimport imageFile from \'../../assets/img/placeholder_1920x1080.jpg\';\n\nconst placeholderTitle = \'Lorem ipsum\';\nconst placeholderText =\n \'Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.\';\nconst placeholderImg = ;\n\nexport default {\n component: Section,\n title: \'Components/Section\',\n parameters: {\n controls: { hideNoControlsWarning: true },\n layout: \'fullscreen\',\n docs: {\n page: () => (\n <>\n Props\n \n \n ),\n },\n },\n};\n\nexport const Plain = () => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n);\n\nexport const Primary = () => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n);\n\nexport const Secondary = () => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n);\n\nexport const Tertiary = () => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n);\n\nexport const WithKoros = () => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n);\nWithKoros.storyName = \'With koros\';\n\nexport const Multiple = () => (\n <>\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n {placeholderImg}\n
\n

No Koros

\n This section does not have any koros.\n
\n
\n

Pulse

\n {placeholderText}\n
\n
Secondary non-koros section
\n
\n

secondary Beat

\n {placeholderText}\n
\n
\n
\n

Vibration

\n {placeholderText}\n
\n
\n
\n

primary Beat

\n {placeholderText}\n
\n
\n
\n

Wave

\n {placeholderText}\n
\n
This section has neither a heading or a koros.
\n \n);\nMultiple.storyName = \'Multiple sections\';\n\nexport const Playground = (args) => (\n
\n

{args.sectionTitle}

\n {args.sectionText}\n
\n);\n\nPlayground.parameters = {\n previewTabs: {\n \'storybook/docs/panel\': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n sectionTitle: placeholderTitle,\n sectionText: placeholderText,\n korosType: null,\n color: \'plain\',\n};\n\nPlayground.argTypes = {\n korosType: {\n options: [null, \'basic\', \'beat\', \'pulse\', \'vibration\', \'wave\'],\n control: { type: \'radio\' },\n },\n color: {\n options: [\'plain\', \'primary\', \'secondary\', \'tertiary\'],\n },\n};\n',locationsMap:{plain:{startLoc:{col:21,line:29},endLoc:{col:1,line:34},startBody:{col:21,line:29},endBody:{col:1,line:34}},primary:{startLoc:{col:23,line:36},endLoc:{col:1,line:41},startBody:{col:23,line:36},endBody:{col:1,line:41}},secondary:{startLoc:{col:25,line:43},endLoc:{col:1,line:48},startBody:{col:25,line:43},endBody:{col:1,line:48}},tertiary:{startLoc:{col:24,line:50},endLoc:{col:1,line:55},startBody:{col:24,line:50},endBody:{col:1,line:55}},"with-koros":{startLoc:{col:25,line:57},endLoc:{col:1,line:62},startBody:{col:25,line:57},endBody:{col:1,line:62}},multiple:{startLoc:{col:24,line:65},endLoc:{col:1,line:102},startBody:{col:24,line:65},endBody:{col:1,line:102}},playground:{startLoc:{col:26,line:105},endLoc:{col:1,line:110},startBody:{col:26,line:105},endBody:{col:1,line:110}}}},controls:{hideNoControlsWarning:!0},layout:"fullscreen",docs:{page:function page(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.Dx,{children:"Props"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.$4,{})]})}}}};var Plain=function Plain(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:"Lorem ipsum"}),placeholderText]})},Primary=function Primary(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"primary",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:"Lorem ipsum"}),placeholderText]})},Secondary=function Secondary(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"secondary",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:"Lorem ipsum"}),placeholderText]})},Tertiary=function Tertiary(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"tertiary",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:"Lorem ipsum"}),placeholderText]})},WithKoros=function WithKoros(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"primary",korosType:"basic",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:"Lorem ipsum"}),placeholderText]})};WithKoros.storyName="With koros";var Multiple=function Multiple(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"secondary",korosType:"basic",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:"Lorem ipsum"}),placeholderText]}),placeholderImg,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"primary",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{className:"heading-l",children:"No Koros"}),"This section does not have any koros."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{korosType:"pulse",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{className:"heading-l",children:"Pulse"}),placeholderText]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"secondary",children:"Secondary non-koros section"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"tertiary",korosType:"beat",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{className:"heading-l",children:"secondary Beat"}),placeholderText]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"secondary",korosType:"vibration",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{className:"heading-l",children:"Vibration"}),placeholderText]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"primary",korosType:"beat",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{className:"heading-l",children:"primary Beat"}),placeholderText]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"tertiary"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:"secondary",korosType:"wave",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{className:"heading-l",children:"Wave"}),placeholderText]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{children:"This section has neither a heading or a koros."})]})};Multiple.storyName="Multiple sections";var Playground=function Playground(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_4__.$,{color:args.color,korosType:args.korosType,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{className:"heading-xl",children:args.sectionTitle}),args.sectionText]})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={sectionTitle:"Lorem ipsum",sectionText:placeholderText,korosType:null,color:"plain"},Playground.argTypes={korosType:{options:[null,"basic","beat","pulse","vibration","wave"],control:{type:"radio"}},color:{options:["plain","primary","secondary","tertiary"]}},Plain.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n)'}},Plain.parameters),Primary.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n)'}},Primary.parameters),Secondary.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n)'}},Secondary.parameters),Tertiary.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n)'}},Tertiary.parameters),WithKoros.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => (\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n)'}},WithKoros.parameters),Multiple.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'() => (\n <>\n
\n

{placeholderTitle}

\n {placeholderText}\n
\n {placeholderImg}\n
\n

No Koros

\n This section does not have any koros.\n
\n
\n

Pulse

\n {placeholderText}\n
\n
Secondary non-koros section
\n
\n

secondary Beat

\n {placeholderText}\n
\n
\n
\n

Vibration

\n {placeholderText}\n
\n
\n
\n

primary Beat

\n {placeholderText}\n
\n
\n
\n

Wave

\n {placeholderText}\n
\n
This section has neither a heading or a koros.
\n \n)'}},Multiple.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__.Z)({storySource:{source:'(args) => (\n
\n

{args.sectionTitle}

\n {args.sectionText}\n
\n)'}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/section/Section.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/section/Section.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/selectionGroup/SelectionGroup.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Horizontal:()=>Horizontal,Invalid:()=>Invalid,Required:()=>Required,WithHelperText:()=>WithHelperText,WithParent:()=>WithParent,WithTooltip:()=>WithTooltip,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/selectionGroup/SelectionGroup.tsx"),_checkbox__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),_radioButton__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/radioButton/RadioButton.tsx"),_fieldset__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/components/fieldset/Fieldset.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["numberOfItems"],_excluded2=["numberOfItems"],_excluded3=["numberOfItems"],_excluded4=["numberOfItems"],_excluded5=["numberOfItems"],_excluded6=["numberOfItems"];const __WEBPACK_DEFAULT_EXPORT__={component:_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,title:"Components/SelectionGroup",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:"import React, { ChangeEvent, useReducer, useState } from 'react';\n\nimport { SelectionGroup } from './SelectionGroup';\nimport { Checkbox } from '../checkbox';\nimport { RadioButton } from '../radioButton';\nimport { Fieldset } from '../fieldset';\n\nexport default {\n component: SelectionGroup,\n title: 'Components/SelectionGroup',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true, hideNoControlsWarning: true },\n },\n args: {\n numberOfItems: 3,\n label: 'Label',\n direction: 'vertical',\n },\n};\n\nconst getCheckboxItems = (\n numberOfItems: number,\n checked: { [key: string]: boolean },\n handleChange: (e: ChangeEvent) => void,\n) =>\n [...Array(numberOfItems)].map((_, i) => (\n \n ));\n\nconst getRadioButtonItems = (\n numberOfItems: number,\n radioValue: string,\n handleChange: (e: ChangeEvent) => void,\n) =>\n [...Array(numberOfItems)].map((_, i) => (\n \n ));\n\nexport const Default = ({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n};\n\nexport const Horizontal = ({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n};\nHorizontal.args = {\n direction: 'horizontal',\n};\n\nexport const Required = ({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n};\nRequired.args = {\n required: true,\n};\n\nexport const Invalid = ({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n};\nInvalid.args = {\n required: true,\n errorText: 'Error text',\n};\n\nexport const WithTooltip = ({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n};\nWithTooltip.args = {\n tooltipLabel: 'Tooltip',\n tooltipButtonLabel: 'Tooltip',\n tooltipText:\n 'Tooltips contain \"nice to have\" information. Default Tooltip contents should not be longer than two to three sentences. For longer descriptions, provide a link to a separate page.',\n};\nWithTooltip.storyName = 'With tooltip';\n\nexport const WithParent = () => {\n enum CheckboxState {\n checked,\n unchecked,\n indeterminate,\n }\n\n const areAllChecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 4;\n };\n\n const areAllUnchecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 1;\n };\n\n const reducer = (state, action) => {\n switch (action.type) {\n case 'check': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.checked,\n checkbox1: CheckboxState.checked,\n checkbox2: CheckboxState.checked,\n checkbox3: CheckboxState.checked,\n checkbox4: CheckboxState.checked,\n checkbox5: CheckboxState.checked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.checked,\n controllerCheckbox: areAllChecked(state) ? CheckboxState.checked : CheckboxState.indeterminate,\n };\n }\n case 'uncheck': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.unchecked,\n controllerCheckbox: areAllUnchecked(state) ? CheckboxState.unchecked : CheckboxState.indeterminate,\n };\n }\n default:\n throw new Error();\n }\n };\n\n const initialState = {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return (\n
\n {\n if (\n state.controllerCheckbox === CheckboxState.unchecked ||\n state.controllerCheckbox === CheckboxState.indeterminate\n ) {\n dispatch({ type: 'check', payload: 'controllerCheckbox' });\n } else {\n dispatch({ type: 'uncheck', payload: 'controllerCheckbox' });\n }\n }}\n />\n
    \n {Object.entries(state).map((entry) => {\n if (entry[0] === 'controllerCheckbox') {\n return null;\n }\n return (\n
  • \n {\n if (entry[1] === CheckboxState.unchecked) {\n dispatch({ type: 'check', payload: entry[0] });\n } else {\n dispatch({ type: 'uncheck', payload: entry[0] });\n }\n }}\n />\n
  • \n );\n })}\n
\n
\n );\n};\n\nWithParent.storyName = 'With a parent';\nWithParent.parameters = {\n loki: { skip: true }, // There is an identical story in checkbox\n};\nexport const WithHelperText = ({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n};\nWithHelperText.args = {\n helperText: 'Assistive text',\n};\n",locationsMap:{default:{startLoc:{col:23,line:55},endLoc:{col:1,line:76},startBody:{col:23,line:55},endBody:{col:1,line:76}},horizontal:{startLoc:{col:26,line:78},endLoc:{col:1,line:99},startBody:{col:26,line:78},endBody:{col:1,line:99}},required:{startLoc:{col:24,line:104},endLoc:{col:1,line:125},startBody:{col:24,line:104},endBody:{col:1,line:125}},invalid:{startLoc:{col:23,line:130},endLoc:{col:1,line:151},startBody:{col:23,line:130},endBody:{col:1,line:151}},"with-tooltip":{startLoc:{col:27,line:157},endLoc:{col:1,line:178},startBody:{col:27,line:157},endBody:{col:1,line:178}},"with-parent":{startLoc:{col:26,line:187},endLoc:{col:1,line:320},startBody:{col:26,line:187},endBody:{col:1,line:320}},"with-helper-text":{startLoc:{col:30,line:326},endLoc:{col:1,line:347},startBody:{col:30,line:326},endBody:{col:1,line:347}}}},controls:{expanded:!0,hideNoControlsWarning:!0}},args:{numberOfItems:3,label:"Label",direction:"vertical"}};var getCheckboxItems=function getCheckboxItems(numberOfItems,checked,handleChange){return(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__.Z)(Array(numberOfItems)).map((function(_,i){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_checkbox__WEBPACK_IMPORTED_MODULE_4__.X,{id:"checkbox".concat(i),label:"Option ".concat(i+1),name:"checkbox".concat(i),checked:checked["checkbox".concat(i)],onChange:handleChange},"checkbox".concat(i))}))},getRadioButtonItems=function getRadioButtonItems(numberOfItems,radioValue,handleChange){return(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__.Z)(Array(numberOfItems)).map((function(_,i){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radioButton__WEBPACK_IMPORTED_MODULE_5__.E,{id:"radio".concat(i),label:"Option ".concat(i+1),value:"radio".concat(i),name:"radio",checked:radioValue==="radio".concat(i),onChange:handleChange},"radio".concat(i))}))},Default=function Default(_ref){var numberOfItems=_ref.numberOfItems,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_ref,_excluded),_useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState,2),checkedItems=_useState2[0],setCheckedItems=_useState2[1],_useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("radio0"),_useState4=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState3,2),radioValue=_useState4[0],setRadioValue=_useState4[1],checkboxes=getCheckboxItems(numberOfItems,checkedItems,(function handleCheckboxChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},item,isChecked)))})),radiobuttons=getRadioButtonItems(numberOfItems,radioValue,(function handleRadioChange(e){setRadioValue(e.target.value)}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:checkboxes})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:radiobuttons}))]})},Horizontal=function Horizontal(_ref2){var numberOfItems=_ref2.numberOfItems,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_ref2,_excluded2),_useState5=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState6=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState5,2),checkedItems=_useState6[0],setCheckedItems=_useState6[1],_useState7=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("radio0"),_useState8=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState7,2),radioValue=_useState8[0],setRadioValue=_useState8[1],checkboxes=getCheckboxItems(numberOfItems,checkedItems,(function handleCheckboxChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},item,isChecked)))})),radiobuttons=getRadioButtonItems(numberOfItems,radioValue,(function handleRadioChange(e){setRadioValue(e.target.value)}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:checkboxes})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:radiobuttons}))]})};Horizontal.args={direction:"horizontal"};var Required=function Required(_ref3){var numberOfItems=_ref3.numberOfItems,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_ref3,_excluded3),_useState9=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState10=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState9,2),checkedItems=_useState10[0],setCheckedItems=_useState10[1],_useState11=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("radio0"),_useState12=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState11,2),radioValue=_useState12[0],setRadioValue=_useState12[1],checkboxes=getCheckboxItems(numberOfItems,checkedItems,(function handleCheckboxChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},item,isChecked)))})),radiobuttons=getRadioButtonItems(numberOfItems,radioValue,(function handleRadioChange(e){setRadioValue(e.target.value)}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:checkboxes})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:radiobuttons}))]})};Required.args={required:!0};var Invalid=function Invalid(_ref4){var numberOfItems=_ref4.numberOfItems,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_ref4,_excluded4),_useState13=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState14=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState13,2),checkedItems=_useState14[0],setCheckedItems=_useState14[1],_useState15=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("radio0"),_useState16=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState15,2),radioValue=_useState16[0],setRadioValue=_useState16[1],checkboxes=getCheckboxItems(numberOfItems,checkedItems,(function handleCheckboxChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},item,isChecked)))})),radiobuttons=getRadioButtonItems(numberOfItems,radioValue,(function handleRadioChange(e){setRadioValue(e.target.value)}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:checkboxes})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:radiobuttons}))]})};Invalid.args={required:!0,errorText:"Error text"};var WithTooltip=function WithTooltip(_ref5){var numberOfItems=_ref5.numberOfItems,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_ref5,_excluded5),_useState17=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState18=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState17,2),checkedItems=_useState18[0],setCheckedItems=_useState18[1],_useState19=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("radio0"),_useState20=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState19,2),radioValue=_useState20[0],setRadioValue=_useState20[1],checkboxes=getCheckboxItems(numberOfItems,checkedItems,(function handleCheckboxChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},item,isChecked)))})),radiobuttons=getRadioButtonItems(numberOfItems,radioValue,(function handleRadioChange(e){setRadioValue(e.target.value)}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:checkboxes})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:radiobuttons}))]})};WithTooltip.args={tooltipLabel:"Tooltip",tooltipButtonLabel:"Tooltip",tooltipText:'Tooltips contain "nice to have" information. Default Tooltip contents should not be longer than two to three sentences. For longer descriptions, provide a link to a separate page.'},WithTooltip.storyName="With tooltip";var WithParent=function WithParent(){var CheckboxState=function(CheckboxState){return CheckboxState[CheckboxState.checked=0]="checked",CheckboxState[CheckboxState.unchecked=1]="unchecked",CheckboxState[CheckboxState.indeterminate=2]="indeterminate",CheckboxState}({}),initialState={controllerCheckbox:CheckboxState.unchecked,checkbox1:CheckboxState.unchecked,checkbox2:CheckboxState.unchecked,checkbox3:CheckboxState.unchecked,checkbox4:CheckboxState.unchecked,checkbox5:CheckboxState.unchecked},_useReducer=(0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)((function reducer(state,action){switch(action.type){case"check":var _objectSpread7;return"controllerCheckbox"===action.payload?{controllerCheckbox:CheckboxState.checked,checkbox1:CheckboxState.checked,checkbox2:CheckboxState.checked,checkbox3:CheckboxState.checked,checkbox4:CheckboxState.checked,checkbox5:CheckboxState.checked}:(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},state),{},(_objectSpread7={},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_objectSpread7,action.payload,CheckboxState.checked),(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_objectSpread7,"controllerCheckbox",function areAllChecked(state){var checkedCount=0;return Object.keys(state).forEach((function(key){"controllerCheckbox"!==key&&state[key]===CheckboxState.checked&&(checkedCount+=1)})),4===checkedCount}(state)?CheckboxState.checked:CheckboxState.indeterminate),_objectSpread7));case"uncheck":var _objectSpread8;return"controllerCheckbox"===action.payload?{controllerCheckbox:CheckboxState.unchecked,checkbox1:CheckboxState.unchecked,checkbox2:CheckboxState.unchecked,checkbox3:CheckboxState.unchecked,checkbox4:CheckboxState.unchecked,checkbox5:CheckboxState.unchecked}:(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},state),{},(_objectSpread8={},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_objectSpread8,action.payload,CheckboxState.unchecked),(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)(_objectSpread8,"controllerCheckbox",function areAllUnchecked(state){var checkedCount=0;return Object.keys(state).forEach((function(key){"controllerCheckbox"!==key&&state[key]===CheckboxState.checked&&(checkedCount+=1)})),1===checkedCount}(state)?CheckboxState.unchecked:CheckboxState.indeterminate),_objectSpread8));default:throw new Error}}),initialState),_useReducer2=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_fieldset__WEBPACK_IMPORTED_MODULE_10__.p,{heading:"Group label *",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_checkbox__WEBPACK_IMPORTED_MODULE_4__.X,{"aria-controls":"checkbox1 checkbox2 checkbox3 checkbox4 checkbox5",id:"controllerCheckbox",label:"Label",indeterminate:state.controllerCheckbox===CheckboxState.indeterminate,checked:state.controllerCheckbox===CheckboxState.checked,style:{marginTop:"var(--spacing-xs)"},onChange:function onChange(){state.controllerCheckbox===CheckboxState.unchecked||state.controllerCheckbox===CheckboxState.indeterminate?dispatch({type:"check",payload:"controllerCheckbox"}):dispatch({type:"uncheck",payload:"controllerCheckbox"})}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{style:{marginLeft:"var(--spacing-s)",paddingInlineStart:"0"},children:Object.entries(state).map((function(entry){return"controllerCheckbox"===entry[0]?null:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{style:{marginTop:"var(--spacing-s)",listStyle:"none"},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_checkbox__WEBPACK_IMPORTED_MODULE_4__.X,{id:entry[0],label:"Label",checked:entry[1]===CheckboxState.checked,onChange:function onChange(){entry[1]===CheckboxState.unchecked?dispatch({type:"check",payload:entry[0]}):dispatch({type:"uncheck",payload:entry[0]})}},entry[0])},entry[0])}))})]})};WithParent.storyName="With a parent",WithParent.parameters={loki:{skip:!0}};var WithHelperText=function WithHelperText(_ref6){var numberOfItems=_ref6.numberOfItems,args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_ref6,_excluded6),_useState21=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),_useState22=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState21,2),checkedItems=_useState22[0],setCheckedItems=_useState22[1],_useState23=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("radio0"),_useState24=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_7__.Z)(_useState23,2),radioValue=_useState24[0],setRadioValue=_useState24[1],checkboxes=getCheckboxItems(numberOfItems,checkedItems,(function handleCheckboxChange(e){var item=e.target.name,isChecked=e.target.checked;setCheckedItems((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},checkedItems),{},(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__.Z)({},item,isChecked)))})),radiobuttons=getRadioButtonItems(numberOfItems,radioValue,(function handleRadioChange(e){setRadioValue(e.target.value)}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:checkboxes})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_SelectionGroup__WEBPACK_IMPORTED_MODULE_2__.M,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({},args),{},{children:radiobuttons}))]})};WithHelperText.args={helperText:"Assistive text"},Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n}"}},Default.parameters),Horizontal.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n}"}},Horizontal.parameters),Required.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n}"}},Required.parameters),Invalid.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n}"}},Invalid.parameters),WithTooltip.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n}"}},WithTooltip.parameters),WithParent.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"() => {\n enum CheckboxState {\n checked,\n unchecked,\n indeterminate,\n }\n\n const areAllChecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 4;\n };\n\n const areAllUnchecked = (state) => {\n let checkedCount = 0;\n Object.keys(state).forEach((key) => {\n if (key === 'controllerCheckbox') {\n return;\n }\n if (state[key] === CheckboxState.checked) {\n checkedCount += 1;\n }\n });\n\n return checkedCount === 1;\n };\n\n const reducer = (state, action) => {\n switch (action.type) {\n case 'check': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.checked,\n checkbox1: CheckboxState.checked,\n checkbox2: CheckboxState.checked,\n checkbox3: CheckboxState.checked,\n checkbox4: CheckboxState.checked,\n checkbox5: CheckboxState.checked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.checked,\n controllerCheckbox: areAllChecked(state) ? CheckboxState.checked : CheckboxState.indeterminate,\n };\n }\n case 'uncheck': {\n if (action.payload === 'controllerCheckbox') {\n return {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n }\n return {\n ...state,\n [action.payload]: CheckboxState.unchecked,\n controllerCheckbox: areAllUnchecked(state) ? CheckboxState.unchecked : CheckboxState.indeterminate,\n };\n }\n default:\n throw new Error();\n }\n };\n\n const initialState = {\n controllerCheckbox: CheckboxState.unchecked,\n checkbox1: CheckboxState.unchecked,\n checkbox2: CheckboxState.unchecked,\n checkbox3: CheckboxState.unchecked,\n checkbox4: CheckboxState.unchecked,\n checkbox5: CheckboxState.unchecked,\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return (\n
\n {\n if (\n state.controllerCheckbox === CheckboxState.unchecked ||\n state.controllerCheckbox === CheckboxState.indeterminate\n ) {\n dispatch({ type: 'check', payload: 'controllerCheckbox' });\n } else {\n dispatch({ type: 'uncheck', payload: 'controllerCheckbox' });\n }\n }}\n />\n
    \n {Object.entries(state).map((entry) => {\n if (entry[0] === 'controllerCheckbox') {\n return null;\n }\n return (\n
  • \n {\n if (entry[1] === CheckboxState.unchecked) {\n dispatch({ type: 'check', payload: entry[0] });\n } else {\n dispatch({ type: 'uncheck', payload: entry[0] });\n }\n }}\n />\n
  • \n );\n })}\n
\n
\n );\n}"}},WithParent.parameters),WithHelperText.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_8__.Z)({storySource:{source:"({ numberOfItems, ...args }) => {\n const [checkedItems, setCheckedItems] = useState({});\n const [radioValue, setRadioValue] = useState('radio0');\n const handleCheckboxChange = (e: ChangeEvent) => {\n const item = e.target.name;\n const isChecked = e.target.checked;\n setCheckedItems({ ...checkedItems, [item]: isChecked });\n };\n const handleRadioChange = (e: ChangeEvent) => {\n setRadioValue(e.target.value);\n };\n const checkboxes = getCheckboxItems(numberOfItems, checkedItems, handleCheckboxChange);\n const radiobuttons = getRadioButtonItems(numberOfItems, radioValue, handleRadioChange);\n return (\n <>\n {checkboxes}\n
\n
\n {radiobuttons}\n \n );\n}"}},WithHelperText.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{numberOfItems:{defaultValue:null,description:"",name:"numberOfItems",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/selectionGroup/SelectionGroup.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/selectionGroup/SelectionGroup.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Horizontal.displayName="Horizontal",Horizontal.__docgenInfo={description:"",displayName:"Horizontal",props:{numberOfItems:{defaultValue:null,description:"",name:"numberOfItems",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/selectionGroup/SelectionGroup.stories.tsx#Horizontal"]={docgenInfo:Horizontal.__docgenInfo,name:"Horizontal",path:"src/components/selectionGroup/SelectionGroup.stories.tsx#Horizontal"})}catch(__react_docgen_typescript_loader_error){}try{Required.displayName="Required",Required.__docgenInfo={description:"",displayName:"Required",props:{numberOfItems:{defaultValue:null,description:"",name:"numberOfItems",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/selectionGroup/SelectionGroup.stories.tsx#Required"]={docgenInfo:Required.__docgenInfo,name:"Required",path:"src/components/selectionGroup/SelectionGroup.stories.tsx#Required"})}catch(__react_docgen_typescript_loader_error){}try{Invalid.displayName="Invalid",Invalid.__docgenInfo={description:"",displayName:"Invalid",props:{numberOfItems:{defaultValue:null,description:"",name:"numberOfItems",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/selectionGroup/SelectionGroup.stories.tsx#Invalid"]={docgenInfo:Invalid.__docgenInfo,name:"Invalid",path:"src/components/selectionGroup/SelectionGroup.stories.tsx#Invalid"})}catch(__react_docgen_typescript_loader_error){}try{WithTooltip.displayName="WithTooltip",WithTooltip.__docgenInfo={description:"",displayName:"WithTooltip",props:{numberOfItems:{defaultValue:null,description:"",name:"numberOfItems",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/selectionGroup/SelectionGroup.stories.tsx#WithTooltip"]={docgenInfo:WithTooltip.__docgenInfo,name:"WithTooltip",path:"src/components/selectionGroup/SelectionGroup.stories.tsx#WithTooltip"})}catch(__react_docgen_typescript_loader_error){}try{WithHelperText.displayName="WithHelperText",WithHelperText.__docgenInfo={description:"",displayName:"WithHelperText",props:{numberOfItems:{defaultValue:null,description:"",name:"numberOfItems",required:!0,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/selectionGroup/SelectionGroup.stories.tsx#WithHelperText"]={docgenInfo:WithHelperText.__docgenInfo,name:"WithHelperText",path:"src/components/selectionGroup/SelectionGroup.stories.tsx#WithHelperText"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/sideNavigation/SideNavigation.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomTheme:()=>CustomTheme,Default:()=>Default,WithIcons:()=>WithIcons,WithSkipLink:()=>WithSkipLink,default:()=>SideNavigation_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js");__webpack_require__("./src/styles/base.css");const SideNavigation_module_sideNavigation="SideNavigation_sideNavigation__-d8cy",SideNavigation_module_toggleButton="SideNavigation_toggleButton__zltxh",SideNavigation_module_mainLevelList="SideNavigation_mainLevelList__bxPfD",SideNavigation_module_open="SideNavigation_open__sicrw";const sideNavigation_SideNavigationContext=react.createContext({mobileMenuOpen:!1,defaultOpenMainLevels:void 0,activeParentLevel:void 0,setMobileMenuOpen:function setMobileMenuOpen(){},setActiveParentLevel:function setActiveParentLevel(){}});var classNames=__webpack_require__("./src/utils/classNames.ts"),useMobile=__webpack_require__("./src/hooks/useMobile.tsx"),Button=__webpack_require__("./src/components/button/Button.tsx"),SkipLink=__webpack_require__("./src/internal/skipLink/SkipLink.tsx"),IconAngleUp=__webpack_require__("./src/icons/IconAngleUp.tsx"),IconAngleDown=__webpack_require__("./src/icons/IconAngleDown.tsx"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");const MainLevel_module_mainLevel="MainLevel_mainLevel__E++Lv",MainLevel_module_active="MainLevel_active__mOeCc",MainLevel_module_mainLevelListMenu="MainLevel_mainLevelListMenu__2XG25",MainLevel_module_mainLevelWithDivider="MainLevel_mainLevelWithDivider__aNBoF",MainLevel_module_leftIcon="MainLevel_leftIcon__gdLvJ",MainLevel_module_label="MainLevel_label__NI7f0",MainLevel_module_rightIcon="MainLevel_rightIcon__4inED",MainLevel_module_open="MainLevel_open__HvOkd";var IconLinkExternal=__webpack_require__("./src/icons/IconLinkExternal.tsx"),getChildren=__webpack_require__("./src/utils/getChildren.ts"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["active","children","className","href","icon","id","index","label","withDivider","external","openInNewTab","openInNewTabAriaLabel","openInExternalDomainAriaLabel","onClick","style"],composeAriaLabel=function composeAriaLabel(_ref){var openInNewTab=_ref.openInNewTab,openInNewTabAriaLabel=_ref.openInNewTabAriaLabel,openInExternalDomainAriaLabel=_ref.openInExternalDomainAriaLabel,label=_ref.label,newTabText=openInNewTab?openInNewTabAriaLabel||"Avautuu uudessa välilehdessä.":"",externalText=openInExternalDomainAriaLabel||"Siirtyy toiseen sivustoon.";return["."!==label.slice(-1)?"".concat(label,"."):label,newTabText,externalText].filter((function(text){return text})).join(" ")},LeftIcon=function LeftIcon(_ref2){var icon=_ref2.icon;return(0,jsx_runtime.jsx)("span",{className:MainLevel_module_leftIcon,"aria-hidden":!0,children:icon})},RightIcon=function RightIcon(_ref3){var icon=_ref3.icon,_ref3$className=_ref3.className,className=void 0===_ref3$className?"":_ref3$className;return(0,jsx_runtime.jsx)("span",{className:(0,classNames.Z)(MainLevel_module_rightIcon,className),"aria-hidden":!0,children:icon})},Label=function Label(_ref4){var label=_ref4.label;return(0,jsx_runtime.jsx)("span",{className:MainLevel_module_label,children:label})},MainLevel=function MainLevel(_ref5){var active=_ref5.active,children=_ref5.children,className=_ref5.className,href=_ref5.href,icon=_ref5.icon,id=_ref5.id,index=_ref5.index,label=_ref5.label,withDivider=_ref5.withDivider,external=_ref5.external,openInNewTab=_ref5.openInNewTab,openInNewTabAriaLabel=_ref5.openInNewTabAriaLabel,openInExternalDomainAriaLabel=_ref5.openInExternalDomainAriaLabel,onClick=_ref5.onClick,style=_ref5.style,rest=(0,objectWithoutProperties.Z)(_ref5,_excluded),menuId="".concat(id,"-menu"),_useContext=(0,react.useContext)(sideNavigation_SideNavigationContext),defaultOpenMainLevels=_useContext.defaultOpenMainLevels,activeParentLevel=_useContext.activeParentLevel,setActiveParentLevel=_useContext.setActiveParentLevel,setMobileMenuOpen=_useContext.setMobileMenuOpen,_useState=(0,react.useState)(defaultOpenMainLevels.includes(index)),_useState2=(0,slicedToArray.Z)(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1],_useState3=(0,react.useState)(!1),_useState4=(0,slicedToArray.Z)(_useState3,2),isActiveParent=_useState4[0],setIsActiveParent=_useState4[1],subLevels=(0,getChildren.AU)(children).map((function(child,childIndex){return(0,react.isValidElement)(child)&&"SubLevel"===child.type.componentName?(0,react.cloneElement)(child,{mainLevelIndex:index,key:childIndex}):null})),hasSubLevels=Boolean(null==subLevels?void 0:subLevels.length),handleMainLevelClick=function handleMainLevelClick(ev){hasSubLevels?setIsOpen(!isOpen):(setActiveParentLevel(void 0),setMobileMenuOpen(!1)),onClick&&onClick(ev)};return(0,react.useEffect)((function(){var isActive=activeParentLevel===index;isActive&&setIsOpen(!0),setIsActiveParent(isActive)}),[activeParentLevel,index,setIsOpen,setIsActiveParent]),(0,jsx_runtime.jsx)("li",{className:(0,classNames.Z)(MainLevel_module_mainLevel,withDivider&&MainLevel_module_mainLevelWithDivider,active&&MainLevel_module_active,isOpen&&MainLevel_module_open,className),style,children:hasSubLevels?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("button",{type:"button","aria-label":label,"aria-current":isActiveParent,"aria-expanded":isOpen,id,onClick:handleMainLevelClick,children:[icon&&(0,jsx_runtime.jsx)(LeftIcon,{icon}),(0,jsx_runtime.jsx)(Label,{label}),hasSubLevels&&(0,jsx_runtime.jsx)(RightIcon,{icon:isOpen?(0,jsx_runtime.jsx)(IconAngleUp.IconAngleUp,{"aria-hidden":!0}):(0,jsx_runtime.jsx)(IconAngleDown.IconAngleDown,{"aria-hidden":!0})})]}),(0,jsx_runtime.jsx)("ul",{className:MainLevel_module_mainLevelListMenu,id:menuId,"aria-hidden":!isOpen,"aria-labelledby":id,children:subLevels})]}):(0,jsx_runtime.jsxs)("a",(0,objectSpread2.Z)((0,objectSpread2.Z)((0,objectSpread2.Z)({},rest),{},{"aria-current":active?"page":"false","aria-label":external?"".concat(label," ").concat(openInExternalDomainAriaLabel||"Siirtyy toiseen sivustoon"):label,id,onClick:handleMainLevelClick,href},external&&openInNewTab&&{target:"_blank",rel:"noopener","aria-label":composeAriaLabel({label,openInNewTab,openInNewTabAriaLabel,openInExternalDomainAriaLabel})}),{},{children:[icon&&(0,jsx_runtime.jsx)(LeftIcon,{icon}),(0,jsx_runtime.jsx)(Label,{label}),external&&(0,jsx_runtime.jsx)(RightIcon,{icon:(0,jsx_runtime.jsx)(IconLinkExternal.IconLinkExternal,{"aria-hidden":!0})})]}))},id)};MainLevel.componentName="MainLevel";try{MainLevel.displayName="MainLevel",MainLevel.__docgenInfo={description:"",displayName:"MainLevel",props:{id:{defaultValue:null,description:"The id of the side navigation main level",name:"id",required:!0,type:{name:"string"}},href:{defaultValue:null,description:"href attribute of the side navigation main level",name:"href",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"Optional icon of the side navigation main level",name:"icon",required:!1,type:{name:"ReactNode"}},index:{defaultValue:null,description:"Index of the side navigation main level. The parent SideNavigation component uses this property to index main levels",name:"index",required:!1,type:{name:"number"}},label:{defaultValue:null,description:"Label of the side navigation main level",name:"label",required:!0,type:{name:"string"}},withDivider:{defaultValue:null,description:"A border that distinguishes the main level from the previous item",name:"withDivider",required:!1,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"Additional class names to apply to the side navigation main level",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Override or extend the styles applied to the component",name:"style",required:!1,type:{name:"CSSProperties"}},children:{defaultValue:null,description:"Children components for the main level. Usually subLevels",name:"children",required:!1,type:{name:"ReactNode"}},onClick:{defaultValue:null,description:"Callback function fired when the main level is clicked",name:"onClick",required:!1,type:{name:"(event: MouseEvent | KeyboardEvent | KeyboardEvent | MouseEvent<...>) => void"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},external:{defaultValue:null,description:"Boolean indicating whether the main level link will lead user to external domain.",name:"external",required:!1,type:{name:"boolean"}},openInNewTab:{defaultValue:null,description:"Boolean indicating whether the main level link will open in new tab or not.",name:"openInNewTab",required:!1,type:{name:"boolean"}},openInNewTabAriaLabel:{defaultValue:null,description:"The aria-label for opening main level link in a new tab",name:"openInNewTabAriaLabel",required:!1,type:{name:"string"}},openInExternalDomainAriaLabel:{defaultValue:null,description:"The aria-label for opening main level link in an external domain",name:"openInExternalDomainAriaLabel",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/mainLevel/MainLevel.tsx#MainLevel"]={docgenInfo:MainLevel.__docgenInfo,name:"MainLevel",path:"src/components/sideNavigation/mainLevel/MainLevel.tsx#MainLevel"})}catch(__react_docgen_typescript_loader_error){}const SubLevel_module_subLevel="SubLevel_subLevel__cALpt",SubLevel_module_active="SubLevel_active__3gtTZ";var SubLevel=function SubLevel(_ref){var active=_ref.active,className=_ref.className,href=_ref.href,id=_ref.id,label=_ref.label,mainLevelIndex=_ref.mainLevelIndex,_onClick=_ref.onClick,style=_ref.style,_useContext=(0,react.useContext)(sideNavigation_SideNavigationContext),setActiveParentLevel=_useContext.setActiveParentLevel,setMobileMenuOpen=_useContext.setMobileMenuOpen;return(0,react.useEffect)((function(){active&&setActiveParentLevel(mainLevelIndex)}),[active,mainLevelIndex,setActiveParentLevel]),(0,jsx_runtime.jsx)("li",{className:(0,classNames.Z)(SubLevel_module_subLevel,active&&SubLevel_module_active,className),style,children:(0,jsx_runtime.jsx)("a",{id,"aria-current":active?"page":"false",onClick:function onClick(ev){setMobileMenuOpen(!1),_onClick&&_onClick(ev)},href,children:label})})};SubLevel.componentName="SubLevel";try{SubLevel.displayName="SubLevel",SubLevel.__docgenInfo={description:"",displayName:"SubLevel",props:{active:{defaultValue:null,description:"If `true`, the item will be marked as active",name:"active",required:!1,type:{name:"boolean"}},id:{defaultValue:null,description:"The id of the side navigation sub level",name:"id",required:!1,type:{name:"string"}},href:{defaultValue:null,description:"href attribute of the side navigation sub level",name:"href",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"Label of the side navigation sub level",name:"label",required:!0,type:{name:"string"}},mainLevelIndex:{defaultValue:null,description:"Index of the containing main level. The parent MainLevel component uses this property to index sub levels",name:"mainLevelIndex",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"Additional class names to apply to the side navigation sub level",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Override or extend the styles applied to the component",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/subLevel/SubLevel.tsx#SubLevel"]={docgenInfo:SubLevel.__docgenInfo,name:"SubLevel",path:"src/components/sideNavigation/subLevel/SubLevel.tsx#SubLevel"})}catch(__react_docgen_typescript_loader_error){}var useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),SideNavigation=function SideNavigation(_ref){var children=_ref.children,className=_ref.className,_ref$defaultOpenMainL=_ref.defaultOpenMainLevels,defaultOpenMainLevels=void 0===_ref$defaultOpenMainL?[]:_ref$defaultOpenMainL,id=_ref.id,ariaLabel=_ref.ariaLabel,style=_ref.style,theme=_ref.theme,toggleButtonLabel=_ref.toggleButtonLabel,container=react.useRef(null),customThemeClass=(0,useTheme.F)(SideNavigation_module_sideNavigation,theme),menuId="".concat(id,"-menu"),_React$useState=react.useState(),_React$useState2=(0,slicedToArray.Z)(_React$useState,2),activeParentLevel=_React$useState2[0],setActiveParentLevel=_React$useState2[1],_React$useState3=react.useState(!1),_React$useState4=(0,slicedToArray.Z)(_React$useState3,2),mobileMenuOpen=_React$useState4[0],setMobileMenuOpen=_React$useState4[1],shouldRenderMenu=!((0,useMobile.X)()&&!mobileMenuOpen),childElements=(0,getChildren.AU)(children),mainLevels=childElements.map((function(child,index){return(0,react.isValidElement)(child)&&"MainLevel"===child.type.componentName?(0,react.cloneElement)(child,{key:index,index}):null})),skipLink=childElements.find((function(child){return(0,react.isValidElement)(child)&&"SkipLink"===child.type.componentName}));return(0,react.useEffect)((function(){var handleEscKey=function handleEscKey(event){var key=event.key||event.keyCode;!mobileMenuOpen||"Escape"!==key&&"Esc"!==key&&27!==key||setMobileMenuOpen(!1)},handleOutsideClickOrFocusin=function handleOutsideClickOrFocusin(event){var target=event.target;mobileMenuOpen&&!container.current.contains(target)&&setMobileMenuOpen(!1)};return document.addEventListener("click",handleOutsideClickOrFocusin),document.addEventListener("focusin",handleOutsideClickOrFocusin),document.addEventListener("keyup",handleEscKey),function(){document.removeEventListener("click",handleOutsideClickOrFocusin),document.removeEventListener("focusin",handleOutsideClickOrFocusin),document.removeEventListener("keyup",handleEscKey)}})),(0,jsx_runtime.jsx)(sideNavigation_SideNavigationContext.Provider,{value:{mobileMenuOpen,defaultOpenMainLevels,activeParentLevel,setMobileMenuOpen,setActiveParentLevel},children:(0,jsx_runtime.jsxs)("nav",{className:(0,classNames.Z)(SideNavigation_module_sideNavigation,customThemeClass,className),id,"aria-label":ariaLabel,ref:container,style,children:[skipLink&&skipLink,(0,jsx_runtime.jsx)(Button.z,{"aria-controls":menuId,"aria-expanded":mobileMenuOpen,"aria-haspopup":!0,className:SideNavigation_module_toggleButton,fullWidth:!0,iconRight:mobileMenuOpen?(0,jsx_runtime.jsx)(IconAngleUp.IconAngleUp,{"aria-hidden":!0}):(0,jsx_runtime.jsx)(IconAngleDown.IconAngleDown,{"aria-hidden":!0}),onClick:function toggleMobileMenu(){setMobileMenuOpen(!mobileMenuOpen)},variant:"secondary",type:"button",children:toggleButtonLabel}),shouldRenderMenu&&(0,jsx_runtime.jsx)("ul",{className:(0,classNames.Z)(SideNavigation_module_mainLevelList,mobileMenuOpen&&SideNavigation_module_open),"aria-label":toggleButtonLabel,id:menuId,children:mainLevels})]})})};SideNavigation.MainLevel=MainLevel,SideNavigation.SubLevel=SubLevel,SideNavigation.SkipLink=SkipLink.G;try{SideNavigation.displayName="SideNavigation",SideNavigation.__docgenInfo={description:"",displayName:"SideNavigation",props:{className:{defaultValue:null,description:"Additional class names to apply to the side navigation",name:"className",required:!1,type:{name:"string"}},defaultOpenMainLevels:{defaultValue:{value:"[]"},description:"Default value for open main levels",name:"defaultOpenMainLevels",required:!1,type:{name:"number[]"}},id:{defaultValue:null,description:"The id of the side navigation.",name:"id",required:!0,type:{name:"string"}},ariaLabel:{defaultValue:null,description:"aria-label for helping screen reader users to distinguish SideNavigation from other navigational components",name:"ariaLabel",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Override or extend the styles applied to the component",name:"style",required:!1,type:{name:"CSSProperties"}},theme:{defaultValue:null,description:"Custom theme styles",name:"theme",required:!1,type:{name:"SideNavigationCustomTheme"}},toggleButtonLabel:{defaultValue:null,description:"label for the mobile menu toggle button",name:"toggleButtonLabel",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.tsx#SideNavigation"]={docgenInfo:SideNavigation.__docgenInfo,name:"SideNavigation",path:"src/components/sideNavigation/SideNavigation.tsx#SideNavigation"})}catch(__react_docgen_typescript_loader_error){}try{SideNavigation.MainLevel.displayName="SideNavigation.MainLevel",SideNavigation.MainLevel.__docgenInfo={description:"",displayName:"SideNavigation.MainLevel",props:{id:{defaultValue:null,description:"The id of the side navigation main level",name:"id",required:!0,type:{name:"string"}},href:{defaultValue:null,description:"href attribute of the side navigation main level",name:"href",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"Optional icon of the side navigation main level",name:"icon",required:!1,type:{name:"ReactNode"}},index:{defaultValue:null,description:"Index of the side navigation main level. The parent SideNavigation component uses this property to index main levels",name:"index",required:!1,type:{name:"number"}},label:{defaultValue:null,description:"Label of the side navigation main level",name:"label",required:!0,type:{name:"string"}},withDivider:{defaultValue:null,description:"A border that distinguishes the main level from the previous item",name:"withDivider",required:!1,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"Additional class names to apply to the side navigation main level",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Override or extend the styles applied to the component",name:"style",required:!1,type:{name:"CSSProperties"}},children:{defaultValue:null,description:"Children components for the main level. Usually subLevels",name:"children",required:!1,type:{name:"ReactNode"}},onClick:{defaultValue:null,description:"Callback function fired when the main level is clicked",name:"onClick",required:!1,type:{name:"(event: MouseEvent | KeyboardEvent | KeyboardEvent | MouseEvent<...>) => void"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},external:{defaultValue:null,description:"Boolean indicating whether the main level link will lead user to external domain.",name:"external",required:!1,type:{name:"boolean"}},openInNewTab:{defaultValue:null,description:"Boolean indicating whether the main level link will open in new tab or not.",name:"openInNewTab",required:!1,type:{name:"boolean"}},openInNewTabAriaLabel:{defaultValue:null,description:"The aria-label for opening main level link in a new tab",name:"openInNewTabAriaLabel",required:!1,type:{name:"string"}},openInExternalDomainAriaLabel:{defaultValue:null,description:"The aria-label for opening main level link in an external domain",name:"openInExternalDomainAriaLabel",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.tsx#SideNavigation.MainLevel"]={docgenInfo:SideNavigation.MainLevel.__docgenInfo,name:"SideNavigation.MainLevel",path:"src/components/sideNavigation/SideNavigation.tsx#SideNavigation.MainLevel"})}catch(__react_docgen_typescript_loader_error){}try{SideNavigation.SubLevel.displayName="SideNavigation.SubLevel",SideNavigation.SubLevel.__docgenInfo={description:"",displayName:"SideNavigation.SubLevel",props:{active:{defaultValue:null,description:"If `true`, the item will be marked as active",name:"active",required:!1,type:{name:"boolean"}},id:{defaultValue:null,description:"The id of the side navigation sub level",name:"id",required:!1,type:{name:"string"}},href:{defaultValue:null,description:"href attribute of the side navigation sub level",name:"href",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"Label of the side navigation sub level",name:"label",required:!0,type:{name:"string"}},mainLevelIndex:{defaultValue:null,description:"Index of the containing main level. The parent MainLevel component uses this property to index sub levels",name:"mainLevelIndex",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"Additional class names to apply to the side navigation sub level",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Override or extend the styles applied to the component",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.tsx#SideNavigation.SubLevel"]={docgenInfo:SideNavigation.SubLevel.__docgenInfo,name:"SideNavigation.SubLevel",path:"src/components/sideNavigation/SideNavigation.tsx#SideNavigation.SubLevel"})}catch(__react_docgen_typescript_loader_error){}try{SideNavigation.SkipLink.displayName="SideNavigation.SkipLink",SideNavigation.SkipLink.__docgenInfo={description:"",displayName:"SideNavigation.SkipLink",props:{ariaLabel:{defaultValue:null,description:"aria-label for describing SkipLink for screen readers.",name:"ariaLabel",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"Label for the SkipLink.",name:"label",required:!0,type:{name:"string"}},skipTo:{defaultValue:null,description:"ID of the element where the SkipLink jumps to.",name:"skipTo",required:!0,type:{name:"string"}},theme:{defaultValue:null,description:"Custom styling for SkipLink.",name:"theme",required:!1,type:{name:"SkipLinkTheme"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.tsx#SideNavigation.SkipLink"]={docgenInfo:SideNavigation.SkipLink.__docgenInfo,name:"SideNavigation.SkipLink",path:"src/components/sideNavigation/SideNavigation.tsx#SideNavigation.SkipLink"})}catch(__react_docgen_typescript_loader_error){}var IconHome=__webpack_require__("./src/icons/IconHome.tsx");const SideNavigation_stories={component:SideNavigation,decorators:[function(storyFn){return(0,jsx_runtime.jsx)("div",{style:{backgroundColor:"#f5f5f5",display:"grid",minHeight:"100vh"},children:(0,jsx_runtime.jsx)("div",{style:{height:"100%"},children:storyFn()})})}],title:"Components/SideNavigation",parameters:{storySource:{source:'import React from \'react\';\n\nimport { SideNavigation } from \'./SideNavigation\';\nimport { IconHome } from \'../../icons\';\n\nexport default {\n component: SideNavigation,\n decorators: [\n (storyFn) => (\n
\n
{storyFn()}
\n
\n ),\n ],\n title: \'Components/SideNavigation\',\n parameters: {\n controls: { expanded: true },\n },\n args: { defaultOpenMainLevels: [], toggleButtonLabel: \'Navigate to page\', id: \'side-navigation\' },\n};\n\nconst handleClick = (setActive) => (ev) => {\n ev.preventDefault();\n setActive(ev.currentTarget.getAttribute(\'href\'));\n};\n\nexport const Default = (args) => {\n const [active, setActive] = React.useState(\'/sub-level-1\');\n\n return (\n <>\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
Page Content
\n
\n \n );\n};\n\nexport const WithIcons = (args) => {\n const [active, setActive] = React.useState(\'/sub-level-2\');\n\n return (\n <>\n \n
\n
\n \n }\n >\n \n \n \n }\n >\n \n \n \n }\n />\n \n \n
\n
Page Content
\n
\n \n );\n};\n\nconst skipLinkTheme = {\n \'--left\': \'0px\',\n \'--top\': \'0px\',\n};\n\nexport const WithSkipLink = (args) => {\n const [active, setActive] = React.useState(\'/sub-level-1\');\n\n return (\n <>\n \n\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
Page Content
\n
\n \n );\n};\n\nexport const CustomTheme = (args) => Default(args);\nCustomTheme.args = {\n theme: {\n \'--side-navigation-background-color\': \'var(--color-white)\',\n \'--side-navigation-active-indicator-background-color\': \'var(--color-gold)\',\n \'--side-navigation-icon-size\': \'var(--spacing-m)\',\n \'--side-navigation-level-border-color\': \'var(--color-white)\',\n \'--side-navigation-level-border-color-focus\': \'var(--color-coat-of-arms)\',\n \'--side-navigation-level-border-color-hover\': \'var(--color-fog-light)\',\n \'--side-navigation-level-background-color\': \'var(--color-white)\',\n \'--side-navigation-level-background-color-active\': \'var(--color-fog-light)\',\n \'--side-navigation-level-background-color-hover\': \'var(--color-fog-light)\',\n \'--side-navigation-level-color\': \'var(--color-black)\',\n \'--side-navigation-level-color-active\': \'var(--color-black)\',\n \'--side-navigation-level-color-hover\': \'var(--color-black)\',\n \'--side-navigation-mobile-menu-border-color\': \'var(--color-black)\',\n \'--side-navigation-mobile-menu-z-index\': 100,\n },\n};\n',locationsMap:{default:{startLoc:{col:23,line:27},endLoc:{col:1,line:108},startBody:{col:23,line:27},endBody:{col:1,line:108}},"with-icons":{startLoc:{col:25,line:110},endLoc:{col:1,line:200},startBody:{col:25,line:110},endBody:{col:1,line:200}},"with-skip-link":{startLoc:{col:28,line:207},endLoc:{col:1,line:290},startBody:{col:28,line:207},endBody:{col:1,line:290}},"custom-theme":{startLoc:{col:27,line:292},endLoc:{col:50,line:292},startBody:{col:27,line:292},endBody:{col:50,line:292}}}},controls:{expanded:!0}},args:{defaultOpenMainLevels:[],toggleButtonLabel:"Navigate to page",id:"side-navigation"}};var handleClick=function handleClick(setActive){return function(ev){ev.preventDefault(),setActive(ev.currentTarget.getAttribute("href"))}},Default=function Default(args){var _React$useState=react.useState("/sub-level-1"),_React$useState2=(0,slicedToArray.Z)(_React$useState,2),active=_React$useState2[0],setActive=_React$useState2[1];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("style",{children:"\n @media only screen and (min-width: ".concat(getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-m"),") {\n .example-page {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 1rem;\n }\n\n .example-page-side-navigation {\n grid-column: 1/4;\n }\n }\n ")}),(0,jsx_runtime.jsxs)("div",{className:"example-page",children:[(0,jsx_runtime.jsx)("div",{className:"example-page-side-navigation",children:(0,jsx_runtime.jsxs)(SideNavigation,(0,objectSpread2.Z)((0,objectSpread2.Z)({ariaLabel:"Getting started"},args),{},{children:[(0,jsx_runtime.jsxs)(SideNavigation.MainLevel,{id:"main-level-link-1",label:"Main level accordion",children:[(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-1"===active,id:"sub-level-link-1",href:"/sub-level-1",label:"Sub level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-2"===active,id:"sub-level-link-2",href:"/sub-level-2",label:"Sub level link",onClick:handleClick(setActive)})]}),(0,jsx_runtime.jsxs)(SideNavigation.MainLevel,{id:"main-level-link-2",label:"Main level accordion",children:[(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-3"===active,id:"sub-level-link-3",href:"/sub-level-3",label:"Sub level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-4"===active,id:"sub-level-link-4",href:"/sub-level-4",label:"Sub level link",onClick:handleClick(setActive)})]}),(0,jsx_runtime.jsx)(SideNavigation.MainLevel,{active:"/main-level-3"===active,id:"main-level-link-3",href:"/main-level-3",label:"Main level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.MainLevel,{id:"main-level-link-4",href:"external-address",label:"Main level external link",external:!0,openInNewTab:!0,openInNewTabAriaLabel:"Opens in a new tab.",openInExternalDomainAriaLabel:"Opens a different website.",onClick:handleClick(setActive),withDivider:!0})]}))}),(0,jsx_runtime.jsx)("main",{children:"Page Content"})]})]})},WithIcons=function WithIcons(args){var _React$useState3=react.useState("/sub-level-2"),_React$useState4=(0,slicedToArray.Z)(_React$useState3,2),active=_React$useState4[0],setActive=_React$useState4[1];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("style",{children:"\n @media only screen and (min-width: ".concat(getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-m"),") {\n .example-page {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 1rem;\n }\n\n .example-page-side-navigation {\n grid-column: 1/4;\n }\n }\n ")}),(0,jsx_runtime.jsxs)("div",{className:"example-page",children:[(0,jsx_runtime.jsx)("div",{className:"example-page-side-navigation",children:(0,jsx_runtime.jsxs)(SideNavigation,(0,objectSpread2.Z)((0,objectSpread2.Z)({},args),{},{children:[(0,jsx_runtime.jsxs)(SideNavigation.MainLevel,{id:"main-level-link-1",label:"Main level accordion",icon:(0,jsx_runtime.jsx)(IconHome.IconHome,{"aria-hidden":!0}),children:[(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-1"===active,id:"sub-level-link-1",href:"/sub-level-1",label:"Sub level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-2"===active,id:"sub-level-link-2",href:"/sub-level-2",label:"Sub level link",onClick:handleClick(setActive)})]}),(0,jsx_runtime.jsxs)(SideNavigation.MainLevel,{id:"main-level-link-2",label:"Main level accordion",icon:(0,jsx_runtime.jsx)(IconHome.IconHome,{"aria-hidden":!0}),children:[(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-3"===active,id:"sub-level-link-3",href:"/sub-level-3",label:"Sub level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-4"===active,id:"sub-level-link-4",href:"/sub-level-4",label:"Sub level link",onClick:handleClick(setActive)})]}),(0,jsx_runtime.jsx)(SideNavigation.MainLevel,{active:"/main-level-3"===active,id:"main-level-link-3",href:"/main-level-3",label:"Main level link",onClick:handleClick(setActive),icon:(0,jsx_runtime.jsx)(IconHome.IconHome,{"aria-hidden":!0})}),(0,jsx_runtime.jsx)(SideNavigation.MainLevel,{id:"main-level-link-4",href:"external-address",label:"Main level external link",external:!0,openInNewTab:!0,openInNewTabAriaLabel:"Opens in a new tab.",openInExternalDomainAriaLabel:"Opens a different website.",onClick:handleClick(setActive),withDivider:!0})]}))}),(0,jsx_runtime.jsx)("main",{children:"Page Content"})]})]})},skipLinkTheme={"--left":"0px","--top":"0px"},WithSkipLink=function WithSkipLink(args){var _React$useState5=react.useState("/sub-level-1"),_React$useState6=(0,slicedToArray.Z)(_React$useState5,2),active=_React$useState6[0],setActive=_React$useState6[1];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("style",{children:"\n @media only screen and (min-width: ".concat(getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-m"),") {\n .example-page {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 1rem;\n }\n\n .example-page-side-navigation {\n grid-column: 1/4;\n }\n }\n ")}),(0,jsx_runtime.jsxs)("div",{className:"example-page",children:[(0,jsx_runtime.jsx)("div",{className:"example-page-side-navigation",children:(0,jsx_runtime.jsxs)(SideNavigation,(0,objectSpread2.Z)((0,objectSpread2.Z)({ariaLabel:"Getting started"},args),{},{children:[(0,jsx_runtime.jsx)(SideNavigation.SkipLink,{skipTo:"#content",label:"Skip Navigation",theme:skipLinkTheme}),(0,jsx_runtime.jsxs)(SideNavigation.MainLevel,{id:"main-level-link-1",label:"Main level accordion",children:[(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-1"===active,id:"sub-level-link-1",href:"/sub-level-1",label:"Sub level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-2"===active,id:"sub-level-link-2",href:"/sub-level-2",label:"Sub level link",onClick:handleClick(setActive)})]}),(0,jsx_runtime.jsxs)(SideNavigation.MainLevel,{id:"main-level-link-2",label:"Main level accordion",children:[(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-3"===active,id:"sub-level-link-3",href:"/sub-level-3",label:"Sub level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.SubLevel,{active:"/sub-level-4"===active,id:"sub-level-link-4",href:"/sub-level-4",label:"Sub level link",onClick:handleClick(setActive)})]}),(0,jsx_runtime.jsx)(SideNavigation.MainLevel,{active:"/main-level-3"===active,id:"main-level-link-3",href:"/main-level-3",label:"Main level link",onClick:handleClick(setActive)}),(0,jsx_runtime.jsx)(SideNavigation.MainLevel,{id:"main-level-link-4",href:"external-address",label:"Main level external link",external:!0,openInNewTab:!0,openInNewTabAriaLabel:"Opens in a new tab.",openInExternalDomainAriaLabel:"Opens a different website.",onClick:handleClick(setActive),withDivider:!0})]}))}),(0,jsx_runtime.jsx)("main",{children:"Page Content"})]})]})},CustomTheme=function CustomTheme(args){return Default(args)};CustomTheme.args={theme:{"--side-navigation-background-color":"var(--color-white)","--side-navigation-active-indicator-background-color":"var(--color-gold)","--side-navigation-icon-size":"var(--spacing-m)","--side-navigation-level-border-color":"var(--color-white)","--side-navigation-level-border-color-focus":"var(--color-coat-of-arms)","--side-navigation-level-border-color-hover":"var(--color-fog-light)","--side-navigation-level-background-color":"var(--color-white)","--side-navigation-level-background-color-active":"var(--color-fog-light)","--side-navigation-level-background-color-hover":"var(--color-fog-light)","--side-navigation-level-color":"var(--color-black)","--side-navigation-level-color-active":"var(--color-black)","--side-navigation-level-color-hover":"var(--color-black)","--side-navigation-mobile-menu-border-color":"var(--color-black)","--side-navigation-mobile-menu-z-index":100}},Default.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const [active, setActive] = React.useState(\'/sub-level-1\');\n\n return (\n <>\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
Page Content
\n
\n \n );\n}'}},Default.parameters),WithIcons.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const [active, setActive] = React.useState(\'/sub-level-2\');\n\n return (\n <>\n \n
\n
\n \n }\n >\n \n \n \n }\n >\n \n \n \n }\n />\n \n \n
\n
Page Content
\n
\n \n );\n}'}},WithIcons.parameters),WithSkipLink.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n const [active, setActive] = React.useState(\'/sub-level-1\');\n\n return (\n <>\n \n\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
Page Content
\n
\n \n );\n}'}},WithSkipLink.parameters),CustomTheme.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => Default(args)"}},CustomTheme.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/sideNavigation/SideNavigation.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{WithIcons.displayName="WithIcons",WithIcons.__docgenInfo={description:"",displayName:"WithIcons",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.stories.tsx#WithIcons"]={docgenInfo:WithIcons.__docgenInfo,name:"WithIcons",path:"src/components/sideNavigation/SideNavigation.stories.tsx#WithIcons"})}catch(__react_docgen_typescript_loader_error){}try{WithSkipLink.displayName="WithSkipLink",WithSkipLink.__docgenInfo={description:"",displayName:"WithSkipLink",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.stories.tsx#WithSkipLink"]={docgenInfo:WithSkipLink.__docgenInfo,name:"WithSkipLink",path:"src/components/sideNavigation/SideNavigation.stories.tsx#WithSkipLink"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/sideNavigation/SideNavigation.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/sideNavigation/SideNavigation.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/statusLabel/StatusLabel.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Alert:()=>Alert,Error:()=>Error,Icons:()=>Icons,Info:()=>Info,Neutral:()=>Neutral,Playground:()=>Playground,Success:()=>Success,default:()=>StatusLabel_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),objectWithoutProperties=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"));__webpack_require__("./src/styles/base.css");const StatusLabel_module={statusLabel:"StatusLabel_statusLabel__PRZAr status-label_hds-status-label__cKOCR",statusLabelWithIcon:"StatusLabel_statusLabelWithIcon__D0x6W status-label_hds-status-label--with-icon__B29VM",statusLabelIcon:"StatusLabel_statusLabelIcon__l1++J status-label_hds-status-label-icon__ZwmPf",info:"StatusLabel_info__G9AuR status-label_hds-status-label--info__skSDp",success:"StatusLabel_success__wUjTj status-label_hds-status-label--success__ECfam",alert:"StatusLabel_alert__qGIX0 status-label_hds-status-label--alert__qPQaE",error:"StatusLabel_error__N4X2p status-label_hds-status-label--error__hyan6"};var classNames=__webpack_require__("./src/utils/classNames.ts"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["children","className","dataTestId","type","iconLeft"],IconElement=function IconElement(_ref){var icon=_ref.icon;return(0,jsx_runtime.jsx)("span",{className:StatusLabel_module.statusLabelIcon,"aria-hidden":"true",children:icon})},StatusLabel=function StatusLabel(_ref2){var children=_ref2.children,className=_ref2.className,dataTestId=_ref2.dataTestId,_ref2$type=_ref2.type,type=void 0===_ref2$type?"neutral":_ref2$type,iconLeft=_ref2.iconLeft,rest=(0,objectWithoutProperties.Z)(_ref2,_excluded);return(0,jsx_runtime.jsxs)("span",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:(0,classNames.Z)(StatusLabel_module.statusLabel,StatusLabel_module[type],iconLeft&&StatusLabel_module.statusLabelWithIcon,className),"data-testid":dataTestId},rest),{},{children:[iconLeft&&(0,jsx_runtime.jsx)(IconElement,{icon:iconLeft}),children]}))};try{StatusLabel.displayName="StatusLabel",StatusLabel.__docgenInfo={description:"",displayName:"StatusLabel",props:{className:{defaultValue:null,description:"Additional class names to apply to the status label",name:"className",required:!1,type:{name:"string"}},dataTestId:{defaultValue:null,description:"Adds a data-testid attribute to the root element with the given value",name:"dataTestId",required:!1,type:{name:"string"}},type:{defaultValue:{value:"neutral"},description:"The type of the status label",name:"type",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"error"'},{value:'"alert"'},{value:'"neutral"'}]}},iconLeft:{defaultValue:null,description:"Element placed on the left side of the status label",name:"iconLeft",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/statusLabel/StatusLabel.tsx#StatusLabel"]={docgenInfo:StatusLabel.__docgenInfo,name:"StatusLabel",path:"src/components/statusLabel/StatusLabel.tsx#StatusLabel"})}catch(__react_docgen_typescript_loader_error){}var IconInfoCircle=__webpack_require__("./src/icons/IconInfoCircle.tsx"),IconCheckCircle=__webpack_require__("./src/icons/IconCheckCircle.tsx"),IconAlertCircle=__webpack_require__("./src/icons/IconAlertCircle.tsx"),IconError=__webpack_require__("./src/icons/IconError.tsx");const StatusLabel_stories={component:StatusLabel,title:"Components/StatusLabel",parameters:{storySource:{source:"import React from 'react';\n\nimport { StatusLabel } from './StatusLabel';\nimport { IconCheckCircle, IconInfoCircle, IconAlertCircle, IconError } from '../../icons';\n\nexport default {\n component: StatusLabel,\n title: 'Components/StatusLabel',\n parameters: {\n controls: { hideNoControlsWarning: true },\n },\n};\n\nexport const Neutral = () => Neutral;\n\nexport const Info = () => Info;\n\nexport const Success = () => Success;\n\nexport const Alert = () => Alert;\n\nexport const Error = () => Error;\n\nexport const Icons = () => (\n <>\n }>Default\n
\n
\n }>\n Info\n \n
\n
\n }>\n Success\n \n
\n
\n }>\n Alert\n \n
\n
\n }>\n Error\n \n \n);\n\nexport const Playground = (args) => {args.label};\n\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n label: 'Status',\n type: 'neutral',\n};\n\nPlayground.argTypes = {\n type: {\n options: ['neutral', 'info', 'success', 'alert', 'error'],\n control: { type: 'radio' },\n },\n};\n",locationsMap:{neutral:{startLoc:{col:23,line:14},endLoc:{col:63,line:14},startBody:{col:23,line:14},endBody:{col:63,line:14}},info:{startLoc:{col:20,line:16},endLoc:{col:69,line:16},startBody:{col:20,line:16},endBody:{col:69,line:16}},success:{startLoc:{col:23,line:18},endLoc:{col:78,line:18},startBody:{col:23,line:18},endBody:{col:78,line:18}},alert:{startLoc:{col:21,line:20},endLoc:{col:72,line:20},startBody:{col:21,line:20},endBody:{col:72,line:20}},error:{startLoc:{col:21,line:22},endLoc:{col:72,line:22},startBody:{col:21,line:22},endBody:{col:72,line:22}},icons:{startLoc:{col:21,line:24},endLoc:{col:1,line:48},startBody:{col:21,line:24},endBody:{col:1,line:48}},playground:{startLoc:{col:26,line:50},endLoc:{col:92,line:50},startBody:{col:26,line:50},endBody:{col:92,line:50}}}},controls:{hideNoControlsWarning:!0}}};var Neutral=function Neutral(){return(0,jsx_runtime.jsx)(StatusLabel,{children:"Neutral"})},Info=function Info(){return(0,jsx_runtime.jsx)(StatusLabel,{type:"info",children:"Info"})},Success=function Success(){return(0,jsx_runtime.jsx)(StatusLabel,{type:"success",children:"Success"})},Alert=function Alert(){return(0,jsx_runtime.jsx)(StatusLabel,{type:"alert",children:"Alert"})},Error=function Error(){return(0,jsx_runtime.jsx)(StatusLabel,{type:"error",children:"Error"})},Icons=function Icons(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(StatusLabel,{iconLeft:(0,jsx_runtime.jsx)(IconInfoCircle.IconInfoCircle,{}),children:"Default"}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(StatusLabel,{type:"info",iconLeft:(0,jsx_runtime.jsx)(IconInfoCircle.IconInfoCircle,{}),children:"Info"}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(StatusLabel,{type:"success",iconLeft:(0,jsx_runtime.jsx)(IconCheckCircle.IconCheckCircle,{}),children:"Success"}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(StatusLabel,{type:"alert",iconLeft:(0,jsx_runtime.jsx)(IconAlertCircle.IconAlertCircle,{}),children:"Alert"}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)(StatusLabel,{type:"error",iconLeft:(0,jsx_runtime.jsx)(IconError.IconError,{}),children:"Error"})]})},Playground=function Playground(args){return(0,jsx_runtime.jsx)(StatusLabel,{type:args.type,children:args.label})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args={label:"Status",type:"neutral"},Playground.argTypes={type:{options:["neutral","info","success","alert","error"],control:{type:"radio"}}},Neutral.parameters=(0,objectSpread2.Z)({storySource:{source:"() => Neutral"}},Neutral.parameters),Info.parameters=(0,objectSpread2.Z)({storySource:{source:'() => Info'}},Info.parameters),Success.parameters=(0,objectSpread2.Z)({storySource:{source:'() => Success'}},Success.parameters),Alert.parameters=(0,objectSpread2.Z)({storySource:{source:'() => Alert'}},Alert.parameters),Error.parameters=(0,objectSpread2.Z)({storySource:{source:'() => Error'}},Error.parameters),Icons.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n <>\n }>Default\n
\n
\n }>\n Info\n \n
\n
\n }>\n Success\n \n
\n
\n }>\n Alert\n \n
\n
\n }>\n Error\n \n \n)'}},Icons.parameters),Playground.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {args.label}"}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/statusLabel/StatusLabel.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/statusLabel/StatusLabel.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/stepByStep/StepByStep.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{NumberedStepByStep:()=>NumberedStepByStep,RegularStepByStep:()=>RegularStepByStep,default:()=>StepByStep_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react=__webpack_require__("../../node_modules/react/index.js"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),Button=(__webpack_require__("./src/styles/base.css"),__webpack_require__("./src/components/button/Button.tsx")),classNames=__webpack_require__("./src/utils/classNames.ts"),Link=__webpack_require__("./src/components/link/Link.tsx");const StepByStep_module={container:"StepByStep_container__rZ-v9",stepsContainer:"StepByStep_stepsContainer__wESCk step-by-step_hds-step-by-step__steps-container__CP8BU",stepItem:"StepByStep_stepItem__Q+z7C step-by-step_hds-step-by-step__step-item__vI8lg",stepItemTitle:"StepByStep_stepItemTitle__CffwI step-by-step_hds-step-by-step__step-item-title__lCmCB"};var jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["children"],getButtonOrLinkRenderer=function getButtonOrLinkRenderer(Tag){return function(_ref){var children=_ref.children,props=(0,objectWithoutProperties.Z)(_ref,_excluded);return(0,jsx_runtime.jsx)("p",{children:(0,jsx_runtime.jsx)(Tag,(0,objectSpread2.Z)((0,objectSpread2.Z)({},props),{},{children}))})}},renderLink=getButtonOrLinkRenderer(Link.r),renderButton=getButtonOrLinkRenderer(Button.z),StepComponent=function StepComponent(_ref2){var title=_ref2.title,description=_ref2.description,_ref2$buttons=_ref2.buttons,buttons=void 0===_ref2$buttons?[]:_ref2$buttons,_ref2$links=_ref2.links,links=void 0===_ref2$links?[]:_ref2$links;return(0,jsx_runtime.jsxs)("li",{className:StepByStep_module.stepItem,children:[(0,jsx_runtime.jsx)("p",{className:StepByStep_module.stepItemTitle,children:title}),(0,jsx_runtime.jsxs)("div",{children:[description&&(0,jsx_runtime.jsx)("p",{children:description}),buttons.map(renderButton),links.map(renderLink)]})]})},StepByStep=function StepByStep(_ref3){var className=_ref3.className,title=_ref3.title,helpText=_ref3.helpText,_ref3$steps=_ref3.steps,steps=void 0===_ref3$steps?[]:_ref3$steps,_ref3$numberedList=_ref3.numberedList,numberedList=void 0!==_ref3$numberedList&&_ref3$numberedList,headerClassName=_ref3.headerClassName,_ref3$headerLevel=_ref3.headerLevel,headerLevel=void 0===_ref3$headerLevel?2:_ref3$headerLevel,wrapperClassName=(0,classNames.Z)(StepByStep_module.container,className),titleComponent=title&&react.createElement("h".concat(headerLevel),{className:(0,classNames.Z)(StepByStep_module.title,headerClassName)},title);return(0,jsx_runtime.jsxs)("div",{className:wrapperClassName,children:[(0,jsx_runtime.jsxs)("div",{children:[titleComponent,(0,jsx_runtime.jsx)("p",{className:StepByStep_module.description,children:helpText})]}),react.createElement(numberedList?"ol":"ul",{className:StepByStep_module.stepsContainer},steps.map((function(step){return(0,jsx_runtime.jsx)(StepComponent,(0,objectSpread2.Z)({},step))})))]})};try{StepByStep.displayName="StepByStep",StepByStep.__docgenInfo={description:"",displayName:"StepByStep",props:{className:{defaultValue:null,description:"Additional class names to apply to the container element.",name:"className",required:!1,type:{name:"string"}},headerClassName:{defaultValue:null,description:"Class name for the main heading.",name:"headerClassName",required:!1,type:{name:"string"}},headerLevel:{defaultValue:{value:"2"},description:"Header level for the main heading.",name:"headerLevel",required:!1,type:{name:"number"}},helpText:{defaultValue:null,description:"Help text for the step by step component. Displayed under the `title` property.",name:"helpText",required:!1,type:{name:"string"}},numberedList:{defaultValue:{value:"false"},description:"Boolean indicating whether the steps are numbered.",name:"numberedList",required:!1,type:{name:"boolean"}},steps:{defaultValue:{value:"[]"},description:"Steps for the step by step component.",name:"steps",required:!1,type:{name:"StepType[]"}},title:{defaultValue:null,description:"Title text for the step by step component.",name:"title",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepByStep/StepByStep.tsx#StepByStep"]={docgenInfo:StepByStep.__docgenInfo,name:"StepByStep",path:"src/components/stepByStep/StepByStep.tsx#StepByStep"})}catch(__react_docgen_typescript_loader_error){}const StepByStep_stories={parameters:{storySource:{source:"import React from 'react';\n\nimport { StepByStep } from './StepByStep';\n\nexport default {\n component: StepByStep,\n title: 'Components/StepByStep',\n args: {\n steps: [\n {\n title: 'Step title',\n description:\n 'Here you can describe the step in detail. Keep the text compact so the user gets the big picture of the whole process and its steps easily.',\n buttons: [\n {\n children: 'Example button',\n href: 'https://hel.fi',\n },\n ],\n },\n {\n title: 'Step title',\n description: 'You can put text here.',\n links: [\n {\n children: 'Example link',\n href: 'https://hel.fi',\n },\n ],\n },\n {\n title: 'Step title',\n description: 'You can put text here.',\n },\n {\n title: 'Step title',\n description: 'You can put text here.',\n },\n {\n title: 'Step title',\n description: 'You can put text here.',\n },\n ],\n },\n argTypes: {\n title: { control: { type: 'string' } },\n steps: { control: { type: 'string' } },\n helpText: { control: { type: 'string' } },\n },\n};\n\nexport const NumberedStepByStep = (args) => ;\n\nNumberedStepByStep.args = {\n title: 'Numbered step by step component',\n helpText: 'Numbered component is suitable for cases where the order of the steps is important.',\n};\n\nexport const RegularStepByStep = (args) => ;\n\nRegularStepByStep.args = {\n title: 'Numbered step by step component',\n helpText: 'Use the unnumbered list when the order of the steps is less important and they form more of a guideline.',\n};\n",locationsMap:{"numbered-step-by-step":{startLoc:{col:34,line:52},endLoc:{col:81,line:52},startBody:{col:34,line:52},endBody:{col:81,line:52}},"regular-step-by-step":{startLoc:{col:33,line:59},endLoc:{col:67,line:59},startBody:{col:33,line:59},endBody:{col:67,line:59}}}}},component:StepByStep,title:"Components/StepByStep",args:{steps:[{title:"Step title",description:"Here you can describe the step in detail. Keep the text compact so the user gets the big picture of the whole process and its steps easily.",buttons:[{children:"Example button",href:"https://hel.fi"}]},{title:"Step title",description:"You can put text here.",links:[{children:"Example link",href:"https://hel.fi"}]},{title:"Step title",description:"You can put text here."},{title:"Step title",description:"You can put text here."},{title:"Step title",description:"You can put text here."}]},argTypes:{title:{control:{type:"string"}},steps:{control:{type:"string"}},helpText:{control:{type:"string"}}}};var NumberedStepByStep=function NumberedStepByStep(args){return(0,jsx_runtime.jsx)(StepByStep,(0,objectSpread2.Z)({numberedList:!0},args))};NumberedStepByStep.args={title:"Numbered step by step component",helpText:"Numbered component is suitable for cases where the order of the steps is important."};var RegularStepByStep=function RegularStepByStep(args){return(0,jsx_runtime.jsx)(StepByStep,(0,objectSpread2.Z)({},args))};RegularStepByStep.args={title:"Numbered step by step component",helpText:"Use the unnumbered list when the order of the steps is less important and they form more of a guideline."},NumberedStepByStep.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},NumberedStepByStep.parameters),RegularStepByStep.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => "}},RegularStepByStep.parameters);try{NumberedStepByStep.displayName="NumberedStepByStep",NumberedStepByStep.__docgenInfo={description:"",displayName:"NumberedStepByStep",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepByStep/StepByStep.stories.tsx#NumberedStepByStep"]={docgenInfo:NumberedStepByStep.__docgenInfo,name:"NumberedStepByStep",path:"src/components/stepByStep/StepByStep.stories.tsx#NumberedStepByStep"})}catch(__react_docgen_typescript_loader_error){}try{RegularStepByStep.displayName="RegularStepByStep",RegularStepByStep.__docgenInfo={description:"",displayName:"RegularStepByStep",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepByStep/StepByStep.stories.tsx#RegularStepByStep"]={docgenInfo:RegularStepByStep.__docgenInfo,name:"RegularStepByStep",path:"src/components/stepByStep/StepByStep.stories.tsx#RegularStepByStep"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/stepper/Stepper.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Overflow:()=>Overflow,Playground:()=>Playground,SimpleFormExample:()=>SimpleFormExample,Small:()=>Small,States:()=>States,WithCustomTheme:()=>WithCustomTheme,WithStepHeading:()=>WithStepHeading,default:()=>Stepper_stories});var defineProperty=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js");__webpack_require__("./src/styles/base.css");const Stepper_module_scrollButton="Stepper_scrollButton__R5+Vd",Stepper_module_step="Stepper_step__aaImD",Stepper_module_stepperContainer="Stepper_stepperContainer__Vib9w",Stepper_module_stepper="Stepper_stepper__6PjVh",Stepper_module_small="Stepper_small__URzJT",Stepper_module_stepContainer="Stepper_stepContainer__KBCl1",Stepper_module_label="Stepper_label__vlPbJ",Stepper_module_disabled="Stepper_disabled__FutYN",Stepper_module_circle="Stepper_circle__DrdoP",Stepper_module_selected="Stepper_selected__ydRxc",Stepper_module_completedContainer="Stepper_completedContainer__B0hu+",Stepper_module_completedIcon="Stepper_completedIcon__aaXAh",Stepper_module_number="Stepper_number__+nw6j",Stepper_module_circleContainer="Stepper_circleContainer__9kuPp",Stepper_module_line="Stepper_line__Bs+Y9",Stepper_module_disabledLine="Stepper_disabledLine__kt7YZ",Stepper_module_enabledLine="Stepper_enabledLine__uHDOS",Stepper_module_heading="Stepper_heading__TTXb1 helpers_heading-l__ZCbCh",Stepper_module_scrollButtonPrevious="Stepper_scrollButtonPrevious__QYWLi",Stepper_module_scrollButtonNext="Stepper_scrollButtonNext__EZSBx";var objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),IconCheck=__webpack_require__("./src/icons/IconCheck.tsx"),IconError=__webpack_require__("./src/icons/IconError.tsx"),IconPlaybackPause=__webpack_require__("./src/icons/IconPlaybackPause.tsx"),classNames=__webpack_require__("./src/utils/classNames.ts"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_excluded=["label","language","index","renderCustomStepCountLabel","small","state","selected","stepsTotal","renderCustomStateAriaLabel","onStepClick","dataTestId"],StepState=function(StepState){return StepState[StepState.available=0]="available",StepState[StepState.completed=1]="completed",StepState[StepState.disabled=2]="disabled",StepState[StepState.attention=3]="attention",StepState[StepState.paused=4]="paused",StepState}({}),states={available:{fi:"Valittavissa.",en:"Available.",sv:"Valbar."},completed:{fi:"Valmis.",en:"Completed.",sv:"Komplett."},attention:{fi:"Vaatii huomiota.",en:"Needs attention.",sv:"Behöver uppmärksamhet."},paused:{fi:"Keskeytetty.",en:"Paused.",sv:"Pausad."}},Step=react.forwardRef((function(_ref,ref){var label=_ref.label,_ref$language=_ref.language,language=void 0===_ref$language?"fi":_ref$language,index=_ref.index,renderCustomStepCountLabel=_ref.renderCustomStepCountLabel,_ref$small=_ref.small,small=void 0!==_ref$small&&_ref$small,state=_ref.state,selected=_ref.selected,stepsTotal=_ref.stepsTotal,renderCustomStateAriaLabel=_ref.renderCustomStateAriaLabel,onStepClick=_ref.onStepClick,dataTestId=_ref.dataTestId,rest=(0,objectWithoutProperties.Z)(_ref,_excluded);return(0,jsx_runtime.jsx)("div",{className:Stepper_module_stepContainer,children:(0,jsx_runtime.jsxs)("button",(0,objectSpread2.Z)((0,objectSpread2.Z)({ref,type:"button",disabled:state===StepState.disabled,className:(0,classNames.Z)(Stepper_module_step,selected&&Stepper_module_selected,state===StepState.disabled&&Stepper_module_disabled),"aria-current":!!selected&&"step","aria-label":function composeAriaLabel(){var stepCountLabel=renderCustomStepCountLabel?renderCustomStepCountLabel(index,stepsTotal):function getStepCountLabel(language,stepIndex,totalNumberOfSteps){return{en:"Step ".concat(stepIndex+1,"/").concat(totalNumberOfSteps,"."),fi:"Vaihe ".concat(stepIndex+1,"/").concat(totalNumberOfSteps,"."),sv:"Steg ".concat(stepIndex+1,"/").concat(totalNumberOfSteps,".")}[language]}(language,index,stepsTotal),stateAriaLabel=renderCustomStateAriaLabel?renderCustomStateAriaLabel(index,state):function getStepState(language,state){return state===StepState.disabled?"":states[StepState[state]][language]}(language,state);selected&&state===StepState.available&&(stateAriaLabel="");var labelWithPeriod=label;return"."!==labelWithPeriod.slice(-1)&&(labelWithPeriod+="."),[labelWithPeriod,stepCountLabel,stateAriaLabel].filter((function(lbl){return lbl})).join(" ")}(),onClick:function onClick(e){return onStepClick&&onStepClick(e,index)},"data-testid":dataTestId},rest),{},{children:[(0,jsx_runtime.jsx)("div",{className:Stepper_module_circleContainer,children:state!==StepState.completed||selected?(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Stepper_module_circle),children:[state===StepState.attention&&(0,jsx_runtime.jsx)(IconError.IconError,{size:"xs","aria-hidden":!0}),state===StepState.paused&&(0,jsx_runtime.jsx)(IconPlaybackPause.IconPlaybackPause,{size:"xs","aria-hidden":!0}),(state===StepState.available||state===StepState.disabled||state===StepState.completed&&selected)&&(0,jsx_runtime.jsx)("span",{className:Stepper_module_number,children:index+1})]}):(0,jsx_runtime.jsx)("div",{className:Stepper_module_completedContainer,children:(0,jsx_runtime.jsx)(IconCheck.IconCheck,{className:Stepper_module_completedIcon,"aria-hidden":!0})})}),!small&&(0,jsx_runtime.jsx)("p",{className:Stepper_module_label,children:label})]}))})}));try{Step.displayName="Step",Step.__docgenInfo={description:"",displayName:"Step",props:{dataTestId:{defaultValue:null,description:"Data test id of step",name:"dataTestId",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"The label of the step",name:"label",required:!0,type:{name:"string"}},language:{defaultValue:{value:"fi"},description:"The language of the step",name:"language",required:!1,type:{name:"string"}},index:{defaultValue:null,description:"The index of the step",name:"index",required:!0,type:{name:"number"}},onStepClick:{defaultValue:null,description:"A callback function for custom action on step click",name:"onStepClick",required:!1,type:{name:"(event: MouseEvent, stepIndex: number) => void"}},renderCustomStateAriaLabel:{defaultValue:null,description:"A function for rendering a custom aria-label for step's state",name:"renderCustomStateAriaLabel",required:!1,type:{name:"(stepIndex: number, state: StepState) => string"}},renderCustomStepCountLabel:{defaultValue:null,description:"A function for rendering a custom step count label",name:"renderCustomStepCountLabel",required:!1,type:{name:"(stepIndex: number, totalNumberOfSteps: number) => string"}},selected:{defaultValue:null,description:"A boolean indicating whether step is in selected state",name:"selected",required:!1,type:{name:"boolean"}},small:{defaultValue:{value:"false"},description:"A boolean indicating whether small variant is used",name:"small",required:!1,type:{name:"boolean"}},state:{defaultValue:null,description:"The state of the step",name:"state",required:!0,type:{name:"enum",value:[{value:"0"},{value:"1"},{value:"2"},{value:"3"},{value:"4"}]}},stepsTotal:{defaultValue:null,description:"The total number of steps",name:"stepsTotal",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Step.tsx#Step"]={docgenInfo:Step.__docgenInfo,name:"Step",path:"src/components/stepper/Step.tsx#Step"})}catch(__react_docgen_typescript_loader_error){}var IconAngleLeft=__webpack_require__("./src/icons/IconAngleLeft.tsx"),IconAngleRight=__webpack_require__("./src/icons/IconAngleRight.tsx"),useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),getStepHeading=function getStepHeading(language,stepIndex,totalNumberOfSteps,label){return{en:"Step ".concat(stepIndex+1,"/").concat(totalNumberOfSteps,": ").concat(label),fi:"Vaihe ".concat(stepIndex+1,"/").concat(totalNumberOfSteps,": ").concat(label),sv:"Steg ".concat(stepIndex+1,"/").concat(totalNumberOfSteps,": ").concat(label)}[language]},Stepper=function Stepper(_ref){var className=_ref.className,_ref$language=_ref.language,language=void 0===_ref$language?"fi":_ref$language,selectedStep=_ref.selectedStep,_ref$small=_ref.small,small=void 0!==_ref$small&&_ref$small,renderCustomStepCountLabel=_ref.renderCustomStepCountLabel,renderCustomStateAriaLabel=_ref.renderCustomStateAriaLabel,_onStepClick=_ref.onStepClick,stepHeading=_ref.stepHeading,_ref$stepHeadingAriaL=_ref.stepHeadingAriaLevel,stepHeadingAriaLevel=void 0===_ref$stepHeadingAriaL?2:_ref$stepHeadingAriaL,headingClassName=_ref.headingClassName,_ref$dataTestId=_ref.dataTestId,dataTestId=void 0===_ref$dataTestId?"hds-stepper":_ref$dataTestId,renderCustomStepHeading=_ref.renderCustomStepHeading,steps=_ref.steps,theme=_ref.theme,stepsTotal=steps.length,initialRender=(0,react.useRef)(!0),stepHeadingRef=(0,react.useRef)(null),stepperRef=(0,react.useRef)(null),stepRefs=(0,react.useRef)([]),arrLength=steps.length,_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),showPreviousButton=_useState2[0],setShowPreviousButton=_useState2[1],_useState3=(0,react.useState)(!1),_useState4=(0,slicedToArray.Z)(_useState3,2),showNextButton=_useState4[0],setShowNextButton=_useState4[1],customThemeClass=(0,useTheme.F)(Stepper_module_stepperContainer,theme);return stepRefs.current.length!==arrLength&&(stepRefs.current=Array(arrLength).fill(0).map((function(_,index){return stepRefs.current[index]||(0,react.createRef)()}))),(0,react.useEffect)((function(){if(!initialRender.current){stepHeadingRef.current&&stepHeadingRef.current.focus();var hdsStepWidth=stepperRef.current.scrollWidth/stepsTotal;stepperRef.current.scrollLeft=hdsStepWidth*(selectedStep+1)-hdsStepWidth/2-stepperRef.current.parentNode.clientWidth/2}initialRender.current=!1,stepperRef.current.scrollLeft>5?setShowPreviousButton(!0):setShowPreviousButton(!1),stepperRef.current.scrollWidth-(stepperRef.current.parentNode.clientWidth+stepperRef.current.scrollLeft)>5?setShowNextButton(!0):setShowNextButton(!1)}),[selectedStep]),(0,jsx_runtime.jsxs)("div",{lang:language,className:(0,classNames.Z)(Stepper_module_stepperContainer,customThemeClass),"data-testid":dataTestId,children:[showPreviousButton&&(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(Stepper_module_scrollButton,Stepper_module_scrollButtonPrevious),"aria-hidden":"true",children:(0,jsx_runtime.jsx)("button",{type:"button",onClick:function onClick(){var amountToScroll=stepperRef.current.scrollWidth/stepsTotal;stepperRef.current.scrollLeft-=amountToScroll},tabIndex:-1,children:(0,jsx_runtime.jsx)(IconAngleLeft.IconAngleLeft,{size:"m"})})}),showNextButton&&(0,jsx_runtime.jsx)("div",{className:(0,classNames.Z)(Stepper_module_scrollButton,Stepper_module_scrollButtonNext),"aria-hidden":"true",children:(0,jsx_runtime.jsx)("button",{type:"button",onClick:function onClick(){var amountToScroll=stepperRef.current.scrollWidth/stepsTotal;stepperRef.current.scrollLeft+=amountToScroll},tabIndex:-1,children:(0,jsx_runtime.jsx)(IconAngleRight.IconAngleRight,{size:"m"})})}),(0,jsx_runtime.jsxs)("div",{onScroll:function onScroll(e){e.target.scrollLeft&&e.target.scrollLeft>5?setShowPreviousButton(!0):setShowPreviousButton(!1),e.target.scrollWidth-(e.target.parentNode.clientWidth+e.target.scrollLeft)>5?setShowNextButton(!0):setShowNextButton(!1)},ref:stepperRef,className:(0,classNames.Z)(className,Stepper_module_stepper,small&&Stepper_module_small),children:[(0,jsx_runtime.jsx)("div",{className:Stepper_module_line,"aria-hidden":!0,style:{width:"max( calc(100% - var(--hds-step-width)), calc(".concat(stepsTotal," * var(--hds-step-width) - var(--hds-step-width) ))")},children:steps.map((function(step,index){return index===steps.length-1?null:(0,jsx_runtime.jsx)("div",{style:{width:"calc( 100% / ".concat(stepsTotal-1,")")},className:steps[index+1].state===StepState.disabled?Stepper_module_disabledLine:Stepper_module_enabledLine},"".concat(step.label,"-").concat(index))}))}),steps.map((function(step,index){return(0,jsx_runtime.jsx)(Step,{ref:stepRefs.current[index],label:step.label,language,index,small,stepsTotal,selected:selectedStep===index,state:step.state,onStepClick:function onStepClick(event,stepIndex){stepIndex===selectedStep&&stepHeading&&stepHeadingRef.current.focus(),_onStepClick(event,stepIndex)},renderCustomStepCountLabel,renderCustomStateAriaLabel,dataTestId:"".concat(dataTestId,"-step-").concat(index)},"".concat(index,"-").concat(step.label))}))]}),stepHeading&&(0,jsx_runtime.jsx)("div",{tabIndex:-1,ref:stepHeadingRef,role:"heading","aria-level":stepHeadingAriaLevel,className:(0,classNames.Z)(Stepper_module_heading,headingClassName),children:renderCustomStepHeading?renderCustomStepHeading(selectedStep,stepsTotal,steps[selectedStep].label):getStepHeading(language,selectedStep,stepsTotal,steps[selectedStep].label)})]})};try{Stepper.displayName="Stepper",Stepper.__docgenInfo={description:"",displayName:"Stepper",props:{className:{defaultValue:null,description:"A custom className passed to stepper",name:"className",required:!1,type:{name:"string"}},dataTestId:{defaultValue:{value:"hds-stepper"},description:"Data test id of stepper",name:"dataTestId",required:!1,type:{name:"string"}},headingClassName:{defaultValue:null,description:"A custom class name for step heading",name:"headingClassName",required:!1,type:{name:"string"}},language:{defaultValue:{value:"fi"},description:"The language of the stepper",name:"language",required:!1,type:{name:"string"}},onStepClick:{defaultValue:null,description:"A callback function for custom action on step click",name:"onStepClick",required:!1,type:{name:"(event: MouseEvent, stepIndex: number) => void"}},renderCustomStateAriaLabel:{defaultValue:null,description:"A function for rendering a custom aria-label for step's state",name:"renderCustomStateAriaLabel",required:!1,type:{name:"(stepIndex: number, state: StepState) => string"}},renderCustomStepCountLabel:{defaultValue:null,description:"A function for rendering a custom step count label",name:"renderCustomStepCountLabel",required:!1,type:{name:"(stepIndex: number, totalNumberOfSteps: number) => string"}},renderCustomStepHeading:{defaultValue:null,description:"A function for rendering a custom step heading",name:"renderCustomStepHeading",required:!1,type:{name:"(stepIndex: number, totalNumberOfSteps: number, label: string) => string"}},selectedStep:{defaultValue:null,description:'The index of the selected step. Used to set the aria-current="step" attribute to the active step',name:"selectedStep",required:!1,type:{name:"number"}},small:{defaultValue:{value:"false"},description:"Boolean indicating small variant usage",name:"small",required:!1,type:{name:"boolean"}},stepHeading:{defaultValue:null,description:"A boolean indicating step heading variant usage",name:"stepHeading",required:!1,type:{name:"boolean"}},stepHeadingAriaLevel:{defaultValue:{value:"2"},description:"Step heading aria level",name:"stepHeadingAriaLevel",required:!1,type:{name:"number"}},steps:{defaultValue:null,description:"The steps of the stepper",name:"steps",required:!0,type:{name:"Steps"}},theme:{defaultValue:null,description:"Custom theme",name:"theme",required:!1,type:{name:"StepperCustomTheme"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.tsx#Stepper"]={docgenInfo:Stepper.__docgenInfo,name:"Stepper",path:"src/components/stepper/Stepper.tsx#Stepper"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/button/Button.tsx"),IconArrowLeft=__webpack_require__("./src/icons/IconArrowLeft.tsx"),IconArrowRight=__webpack_require__("./src/icons/IconArrowRight.tsx"),TextInput=__webpack_require__("./src/components/textInput/TextInput.tsx"),NumberInput=__webpack_require__("./src/components/numberInput/NumberInput.tsx"),Card=__webpack_require__("./src/components/card/Card.tsx"),ErrorSummary=__webpack_require__("./src/components/errorSummary/ErrorSummary.tsx"),FileInput=__webpack_require__("./src/components/fileInput/FileInput.tsx");const Stepper_stories={component:Stepper,title:"Components/Stepper",decorators:[function(storyFn){return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"700px"},children:storyFn()})}],parameters:{storySource:{source:"import React, { useReducer, useRef } from 'react';\n\nimport { Stepper } from './Stepper';\nimport styles from './Stepper.module.scss';\nimport { Step, StepState } from './Step';\nimport { Button } from '../button';\nimport { IconArrowLeft, IconArrowRight } from '../../icons';\nimport { TextInput } from '../textInput';\nimport { NumberInput } from '../numberInput';\nimport { Card } from '../card';\nimport { ErrorSummary } from '../errorSummary';\nimport { FileInput } from '../fileInput/FileInput';\n\nexport default {\n component: Stepper,\n title: 'Components/Stepper',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { expanded: true },\n backgrounds: {\n default: 'white',\n values: [\n {\n name: 'white',\n value: 'white',\n },\n {\n name: 'gray',\n value: '#e5e5e5',\n },\n ],\n },\n },\n args: {},\n};\n\nconst commonReducer = (stepsTotal) => (state, action) => {\n switch (action.type) {\n case 'completeStep': {\n const activeStepIndex = action.payload === stepsTotal - 1 ? stepsTotal - 1 : action.payload + 1;\n return {\n activeStepIndex,\n steps: state.steps.map((step, index) => {\n if (index === action.payload && index !== stepsTotal - 1) {\n // current one but not last one\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n if (index === action.payload + 1) {\n // next one\n return {\n state: StepState.available,\n label: step.label,\n };\n }\n return step;\n }),\n };\n }\n case 'setActive': {\n return {\n activeStepIndex: action.payload,\n steps: state.steps.map((step, index) => {\n if (index === action.payload) {\n return {\n state: StepState.available,\n label: step.label,\n };\n }\n return step;\n }),\n };\n }\n default:\n throw new Error();\n }\n};\n\n// args is required for docs tab to show source code\n\nexport const Default = (args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4 - longer text',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n};\n\nDefault.parameters = {\n docs: {\n source: { type: 'dynamic' },\n },\n};\n\n// args is required for docs tab to show source code\n\nexport const Small = (args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4 - longer text',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const WithStepHeading = (args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1 - longer text',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const Overflow = (args) => {\n const reducer = commonReducer(12);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n state: StepState.available,\n label: 'Step 1 - longer text',\n },\n {\n state: StepState.disabled,\n label: 'Step 2',\n },\n {\n state: StepState.disabled,\n label: 'Step 3',\n },\n {\n state: StepState.disabled,\n label: 'Step 4',\n },\n {\n state: StepState.disabled,\n label: 'Step 5',\n },\n {\n state: StepState.disabled,\n label: 'Step 6',\n },\n {\n state: StepState.disabled,\n label: 'Step 7',\n },\n {\n state: StepState.disabled,\n label: 'Step 8',\n },\n {\n state: StepState.disabled,\n label: 'Step 9',\n },\n {\n state: StepState.disabled,\n label: 'Step 10',\n },\n {\n state: StepState.disabled,\n label: 'Step 11',\n },\n {\n state: StepState.disabled,\n label: 'Step 12',\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const WithCustomTheme = (args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1 - longer text',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n const theme = {\n '--hds-stepper-color': 'var(--color-black-90)',\n '--hds-step-content-color': 'var(--color-black-90)',\n '--hds-stepper-background-color': 'var(--color-black-10)',\n '--hds-step-background-color': 'var(--color-black-5)',\n '--hds-stepper-focus-border-color': 'var(--color-black-90)',\n '--hds-stepper-disabled-color': 'var(--color-black-30)',\n '--hds-not-selected-step-label-color': 'var(--color-black-90)',\n };\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n};\n\nWithCustomTheme.parameters = {\n backgrounds: { default: 'gray' },\n};\n\n// args is required for docs tab to show source code\n\nexport const SimpleFormExample = (args) => {\n const initialState = {\n showErrorSummary: false,\n activeStepIndex: 0,\n steps: [\n {\n state: StepState.available,\n label: 'First name',\n },\n {\n state: StepState.disabled,\n label: 'Last name',\n },\n {\n state: StepState.disabled,\n label: 'Age',\n },\n {\n state: StepState.disabled,\n label: 'Files',\n },\n {\n state: StepState.disabled,\n label: 'Review and send',\n },\n ],\n fields: {\n firstName: {\n value: '',\n visited: false,\n },\n lastName: {\n value: '',\n visited: false,\n },\n age: {\n value: undefined,\n visited: false,\n },\n files: {\n value: null,\n visited: false,\n },\n },\n };\n const lastStep = initialState.steps.length - 1;\n\n const activeStepIsValid = (state) => {\n if (state.activeStepIndex === 0) {\n // first name\n return state.fields.firstName.value && state.fields.firstName.value.length > 0;\n }\n if (state.activeStepIndex === 1) {\n // last name\n return state.fields.lastName.value && state.fields.lastName.value.length > 0;\n }\n\n if (state.activeStepIndex === 2) {\n // age\n return state.fields.age.value && state.fields.age.value.length > 0;\n }\n\n if (state.activeStepIndex === 3) {\n // files\n return state.fields.files.value && state.fields.files.value.length > 0;\n }\n\n return state.activeStepIndex === 4;\n };\n\n const weAreInLastAvailableStep = (state) => {\n let indexOfLastNonDisabledStep = 0;\n state.steps.forEach((step, index) => {\n if (step.state !== StepState.disabled && index > indexOfLastNonDisabledStep) {\n indexOfLastNonDisabledStep = index;\n }\n });\n\n return state.activeStepIndex === indexOfLastNonDisabledStep;\n };\n\n const reducer = (state, action) => {\n switch (action.type) {\n case 'changeField': {\n if (action.newValue.length === 0) {\n return {\n showErrorSummary: state.showErrorSummary,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps,\n fields: {\n ...state.fields,\n [action.fieldName]: {\n value: action.newValue,\n visited: true,\n },\n },\n };\n }\n\n return {\n showErrorSummary: false,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps.map((step, index) => {\n if (index === state.activeStepIndex) {\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n return step;\n }),\n fields: {\n ...state.fields,\n [action.fieldName]: {\n value: action.newValue,\n visited: true,\n },\n },\n };\n }\n case 'completeStep': {\n if (!activeStepIsValid(state)) {\n return {\n showErrorSummary: true,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps,\n fields: {\n ...state.fields,\n },\n };\n }\n const activeStepIndex = action.payload === lastStep ? lastStep : action.payload + 1;\n return {\n showErrorSummary: state.showErrorSummary,\n activeStepIndex,\n steps: state.steps.map((step, index) => {\n if (index === action.payload && index !== lastStep) {\n // current one but not last one\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n if (index === action.payload + 1) {\n // next one\n return {\n state: StepState.available,\n label: step.label,\n };\n }\n return step;\n }),\n fields: {\n ...state.fields,\n },\n };\n }\n case 'setActive': {\n if (!activeStepIsValid(state) && !weAreInLastAvailableStep(state)) {\n return {\n showErrorSummary: true,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps,\n fields: {\n ...state.fields,\n },\n };\n }\n\n return {\n showErrorSummary: false,\n activeStepIndex: action.payload,\n steps: state.steps.map((step, index) => {\n if (index === action.payload) {\n return {\n state: StepState.available,\n label: step.label,\n };\n }\n if (index === state.activeStepIndex && activeStepIsValid(state)) {\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n return step;\n }),\n fields: {\n ...state.fields,\n },\n };\n }\n default:\n throw new Error();\n }\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const isLastStep = state.activeStepIndex === state.steps.length - 1;\n const errorRef = useRef(null);\n\n return (\n
\n

Simple form example

\n {\n if (state.showErrorSummary && stepIndex !== state.activeStepIndex) {\n // focus to error summary label\n errorRef.current.children[0].children[0].focus();\n }\n dispatch({ type: 'setActive', payload: stepIndex });\n }}\n />\n {state.showErrorSummary && (\n
\n \n \n \n
\n )}\n {[0, 1, 2, 3].includes(state.activeStepIndex) && (\n
\n {state.activeStepIndex === 0 && (\n \n dispatch({ type: 'changeField', fieldName: 'firstName', newValue: event.target.value })\n }\n />\n )}\n {state.activeStepIndex === 1 && (\n \n dispatch({ type: 'changeField', fieldName: 'lastName', newValue: event.target.value })\n }\n />\n )}\n {state.activeStepIndex === 2 && (\n dispatch({ type: 'changeField', fieldName: 'age', newValue: event.target.value })}\n />\n )}\n {state.activeStepIndex === 3 && (\n dispatch({ type: 'changeField', fieldName: 'files', newValue: event })}\n />\n )}\n
\n )}\n {state.activeStepIndex === 4 && (\n
\n \n

First name: {state.fields.firstName.value}

\n

Last name: {state.fields.lastName.value}

\n

Age: {state.fields.age.value}

\n

Files: {state.fields.files.value.map((file) => file.name).join(', ')}

\n
\n
\n )}\n\n \n {\n if (state.showErrorSummary) {\n // focus to error summary label\n errorRef.current.children[0].children[0].focus();\n }\n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 });\n }}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n {\n if (state.showErrorSummary) {\n // focus to error summary label\n errorRef.current.children[0].children[0].focus();\n }\n dispatch({ type: 'completeStep', payload: state.activeStepIndex });\n }}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={isLastStep ? undefined : }\n >\n {isLastStep ? 'Send' : 'Next'}\n \n
\n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const States = (args) => {\n return (\n
\n \n \n \n \n \n \n \n \n \n
\n

Small variant:

\n \n
\n
\n
\n );\n};\n\nexport const Playground = (args) => {\n const reducer = commonReducer(5);\n\n const [state, dispatch] = useReducer(reducer, {\n activeStepIndex: args.activeStepIndex,\n steps: [\n {\n label: 'Step 1',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n });\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n const theme = {\n '--hds-stepper-color': args.stepperColor,\n '--hds-step-content-color': args.stepperContentColor,\n '--hds-stepper-background-color': args.stepperBackgroundColor,\n '--hds-stepper-focus-border-color': args.stepperFocusBorderColor,\n '--hds-stepper-disabled-color': args.stepperDisabledColor,\n '--hds-step-background-color': args.stepBackgroundColor,\n '--hds-not-selected-step-label-color': args.notSelectedStepLabelColor,\n };\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n};\n\nPlayground.parameters = {\n loki: { skip: true },\n};\n\nPlayground.args = {\n stepperColor: '#0000bf',\n stepperContentColor: '#0000bf',\n stepperBackgroundColor: '#ffffff',\n stepperFocusBorderColor: '#0072c6',\n stepperDisabledColor: '#cccccc',\n stepBackgroundColor: '#ffffff',\n notSelectedStepLabelColor: '#0000bf',\n small: false,\n stepHeading: false,\n activeStepIndex: 0,\n};\n\nPlayground.argTypes = {\n stepperColor: { control: { type: 'color' } },\n stepperContentColor: { control: { type: 'color' } },\n stepperBackgroundColor: { control: { type: 'color' } },\n stepperFocusBorderColor: { control: { type: 'color' } },\n stepperDisabledColor: { control: { type: 'color' } },\n stepBackgroundColor: { control: { type: 'color' } },\n notSelectedStepLabelColor: { control: { type: 'color' } },\n activeStepIndex: { control: { type: 'number', min: 0, max: 4, step: 1 } },\n};\n",locationsMap:{default:{startLoc:{col:23,line:83},endLoc:{col:1,line:155},startBody:{col:23,line:83},endBody:{col:1,line:155}},small:{startLoc:{col:21,line:165},endLoc:{col:1,line:237},startBody:{col:21,line:165},endBody:{col:1,line:237}},"with-step-heading":{startLoc:{col:31,line:241},endLoc:{col:1,line:315},startBody:{col:31,line:241},endBody:{col:1,line:315}},overflow:{startLoc:{col:24,line:319},endLoc:{col:1,line:418},startBody:{col:24,line:319},endBody:{col:1,line:418}},"with-custom-theme":{startLoc:{col:31,line:422},endLoc:{col:1,line:506},startBody:{col:31,line:422},endBody:{col:1,line:506}},"simple-form-example":{startLoc:{col:33,line:514},endLoc:{col:1,line:891},startBody:{col:33,line:514},endBody:{col:1,line:891}},states:{startLoc:{col:22,line:895},endLoc:{col:1,line:938},startBody:{col:22,line:895},endBody:{col:1,line:938}},playground:{startLoc:{col:26,line:940},endLoc:{col:1,line:1024},startBody:{col:26,line:940},endBody:{col:1,line:1024}}}},controls:{expanded:!0},backgrounds:{default:"white",values:[{name:"white",value:"white"},{name:"gray",value:"#e5e5e5"}]}},args:{}};var commonReducer=function commonReducer(stepsTotal){return function(state,action){switch(action.type){case"completeStep":return{activeStepIndex:action.payload===stepsTotal-1?stepsTotal-1:action.payload+1,steps:state.steps.map((function(step,index){return index===action.payload&&index!==stepsTotal-1?{state:StepState.completed,label:step.label}:index===action.payload+1?{state:StepState.available,label:step.label}:step}))};case"setActive":return{activeStepIndex:action.payload,steps:state.steps.map((function(step,index){return index===action.payload?{state:StepState.available,label:step.label}:step}))};default:throw new Error}}},Default=function Default(args){var reducer=commonReducer(5),initialState={activeStepIndex:0,steps:[{label:"Step 1",state:StepState.available},{label:"Step 2",state:StepState.disabled},{label:"Step 3",state:StepState.disabled},{label:"Step 4 - longer text",state:StepState.disabled},{label:"Step 5",state:StepState.disabled}]},_useReducer=(0,react.useReducer)(reducer,initialState),_useReducer2=(0,slicedToArray.Z)(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1],lastStep=state.activeStepIndex===state.steps.length-1;return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(Stepper,{className:"stepper-margin",steps:state.steps,language:"en",selectedStep:state.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){return dispatch({type:"setActive",payload:stepIndex})}}),(0,jsx_runtime.jsxs)("div",{style:{height:"300px",display:"flex",justifyContent:"flex-start",alignItems:"flex-end",gap:"24px"},children:[(0,jsx_runtime.jsx)(Button.z,{disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){return dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{variant:lastStep?"primary":"secondary",onClick:function onClick(){return dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:lastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:lastStep?"Send":"Next"})]})]})};Default.parameters={docs:{source:{type:"dynamic"}}};var Small=function Small(args){var reducer=commonReducer(5),initialState={activeStepIndex:0,steps:[{label:"Step 1",state:StepState.available},{label:"Step 2",state:StepState.disabled},{label:"Step 3",state:StepState.disabled},{label:"Step 4 - longer text",state:StepState.disabled},{label:"Step 5",state:StepState.disabled}]},_useReducer3=(0,react.useReducer)(reducer,initialState),_useReducer4=(0,slicedToArray.Z)(_useReducer3,2),state=_useReducer4[0],dispatch=_useReducer4[1],lastStep=state.activeStepIndex===state.steps.length-1;return(0,jsx_runtime.jsxs)("div",{className:"stepper-small",children:[(0,jsx_runtime.jsx)(Stepper,{steps:state.steps,language:"en",small:!0,selectedStep:state.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){return dispatch({type:"setActive",payload:stepIndex})}}),(0,jsx_runtime.jsxs)("div",{style:{height:"300px",display:"flex",justifyContent:"flex-start",alignItems:"flex-end",gap:"24px"},children:[(0,jsx_runtime.jsx)(Button.z,{disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){return dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{variant:lastStep?"primary":"secondary",onClick:function onClick(){return dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:lastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:lastStep?"Send":"Next"})]})]})},WithStepHeading=function WithStepHeading(args){var reducer=commonReducer(5),initialState={activeStepIndex:0,steps:[{label:"Step 1 - longer text",state:StepState.available},{label:"Step 2",state:StepState.disabled},{label:"Step 3",state:StepState.disabled},{label:"Step 4",state:StepState.disabled},{label:"Step 5",state:StepState.disabled}]},_useReducer5=(0,react.useReducer)(reducer,initialState),_useReducer6=(0,slicedToArray.Z)(_useReducer5,2),state=_useReducer6[0],dispatch=_useReducer6[1],lastStep=state.activeStepIndex===state.steps.length-1;return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(Stepper,{headingClassName:"stepper-heading",steps:state.steps,language:"en",stepHeading:!0,selectedStep:state.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){return dispatch({type:"setActive",payload:stepIndex})}}),(0,jsx_runtime.jsxs)("div",{style:{height:"300px",display:"flex",justifyContent:"flex-start",alignItems:"flex-end",gap:"24px",marginLeft:"10px"},children:[(0,jsx_runtime.jsx)(Button.z,{disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){return dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{variant:lastStep?"primary":"secondary",onClick:function onClick(){return dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:lastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:lastStep?"Send":"Next"})]})]})},Overflow=function Overflow(args){var reducer=commonReducer(12),initialState={activeStepIndex:0,steps:[{state:StepState.available,label:"Step 1 - longer text"},{state:StepState.disabled,label:"Step 2"},{state:StepState.disabled,label:"Step 3"},{state:StepState.disabled,label:"Step 4"},{state:StepState.disabled,label:"Step 5"},{state:StepState.disabled,label:"Step 6"},{state:StepState.disabled,label:"Step 7"},{state:StepState.disabled,label:"Step 8"},{state:StepState.disabled,label:"Step 9"},{state:StepState.disabled,label:"Step 10"},{state:StepState.disabled,label:"Step 11"},{state:StepState.disabled,label:"Step 12"}]},_useReducer7=(0,react.useReducer)(reducer,initialState),_useReducer8=(0,slicedToArray.Z)(_useReducer7,2),state=_useReducer8[0],dispatch=_useReducer8[1],lastStep=state.activeStepIndex===state.steps.length-1;return(0,jsx_runtime.jsxs)("div",{style:{maxWidth:"400px"},children:[(0,jsx_runtime.jsx)(Stepper,{steps:state.steps,language:"en",selectedStep:state.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){return dispatch({type:"setActive",payload:stepIndex})}}),(0,jsx_runtime.jsxs)("div",{style:{height:"300px",display:"flex",justifyContent:"flex-start",alignItems:"flex-end",gap:"24px",marginLeft:"10px"},children:[(0,jsx_runtime.jsx)(Button.z,{disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){return dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{variant:lastStep?"primary":"secondary",onClick:function onClick(){return dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:lastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:lastStep?"Send":"Next"})]})]})},WithCustomTheme=function WithCustomTheme(args){var reducer=commonReducer(5),initialState={activeStepIndex:0,steps:[{label:"Step 1 - longer text",state:StepState.available},{label:"Step 2",state:StepState.disabled},{label:"Step 3",state:StepState.disabled},{label:"Step 4",state:StepState.disabled},{label:"Step 5",state:StepState.disabled}]},_useReducer9=(0,react.useReducer)(reducer,initialState),_useReducer10=(0,slicedToArray.Z)(_useReducer9,2),state=_useReducer10[0],dispatch=_useReducer10[1],lastStep=state.activeStepIndex===state.steps.length-1;return(0,jsx_runtime.jsxs)("div",{style:{backgroundColor:"var(--color-black-10)"},children:[(0,jsx_runtime.jsx)(Stepper,{theme:{"--hds-stepper-color":"var(--color-black-90)","--hds-step-content-color":"var(--color-black-90)","--hds-stepper-background-color":"var(--color-black-10)","--hds-step-background-color":"var(--color-black-5)","--hds-stepper-focus-border-color":"var(--color-black-90)","--hds-stepper-disabled-color":"var(--color-black-30)","--hds-not-selected-step-label-color":"var(--color-black-90)"},steps:state.steps,language:"en",selectedStep:state.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){return dispatch({type:"setActive",payload:stepIndex})}}),(0,jsx_runtime.jsxs)("div",{style:{height:"300px",display:"flex",justifyContent:"flex-start",alignItems:"flex-end",gap:"24px",marginLeft:"10px"},children:[(0,jsx_runtime.jsx)(Button.z,{theme:"black",disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){return dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{theme:"black",variant:lastStep?"primary":"secondary",onClick:function onClick(){return dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:lastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:lastStep?"Send":"Next"})]})]})};WithCustomTheme.parameters={backgrounds:{default:"gray"}};var SimpleFormExample=function SimpleFormExample(args){var initialState={showErrorSummary:!1,activeStepIndex:0,steps:[{state:StepState.available,label:"First name"},{state:StepState.disabled,label:"Last name"},{state:StepState.disabled,label:"Age"},{state:StepState.disabled,label:"Files"},{state:StepState.disabled,label:"Review and send"}],fields:{firstName:{value:"",visited:!1},lastName:{value:"",visited:!1},age:{value:void 0,visited:!1},files:{value:null,visited:!1}}},lastStep=initialState.steps.length-1,activeStepIsValid=function activeStepIsValid(state){return 0===state.activeStepIndex?state.fields.firstName.value&&state.fields.firstName.value.length>0:1===state.activeStepIndex?state.fields.lastName.value&&state.fields.lastName.value.length>0:2===state.activeStepIndex?state.fields.age.value&&state.fields.age.value.length>0:3===state.activeStepIndex?state.fields.files.value&&state.fields.files.value.length>0:4===state.activeStepIndex},_useReducer11=(0,react.useReducer)((function reducer(state,action){switch(action.type){case"changeField":return 0===action.newValue.length?{showErrorSummary:state.showErrorSummary,activeStepIndex:state.activeStepIndex,steps:state.steps,fields:(0,objectSpread2.Z)((0,objectSpread2.Z)({},state.fields),{},(0,defineProperty.Z)({},action.fieldName,{value:action.newValue,visited:!0}))}:{showErrorSummary:!1,activeStepIndex:state.activeStepIndex,steps:state.steps.map((function(step,index){return index===state.activeStepIndex?{state:StepState.completed,label:step.label}:step})),fields:(0,objectSpread2.Z)((0,objectSpread2.Z)({},state.fields),{},(0,defineProperty.Z)({},action.fieldName,{value:action.newValue,visited:!0}))};case"completeStep":if(!activeStepIsValid(state))return{showErrorSummary:!0,activeStepIndex:state.activeStepIndex,steps:state.steps,fields:(0,objectSpread2.Z)({},state.fields)};var activeStepIndex=action.payload===lastStep?lastStep:action.payload+1;return{showErrorSummary:state.showErrorSummary,activeStepIndex,steps:state.steps.map((function(step,index){return index===action.payload&&index!==lastStep?{state:StepState.completed,label:step.label}:index===action.payload+1?{state:StepState.available,label:step.label}:step})),fields:(0,objectSpread2.Z)({},state.fields)};case"setActive":return activeStepIsValid(state)||function weAreInLastAvailableStep(state){var indexOfLastNonDisabledStep=0;return state.steps.forEach((function(step,index){step.state!==StepState.disabled&&index>indexOfLastNonDisabledStep&&(indexOfLastNonDisabledStep=index)})),state.activeStepIndex===indexOfLastNonDisabledStep}(state)?{showErrorSummary:!1,activeStepIndex:action.payload,steps:state.steps.map((function(step,index){return index===action.payload?{state:StepState.available,label:step.label}:index===state.activeStepIndex&&activeStepIsValid(state)?{state:StepState.completed,label:step.label}:step})),fields:(0,objectSpread2.Z)({},state.fields)}:{showErrorSummary:!0,activeStepIndex:state.activeStepIndex,steps:state.steps,fields:(0,objectSpread2.Z)({},state.fields)};default:throw new Error}}),initialState),_useReducer12=(0,slicedToArray.Z)(_useReducer11,2),state=_useReducer12[0],dispatch=_useReducer12[1],isLastStep=state.activeStepIndex===state.steps.length-1,errorRef=(0,react.useRef)(null);return(0,jsx_runtime.jsxs)("form",{children:[(0,jsx_runtime.jsx)("h1",{style:{marginTop:"0",fontSize:"52px",lineHeight:"62px"},children:"Simple form example"}),(0,jsx_runtime.jsx)(Stepper,{className:"stepper-form-validation",steps:state.steps,language:"en",stepHeading:!0,selectedStep:state.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){state.showErrorSummary&&stepIndex!==state.activeStepIndex&&errorRef.current.children[0].children[0].focus(),dispatch({type:"setActive",payload:stepIndex})}}),state.showErrorSummary&&(0,jsx_runtime.jsx)("div",{style:{marginTop:"var(--spacing-l)"},children:(0,jsx_runtime.jsx)(ErrorSummary.X,{ref:errorRef,autofocus:!0,label:"Form contains following errors",children:(0,jsx_runtime.jsxs)("ul",{children:[0===state.activeStepIndex&&(0,jsx_runtime.jsxs)("li",{children:["Error 1: ",(0,jsx_runtime.jsx)("a",{href:"#firstName",children:"Please enter your first name"})]}),1===state.activeStepIndex&&(0,jsx_runtime.jsxs)("li",{children:["Error 1: ",(0,jsx_runtime.jsx)("a",{href:"#lastName",children:"Please enter your last name"})]}),2===state.activeStepIndex&&(0,jsx_runtime.jsxs)("li",{children:["Error 1: ",(0,jsx_runtime.jsx)("a",{href:"#age",children:"Please enter your age"})]}),3===state.activeStepIndex&&(0,jsx_runtime.jsxs)("li",{children:["Error 1: ",(0,jsx_runtime.jsx)("a",{href:"#files",children:"Please enter a file or files"})]})]})})}),[0,1,2,3].includes(state.activeStepIndex)&&(0,jsx_runtime.jsxs)("div",{children:[0===state.activeStepIndex&&(0,jsx_runtime.jsx)(TextInput.o,{style:{width:"300px",paddingTop:"var(--spacing-l)"},required:!0,id:"firstName",label:"First name",invalid:0===state.fields.firstName.value.length&&!0===state.fields.firstName.visited,errorText:0===state.fields.firstName.value.length&&!0===state.fields.firstName.visited&&"Please enter your first name",value:state.fields.firstName.value,onChange:function onChange(event){return dispatch({type:"changeField",fieldName:"firstName",newValue:event.target.value})}}),1===state.activeStepIndex&&(0,jsx_runtime.jsx)(TextInput.o,{style:{width:"300px",paddingTop:"var(--spacing-l)"},required:!0,id:"lastName",label:"Last name",invalid:0===state.fields.lastName.value.length&&!0===state.fields.lastName.visited,errorText:0===state.fields.lastName.value.length&&!0===state.fields.lastName.visited&&"Please enter your last name",value:state.fields.lastName.value,onChange:function onChange(event){return dispatch({type:"changeField",fieldName:"lastName",newValue:event.target.value})}}),2===state.activeStepIndex&&(0,jsx_runtime.jsx)(NumberInput.Y,{style:{width:"300px",paddingTop:"var(--spacing-l)"},required:!0,id:"age",label:"Age",invalid:(!state.fields.age.value||0===state.fields.age.value.length)&&!0===state.fields.age.visited,errorText:(!state.fields.age.value||0===state.fields.age.value.length)&&!0===state.fields.age.visited&&"Please enter your age",value:state.fields.age.value,onChange:function onChange(event){return dispatch({type:"changeField",fieldName:"age",newValue:event.target.value})}}),3===state.activeStepIndex&&(0,jsx_runtime.jsx)(FileInput.S,{multiple:!0,label:"Select file(s)",accept:".png,.jpg",defaultValue:state.fields.files.value||null,language:"en",invalid:(!state.fields.files.value||0===state.fields.files.value.length)&&!0===state.fields.files.visited,errorText:(!state.fields.age.value||0===state.fields.age.value.length)&&!0===state.fields.age.visited&&"Please enter your age",onChange:function onChange(event){return dispatch({type:"changeField",fieldName:"files",newValue:event})}})]}),4===state.activeStepIndex&&(0,jsx_runtime.jsx)("div",{style:{marginTop:"var(--spacing-l)",marginBottom:"var(--spacing-2-xl)"},children:(0,jsx_runtime.jsxs)(Card.Z,{className:"stepper-card",border:!0,heading:"Review your basic information",headingAriaLevel:3,children:[(0,jsx_runtime.jsxs)("p",{style:{margin:0},children:["First name: ",state.fields.firstName.value]}),(0,jsx_runtime.jsxs)("p",{style:{margin:0},children:["Last name: ",state.fields.lastName.value]}),(0,jsx_runtime.jsxs)("p",{style:{margin:0},children:["Age: ",state.fields.age.value]}),(0,jsx_runtime.jsxs)("p",{style:{margin:0},children:["Files: ",state.fields.files.value.map((function(file){return file.name})).join(", ")]})]})}),(0,jsx_runtime.jsxs)("div",{style:{height:"140px",display:"flex",justifyContent:"flex-start",alignItems:"flex-start",gap:"24px",marginTop:"var(--spacing-xl"},children:[(0,jsx_runtime.jsx)(Button.z,{disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){state.showErrorSummary&&errorRef.current.children[0].children[0].focus(),dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{variant:isLastStep?"primary":"secondary",onClick:function onClick(){state.showErrorSummary&&errorRef.current.children[0].children[0].focus(),dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:isLastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:isLastStep?"Send":"Next"})]})]})},States=function States(args){return(0,jsx_runtime.jsx)("div",{className:Stepper_module_stepperContainer,children:(0,jsx_runtime.jsxs)("div",{className:Stepper_module_stepper,style:{display:"grid",columnGap:"10px !important",gap:"32px",justifyItems:"center",gridTemplateColumns:"1fr 1fr 1fr 1fr"},children:[(0,jsx_runtime.jsx)(Step,{label:"Available",language:"en",index:0,stepsTotal:9,state:StepState.available}),(0,jsx_runtime.jsx)(Step,{label:"Selected",language:"en",index:1,stepsTotal:9,selected:!0,state:StepState.available}),(0,jsx_runtime.jsx)(Step,{label:"Completed",language:"en",index:2,stepsTotal:9,state:StepState.completed}),(0,jsx_runtime.jsx)(Step,{label:"Disabled",language:"en",index:3,stepsTotal:9,state:StepState.disabled}),(0,jsx_runtime.jsx)(Step,{label:"Needs attention",language:"en",index:4,stepsTotal:9,state:StepState.attention}),(0,jsx_runtime.jsx)(Step,{label:"Attention + selected",language:"en",selected:!0,index:5,stepsTotal:9,state:StepState.attention}),(0,jsx_runtime.jsx)(Step,{label:"Paused",language:"en",index:6,stepsTotal:9,state:StepState.paused}),(0,jsx_runtime.jsx)(Step,{label:"Paused + selected",language:"en",selected:!0,index:7,stepsTotal:9,state:StepState.paused}),(0,jsx_runtime.jsxs)("div",{className:Stepper_module_step,children:[(0,jsx_runtime.jsx)("p",{style:{fontSize:"var(--fontsize-body-m)",lineHeight:"var(--lineheight-l)"},children:"Small variant:"}),(0,jsx_runtime.jsx)(Step,{label:"Available",language:"en",index:8,stepsTotal:9,small:!0,state:StepState.available,style:{justifySelf:"center"}})]})]})})},Playground=function Playground(args){var reducer=commonReducer(5),_useReducer13=(0,react.useReducer)(reducer,{activeStepIndex:args.activeStepIndex,steps:[{label:"Step 1",state:StepState.available},{label:"Step 2",state:StepState.disabled},{label:"Step 3",state:StepState.disabled},{label:"Step 4",state:StepState.disabled},{label:"Step 5",state:StepState.disabled}]}),_useReducer14=(0,slicedToArray.Z)(_useReducer13,2),state=_useReducer14[0],dispatch=_useReducer14[1],lastStep=state.activeStepIndex===state.steps.length-1,theme={"--hds-stepper-color":args.stepperColor,"--hds-step-content-color":args.stepperContentColor,"--hds-stepper-background-color":args.stepperBackgroundColor,"--hds-stepper-focus-border-color":args.stepperFocusBorderColor,"--hds-stepper-disabled-color":args.stepperDisabledColor,"--hds-step-background-color":args.stepBackgroundColor,"--hds-not-selected-step-label-color":args.notSelectedStepLabelColor};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(Stepper,{theme,small:args.small,stepHeading:args.stepHeading,steps:state.steps,language:"en",selectedStep:args.activeStepIndex,onStepClick:function onStepClick(event,stepIndex){return dispatch({type:"setActive",payload:stepIndex})}}),(0,jsx_runtime.jsxs)("div",{style:{height:"300px",display:"flex",justifyContent:"flex-start",alignItems:"flex-end",gap:"24px",marginLeft:"10px"},children:[(0,jsx_runtime.jsx)(Button.z,{theme:"black",disabled:0===state.activeStepIndex,variant:"secondary",onClick:function onClick(){return dispatch({type:"setActive",payload:state.activeStepIndex-1})},style:{height:"fit-content",width:"fit-content"},iconLeft:(0,jsx_runtime.jsx)(IconArrowLeft.IconArrowLeft,{}),children:"Previous"}),(0,jsx_runtime.jsx)(Button.z,{theme:"black",variant:lastStep?"primary":"secondary",onClick:function onClick(){return dispatch({type:"completeStep",payload:state.activeStepIndex})},style:{height:"fit-content",width:"fit-content"},iconRight:lastStep?void 0:(0,jsx_runtime.jsx)(IconArrowRight.IconArrowRight,{}),children:lastStep?"Send":"Next"})]})]})};Playground.parameters={loki:{skip:!0}},Playground.args={stepperColor:"#0000bf",stepperContentColor:"#0000bf",stepperBackgroundColor:"#ffffff",stepperFocusBorderColor:"#0072c6",stepperDisabledColor:"#cccccc",stepBackgroundColor:"#ffffff",notSelectedStepLabelColor:"#0000bf",small:!1,stepHeading:!1,activeStepIndex:0},Playground.argTypes={stepperColor:{control:{type:"color"}},stepperContentColor:{control:{type:"color"}},stepperBackgroundColor:{control:{type:"color"}},stepperFocusBorderColor:{control:{type:"color"}},stepperDisabledColor:{control:{type:"color"}},stepBackgroundColor:{control:{type:"color"}},notSelectedStepLabelColor:{control:{type:"color"}},activeStepIndex:{control:{type:"number",min:0,max:4,step:1}}},Default.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4 - longer text',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n}"}},Default.parameters),Small.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4 - longer text',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n}"}},Small.parameters),WithStepHeading.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1 - longer text',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n}"}},WithStepHeading.parameters),Overflow.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const reducer = commonReducer(12);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n state: StepState.available,\n label: 'Step 1 - longer text',\n },\n {\n state: StepState.disabled,\n label: 'Step 2',\n },\n {\n state: StepState.disabled,\n label: 'Step 3',\n },\n {\n state: StepState.disabled,\n label: 'Step 4',\n },\n {\n state: StepState.disabled,\n label: 'Step 5',\n },\n {\n state: StepState.disabled,\n label: 'Step 6',\n },\n {\n state: StepState.disabled,\n label: 'Step 7',\n },\n {\n state: StepState.disabled,\n label: 'Step 8',\n },\n {\n state: StepState.disabled,\n label: 'Step 9',\n },\n {\n state: StepState.disabled,\n label: 'Step 10',\n },\n {\n state: StepState.disabled,\n label: 'Step 11',\n },\n {\n state: StepState.disabled,\n label: 'Step 12',\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n}"}},Overflow.parameters),WithCustomTheme.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const reducer = commonReducer(5);\n\n const initialState = {\n activeStepIndex: 0,\n steps: [\n {\n label: 'Step 1 - longer text',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n const theme = {\n '--hds-stepper-color': 'var(--color-black-90)',\n '--hds-step-content-color': 'var(--color-black-90)',\n '--hds-stepper-background-color': 'var(--color-black-10)',\n '--hds-step-background-color': 'var(--color-black-5)',\n '--hds-stepper-focus-border-color': 'var(--color-black-90)',\n '--hds-stepper-disabled-color': 'var(--color-black-30)',\n '--hds-not-selected-step-label-color': 'var(--color-black-90)',\n };\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n
\n );\n}"}},WithCustomTheme.parameters),SimpleFormExample.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const initialState = {\n showErrorSummary: false,\n activeStepIndex: 0,\n steps: [\n {\n state: StepState.available,\n label: 'First name',\n },\n {\n state: StepState.disabled,\n label: 'Last name',\n },\n {\n state: StepState.disabled,\n label: 'Age',\n },\n {\n state: StepState.disabled,\n label: 'Files',\n },\n {\n state: StepState.disabled,\n label: 'Review and send',\n },\n ],\n fields: {\n firstName: {\n value: '',\n visited: false,\n },\n lastName: {\n value: '',\n visited: false,\n },\n age: {\n value: undefined,\n visited: false,\n },\n files: {\n value: null,\n visited: false,\n },\n },\n };\n const lastStep = initialState.steps.length - 1;\n\n const activeStepIsValid = (state) => {\n if (state.activeStepIndex === 0) {\n // first name\n return state.fields.firstName.value && state.fields.firstName.value.length > 0;\n }\n if (state.activeStepIndex === 1) {\n // last name\n return state.fields.lastName.value && state.fields.lastName.value.length > 0;\n }\n\n if (state.activeStepIndex === 2) {\n // age\n return state.fields.age.value && state.fields.age.value.length > 0;\n }\n\n if (state.activeStepIndex === 3) {\n // files\n return state.fields.files.value && state.fields.files.value.length > 0;\n }\n\n return state.activeStepIndex === 4;\n };\n\n const weAreInLastAvailableStep = (state) => {\n let indexOfLastNonDisabledStep = 0;\n state.steps.forEach((step, index) => {\n if (step.state !== StepState.disabled && index > indexOfLastNonDisabledStep) {\n indexOfLastNonDisabledStep = index;\n }\n });\n\n return state.activeStepIndex === indexOfLastNonDisabledStep;\n };\n\n const reducer = (state, action) => {\n switch (action.type) {\n case 'changeField': {\n if (action.newValue.length === 0) {\n return {\n showErrorSummary: state.showErrorSummary,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps,\n fields: {\n ...state.fields,\n [action.fieldName]: {\n value: action.newValue,\n visited: true,\n },\n },\n };\n }\n\n return {\n showErrorSummary: false,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps.map((step, index) => {\n if (index === state.activeStepIndex) {\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n return step;\n }),\n fields: {\n ...state.fields,\n [action.fieldName]: {\n value: action.newValue,\n visited: true,\n },\n },\n };\n }\n case 'completeStep': {\n if (!activeStepIsValid(state)) {\n return {\n showErrorSummary: true,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps,\n fields: {\n ...state.fields,\n },\n };\n }\n const activeStepIndex = action.payload === lastStep ? lastStep : action.payload + 1;\n return {\n showErrorSummary: state.showErrorSummary,\n activeStepIndex,\n steps: state.steps.map((step, index) => {\n if (index === action.payload && index !== lastStep) {\n // current one but not last one\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n if (index === action.payload + 1) {\n // next one\n return {\n state: StepState.available,\n label: step.label,\n };\n }\n return step;\n }),\n fields: {\n ...state.fields,\n },\n };\n }\n case 'setActive': {\n if (!activeStepIsValid(state) && !weAreInLastAvailableStep(state)) {\n return {\n showErrorSummary: true,\n activeStepIndex: state.activeStepIndex,\n steps: state.steps,\n fields: {\n ...state.fields,\n },\n };\n }\n\n return {\n showErrorSummary: false,\n activeStepIndex: action.payload,\n steps: state.steps.map((step, index) => {\n if (index === action.payload) {\n return {\n state: StepState.available,\n label: step.label,\n };\n }\n if (index === state.activeStepIndex && activeStepIsValid(state)) {\n return {\n state: StepState.completed,\n label: step.label,\n };\n }\n return step;\n }),\n fields: {\n ...state.fields,\n },\n };\n }\n default:\n throw new Error();\n }\n };\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const isLastStep = state.activeStepIndex === state.steps.length - 1;\n const errorRef = useRef(null);\n\n return (\n
\n

Simple form example

\n {\n if (state.showErrorSummary && stepIndex !== state.activeStepIndex) {\n // focus to error summary label\n errorRef.current.children[0].children[0].focus();\n }\n dispatch({ type: 'setActive', payload: stepIndex });\n }}\n />\n {state.showErrorSummary && (\n
\n \n \n \n
\n )}\n {[0, 1, 2, 3].includes(state.activeStepIndex) && (\n
\n {state.activeStepIndex === 0 && (\n \n dispatch({ type: 'changeField', fieldName: 'firstName', newValue: event.target.value })\n }\n />\n )}\n {state.activeStepIndex === 1 && (\n \n dispatch({ type: 'changeField', fieldName: 'lastName', newValue: event.target.value })\n }\n />\n )}\n {state.activeStepIndex === 2 && (\n dispatch({ type: 'changeField', fieldName: 'age', newValue: event.target.value })}\n />\n )}\n {state.activeStepIndex === 3 && (\n dispatch({ type: 'changeField', fieldName: 'files', newValue: event })}\n />\n )}\n
\n )}\n {state.activeStepIndex === 4 && (\n
\n \n

First name: {state.fields.firstName.value}

\n

Last name: {state.fields.lastName.value}

\n

Age: {state.fields.age.value}

\n

Files: {state.fields.files.value.map((file) => file.name).join(', ')}

\n
\n
\n )}\n\n \n {\n if (state.showErrorSummary) {\n // focus to error summary label\n errorRef.current.children[0].children[0].focus();\n }\n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 });\n }}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n {\n if (state.showErrorSummary) {\n // focus to error summary label\n errorRef.current.children[0].children[0].focus();\n }\n dispatch({ type: 'completeStep', payload: state.activeStepIndex });\n }}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={isLastStep ? undefined : }\n >\n {isLastStep ? 'Send' : 'Next'}\n \n
\n \n );\n}"}},SimpleFormExample.parameters),States.parameters=(0,objectSpread2.Z)({storySource:{source:'(args) => {\n return (\n
\n \n \n \n \n \n \n \n \n \n
\n

Small variant:

\n \n
\n
\n \n );\n}'}},States.parameters),Playground.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const reducer = commonReducer(5);\n\n const [state, dispatch] = useReducer(reducer, {\n activeStepIndex: args.activeStepIndex,\n steps: [\n {\n label: 'Step 1',\n state: StepState.available,\n },\n {\n label: 'Step 2',\n state: StepState.disabled,\n },\n {\n label: 'Step 3',\n state: StepState.disabled,\n },\n {\n label: 'Step 4',\n state: StepState.disabled,\n },\n {\n label: 'Step 5',\n state: StepState.disabled,\n },\n ],\n });\n\n const lastStep = state.activeStepIndex === state.steps.length - 1;\n\n const theme = {\n '--hds-stepper-color': args.stepperColor,\n '--hds-step-content-color': args.stepperContentColor,\n '--hds-stepper-background-color': args.stepperBackgroundColor,\n '--hds-stepper-focus-border-color': args.stepperFocusBorderColor,\n '--hds-stepper-disabled-color': args.stepperDisabledColor,\n '--hds-step-background-color': args.stepBackgroundColor,\n '--hds-not-selected-step-label-color': args.notSelectedStepLabelColor,\n };\n\n return (\n
\n dispatch({ type: 'setActive', payload: stepIndex })}\n />\n \n dispatch({ type: 'setActive', payload: state.activeStepIndex - 1 })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconLeft={}\n >\n Previous\n \n dispatch({ type: 'completeStep', payload: state.activeStepIndex })}\n style={{ height: 'fit-content', width: 'fit-content' }}\n iconRight={lastStep ? undefined : }\n >\n {lastStep ? 'Send' : 'Next'}\n \n
\n \n );\n}"}},Playground.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/stepper/Stepper.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Small.displayName="Small",Small.__docgenInfo={description:"",displayName:"Small",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#Small"]={docgenInfo:Small.__docgenInfo,name:"Small",path:"src/components/stepper/Stepper.stories.tsx#Small"})}catch(__react_docgen_typescript_loader_error){}try{WithStepHeading.displayName="WithStepHeading",WithStepHeading.__docgenInfo={description:"",displayName:"WithStepHeading",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#WithStepHeading"]={docgenInfo:WithStepHeading.__docgenInfo,name:"WithStepHeading",path:"src/components/stepper/Stepper.stories.tsx#WithStepHeading"})}catch(__react_docgen_typescript_loader_error){}try{Overflow.displayName="Overflow",Overflow.__docgenInfo={description:"",displayName:"Overflow",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#Overflow"]={docgenInfo:Overflow.__docgenInfo,name:"Overflow",path:"src/components/stepper/Stepper.stories.tsx#Overflow"})}catch(__react_docgen_typescript_loader_error){}try{WithCustomTheme.displayName="WithCustomTheme",WithCustomTheme.__docgenInfo={description:"",displayName:"WithCustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#WithCustomTheme"]={docgenInfo:WithCustomTheme.__docgenInfo,name:"WithCustomTheme",path:"src/components/stepper/Stepper.stories.tsx#WithCustomTheme"})}catch(__react_docgen_typescript_loader_error){}try{SimpleFormExample.displayName="SimpleFormExample",SimpleFormExample.__docgenInfo={description:"",displayName:"SimpleFormExample",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#SimpleFormExample"]={docgenInfo:SimpleFormExample.__docgenInfo,name:"SimpleFormExample",path:"src/components/stepper/Stepper.stories.tsx#SimpleFormExample"})}catch(__react_docgen_typescript_loader_error){}try{States.displayName="States",States.__docgenInfo={description:"",displayName:"States",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#States"]={docgenInfo:States.__docgenInfo,name:"States",path:"src/components/stepper/Stepper.stories.tsx#States"})}catch(__react_docgen_typescript_loader_error){}try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/stepper/Stepper.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/stepper/Stepper.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/table/Table.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CheckboxSelection:()=>CheckboxSelection,CheckboxSelectionDense:()=>CheckboxSelectionDense,CheckboxSelectionWithSorting:()=>CheckboxSelectionWithSorting,CustomBackgroundColorsForDarkVariant:()=>CustomBackgroundColorsForDarkVariant,CustomBackgroundColorsForLightVariant:()=>CustomBackgroundColorsForLightVariant,CustomSortFunction:()=>CustomSortFunction,Default:()=>Default,Dense:()=>Dense,InitiallySelectedRows:()=>InitiallySelectedRows,InitiallySortedBy:()=>InitiallySortedBy,Light:()=>Light,Sorting:()=>Sorting,SortingLightVariant:()=>SortingLightVariant,SortingSideEffects:()=>SortingSideEffects,VerticalHeaders:()=>VerticalHeaders,VerticalLines:()=>VerticalLines,WithCustomActions:()=>WithCustomActions,Zebra:()=>Zebra,default:()=>Table_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js"),parse=__webpack_require__("../../node_modules/date-fns/esm/parse/index.js"),isSameDay=__webpack_require__("../../node_modules/date-fns/esm/isSameDay/index.js"),isBefore=__webpack_require__("../../node_modules/date-fns/esm/isBefore/index.js"),Table=__webpack_require__("./src/components/table/Table.tsx");const story_example_work_trial_namespaceObject=JSON.parse('[{"Paikka-ID":"33740","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Harjoittelija","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"TYÖKOKEILU Snellu Cafe´ lounaskahvila","Postinumero":"00900","Paikkoja":36,"Haastatteluun halutaan":40},{"Paikka-ID":"33741","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Harjoittelija","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Maunulatalon kahvila (Månsas Deli)","Postinumero":"00630","Paikkoja":39,"Haastatteluun halutaan":50},{"Paikka-ID":"33823","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Viestintäalan harjoittelija","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Tarinapaja","Postinumero":"00610","Paikkoja":12,"Haastatteluun halutaan":30},{"Paikka-ID":"33739","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Kahvila-apulainen","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Kahvilapalvelut","Postinumero":"00610","Paikkoja":12,"Haastatteluun halutaan":20},{"Paikka-ID":"33918","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Teknisen alan harjoittelija","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"WooDoo-verstas","Postinumero":"00880","Paikkoja":45,"Haastatteluun halutaan":50},{"Paikka-ID":"34825","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoapulainen","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Sinikello","Postinumero":"00420","Paikkoja":3,"Haastatteluun halutaan":5},{"Paikka-ID":"35212","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Teknisen alan harjoittelija","Ilmoitus vanhenee":"31.12.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Metalliverstas","Postinumero":"00880","Paikkoja":37,"Haastatteluun halutaan":40},{"Paikka-ID":"35213","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Teknisen alan harjoittelija","Ilmoitus vanhenee":"30.06.2022","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Moottoripaja Pitäjänmäki","Postinumero":"00370","Paikkoja":18,"Haastatteluun halutaan":21},{"Paikka-ID":"35294","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"29.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Savela","Postinumero":"00720","Paikkoja":1,"Haastatteluun halutaan":10},{"Paikka-ID":"35295","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"29.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Sinivuori","Postinumero":"00720","Paikkoja":1,"Haastatteluun halutaan":10},{"Paikka-ID":"35296","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"29.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Varhaiskasvatusyksikkö Siilitie","Postinumero":"00800","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"35283","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Liikunnanohjaaja","Ilmoitus vanhenee":"27.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Palvelukeskus","Postinumero":"00420","Paikkoja":1,"Haastatteluun halutaan":2},{"Paikka-ID":"34165","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"ICT-alan harjoittelija","Ilmoitus vanhenee":"27.02.2022","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Digitalents Helsinki","Postinumero":"00270","Paikkoja":51,"Haastatteluun halutaan":70},{"Paikka-ID":"35096","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"25.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Varhaiskasvatusyksikkö Herttoniemi","Postinumero":"00800","Paikkoja":1,"Haastatteluun halutaan":1},{"Paikka-ID":"35088","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"24.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Lapinmäki","Postinumero":"00350","Paikkoja":3,"Haastatteluun halutaan":4},{"Paikka-ID":"34549","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Teknisen alan harjoittelija","Ilmoitus vanhenee":"19.07.2023","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"WooDoo-verstas","Postinumero":"00880","Paikkoja":29,"Haastatteluun halutaan":50},{"Paikka-ID":"35050","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"18.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Neulanen","Postinumero":"00920","Paikkoja":7,"Haastatteluun halutaan":20},{"Paikka-ID":"35237","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Ohjaaja","Ilmoitus vanhenee":"17.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Stadin asukastalo Pihlajamäki","Postinumero":"00710","Paikkoja":1,"Haastatteluun halutaan":4},{"Paikka-ID":"35230","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"16.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Kuninkaantammi","Postinumero":"00430","Paikkoja":2,"Haastatteluun halutaan":3},{"Paikka-ID":"35224","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"15.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Loimi","Postinumero":"00940","Paikkoja":1,"Haastatteluun halutaan":2},{"Paikka-ID":"35223","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"15.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Pihapirtti","Postinumero":"00940","Paikkoja":2,"Haastatteluun halutaan":3},{"Paikka-ID":"35221","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoiva-avustaja","Ilmoitus vanhenee":"14.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Usva-tiimi","Postinumero":"00770","Paikkoja":1,"Haastatteluun halutaan":2},{"Paikka-ID":"35222","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoiva-avustaja","Ilmoitus vanhenee":"14.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Ruska-tiimi","Postinumero":"00770","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35218","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoapulainen","Ilmoitus vanhenee":"14.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Tuulensuu","Postinumero":"00500","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35018","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Avustaja","Ilmoitus vanhenee":"12.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Tapanila","Postinumero":"00730","Paikkoja":1,"Haastatteluun halutaan":1},{"Paikka-ID":"35003","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkotiapulainen","Ilmoitus vanhenee":"12.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Neulanen","Postinumero":"00920","Paikkoja":2,"Haastatteluun halutaan":5},{"Paikka-ID":"35002","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"11.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Terhi","Postinumero":"00530","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"34998","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"11.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Ruuti","Postinumero":"00940","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"34999","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"11.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Haikara","Postinumero":"00940","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"34986","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"10.10.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Kannelmäen palvelutalo","Postinumero":"00420","Paikkoja":1,"Haastatteluun halutaan":2},{"Paikka-ID":"34987","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"10.10.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Kannelmäen palvelutalo","Postinumero":"00420","Paikkoja":1,"Haastatteluun halutaan":2},{"Paikka-ID":"34988","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"10.10.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Kannelmäen palvelutalo","Postinumero":"00420","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35202","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"08.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Lassi ja Pk Niitty","Postinumero":"00440","Paikkoja":2,"Haastatteluun halutaan":5},{"Paikka-ID":"35176","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkotiapulainen","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Suomenlinna","Postinumero":"00190","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35193","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Ryhmäkoti Kantola tai Pohjantähti","Postinumero":"00940","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35194","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Ryhmäkoti Apila, Orvokki tai Vanamo","Postinumero":"00940","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35195","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Ryhmäkoti Puolukka, Karpalo tai Mansikka","Postinumero":"00940","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35179","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Leikkipuistoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Leikkipuisto Intia","Postinumero":"00560","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35189","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Leikkipuistoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Leikkipuisto Lehdokki","Postinumero":"00520","Paikkoja":2,"Haastatteluun halutaan":3},{"Paikka-ID":"35190","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Leikkipuistoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Leikkipuisto Linja","Postinumero":"00530","Paikkoja":3,"Haastatteluun halutaan":3},{"Paikka-ID":"35191","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Leikkipuistoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Leikkipuisto Sanna","Postinumero":"00240","Paikkoja":3,"Haastatteluun halutaan":3},{"Paikka-ID":"35192","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Leikkipuistoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Leikkipuisto Vallila","Postinumero":"00550","Paikkoja":3,"Haastatteluun halutaan":3},{"Paikka-ID":"35196","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Hoitoavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Ryhmäkoti Vadelma tai Mustikka","Postinumero":"00940","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"35197","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Kuntoutusavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Ryhmäkoti Kantola","Postinumero":"00940","Paikkoja":1,"Haastatteluun halutaan":5},{"Paikka-ID":"35201","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"07.11.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Jousi","Postinumero":"00940","Paikkoja":2,"Haastatteluun halutaan":4},{"Paikka-ID":"34969","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"06.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Haaga","Postinumero":"00320","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"34970","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"06.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Pk Kylätie","Postinumero":"00320","Paikkoja":1,"Haastatteluun halutaan":3},{"Paikka-ID":"34957","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Apuohjaaja","Ilmoitus vanhenee":"05.10.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Sisustusompelimo","Postinumero":"00500","Paikkoja":1,"Haastatteluun halutaan":6},{"Paikka-ID":"34960","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Apuohjaaja","Ilmoitus vanhenee":"05.10.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Muusix-ruokala","Postinumero":"00500","Paikkoja":1,"Haastatteluun halutaan":4},{"Paikka-ID":"34961","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"05.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Varhaiskasvatusyksikkö Siilitie","Postinumero":"00800","Paikkoja":3,"Haastatteluun halutaan":3},{"Paikka-ID":"34952","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"04.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Myrskyluoto","Postinumero":"00980","Paikkoja":1,"Haastatteluun halutaan":2},{"Paikka-ID":"34953","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"04.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Hippaheikki","Postinumero":"0980","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"34954","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Päiväkodin harjoittelija","Ilmoitus vanhenee":"04.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Kajuutta","Postinumero":"00980","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"34948","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Erityisavustaja","Ilmoitus vanhenee":"03.10.2021","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Päiväkoti Vanhainen","Postinumero":"00420","Paikkoja":2,"Haastatteluun halutaan":2},{"Paikka-ID":"35138","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Apuohjaaja","Ilmoitus vanhenee":"02.11.2021","Toimiala/liikelaitos":"Sosiaali- ja terveystoimiala","Työpaikka":"Keramiikka","Postinumero":"00580","Paikkoja":1,"Haastatteluun halutaan":5},{"Paikka-ID":"34550","Paikan tyyppi":"Työkokeilupaikka","Tehtävänimike":"Kahvila-apulainen","Ilmoitus vanhenee":"01.07.2023","Toimiala/liikelaitos":"Kasvatus ja koulutus","Työpaikka":"Kahvila Villa Ullas","Postinumero":"00980","Paikkoja":78,"Haastatteluun halutaan":99}]');var Button=__webpack_require__("./src/components/button/Button.tsx"),IconTrash=__webpack_require__("./src/icons/IconTrash.tsx"),LoadingSpinner=__webpack_require__("./src/components/loadingSpinner/LoadingSpinner.tsx"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js");const Table_stories={component:Table.i,title:"Components/Table",parameters:{storySource:{source:"import React, { useEffect, useState } from 'react';\nimport { parse, isBefore, isSameDay } from 'date-fns';\n\nimport { Table } from './Table';\nimport workTrial from './story-example-work-trial.json';\nimport { Button } from '../button';\nimport { IconTrash } from '../../icons';\nimport { LoadingSpinner } from '../loadingSpinner';\n\nexport default {\n component: Table,\n title: 'Components/Table',\n parameters: {\n controls: { expanded: true },\n },\n args: {},\n};\n\n// args is required for docs tab to show source code\n\nexport const Default = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const Light = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const Dense = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const Zebra = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'city', headerName: 'City' },\n { key: 'profession', headerName: 'Profession' },\n {\n key: 'experience',\n headerName: 'Experience (years)',\n transform: ({ experience }) => {\n return
{experience}
;\n },\n },\n ];\n\n const rows: Array = [\n {\n id: 1000,\n firstName: 'Lauri',\n surname: 'Kekkonen',\n age: 39,\n city: 'Helsinki',\n profession: 'Engineer',\n experience: 10,\n },\n {\n id: 1001,\n firstName: 'Maria',\n surname: 'Sarasoja',\n age: 62,\n city: 'Tampere',\n profession: 'Designer',\n experience: 39,\n },\n {\n id: 1002,\n firstName: 'Anneli',\n surname: 'Routa',\n age: 50,\n city: 'Turku',\n profession: 'Meteorologist',\n experience: 25,\n },\n {\n id: 1003,\n firstName: 'Osku',\n surname: 'Rausku',\n age: 18,\n city: 'Oulu',\n profession: 'Mail Carrier',\n experience: 1,\n },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const VerticalLines = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n};\n\n// args is required for docs tab to show source code\n\nexport const VerticalHeaders = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: '8-12', headerName: '8-12' },\n { key: '12-14', headerName: '12-14' },\n { key: '14-16', headerName: '14-16' },\n { key: '16-18', headerName: '16-18' },\n ];\n\n const unitRows: Array = [\n { id: 'monday', '8-12': 324, '12-14': 562, '14-16': 280, '16-18': 94 },\n { id: 'tuesday', '8-12': 341, '12-14': 688, '14-16': 425, '16-18': 113 },\n { id: 'wednesday', '8-12': 294, '12-14': 492, '14-16': 280, '16-18': 67 },\n { id: 'thursday', '8-12': 312, '12-14': 501, '14-16': 455, '16-18': 112 },\n { id: 'friday', '8-12': 150, '12-14': 142, '14-16': 362, '16-18': 455 },\n ];\n\n const verticalHeaders = [\n { key: 'monday', headerName: 'Monday' },\n { key: 'tuesday', headerName: 'Tuesday' },\n { key: 'wednesday', headerName: 'Wednesday' },\n { key: 'thursday', headerName: 'Thursday' },\n { key: 'friday', headerName: 'Friday' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const Sorting = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const SortingLightVariant = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const InitiallySortedBy = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const CustomSortFunction = (args) => {\n const cols = [\n { key: 'Paikka-ID', headerName: 'Paikka-ID', isSortable: true },\n { key: 'Paikan tyyppi', headerName: 'Paikan tyyppi', isSortable: false },\n { key: 'Tehtävänimike', headerName: 'Tehtävänimike', isSortable: true },\n {\n key: 'Ilmoitus vanhenee',\n headerName: 'Ilmoitus vanhenee',\n sortIconType: 'other' as const,\n customSortCompareFunction: (a, b) => {\n const aDate = parse(a, 'dd.MM.yyyy', new Date());\n const bDate = parse(b, 'dd.MM.yyyy', new Date());\n\n if (isSameDay(aDate, bDate)) {\n return 0;\n }\n\n if (isBefore(aDate, bDate)) {\n return -1;\n }\n\n return 1;\n },\n isSortable: true,\n },\n { key: 'Toimiala/liikelaitos', headerName: 'Toimiala/liikelaitos', isSortable: true },\n { key: 'Työpaikka', headerName: 'Työpaikka', isSortable: true },\n { key: 'Postinumero', headerName: 'Postinumero', isSortable: true },\n {\n key: 'Paikkoja',\n headerName: 'Paikkoja',\n sortIconType: 'other' as const,\n transform: ({ Paikkoja }) => {\n return
{Paikkoja}
;\n },\n isSortable: true,\n },\n {\n key: 'Haastatteluun halutaan',\n headerName: 'Haastatteluun halutaan',\n sortIconType: 'other' as const,\n transform: (row) => {\n return
{row['Haastatteluun halutaan']}
;\n },\n isSortable: true,\n },\n ];\n\n const rows: Array = workTrial;\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const SortingSideEffects = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const data: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n const [loading, toggleLoading] = useState(false);\n const [rows, setRows] = useState(data);\n\n useEffect(() => {\n if (loading) {\n setTimeout(() => {\n toggleLoading((currentValue) => !currentValue);\n setRows(data);\n }, 1000);\n }\n }, [loading]);\n\n const caption = (\n \n Table 1: Table with loading spinner\n \n );\n\n return (\n
\n {\n // Side effects\n setRows([]);\n toggleLoading((currentValue) => !currentValue);\n // Call table's own sorting function\n handleSort();\n }}\n />\n {loading && }\n
\n );\n};\n\nSortingSideEffects.parameters = {\n loki: { skip: true }, // The starting point is exactly the same as for other tables\n};\n\n// args is required for docs tab to show source code\n\nexport const CheckboxSelection = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([]);\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const CheckboxSelectionDense = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([]);\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const InitiallySelectedRows = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([1002, 1003]);\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const WithCustomActions = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const indexKey = 'id';\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [tableRows, setTableRows] = useState(rows);\n const [selectedRows, setSelectedRows] = useState([]);\n\n const deleteSelectedButton = (\n {\n setTableRows(\n tableRows.filter((row) => {\n const rowId = row[indexKey];\n\n return (\n selectedRows.some((selectedRow) => {\n return selectedRow === rowId;\n }) === false\n );\n }),\n );\n setSelectedRows([]);\n }}\n style={{\n flexGrow: 0,\n }}\n className=\"table-custom-action\"\n variant=\"secondary\"\n size=\"small\"\n iconLeft={}\n disabled={selectedRows.length === 0}\n >\n Delete selected\n \n );\n\n const copySelected = (\n {\n \n console.log('Copy clicked!');\n }}\n style={{\n flexGrow: 0,\n }}\n className=\"table-custom-action\"\n variant=\"secondary\"\n size=\"small\"\n disabled={selectedRows.length === 0}\n >\n Copy selected\n \n );\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const CheckboxSelectionWithSorting = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([]);\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const CustomBackgroundColorsForDarkVariant = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n const theme = {\n '--header-background-color': 'var(--color-tram)',\n '--content-background-color': 'var(--color-black-5)',\n };\n\n return (\n
\n \n
\n );\n};\n\n// args is required for docs tab to show source code\n\nexport const CustomBackgroundColorsForLightVariant = (args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n const theme = {\n '--header-background-color': 'var(--color-suomenlinna)',\n '--content-background-color': 'var(--color-black-5)',\n };\n\n return (\n
\n \n
\n );\n};\n",locationsMap:{default:{startLoc:{col:23,line:21},endLoc:{col:1,line:54},startBody:{col:23,line:21},endBody:{col:1,line:54}},light:{startLoc:{col:21,line:58},endLoc:{col:1,line:91},startBody:{col:21,line:58},endBody:{col:1,line:91}},dense:{startLoc:{col:21,line:95},endLoc:{col:1,line:128},startBody:{col:21,line:95},endBody:{col:1,line:128}},zebra:{startLoc:{col:21,line:132},endLoc:{col:1,line:205},startBody:{col:21,line:132},endBody:{col:1,line:205}},"vertical-lines":{startLoc:{col:29,line:209},endLoc:{col:1,line:242},startBody:{col:29,line:209},endBody:{col:1,line:242}},"vertical-headers":{startLoc:{col:31,line:246},endLoc:{col:1,line:290},startBody:{col:31,line:246},endBody:{col:1,line:290}},sorting:{startLoc:{col:23,line:294},endLoc:{col:1,line:339},startBody:{col:23,line:294},endBody:{col:1,line:339}},"sorting-light-variant":{startLoc:{col:35,line:343},endLoc:{col:1,line:389},startBody:{col:35,line:343},endBody:{col:1,line:389}},"initially-sorted-by":{startLoc:{col:33,line:393},endLoc:{col:1,line:440},startBody:{col:33,line:393},endBody:{col:1,line:440}},"custom-sort-function":{startLoc:{col:34,line:444},endLoc:{col:1,line:516},startBody:{col:34,line:444},endBody:{col:1,line:516}},"sorting-side-effects":{startLoc:{col:34,line:520},endLoc:{col:1,line:584},startBody:{col:34,line:520},endBody:{col:1,line:584}},"checkbox-selection":{startLoc:{col:33,line:592},endLoc:{col:1,line:634},startBody:{col:33,line:592},endBody:{col:1,line:634}},"checkbox-selection-dense":{startLoc:{col:38,line:638},endLoc:{col:1,line:681},startBody:{col:38,line:638},endBody:{col:1,line:681}},"initially-selected-rows":{startLoc:{col:37,line:685},endLoc:{col:1,line:728},startBody:{col:37,line:685},endBody:{col:1,line:728}},"with-custom-actions":{startLoc:{col:33,line:732},endLoc:{col:1,line:828},startBody:{col:33,line:732},endBody:{col:1,line:828}},"checkbox-selection-with-sorting":{startLoc:{col:44,line:832},endLoc:{col:1,line:880},startBody:{col:44,line:832},endBody:{col:1,line:880}},"custom-background-colors-for-dark-variant":{startLoc:{col:52,line:884},endLoc:{col:1,line:930},startBody:{col:52,line:884},endBody:{col:1,line:930}},"custom-background-colors-for-light-variant":{startLoc:{col:53,line:934},endLoc:{col:1,line:980},startBody:{col:53,line:934},endBody:{col:1,line:980}}}},controls:{expanded:!0}},args:{}};var Default=function Default(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref){var age=_ref.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],caption,indexKey:"id",renderIndexCol:!1})})},Light=function Light(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref2){var age=_ref2.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{caption,cols,variant:"light",indexKey:"id",renderIndexCol:!1,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}]})})},Dense=function Dense(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref3){var age=_ref3.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"500px"},children:(0,jsx_runtime.jsx)(Table.i,{cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],dense:!0,caption,indexKey:"id",renderIndexCol:!1})})},Zebra=function Zebra(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref4){var age=_ref4.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"city",headerName:"City"},{key:"profession",headerName:"Profession"},{key:"experience",headerName:"Experience (years)",transform:function transform(_ref5){var experience=_ref5.experience;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:experience})}}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"800px"},children:(0,jsx_runtime.jsx)(Table.i,{rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,city:"Helsinki",profession:"Engineer",experience:10},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,city:"Tampere",profession:"Designer",experience:39},{id:1002,firstName:"Anneli",surname:"Routa",age:50,city:"Turku",profession:"Meteorologist",experience:25},{id:1003,firstName:"Osku",surname:"Rausku",age:18,city:"Oulu",profession:"Mail Carrier",experience:1}],cols,caption,zebra:!0,indexKey:"id",renderIndexCol:!1})})},VerticalLines=function VerticalLines(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref6){var age=_ref6.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{verticalLines:!0,cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],caption,indexKey:"id",renderIndexCol:!1})})},VerticalHeaders=function VerticalHeaders(args){var caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"486px"},children:(0,jsx_runtime.jsx)(Table.i,{verticalHeaders:[{key:"monday",headerName:"Monday"},{key:"tuesday",headerName:"Tuesday"},{key:"wednesday",headerName:"Wednesday"},{key:"thursday",headerName:"Thursday"},{key:"friday",headerName:"Friday"}],cols:[{key:"id",headerName:"Not rendered"},{key:"8-12",headerName:"8-12"},{key:"12-14",headerName:"12-14"},{key:"14-16",headerName:"14-16"},{key:"16-18",headerName:"16-18"}],rows:[{id:"monday","8-12":324,"12-14":562,"14-16":280,"16-18":94},{id:"tuesday","8-12":341,"12-14":688,"14-16":425,"16-18":113},{id:"wednesday","8-12":294,"12-14":492,"14-16":280,"16-18":67},{id:"thursday","8-12":312,"12-14":501,"14-16":455,"16-18":112},{id:"friday","8-12":150,"12-14":142,"14-16":362,"16-18":455}],caption,textAlignContentRight:!0,indexKey:"id",renderIndexCol:!1})})},Sorting=function Sorting(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name",isSortable:!0},{key:"surname",headerName:"Surname",isSortable:!0},{key:"age",headerName:"Age",sortIconType:"other",transform:function transform(_ref7){var age=_ref7.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})},isSortable:!0},{key:"profession",headerName:"Profession",isSortable:!0}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{ariaLabelSortButtonUnset:"Not sorted",ariaLabelSortButtonAscending:"Sorted in ascending order",ariaLabelSortButtonDescending:"Sorted in descending order",indexKey:"id",renderIndexCol:!1,cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"},{id:1004,firstName:"Linda",surname:"Koululainen",age:8,profession:"School student"}],caption})})},SortingLightVariant=function SortingLightVariant(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name",isSortable:!0},{key:"surname",headerName:"Surname",isSortable:!0},{key:"age",headerName:"Age",sortIconType:"other",transform:function transform(_ref8){var age=_ref8.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})},isSortable:!0},{key:"profession",headerName:"Profession",isSortable:!0}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{variant:"light",ariaLabelSortButtonUnset:"Not sorted",ariaLabelSortButtonAscending:"Sorted in ascending order",ariaLabelSortButtonDescending:"Sorted in descending order",indexKey:"id",renderIndexCol:!1,cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"},{id:1004,firstName:"Linda",surname:"Koululainen",age:8,profession:"School student"}],caption})})},InitiallySortedBy=function InitiallySortedBy(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name",isSortable:!0},{key:"surname",headerName:"Surname",isSortable:!0},{key:"age",headerName:"Age",sortIconType:"other",transform:function transform(_ref9){var age=_ref9.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})},isSortable:!0},{key:"profession",headerName:"Profession",isSortable:!0}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{initialSortingColumnKey:"age",initialSortingOrder:"desc",ariaLabelSortButtonUnset:"Not sorted",ariaLabelSortButtonAscending:"Sorted in ascending order",ariaLabelSortButtonDescending:"Sorted in descending order",rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"},{id:1004,firstName:"Linda",surname:"Koululainen",age:8,profession:"School student"}],cols,indexKey:"id",renderIndexCol:!1,caption})})},CustomSortFunction=function CustomSortFunction(args){var cols=[{key:"Paikka-ID",headerName:"Paikka-ID",isSortable:!0},{key:"Paikan tyyppi",headerName:"Paikan tyyppi",isSortable:!1},{key:"Tehtävänimike",headerName:"Tehtävänimike",isSortable:!0},{key:"Ilmoitus vanhenee",headerName:"Ilmoitus vanhenee",sortIconType:"other",customSortCompareFunction:function customSortCompareFunction(a,b){var aDate=(0,parse.Z)(a,"dd.MM.yyyy",new Date),bDate=(0,parse.Z)(b,"dd.MM.yyyy",new Date);return(0,isSameDay.Z)(aDate,bDate)?0:(0,isBefore.Z)(aDate,bDate)?-1:1},isSortable:!0},{key:"Toimiala/liikelaitos",headerName:"Toimiala/liikelaitos",isSortable:!0},{key:"Työpaikka",headerName:"Työpaikka",isSortable:!0},{key:"Postinumero",headerName:"Postinumero",isSortable:!0},{key:"Paikkoja",headerName:"Paikkoja",sortIconType:"other",transform:function transform(_ref10){var Paikkoja=_ref10.Paikkoja;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:Paikkoja})},isSortable:!0},{key:"Haastatteluun halutaan",headerName:"Haastatteluun halutaan",sortIconType:"other",transform:function transform(row){return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:row["Haastatteluun halutaan"]})},isSortable:!0}],rows=story_example_work_trial_namespaceObject,caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"1200px",height:"600px"},children:(0,jsx_runtime.jsx)(Table.i,{initialSortingColumnKey:"Ilmoitus vanhenee",initialSortingOrder:"asc",ariaLabelSortButtonUnset:"Not sorted",ariaLabelSortButtonAscending:"Sorted in ascending order",ariaLabelSortButtonDescending:"Sorted in descending order",cols,rows,indexKey:"Paikka-ID",caption,dense:!0})})},SortingSideEffects=function SortingSideEffects(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name",isSortable:!0},{key:"surname",headerName:"Surname",isSortable:!0},{key:"age",headerName:"Age",sortIconType:"other",transform:function transform(_ref11){var age=_ref11.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})},isSortable:!0},{key:"profession",headerName:"Profession",isSortable:!0}],data=[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"},{id:1004,firstName:"Linda",surname:"Koululainen",age:8,profession:"School student"}],_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),loading=_useState2[0],toggleLoading=_useState2[1],_useState3=(0,react.useState)(data),_useState4=(0,slicedToArray.Z)(_useState3,2),rows=_useState4[0],setRows=_useState4[1];(0,react.useEffect)((function(){loading&&setTimeout((function(){toggleLoading((function(currentValue){return!currentValue})),setRows(data)}),1e3)}),[loading]);var caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table with loading spinner"]});return(0,jsx_runtime.jsxs)("div",{style:{maxWidth:"640px",display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,jsx_runtime.jsx)(Table.i,{ariaLabelSortButtonUnset:"Not sorted",ariaLabelSortButtonAscending:"Sorted in ascending order",ariaLabelSortButtonDescending:"Sorted in descending order",indexKey:"id",renderIndexCol:!1,cols,rows,caption,onSort:function onSort(order,colKey,handleSort){setRows([]),toggleLoading((function(currentValue){return!currentValue})),handleSort()}}),loading&&(0,jsx_runtime.jsx)(LoadingSpinner.T,{style:{marginTop:"var(--spacing-l)"}})]})};SortingSideEffects.parameters={loki:{skip:!0}};var CheckboxSelection=function CheckboxSelection(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref12){var age=_ref12.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],_useState5=(0,react.useState)([]),_useState6=(0,slicedToArray.Z)(_useState5,2),selectedRows=_useState6[0],setSelectedRows=_useState6[1];return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{checkboxSelection:!0,selectedRows,setSelectedRows,heading:"Employees",id:"checkbox-selection",indexKey:"id",renderIndexCol:!1,cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],selectAllRowsText:"Select all rows",clearSelectionsText:"Clear selections",ariaLabelCheckboxSelection:"Row selection"})})},CheckboxSelectionDense=function CheckboxSelectionDense(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref13){var age=_ref13.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],_useState7=(0,react.useState)([]),_useState8=(0,slicedToArray.Z)(_useState7,2),selectedRows=_useState8[0],setSelectedRows=_useState8[1];return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"500px"},children:(0,jsx_runtime.jsx)(Table.i,{dense:!0,checkboxSelection:!0,selectedRows,setSelectedRows,heading:"Employees",id:"checkbox-selection-dense",cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],indexKey:"id",renderIndexCol:!1,selectAllRowsText:"Select all rows",clearSelectionsText:"Clear selections",ariaLabelCheckboxSelection:"Row selection"})})},InitiallySelectedRows=function InitiallySelectedRows(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref14){var age=_ref14.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],_useState9=(0,react.useState)([1002,1003]),_useState10=(0,slicedToArray.Z)(_useState9,2),selectedRows=_useState10[0],setSelectedRows=_useState10[1];return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{heading:"Employees",id:"initially-selected",checkboxSelection:!0,selectedRows,setSelectedRows,variant:"dark",cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],indexKey:"id",renderIndexCol:!1,selectAllRowsText:"Select all rows",clearSelectionsText:"Clear selections",ariaLabelCheckboxSelection:"Row selection"})})},WithCustomActions=function WithCustomActions(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref15){var age=_ref15.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],_useState11=(0,react.useState)([{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}]),_useState12=(0,slicedToArray.Z)(_useState11,2),tableRows=_useState12[0],setTableRows=_useState12[1],_useState13=(0,react.useState)([]),_useState14=(0,slicedToArray.Z)(_useState13,2),selectedRows=_useState14[0],setSelectedRows=_useState14[1],deleteSelectedButton=(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){setTableRows(tableRows.filter((function(row){var rowId=row.id;return!1===selectedRows.some((function(selectedRow){return selectedRow===rowId}))}))),setSelectedRows([])},style:{flexGrow:0},className:"table-custom-action",variant:"secondary",size:"small",iconLeft:(0,jsx_runtime.jsx)(IconTrash.IconTrash,{}),disabled:0===selectedRows.length,children:"Delete selected"},1),copySelected=(0,jsx_runtime.jsx)(Button.z,{onClick:function onClick(){console.log("Copy clicked!")},style:{flexGrow:0},className:"table-custom-action",variant:"secondary",size:"small",disabled:0===selectedRows.length,children:"Copy selected"},2);return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{customActionButtons:[deleteSelectedButton,copySelected],selectedRows,setSelectedRows,checkboxSelection:!0,cols,rows:tableRows,heading:"Employees",id:"custom-actions",indexKey:"id",renderIndexCol:!1,variant:"dark",selectAllRowsText:"Select all rows",clearSelectionsText:"Clear selections",ariaLabelCheckboxSelection:"Row selection"})})},CheckboxSelectionWithSorting=function CheckboxSelectionWithSorting(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name",isSortable:!0},{key:"surname",headerName:"Surname",isSortable:!0},{key:"age",headerName:"Age",sortIconType:"other",transform:function transform(_ref16){var age=_ref16.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})},isSortable:!0},{key:"profession",headerName:"Profession",isSortable:!0}],_useState15=(0,react.useState)([]),_useState16=(0,slicedToArray.Z)(_useState15,2),selectedRows=_useState16[0],setSelectedRows=_useState16[1];return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{ariaLabelSortButtonUnset:"Not sorted",ariaLabelSortButtonAscending:"Sorted in ascending order",ariaLabelSortButtonDescending:"Sorted in descending order",selectAllRowsText:"Select all rows",clearSelectionsText:"Clear selections",ariaLabelCheckboxSelection:"Row selection",checkboxSelection:!0,selectedRows,setSelectedRows,cols,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"},{id:1004,firstName:"Linda",surname:"Koululainen",age:8,profession:"School student"}],indexKey:"id",renderIndexCol:!1,heading:"Employees",id:"selection-with-sorting"})})},CustomBackgroundColorsForDarkVariant=function CustomBackgroundColorsForDarkVariant(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref17){var age=_ref17.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{theme:{"--header-background-color":"var(--color-tram)","--content-background-color":"var(--color-black-5)"},caption,variant:"dark",indexKey:"id",renderIndexCol:!1,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],cols})})},CustomBackgroundColorsForLightVariant=function CustomBackgroundColorsForLightVariant(args){var cols=[{key:"id",headerName:"Not rendered"},{key:"firstName",headerName:"First name"},{key:"surname",headerName:"Surname"},{key:"age",headerName:"Age",transform:function transform(_ref18){var age=_ref18.age;return(0,jsx_runtime.jsx)("div",{style:{textAlign:"right"},children:age})}},{key:"profession",headerName:"Profession"}],caption=(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("b",{children:"Table 1"}),": Table description"]});return(0,jsx_runtime.jsx)("div",{style:{maxWidth:"640px"},children:(0,jsx_runtime.jsx)(Table.i,{theme:{"--header-background-color":"var(--color-suomenlinna)","--content-background-color":"var(--color-black-5)"},caption,variant:"light",indexKey:"id",renderIndexCol:!1,rows:[{id:1e3,firstName:"Lauri",surname:"Kekkonen",age:39,profession:"Engineer"},{id:1001,firstName:"Maria",surname:"Sarasoja",age:62,profession:"Designer"},{id:1002,firstName:"Anneli",surname:"Routa",age:50,profession:"Meteorologist"},{id:1003,firstName:"Osku",surname:"Rausku",age:18,profession:"Mail Carrier"}],cols})})};Default.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n}"}},Default.parameters),Light.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n}"}},Light.parameters),Dense.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n}"}},Dense.parameters),Zebra.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'city', headerName: 'City' },\n { key: 'profession', headerName: 'Profession' },\n {\n key: 'experience',\n headerName: 'Experience (years)',\n transform: ({ experience }) => {\n return
{experience}
;\n },\n },\n ];\n\n const rows: Array = [\n {\n id: 1000,\n firstName: 'Lauri',\n surname: 'Kekkonen',\n age: 39,\n city: 'Helsinki',\n profession: 'Engineer',\n experience: 10,\n },\n {\n id: 1001,\n firstName: 'Maria',\n surname: 'Sarasoja',\n age: 62,\n city: 'Tampere',\n profession: 'Designer',\n experience: 39,\n },\n {\n id: 1002,\n firstName: 'Anneli',\n surname: 'Routa',\n age: 50,\n city: 'Turku',\n profession: 'Meteorologist',\n experience: 25,\n },\n {\n id: 1003,\n firstName: 'Osku',\n surname: 'Rausku',\n age: 18,\n city: 'Oulu',\n profession: 'Mail Carrier',\n experience: 1,\n },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n}"}},Zebra.parameters),VerticalLines.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n
\n \n );\n}"}},VerticalLines.parameters),VerticalHeaders.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: '8-12', headerName: '8-12' },\n { key: '12-14', headerName: '12-14' },\n { key: '14-16', headerName: '14-16' },\n { key: '16-18', headerName: '16-18' },\n ];\n\n const unitRows: Array = [\n { id: 'monday', '8-12': 324, '12-14': 562, '14-16': 280, '16-18': 94 },\n { id: 'tuesday', '8-12': 341, '12-14': 688, '14-16': 425, '16-18': 113 },\n { id: 'wednesday', '8-12': 294, '12-14': 492, '14-16': 280, '16-18': 67 },\n { id: 'thursday', '8-12': 312, '12-14': 501, '14-16': 455, '16-18': 112 },\n { id: 'friday', '8-12': 150, '12-14': 142, '14-16': 362, '16-18': 455 },\n ];\n\n const verticalHeaders = [\n { key: 'monday', headerName: 'Monday' },\n { key: 'tuesday', headerName: 'Tuesday' },\n { key: 'wednesday', headerName: 'Wednesday' },\n { key: 'thursday', headerName: 'Thursday' },\n { key: 'friday', headerName: 'Friday' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n}"}},VerticalHeaders.parameters),Sorting.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n}"}},Sorting.parameters),SortingLightVariant.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n}"}},SortingLightVariant.parameters),InitiallySortedBy.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n}"}},InitiallySortedBy.parameters),CustomSortFunction.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'Paikka-ID', headerName: 'Paikka-ID', isSortable: true },\n { key: 'Paikan tyyppi', headerName: 'Paikan tyyppi', isSortable: false },\n { key: 'Tehtävänimike', headerName: 'Tehtävänimike', isSortable: true },\n {\n key: 'Ilmoitus vanhenee',\n headerName: 'Ilmoitus vanhenee',\n sortIconType: 'other' as const,\n customSortCompareFunction: (a, b) => {\n const aDate = parse(a, 'dd.MM.yyyy', new Date());\n const bDate = parse(b, 'dd.MM.yyyy', new Date());\n\n if (isSameDay(aDate, bDate)) {\n return 0;\n }\n\n if (isBefore(aDate, bDate)) {\n return -1;\n }\n\n return 1;\n },\n isSortable: true,\n },\n { key: 'Toimiala/liikelaitos', headerName: 'Toimiala/liikelaitos', isSortable: true },\n { key: 'Työpaikka', headerName: 'Työpaikka', isSortable: true },\n { key: 'Postinumero', headerName: 'Postinumero', isSortable: true },\n {\n key: 'Paikkoja',\n headerName: 'Paikkoja',\n sortIconType: 'other' as const,\n transform: ({ Paikkoja }) => {\n return
{Paikkoja}
;\n },\n isSortable: true,\n },\n {\n key: 'Haastatteluun halutaan',\n headerName: 'Haastatteluun halutaan',\n sortIconType: 'other' as const,\n transform: (row) => {\n return
{row['Haastatteluun halutaan']}
;\n },\n isSortable: true,\n },\n ];\n\n const rows: Array = workTrial;\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n return (\n
\n \n
\n );\n}"}},CustomSortFunction.parameters),SortingSideEffects.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const data: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n const [loading, toggleLoading] = useState(false);\n const [rows, setRows] = useState(data);\n\n useEffect(() => {\n if (loading) {\n setTimeout(() => {\n toggleLoading((currentValue) => !currentValue);\n setRows(data);\n }, 1000);\n }\n }, [loading]);\n\n const caption = (\n \n Table 1: Table with loading spinner\n \n );\n\n return (\n
\n {\n // Side effects\n setRows([]);\n toggleLoading((currentValue) => !currentValue);\n // Call table's own sorting function\n handleSort();\n }}\n />\n {loading && }\n
\n );\n}"}},SortingSideEffects.parameters),CheckboxSelection.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([]);\n\n return (\n
\n \n
\n );\n}"}},CheckboxSelection.parameters),CheckboxSelectionDense.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([]);\n\n return (\n
\n \n
\n );\n}"}},CheckboxSelectionDense.parameters),InitiallySelectedRows.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([1002, 1003]);\n\n return (\n
\n \n
\n );\n}"}},InitiallySelectedRows.parameters),WithCustomActions.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const indexKey = 'id';\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const [tableRows, setTableRows] = useState(rows);\n const [selectedRows, setSelectedRows] = useState([]);\n\n const deleteSelectedButton = (\n {\n setTableRows(\n tableRows.filter((row) => {\n const rowId = row[indexKey];\n\n return (\n selectedRows.some((selectedRow) => {\n return selectedRow === rowId;\n }) === false\n );\n }),\n );\n setSelectedRows([]);\n }}\n style={{\n flexGrow: 0,\n }}\n className=\"table-custom-action\"\n variant=\"secondary\"\n size=\"small\"\n iconLeft={}\n disabled={selectedRows.length === 0}\n >\n Delete selected\n \n );\n\n const copySelected = (\n {\n \n console.log('Copy clicked!');\n }}\n style={{\n flexGrow: 0,\n }}\n className=\"table-custom-action\"\n variant=\"secondary\"\n size=\"small\"\n disabled={selectedRows.length === 0}\n >\n Copy selected\n \n );\n\n return (\n
\n \n
\n );\n}"}},WithCustomActions.parameters),CheckboxSelectionWithSorting.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name', isSortable: true },\n { key: 'surname', headerName: 'Surname', isSortable: true },\n {\n key: 'age',\n headerName: 'Age',\n sortIconType: 'other' as const,\n transform: ({ age }) => {\n return
{age}
;\n },\n isSortable: true,\n },\n { key: 'profession', headerName: 'Profession', isSortable: true },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n { id: 1004, firstName: 'Linda', surname: 'Koululainen', age: 8, profession: 'School student' },\n ];\n\n const [selectedRows, setSelectedRows] = useState([]);\n\n return (\n
\n \n
\n );\n}"}},CheckboxSelectionWithSorting.parameters),CustomBackgroundColorsForDarkVariant.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n const theme = {\n '--header-background-color': 'var(--color-tram)',\n '--content-background-color': 'var(--color-black-5)',\n };\n\n return (\n
\n \n
\n );\n}"}},CustomBackgroundColorsForDarkVariant.parameters),CustomBackgroundColorsForLightVariant.parameters=(0,objectSpread2.Z)({storySource:{source:"(args) => {\n const cols = [\n { key: 'id', headerName: 'Not rendered' },\n { key: 'firstName', headerName: 'First name' },\n { key: 'surname', headerName: 'Surname' },\n {\n key: 'age',\n headerName: 'Age',\n transform: ({ age }) => {\n return
{age}
;\n },\n },\n { key: 'profession', headerName: 'Profession' },\n ];\n\n const rows: Array = [\n { id: 1000, firstName: 'Lauri', surname: 'Kekkonen', age: 39, profession: 'Engineer' },\n { id: 1001, firstName: 'Maria', surname: 'Sarasoja', age: 62, profession: 'Designer' },\n { id: 1002, firstName: 'Anneli', surname: 'Routa', age: 50, profession: 'Meteorologist' },\n { id: 1003, firstName: 'Osku', surname: 'Rausku', age: 18, profession: 'Mail Carrier' },\n ];\n\n const caption = (\n \n Table 1: Table description\n \n );\n\n const theme = {\n '--header-background-color': 'var(--color-suomenlinna)',\n '--content-background-color': 'var(--color-black-5)',\n };\n\n return (\n
\n \n
\n );\n}"}},CustomBackgroundColorsForLightVariant.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/table/Table.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{Light.displayName="Light",Light.__docgenInfo={description:"",displayName:"Light",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#Light"]={docgenInfo:Light.__docgenInfo,name:"Light",path:"src/components/table/Table.stories.tsx#Light"})}catch(__react_docgen_typescript_loader_error){}try{Dense.displayName="Dense",Dense.__docgenInfo={description:"",displayName:"Dense",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#Dense"]={docgenInfo:Dense.__docgenInfo,name:"Dense",path:"src/components/table/Table.stories.tsx#Dense"})}catch(__react_docgen_typescript_loader_error){}try{Zebra.displayName="Zebra",Zebra.__docgenInfo={description:"",displayName:"Zebra",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#Zebra"]={docgenInfo:Zebra.__docgenInfo,name:"Zebra",path:"src/components/table/Table.stories.tsx#Zebra"})}catch(__react_docgen_typescript_loader_error){}try{VerticalLines.displayName="VerticalLines",VerticalLines.__docgenInfo={description:"",displayName:"VerticalLines",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#VerticalLines"]={docgenInfo:VerticalLines.__docgenInfo,name:"VerticalLines",path:"src/components/table/Table.stories.tsx#VerticalLines"})}catch(__react_docgen_typescript_loader_error){}try{VerticalHeaders.displayName="VerticalHeaders",VerticalHeaders.__docgenInfo={description:"",displayName:"VerticalHeaders",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#VerticalHeaders"]={docgenInfo:VerticalHeaders.__docgenInfo,name:"VerticalHeaders",path:"src/components/table/Table.stories.tsx#VerticalHeaders"})}catch(__react_docgen_typescript_loader_error){}try{Sorting.displayName="Sorting",Sorting.__docgenInfo={description:"",displayName:"Sorting",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#Sorting"]={docgenInfo:Sorting.__docgenInfo,name:"Sorting",path:"src/components/table/Table.stories.tsx#Sorting"})}catch(__react_docgen_typescript_loader_error){}try{SortingLightVariant.displayName="SortingLightVariant",SortingLightVariant.__docgenInfo={description:"",displayName:"SortingLightVariant",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#SortingLightVariant"]={docgenInfo:SortingLightVariant.__docgenInfo,name:"SortingLightVariant",path:"src/components/table/Table.stories.tsx#SortingLightVariant"})}catch(__react_docgen_typescript_loader_error){}try{InitiallySortedBy.displayName="InitiallySortedBy",InitiallySortedBy.__docgenInfo={description:"",displayName:"InitiallySortedBy",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#InitiallySortedBy"]={docgenInfo:InitiallySortedBy.__docgenInfo,name:"InitiallySortedBy",path:"src/components/table/Table.stories.tsx#InitiallySortedBy"})}catch(__react_docgen_typescript_loader_error){}try{CustomSortFunction.displayName="CustomSortFunction",CustomSortFunction.__docgenInfo={description:"",displayName:"CustomSortFunction",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#CustomSortFunction"]={docgenInfo:CustomSortFunction.__docgenInfo,name:"CustomSortFunction",path:"src/components/table/Table.stories.tsx#CustomSortFunction"})}catch(__react_docgen_typescript_loader_error){}try{SortingSideEffects.displayName="SortingSideEffects",SortingSideEffects.__docgenInfo={description:"",displayName:"SortingSideEffects",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#SortingSideEffects"]={docgenInfo:SortingSideEffects.__docgenInfo,name:"SortingSideEffects",path:"src/components/table/Table.stories.tsx#SortingSideEffects"})}catch(__react_docgen_typescript_loader_error){}try{CheckboxSelection.displayName="CheckboxSelection",CheckboxSelection.__docgenInfo={description:"",displayName:"CheckboxSelection",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#CheckboxSelection"]={docgenInfo:CheckboxSelection.__docgenInfo,name:"CheckboxSelection",path:"src/components/table/Table.stories.tsx#CheckboxSelection"})}catch(__react_docgen_typescript_loader_error){}try{CheckboxSelectionDense.displayName="CheckboxSelectionDense",CheckboxSelectionDense.__docgenInfo={description:"",displayName:"CheckboxSelectionDense",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#CheckboxSelectionDense"]={docgenInfo:CheckboxSelectionDense.__docgenInfo,name:"CheckboxSelectionDense",path:"src/components/table/Table.stories.tsx#CheckboxSelectionDense"})}catch(__react_docgen_typescript_loader_error){}try{InitiallySelectedRows.displayName="InitiallySelectedRows",InitiallySelectedRows.__docgenInfo={description:"",displayName:"InitiallySelectedRows",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#InitiallySelectedRows"]={docgenInfo:InitiallySelectedRows.__docgenInfo,name:"InitiallySelectedRows",path:"src/components/table/Table.stories.tsx#InitiallySelectedRows"})}catch(__react_docgen_typescript_loader_error){}try{WithCustomActions.displayName="WithCustomActions",WithCustomActions.__docgenInfo={description:"",displayName:"WithCustomActions",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#WithCustomActions"]={docgenInfo:WithCustomActions.__docgenInfo,name:"WithCustomActions",path:"src/components/table/Table.stories.tsx#WithCustomActions"})}catch(__react_docgen_typescript_loader_error){}try{CheckboxSelectionWithSorting.displayName="CheckboxSelectionWithSorting",CheckboxSelectionWithSorting.__docgenInfo={description:"",displayName:"CheckboxSelectionWithSorting",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#CheckboxSelectionWithSorting"]={docgenInfo:CheckboxSelectionWithSorting.__docgenInfo,name:"CheckboxSelectionWithSorting",path:"src/components/table/Table.stories.tsx#CheckboxSelectionWithSorting"})}catch(__react_docgen_typescript_loader_error){}try{CustomBackgroundColorsForDarkVariant.displayName="CustomBackgroundColorsForDarkVariant",CustomBackgroundColorsForDarkVariant.__docgenInfo={description:"",displayName:"CustomBackgroundColorsForDarkVariant",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#CustomBackgroundColorsForDarkVariant"]={docgenInfo:CustomBackgroundColorsForDarkVariant.__docgenInfo,name:"CustomBackgroundColorsForDarkVariant",path:"src/components/table/Table.stories.tsx#CustomBackgroundColorsForDarkVariant"})}catch(__react_docgen_typescript_loader_error){}try{CustomBackgroundColorsForLightVariant.displayName="CustomBackgroundColorsForLightVariant",CustomBackgroundColorsForLightVariant.__docgenInfo={description:"",displayName:"CustomBackgroundColorsForLightVariant",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/table/Table.stories.tsx#CustomBackgroundColorsForLightVariant"]={docgenInfo:CustomBackgroundColorsForLightVariant.__docgenInfo,name:"CustomBackgroundColorsForLightVariant",path:"src/components/table/Table.stories.tsx#CustomBackgroundColorsForLightVariant"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/tabs/Tabs.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Small:()=>Small,WithCustomOnClickAction:()=>WithCustomOnClickAction,WithCustomTheme:()=>WithCustomTheme,default:()=>Tabs_stories});var objectSpread2=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react=__webpack_require__("../../node_modules/react/index.js"),LoadingSpinner=__webpack_require__("./src/components/loadingSpinner/LoadingSpinner.tsx");__webpack_require__("./src/styles/base.css");const Tabs_module_scrollButton="Tabs_scrollButton__IVOLh",Tabs_module_tabs="Tabs_tabs__yE6Zk",Tabs_module_small="Tabs_small__en-fO",Tabs_module_tablistBar="Tabs_tablistBar__FWUNP",Tabs_module_tablist="Tabs_tablist__afK+U",Tabs_module_tab="Tabs_tab__mtOp2",Tabs_module_active="Tabs_active__0EWQH";var classNames=__webpack_require__("./src/utils/classNames.ts"),TabsContext=react.createContext({activeTab:0,setActiveTab:function setActiveTab(){},focusedTab:null,setFocusedTab:function setFocusedTab(){}}),useTheme=__webpack_require__("./src/hooks/useTheme.tsx"),IconAngleLeft=__webpack_require__("./src/icons/IconAngleLeft.tsx"),IconAngleRight=__webpack_require__("./src/icons/IconAngleRight.tsx"),getChildren=__webpack_require__("./src/utils/getChildren.ts"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js"),TabList=function TabList(_ref){var children=_ref.children,className=_ref.className,_ref$style=_ref.style,style=void 0===_ref$style?{}:_ref$style,tablistElementRef=(0,react.useRef)(null),tablistContainerRef=(0,react.useRef)(null),_useContext=(0,react.useContext)(TabsContext),focusedTab=_useContext.focusedTab,setFocusedTab=_useContext.setFocusedTab,_useState=(0,react.useState)(0),_useState2=(0,slicedToArray.Z)(_useState,2),tablistWidth=_useState2[0],setTablistWidth=_useState2[1],_useState3=(0,react.useState)(null),_useState4=(0,slicedToArray.Z)(_useState3,2),scrollIndex=_useState4[0],setScrollIndex=_useState4[1],_useState5=(0,react.useState)(!0),_useState6=(0,slicedToArray.Z)(_useState5,2),showPreviousButton=_useState6[0],setShowPreviousButton=_useState6[1],_useState7=(0,react.useState)(!0),_useState8=(0,slicedToArray.Z)(_useState7,2),showNextButton=_useState8[0],setShowNextButton=_useState8[1],_useState9=(0,react.useState)(0),_useState10=(0,slicedToArray.Z)(_useState9,2),scrollValue=_useState10[0],setScrollValue=_useState10[1],tabs=(0,getChildren.AU)(children).map((function(child,index){return react.isValidElement(child)&&"Tab"===child.type.componentName?react.cloneElement(child,{index,key:index}):null})),updateScrollPosition=(0,react.useCallback)((function(){var tabElement=function getChildByIndex(index,parent){if(null!==index){var element=parent.children[index];if(null!==element&&element instanceof HTMLElement)return element}return null}(scrollIndex,tablistElementRef.current);if(null!==tabElement){var tabRightEdgeDistance=tabElement.offsetLeft+tabElement.offsetWidth,tabLeftEdgeDistance=tabElement.offsetLeft,tabRightEdgeOffset=tabRightEdgeDistance-tablistContainerRef.current.offsetWidth;tabRightEdgeOffset>0&&(scrollValuecontainerElement.offsetWidth+offset}(element,tablistContainerRef.current,scrollValue)}))}),[scrollValue]),findNextElementOutsideLeftEdge=(0,react.useCallback)((function(){var tabListElement=tablistElementRef.current,tabIndex=Array.from(tabListElement.children).reverse().findIndex((function(element){return function isElementOutsideLeftEdge(tab,offset){return tab.offsetLeft-1?tabListElement.children.length-tabIndex-1:-1}),[scrollValue]),updateScrollButtons=(0,react.useCallback)((function(){setShowPreviousButton(-1!==findNextElementOutsideLeftEdge()),setShowNextButton(-1!==findNextElementOutsideRightEdge())}),[findNextElementOutsideLeftEdge,findNextElementOutsideRightEdge]);(0,react.useEffect)((function(){var totalWidth=Array.from(tablistElementRef.current.children).reduce((function(total,el){return total+el.offsetWidth}),0);setTablistWidth(totalWidth)}),[children]),(0,react.useEffect)((function(){setScrollIndex(focusedTab)}),[focusedTab]),(0,react.useEffect)((function(){return updateScrollButtons(),window.addEventListener("resize",updateScrollButtons),function(){window.removeEventListener("resize",updateScrollButtons)}}),[updateScrollButtons]),(0,react.useEffect)((function(){updateScrollPosition()}),[updateScrollPosition,scrollIndex,showPreviousButton,showNextButton]);return(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Tabs_module_tablistBar,className),style,children:[showPreviousButton&&(0,jsx_runtime.jsx)("div",{className:Tabs_module_scrollButton,"aria-hidden":"true",children:(0,jsx_runtime.jsx)("button",{type:"button",onClick:function onPreviousButtonClick(){var nextTabIndex=findNextElementOutsideLeftEdge();nextTabIndex>-1&&setScrollIndex(nextTabIndex)},tabIndex:-1,children:(0,jsx_runtime.jsx)(IconAngleLeft.IconAngleLeft,{})})}),(0,jsx_runtime.jsx)("div",{className:Tabs_module_tablist,ref:tablistContainerRef,children:(0,jsx_runtime.jsx)("ul",{role:"tablist",ref:tablistElementRef,onKeyDown:function onKeyDown(event){var nextIndex=null;"ArrowRight"===event.key&&(nextIndex=Math.min(focusedTab+1,tabs.length-1)),"ArrowLeft"===event.key&&(nextIndex=Math.max(focusedTab-1,0)),null!==nextIndex&&setFocusedTab(nextIndex)},style:{width:"".concat(tablistWidth,"px"),transform:scrollValue?"translateX(".concat(-1*scrollValue,"px)"):void 0},children:tabs})}),showNextButton&&(0,jsx_runtime.jsx)("div",{className:Tabs_module_scrollButton,"aria-hidden":"true",children:(0,jsx_runtime.jsx)("button",{type:"button",onClick:function onNextButtonClick(){var nextTabIndex=findNextElementOutsideRightEdge();nextTabIndex>-1&&setScrollIndex(nextTabIndex)},tabIndex:-1,children:(0,jsx_runtime.jsx)(IconAngleRight.IconAngleRight,{})})})]})};TabList.componentName="TabList";try{TabList.displayName="TabList",TabList.__docgenInfo={description:"",displayName:"TabList",props:{className:{defaultValue:null,description:"Additional class names to apply to the Tablist",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:{value:"{}"},description:"Additional styles to apply to the Tablist",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/TabList.tsx#TabList"]={docgenInfo:TabList.__docgenInfo,name:"TabList",path:"src/components/tabs/TabList.tsx#TabList"})}catch(__react_docgen_typescript_loader_error){}var TabPanel=function TabPanel(_ref){var children=_ref.children,className=_ref.className,index=_ref.index,style=_ref.style;return(0,react.useContext)(TabsContext).activeTab===index?(0,jsx_runtime.jsx)("div",{id:"tab-".concat(index,"-panel"),role:"tabpanel","aria-labelledby":"tab-".concat(index,"-button"),className,style,children}):null};TabPanel.componentName="TabPanel";try{TabPanel.displayName="TabPanel",TabPanel.__docgenInfo={description:"",displayName:"TabPanel",props:{className:{defaultValue:null,description:"Additional class names to apply to the Tab",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Additional styles to apply to the Tab",name:"style",required:!1,type:{name:"CSSProperties"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/TabPanel.tsx#TabPanel"]={docgenInfo:TabPanel.__docgenInfo,name:"TabPanel",path:"src/components/tabs/TabPanel.tsx#TabPanel"})}catch(__react_docgen_typescript_loader_error){}var Tab=function Tab(_ref){var children=_ref.children,className=_ref.className,index=_ref.index,onClick=_ref.onClick,style=_ref.style,ref=(0,react.useRef)(null),_useContext=(0,react.useContext)(TabsContext),activeTab=_useContext.activeTab,focusedTab=_useContext.focusedTab,setFocusedTab=_useContext.setFocusedTab,setActiveTab=_useContext.setActiveTab,isActive=activeTab===index;(0,react.useEffect)((function(){focusedTab===index&&ref.current.focus({preventScroll:!0})}),[focusedTab,index]);return(0,jsx_runtime.jsx)("li",{role:"tab","aria-selected":isActive,"aria-controls":"tab-".concat(index,"-panel"),tabIndex:isActive?0:-1,id:"tab-".concat(index,"-button"),className:(0,classNames.Z)(Tabs_module_tab,isActive&&Tabs_module_active,className),style,onClick:function onTabClick(){onClick&&onClick(),setActiveTab(index),setFocusedTab(index)},onKeyDown:function onKeyDown(event){var isEnter="Enter"===event.key||13===event.keyCode,isSpace=" "===event.key||32===event.keyCode;(isEnter||isSpace)&&(onClick&&onClick(),setActiveTab(index))},onFocus:function onFocus(event){event.preventDefault(),focusedTab!==index&&setFocusedTab(index)},ref,children:(0,jsx_runtime.jsx)("span",{children})})};Tab.componentName="Tab";try{Tab.displayName="Tab",Tab.__docgenInfo={description:"",displayName:"Tab",props:{onClick:{defaultValue:null,description:"Custom function callback for on tab click",name:"onClick",required:!1,type:{name:"() => void"}},className:{defaultValue:null,description:"Additional class names to apply to the Tab",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Additional styles to apply to the Tab",name:"style",required:!1,type:{name:"CSSProperties"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/Tab.tsx#Tab"]={docgenInfo:Tab.__docgenInfo,name:"Tab",path:"src/components/tabs/Tab.tsx#Tab"})}catch(__react_docgen_typescript_loader_error){}var Tabs=function Tabs(_ref){var children=_ref.children,_ref$initiallyActiveT=_ref.initiallyActiveTab,initiallyActiveTab=void 0===_ref$initiallyActiveT?0:_ref$initiallyActiveT,_ref$small=_ref.small,small=void 0!==_ref$small&&_ref$small,theme=_ref.theme,_useState=(0,react.useState)(initiallyActiveTab),_useState2=(0,slicedToArray.Z)(_useState,2),activeTab=_useState2[0],setActiveTab=_useState2[1],_useState3=(0,react.useState)(null),_useState4=(0,slicedToArray.Z)(_useState3,2),focusedTab=_useState4[0],setFocusedTab=_useState4[1],customThemeClass=(0,useTheme.F)(Tabs_module_tabs,theme),childElements=(0,getChildren.fL)(children),tabList=childElements.filter((function(child){return react.isValidElement(child)&&"TabList"===child.type.componentName})),tabPanels=childElements.filter((function(child){return react.isValidElement(child)&&"TabPanel"===child.type.componentName})).map((function(child,index){return react.isValidElement(child)?react.cloneElement(child,{index,key:index}):child}));return(0,jsx_runtime.jsx)(TabsContext.Provider,{value:{activeTab,setActiveTab,focusedTab,setFocusedTab},children:(0,jsx_runtime.jsxs)("div",{className:(0,classNames.Z)(Tabs_module_tabs,small&&Tabs_module_small,theme&&customThemeClass),children:[tabList,tabPanels]})})};Tabs.TabList=TabList,Tabs.TabPanel=TabPanel,Tabs.Tab=Tab;try{Tabs.displayName="Tabs",Tabs.__docgenInfo={description:"",displayName:"Tabs",props:{initiallyActiveTab:{defaultValue:{value:"0"},description:"The initially active tab",name:"initiallyActiveTab",required:!1,type:{name:"number"}},small:{defaultValue:{value:"false"},description:"Use the small variant",name:"small",required:!1,type:{name:"boolean"}},theme:{defaultValue:null,description:"Defines the tabs theme",name:"theme",required:!1,type:{name:"TabsCustomTheme"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/Tabs.tsx#Tabs"]={docgenInfo:Tabs.__docgenInfo,name:"Tabs",path:"src/components/tabs/Tabs.tsx#Tabs"})}catch(__react_docgen_typescript_loader_error){}try{Tabs.TabList.displayName="Tabs.TabList",Tabs.TabList.__docgenInfo={description:"",displayName:"Tabs.TabList",props:{className:{defaultValue:null,description:"Additional class names to apply to the Tablist",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:{value:"{}"},description:"Additional styles to apply to the Tablist",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/Tabs.tsx#Tabs.TabList"]={docgenInfo:Tabs.TabList.__docgenInfo,name:"Tabs.TabList",path:"src/components/tabs/Tabs.tsx#Tabs.TabList"})}catch(__react_docgen_typescript_loader_error){}try{Tabs.TabPanel.displayName="Tabs.TabPanel",Tabs.TabPanel.__docgenInfo={description:"",displayName:"Tabs.TabPanel",props:{className:{defaultValue:null,description:"Additional class names to apply to the Tab",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Additional styles to apply to the Tab",name:"style",required:!1,type:{name:"CSSProperties"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/Tabs.tsx#Tabs.TabPanel"]={docgenInfo:Tabs.TabPanel.__docgenInfo,name:"Tabs.TabPanel",path:"src/components/tabs/Tabs.tsx#Tabs.TabPanel"})}catch(__react_docgen_typescript_loader_error){}try{Tabs.Tab.displayName="Tabs.Tab",Tabs.Tab.__docgenInfo={description:"",displayName:"Tabs.Tab",props:{onClick:{defaultValue:null,description:"Custom function callback for on tab click",name:"onClick",required:!1,type:{name:"() => void"}},className:{defaultValue:null,description:"Additional class names to apply to the Tab",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Additional styles to apply to the Tab",name:"style",required:!1,type:{name:"CSSProperties"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tabs/Tabs.tsx#Tabs.Tab"]={docgenInfo:Tabs.Tab.__docgenInfo,name:"Tabs.Tab",path:"src/components/tabs/Tabs.tsx#Tabs.Tab"})}catch(__react_docgen_typescript_loader_error){}const Tabs_stories={component:Tabs,title:"Components/Tabs",decorators:[function(storyFn){return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("style",{children:".example-tablist { margin-bottom: var(--spacing-m); }"}),storyFn()]})}],parameters:{storySource:{source:"import React from 'react';\n\nimport { LoadingSpinner } from '../loadingSpinner';\nimport { Tabs } from './Tabs';\n\nexport default {\n component: Tabs,\n title: 'Components/Tabs',\n decorators: [\n (storyFn) => (\n
\n \n {storyFn()}\n
\n ),\n ],\n parameters: {\n controls: { hideNoControlsWarning: true },\n },\n};\n\nexport const Default = () => (\n \n \n Daycare\n Pre-school\n Basic education\n Upper secondary\n University\n \n \n Daytime care for people who cannot be fully independent, such as children or elderly people.\n \n \n A pre-school is an educational establishment offering early childhood education to children before they begin\n compulsory education at primary school.\n \n \n The objective of basic education in Finland is to support pupils' growth towards humanity and ethically\n responsible membership of society.\n \n \n Upper secondary school studies last three to four years, preparing the students for the matriculation examination.\n \n \n A high-level educational institution in which students study for degrees and academic research is done.\n \n \n);\n\nexport const Small = () => (\n \n \n Daycare\n Pre-school\n Basic education\n Upper secondary\n University\n \n \n Daytime care for people who cannot be fully independent, such as children or elderly people.\n \n \n A pre-school is an educational establishment offering early childhood education to children before they begin\n compulsory education at primary school.\n \n \n The objective of basic education in Finland is to support pupils' growth towards humanity and ethically\n responsible membership of society.\n \n \n Upper secondary school studies last three to four years, preparing the students for the matriculation examination.\n \n \n A high-level educational institution in which students study for degrees and academic research is done.\n \n \n);\n\nexport const WithCustomTheme = () => {\n const theme = {\n '--tab-color': 'var(--color-black-90)',\n '--tab-active-border-color': 'var(--color-metro)',\n };\n\n return (\n \n \n Daycare\n Pre-school\n Basic education\n Upper secondary\n University\n \n \n Daytime care for people who cannot be fully independent, such as children or elderly people.\n \n \n A pre-school is an educational establishment offering early childhood education to children before they begin\n compulsory education at primary school.\n \n \n The objective of basic education in Finland is to support pupils' growth towards humanity and ethically\n responsible membership of society.\n \n \n Upper secondary school studies last three to four years, preparing the students for the matriculation\n examination.\n \n \n A high-level educational institution in which students study for degrees and academic research is done.\n \n \n );\n};\n\nexport const WithCustomOnClickAction = () => {\n const [isLoading, setIsLoading] = React.useState(false);\n const content = {\n education: 'Daytime care for people who cannot be fully independent, such as children or elderly people.',\n university:\n 'The objective of basic education in Finland is to support pupils' growth towards humanity and ethically responsible membership of society.',\n };\n\n const LoadingIndicator = () => (\n
\n \n Tab content is loading\n
\n );\n\n const mockLoading = () => {\n setIsLoading(true);\n setTimeout(() => {\n setIsLoading(false);\n }, 500);\n };\n\n const onTabClick = () => {\n mockLoading();\n };\n\n React.useEffect(() => {\n mockLoading();\n }, []);\n\n return (\n \n \n onTabClick()}>Basic education\n onTabClick()}>University\n \n {isLoading ? : content.education}\n {isLoading ? : content.university}\n \n );\n};\n\nWithCustomOnClickAction.parameters = { loki: { skip: true } };\n",locationsMap:{default:{startLoc:{col:23,line:22},endLoc:{col:1,line:49},startBody:{col:23,line:22},endBody:{col:1,line:49}},small:{startLoc:{col:21,line:51},endLoc:{col:1,line:78},startBody:{col:21,line:51},endBody:{col:1,line:78}},"with-custom-theme":{startLoc:{col:31,line:80},endLoc:{col:1,line:115},startBody:{col:31,line:80},endBody:{col:1,line:115}},"with-custom-on-click-action":{startLoc:{col:39,line:117},endLoc:{col:1,line:161},startBody:{col:39,line:117},endBody:{col:1,line:161}}}},controls:{hideNoControlsWarning:!0}}};var Default=function Default(){return(0,jsx_runtime.jsxs)(Tabs,{children:[(0,jsx_runtime.jsxs)(Tabs.TabList,{className:"example-tablist",children:[(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Daycare"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Pre-school"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Basic education"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Upper secondary"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"University"})]}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"Daytime care for people who cannot be fully independent, such as children or elderly people."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"A pre-school is an educational establishment offering early childhood education to children before they begin compulsory education at primary school."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"The objective of basic education in Finland is to support pupils' growth towards humanity and ethically responsible membership of society."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"Upper secondary school studies last three to four years, preparing the students for the matriculation examination."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"A high-level educational institution in which students study for degrees and academic research is done."})]})},Small=function Small(){return(0,jsx_runtime.jsxs)(Tabs,{small:!0,children:[(0,jsx_runtime.jsxs)(Tabs.TabList,{className:"example-tablist",children:[(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Daycare"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Pre-school"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Basic education"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Upper secondary"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"University"})]}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"Daytime care for people who cannot be fully independent, such as children or elderly people."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"A pre-school is an educational establishment offering early childhood education to children before they begin compulsory education at primary school."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"The objective of basic education in Finland is to support pupils' growth towards humanity and ethically responsible membership of society."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"Upper secondary school studies last three to four years, preparing the students for the matriculation examination."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"A high-level educational institution in which students study for degrees and academic research is done."})]})},WithCustomTheme=function WithCustomTheme(){return(0,jsx_runtime.jsxs)(Tabs,{theme:{"--tab-color":"var(--color-black-90)","--tab-active-border-color":"var(--color-metro)"},children:[(0,jsx_runtime.jsxs)(Tabs.TabList,{className:"example-tablist",children:[(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Daycare"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Pre-school"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Basic education"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"Upper secondary"}),(0,jsx_runtime.jsx)(Tabs.Tab,{children:"University"})]}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"Daytime care for people who cannot be fully independent, such as children or elderly people."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"A pre-school is an educational establishment offering early childhood education to children before they begin compulsory education at primary school."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"The objective of basic education in Finland is to support pupils' growth towards humanity and ethically responsible membership of society."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"Upper secondary school studies last three to four years, preparing the students for the matriculation examination."}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:"A high-level educational institution in which students study for degrees and academic research is done."})]})},WithCustomOnClickAction=function WithCustomOnClickAction(){var _React$useState=react.useState(!1),_React$useState2=(0,slicedToArray.Z)(_React$useState,2),isLoading=_React$useState2[0],setIsLoading=_React$useState2[1],content_education="Daytime care for people who cannot be fully independent, such as children or elderly people.",content_university="The objective of basic education in Finland is to support pupils' growth towards humanity and ethically responsible membership of society.",LoadingIndicator=function LoadingIndicator(){return(0,jsx_runtime.jsxs)("div",{style:{alignItems:"center",display:"flex",gap:"1rem"},children:[(0,jsx_runtime.jsx)(LoadingSpinner.T,{loadingText:"Tab content is loading",loadingFinishedText:"The tab content loading was finished",small:!0}),(0,jsx_runtime.jsx)("span",{children:"Tab content is loading"})]})},mockLoading=function mockLoading(){setIsLoading(!0),setTimeout((function(){setIsLoading(!1)}),500)},onTabClick=function onTabClick(){mockLoading()};return react.useEffect((function(){mockLoading()}),[]),(0,jsx_runtime.jsxs)(Tabs,{initiallyActiveTab:0,children:[(0,jsx_runtime.jsxs)(Tabs.TabList,{className:"example-tablist",children:[(0,jsx_runtime.jsx)(Tabs.Tab,{onClick:function onClick(){return onTabClick()},children:"Basic education"}),(0,jsx_runtime.jsx)(Tabs.Tab,{onClick:function onClick(){return onTabClick()},children:"University"})]}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:isLoading?(0,jsx_runtime.jsx)(LoadingIndicator,{}):content_education}),(0,jsx_runtime.jsx)(Tabs.TabPanel,{children:isLoading?(0,jsx_runtime.jsx)(LoadingIndicator,{}):content_university})]})};WithCustomOnClickAction.parameters={loki:{skip:!0}},Default.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n \n \n Daycare\n Pre-school\n Basic education\n Upper secondary\n University\n \n \n Daytime care for people who cannot be fully independent, such as children or elderly people.\n \n \n A pre-school is an educational establishment offering early childhood education to children before they begin\n compulsory education at primary school.\n \n \n The objective of basic education in Finland is to support pupils' growth towards humanity and ethically\n responsible membership of society.\n \n \n Upper secondary school studies last three to four years, preparing the students for the matriculation examination.\n \n \n A high-level educational institution in which students study for degrees and academic research is done.\n \n \n)'}},Default.parameters),Small.parameters=(0,objectSpread2.Z)({storySource:{source:'() => (\n \n \n Daycare\n Pre-school\n Basic education\n Upper secondary\n University\n \n \n Daytime care for people who cannot be fully independent, such as children or elderly people.\n \n \n A pre-school is an educational establishment offering early childhood education to children before they begin\n compulsory education at primary school.\n \n \n The objective of basic education in Finland is to support pupils' growth towards humanity and ethically\n responsible membership of society.\n \n \n Upper secondary school studies last three to four years, preparing the students for the matriculation examination.\n \n \n A high-level educational institution in which students study for degrees and academic research is done.\n \n \n)'}},Small.parameters),WithCustomTheme.parameters=(0,objectSpread2.Z)({storySource:{source:"() => {\n const theme = {\n '--tab-color': 'var(--color-black-90)',\n '--tab-active-border-color': 'var(--color-metro)',\n };\n\n return (\n \n \n Daycare\n Pre-school\n Basic education\n Upper secondary\n University\n \n \n Daytime care for people who cannot be fully independent, such as children or elderly people.\n \n \n A pre-school is an educational establishment offering early childhood education to children before they begin\n compulsory education at primary school.\n \n \n The objective of basic education in Finland is to support pupils' growth towards humanity and ethically\n responsible membership of society.\n \n \n Upper secondary school studies last three to four years, preparing the students for the matriculation\n examination.\n \n \n A high-level educational institution in which students study for degrees and academic research is done.\n \n \n );\n}"}},WithCustomTheme.parameters),WithCustomOnClickAction.parameters=(0,objectSpread2.Z)({storySource:{source:"() => {\n const [isLoading, setIsLoading] = React.useState(false);\n const content = {\n education: 'Daytime care for people who cannot be fully independent, such as children or elderly people.',\n university:\n 'The objective of basic education in Finland is to support pupils' growth towards humanity and ethically responsible membership of society.',\n };\n\n const LoadingIndicator = () => (\n
\n \n Tab content is loading\n
\n );\n\n const mockLoading = () => {\n setIsLoading(true);\n setTimeout(() => {\n setIsLoading(false);\n }, 500);\n };\n\n const onTabClick = () => {\n mockLoading();\n };\n\n React.useEffect(() => {\n mockLoading();\n }, []);\n\n return (\n \n \n onTabClick()}>Basic education\n onTabClick()}>University\n \n {isLoading ? : content.education}\n {isLoading ? : content.university}\n \n );\n}"}},WithCustomOnClickAction.parameters)},"./src/components/tag/Tag.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ClickableTag:()=>ClickableTag,CustomTheme:()=>CustomTheme,Default:()=>Default,DeletableTag:()=>DeletableTag,LargeDeletableTag:()=>LargeDeletableTag,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("../../node_modules/@storybook/addon-actions/dist/esm/index.js")),_Tag__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/tag/Tag.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_Tag__WEBPACK_IMPORTED_MODULE_3__.V,title:"Components/Tag",parameters:{storySource:{source:"import React from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport { Tag } from './Tag';\n\nexport default {\n component: Tag,\n title: 'Components/Tag',\n parameters: {\n controls: { expanded: true },\n },\n args: {\n children: 'Americum',\n },\n};\n\nexport const Default = (args) => ;\n\nexport const ClickableTag = (args) => (\n <>\n action(`Click: ${args.children}`)()}>\n {args.children}\n \n action(`Click: ${args.children}`)()}\n >\n {args.children}\n \n \n);\n\nexport const DeletableTag = (args) => {\n return (\n action(`Delete item: ${args.children}`)()}\n >\n {args.children}\n \n );\n};\n\nexport const CustomTheme = (args) => (\n action(`Click: ${args.children}`)()}>\n {args.children}\n \n);\n\nCustomTheme.args = {\n theme: {\n '--tag-background': 'var(--color-engel)',\n '--tag-color': 'var(--color-black-90)',\n '--tag-focus-outline-color': 'var(--color-black-90)',\n },\n};\n\nexport const LargeDeletableTag = (args) => {\n return (\n action(`Delete item: ${args.children}`)()}\n >\n {args.children}\n \n );\n};\n",locationsMap:{default:{startLoc:{col:23,line:17},endLoc:{col:50,line:17},startBody:{col:23,line:17},endBody:{col:50,line:17}},"clickable-tag":{startLoc:{col:28,line:19},endLoc:{col:1,line:35},startBody:{col:28,line:19},endBody:{col:1,line:35}},"deletable-tag":{startLoc:{col:28,line:37},endLoc:{col:1,line:48},startBody:{col:28,line:37},endBody:{col:1,line:48}},"custom-theme":{startLoc:{col:27,line:50},endLoc:{col:1,line:54},startBody:{col:27,line:50},endBody:{col:1,line:54}},"large-deletable-tag":{startLoc:{col:33,line:64},endLoc:{col:1,line:75},startBody:{col:33,line:64},endBody:{col:1,line:75}}}},controls:{expanded:!0}},args:{children:"Americum"}};var Default=function Default(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tag__WEBPACK_IMPORTED_MODULE_3__.V,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args))},ClickableTag=function ClickableTag(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tag__WEBPACK_IMPORTED_MODULE_3__.V,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args),{},{label:"Link",role:"link",id:"link",onClick:function onClick(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("Click: ".concat(args.children))()},children:args.children})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tag__WEBPACK_IMPORTED_MODULE_3__.V,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args),{},{label:"Button",role:"button",id:"button",style:{marginLeft:"var(--spacing-s)"},onClick:function onClick(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("Click: ".concat(args.children))()},children:args.children}))]})},DeletableTag=function DeletableTag(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tag__WEBPACK_IMPORTED_MODULE_3__.V,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args),{},{deleteButtonAriaLabel:"Delete item: ".concat(args.children),srOnlyLabel:!0,onDelete:function onDelete(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("Delete item: ".concat(args.children))()},children:args.children}))},CustomTheme=function CustomTheme(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tag__WEBPACK_IMPORTED_MODULE_3__.V,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args),{},{onClick:function onClick(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("Click: ".concat(args.children))()},children:args.children}))};CustomTheme.args={theme:{"--tag-background":"var(--color-engel)","--tag-color":"var(--color-black-90)","--tag-focus-outline-color":"var(--color-black-90)"}};var LargeDeletableTag=function LargeDeletableTag(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tag__WEBPACK_IMPORTED_MODULE_3__.V,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},args),{},{size:"large",deleteButtonAriaLabel:"Delete item",onDelete:function onDelete(){return(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.action)("Delete item: ".concat(args.children))()},children:args.children}))};Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => "}},Default.parameters),ClickableTag.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'(args) => (\n <>\n action(`Click: ${args.children}`)()}>\n {args.children}\n \n action(`Click: ${args.children}`)()}\n >\n {args.children}\n \n \n)'}},ClickableTag.parameters),DeletableTag.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => {\n return (\n action(`Delete item: ${args.children}`)()}\n >\n {args.children}\n \n );\n}"}},DeletableTag.parameters),CustomTheme.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => (\n action(`Click: ${args.children}`)()}>\n {args.children}\n \n)"}},CustomTheme.parameters),LargeDeletableTag.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'(args) => {\n return (\n action(`Delete item: ${args.children}`)()}\n >\n {args.children}\n \n );\n}'}},LargeDeletableTag.parameters);try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tag/Tag.stories.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/components/tag/Tag.stories.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{ClickableTag.displayName="ClickableTag",ClickableTag.__docgenInfo={description:"",displayName:"ClickableTag",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tag/Tag.stories.tsx#ClickableTag"]={docgenInfo:ClickableTag.__docgenInfo,name:"ClickableTag",path:"src/components/tag/Tag.stories.tsx#ClickableTag"})}catch(__react_docgen_typescript_loader_error){}try{DeletableTag.displayName="DeletableTag",DeletableTag.__docgenInfo={description:"",displayName:"DeletableTag",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tag/Tag.stories.tsx#DeletableTag"]={docgenInfo:DeletableTag.__docgenInfo,name:"DeletableTag",path:"src/components/tag/Tag.stories.tsx#DeletableTag"})}catch(__react_docgen_typescript_loader_error){}try{CustomTheme.displayName="CustomTheme",CustomTheme.__docgenInfo={description:"",displayName:"CustomTheme",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tag/Tag.stories.tsx#CustomTheme"]={docgenInfo:CustomTheme.__docgenInfo,name:"CustomTheme",path:"src/components/tag/Tag.stories.tsx#CustomTheme"})}catch(__react_docgen_typescript_loader_error){}try{LargeDeletableTag.displayName="LargeDeletableTag",LargeDeletableTag.__docgenInfo={description:"",displayName:"LargeDeletableTag",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/tag/Tag.stories.tsx#LargeDeletableTag"]={docgenInfo:LargeDeletableTag.__docgenInfo,name:"LargeDeletableTag",path:"src/components/tag/Tag.stories.tsx#LargeDeletableTag"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/textInput/TextInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Disabled:()=>Disabled,Info:()=>Info,Invalid:()=>Invalid,NumberInput:()=>NumberInput,Playground:()=>Playground,ReadOnly:()=>ReadOnly,Success:()=>Success,UsingRef:()=>UsingRef,WithLabelHidden:()=>WithLabelHidden,WithTooltip:()=>WithTooltip,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js"),_TextInput__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/textInput/TextInput.tsx"),_button__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),textInputProps={helperText:"Assistive text",id:"hdsInput",label:"Label",placeholder:"Placeholder"};const __WEBPACK_DEFAULT_EXPORT__={component:_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,title:"Components/TextInput",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:"import React, { useRef } from 'react';\nimport { ArgsTable, Stories, Title } from '@storybook/addon-docs/blocks';\n\nimport { TextInput } from './TextInput';\nimport { Button } from '../button';\n\nconst textInputProps = {\n helperText: 'Assistive text',\n id: 'hdsInput',\n label: 'Label',\n placeholder: 'Placeholder',\n};\n\nexport default {\n component: TextInput,\n title: 'Components/TextInput',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { hideNoControlsWarning: true },\n docs: {\n page: () => (\n <>\n Props\n \n \n \n ),\n },\n },\n};\n\nexport const Default = () => ;\n\nexport const ReadOnly = () => ;\nReadOnly.storyName = 'Read-only';\n\nexport const Disabled = () => ;\n\nexport const Invalid = () => ;\n\nexport const Success = () => ;\n\nexport const Info = () => ;\n\nexport const WithLabelHidden = () => ;\nWithLabelHidden.storyName = 'With label hidden';\n\nexport const WithTooltip = () => (\n \n);\nWithTooltip.storyName = 'With tooltip';\n\nexport const NumberInput = () => ;\n\nexport const UsingRef = () => {\n const ref = useRef(null);\n\n return (\n <>\n \n \n \n );\n};\nUsingRef.storyName = 'Using ref';\n\nexport const Playground = (args) => (\n \n);\n\nPlayground.parameters = {\n previewTabs: {\n 'storybook/docs/panel': {\n hidden: true,\n },\n },\n docs: {\n disable: true,\n },\n};\n\nPlayground.args = {\n ...textInputProps,\n type: 'text',\n disabled: false,\n required: false,\n readOnly: false,\n invalid: false,\n errorText: undefined,\n hideLabel: false,\n tooltipAriaLabel: 'Tooltip',\n tooltipText:\n 'Tooltips contain \"nice to have\" information. Default Tooltip contents should not be longer than two to three sentences. For longer descriptions, provide a link to a separate page.',\n tooltipButtonAriaLabelText: 'Tooltip',\n};\n",locationsMap:{default:{startLoc:{col:23,line:32},endLoc:{col:62,line:32},startBody:{col:23,line:32},endBody:{col:62,line:32}},"read-only":{startLoc:{col:24,line:34},endLoc:{col:104,line:34},startBody:{col:24,line:34},endBody:{col:104,line:34}},disabled:{startLoc:{col:24,line:37},endLoc:{col:104,line:37},startBody:{col:24,line:37},endBody:{col:104,line:37}},invalid:{startLoc:{col:23,line:39},endLoc:{col:93,line:39},startBody:{col:23,line:39},endBody:{col:93,line:39}},success:{startLoc:{col:23,line:41},endLoc:{col:89,line:41},startBody:{col:23,line:41},endBody:{col:89,line:41}},info:{startLoc:{col:20,line:43},endLoc:{col:80,line:43},startBody:{col:20,line:43},endBody:{col:80,line:43}},"with-label-hidden":{startLoc:{col:31,line:45},endLoc:{col:80,line:45},startBody:{col:31,line:45},endBody:{col:80,line:45}},"with-tooltip":{startLoc:{col:27,line:48},endLoc:{col:1,line:55},startBody:{col:27,line:48},endBody:{col:1,line:55}},"number-input":{startLoc:{col:27,line:58},endLoc:{col:80,line:58},startBody:{col:27,line:58},endBody:{col:80,line:58}},"using-ref":{startLoc:{col:24,line:60},endLoc:{col:1,line:71},startBody:{col:24,line:60},endBody:{col:1,line:71}},playground:{startLoc:{col:26,line:74},endLoc:{col:1,line:91},startBody:{col:26,line:74},endBody:{col:1,line:91}}}},controls:{hideNoControlsWarning:!0},docs:{page:function page(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.Dx,{children:"Props"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.$4,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.fQ,{title:"Examples",includePrimary:!0})]})}}}};var Default=function Default(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps))},ReadOnly=function ReadOnly(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{readOnly:!0,defaultValue:"Text input value"}))};ReadOnly.storyName="Read-only";var Disabled=function Disabled(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{disabled:!0,defaultValue:"Text input value"}))},Invalid=function Invalid(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{invalid:!0,errorText:"Error text"}))},Success=function Success(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{successText:"Success text"}))},Info=function Info(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{infoText:"Info text"}))},WithLabelHidden=function WithLabelHidden(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{hideLabel:!0}))};WithLabelHidden.storyName="With label hidden";var WithTooltip=function WithTooltip(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{tooltipLabel:"Tooltip",tooltipButtonLabel:"Tooltip",tooltipText:'Tooltips contain "nice to have" information. Default Tooltip contents should not be longer than two to three sentences. For longer descriptions, provide a link to a separate page.'}))};WithTooltip.storyName="With tooltip";var NumberInput=function NumberInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{type:"number"}))},UsingRef=function UsingRef(){var ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_button__WEBPACK_IMPORTED_MODULE_5__.z,{onClick:function onClick(){var _ref$current;return null==ref||null===(_ref$current=ref.current)||void 0===_ref$current?void 0:_ref$current.focus()},style:{marginBottom:"1rem"},theme:"black",size:"small",children:"Focus input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{ref}))]})};UsingRef.storyName="Using ref";var Playground=function Playground(args){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_TextInput__WEBPACK_IMPORTED_MODULE_3__.o,{id:args.id,label:args.label,helperText:args.helperText,placeholder:args.placeholder,readOnly:args.readOnly,type:args.type,disabled:args.disabled,invalid:args.invalid,errorText:args.errorText,hideLabel:args.hideLabel,required:args.required,tooltipLabel:args.tooltipLabel,tooltipText:args.tooltipText,tooltipButtonLabel:args.tooltipButtonAriaLabelText})};Playground.parameters={previewTabs:{"storybook/docs/panel":{hidden:!0}},docs:{disable:!0}},Playground.args=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)((0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({},textInputProps),{},{type:"text",disabled:!1,required:!1,readOnly:!1,invalid:!1,errorText:void 0,hideLabel:!1,tooltipAriaLabel:"Tooltip",tooltipText:'Tooltips contain "nice to have" information. Default Tooltip contents should not be longer than two to three sentences. For longer descriptions, provide a link to a separate page.',tooltipButtonAriaLabelText:"Tooltip"}),Default.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => "}},Default.parameters),ReadOnly.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},ReadOnly.parameters),Disabled.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Disabled.parameters),Invalid.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Invalid.parameters),Success.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Success.parameters),Info.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},Info.parameters),WithLabelHidden.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"() => "}},WithLabelHidden.parameters),WithTooltip.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => (\n \n)'}},WithTooltip.parameters),NumberInput.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => '}},NumberInput.parameters),UsingRef.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:'() => {\n const ref = useRef(null);\n\n return (\n <>\n \n \n \n );\n}'}},UsingRef.parameters),Playground.parameters=(0,_Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__.Z)({storySource:{source:"(args) => (\n \n)"}},Playground.parameters);try{Playground.displayName="Playground",Playground.__docgenInfo={description:"",displayName:"Playground",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/textInput/TextInput.stories.tsx#Playground"]={docgenInfo:Playground.__docgenInfo,name:"Playground",path:"src/components/textInput/TextInput.stories.tsx#Playground"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/textarea/TextArea.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Disabled:()=>Disabled,Info:()=>Info,Invalid:()=>Invalid,Playground:()=>Playground,Success:()=>Success,WithLabelHidden:()=>WithLabelHidden,WithTooltip:()=>WithTooltip,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_harri_lappalainen_git_helsinki_design_system_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("./node_modules/@storybook/addon-docs/blocks.js")),_TextArea__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/textarea/TextArea.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),textAreaProps={helperText:"Assistive text",id:"textArea",label:"Label",placeholder:"Placeholder"},value="Lorem ipsum dolor sit amet, consectetur adipiscing elit.";const __WEBPACK_DEFAULT_EXPORT__={component:_TextArea__WEBPACK_IMPORTED_MODULE_3__.K,title:"Components/TextArea",decorators:[function(storyFn){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{maxWidth:"400px"},children:storyFn()})}],parameters:{storySource:{source:"import React from 'react';\nimport { ArgsTable, Stories, Title } from '@storybook/addon-docs/blocks';\n\nimport { TextArea } from './TextArea';\n\nconst textAreaProps = {\n helperText: 'Assistive text',\n id: 'textArea',\n label: 'Label',\n placeholder: 'Placeholder',\n};\nconst value = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';\n\nexport default {\n component: TextArea,\n title: 'Components/TextArea',\n decorators: [(storyFn) =>
{storyFn()}
],\n parameters: {\n controls: { hideNoControlsWarning: true },\n docs: {\n page: () => (\n <>\n Props\n \n \n \n ),\n },\n },\n};\n\nexport const Default = () =>