PNG  IHDRQgAMA a cHRMz&u0`:pQ<bKGDgmIDATxwUﹻ& ^CX(J I@ "% (** BX +*i"]j(IH{~R)[~>h{}gy)I$Ij .I$I$ʊy@}x.: $I$Ii}VZPC)I$IF ^0ʐJ$I$Q^}{"r=OzI$gRZeC.IOvH eKX $IMpxsk.쒷/&r[޳<v| .I~)@$updYRa$I |M.e JaֶpSYR6j>h%IRز if&uJ)M$I vLi=H;7UJ,],X$I1AҒJ$ XY XzI@GNҥRT)E@;]K*Mw;#5_wOn~\ DC&$(A5 RRFkvIR}l!RytRl;~^ǷJj اy뷦BZJr&ӥ8Pjw~vnv X^(I;4R=P[3]J,]ȏ~:3?[ a&e)`e*P[4]T=Cq6R[ ~ޤrXR Հg(t_HZ-Hg M$ãmL5R uk*`%C-E6/%[t X.{8P9Z.vkXŐKjgKZHg(aK9ڦmKjѺm_ \#$5,)-  61eJ,5m| r'= &ڡd%-]J on Xm|{ RҞe $eڧY XYrԮ-a7RK6h>n$5AVڴi*ֆK)mѦtmr1p| q:흺,)Oi*ֺK)ܬ֦K-5r3>0ԔHjJئEZj,%re~/z%jVMڸmrt)3]J,T K֦OvԒgii*bKiNO~%PW0=dii2tJ9Jݕ{7"I P9JKTbu,%r"6RKU}Ij2HKZXJ,妝 XYrP ެ24c%i^IK|.H,%rb:XRl1X4Pe/`x&P8Pj28Mzsx2r\zRPz4J}yP[g=L) .Q[6RjWgp FIH*-`IMRaK9TXcq*I y[jE>cw%gLRԕiFCj-ďa`#e~I j,%r,)?[gp FI˨mnWX#>mʔ XA DZf9,nKҲzIZXJ,L#kiPz4JZF,I,`61%2s $,VOϚ2/UFJfy7K> X+6 STXIeJILzMfKm LRaK9%|4p9LwJI!`NsiazĔ)%- XMq>pk$-$Q2x#N ؎-QR}ᶦHZډ)J,l#i@yn3LN`;nڔ XuX5pF)m|^0(>BHF9(cզEerJI rg7 4I@z0\JIi䵙RR0s;$s6eJ,`n 䂦0a)S)A 1eJ,堌#635RIgpNHuTH_SԕqVe ` &S)>p;S$魁eKIuX`I4춒o}`m$1":PI<[v9^\pTJjriRŭ P{#{R2,`)e-`mgj~1ϣLKam7&U\j/3mJ,`F;M'䱀 .KR#)yhTq;pcK9(q!w?uRR,n.yw*UXj#\]ɱ(qv2=RqfB#iJmmL<]Y͙#$5 uTU7ӦXR+q,`I}qL'`6Kͷ6r,]0S$- [RKR3oiRE|nӦXR.(i:LDLTJjY%o:)6rxzҒqTJjh㞦I.$YR.ʼnGZ\ֿf:%55 I˼!6dKxm4E"mG_ s? .e*?LRfK9%q#uh$)i3ULRfK9yxm܌bj84$i1U^@Wbm4uJ,ҪA>_Ij?1v32[gLRD96oTaR׿N7%L2 NT,`)7&ƝL*꽙yp_$M2#AS,`)7$rkTA29_Iye"|/0t)$n XT2`YJ;6Jx".e<`$) PI$5V4]29SRI>~=@j]lp2`K9Jaai^" Ԋ29ORI%:XV5]JmN9]H;1UC39NI%Xe78t)a;Oi Ҙ>Xt"~G>_mn:%|~ޅ_+]$o)@ǀ{hgN;IK6G&rp)T2i୦KJuv*T=TOSV>(~D>dm,I*Ɛ:R#ۙNI%D>G.n$o;+#RR!.eU˽TRI28t)1LWϚ>IJa3oFbu&:tJ*(F7y0ZR ^p'Ii L24x| XRI%ۄ>S1]Jy[zL$adB7.eh4%%누>WETf+3IR:I3Xה)3אOۦSRO'ٺ)S}"qOr[B7ϙ.edG)^ETR"RtRݜh0}LFVӦDB^k_JDj\=LS(Iv─aTeZ%eUAM-0;~˃@i|l @S4y72>sX-vA}ϛBI!ݎߨWl*)3{'Y|iSlEڻ(5KtSI$Uv02,~ԩ~x;P4ցCrO%tyn425:KMlD ^4JRxSهF_}شJTS6uj+ﷸk$eZO%G*^V2u3EMj3k%)okI]dT)URKDS 7~m@TJR~荪fT"֛L \sM -0T KfJz+nإKr L&j()[E&I ߴ>e FW_kJR|!O:5/2跌3T-'|zX ryp0JS ~^F>-2< `*%ZFP)bSn"L :)+pʷf(pO3TMW$~>@~ū:TAIsV1}S2<%ޟM?@iT ,Eūoz%i~g|`wS(]oȤ8)$ ntu`өe`6yPl IzMI{ʣzʨ )IZ2= ld:5+請M$-ї;U>_gsY$ÁN5WzWfIZ)-yuXIfp~S*IZdt;t>KūKR|$#LcԀ+2\;kJ`]YǔM1B)UbG"IRߊ<xܾӔJ0Z='Y嵤 Leveg)$znV-º^3Ւof#0Tfk^Zs[*I꯳3{)ˬW4Ւ4 OdpbZRS|*I 55#"&-IvT&/윚Ye:i$ 9{LkuRe[I~_\ؠ%>GL$iY8 9ܕ"S`kS.IlC;Ҏ4x&>u_0JLr<J2(^$5L s=MgV ~,Iju> 7r2)^=G$1:3G< `J3~&IR% 6Tx/rIj3O< ʔ&#f_yXJiގNSz; Tx(i8%#4 ~AS+IjerIUrIj362v885+IjAhK__5X%nV%Iͳ-y|7XV2v4fzo_68"S/I-qbf; LkF)KSM$ Ms>K WNV}^`-큧32ŒVؙGdu,^^m%6~Nn&͓3ŒVZMsRpfEW%IwdǀLm[7W&bIRL@Q|)* i ImsIMmKmyV`i$G+R 0tV'!V)֏28vU7͒vHꦼtxꗞT ;S}7Mf+fIRHNZUkUx5SAJㄌ9MqμAIRi|j5)o*^'<$TwI1hEU^c_j?Е$%d`z cyf,XO IJnTgA UXRD }{H}^S,P5V2\Xx`pZ|Yk:$e ~ @nWL.j+ϝYb퇪bZ BVu)u/IJ_ 1[p.p60bC >|X91P:N\!5qUB}5a5ja `ubcVxYt1N0Zzl4]7­gKj]?4ϻ *[bg$)+À*x쳀ogO$~,5 زUS9 lq3+5mgw@np1sso Ӻ=|N6 /g(Wv7U;zωM=wk,0uTg_`_P`uz?2yI!b`kĸSo+Qx%!\οe|އԁKS-s6pu_(ֿ$i++T8=eY; צP+phxWQv*|p1. ά. XRkIQYP,drZ | B%wP|S5`~́@i޾ E;Չaw{o'Q?%iL{u D?N1BD!owPHReFZ* k_-~{E9b-~P`fE{AܶBJAFO wx6Rox5 K5=WwehS8 (JClJ~ p+Fi;ŗo+:bD#g(C"wA^ r.F8L;dzdIHUX݆ϞXg )IFqem%I4dj&ppT{'{HOx( Rk6^C٫O.)3:s(۳(Z?~ٻ89zmT"PLtw䥈5&b<8GZ-Y&K?e8,`I6e(֍xb83 `rzXj)F=l($Ij 2*(F?h(/9ik:I`m#p3MgLaKjc/U#n5S# m(^)=y=đx8ŬI[U]~SцA4p$-F i(R,7Cx;X=cI>{Km\ o(Tv2vx2qiiDJN,Ҏ!1f 5quBj1!8 rDFd(!WQl,gSkL1Bxg''՞^ǘ;pQ P(c_ IRujg(Wz bs#P­rz> k c&nB=q+ؔXn#r5)co*Ũ+G?7< |PQӣ'G`uOd>%Mctz# Ԫڞ&7CaQ~N'-P.W`Oedp03C!IZcIAMPUۀ5J<\u~+{9(FbbyAeBhOSܳ1 bÈT#ŠyDžs,`5}DC-`̞%r&ڙa87QWWp6e7 Rϫ/oY ꇅ Nܶըtc!LA T7V4Jsū I-0Pxz7QNF_iZgúWkG83 0eWr9 X]㾮݁#Jˢ C}0=3ݱtBi]_ &{{[/o[~ \q鯜00٩|cD3=4B_b RYb$óBRsf&lLX#M*C_L܄:gx)WΘsGSbuL rF$9';\4Ɍq'n[%p.Q`u hNb`eCQyQ|l_C>Lb꟟3hSb #xNxSs^ 88|Mz)}:](vbۢamŖ࿥ 0)Q7@0=?^k(*J}3ibkFn HjB׻NO z x}7p 0tfDX.lwgȔhԾŲ }6g E |LkLZteu+=q\Iv0쮑)QٵpH8/2?Σo>Jvppho~f>%bMM}\//":PTc(v9v!gոQ )UfVG+! 35{=x\2+ki,y$~A1iC6#)vC5^>+gǵ@1Hy٪7u;p psϰu/S <aʸGu'tD1ԝI<pg|6j'p:tպhX{o(7v],*}6a_ wXRk,O]Lܳ~Vo45rp"N5k;m{rZbΦ${#)`(Ŵg,;j%6j.pyYT?}-kBDc3qA`NWQū20/^AZW%NQ MI.X#P#,^Ebc&?XR tAV|Y.1!؅⨉ccww>ivl(JT~ u`ٵDm q)+Ri x/x8cyFO!/*!/&,7<.N,YDŽ&ܑQF1Bz)FPʛ?5d 6`kQձ λc؎%582Y&nD_$Je4>a?! ͨ|ȎWZSsv8 j(I&yj Jb5m?HWp=g}G3#|I,5v珿] H~R3@B[☉9Ox~oMy=J;xUVoj bUsl_35t-(ՃɼRB7U!qc+x4H_Qo֮$[GO<4`&č\GOc[.[*Af%mG/ ňM/r W/Nw~B1U3J?P&Y )`ѓZ1p]^l“W#)lWZilUQu`-m|xĐ,_ƪ|9i:_{*(3Gѧ}UoD+>m_?VPۅ15&}2|/pIOʵ> GZ9cmíتmnz)yߐbD >e}:) r|@R5qVSA10C%E_'^8cR7O;6[eKePGϦX7jb}OTGO^jn*媓7nGMC t,k31Rb (vyܴʭ!iTh8~ZYZp(qsRL ?b}cŨʊGO^!rPJO15MJ[c&~Z`"ѓޔH1C&^|Ш|rʼ,AwĴ?b5)tLU)F| &g٣O]oqSUjy(x<Ϳ3 .FSkoYg2 \_#wj{u'rQ>o;%n|F*O_L"e9umDds?.fuuQbIWz |4\0 sb;OvxOSs; G%T4gFRurj(֍ڑb uԖKDu1MK{1^ q; C=6\8FR艇!%\YÔU| 88m)֓NcLve C6z;o&X x59:q61Z(T7>C?gcļxѐ Z oo-08jہ x,`' ҔOcRlf~`jj".Nv+sM_]Zk g( UOPyεx%pUh2(@il0ݽQXxppx-NS( WO+轾 nFߢ3M<;z)FBZjciu/QoF 7R¥ ZFLF~#ȣߨ^<쩡ݛкvџ))ME>ώx4m#!-m!L;vv#~Y[đKmx9.[,UFS CVkZ +ߟrY٧IZd/ioi$%͝ب_ֶX3ܫhNU ZZgk=]=bbJS[wjU()*I =ώ:}-蹞lUj:1}MWm=̛ _ ¾,8{__m{_PVK^n3esw5ӫh#$-q=A̟> ,^I}P^J$qY~Q[ Xq9{#&T.^GVj__RKpn,b=`żY@^՝;z{paVKkQXj/)y TIc&F;FBG7wg ZZDG!x r_tƢ!}i/V=M/#nB8 XxЫ ^@CR<{䤭YCN)eKOSƟa $&g[i3.C6xrOc8TI;o hH6P&L{@q6[ Gzp^71j(l`J}]e6X☉#͕ ׈$AB1Vjh㭦IRsqFBjwQ_7Xk>y"N=MB0 ,C #o6MRc0|$)ف"1!ixY<B9mx `,tA>)5ػQ?jQ?cn>YZe Tisvh# GMމȇp:ԴVuږ8ɼH]C.5C!UV;F`mbBk LTMvPʍϤj?ԯ/Qr1NB`9s"s TYsz &9S%U԰> {<ؿSMxB|H\3@!U| k']$U+> |HHMLޢ?V9iD!-@x TIî%6Z*9X@HMW#?nN ,oe6?tQwڱ.]-y':mW0#!J82qFjH -`ѓ&M0u Uγmxϵ^-_\])@0Rt.8/?ٰCY]x}=sD3ojަЫNuS%U}ԤwHH>ڗjܷ_3gN q7[q2la*ArǓԖ+p8/RGM ]jacd(JhWko6ڎbj]i5Bj3+3!\j1UZLsLTv8HHmup<>gKMJj0@H%,W΃7R) ">c, xixј^ aܖ>H[i.UIHc U1=yW\=S*GR~)AF=`&2h`DzT󑓶J+?W+}C%P:|0H܆}-<;OC[~o.$~i}~HQ TvXΈr=b}$vizL4:ȰT|4~*!oXQR6Lk+#t/g lԁߖ[Jڶ_N$k*". xsxX7jRVbAAʯKҎU3)zSNN _'s?f)6X!%ssAkʱ>qƷb hg %n ~p1REGMHH=BJiy[<5 ǁJҖgKR*倳e~HUy)Ag,K)`Vw6bRR:qL#\rclK/$sh*$ 6덤 KԖc 3Z9=Ɣ=o>X Ώ"1 )a`SJJ6k(<c e{%kϊP+SL'TcMJWRm ŏ"w)qc ef꒵i?b7b('"2r%~HUS1\<(`1Wx9=8HY9m:X18bgD1u ~|H;K-Uep,, C1 RV.MR5άh,tWO8WC$ XRVsQS]3GJ|12 [vM :k#~tH30Rf-HYݺ-`I9%lIDTm\ S{]9gOڒMNCV\G*2JRŨ;Rҏ^ڽ̱mq1Eu?To3I)y^#jJw^Ńj^vvlB_⋌P4x>0$c>K†Aļ9s_VjTt0l#m>E-,,x,-W)سo&96RE XR.6bXw+)GAEvL)͞K4$p=Ũi_ѱOjb HY/+@θH9޼]Nԥ%n{ &zjT? Ty) s^ULlb,PiTf^<À] 62R^V7)S!nllS6~͝V}-=%* ʻ>G DnK<y&>LPy7'r=Hj 9V`[c"*^8HpcO8bnU`4JȪAƋ#1_\ XϘHPRgik(~G~0DAA_2p|J묭a2\NCr]M_0 ^T%e#vD^%xy-n}-E\3aS%yN!r_{ )sAw ڼp1pEAk~v<:`'ӭ^5 ArXOI驻T (dk)_\ PuA*BY]yB"l\ey hH*tbK)3 IKZ򹞋XjN n *n>k]X_d!ryBH ]*R 0(#'7 %es9??ښFC,ՁQPjARJ\Ρw K#jahgw;2$l*) %Xq5!U᢯6Re] |0[__64ch&_}iL8KEgҎ7 M/\`|.p,~`a=BR?xܐrQ8K XR2M8f ?`sgWS%" Ԉ 7R%$ N}?QL1|-эټwIZ%pvL3Hk>,ImgW7{E xPHx73RA @RS CC !\ȟ5IXR^ZxHл$Q[ŝ40 (>+ _C >BRt<,TrT {O/H+˟Pl6 I B)/VC<6a2~(XwV4gnXR ϱ5ǀHٻ?tw똤Eyxp{#WK qG%5],(0ӈH HZ])ג=K1j&G(FbM@)%I` XRg ʔ KZG(vP,<`[ Kn^ SJRsAʠ5xՅF`0&RbV tx:EaUE/{fi2;.IAwW8/tTxAGOoN?G}l L(n`Zv?pB8K_gI+ܗ #i?ޙ.) p$utc ~DžfՈEo3l/)I-U?aԅ^jxArA ΧX}DmZ@QLےbTXGd.^|xKHR{|ΕW_h] IJ`[G9{).y) 0X YA1]qp?p_k+J*Y@HI>^?gt.06Rn ,` ?);p pSF9ZXLBJPWjgQ|&)7! HjQt<| ؅W5 x W HIzYoVMGP Hjn`+\(dNW)F+IrS[|/a`K|ͻ0Hj{R,Q=\ (F}\WR)AgSG`IsnAR=|8$}G(vC$)s FBJ?]_u XRvύ6z ŨG[36-T9HzpW̞ú Xg큽=7CufzI$)ki^qk-) 0H*N` QZkk]/tnnsI^Gu't=7$ Z;{8^jB% IItRQS7[ϭ3 $_OQJ`7!]W"W,)Iy W AJA;KWG`IY{8k$I$^%9.^(`N|LJ%@$I}ֽp=FB*xN=gI?Q{٥4B)mw $Igc~dZ@G9K X?7)aK%݅K$IZ-`IpC U6$I\0>!9k} Xa IIS0H$I H ?1R.Чj:4~Rw@p$IrA*u}WjWFPJ$I➓/6#! LӾ+ X36x8J |+L;v$Io4301R20M I$-E}@,pS^ޟR[/s¹'0H$IKyfŸfVOπFT*a$I>He~VY/3R/)>d$I>28`Cjw,n@FU*9ttf$I~<;=/4RD~@ X-ѕzἱI$: ԍR a@b X{+Qxuq$IЛzo /~3\8ڒ4BN7$IҀj V]n18H$IYFBj3̵̚ja pp $Is/3R Ӻ-Yj+L;.0ŔI$Av? #!5"aʄj}UKmɽH$IjCYs?h$IDl843.v}m7UiI=&=0Lg0$I4: embe` eQbm0u? $IT!Sƍ'-sv)s#C0:XB2a w I$zbww{."pPzO =Ɔ\[ o($Iaw]`E).Kvi:L*#gР7[$IyGPI=@R 4yR~̮´cg I$I/<tPͽ hDgo 94Z^k盇΄8I56^W$I^0̜N?4*H`237}g+hxoq)SJ@p|` $I%>-hO0eO>\ԣNߌZD6R=K ~n($I$y3D>o4b#px2$yڪtzW~a $I~?x'BwwpH$IZݑnC㧄Pc_9sO gwJ=l1:mKB>Ab<4Lp$Ib o1ZQ@85b̍ S'F,Fe,^I$IjEdù{l4 8Ys_s Z8.x m"+{~?q,Z D!I$ϻ'|XhB)=…']M>5 rgotԎ 獽PH$IjIPhh)n#cÔqA'ug5qwU&rF|1E%I$%]!'3AFD/;Ck_`9 v!ٴtPV;x`'*bQa w I$Ix5 FC3D_~A_#O݆DvV?<qw+I$I{=Z8".#RIYyjǪ=fDl9%M,a8$I$Ywi[7ݍFe$s1ՋBVA?`]#!oz4zjLJo8$I$%@3jAa4(o ;p,,dya=F9ً[LSPH$IJYЉ+3> 5"39aZ<ñh!{TpBGkj}Sp $IlvF.F$I z< '\K*qq.f<2Y!S"-\I$IYwčjF$ w9 \ߪB.1v!Ʊ?+r:^!I$BϹB H"B;L'G[ 4U#5>੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/home/austenwhite.co.uk/www/dev/pub/static/adminhtml/Magento/backend/en_US/js/bundle/
Upload File :
Current File : /home/austenwhite.co.uk/www/dev/pub/static/adminhtml/Magento/backend/en_US/js/bundle/bundle1.js
require.config({"config": {
        "jsbuild":{"Magento_Catalog/catalog/product/composite/configure.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery',\n    'Magento_Ui/js/lib/view/utils/async',\n    'jquery/ui',\n    'mage/translate',\n    'prototype',\n    'Magento_Ui/js/modal/modal'\n], function (jQuery) {\n\n    window.ProductConfigure = Class.create();\n\n    ProductConfigure.prototype = {\n\n        listTypes:                  $H({}),\n        current:                    $H({}),\n        itemsFilter:                $H({}),\n        blockWindow:                null,\n        blockForm:                  null,\n        blockFormFields:            null,\n        blockFormAdd:               null,\n        blockFormConfirmed:         null,\n        blockConfirmed:             null,\n        blockIFrame:                null,\n        blockCancelBtn:             null,\n        blockMask:                  null,\n        blockMsg:                   null,\n        blockMsgError:              null,\n        windowHeight:               null,\n        confirmedCurrentId:         null,\n        confirmCallback:            {},\n        cancelCallback:             {},\n        onLoadIFrameCallback:       {},\n        showWindowCallback:         {},\n        beforeSubmitCallback:       {},\n        iFrameJSVarname:            null,\n        _listTypeId:                1,\n\n        /**\n         * Initialize object\n         */\n        initialize: function () {\n            var self = this,\n                popupDialog = jQuery('#product_composite_configure');\n\n            this._initWindowElements();\n            jQuery.async('#product_composite_configure', function (el) {\n                if (el !== popupDialog[0]) {\n                    el = popupDialog[0];\n                }\n                self.dialog = jQuery(el).modal({\n                    title: jQuery.mage.__('Configure Product'),\n                    type: 'slide',\n                    buttons: [{\n                        text: jQuery.mage.__('OK'),\n                        'class': 'action-primary',\n                        click: function () {\n                            self.onConfirmBtn();\n                        }\n                    }],\n                    closed: function () {\n                        self.clean('window');\n                    },\n                });\n            });\n        },\n\n        /**\n         * Initialize window elements\n         */\n        _initWindowElements: function () {\n            this.blockWindow                = $('product_composite_configure');\n            this.blockForm                  = $('product_composite_configure_form');\n            this.blockFormFields            = $('product_composite_configure_form_fields');\n            this.blockFormAdd               = $('product_composite_configure_form_additional');\n            this.blockFormConfirmed         = $('product_composite_configure_form_confirmed');\n            this.blockConfirmed             = $('product_composite_configure_confirmed');\n            this.blockIFrame                = $('product_composite_configure_iframe');\n            this.blockCancelBtn             = $('product_composite_configure_form_cancel');\n            this.blockMsg                   = $('product_composite_configure_messages');\n            this.blockMsgError              = this.blockMsg.select('.message.error div')[0];\n            this.iFrameJSVarname            = this.blockForm.select('input[name=\"as_js_varname\"]')[0].value;\n        },\n\n        /**\n         * Returns next unique list type id\n         */\n        _generateListTypeId: function () {\n            return '_internal_lt_' + this._listTypeId++;\n        },\n\n        /**\n         * Add product list types as scope and their urls\n         * example: addListType('product_to_add', {urlFetch: 'http://magento...'})\n         * example: addListType('wishlist', {urlSubmit: 'http://magento...'})\n         *\n         * @param type types as scope\n         * @param urls obj can be\n         *             - {urlFetch: 'http://magento...'} for fetching configuration fields through ajax\n         *             - {urlConfirm: 'http://magento...'} for submit configured data through iFrame when clicked confirm button\n         *             - {urlSubmit: 'http://magento...'} for submit configured data through iFrame\n         */\n        addListType: function (type, urls) {\n            if ('undefined' == typeof this.listTypes[type]) {\n                this.listTypes[type] = {};\n            }\n            Object.extend(this.listTypes[type], urls);\n\n            return this;\n        },\n\n        /**\n         * Adds complex list type - that is used to submit several list types at once\n         * Only urlSubmit is possible for this list type\n         * example: addComplexListType(['wishlist', 'product_list'], 'http://magento...')\n         *\n         * @param type types as scope\n         * @param urls obj can be\n         *             - {urlSubmit: 'http://magento...'} for submit configured data through iFrame\n         * @return type string\n         */\n        addComplexListType: function (types, urlSubmit) {\n            var type = this._generateListTypeId();\n\n            this.listTypes[type] = {};\n            this.listTypes[type].complexTypes = types;\n            this.listTypes[type].urlSubmit = urlSubmit;\n\n            return type;\n        },\n\n        /**\n         * Add filter of items\n         *\n         * @param listType scope name\n         * @param itemsFilter\n         */\n        addItemsFilter: function (listType, itemsFilter) {\n            if (!listType || !itemsFilter) {\n                return false;\n            }\n\n            if ('undefined' == typeof this.itemsFilter[listType]) {\n                this.itemsFilter[listType] = [];\n            }\n            this.itemsFilter[listType] = this.itemsFilter[listType].concat(itemsFilter);\n\n            return this;\n        },\n\n        /**\n         * Returns id of block where configuration for an item is stored\n         *\n         * @param listType scope name\n         * @param itemId\n         * @return string\n         */\n        _getConfirmedBlockId: function (listType, itemId) {\n            return this.blockConfirmed.id + '[' + listType + '][' + itemId + ']';\n        },\n\n        /**\n         * Checks whether item has some configuration fields\n         *\n         * @param listType scope name\n         * @param itemId\n         * @return bool\n         */\n        itemConfigured: function (listType, itemId) {\n            var confirmedBlockId = this._getConfirmedBlockId(listType, itemId);\n            var itemBlock = $(confirmedBlockId);\n\n            return !!(itemBlock && itemBlock.innerHTML);\n        },\n\n        /**\n         * Show configuration fields of item, if it not found then get it through ajax\n         *\n         * @param listType scope name\n         * @param itemId\n         */\n        showItemConfiguration: function (listType, itemId) {\n            if (!listType || !itemId) {\n                return false;\n            }\n\n            this.initialize();\n            this.current.listType = listType;\n            this.current.itemId = itemId;\n            this.confirmedCurrentId = this._getConfirmedBlockId(listType, itemId);\n\n            if (!this.itemConfigured(listType, itemId)) {\n                this._requestItemConfiguration(listType, itemId);\n            } else {\n                this._processFieldsData('item_restore');\n                this._showWindow();\n            }\n        },\n\n        /**\n         * Get configuration fields of product through ajax and show them\n         *\n         * @param listType scope name\n         * @param itemId\n         */\n        _requestItemConfiguration: function (listType, itemId) {\n            if (!this.listTypes[listType].urlFetch) {\n                return false;\n            }\n            var url = this.listTypes[listType].urlFetch;\n\n            if (url) {\n                new Ajax.Request(url, {\n                    parameters: {\n                        id: itemId\n                    },\n                    onSuccess: function (transport) {\n                        var response = transport.responseText;\n\n                        if (response.isJSON()) {\n                            response = response.evalJSON();\n\n                            if (response.error) {\n                                this.blockMsg.show();\n                                this.blockMsgError.innerHTML = response.message;\n                                if(this.blockCancelBtn) {\n                                    this.blockCancelBtn.hide();\n                                }\n                                this.setConfirmCallback(listType, null);\n                                this._showWindow();\n                            }\n                        } else if (response) {\n                            response += '';\n                            this.blockFormFields.update(response);\n\n                            // Add special div to hold mage data, e.g. scripts to execute on every popup show\n                            var mageData = {};\n                            var scripts = response.extractScripts();\n\n                            mageData.scripts = scripts;\n\n                            var scriptHolder = new Element('div', {\n                                'style': 'display:none'\n                            });\n\n                            scriptHolder.mageData = mageData;\n                            this.blockFormFields.insert(scriptHolder);\n\n                            // Show window\n                            this._showWindow();\n                        }\n                    }.bind(this)\n                });\n            }\n        },\n\n        /**\n         * Triggered on confirm button click\n         * Do submit configured data through iFrame if needed\n         */\n        onConfirmBtn: function () {\n            if (jQuery(this.blockForm).valid()) {\n                if (this.listTypes[this.current.listType].urlConfirm) {\n                    this.submit();\n                } else {\n                    this._processFieldsData('item_confirm');\n                    this._closeWindow();\n\n                    if (Object.isFunction(this.confirmCallback[this.current.listType])) {\n                        this.confirmCallback[this.current.listType]();\n                    }\n                }\n            }\n\n            return this;\n        },\n\n        /**\n         * Triggered on cancel button click\n         */\n        onCancelBtn: function () {\n            this._closeWindow();\n\n            if (Object.isFunction(this.cancelCallback[this.current.listType])) {\n                this.cancelCallback[this.current.listType]();\n            }\n\n            return this;\n        },\n\n        /**\n         * Submit configured data through iFrame\n         *\n         * @param listType scope name\n         */\n        submit: function (listType) {\n            // prepare data\n            if (listType) {\n                this.current.listType = listType;\n                this.current.itemId = null;\n            }\n            var urlConfirm = this.listTypes[this.current.listType].urlConfirm;\n            var urlSubmit = this.listTypes[this.current.listType].urlSubmit;\n\n            if (!urlConfirm && !urlSubmit) {\n                return false;\n            }\n\n            if (urlConfirm) {\n                this.blockForm.action = urlConfirm;\n                this.addFields([new Element('input', {\n                    type: 'hidden', name: 'id', value: this.current.itemId\n                })]);\n            } else {\n                this.blockForm.action = urlSubmit;\n\n                var complexTypes = this.listTypes[this.current.listType].complexTypes;\n\n                if (complexTypes) {\n                    this.addFields([new Element('input', {\n                        type: 'hidden', name: 'configure_complex_list_types', value: complexTypes.join(',')\n                    })]);\n                }\n\n                this._processFieldsData('current_confirmed_to_form');\n\n                // Disable item controls that duplicate added fields (e.g. sometimes qty controls can intersect)\n                // so they won't be submitted\n                var tagNames = ['input', 'select', 'textarea'];\n\n                var names = {}; // Map of added field names\n\n                for (var i = 0, len = tagNames.length; i < len; i++) {\n                    var tagName = tagNames[i];\n                    var elements = this.blockFormAdd.getElementsByTagName(tagName);\n\n                    for (var index = 0, elLen = elements.length; index < elLen; index++) {\n                        names[elements[index].name] = true;\n                    }\n                }\n\n                for (var i = 0, len = tagNames.length; i < len; i++) {\n                    var tagName = tagNames[i];\n                    var elements = this.blockFormConfirmed.getElementsByTagName(tagName);\n\n                    for (var index = 0, elLen = elements.length; index < elLen; index++) {\n                        var element = elements[index];\n\n                        if (names[element.name]) {\n                            element.setAttribute('configure_disabled', 1);\n                            element.setAttribute('configure_prev_disabled', element.disabled ? 1 : 0);\n                            element.disabled = true;\n                        } else {\n                            element.setAttribute('configure_disabled', 0);\n                        }\n                    }\n                }\n            }\n            // do submit\n            if (Object.isFunction(this.beforeSubmitCallback[this.current.listType])) {\n                this.beforeSubmitCallback[this.current.listType]();\n            }\n            this.blockForm.submit();\n\n            // Show loader\n            jQuery(this.blockForm).trigger('processStart');\n\n            return this;\n        },\n\n        /**\n         * Add dynamically additional fields for form\n         *\n         * @param fields\n         */\n        addFields: function (fields) {\n            fields.each(function (elm) {\n                this.blockFormAdd.insert(elm);\n            }.bind(this));\n\n            return this;\n        },\n\n        /**\n         * Triggered when form was submitted and iFrame was loaded. Get response from iFrame and handle it\n         */\n        onLoadIFrame: function () {\n            this.blockFormConfirmed.select('[configure_disabled=1]').each(function (element) {\n                element.disabled = element.getAttribute('configure_prev_disabled') == '1';\n            });\n\n            this._processFieldsData('form_confirmed_to_confirmed');\n\n            var response = this.blockIFrame.contentWindow[this.iFrameJSVarname];\n\n            if (response && 'object' == typeof response) {\n                if (this.listTypes[this.current.listType].urlConfirm) {\n                    if (response.ok) {\n                        this._closeWindow();\n                        this.clean('current');\n                    } else if (response.error) {\n                        this.showItemConfiguration(this.current.listType, this.current.itemId);\n                        this.blockMsg.show();\n                        this.blockMsgError.innerHTML = response.message;\n                        this._showWindow();\n\n                        jQuery(this.blockForm).trigger('processStop');\n                        return false;\n                    }\n                }\n\n                if (Object.isFunction(this.onLoadIFrameCallback[this.current.listType])) {\n                    this.onLoadIFrameCallback[this.current.listType](response);\n                }\n                document.fire(this.current.listType + ':afterIFrameLoaded');\n            }\n            // Hide loader\n            jQuery(this.blockForm).trigger('processStop');\n\n            this.clean('current');\n            this.initialize();\n        },\n\n        /**\n         * Helper for fetching content from iFrame\n         */\n        _getIFrameContent: function () {\n            var content = this.blockIFrame.contentWindow || this.blockIFrame.contentDocument;\n\n            if (content.document) {\n                content = content.document;\n            }\n\n            return content;\n        },\n\n        /**\n         * Helper to find qty of currently confirmed item\n         */\n        getCurrentConfirmedQtyElement: function () {\n            var elms = $(this.confirmedCurrentId).getElementsByTagName('input');\n\n            for (var i = 0; i < elms.length; i++) {\n                if (elms[i].name == 'qty') {\n                    return elms[i];\n                }\n            }\n        },\n\n        /**\n         * Helper to find select element of currently confirmed item\n         */\n        getCurrentConfirmedSelectElement: function () {\n            return $(this.confirmedCurrentId).getElementsByTagName('select');\n        },\n\n        /**\n         * Helper to find qty of active form\n         */\n        getCurrentFormQtyElement: function () {\n            var elms = this.blockFormFields.getElementsByTagName('input');\n\n            for (var i = 0; i < elms.length; i++) {\n                if (elms[i].name == 'qty') {\n                    return elms[i];\n                }\n            }\n        },\n\n        /**\n         * Show configuration window\n         */\n        _showWindow: function () {\n            this.dialog.modal('openModal');\n            //this._toggleSelectsExceptBlock(false);\n\n            if (Object.isFunction(this.showWindowCallback[this.current.listType])) {\n                this.showWindowCallback[this.current.listType]();\n            }\n        },\n\n        /**\n         * Close configuration window\n         */\n        _closeWindow: function () {\n            this.dialog.modal('closeModal');\n            //this.blockWindow.style.display = 'none';\n            //this.clean('window');\n        },\n\n        /**\n         * Attach callback function triggered when confirm button was clicked\n         *\n         * @param confirmCallback\n         */\n        setConfirmCallback: function (listType, confirmCallback) {\n            this.confirmCallback[listType] = confirmCallback;\n\n            return this;\n        },\n\n        /**\n         * Attach callback function triggered when cancel button was clicked\n         *\n         * @param cancelCallback\n         */\n        setCancelCallback: function (listType, cancelCallback) {\n            this.cancelCallback[listType] = cancelCallback;\n\n            return this;\n        },\n\n        /**\n         * Attach callback function triggered when iFrame was loaded\n         *\n         * @param onLoadIFrameCallback\n         */\n        setOnLoadIFrameCallback: function (listType, onLoadIFrameCallback) {\n            this.onLoadIFrameCallback[listType] = onLoadIFrameCallback;\n\n            return this;\n        },\n\n        /**\n         * Attach callback function triggered when iFrame was loaded\n         *\n         * @param showWindowCallback\n         */\n        setShowWindowCallback: function (listType, showWindowCallback) {\n            this.showWindowCallback[listType] = showWindowCallback;\n\n            return this;\n        },\n\n        /**\n         * Attach callback function triggered before submitting form\n         *\n         * @param beforeSubmitCallback\n         */\n        setBeforeSubmitCallback: function (listType, beforeSubmitCallback) {\n            this.beforeSubmitCallback[listType] = beforeSubmitCallback;\n\n            return this;\n        },\n\n        /**\n         * Clean object data\n         *\n         * @param method can be 'all' or 'current'\n         */\n        clean: function (method) {\n            var listInfo = null;\n            var listTypes = null;\n            var removeConfirmed = function (listTypes) {\n                this.blockConfirmed.childElements().each(function (elm) {\n                    for (var i = 0, len = listTypes.length; i < len; i++) {\n                        var pattern = this.blockConfirmed.id + '[' + listTypes[i] + ']';\n\n                        if (elm.id.indexOf(pattern) == 0) {\n                            elm.remove();\n                            break;\n                        }\n                    }\n                }.bind(this));\n            }.bind(this);\n\n            switch (method) {\n                case 'current':\n                    listInfo = this.listTypes[this.current.listType];\n                    listTypes = [this.current.listType];\n\n                    if (listInfo && listInfo.complexTypes) {\n                        listTypes = listTypes.concat(listInfo.complexTypes);\n                    }\n                    removeConfirmed(listTypes);\n                    break;\n\n                case 'window':\n                    this.blockFormFields.update();\n                    this.blockMsg.hide();\n                    this.blockMsgError.update();\n                    if(this.blockCancelBtn) {\n                        this.blockCancelBtn.show();\n                    }\n                    break;\n                default:\n                    // search in list types for its cleaning\n                    if (this.listTypes[method]) {\n                        listInfo = this.listTypes[method];\n                        listTypes = [method];\n\n                        if (listInfo.complexTypes) {\n                            listTypes = listTypes.concat(listInfo.complexTypes);\n                        }\n                        removeConfirmed(listTypes);\n                        // clean all\n                    } else if (!method) {\n                        this.current = $H({});\n                        this.blockConfirmed.update();\n                        this.blockFormFields.update();\n                        this.blockMsg.hide();\n                        this.blockMsgError.update();\n                        if(this.blockCancelBtn) {\n                            this.blockCancelBtn.show();\n                        }\n                    }\n                    break;\n            }\n            this._getIFrameContent().body.innerHTML = '';\n            this.blockIFrame.contentWindow[this.iFrameJSVarname] = {};\n            this.blockFormAdd.update();\n            this.blockFormConfirmed.update();\n            this.blockForm.action = '';\n\n            return this;\n        },\n\n        /**\n         * Process fields data: save, restore, move saved to form and back\n         *\n         * @param method can be 'item_confirm', 'item_restore', 'current_confirmed_to_form', 'form_confirmed_to_confirmed'\n         */\n        _processFieldsData: function (method) {\n            var self = this;\n\n            /**\n             * Internal function for rename fields names of some list type\n             * if listType is not specified, then it won't be added as prefix to all names\n             *\n             * @param method can be 'current_confirmed_to_form', 'form_confirmed_to_confirmed'\n             * @param blockItem\n             */\n            var _renameFields = function (method, blockItem, listType) {\n                var pattern           = null;\n                var patternFlat       = null;\n                var patternPrefix     = RegExp('\\\\s', 'g');\n                var replacement       = null;\n                var replacementFlat   = null;\n                var replacementPrefix = '_';\n                var scopeArr          = blockItem.id.match(/.*\\[\\w+\\]\\[([^\\]]+)\\]$/);\n                var itemId            = scopeArr[1];\n\n                if (method == 'current_confirmed_to_form') {\n                    pattern         = RegExp('(\\\\w+)(\\\\[?)');\n                    patternFlat     = RegExp('(\\\\w+)');\n                    replacement     = 'item[' + itemId + '][$1]$2';\n                    replacementFlat = 'item_' + itemId + '_$1';\n\n                    if (listType) {\n                        replacement = 'list[' + listType + '][item][' + itemId + '][$1]$2';\n                        replacementFlat = 'list_' + listType + '_' + replacementFlat;\n                    }\n                } else if (method == 'form_confirmed_to_confirmed') {\n                    var stPattern = 'item\\\\[' + itemId + '\\\\]\\\\[(\\\\w+)\\\\](.*)';\n                    var stPatternFlat = 'item_' + itemId + '_(\\\\w+)';\n\n                    if (listType) {\n                        stPattern = 'list\\\\[' + listType + '\\\\]\\\\[item\\\\]\\\\[' + itemId + '\\\\]\\\\[(\\\\w+)\\\\](.*)';\n                        stPatternFlat = 'list_' + listType + '_' + stPatternFlat;\n                    }\n                    pattern         = new RegExp(stPattern);\n                    patternFlat     = new RegExp(stPatternFlat);\n                    replacement     = '$1$2';\n                    replacementFlat = '$1';\n                } else {\n                    return false;\n                }\n                var rename = function (elms) {\n                    for (var i = 0; i < elms.length; i++) {\n                        if (elms[i].name && elms[i].type == 'file') {\n                            var prefixName = 'options[files_prefix]',\n                                prefixValue = 'item_' + itemId + '_';\n\n                            self.blockFormFields.insert(new Element('input', {\n                                type: 'hidden',\n                                name: prefixName.replace(pattern, replacement),\n                                value: prefixValue.replace(patternPrefix, replacementPrefix)\n                            }));\n                            elms[i].name = elms[i].name.replace(patternFlat, replacementFlat);\n                        } else if (elms[i].name) {\n                            elms[i].name = elms[i].name.replace(pattern, replacement);\n                        }\n                    }\n                };\n\n                rename(blockItem.getElementsByTagName('input'));\n                rename(blockItem.getElementsByTagName('select'));\n                rename(blockItem.getElementsByTagName('textarea'));\n            };\n\n            switch (method) {\n                case 'item_confirm':\n                    if (!$(this.confirmedCurrentId)) {\n                        this.blockConfirmed.insert(new Element('div', {\n                            id: this.confirmedCurrentId\n                        }));\n                    } else {\n                        $(this.confirmedCurrentId).update();\n                    }\n                    this.blockFormFields.childElements().each(function (elm) {\n                        $(this.confirmedCurrentId).insert(elm);\n                    }.bind(this));\n                    break;\n\n                case 'item_restore':\n                    this.blockFormFields.update();\n\n                    // clone confirmed to form\n                    var mageData = null;\n\n                    $(this.confirmedCurrentId).childElements().each(function (elm) {\n                        var cloned = elm.cloneNode(true);\n\n                        if (elm.mageData) {\n                            cloned.mageData = elm.mageData;\n                            mageData = elm.mageData;\n                        }\n                        this.blockFormFields.insert(cloned);\n                    }.bind(this));\n\n                    // get confirmed values\n                    var fieldsValue = {};\n                    var getConfirmedValues = function (elms) {\n                        for (var i = 0; i < elms.length; i++) {\n                            if (elms[i].name) {\n                                if ('undefined' == typeof fieldsValue[elms[i].name]) {\n                                    fieldsValue[elms[i].name] = {};\n                                }\n\n                                if (elms[i].type == 'checkbox') {\n                                    fieldsValue[elms[i].name][elms[i].value] = elms[i].checked;\n                                } else if (elms[i].type == 'radio') {\n                                    if (elms[i].checked) {\n                                        fieldsValue[elms[i].name] = elms[i].value;\n                                    }\n                                } else {\n                                    fieldsValue[elms[i].name] = Form.Element.getValue(elms[i]);\n                                }\n                            }\n                        }\n                    };\n\n                    getConfirmedValues($(this.confirmedCurrentId).getElementsByTagName('input'));\n                    getConfirmedValues($(this.confirmedCurrentId).getElementsByTagName('select'));\n                    getConfirmedValues($(this.confirmedCurrentId).getElementsByTagName('textarea'));\n\n                    // restore confirmed values\n                    var restoreConfirmedValues = function (elms) {\n                        for (var i = 0; i < elms.length; i++) {\n                            if ('undefined' != typeof fieldsValue[elms[i].name]) {\n                                if (elms[i].type != 'file') {\n                                    if (elms[i].type == 'checkbox') {\n                                        elms[i].checked = fieldsValue[elms[i].name][elms[i].value];\n                                    } else if (elms[i].type == 'radio') {\n                                        if (elms[i].value == fieldsValue[elms[i].name]) {\n                                            elms[i].checked = true;\n                                        }\n                                    } else {\n                                        elms[i].setValue(fieldsValue[elms[i].name]);\n                                    }\n                                }\n                            }\n                        }\n                    };\n\n                    restoreConfirmedValues(this.blockFormFields.getElementsByTagName('input'));\n                    restoreConfirmedValues(this.blockFormFields.getElementsByTagName('select'));\n                    restoreConfirmedValues(this.blockFormFields.getElementsByTagName('textarea'));\n\n                    // Execute scripts\n                    if (mageData && mageData.scripts) {\n                        this.restorePhase = true;\n\n                        try {\n                            mageData.scripts.map(function (script) {\n                                return eval(script);\n                            });\n                        } catch (e) {\n\n                        }\n                        this.restorePhase = false;\n                    }\n                    break;\n\n                case 'current_confirmed_to_form':\n                    var allowedListTypes = {};\n\n                    allowedListTypes[this.current.listType] = true;\n                    var listInfo = this.listTypes[this.current.listType];\n\n                    if (listInfo.complexTypes) {\n                        for (var i = 0, len = listInfo.complexTypes.length; i < len; i++) {\n                            allowedListTypes[listInfo.complexTypes[i]] = true;\n                        }\n                    }\n\n                    this.blockFormConfirmed.update();\n                    this.blockConfirmed.childElements().each(function (blockItem) {\n                        var scopeArr    = blockItem.id.match(/.*\\[(\\w+)\\]\\[([^\\]]+)\\]$/);\n                        var listType    = scopeArr[1];\n                        var itemId    = scopeArr[2];\n\n                        if (allowedListTypes[listType] && (!this.itemsFilter[listType] ||\n                            this.itemsFilter[listType].indexOf(itemId) != -1)) {\n                            _renameFields(method, blockItem, listInfo.complexTypes ? listType : null);\n                            this.blockFormConfirmed.insert(blockItem);\n                        }\n                    }.bind(this));\n                    break;\n\n                case 'form_confirmed_to_confirmed':\n                    var listInfo = this.listTypes[this.current.listType];\n\n                    this.blockFormConfirmed.childElements().each(function (blockItem) {\n                        var scopeArr = blockItem.id.match(/.*\\[(\\w+)\\]\\[([^\\]]+)\\]$/);\n                        var listType = scopeArr[1];\n\n                        _renameFields(method, blockItem, listInfo.complexTypes ? listType : null);\n                        this.blockConfirmed.insert(blockItem);\n                    }.bind(this));\n                    break;\n            }\n        },\n\n        /**\n         * Check if qty selected correctly\n         *\n         * @param object element\n         * @param object event\n         */\n        changeOptionQty: function (element, event) {\n            var checkQty = true;\n\n            if ('undefined' != typeof event) {\n                if (event.keyCode == 8 || event.keyCode == 46) {\n                    checkQty = false;\n                }\n            }\n\n            if (checkQty && (Number(element.value) <= 0 || isNaN(Number(element.value)))) {\n                element.value = 1;\n            }\n        }\n    };\n\n    productConfigure = new ProductConfigure();\n    jQuery(document).trigger('productConfigure:inited');\n    jQuery(document).data('productConfigureInited', true);\n});\n","Magento_Catalog/catalog/product/attribute/unique-validate.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'mage/backend/validation'\n], function (jQuery) {\n    'use strict';\n\n    return function (config) {\n        var msg = '',\n            _config = jQuery.extend({\n                element: null,\n                message: '',\n                uniqueClass: 'required-unique'\n            }, config),\n\n            /** @inheritdoc */\n            messager = function () {\n                return msg;\n            };\n\n        if (typeof _config.element === 'string') {\n            jQuery.validator.addMethod(\n                _config.element,\n\n                function (value, element) {\n                    var inputs = jQuery(element)\n                            .closest('table')\n                            .find('.' + _config.uniqueClass + ':visible'),\n                        valuesHash = {},\n                        isValid = true,\n                        duplicates = [];\n\n                    inputs.each(function (el) {\n                        var inputValue = inputs[el].value;\n\n                        if (typeof valuesHash[inputValue] !== 'undefined') {\n                            isValid = false;\n                            duplicates.push(inputValue);\n                        }\n                        valuesHash[inputValue] = el;\n                    });\n\n                    if (!isValid) {\n                        msg = _config.message + ' (' + duplicates.join(', ') + ')';\n                    }\n\n                    return isValid;\n                },\n\n                messager\n            );\n        }\n    };\n});\n","Magento_Catalog/catalog/product/edit/attribute.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'mage/mage',\n    'validation'\n], function ($) {\n    'use strict';\n\n    return function (config, element) {\n        $(element).mage('form').validation({\n            validationUrl: config.validationUrl\n        });\n    };\n});\n","Magento_Catalog/js/price-option-date.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'priceUtils',\n    'priceOptions',\n    'jquery-ui-modules/widget'\n], function ($, utils) {\n    'use strict';\n\n    var globalOptions = {\n            fromSelector: 'form',\n            dropdownsSelector: '[data-role=calendar-dropdown]'\n        },\n        optionHandler = {};\n\n    optionHandler.optionHandlers = {};\n\n    /**\n     * Custom handler for Date-with-Dropdowns option type.\n     * @param  {jQuery} siblings\n     * @return {Function} function that return object { optionHash : optionAdditionalPrice }\n     */\n    function onCalendarDropdownChange(siblings) {\n        return function (element, optionConfig) {\n            var changes = {},\n                optionId = utils.findOptionId(element),\n                overhead = optionConfig[optionId].prices,\n                isNeedToUpdate = true,\n                optionHash = 'price-option-calendar-' + optionId;\n\n            siblings.each(function (index, el) {\n                isNeedToUpdate = isNeedToUpdate && !!$(el).val();\n            });\n\n            overhead = isNeedToUpdate ? overhead : {};\n            changes[optionHash] = overhead;\n\n            return changes;\n        };\n    }\n\n    /**\n     * Returns number of days for special month and year\n     * @param  {Number} month\n     * @param  {Number} year\n     * @return {Number}\n     */\n    function getDaysInMonth(month, year) {\n        return new Date(year, month, 0).getDate();\n    }\n\n    /**\n     * Adjusts the number of days in the day option element based on which month or year\n     * is selected (changed). Adjusts the days to 28, 29, 30, or 31 typically.\n     * @param {jQuery} dropdowns\n     */\n    function onDateChange(dropdowns) {\n        var daysNodes,\n            curMonth, curYear, expectedDays,\n            options, needed,\n            month = dropdowns.filter('[data-calendar-role=month]'),\n            year = dropdowns.filter('[data-calendar-role=year]');\n\n        if (month.length && year.length) {\n            daysNodes = dropdowns.filter('[data-calendar-role=day]').find('option');\n\n            curMonth = month.val() || '01';\n            curYear = year.val() || '2000';\n            expectedDays = getDaysInMonth(curMonth, curYear);\n\n            if (daysNodes.length - 1 > expectedDays) { // remove unnecessary option nodes\n                daysNodes.each(function (i, e) {\n                    if (e.value > expectedDays) {\n                        $(e).remove();\n                    }\n                });\n            } else if (daysNodes.length - 1 < expectedDays) { // add missing option nodes\n                options = [];\n                needed = expectedDays - daysNodes.length + 1;\n\n                while (needed--) { //eslint-disable-line max-depth\n                    options.push(\n                        '<option value=\"' + (expectedDays - needed) + '\">' + (expectedDays - needed) + '</option>'\n                    );\n                }\n                $(options.join('')).insertAfter(daysNodes.last());\n            }\n        }\n    }\n\n    $.widget('mage.priceOptionDate', {\n        options: globalOptions,\n\n        /**\n         * Function-initializer of priceOptionDate widget\n         * @private\n         */\n        _create: function initOptionDate() {\n            var field = this.element,\n                form = field.closest(this.options.fromSelector),\n                dropdowns = $(this.options.dropdownsSelector, field),\n                dateOptionId;\n\n            if (dropdowns.length) {\n                dateOptionId = this.options.dropdownsSelector + dropdowns.attr('name');\n\n                optionHandler.optionHandlers[dateOptionId] = onCalendarDropdownChange(dropdowns);\n\n                form.priceOptions(optionHandler);\n\n                dropdowns.data('role', dateOptionId);\n                dropdowns.on('change', onDateChange.bind(this, dropdowns));\n            }\n        }\n    });\n\n    return $.mage.priceOptionDate;\n});\n","Magento_Catalog/js/category-tree.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'jquery/ui',\n    'jquery/jstree/jquery.jstree'\n], function ($) {\n    'use strict';\n\n    $.widget('mage.categoryTree', {\n        options: {\n            url: '',\n            data: [],\n            tree: {\n                core: {\n                    themes: {\n                        dots: false\n                    }\n                }\n            }\n        },\n\n        /** @inheritdoc */\n        _create: function () {\n            var options = this.options,\n                treeOptions = $.extend(\n                    true,\n                    {},\n                    options.tree,\n                    {\n                        core: {\n                            data: this._convertData(this.options.data).children\n                        }\n                    }\n                );\n\n            this.element.jstree(treeOptions);\n            this.element.on('select_node.jstree', $.proxy(this._selectNode, this));\n        },\n\n        /**\n         * @param {jQuery.Event} event\n         * @param {Object} data\n         * @private\n         */\n        _selectNode: function (event, data) {\n            var node = data.node;\n\n            if (!node.state.disabled) {\n                window.location = window.location + '/' + node.id;\n            } else {\n                event.preventDefault();\n            }\n        },\n\n        /**\n         * @param {Array} nodes\n         * @returns {Array}\n         * @private\n         */\n        _convertDataNodes: function (nodes) {\n            var nodesData = [];\n\n            nodes.children.forEach(function (node) {\n                nodesData.push(this._convertData(node));\n            }, this);\n\n            return nodesData;\n        },\n\n        /**\n         * @param {Object} node\n         * @return {*}\n         * @private\n         */\n        _convertData: function (node) {\n            var self = this,\n                result;\n\n            if (!node) {\n                return result;\n            }\n            // jscs:disable requireCamelCaseOrUpperCaseIdentifiers\n            result = {\n                id: node.id,\n                text: node.name + ' (' + node.product_count + ')',\n                li_attr: {\n                    class: node.cls + (!!node.disabled ? ' disabled' : '') //eslint-disable-line no-extra-boolean-cast\n                },\n                state: {\n                    disabled: node.disabled,\n                    opened:  !!node.children_count && node.expanded\n                }\n            };\n            // jscs:enable requireCamelCaseOrUpperCaseIdentifiers\n            if (node.children) {\n                result.children = [];\n                $.each(node.children, function () {\n                    result.children.push(self._convertData(this));\n                });\n            }\n\n            return result;\n        }\n    });\n\n    return $.mage.categoryTree;\n});\n","Magento_Catalog/js/new-category-dialog.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @deprecated since version 2.2.0\n */\n/*global FORM_KEY*/\ndefine([\n    'jquery',\n    'jquery/ui',\n    'Magento_Ui/js/modal/modal',\n    'mage/translate',\n    'mage/backend/tree-suggest',\n    'mage/backend/validation'\n], function ($) {\n    'use strict';\n\n    /** Clear parent category. */\n    var clearParentCategory = function () {\n        $('#new_category_parent').find('option').each(function () {\n            $('#new_category_parent-suggest').treeSuggest('removeOption', null, this);\n        });\n    };\n\n    $.widget('mage.newCategoryDialog', {\n        /** @inheritdoc */\n        _create: function () {\n            var widget = this,\n                newCategoryForm;\n\n            $('#new_category_parent').before($('<input>', {\n                id: 'new_category_parent-suggest',\n                placeholder: $.mage.__('start typing to search category')\n            }));\n\n            $('#new_category_parent-suggest').treeSuggest(this.options.suggestOptions)\n                .on('suggestbeforeselect', function (event) {\n                    clearParentCategory();\n                    $(event.target).treeSuggest('close');\n                });\n\n            $.validator.addMethod('validate-parent-category', function () {\n                return $('#new_category_parent').val() || $('#new_category_parent-suggest').val() === '';\n            }, $.mage.__('Choose existing category.'));\n            newCategoryForm = $('#new_category_form');\n            newCategoryForm.mage('validation', {\n                /**\n                 * @param {jQuery} error\n                 * @param {*} element\n                 */\n                errorPlacement: function (error, element) {\n                    error.insertAfter(element.is('#new_category_parent') ?\n                        $('#new_category_parent-suggest').closest('.mage-suggest') :\n                        element);\n                }\n            }).on('highlight.validate', function (e) {\n                var options = $(this).validation('option');\n\n                if ($(e.target).is('#new_category_parent')) {\n                    options.highlight($('#new_category_parent-suggest').get(0),\n                        options.errorClass, options.validClass || '');\n                }\n            });\n            this.element.modal({\n                type: 'slide',\n                modalClass: 'mage-new-category-dialog form-inline',\n                title: $.mage.__('Create Category'),\n\n                /** @inheritdoc */\n                opened: function () {\n                    var enteredName = $('#category_ids-suggest').val();\n\n                    $('#new_category_name').val(enteredName);\n\n                    if (enteredName === '') {\n                        $('#new_category_name').trigger('focus');\n                    }\n                    $('#new_category_messages').html('');\n                },\n\n                /** @inheritdoc */\n                closed: function () {\n                    var validationOptions = newCategoryForm.validation('option');\n\n                    $('#new_category_name, #new_category_parent-suggest').val('');\n                    validationOptions.unhighlight($('#new_category_parent-suggest').get(0),\n                        validationOptions.errorClass, validationOptions.validClass || '');\n                    newCategoryForm.validation('clearError');\n                    $('#category_ids-suggest').trigger('focus');\n                },\n                buttons: [{\n                    text: $.mage.__('Create Category'),\n                    class: 'action-primary',\n\n                    /** @inheritdoc */\n                    click: function (e) {\n                        var thisButton;\n\n                        if (!newCategoryForm.valid()) {\n                            return;\n                        }\n                        thisButton = $(e.currentTarget);\n\n                        thisButton.prop('disabled', true);\n                        $.ajax({\n                            type: 'POST',\n                            url: widget.options.saveCategoryUrl,\n                            data: {\n                                name: $('#new_category_name').val(),\n                                parent: $('#new_category_parent').val(),\n                                'is_active': 1,\n                                'include_in_menu': 1,\n                                'use_config': ['available_sort_by', 'default_sort_by'],\n                                'form_key': FORM_KEY,\n                                'return_session_messages_only': 1\n                            },\n                            dataType: 'json',\n                            context: $('body')\n                        }).done(function (data) {\n                            var $suggest;\n\n                            if (!data.error) {\n                                $suggest = $('#category_ids-suggest');\n\n                                $suggest.trigger('selectItem', {\n                                    id: data.category['entity_id'],\n                                    label: data.category.name\n                                });\n                                $('#new_category_name, #new_category_parent-suggest').val('');\n                                $suggest.val('');\n                                clearParentCategory();\n                                $(widget.element).modal('closeModal');\n                            } else {\n                                $('#new_category_messages').html(data.messages);\n                            }\n                        }).always(\n                            function () {\n                                thisButton.prop('disabled', false);\n                            }\n                        );\n                    }\n                }]\n            });\n        }\n    });\n\n    return $.mage.newCategoryDialog;\n});\n","Magento_Catalog/js/price-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'underscore',\n    'mage/template',\n    'priceUtils',\n    'priceBox',\n    'jquery-ui-modules/widget'\n], function ($, _, mageTemplate, utils) {\n    'use strict';\n\n    var globalOptions = {\n        productId: null,\n        priceHolderSelector: '.price-box', //data-role=\"priceBox\"\n        optionsSelector: '.product-custom-option',\n        optionConfig: {},\n        optionHandlers: {},\n        optionTemplate: '<%= data.label %>' +\n        '<% if (data.finalPrice.value > 0) { %>' +\n        ' +<%- data.finalPrice.formatted %>' +\n        '<% } else if (data.finalPrice.value < 0) { %>' +\n        ' <%- data.finalPrice.formatted %>' +\n        '<% } %>',\n        controlContainer: 'dd'\n    };\n\n    /**\n     * Custom option preprocessor\n     * @param  {jQuery} element\n     * @param  {Object} optionsConfig - part of config\n     * @return {Object}\n     */\n    function defaultGetOptionValue(element, optionsConfig) {\n        var changes = {},\n            optionValue = element.val(),\n            optionId = utils.findOptionId(element[0]),\n            optionName = element.prop('name'),\n            optionType = element.prop('type'),\n            optionConfig = optionsConfig[optionId],\n            optionHash = optionName;\n\n        switch (optionType) {\n            case 'text':\n            case 'textarea':\n                changes[optionHash] = optionValue ? optionConfig.prices : {};\n                break;\n\n            case 'radio':\n                if (element.is(':checked')) {\n                    changes[optionHash] = optionConfig[optionValue] && optionConfig[optionValue].prices || {};\n                }\n                break;\n\n            case 'select-one':\n                changes[optionHash] = optionConfig[optionValue] && optionConfig[optionValue].prices || {};\n                break;\n\n            case 'select-multiple':\n                _.each(optionConfig, function (row, optionValueCode) {\n                    optionHash = optionName + '##' + optionValueCode;\n                    changes[optionHash] = _.contains(optionValue, optionValueCode) ? row.prices : {};\n                });\n                break;\n\n            case 'checkbox':\n                optionHash = optionName + '##' + optionValue;\n                changes[optionHash] = element.is(':checked') ? optionConfig[optionValue].prices : {};\n                break;\n\n            case 'file':\n                // Checking for 'disable' property equal to checking DOMNode with id*=\"change-\"\n                changes[optionHash] = optionValue || element.prop('disabled') ? optionConfig.prices : {};\n                break;\n        }\n\n        return changes;\n    }\n\n    $.widget('mage.priceOptions', {\n        options: globalOptions,\n\n        /**\n         * @private\n         */\n        _init: function initPriceBundle() {\n            $(this.options.optionsSelector, this.element).trigger('change');\n        },\n\n        /**\n         * Widget creating method.\n         * Triggered once.\n         * @private\n         */\n        _create: function createPriceOptions() {\n            var form = this.element,\n                options = $(this.options.optionsSelector, form),\n                priceBox = $(this.options.priceHolderSelector, $(this.options.optionsSelector).element);\n\n            if (priceBox.data('magePriceBox') &&\n                priceBox.priceBox('option') &&\n                priceBox.priceBox('option').priceConfig\n            ) {\n                if (priceBox.priceBox('option').priceConfig.optionTemplate) {\n                    this._setOption('optionTemplate', priceBox.priceBox('option').priceConfig.optionTemplate);\n                }\n                this._setOption('priceFormat', priceBox.priceBox('option').priceConfig.priceFormat);\n            }\n\n            this._applyOptionNodeFix(options);\n\n            options.on('change', this._onOptionChanged.bind(this));\n        },\n\n        /**\n         * Custom option change-event handler\n         * @param {Event} event\n         * @private\n         */\n        _onOptionChanged: function onOptionChanged(event) {\n            var changes,\n                option = $(event.target),\n                handler = this.options.optionHandlers[option.data('role')];\n\n            option.data('optionContainer', option.closest(this.options.controlContainer));\n\n            if (handler && handler instanceof Function) {\n                changes = handler(option, this.options.optionConfig, this);\n            } else {\n                changes = defaultGetOptionValue(option, this.options.optionConfig);\n            }\n            $(this.options.priceHolderSelector).trigger('updatePrice', changes);\n        },\n\n        /**\n         * Helper to fix issue with option nodes:\n         *  - you can't place any html in option ->\n         *    so you can't style it via CSS\n         * @param {jQuery} options\n         * @private\n         */\n        _applyOptionNodeFix: function applyOptionNodeFix(options) {\n            var config = this.options,\n                format = config.priceFormat,\n                template = config.optionTemplate;\n\n            template = mageTemplate(template);\n            options.filter('select').each(function (index, element) {\n                var $element = $(element),\n                    optionId = utils.findOptionId($element),\n                    optionConfig = config.optionConfig && config.optionConfig[optionId];\n\n                $element.find('option').each(function (idx, option) {\n                    var $option,\n                        optionValue,\n                        toTemplate,\n                        prices;\n\n                    $option = $(option);\n                    optionValue = $option.val();\n\n                    if (!optionValue && optionValue !== 0) {\n                        return;\n                    }\n\n                    toTemplate = {\n                        data: {\n                            label: optionConfig[optionValue] && optionConfig[optionValue].name\n                        }\n                    };\n                    prices = optionConfig[optionValue] ? optionConfig[optionValue].prices : null;\n\n                    if (prices) {\n                        _.each(prices, function (price, type) {\n                            var value = +price.amount;\n\n                            value += _.reduce(price.adjustments, function (sum, x) { //eslint-disable-line\n                                return sum + x;\n                            }, 0);\n                            toTemplate.data[type] = {\n                                value: value,\n                                formatted: utils.formatPriceLocale(value, format)\n                            };\n                        });\n\n                        $option.text(template(toTemplate));\n                    }\n                });\n            });\n        },\n\n        /**\n         * Custom behavior on getting options:\n         * now widget able to deep merge accepted configuration with instance options.\n         * @param  {Object}  options\n         * @return {$.Widget}\n         * @private\n         */\n        _setOptions: function setOptions(options) {\n            $.extend(true, this.options, options);\n            this._super(options);\n\n            return this;\n        }\n    });\n\n    return $.mage.priceOptions;\n});\n","Magento_Catalog/js/price-utils.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery',\n    'underscore'\n], function ($, _) {\n    'use strict';\n\n    var globalPriceFormat = {\n        requiredPrecision: 2,\n        integerRequired: 1,\n        decimalSymbol: ',',\n        groupSymbol: ',',\n        groupLength: ','\n    };\n\n    /**\n     * Repeats {string} {times} times\n     * @param  {String} string\n     * @param  {Number} times\n     * @return {String}\n     */\n    function stringPad(string, times) {\n        return new Array(times + 1).join(string);\n    }\n\n    /**\n     * Format the price with the compliance to the specified locale\n     *\n     * @param {Number} amount\n     * @param {Object} format\n     * @param  {Boolean} isShowSign\n     */\n    function formatPriceLocale(amount, format, isShowSign)\n    {\n        var s = '',\n            precision, pattern, locale, r;\n\n        format = _.extend(globalPriceFormat, format);\n        precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision;\n        pattern = format.pattern || '%s';\n        locale = window.LOCALE || 'en-US';\n        if (isShowSign === undefined || isShowSign === true) {\n            s = amount < 0 ? '-' : isShowSign ? '+' : '';\n        } else if (isShowSign === false) {\n            s = '';\n        }\n        pattern = pattern.indexOf('{sign}') < 0 ? s + pattern : pattern.replace('{sign}', s);\n        amount = Number(Math.round(Math.abs(+amount || 0) + 'e+' + precision) + ('e-' + precision));\n        r = amount.toLocaleString(locale, {minimumFractionDigits: precision});\n\n        return pattern.replace('%s', r).replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n    }\n\n    /**\n     * Formatter for price amount\n     * @param  {Number}  amount\n     * @param  {Object}  format\n     * @param  {Boolean} isShowSign\n     * @return {String}              Formatted value\n     * @deprecated\n     */\n    function formatPrice(amount, format, isShowSign) {\n        var s = '',\n            precision, integerRequired, decimalSymbol, groupSymbol, groupLength, pattern, i, pad, j, re, r, am;\n\n        format = _.extend(globalPriceFormat, format);\n\n        // copied from price-option.js | Could be refactored with varien/js.js\n\n        precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision;\n        integerRequired = isNaN(format.integerRequired = Math.abs(format.integerRequired)) ? 1 : format.integerRequired;\n        decimalSymbol = format.decimalSymbol === undefined ? ',' : format.decimalSymbol;\n        groupSymbol = format.groupSymbol === undefined ? '.' : format.groupSymbol;\n        groupLength = format.groupLength === undefined ? 3 : format.groupLength;\n        pattern = format.pattern || '%s';\n\n        if (isShowSign === undefined || isShowSign === true) {\n            s = amount < 0 ? '-' : isShowSign ? '+' : '';\n        } else if (isShowSign === false) {\n            s = '';\n        }\n        pattern = pattern.indexOf('{sign}') < 0 ? s + pattern : pattern.replace('{sign}', s);\n\n        // we're avoiding the usage of to fixed, and using round instead with the e representation to address\n        // numbers like 1.005 = 1.01. Using ToFixed to only provide trailing zeroes in case we have a whole number\n        i = parseInt(\n                amount = Number(Math.round(Math.abs(+amount || 0) + 'e+' + precision) + ('e-' + precision)),\n                10\n            ) + '';\n        pad = i.length < integerRequired ? integerRequired - i.length : 0;\n\n        i = stringPad('0', pad) + i;\n\n        j = i.length > groupLength ? i.length % groupLength : 0;\n        re = new RegExp('(\\\\d{' + groupLength + '})(?=\\\\d)', 'g');\n\n        // replace(/-/, 0) is only for fixing Safari bug which appears\n        // when Math.abs(0).toFixed() executed on '0' number.\n        // Result is '0.-0' :(\n\n        am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));\n        r = (j ? i.substr(0, j) + groupSymbol : '') +\n            i.substr(j).replace(re, '$1' + groupSymbol) +\n            (precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');\n\n        return pattern.replace('%s', r).replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n    }\n\n    /**\n     * Deep clone of Object. Doesn't support functions\n     * @param {Object} obj\n     * @return {Object}\n     */\n    function objectDeepClone(obj) {\n        return JSON.parse(JSON.stringify(obj));\n    }\n\n    /**\n     * Helper to find ID in name attribute\n     * @param   {jQuery} element\n     * @returns {undefined|String}\n     */\n    function findOptionId(element) {\n        var re, id, name;\n\n        if (!element) {\n            return id;\n        }\n        name = $(element).attr('name');\n\n        if (name.indexOf('[') !== -1) {\n            re = /\\[([^\\]]+)?\\]/;\n        } else {\n            re = /_([^\\]]+)?_/; // just to support file-type-option\n        }\n        id = re.exec(name) && re.exec(name)[1];\n\n        if (id) {\n            return id;\n        }\n    }\n\n    return {\n        formatPriceLocale: formatPriceLocale,\n        formatPrice: formatPrice,\n        deepClone: objectDeepClone,\n        strPad: stringPad,\n        findOptionId: findOptionId\n    };\n});\n","Magento_Catalog/js/custom-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'mage/template',\n    'Magento_Ui/js/modal/alert',\n    'jquery/ui',\n    'useDefault',\n    'collapsable',\n    'mage/translate',\n    'mage/backend/validation',\n    'Magento_Ui/js/modal/modal'\n], function ($, mageTemplate, alert) {\n    'use strict';\n\n    $.widget('mage.customOptions', {\n        options: {\n            selectionItemCount: {}\n        },\n\n        /** @inheritdoc */\n        _create: function () {\n            this.baseTmpl = mageTemplate('#custom-option-base-template');\n            this.rowTmpl = mageTemplate('#custom-option-select-type-row-template');\n\n            this._initOptionBoxes();\n            this._initSortableSelections();\n            this._bindCheckboxHandlers();\n            this._bindReadOnlyMode();\n            this._addValidation();\n        },\n\n        /**\n         * @private\n         */\n        _addValidation: function () {\n            $.validator.addMethod(\n                'required-option-select', function (value) {\n                    return value !== '';\n                }, $.mage.__('Select type of option.'));\n\n            $.validator.addMethod(\n                'required-option-select-type-rows', function (value, element) {\n                    var optionContainerElm = element.up('div[id*=_type_]'),\n                        selectTypesFlag = false,\n                        selectTypeElements = $('#' + optionContainerElm.id + ' .select-type-title');\n\n                    selectTypeElements.each(function () {\n                        if (!$(this).closest('tr').hasClass('ignore-validate')) {\n                            selectTypesFlag = true;\n                        }\n                    });\n\n                    return selectTypesFlag;\n                }, $.mage.__('Please add rows to option.'));\n        },\n\n        /**\n         * @private\n         */\n        _initOptionBoxes: function () {\n            var syncOptionTitle;\n\n            if (!this.options.isReadonly) {\n                this.element.sortable({\n                    axis: 'y',\n                    handle: '[data-role=draggable-handle]',\n                    items: '#product_options_container_top > div',\n                    update: this._updateOptionBoxPositions,\n                    tolerance: 'pointer'\n                });\n            }\n\n            /**\n             * @param {jQuery.Event} event\n             */\n            syncOptionTitle = function (event) {\n                var currentValue = $(event.target).val(),\n                    optionBoxTitle = $(\n                        '.admin__collapsible-title > span',\n                        $(event.target).closest('.fieldset-wrapper')\n                    ),\n                    newOptionTitle = $.mage.__('New Option');\n\n                optionBoxTitle.text(currentValue === '' ? newOptionTitle : currentValue);\n            };\n            this._on({\n                /**\n                 * Reset field value to Default\n                 */\n                'click .use-default-label': function (event) {\n                    $(event.target).closest('label').find('input').prop('checked', true).trigger('change');\n                },\n\n                /**\n                 * Remove custom option or option row for 'select' type of custom option\n                 */\n                'click button[id^=product_option_][id$=_delete]': function (event) {\n                    var element = $(event.target).closest('#product_options_container_top > div.fieldset-wrapper,tr');\n\n                    if (element.length) {\n                        $('#product_' + element.attr('id').replace('product_', '') + '_is_delete').val(1);\n                        element.addClass('ignore-validate').hide();\n                        this.refreshSortableElements();\n                    }\n                },\n\n                /**\n                 * Minimize custom option block\n                 */\n                'click #product_options_container_top [data-target$=-content]': function () {\n                    if (this.options.isReadonly) {\n                        return false;\n                    }\n                },\n\n                /**\n                 * Add new custom option\n                 */\n                'click #add_new_defined_option': function (event) {\n                    this.addOption(event);\n                },\n\n                /**\n                 * Add new option row for 'select' type of custom option\n                 */\n                'click button[id^=product_option_][id$=_add_select_row]': function (event) {\n                    this.addSelection(event);\n                },\n\n                /**\n                 * Import custom options from products\n                 */\n                'click #import_new_defined_option': function () {\n                    var importContainer = $('#import-container'),\n                        widget = this;\n\n                    importContainer.modal({\n                        title: $.mage.__('Select Product'),\n                        type: 'slide',\n\n                        /** @inheritdoc */\n                        opened: function () {\n                            $(document).off().on('click', '#productGrid_massaction-form button', function () {\n                                $('.import-custom-options-apply-button').trigger('click', 'massActionTrigger');\n                            });\n                        },\n                        buttons: [{\n                            text: $.mage.__('Import'),\n                            attr: {\n                                id: 'import-custom-options-apply-button'\n                            },\n                            'class': 'action-primary action-import import-custom-options-apply-button',\n\n                            /** @inheritdoc */\n                            click: function (event, massActionTrigger) {\n                                var request = [];\n\n                                $(this.element).find('input[name=product]:checked').map(function () {\n                                    request.push(this.value);\n                                });\n\n                                if (request.length === 0) {\n                                    if (!massActionTrigger) {\n                                        alert({\n                                            content: $.mage.__('An item needs to be selected. Select and try again.')\n                                        });\n                                    }\n\n                                    return;\n                                }\n\n                                $.post(widget.options.customOptionsUrl, {\n                                    'products[]': request,\n                                    'form_key': widget.options.formKey\n                                }, function ($data) {\n                                    $.each(JSON.parse($data), function (el) {\n                                        var i;\n\n                                        el.id = widget.getFreeOptionId(el.id);\n                                        el['option_id'] = el.id;\n\n                                        if (typeof el.optionValues !== 'undefined') {\n                                            for (i = 0; i < el.optionValues.length; i++) {\n                                                el.optionValues[i]['option_id'] = el.id;\n                                            }\n                                        }\n                                        //Adding option\n                                        widget.addOption(el);\n                                        //Will save new option on server side\n                                        $('#product_option_' + el.id + '_option_id').val(0);\n                                        $('#option_' + el.id + ' input[name$=\"option_type_id]\"]').val(-1);\n                                    });\n                                    importContainer.modal('closeModal');\n                                });\n                            }\n                        }]\n                    });\n                    importContainer.load(\n                        this.options.productGridUrl,\n                        {\n                            'form_key': this.options.formKey,\n                            'current_product_id': this.options.currentProductId\n                        },\n                        function () {\n                            importContainer.modal('openModal');\n                        }\n                    );\n                },\n\n                /**\n                 * Change custom option type\n                 */\n                'change select[id^=product_option_][id$=_type]': function (event, data) {\n                    var widget = this,\n                        currentElement = $(event.target),\n                        parentId = '#' + currentElement.closest('.fieldset-alt').attr('id'),\n                        group = currentElement.find('[value=\"' + currentElement.val() + '\"]')\n                            .closest('optgroup').attr('data-optgroup-name'),\n                        previousGroup = $(parentId + '_previous_group').val(),\n                        previousBlock = $(parentId + '_type_' + previousGroup),\n                        tmpl, disabledBlock, priceType;\n\n                    data = data || {};\n\n                    if (typeof group !== 'undefined') {\n                        group = group.toLowerCase();\n                    }\n\n                    if (previousGroup !== group) {\n                        if (previousBlock.length) {\n                            previousBlock.addClass('ignore-validate').hide();\n                        }\n                        $(parentId + '_previous_group').val(group);\n\n                        if (typeof group === 'undefined') {\n                            return;\n                        }\n                        disabledBlock = $(parentId).find(parentId + '_type_' + group);\n\n                        if (disabledBlock.length) {\n                            disabledBlock.removeClass('ignore-validate').show();\n                        } else {\n                            if ($.isEmptyObject(data)) { //eslint-disable-line max-depth\n                                data['option_id'] = $(parentId + '_id').val();\n                                data.price = data.sku = '';\n                            }\n                            data.group = group;\n\n                            tmpl = widget.element.find('#custom-option-' + group + '-type-template').html();\n                            tmpl = mageTemplate(tmpl, {\n                                data: data\n                            });\n\n                            $(tmpl).insertAfter($(parentId));\n\n                            if (data['price_type']) { //eslint-disable-line max-depth\n                                priceType = $('#' + widget.options.fieldId + '_' + data['option_id'] + '_price_type');\n                                priceType.val(data['price_type']).attr('data-store-label', data['price_type']);\n                            }\n                            this._bindUseDefault(widget.options.fieldId + '_' + data['option_id'], data);\n                            //Add selections\n\n                            if (data.optionValues) { //eslint-disable-line max-depth\n                                data.optionValues.each(function (value) {\n                                    widget.addSelection(value);\n                                });\n                            }\n                        }\n                    }\n                },\n                //Sync title\n                'change .field-option-title > .control > input[id$=\"_title\"]': syncOptionTitle,\n                'keyup .field-option-title > .control > input[id$=\"_title\"]': syncOptionTitle,\n                'paste .field-option-title > .control > input[id$=\"_title\"]': syncOptionTitle\n            });\n        },\n\n        /**\n         * @private\n         */\n        _initSortableSelections: function () {\n            if (!this.options.isReadonly) {\n                this.element.find('[id^=product_option_][id$=_type_select] tbody').sortable({\n                    axis: 'y',\n                    handle: '[data-role=draggable-handle]',\n\n                    /** @inheritdoc */\n                    helper: function (event, ui) {\n                        ui.children().each(function () {\n                            $(this).width($(this).width());\n                        });\n\n                        return ui;\n                    },\n                    update: this._updateSelectionsPositions,\n                    tolerance: 'pointer'\n                });\n            }\n        },\n\n        /**\n         * Sync sort order checkbox with hidden dropdown\n         */\n        _bindCheckboxHandlers: function () {\n            this._on({\n                /**\n                 * @param {jQuery.Event} event\n                 */\n                'change [id^=product_option_][id$=_required]': function (event) {\n                    var $this = $(event.target);\n\n                    $this.closest('#product_options_container_top > div')\n                        .find('[name$=\"[is_require]\"]').val($this.is(':checked') ? 1 : 0);\n                }\n            });\n            this.element.find('[id^=product_option_][id$=_required]').each(function () {\n                $(this).prop('checked', $(this).closest('#product_options_container_top > div')\n                        .find('[name$=\"[is_require]\"]').val() > 0);\n            });\n        },\n\n        /**\n         * Update Custom option position\n         */\n        _updateOptionBoxPositions: function () {\n            $(this).find('div[id^=option_]:not(.ignore-validate) .fieldset-alt > [name$=\"[sort_order]\"]').each(\n                function (index) {\n                    $(this).val(index);\n                });\n        },\n\n        /**\n         * Update selections positions for 'select' type of custom option\n         */\n        _updateSelectionsPositions: function () {\n            $(this).find('tr:not(.ignore-validate) [name$=\"[sort_order]\"]').each(function (index) {\n                $(this).val(index);\n            });\n        },\n\n        /**\n         * Disable input data if \"Read Only\"\n         */\n        _bindReadOnlyMode: function () {\n            if (this.options.isReadonly) {\n                $('div.product-custom-options').find('button,input,select,textarea').each(function () {\n                    $(this).prop('disabled', true);\n\n                    if ($(this).is('button')) {\n                        $(this).addClass('disabled');\n                    }\n                });\n            }\n        },\n\n        /**\n         * @param {String} id\n         * @param {Object} data\n         * @private\n         */\n        _bindUseDefault: function (id, data) {\n            var title = $('#' + id + '_title'),\n                price = $('#' + id + '_price'),\n                priceType = $('#' + id + '_price_type');\n\n            //enable 'use default' link for title\n            if (data.checkboxScopeTitle) {\n                title.useDefault({\n                    field: '.field',\n                    useDefault: 'label[for$=_title]',\n                    checkbox: 'input[id$=_title_use_default]',\n                    label: 'span'\n                });\n            }\n            //enable 'use default' link for price and price_type\n            if (data.checkboxScopePrice) {\n                price.useDefault({\n                    field: '.field',\n                    useDefault: 'label[for$=_price]',\n                    checkbox: 'input[id$=_price_use_default]',\n                    label: 'span'\n                });\n                //not work set default value for second field\n                priceType.useDefault({\n                    field: '.field',\n                    useDefault: 'label[for$=_price]',\n                    checkbox: 'input[id$=_price_use_default]',\n                    label: 'span'\n                });\n            }\n        },\n\n        /**\n         * Add selection value for 'select' type of custom option\n         */\n        addSelection: function (event) {\n            var data = {},\n                element = event.target || event.srcElement || event.currentTarget,\n                rowTmpl, priceType;\n\n            if (typeof element !== 'undefined') {\n                data.id = $(element).closest('#product_options_container_top > div')\n                    .find('[name^=\"product[options]\"][name$=\"[id]\"]').val();\n                data['option_type_id'] = -1;\n\n                if (!this.options.selectionItemCount[data.id]) {\n                    this.options.selectionItemCount[data.id] = 1;\n                }\n\n                data['select_id'] = this.options.selectionItemCount[data.id];\n                data.price = data.sku = '';\n            } else {\n                data = event;\n                data.id = data['option_id'];\n                data['select_id'] = data['option_type_id'];\n                this.options.selectionItemCount[data.id] = data['item_count'];\n            }\n\n            rowTmpl = this.rowTmpl({\n                data: data\n            });\n\n            $(rowTmpl).appendTo($('#select_option_type_row_' + data.id));\n\n            //set selected price_type value if set\n            if (data['price_type']) {\n                priceType = $('#' + this.options.fieldId + '_' + data.id + '_select_' + data['select_id'] +\n                    '_price_type');\n                priceType.val(data['price_type']).attr('data-store-label', data['price_type']);\n            }\n\n            this._bindUseDefault(this.options.fieldId + '_' + data.id + '_select_' + data['select_id'], data);\n            this.refreshSortableElements();\n            this.options.selectionItemCount[data.id] = parseInt(this.options.selectionItemCount[data.id], 10) + 1;\n\n            $('#' + this.options.fieldId + '_' + data.id + '_select_' + data['select_id'] + '_title').trigger('focus');\n        },\n\n        /**\n         * Add custom option\n         */\n        addOption: function (event) {\n            var data = {},\n                element = event.target || event.srcElement || event.currentTarget,\n                baseTmpl;\n\n            if (typeof element !== 'undefined') {\n                data.id = this.options.itemCount;\n                data.type = '';\n                data['option_id'] = 0;\n            } else {\n                data = event;\n                this.options.itemCount = data['item_count'];\n            }\n\n            baseTmpl = this.baseTmpl({\n                data: data\n            });\n\n            $(baseTmpl)\n                .appendTo(this.element.find('#product_options_container_top'))\n                .find('.collapse').collapsable();\n\n            //set selected type value if set\n            if (data.type) {\n                $('#' + this.options.fieldId + '_' + data.id + '_type').val(data.type).trigger('change', data);\n            }\n\n            //set selected is_require value if set\n            if (data['is_require']) {\n                $('#' + this.options.fieldId + '_' + data.id + '_is_require').val(data['is_require']).trigger('change');\n            }\n\n            this.refreshSortableElements();\n            this._bindCheckboxHandlers();\n            this._bindReadOnlyMode();\n            this.options.itemCount++;\n            $('#' + this.options.fieldId + '_' + data.id + '_title').trigger('change');\n        },\n\n        /**\n         * @return {Object}\n         */\n        refreshSortableElements: function () {\n            if (!this.options.isReadonly) {\n                this.element.sortable('refresh');\n                this._updateOptionBoxPositions.apply(this.element);\n                this._updateSelectionsPositions.apply(this.element);\n                this._initSortableSelections();\n            }\n\n            return this;\n        },\n\n        /**\n         * @param {String} id\n         * @return {*}\n         */\n        getFreeOptionId: function (id) {\n            return $('#' + this.options.fieldId + '_' + id).length ? this.getFreeOptionId(parseInt(id, 10) + 1) : id;\n        }\n    });\n\n});\n","Magento_Catalog/js/custom-options-type.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'underscore',\n    'uiRegistry',\n    'Magento_Ui/js/form/element/ui-select'\n], function ($, _, registry, UiSelect) {\n    'use strict';\n\n    return UiSelect.extend({\n        defaults: {\n            previousGroup: null,\n            groupsConfig: {},\n            valuesMap: {},\n            indexesMap: {},\n            filterPlaceholder: 'ns = ${ $.ns }, parentScope = ${ $.parentScope }'\n        },\n\n        /**\n         * Initialize component.\n         * @returns {Element}\n         */\n        initialize: function () {\n            return this\n                ._super()\n                .initMapping()\n                .updateComponents(this.initialValue, true);\n        },\n\n        /**\n         * Create additional mappings.\n         *\n         * @returns {Element}\n         */\n        initMapping: function () {\n            _.each(this.groupsConfig, function (groupData, group) {\n                _.each(groupData.values, function (value) {\n                    this.valuesMap[value] = group;\n                }, this);\n\n                _.each(groupData.indexes, function (index) {\n                    if (!this.indexesMap[index]) {\n                        this.indexesMap[index] = [];\n                    }\n\n                    this.indexesMap[index].push(group);\n                }, this);\n            }, this);\n\n            return this;\n        },\n\n        /**\n         * Callback that fires when 'value' property is updated.\n         *\n         * @param {String} currentValue\n         * @returns {*}\n         */\n        onUpdate: function (currentValue) {\n            this.updateComponents(currentValue);\n\n            return this._super();\n        },\n\n        /**\n         * Show, hide or clear components based on the current type value.\n         *\n         * @param {String} currentValue\n         * @param {Boolean} isInitialization\n         * @returns {Element}\n         */\n        updateComponents: function (currentValue, isInitialization) {\n            var currentGroup = this.valuesMap[currentValue];\n\n            if (currentGroup !== this.previousGroup) {\n                _.each(this.indexesMap, function (groups, index) {\n                    var template = this.filterPlaceholder + ', index = ' + index,\n                        visible = groups.indexOf(currentGroup) !== -1,\n                        component;\n\n                    switch (index) {\n                        case 'container_type_static':\n                        case 'values':\n                            template = 'ns=' + this.ns +\n                                ', dataScope=' + this.parentScope +\n                                ', index=' + index;\n                            break;\n                    }\n\n                    /*eslint-disable max-depth */\n                    if (isInitialization) {\n                        registry.async(template)(\n                            function (currentComponent) {\n                                currentComponent.visible(visible);\n                            }\n                        );\n                    } else {\n                        component = registry.get(template);\n\n                        if (component) {\n                            component.visible(visible);\n                        }\n                    }\n                }, this);\n\n                this.previousGroup = currentGroup;\n            }\n\n            return this;\n        }\n    });\n});\n","Magento_Catalog/js/category-checkbox-tree.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global Ext, varienWindowOnload, varienElementMethods */\n\ndefine([\n    'jquery',\n    'prototype',\n    'extjs/ext-tree-checkbox',\n    'mage/adminhtml/form'\n], function (jQuery) {\n    'use strict';\n\n    return function (config) {\n        var tree,\n            options = {\n                dataUrl: config.dataUrl,\n                divId: config.divId,\n                rootVisible: config.rootVisible,\n                useAjax: config.useAjax,\n                currentNodeId: config.currentNodeId,\n                jsFormObject: window[config.jsFormObject],\n                name: config.name,\n                checked: config.checked,\n                allowDrop: config.allowDrop,\n                rootId: config.rootId,\n                expanded: config.expanded,\n                categoryId: config.categoryId,\n                treeJson: config.treeJson\n            },\n            data = {},\n            parameters = {},\n            root = {},\n            key = '';\n\n        /**\n         * Fix ext compatibility with prototype 1.6\n         */\n        Ext.lib.Event.getTarget = function (e) {\n            var ee = e.browserEvent || e;\n\n            return ee.target ? Event.element(ee) : null;\n        };\n\n        /**\n         * @param {Object} el\n         * @param {Object} nodeConfig\n         */\n        Ext.tree.TreePanel.Enhanced = function (el, nodeConfig) {\n            Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, nodeConfig);\n        };\n\n        Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {\n            /**\n             * @param {Object} treeConfig\n             * @param {Boolean} firstLoad\n             */\n            loadTree: function (treeConfig, firstLoad) {\n                parameters = treeConfig.parameters,\n                    data = treeConfig.data,\n                    root = new Ext.tree.TreeNode(parameters);\n\n                if (typeof parameters.rootVisible !== 'undefined') {\n                    this.rootVisible = parameters.rootVisible * 1;\n                }\n\n                this.nodeHash = {};\n                this.setRootNode(root);\n\n                if (firstLoad) {\n                    this.addListener('click', this.categoryClick.createDelegate(this));\n                }\n\n                this.loader.buildCategoryTree(root, data);\n                this.el.dom.innerHTML = '';\n                // render the tree\n                this.render();\n            },\n\n            /**\n             * @param {Object} node\n             */\n            categoryClick: function (node) {\n                node.getUI().check(!node.getUI().checked());\n            }\n        });\n\n        jQuery(function () {\n            var categoryLoader = new Ext.tree.TreeLoader({\n                dataUrl: config.dataUrl\n            });\n\n            /**\n             * @param {Object} response\n             * @param {Object} parent\n             * @param {Function} callback\n             */\n            categoryLoader.processResponse = function (response, parent, callback) {\n                config = JSON.parse(response.responseText);\n\n                this.buildCategoryTree(parent, config);\n\n                if (typeof callback === 'function') {\n                    callback(this, parent);\n                }\n            };\n\n            /**\n             * @param {Object} nodeConfig\n             * @returns {Object}\n             */\n            categoryLoader.createNode = function (nodeConfig) {\n                var node;\n\n                nodeConfig.uiProvider = Ext.tree.CheckboxNodeUI;\n\n                if (nodeConfig.children && !nodeConfig.children.length) {\n                    delete nodeConfig.children;\n                    node = new Ext.tree.AsyncTreeNode(nodeConfig);\n                } else {\n                    node = new Ext.tree.TreeNode(nodeConfig);\n                }\n\n                return node;\n            };\n\n            /**\n             * @param {Object} parent\n             * @param {Object} nodeConfig\n             * @param {Integer} i\n             */\n            categoryLoader.processCategoryTree = function (parent, nodeConfig, i) {\n                var node,\n                    _node = {};\n\n                nodeConfig[i].uiProvider = Ext.tree.CheckboxNodeUI;\n\n                _node = Object.clone(nodeConfig[i]);\n\n                if (_node.children && !_node.children.length) {\n                    delete _node.children;\n                    node = new Ext.tree.AsyncTreeNode(_node);\n                } else {\n                    node = new Ext.tree.TreeNode(nodeConfig[i]);\n                }\n                parent.appendChild(node);\n                node.loader = node.getOwnerTree().loader;\n\n                if (_node.children) {\n                    categoryLoader.buildCategoryTree(node, _node.children);\n                }\n            };\n\n            /**\n             * @param {Object} parent\n             * @param {Object} nodeConfig\n             * @returns {void}\n             */\n            categoryLoader.buildCategoryTree = function (parent, nodeConfig) {\n                var i = 0;\n\n                if (!nodeConfig) {\n                    return null;\n                }\n\n                if (parent && nodeConfig && nodeConfig.length) {\n                    for (i; i < nodeConfig.length; i++) {\n                        categoryLoader.processCategoryTree(parent, nodeConfig, i);\n                    }\n                }\n            };\n\n            /**\n             *\n             * @param {Object} hash\n             * @param {Object} node\n             * @returns {Object}\n             */\n            categoryLoader.buildHashChildren = function (hash, node) {\n                var i = 0,\n                    len;\n\n                if (node.childNodes.length > 0 || node.loaded === false && node.loading === false) {\n                    hash.children = [];\n\n                    for (i, len = node.childNodes.length; i < len; i++) {\n                        hash.children = hash.children ? hash.children : [];\n                        hash.children.push(this.buildHash(node.childNodes[i]));\n                    }\n                }\n\n                return hash;\n            };\n\n            /**\n             * @param {Object} node\n             * @returns {Object}\n             */\n            categoryLoader.buildHash = function (node) {\n                var hash = {};\n\n                hash = this.toArray(node.attributes);\n\n                return categoryLoader.buildHashChildren(hash, node);\n            };\n\n            /**\n             * @param {Object} attributes\n             * @returns {Object}\n             */\n            categoryLoader.toArray = function (attributes) {\n                data = {};\n\n                for (key in attributes) {\n\n                    if (attributes[key]) {\n                        data[key] = attributes[key];\n                    }\n                }\n\n                return data;\n            };\n\n            categoryLoader.on('beforeload', function (treeLoader, node) {\n                treeLoader.baseParams.id = node.attributes.id;\n                treeLoader.baseParams.selected = options.jsFormObject.updateElement.value;\n            });\n\n            categoryLoader.on('load', function () {\n                varienWindowOnload();\n            });\n\n            tree = new Ext.tree.TreePanel.Enhanced(options.divId, {\n                animate: false,\n                loader: categoryLoader,\n                enableDD: false,\n                containerScroll: true,\n                selModel: new Ext.tree.CheckNodeMultiSelectionModel(),\n                rootVisible: options.rootVisible,\n                useAjax: options.useAjax,\n                currentNodeId: options.currentNodeId,\n                addNodeTo: false,\n                rootUIProvider: Ext.tree.CheckboxNodeUI\n            });\n\n            tree.on('check', function (node) {\n                options.jsFormObject.updateElement.value = this.getChecked().join(', ');\n                varienElementMethods.setHasChanges(node.getUI().checkbox);\n            }, tree);\n\n            // set the root node\n            //jscs:disable requireCamelCaseOrUpperCaseIdentifiers\n            parameters = {\n                text: options.name,\n                draggable: false,\n                checked: options.checked,\n                uiProvider: Ext.tree.CheckboxNodeUI,\n                allowDrop: options.allowDrop,\n                id: options.rootId,\n                expanded: options.expanded,\n                category_id: options.categoryId\n            };\n            //jscs:enable requireCamelCaseOrUpperCaseIdentifiers\n\n            tree.loadTree({\n                parameters: parameters, data: options.treeJson\n            }, true);\n        });\n    };\n});\n","Magento_Catalog/js/edit-tree.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* eslint-disable no-undef */\n// jscs:disable jsDoc\n\nrequire([\n    'jquery',\n    'Magento_Ui/js/modal/confirm',\n    'Magento_Ui/js/modal/alert',\n    'loadingPopup',\n    'mage/backend/floating-header'\n], function (jQuery, confirm) {\n    'use strict';\n\n    /**\n     * Delete some category\n     * This routine get categoryId explicitly, so even if currently selected tree node is out of sync\n     * with this form, we surely delete same category in the tree and at backend.\n     *\n     * @deprecated\n     * @see deleteConfirm\n     */\n    function categoryDelete(url) {\n        confirm({\n            content: 'Are you sure you want to delete this category?',\n            actions: {\n                confirm: function () {\n                    location.href = url;\n                }\n            }\n        });\n    }\n\n    function displayLoadingMask() {\n        jQuery('body').loadingPopup();\n    }\n\n    window.categoryDelete = categoryDelete;\n    window.displayLoadingMask = displayLoadingMask;\n});\n","Magento_Catalog/js/bundle-proxy-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n * @deprecated since version 2.2.0\n */\ndefine([\n    'Magento_Ui/js/form/components/button',\n    'uiRegistry',\n    'underscore'\n], function (Button, registry, _) {\n    'use strict';\n\n    return Button.extend({\n        defaults: {\n            currentRecordNamespace: 'bundle_current_record',\n            listingDataProvider: '',\n            value: [],\n            imports: {\n                currentRecordName: '${ $.provider }:${ $.currentRecordNamespace }',\n                listingData: '${ $.provider }:${ $.listingDataProvider }'\n            },\n            links: {\n                value: '${ $.provider }:${ $.dataScope }'\n            },\n            listens: {\n                listingData: 'setListingData'\n            }\n        },\n\n        /**\n         * Initializes component.\n         *\n         * @returns {Object} Chainable.\n         */\n        initialize: function () {\n            this._super()\n                .initSource();\n\n            return this;\n        },\n\n        /**\n         * Calls 'initObservable' of parent\n         *\n         * @returns {Object} Chainable.\n         */\n        initObservable: function () {\n            this._super()\n                .observe([\n                    'value',\n                    'listingData'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Calls 'destroy' of parent and\n         * clear listing provider source\n         *\n         * @returns {Object} Chainable.\n         */\n        destroy: function () {\n            this._super();\n            this.source.set(this.listingDataProvider, []);\n\n            return this;\n        },\n\n        /**\n         * Call parent \"action\" method\n         * and set new data to record and listing.\n         *\n         * @returns {Object} Chainable.\n         */\n\n        action: function () {\n            this._super();\n            this.source.set(this.currentRecordNamespace, this.name);\n            this.source.set(this.listingDataProvider, this.value());\n\n            return this;\n        },\n\n        /**\n         * Init current source.\n         *\n         * @returns {Object} Chainable.\n         */\n        initSource: function () {\n            if (!_.isFunction(this.source)) {\n                this.source = registry.get(this.provider);\n            }\n\n            return this;\n        },\n\n        /**\n         * Set data to listing source.\n         *\n         * @returns {Object} Chainable.\n         */\n        setListingData: function (data) {\n            if (this.name === this.currentRecordName) {\n                this.source.set(this.dataScope, data);\n            }\n\n            return this;\n        }\n    });\n});\n","Magento_Catalog/js/price-option-file.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'jquery-ui-modules/widget'\n], function ($) {\n    'use strict';\n\n    $.widget('mage.priceOptionFile', {\n        options: {\n            fileName: '',\n            fileNamed: '',\n            fieldNameAction: '',\n            changeFileSelector: '',\n            deleteFileSelector: ''\n        },\n\n        /**\n         * Creates instance of widget\n         * @private\n         */\n        _create: function () {\n            this.fileDeleteFlag = this.fileChangeFlag = false;\n            this.inputField = this.element.find('input[name=' + this.options.fileName + ']')[0];\n            this.inputFieldAction = this.element.find('input[name=' + this.options.fieldNameAction + ']')[0];\n            this.fileNameSpan = this.element.parent('dd').find('.' + this.options.fileNamed);\n\n            $(this.options.changeFileSelector).on('click', $.proxy(function () {\n                this._toggleFileChange();\n            }, this));\n            $(this.options.deleteFileSelector).on('click', $.proxy(function () {\n                this._toggleFileDelete();\n            }, this));\n        },\n\n        /**\n         * Toggles whether the current file is being changed or not. If the file is being deleted\n         * then the option to change the file is disabled.\n         * @private\n         */\n        _toggleFileChange: function () {\n            this.element.toggle();\n            this.fileChangeFlag = !this.fileChangeFlag;\n\n            if (!this.fileDeleteFlag) {\n                $(this.inputFieldAction).attr('value', this.fileChangeFlag ? 'save_new' : 'save_old');\n                this.inputField.disabled = !this.fileChangeFlag;\n            }\n        },\n\n        /**\n         * Toggles whether the file is to be deleted. When the file is being deleted, the name of\n         * the file is decorated with strike-through text and the option to change the file is\n         * disabled.\n         * @private\n         */\n        _toggleFileDelete: function () {\n            this.fileDeleteFlag = $(this.options.deleteFileSelector + ':checked').val();\n            $(this.inputFieldAction).attr('value',\n                this.fileDeleteFlag ? '' : this.fileChangeFlag ? 'save_new' : 'save_old');\n            this.inputField.disabled = this.fileDeleteFlag || !this.fileChangeFlag;\n            this.fileNameSpan.css('text-decoration', this.fileDeleteFlag ? 'line-through' : 'none');\n        }\n    });\n\n    return $.mage.priceOptionFile;\n});\n","Magento_Catalog/js/product-gallery.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery',\n    'underscore',\n    'mage/template',\n    'uiRegistry',\n    'jquery/ui',\n    'baseImage'\n], function ($, _, mageTemplate, registry) {\n    'use strict';\n\n    /**\n     * Formats incoming bytes value to a readable format.\n     *\n     * @param {Number} bytes\n     * @returns {String}\n     */\n    function bytesToSize(bytes) {\n        var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'],\n            i;\n\n        if (bytes === 0) {\n            return '0 Byte';\n        }\n\n        i = window.parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));\n\n        return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];\n    }\n\n    /**\n     * Product gallery widget\n     */\n    $.widget('mage.productGallery', {\n        options: {\n            imageSelector: '[data-role=image]',\n            imageElementSelector: '[data-role=image-element]',\n            template: '[data-template=image]',\n            imageResolutionLabel: '[data-role=resolution]',\n            imgTitleSelector: '[data-role=img-title]',\n            imageSizeLabel: '[data-role=size]',\n            types: null,\n            initialized: false\n        },\n\n        /**\n         * Gallery creation\n         * @protected\n         */\n        _create: function () {\n            this.options.types = this.options.types || this.element.data('types');\n            this.options.images = this.options.images || this.element.data('images');\n            this.options.parentComponent = this.options.parentComponent || this.element.data('parent-component');\n\n            this.imgTmpl = mageTemplate(this.element.find(this.options.template).html().trim());\n\n            this._bind();\n\n            this._isInitializingItems = true;\n            this._initializedItemCount = 0;\n            this._lastInitializedElement = null;\n\n            $.each(this.options.images, $.proxy(function (index, imageData) {\n                this.element.trigger('addItem', imageData);\n            }, this));\n\n            this._updateImagesRoles();\n            this._contentUpdated();\n\n            this._isInitializingItems = false;\n            this.options.initialized = true;\n        },\n\n        /**\n         * Bind handler to elements\n         * @protected\n         */\n        _bind: function () {\n            this._on({\n                updateImageTitle: '_updateImageTitle',\n                updateVisibility: '_updateVisibility',\n                openDialog: '_onOpenDialog',\n                addItem: '_addItem',\n                removeItem: '_removeItem',\n                setImageType: '_setImageType',\n                setPosition: '_setPosition',\n                resort: '_resort',\n\n                /**\n                 * @param {jQuery.Event} event\n                 */\n                'mouseup [data-role=delete-button]': function (event) {\n                    var $imageContainer;\n\n                    event.preventDefault();\n                    $imageContainer = $(event.currentTarget).closest(this.options.imageSelector);\n                    this.element.find('[data-role=dialog]').trigger('close');\n                    this.element.trigger('removeItem', $imageContainer.data('imageData'));\n                },\n\n                /**\n                 * @param {jQuery.Event} event\n                 */\n                'mouseup [data-role=make-base-button]': function (event) {\n                    var $imageContainer,\n                        imageData;\n\n                    event.preventDefault();\n                    event.stopImmediatePropagation();\n                    $imageContainer = $(event.currentTarget).closest(this.options.imageSelector);\n                    imageData = $imageContainer.data('imageData');\n                    this.setBase(imageData);\n                }\n            });\n\n            this.element.sortable({\n                distance: 8,\n                items: this.options.imageSelector,\n                tolerance: 'pointer',\n                cancel: 'input, button, .uploader',\n                update: $.proxy(function () {\n                    this.element.trigger('resort');\n                }, this)\n            });\n        },\n\n        /**\n         * Set image as main\n         * @param {Object} imageData\n         * @private\n         */\n        setBase: function (imageData) {\n            var baseImage = this.options.types.image,\n                sameImages = $.grep(\n                    $.map(this.options.types, function (el) {\n                        return el;\n                    }),\n                    function (el) {\n                        return el.value === baseImage.value;\n                    }\n                ),\n                isImageOpened = this.findElement(imageData).hasClass('active');\n\n            $.each(sameImages, $.proxy(function (index, image) {\n                this.element.trigger('setImageType', {\n                    type: image.code,\n                    imageData: imageData\n                });\n\n                if (isImageOpened) {\n                    this.element.find('.item').addClass('selected');\n                    this.element.find('[data-role=type-selector]').prop({\n                        'checked': true\n                    });\n                }\n            }, this));\n        },\n\n        /**\n         * Find element by fileName\n         * @param {Object} data\n         * @returns {Element}\n         */\n        findElement: function (data) {\n            return this.element.find(this.options.imageSelector).filter(function () {\n                return $(this).data('imageData').file === data.file;\n            }).first();\n        },\n\n        /**\n         * Mark parent fieldset that content was updated\n         */\n        _contentUpdated: function () {\n            if (this.options.initialized && this.options.parentComponent) {\n                registry.async(this.options.parentComponent)(\n                    function (parentComponent) {\n                        parentComponent.bubble('update', true);\n                    }\n                );\n            }\n        },\n\n        /**\n         * Add image\n         * @param {jQuery.Event} event\n         * @param {Object} imageData\n         * @private\n         */\n        _addItem: function (event, imageData) {\n            var element,\n                imgElement,\n                lastElement,\n                count,\n                position;\n\n            if (this._isInitializingItems) {\n                count = this._initializedItemCount++;\n                lastElement = this._lastInitializedElement;\n            } else {\n                count = this.element.find(this.options.imageSelector).length;\n                lastElement = this.element.find(this.options.imageSelector + ':last');\n            }\n\n            position = count + 1;\n\n            if (lastElement && lastElement.length === 1) {\n                position = parseInt(lastElement.data('imageData').position || count, 10) + 1;\n            }\n            imageData = $.extend({\n                'file_id': imageData['value_id'] ? imageData['value_id'] : Math.random().toString(33).substr(2, 18),\n                'disabled': imageData.disabled ? imageData.disabled : 0,\n                'position': position,\n                sizeLabel: bytesToSize(imageData.size)\n            }, imageData);\n\n            element = this.imgTmpl({\n                data: imageData\n            });\n\n            element = $(element).data('imageData', imageData);\n\n            if (count === 0) {\n                element.prependTo(this.element);\n            } else {\n                element.insertAfter(lastElement);\n            }\n\n            this._lastInitializedElement = element;\n\n            if (!this.options.initialized &&\n                this.options.images.length === 0 ||\n                this.options.initialized &&\n                this.element.find(this.options.imageSelector + ':not(.removed)').length === 1\n            ) {\n                this.setBase(imageData);\n            }\n\n            imgElement = element.find(this.options.imageElementSelector);\n\n            imgElement.on('load', this._updateImageDimesions.bind(this, element));\n\n            $.each(this.options.types, $.proxy(function (index, image) {\n                if (imageData.file === image.value) {\n                    this.element.trigger('setImageType', {\n                        type: image.code,\n                        imageData: imageData\n                    });\n                }\n            }, this));\n\n            if (!this._isInitializingItems) {\n                this._updateImagesRoles();\n                this._contentUpdated();\n            }\n        },\n\n        /**\n         * Returns a list of current images.\n         *\n         * @returns {jQueryCollection}\n         */\n        _getImages: function () {\n            return this.element.find(this.options.imageSelector);\n        },\n\n        /**\n         * Returns a list of images roles.\n         *\n         * @return {Object}\n         */\n        _getRoles: function () {\n            return _.mapObject(this.options.types, function (data, key) {\n                var elem = this.element.find('.image-' + key);\n\n                return {\n                    index: key,\n                    value: elem.val(),\n                    elem: elem\n                };\n            }, this);\n        },\n\n        /**\n         * Updates labels with roles information for each image.\n         */\n        _updateImagesRoles: function () {\n            var $images = this._getImages().toArray(),\n                roles = this._getRoles();\n\n            $images.forEach(function (img) {\n                var $img = $(img),\n                    data = $img.data('imageData');\n\n                $img.find('[data-role=roles-labels] li').each(function (index, elem) {\n                    var $elem = $(elem),\n                        roleCode = $elem.data('roleCode'),\n                        role = roles[roleCode];\n\n                    role.value === data.file  ?\n                        $elem.show() :\n                        $elem.hide();\n                });\n\n            });\n        },\n\n        /**\n         * Updates image's dimensions information.\n         *\n         * @param {jQeuryCollection} imgContainer\n         */\n        _updateImageDimesions: function (imgContainer) {\n            var $img = imgContainer.find(this.options.imageElementSelector)[0],\n                $dimens = imgContainer.find('[data-role=image-dimens]');\n\n            $dimens.text($img.naturalWidth + 'x' + $img.naturalHeight + ' px');\n        },\n\n        /**\n         *\n         * @param {jQuery.Event} event\n         * @param {Object} data\n         */\n        _updateImageTitle: function (event, data) {\n            var imageData = data.imageData,\n                $imgContainer = this.findElement(imageData),\n                $title = $imgContainer.find(this.options.imgTitleSelector),\n                value;\n\n            value = imageData['media_type'] === 'external-video' ?\n                imageData['video_title'] :\n                imageData.label;\n\n            $title.text(value);\n\n            this._contentUpdated();\n        },\n\n        /**\n         * Remove Image\n         * @param {jQuery.Event} event\n         * @param {Object} imageData\n         * @private\n         */\n        _removeItem: function (event, imageData) {\n            var $imageContainer = this.findElement(imageData);\n\n            imageData.isRemoved = true;\n            $imageContainer.addClass('removed').hide().find('.is-removed').val(1);\n\n            this._contentUpdated();\n        },\n\n        /**\n         * Set image type\n         * @param {jQuery.Event} event\n         * @param {Obejct} data\n         * @private\n         */\n        _setImageType: function (event, data) {\n            if (data.type === 'image') {\n                this.element.find('.base-image').removeClass('base-image');\n            }\n\n            if (data.imageData) {\n                this.options.types[data.type].value = data.imageData.file;\n\n                if (data.type === 'image') {\n                    this.findElement(data.imageData).addClass('base-image');\n                }\n            } else {\n                this.options.types[data.type].value = 'no_selection';\n            }\n            this.element.find('.image-' + data.type).val(this.options.types[data.type].value || 'no_selection');\n            this._updateImagesRoles();\n            this._contentUpdated();\n        },\n\n        /**\n         * Resort images\n         * @private\n         */\n        _resort: function () {\n            this.element.find('.position').each($.proxy(function (index, element) {\n                var value = $(element).val();\n\n                if (value != index) { //eslint-disable-line eqeqeq\n                    this.element.trigger('moveElement', {\n                        imageData: $(element).closest(this.options.imageSelector).data('imageData'),\n                        position: index\n                    });\n                    $(element).val(index);\n                }\n            }, this));\n\n            this._contentUpdated();\n        },\n\n        /**\n         * Set image position\n         * @param {jQuery.Event} event\n         * @param {Object} data\n         * @private\n         */\n        _setPosition: function (event, data) {\n            var $element = this.findElement(data.imageData),\n                curIndex = this.element.find(this.options.imageSelector).index($element),\n                newPosition = data.position + (curIndex > data.position ? -1 : 0);\n\n            if (data.position != curIndex) { //eslint-disable-line eqeqeq\n                if (data.position === 0) {\n                    this.element.prepend($element);\n                } else {\n                    $element.insertAfter(\n                        this.element.find(this.options.imageSelector).eq(newPosition)\n                    );\n                }\n                this.element.trigger('resort');\n            }\n\n            this._contentUpdated();\n        }\n    });\n\n    // Extension for mage.productGallery - Add advanced settings block\n    $.widget('mage.productGallery', $.mage.productGallery, {\n        options: {\n            dialogTemplate: '[data-role=img-dialog-tmpl]',\n            dialogContainerTmpl: '[data-role=img-dialog-container-tmpl]'\n        },\n\n        /** @inheritdoc */\n        _create: function () {\n            var template = this.element.find(this.options.dialogTemplate),\n                containerTmpl = this.element.find(this.options.dialogContainerTmpl);\n\n            this._super();\n            this.modalPopupInit = false;\n\n            if (template.length) {\n                this.dialogTmpl = mageTemplate(template.html().trim());\n            }\n\n            if (containerTmpl.length) {\n                this.dialogContainerTmpl = mageTemplate(containerTmpl.html().trim());\n            } else {\n                this.dialogContainerTmpl = mageTemplate('');\n            }\n\n            this._initDialog();\n        },\n\n        /**\n         * Bind handler to elements\n         * @protected\n         */\n        _bind: function () {\n            var events = {};\n\n            this._super();\n\n            events['click [data-role=close-panel]'] = $.proxy(function () {\n                this.element.find('[data-role=dialog]').trigger('close');\n            }, this);\n\n            /**\n             * @param {jQuery.Event} event\n             */\n            events['click ' + this.options.imageSelector] = function (event) {\n                var imageData, $imageContainer;\n\n                if (!$(event.currentTarget).is('.ui-sortable-helper')) {\n                    $(event.currentTarget).addClass('active');\n                    imageData = $(event.currentTarget).data('imageData');\n                    $imageContainer = this.findElement(imageData);\n\n                    if ($imageContainer.is('.removed')) {\n                        return;\n                    }\n                    this.element.trigger('openDialog', [imageData]);\n                }\n            };\n            this._on(events);\n            this.element.on('sortstart', $.proxy(function () {\n                this.element.find('[data-role=dialog]').trigger('close');\n            }, this));\n        },\n\n        /**\n         * Initializes dialog element.\n         */\n        _initDialog: function () {\n            var $dialog = $(this.dialogContainerTmpl());\n\n            $dialog.modal({\n                'type': 'slide',\n                title: $.mage.__('Image Detail'),\n                buttons: [],\n\n                /** @inheritdoc */\n                opened: function () {\n                    $dialog.trigger('open');\n                },\n\n                /** @inheritdoc */\n                closed: function () {\n                    $dialog.trigger('close');\n                }\n            });\n\n            $dialog.on('open', this.onDialogOpen.bind(this));\n            $dialog.on('close', function () {\n                var $imageContainer = $dialog.data('imageContainer');\n\n                $imageContainer.removeClass('active');\n                $dialog.find('#hide-from-product-page').remove();\n            });\n\n            $dialog.on('change', '[data-role=type-selector]', function () {\n                var parent = $(this).closest('.item'),\n                    selectedClass = 'selected';\n\n                parent.toggleClass(selectedClass, $(this).prop('checked'));\n            });\n\n            $dialog.on('change', '[data-role=type-selector]', $.proxy(this._notifyType, this));\n\n            $dialog.on('change', '[data-role=visibility-trigger]', $.proxy(function (e) {\n                var imageData = $dialog.data('imageData');\n\n                this.element.trigger('updateVisibility', {\n                    disabled: $(e.currentTarget).is(':checked'),\n                    imageData: imageData\n                });\n            }, this));\n\n            $dialog.on('change', '[data-role=\"image-description\"]', function (e) {\n                var target = $(e.target),\n                    targetName = target.attr('name'),\n                    desc = target.val(),\n                    imageData = $dialog.data('imageData');\n\n                this.element.find('input[type=\"hidden\"][name=\"' + targetName + '\"]').val(desc);\n\n                imageData.label = desc;\n                imageData['label_default'] = desc;\n\n                this.element.trigger('updateImageTitle', {\n                    imageData: imageData\n                });\n            }.bind(this));\n\n            this.$dialog = $dialog;\n        },\n\n        /**\n         * @param {Object} imageData\n         * @private\n         */\n        _showDialog: function (imageData) {\n            var $imageContainer = this.findElement(imageData),\n                $template;\n\n            $template = this.dialogTmpl({\n                'data': imageData\n            });\n\n            this.$dialog\n                .html($template)\n                .data('imageData', imageData)\n                .data('imageContainer', $imageContainer)\n                .modal('openModal');\n        },\n\n        /**\n         * Handles dialog open event.\n         *\n         * @param {EventObject} event\n         */\n        onDialogOpen: function (event) {\n            var imageData = this.$dialog.data('imageData'),\n                imageSizeKb = imageData.sizeLabel,\n                image = document.createElement('img'),\n                sizeSpan = this.$dialog.find(this.options.imageSizeLabel)\n                    .find('[data-message]'),\n                resolutionSpan = this.$dialog.find(this.options.imageResolutionLabel)\n                    .find('[data-message]'),\n                sizeText = sizeSpan.attr('data-message').replace('{size}', imageSizeKb),\n                resolutionText;\n\n            image.src = imageData.url;\n\n            resolutionText = resolutionSpan\n                .attr('data-message')\n                .replace('{width}^{height}', image.width + 'x' + image.height);\n\n            sizeSpan.text(sizeText);\n            resolutionSpan.text(resolutionText);\n\n            $(event.target)\n                .find('[data-role=type-selector]')\n                .each($.proxy(function (index, checkbox) {\n                    var $checkbox = $(checkbox),\n                        parent = $checkbox.closest('.item'),\n                        selectedClass = 'selected',\n                        isChecked = this.options.types[$checkbox.val()].value == imageData.file; //eslint-disable-line\n\n                    $checkbox.prop(\n                        'checked',\n                        isChecked\n                    );\n                    parent.toggleClass(selectedClass, isChecked);\n                }, this));\n        },\n\n        /**\n         *\n         * Click by image handler\n         *\n         * @param {jQuery.Event} e\n         * @param {Object} imageData\n         * @private\n         */\n        _onOpenDialog: function (e, imageData) {\n            if (imageData['media_type'] && imageData['media_type'] != 'image') { //eslint-disable-line eqeqeq\n                return;\n            }\n            this._showDialog(imageData);\n        },\n\n        /**\n         * Change visibility\n         *\n         * @param {jQuery.Event} event\n         * * @param {Object} data\n         * @private\n         */\n        _updateVisibility: function (event, data) {\n            var imageData = data.imageData,\n                disabled = +data.disabled,\n                $imageContainer = this.findElement(imageData);\n\n            !!disabled ? //eslint-disable-line no-extra-boolean-cast\n                $imageContainer.addClass('hidden-for-front') :\n                $imageContainer.removeClass('hidden-for-front');\n\n            $imageContainer.find('[name*=\"disabled\"]').val(disabled);\n            imageData.disabled = disabled;\n\n            this._contentUpdated();\n        },\n\n        /**\n         * Set image\n         * @param {jQuery.Event} event\n         * @private\n         */\n        _notifyType: function (event) {\n            var $checkbox = $(event.currentTarget),\n                $imageContainer = $checkbox.closest('[data-role=dialog]').data('imageContainer');\n\n            this.element.trigger('setImageType', {\n                type: $checkbox.val(),\n                imageData: $checkbox.is(':checked') ? $imageContainer.data('imageData') : null\n            });\n\n            this._updateImagesRoles();\n        }\n    });\n\n    return $.mage.productGallery;\n});\n","Magento_Catalog/js/options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* eslint-disable no-undef */\n// jscs:disable jsDoc\n\ndefine([\n    'jquery',\n    'mage/template',\n    'uiRegistry',\n    'jquery/ui',\n    'prototype',\n    'form',\n    'validation',\n    'mage/translate'\n], function (jQuery, mageTemplate, rg) {\n    'use strict';\n\n    return function (config) {\n        var optionPanel = jQuery('#manage-options-panel'),\n            editForm = jQuery('#edit_form'),\n            attributeOption = {\n                table: $('attribute-options-table'),\n                itemCount: 0,\n                totalItems: 0,\n                rendered: 0,\n                template: mageTemplate('#row-template'),\n                newOptionClass: 'new-option',\n                isReadOnly: config.isReadOnly,\n                add: function (data, render) {\n                    var isNewOption = false,\n                        element;\n\n                    if (typeof data.id == 'undefined') {\n                        data = {\n                            'id': 'option_' + this.itemCount,\n                            'sort_order': this.itemCount + 1,\n                            'rowClasses': this.newOptionClass\n                        };\n                        isNewOption = true;\n                    }\n\n                    if (!data.intype) {\n                        data.intype = this.getOptionInputType();\n                    }\n\n                    element = this.template({\n                        data: data\n                    });\n\n                    if (isNewOption && !this.isReadOnly) {\n                        this.enableNewOptionDeleteButton(data.id);\n                    }\n                    this.itemCount++;\n                    this.totalItems++;\n                    this.elements += element;\n\n                    if (render) {\n                        this.render();\n                        this.updateItemsCountField();\n                    }\n                },\n                remove: function (event) {\n                    var element = $(Event.findElement(event, 'tr')),\n                        elementFlags; // !!! Button already have table parent in safari\n\n                    // Safari workaround\n                    element.ancestors().each(function (parentItem) {\n                        if (parentItem.hasClassName('option-row')) {\n                            element = parentItem;\n                            throw $break;\n                        } else if (parentItem.hasClassName('box')) {\n                            throw $break;\n                        }\n                    });\n\n                    if (element) {\n                        elementFlags = element.getElementsByClassName('delete-flag');\n\n                        if (elementFlags[0]) {\n                            elementFlags[0].value = 1;\n                        }\n\n                        element.addClassName('no-display');\n                        element.addClassName('template');\n                        element.hide();\n                        this.totalItems--;\n                        this.updateItemsCountField();\n                    }\n\n                    if (element.hasClassName(this.newOptionClass)) {\n                        element.remove();\n                    }\n                },\n                updateItemsCountField: function () {\n                    $('option-count-check').value = this.totalItems > 0 ? '1' : '';\n                },\n                enableNewOptionDeleteButton: function (id) {\n                    $$('#delete_button_container_' + id + ' button').each(function (button) {\n                        button.enable();\n                        button.removeClassName('disabled');\n                    });\n                },\n                bindRemoveButtons: function () {\n                    jQuery('#swatch-visual-options-panel').on('click', '.delete-option', this.remove.bind(this));\n                },\n                render: function () {\n                    Element.insert($$('[data-role=options-container]')[0], this.elements);\n                    this.elements = '';\n                },\n                renderWithDelay: function (data, from, step, delay) {\n                    var arrayLength = data.length,\n                        len;\n\n                    for (len = from + step; from < len && from < arrayLength; from++) {\n                        this.add(data[from]);\n                    }\n                    this.render();\n\n                    if (from === arrayLength) {\n                        this.updateItemsCountField();\n                        this.rendered = 1;\n                        jQuery('body').trigger('processStop');\n\n                        return true;\n                    }\n                    setTimeout(this.renderWithDelay.bind(this, data, from, step, delay), delay);\n                },\n                ignoreValidate: function () {\n                    var ignore = '.ignore-validate input, ' +\n                        '.ignore-validate select, ' +\n                        '.ignore-validate textarea';\n\n                    jQuery('#edit_form').data('validator').settings.forceIgnore = ignore;\n                },\n                getOptionInputType: function () {\n                    var optionDefaultInputType = 'radio';\n\n                    if ($('frontend_input') && $('frontend_input').value === 'multiselect') {\n                        optionDefaultInputType = 'checkbox';\n                    }\n\n                    return optionDefaultInputType;\n                }\n            },\n            tableBody = jQuery(),\n            activePanelClass = 'selected-type-options';\n\n        if ($('add_new_option_button')) {\n            Event.observe('add_new_option_button', 'click', attributeOption.add.bind(attributeOption, {}, true));\n        }\n        $('manage-options-panel').on('click', '.delete-option', function (event) {\n            attributeOption.remove(event);\n        });\n\n        optionPanel.on('render', function () {\n            attributeOption.ignoreValidate();\n\n            if (attributeOption.rendered) {\n                return false;\n            }\n            jQuery('body').trigger('processStart');\n            attributeOption.renderWithDelay(config.attributesData, 0, 100, 300);\n            attributeOption.bindRemoveButtons();\n        });\n\n        if (config.isSortable) {\n            jQuery(function ($) {\n                $('[data-role=options-container]').sortable({\n                    distance: 8,\n                    tolerance: 'pointer',\n                    cancel: 'input, button',\n                    axis: 'y',\n                    update: function () {\n                        $('[data-role=options-container] [data-role=order]').each(function (index, element) {\n                            $(element).val(index + 1);\n                        });\n                    }\n                });\n            });\n        }\n        editForm.on('beforeSubmit', function () {\n            var optionContainer = optionPanel.find('table tbody'),\n                optionsValues;\n\n            if (optionPanel.hasClass(activePanelClass)) {\n                optionsValues = jQuery.map(\n                    optionContainer.find('tr'),\n                    function (row) {\n                        return jQuery(row).find('input, select, textarea').serialize();\n                    }\n                );\n                jQuery('<input>')\n                    .attr({\n                        type: 'hidden',\n                        name: 'serialized_options'\n                    })\n                    .val(JSON.stringify(optionsValues))\n                    .prependTo(editForm);\n            }\n            tableBody = optionContainer.detach();\n        });\n        editForm.on('afterValidate.error highlight.validate', function () {\n            if (optionPanel.hasClass(activePanelClass)) {\n                optionPanel.find('table').append(tableBody);\n                jQuery('input[name=\"serialized_options\"]').remove();\n            }\n        });\n        window.attributeOption = attributeOption;\n        window.optionDefaultInputType = attributeOption.getOptionInputType();\n\n        rg.set('manage-options-panel', attributeOption);\n    };\n});\n","Magento_Catalog/js/price-box.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery',\n    'Magento_Catalog/js/price-utils',\n    'underscore',\n    'mage/template',\n    'jquery-ui-modules/widget'\n], function ($, utils, _, mageTemplate) {\n    'use strict';\n\n    var globalOptions = {\n        productId: null,\n        priceConfig: null,\n        prices: {},\n        priceTemplate: '<span class=\"price\"><%- data.formatted %></span>'\n    };\n\n    $.widget('mage.priceBox', {\n        options: globalOptions,\n        qtyInfo: '#qty',\n\n        /**\n         * Widget initialisation.\n         * Every time when option changed prices also can be changed. So\n         * changed options.prices -> changed cached prices -> recalculation -> redraw price box\n         */\n        _init: function initPriceBox() {\n            var box = this.element;\n\n            box.trigger('updatePrice');\n            this.cache.displayPrices = utils.deepClone(this.options.prices);\n        },\n\n        /**\n         * Widget creating.\n         */\n        _create: function createPriceBox() {\n            var box = this.element;\n\n            this.cache = {};\n            this._setDefaultsFromPriceConfig();\n            this._setDefaultsFromDataSet();\n\n            box.on('reloadPrice', this.reloadPrice.bind(this));\n            box.on('updatePrice', this.onUpdatePrice.bind(this));\n            $(this.qtyInfo).on('input', this.updateProductTierPrice.bind(this));\n            box.trigger('price-box-initialized');\n        },\n\n        /**\n         * Call on event updatePrice. Proxy to updatePrice method.\n         * @param {Event} event\n         * @param {Object} prices\n         */\n        onUpdatePrice: function onUpdatePrice(event, prices) {\n            return this.updatePrice(prices);\n        },\n\n        /**\n         * Updates price via new (or additional values).\n         * It expects object like this:\n         * -----\n         *   \"option-hash\":\n         *      \"price-code\":\n         *         \"amount\": 999.99999,\n         *         ...\n         * -----\n         * Empty option-hash object or empty price-code object treats as zero amount.\n         * @param {Object} newPrices\n         */\n        updatePrice: function updatePrice(newPrices) {\n            var prices = this.cache.displayPrices,\n                additionalPrice = {},\n                pricesCode = [],\n                priceValue, origin, finalPrice;\n\n            this.cache.additionalPriceObject = this.cache.additionalPriceObject || {};\n\n            if (newPrices) {\n                $.extend(this.cache.additionalPriceObject, newPrices);\n            }\n\n            if (!_.isEmpty(additionalPrice)) {\n                pricesCode = _.keys(additionalPrice);\n            } else if (!_.isEmpty(prices)) {\n                pricesCode = _.keys(prices);\n            }\n\n            _.each(this.cache.additionalPriceObject, function (additional) {\n                if (additional && !_.isEmpty(additional)) {\n                    pricesCode = _.keys(additional);\n                }\n                _.each(pricesCode, function (priceCode) {\n                    priceValue = additional[priceCode] || {};\n                    priceValue.amount = +priceValue.amount || 0;\n                    priceValue.adjustments = priceValue.adjustments || {};\n\n                    additionalPrice[priceCode] = additionalPrice[priceCode] || {\n                        'amount': 0,\n                        'adjustments': {}\n                    };\n                    additionalPrice[priceCode].amount =  0 + (additionalPrice[priceCode].amount || 0) +\n                        priceValue.amount;\n                    _.each(priceValue.adjustments, function (adValue, adCode) {\n                        additionalPrice[priceCode].adjustments[adCode] = 0 +\n                            (additionalPrice[priceCode].adjustments[adCode] || 0) + adValue;\n                    });\n                });\n            });\n\n            if (_.isEmpty(additionalPrice)) {\n                this.cache.displayPrices = utils.deepClone(this.options.prices);\n            } else {\n                _.each(additionalPrice, function (option, priceCode) {\n                    origin = this.options.prices[priceCode] || {};\n                    finalPrice = prices[priceCode] || {};\n                    option.amount = option.amount || 0;\n                    origin.amount = origin.amount || 0;\n                    origin.adjustments = origin.adjustments || {};\n                    finalPrice.adjustments = finalPrice.adjustments || {};\n\n                    finalPrice.amount = 0 + origin.amount + option.amount;\n                    _.each(option.adjustments, function (pa, paCode) {\n                        finalPrice.adjustments[paCode] = 0 + (origin.adjustments[paCode] || 0) + pa;\n                    });\n                }, this);\n            }\n\n            this.element.trigger('priceUpdated', this.cache.displayPrices);\n            this.element.trigger('reloadPrice');\n        },\n\n        /*eslint-disable no-extra-parens*/\n        /**\n         * Render price unit block.\n         */\n        reloadPrice: function reDrawPrices() {\n            var priceFormat = (this.options.priceConfig && this.options.priceConfig.priceFormat) || {},\n                priceTemplate = mageTemplate(this.options.priceTemplate);\n\n            _.each(this.cache.displayPrices, function (price, priceCode) {\n                price.final = _.reduce(price.adjustments, function (memo, amount) {\n                    return memo + amount;\n                }, price.amount);\n\n                price.formatted = utils.formatPriceLocale(price.final, priceFormat);\n\n                $('[data-price-type=\"' + priceCode + '\"]', this.element).html(priceTemplate({\n                    data: price\n                }));\n            }, this);\n        },\n\n        /*eslint-enable no-extra-parens*/\n        /**\n         * Overwrites initial (default) prices object.\n         * @param {Object} prices\n         */\n        setDefault: function setDefaultPrices(prices) {\n            this.cache.displayPrices = utils.deepClone(prices);\n            this.options.prices = utils.deepClone(prices);\n        },\n\n        /**\n         * Custom behavior on getting options:\n         * now widget able to deep merge of accepted configuration.\n         * @param  {Object} options\n         * @return {mage.priceBox}\n         */\n        _setOptions: function setOptions(options) {\n            $.extend(true, this.options, options);\n\n            if ('disabled' in options) {\n                this._setOption('disabled', options.disabled);\n            }\n\n            return this;\n        },\n\n        /**\n         * setDefaultsFromDataSet\n         */\n        _setDefaultsFromDataSet: function _setDefaultsFromDataSet() {\n            var box = this.element,\n                priceHolders = $('[data-price-type]', box),\n                prices = this.options.prices;\n\n            this.options.productId = box.data('productId');\n\n            if (_.isEmpty(prices)) {\n                priceHolders.each(function (index, element) {\n                    var type = $(element).data('priceType'),\n                        amount = parseFloat($(element).data('priceAmount'));\n\n                    if (type && !_.isNaN(amount)) {\n                        prices[type] = {\n                            amount: amount\n                        };\n                    }\n                });\n            }\n        },\n\n        /**\n         * setDefaultsFromPriceConfig\n         */\n        _setDefaultsFromPriceConfig: function _setDefaultsFromPriceConfig() {\n            var config = this.options.priceConfig;\n\n            if (config && config.prices) {\n                this.options.prices = config.prices;\n            }\n        },\n\n        /**\n         * Updates product final and base price according to tier prices\n         */\n        updateProductTierPrice: function updateProductTierPrice() {\n            var originalPrice,\n                prices = {'prices': {}};\n\n            if (this.options.prices.finalPrice) {\n                originalPrice = this.options.prices.finalPrice.amount;\n                prices.prices.finalPrice = {'amount': this.getPrice('price') - originalPrice};\n            }\n\n            if (this.options.prices.basePrice) {\n                originalPrice = this.options.prices.basePrice.amount;\n                prices.prices.basePrice = {'amount': this.getPrice('basePrice') - originalPrice};\n            }\n\n            this.updatePrice(prices);\n        },\n\n        /**\n         * Returns price.\n         *\n         * @param {String} priceKey\n         * @returns {Number}\n         */\n        getPrice: function (priceKey) {\n            var productQty = $(this.qtyInfo).val(),\n                result,\n                tierPriceItem,\n                i;\n\n            for (i = 0; i < this.options.priceConfig.tierPrices.length; i++) {\n                tierPriceItem = this.options.priceConfig.tierPrices[i];\n                if (productQty >= tierPriceItem.qty && tierPriceItem[priceKey]) {\n                    result = tierPriceItem[priceKey];\n                }\n            }\n\n            return result;\n        }\n    });\n\n    return $.mage.priceBox;\n});\n","Magento_Catalog/js/form/element/action-delete.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/abstract'\n], function (_, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n        defaults: {\n            prefixName: '',\n            prefixElementName: '',\n            elementName: '',\n            suffixName: ''\n        },\n\n        /**\n         * Parses options and merges the result with instance\n         *\n         * @param  {Object} config\n         * @returns {Object} Chainable.\n         */\n        initConfig: function (config) {\n            this._super(config);\n\n            this.configureDataScope();\n\n            return this;\n        },\n\n        /**\n         * Configure data scope.\n         */\n        configureDataScope: function () {\n            var recordId,\n                prefixName,\n                suffixName;\n\n            // Get recordId\n            recordId = this.parentName.split('.').last();\n\n            prefixName = this.dataScopeToHtmlArray(this.prefixName);\n            this.elementName = this.prefixElementName + recordId;\n\n            suffixName = '';\n\n            if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n                suffixName = '[' + this.suffixName + ']';\n            }\n            this.inputName = prefixName + '[' + this.elementName + ']' + suffixName;\n\n            suffixName = '';\n\n            if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n                suffixName = '.' + this.suffixName;\n            }\n            this.dataScope = 'data.' + this.prefixName + '.' + this.elementName + suffixName;\n\n            this.links.value = this.provider + ':' + this.dataScope;\n        },\n\n        /**\n         * Get HTML array from data scope.\n         *\n         * @param {String} dataScopeString\n         * @returns {String}\n         */\n        dataScopeToHtmlArray: function (dataScopeString) {\n            var dataScopeArray, dataScope, reduceFunction;\n\n            /**\n             * Reduce\n             *\n             * @param {String} prev\n             * @param {String} curr\n             * @returns {String}\n             */\n            reduceFunction = function (prev, curr) {\n                return prev + '[' + curr + ']';\n            };\n\n            dataScopeArray = dataScopeString.split('.');\n\n            dataScope = dataScopeArray.shift();\n            dataScope += dataScopeArray.reduce(reduceFunction, '');\n\n            return dataScope;\n        },\n\n        /**\n         * Delete record instance\n         * update data provider dataScope\n         *\n         * @param {Object} parents\n         */\n        deleteRecord: function (parents) {\n            this.value(1);\n            parents[1].deleteRecord(parents[0].index, parents[0].recordId);\n\n            return this;\n        }\n    });\n});\n","Magento_Catalog/js/form/element/checkbox.js":"/**\r\n * Copyright \u00a9 Magento, Inc. All rights reserved.\r\n * See COPYING.txt for license details.\r\n */\r\n\r\ndefine([\r\n    'Magento_Ui/js/form/element/single-checkbox'\r\n], function (Checkbox) {\r\n    'use strict';\r\n\r\n    return Checkbox.extend({\r\n        defaults: {\r\n            inputCheckBoxName: '',\r\n            prefixElementName: '',\r\n            parentDynamicRowName: 'visual_swatch'\r\n        },\r\n\r\n        /**\r\n         * Parses options and merges the result with instance\r\n         *\r\n         * @returns {Object} Chainable.\r\n         */\r\n        initConfig: function () {\r\n            this._super();\r\n            this.configureDataScope();\r\n\r\n            return this;\r\n        },\r\n\r\n        /** @inheritdoc */\r\n        initialize: function () {\r\n            this._super();\r\n\r\n            if (this.rows && this.rows().elems().length === 0) {\r\n                this.checked(true);\r\n            }\r\n\r\n            return this;\r\n        },\r\n\r\n        /**\r\n         * Configure data scope.\r\n         */\r\n        configureDataScope: function () {\r\n            var recordId,\r\n                value;\r\n\r\n            recordId = this.parentName.split('.').last();\r\n            value = this.prefixElementName + recordId;\r\n\r\n            this.dataScope = 'data.' + this.inputCheckBoxName;\r\n            this.inputName = this.dataScopeToHtmlArray(this.inputCheckBoxName);\r\n\r\n            this.initialValue = value;\r\n\r\n            this.links.value = this.provider + ':' + this.dataScope;\r\n        },\r\n\r\n        /**\r\n         * Get HTML array from data scope.\r\n         *\r\n         * @param {String} dataScopeString\r\n         * @returns {String}\r\n         */\r\n        dataScopeToHtmlArray: function (dataScopeString) {\r\n            var dataScopeArray, dataScope, reduceFunction;\r\n\r\n            /**\r\n             * Add new level of nesting.\r\n             *\r\n             * @param {String} prev\r\n             * @param {String} curr\r\n             * @returns {String}\r\n             */\r\n            reduceFunction = function (prev, curr) {\r\n                return prev + '[' + curr + ']';\r\n            };\r\n\r\n            dataScopeArray = dataScopeString.split('.');\r\n\r\n            dataScope = dataScopeArray.shift();\r\n            dataScope += dataScopeArray.reduce(reduceFunction, '');\r\n\r\n            return dataScope;\r\n        }\r\n    });\r\n});\r\n","Magento_Catalog/js/form/element/input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/abstract'\n], function (_, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n        defaults: {\n            prefixName: '',\n            prefixElementName: '',\n            elementName: '',\n            suffixName: ''\n        },\n\n        /**\n         * Parses options and merges the result with instance\n         *\n         * @returns {Object} Chainable.\n         */\n        initConfig: function () {\n            this._super();\n            this.configureDataScope();\n\n            return this;\n        },\n\n        /**\n         * Configure data scope.\n         */\n        configureDataScope: function () {\n            var recordId,\n                prefixName,\n                suffixName;\n\n            // Get recordId\n            recordId = this.parentName.split('.').last();\n\n            prefixName = this.dataScopeToHtmlArray(this.prefixName);\n            this.elementName = this.prefixElementName + recordId;\n\n            suffixName = '';\n\n            if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n                suffixName = '[' + this.suffixName + ']';\n            }\n            this.inputName = prefixName + '[' + this.elementName + ']' + suffixName;\n\n            suffixName = '';\n\n            if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n                suffixName = '.' + this.suffixName;\n            }\n\n            this.exportDataLink = 'data.' + this.prefixName + '.' + this.elementName + suffixName;\n            this.exports.value = this.provider + ':' + this.exportDataLink;\n        },\n\n        /** @inheritdoc */\n        destroy: function () {\n            this._super();\n\n            this.source.remove(this.exportDataLink);\n        },\n\n        /**\n         * Get HTML array from data scope.\n         *\n         * @param {String} dataScopeString\n         * @returns {String}\n         */\n        dataScopeToHtmlArray: function (dataScopeString) {\n            var dataScopeArray, dataScope, reduceFunction;\n\n            /**\n             * Add new level of nesting.\n             *\n             * @param {String} prev\n             * @param {String} curr\n             * @returns {String}\n             */\n            reduceFunction = function (prev, curr) {\n                return prev + '[' + curr + ']';\n            };\n\n            dataScopeArray = dataScopeString.split('.');\n\n            dataScope = dataScopeArray.shift();\n            dataScope += dataScopeArray.reduce(reduceFunction, '');\n\n            return dataScope;\n        }\n    });\n});\n","Magento_Catalog/js/product/name.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/grid/columns/column',\n    'Magento_Catalog/js/product/list/column-status-validator',\n    'escaper'\n], function (Column, columnStatusValidator, escaper) {\n    'use strict';\n\n    return Column.extend({\n        defaults: {\n            allowedTags: ['div', 'span', 'b', 'strong', 'i', 'em', 'u', 'a']\n        },\n\n        /**\n         * Depends on this option, product name can be shown or hide. Depends on  backend configuration\n         *\n         * @returns {Boolean}\n         */\n        isAllowed: function () {\n            return columnStatusValidator.isValid(this.source(), 'name', 'show_attributes');\n        },\n\n        /**\n         * Name column.\n         *\n         * @param {String} label\n         * @returns {String}\n         */\n        getNameUnsanitizedHtml: function (label) {\n            return escaper.escapeHtml(label, this.allowedTags);\n        }\n    });\n});\n","Magento_Catalog/js/product/addtocart-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/grid/columns/column',\n    'Magento_Catalog/js/product/uenc-processor',\n    'Magento_Catalog/js/product/list/column-status-validator'\n], function (Element, uencProcessor, columnStatusValidator) {\n    'use strict';\n\n    return Element.extend({\n        defaults: {\n            label: ''\n        },\n\n        /**\n         * Prepare data, that will be inserted as data-mage-init attribute into button. With help of this attribute\n         * Add To * buttons can understand post data and urls\n         *\n         * @param {Object} row\n         * @returns {String}\n         */\n        getDataMageInit: function (row) {\n            return '{\"redirectUrl\": { \"url\" : \"'  + uencProcessor(row['add_to_cart_button'].url) + '\"}}';\n        },\n\n        /**\n         * Prepare Data-Post data that will be used in data-mage-init\n         *\n         * @param {Object} row\n         * @return {String}\n         */\n        getDataPost: function (row) {\n            return uencProcessor(row['add_to_cart_button']['post_data']);\n        },\n\n        /**\n         * Check if product has required options.\n         *\n         * @param {Object} row\n         * @return {Boolean}\n         */\n        hasRequiredOptions: function (row) {\n            return row['add_to_cart_button']['required_options'];\n        },\n\n        /**\n         * Depends on this option, \"Add to cart\" button can be shown or hide\n         *\n         * @param {Object} row\n         * @returns {Boolean}\n         */\n        isSalable: function (row) {\n            return row['is_salable'];\n        },\n\n        /**\n         * Depends on this option, stock status text can be \"In stock\" or \"Out Of Stock\"\n         *\n         * @param {Object} row\n         * @returns {Boolean}\n         */\n        isAvailable: function (row) {\n            return row['is_available'];\n        },\n\n        /**\n         * Depends on this option, \"Add to cart\" button can be shown or hide. Depends on  backend configuration\n         *\n         * @returns {Boolean}\n         */\n        isAllowed: function () {\n            return columnStatusValidator.isValid(this.source(), 'add_to_cart', 'show_buttons');\n        },\n\n        /**\n         * Get button label.\n         *\n         * @return {String}\n         */\n        getLabel: function () {\n            return this.label;\n        }\n    });\n});\n","Magento_Catalog/js/product/weight-handler.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    return {\n\n        /**\n         * Get weight\n         * @returns {*|jQuery|HTMLElement}\n         */\n        $weight: function () {\n            return $('#weight');\n        },\n\n        /**\n         * Weight Switcher\n         * @returns {*|jQuery|HTMLElement}\n         */\n        $weightSwitcher: function () {\n            return $('[data-role=weight-switcher]');\n        },\n\n        /**\n         * Weight Change Toggle\n         * @returns {*|jQuery|HTMLElement}\n         */\n        $weightChangeToggle: function () {\n            return $('#toggle_weight');\n        },\n\n        /**\n         * Is locked\n         * @returns {*}\n         */\n        isLocked: function () {\n            return this.$weight().is('[data-locked]');\n        },\n\n        /**\n         * Disabled\n         */\n        disabled: function () {\n            this.$weight().addClass('ignore-validate').prop('disabled', true);\n        },\n\n        /**\n         * Enabled\n         */\n        enabled: function () {\n            this.$weight().removeClass('ignore-validate').prop('disabled', false);\n        },\n\n        /**\n         * Disabled Switcher\n         */\n        disabledSwitcher: function () {\n            this.$weightSwitcher().find('input[type=\"radio\"]').addClass('ignore-validate').prop('disabled', true);\n        },\n\n        /**\n         * Enabled Switcher\n         */\n        enabledSwitcher: function () {\n            this.$weightSwitcher().find('input[type=\"radio\"]').removeClass('ignore-validate').prop('disabled', false);\n        },\n\n        /**\n         * Switch Weight\n         * @returns {*}\n         */\n        switchWeight: function () {\n            if (this.hasWeightChangeToggle()) {\n                return;\n            }\n\n            return this.productHasWeightBySwitcher() ? this.enabled() : this.disabled();\n        },\n\n        /**\n         * Toggle Switcher\n         */\n        toggleSwitcher: function () {\n            this.isWeightChanging() ? this.enabledSwitcher() : this.disabledSwitcher();\n        },\n\n        /**\n         * Hide weight switcher\n         */\n        hideWeightSwitcher: function () {\n            this.$weightSwitcher().hide();\n        },\n\n        /**\n         * Has weight switcher\n         * @returns {*}\n         */\n        hasWeightSwitcher: function () {\n            return this.$weightSwitcher().is(':visible');\n        },\n\n        /**\n         * Has weight\n         * @returns {*}\n         */\n        hasWeight: function () {\n            return this.$weight.is(':visible');\n        },\n\n        /**\n         * Has weight change toggle\n         * @returns {*}\n         */\n        hasWeightChangeToggle: function () {\n            return this.$weightChangeToggle().is(':visible');\n        },\n\n        /**\n         * Product has weight\n         * @returns {Bool}\n         */\n        productHasWeightBySwitcher: function () {\n            return $('input:checked', this.$weightSwitcher()).val() === '1';\n        },\n\n        /**\n         * Product weight toggle is checked\n         * @returns {Bool}\n         */\n        isWeightChanging: function () {\n            return this.$weightChangeToggle().is(':checked');\n        },\n\n        /**\n         * Change\n         * @param {String} data\n         */\n        change: function (data) {\n            var value = data !== undefined ? +data : !this.productHasWeightBySwitcher();\n\n            $('input[value=' + value + ']', this.$weightSwitcher()).prop('checked', true);\n            this.switchWeight();\n        },\n\n        /**\n         * Constructor component\n         */\n        'Magento_Catalog/js/product/weight-handler': function () {\n            this.bindAll();\n\n            if (this.hasWeightSwitcher()) {\n                this.switchWeight();\n            }\n\n            if (this.hasWeightChangeToggle()) {\n                this.toggleSwitcher();\n            }\n        },\n\n        /**\n         * Bind all\n         */\n        bindAll: function () {\n            this.$weightSwitcher().find('input').on('change', this.switchWeight.bind(this));\n        }\n    };\n});\n","Magento_Catalog/js/product/learn-more.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/grid/columns/column',\n    'Magento_Catalog/js/product/list/column-status-validator'\n], function (Column, columnStatusValidator) {\n    'use strict';\n\n    return Column.extend({\n        /**\n         * Depends on this option, \"Learn More\" link can be shown or hide. Depends on  backend configuration\n         *\n         * @returns {Boolean}\n         */\n        isAllowed: function () {\n            return columnStatusValidator.isValid(this.source(), 'learn_more', 'show_attributes');\n        }\n    });\n});\n","Magento_Catalog/js/product/addtocompare-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/grid/columns/column',\n    'Magento_Catalog/js/product/uenc-processor',\n    'Magento_Catalog/js/product/list/column-status-validator'\n], function (Column, uencProcessor, columnStatusValidator) {\n    'use strict';\n\n    return Column.extend({\n        defaults: {\n            label: ''\n        },\n\n        /**\n         * Prepare Data-Post data that will be used in data-mage-init\n         *\n         * @param {Object} row\n         * @returns {Array}\n         */\n        getDataPost: function (row) {\n            return uencProcessor(row['add_to_compare_button'].url ||\n                    row['add_to_compare_button']['post_data']);\n        },\n\n        /**\n         * Depends on this option, \"Add to compare\" button can be shown or hide. Depends on  backend configuration\n         *\n         * @returns {Boolean}\n         */\n        isAllowed: function () {\n            return columnStatusValidator.isValid(this.source(), 'add_to_compare', 'show_buttons');\n        },\n\n        /**\n         * Get button label.\n         *\n         * @return {String}\n         */\n        getLabel: function () {\n            return this.label;\n        }\n    });\n});\n","Magento_Catalog/js/product/list/listing.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'underscore',\n    'Magento_Ui/js/grid/listing'\n], function (ko, _, Listing) {\n    'use strict';\n\n    return Listing.extend({\n        defaults: {\n            additionalClasses: '',\n            filteredRows: {},\n            limit: 5,\n            listens: {\n                elems: 'filterRowsFromCache',\n                '${ $.provider }:data.items': 'filterRowsFromServer'\n            }\n        },\n\n        /** @inheritdoc */\n        initialize: function () {\n            this._super();\n            this.filteredRows = ko.observable();\n            this.initProductsLimit();\n            this.hideLoader();\n        },\n\n        /**\n         * Initialize product limit\n         * Product limit can be configured through Ui component.\n         * Product limit are present in widget form\n         *\n         * @returns {exports}\n         */\n        initProductsLimit: function () {\n            if (this.source['page_size']) {\n                this.limit = this.source['page_size'];\n            }\n\n            return this;\n        },\n\n        /**\n         * Initializes observable properties.\n         *\n         * @returns {Listing} Chainable.\n         */\n        initObservable: function () {\n            this._super()\n                .track({\n                    rows: []\n                });\n\n            return this;\n        },\n\n        /**\n         * Sort and filter rows, that are already in magento storage cache\n         *\n         * @return void\n         */\n        filterRowsFromCache: function () {\n            this._filterRows(this.rows);\n        },\n\n        /**\n         * Sort and filter rows, that are come from backend\n         *\n         * @param {Object} rows\n         */\n        filterRowsFromServer: function (rows) {\n            this._filterRows(rows);\n        },\n\n        /**\n         * Filter rows by limit and sort them\n         *\n         * @param {Array} rows\n         * @private\n         */\n        _filterRows: function (rows) {\n            this.filteredRows(_.sortBy(rows, 'added_at').reverse().slice(0, this.limit));\n        },\n\n        /**\n         * Can retrieve product url\n         *\n         * @param {Object} row\n         * @returns {String}\n         */\n        getUrl: function (row) {\n            return row.url;\n        },\n\n        /**\n         * Get product attribute by code.\n         *\n         * @param {String} code\n         * @return {Object}\n         */\n        getComponentByCode: function (code) {\n            var elems = this.elems() ? this.elems() : ko.getObservable(this, 'elems'),\n                component;\n\n            component = _.filter(elems, function (elem) {\n                return elem.index === code;\n            }, this).pop();\n\n            return component;\n        }\n    });\n});\n","Magento_Catalog/js/product/list/column-status-validator.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'underscore'\n], function (_) {\n    'use strict';\n\n    return _.extend({\n        /**\n         * Check whether we can show column depends on server settings or not\n         *\n         * @param {Object} source\n         * @param {String} attributeCode\n         * @param {String} type\n         * @returns {Boolean}\n         */\n        isValid: function (source, attributeCode, type) {\n            var attributes;\n\n            if (!source[type]) {\n                return false;\n            }\n\n            attributes = source[type].split(',');\n\n            return _.contains(attributes, attributeCode);\n        }\n    });\n});\n","Magento_Catalog/js/product/list/columns/final-price.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'underscore',\n    'uiRegistry',\n    'mageUtils',\n    'uiCollection'\n], function (_, registry, utils, Collection) {\n    'use strict';\n\n    return Collection.extend({\n        defaults: {\n            label: false,\n            headerTmpl: 'ui/grid/columns/text',\n            showMinimalPrice: false,\n            showMaximumPrice: false,\n            useLinkForAsLowAs: false,\n            bodyTmpl: 'Magento_Catalog/product/final_price',\n            priceWrapperCssClasses: '',\n            priceWrapperAttr: {}\n        },\n\n        /**\n         * Get product final price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} final price html\n         */\n        getPrice: function (row) {\n            return row['price_info']['formatted_prices']['final_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getPrice.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} final price html\n         */\n        getPriceUnsanitizedHtml: function (row) {\n            return this.getPrice(row);\n        },\n\n        /**\n         * Get product regular price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} regular price html\n         */\n        getRegularPrice: function (row) {\n            return row['price_info']['formatted_prices']['regular_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getRegularPrice.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} regular price html\n         */\n        getRegularPriceUnsanitizedHtml: function (row) {\n            return this.getRegularPrice(row);\n        },\n\n        /**\n         * Check if product has a price range.\n         *\n         * @param {Object} row\n         * @return {Boolean}\n         */\n        hasPriceRange: function (row) {\n            return row['price_info']['max_regular_price'] !== row['price_info']['min_regular_price'];\n        },\n\n        /**\n         * Check if product has special price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} special price html\n         */\n        hasSpecialPrice: function (row) {\n            return row['price_info']['regular_price'] > row['price_info']['final_price'];\n        },\n\n        /**\n         * Check if product has minimal price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} minimal price html\n         */\n        isMinimalPrice: function (row) {\n            return row['price_info']['minimal_price'] < row['price_info']['final_price'];\n        },\n\n        /**\n         * Get product minimal price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} minimal price html\n         */\n        getMinimalPrice: function (row) {\n            return row['price_info']['formatted_prices']['minimal_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getMinimalPrice.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} minimal price html\n         */\n        getMinimalPriceUnsanitizedHtml: function (row) {\n            return this.getMinimalPrice(row);\n        },\n\n        /**\n         * Check if product is salable.\n         *\n         * @param {Object} row\n         * @return {Boolean}\n         */\n        isSalable: function (row) {\n            return row['is_salable'];\n        },\n\n        /**\n         * Get product maximum price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} maximum price html\n         */\n        getMaxPrice: function (row) {\n            return row['price_info']['formatted_prices']['max_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getMaxPrice.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} maximum price html\n         */\n        getMaxPriceUnsanitizedHtml: function (row) {\n            return this.getMaxPrice(row);\n        },\n\n        /**\n         * Get product maximum regular price in case of price range and special price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} maximum regular price html\n         */\n        getMaxRegularPrice: function (row) {\n            return row['price_info']['formatted_prices']['max_regular_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getMaxRegularPrice.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} maximum regular price html\n         */\n        getMaxRegularPriceUnsanitizedHtml: function (row) {\n            return this.getMaxRegularPrice(row);\n        },\n\n        /**\n         * Get product minimal regular price in case of price range and special price.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} minimal regular price html\n         */\n        getMinRegularPrice: function (row) {\n            return row['price_info']['formatted_prices']['min_regular_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getMinRegularPrice.\n         *\n         * @param {Object} row\n         * @return {HTMLElement} minimal regular price html\n         */\n        getMinRegularPriceUnsanitizedHtml: function (row) {\n            return this.getMinRegularPrice(row);\n        },\n\n        /**\n         * Get adjustments names and return as string.\n         *\n         * @return {String} adjustments classes\n         */\n        getAdjustmentCssClasses: function () {\n            return _.pluck(this.getAdjustments(), 'index').join(' ');\n        },\n\n        /**\n         * Get product minimal price as number.\n         *\n         * @param {Object} row\n         * @return {Number} minimal price amount\n         */\n        getMinimalPriceAmount: function (row) {\n            return row['price_info']['minimal_price'];\n        },\n\n        /**\n         * UnsanitizedHtml version of getMinimalPriceAmount\n         *\n         * @param {Object} row\n         * @return {Number} minimal price amount\n         */\n        getMinimalPriceAmountUnsanitizedHtml: function (row) {\n            return this.getMinimalPriceAmount(row);\n        },\n\n        /**\n         * Get product minimal regular price as number in case of special price.\n         *\n         * @param {Object} row\n         * @return {Number} minimal regular price amount\n         */\n        getMinimalRegularPriceAmount: function (row) {\n            return row['price_info']['min_regular_price'];\n        },\n\n        /**\n         * Get product maximum price as number.\n         *\n         * @param {Object} row\n         * @return {Number} maximum price amount\n         */\n        getMaximumPriceAmount: function (row) {\n            return row['price_info']['max_price'];\n        },\n\n        /**\n         * Get product maximum regular price as number in case of special price.\n         *\n         * @param {Object} row\n         * @return {Number} maximum regular price amount\n         */\n        getMaximumRegularPriceAmount: function (row) {\n            return row['price_info']['max_regular_price'];\n        },\n\n        /**\n         * Check if minimal regular price exist for product.\n         *\n         * @param {Object} row\n         * @return {Boolean}\n         */\n        showMinRegularPrice: function (row) {\n            return this.getMinimalPriceAmount(row) < this.getMinimalRegularPriceAmount(row);\n        },\n\n        /**\n         * Check if maximum regular price exist for product.\n         *\n         * @param {Object} row\n         * @return {Boolean}\n         */\n        showMaxRegularPrice: function (row) {\n            return this.getMaximumPriceAmount(row) < this.getMaximumRegularPriceAmount(row);\n        },\n\n        /**\n         * Get path to the columns' body template.\n         *\n         * @returns {String}\n         */\n        getBody: function () {\n            return this.bodyTmpl;\n        },\n\n        /**\n         * Get all price adjustments.\n         *\n         * @returns {Object}\n         */\n        getAdjustments: function () {\n            var adjustments = this.elems();\n\n            _.each(adjustments, function (adjustment) {\n                adjustment.setPriceType(this.priceType);\n                adjustment.source = this.source;\n            }, this);\n\n            return adjustments;\n        }\n    });\n});\n","Magento_Catalog/js/product/list/columns/pricetype-box.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    'underscore',\n    'uiCollection'\n], function (ko, _, Collection) {\n    'use strict';\n\n    return Collection.extend({\n        /**\n         * Find from all price ui components, price with specific code, init source on it and set priceType\n         *\n         * @param {String} code\n         * @returns {*|T}\n         */\n        getPriceByCode: function (code) {\n            var elems = this.elems() ? this.elems() : ko.getObservable(this, 'elems'),\n                price;\n\n            price = _.filter(elems, function (elem) {\n                return elem.index.split('.').shift() === code;\n            }, this).pop();\n\n            price.source = this.source();\n            price.priceType = code;\n\n            return price;\n        },\n\n        /**\n         * Retrieve body template\n         *\n         * @returns {String}\n         */\n        getBody: function () {\n            return this.bodyTmpl;\n        },\n\n        /**\n         * Check whether price has price range, depends on different options, that can be choose\n         *\n         * @param {Object} row\n         * @returns {Boolean}\n         */\n        hasPriceRange: function (row) {\n            return row['price_info']['max_regular_price'] !== row['price_info']['min_regular_price'];\n        }\n    });\n});\n","Magento_Catalog/js/product/list/columns/image.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/grid/columns/column',\n    'Magento_Catalog/js/product/list/column-status-validator'\n], function (_, Element, columnStatusValidator) {\n    'use strict';\n\n    return Element.extend({\n        defaults: {\n            bodyTmpl: 'Magento_Catalog/product/list/columns/image',\n            imageCode: 'default',\n            image: {}\n        },\n\n        /**\n         * Find image by code in scope of images\n         *\n         * @param {Object} images\n         * @returns {*|T}\n         */\n        getImage: function (images) {\n            return _.filter(images, function (image) {\n                return this.imageCode === image.code;\n            }, this).pop();\n        },\n\n        /**\n         * Get image path.\n         *\n         * @param {Object} row\n         * @return {String}\n         */\n        getImageUrl: function (row) {\n            return this.getImage(row.images).url;\n        },\n\n        /**\n         * Get image box width.\n         *\n         * @param {Object} row\n         * @return {Number}\n         */\n        getWidth: function (row) {\n            return this.getImage(row.images).width;\n        },\n\n        /**\n         * Get image box height.\n         *\n         * @param {Object} row\n         * @return {Number}\n         */\n        getHeight: function (row) {\n            return this.getImage(row.images).height;\n        },\n\n        /**\n         * Get resized image width.\n         *\n         * @param {Object} row\n         * @return {Number}\n         */\n        getResizedImageWidth: function (row) {\n            return this.getImage(row.images)['resized_width'];\n        },\n\n        /**\n         * Get resized image height.\n         *\n         * @param {Object} row\n         * @return {Number}\n         */\n        getResizedImageHeight: function (row) {\n            return this.getImage(row.images)['resized_height'];\n        },\n\n        /**\n         * Get image alt text.\n         *\n         * @param {Object} row\n         * @return {String}\n         */\n        getLabel: function (row) {\n            if (!this.imageExists(row)) {\n                return this._super();\n            }\n\n            return this.getImage(row.images).label;\n        },\n\n        /**\n         * Check if image exist.\n         *\n         * @param {Object} row\n         * @return {Boolean}\n         */\n        imageExists: function (row) {\n            return this.getImage(row.images) !== 'undefined';\n        },\n\n        /**\n         * Check if component must be shown.\n         *\n         * @return {Boolean}\n         */\n        isAllowed: function () {\n            return columnStatusValidator.isValid(this.source(), 'image', 'show_attributes');\n        }\n    });\n});\n","Magento_Catalog/js/product/list/columns/price-box.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    'underscore',\n    'uiRegistry',\n    'mageUtils',\n    'uiCollection',\n    'Magento_Catalog/js/product/list/column-status-validator',\n    'uiLayout'\n], function (ko, _, registry, utils, Collection, columnStatusValidator, layout) {\n    'use strict';\n\n    return Collection.extend({\n        defaults: {\n            label: '',\n            hasSpecialPrice: false,\n            showMinimalPrice: false,\n            useLinkForAsLowAs: false,\n            visible: true,\n            headerTmpl: 'ui/grid/columns/text',\n            bodyTmpl: 'Magento_Catalog/product/price/price_box',\n            disableAction: false,\n            controlVisibility: true,\n            sortable: false,\n            sorting: false,\n            draggable: true,\n            fieldClass: {},\n            renders: {\n                default: {}\n            },\n            ignoreTmpls: {\n                fieldAction: true\n            },\n            statefull: {\n                visible: true,\n                sorting: true\n            },\n            imports: {\n                exportSorting: 'sorting'\n            },\n            listens: {\n                elems: ''\n            },\n            modules: {\n                source: '${ $.provider }'\n            },\n            pricesInit: {}\n        },\n\n        /**\n         * Sort prices api\n         *\n         * @returns {exports}\n         */\n        sort: function () {\n            return this;\n        },\n\n        /**\n         * Check whether is allowed to render price or not\n         *\n         * @returns {*}\n         */\n        isAllowed: function () {\n            return columnStatusValidator.isValid(this.source(), 'price', 'show_attributes');\n        },\n\n        /**\n         * Retrieve array of prices, that should be rendered for specific product\n         *\n         * @param {Array} row\n         * @return {Array}\n         */\n        getPrices: function (row) {\n            var elems = this.elems() ? this.elems() : ko.getObservable(this, 'elems'),\n                result;\n\n            //we cant take type of product from row\n            this.initPrices(row);\n            result = _.filter(elems, function (elem) {\n                return elem.productType === row.type;\n            });\n\n            return result;\n        },\n\n        /**\n         * Recursive Merging of objects\n         *\n         * @param {Array} target\n         * @param {Array} source\n         * @returns {Array}\n         * @private\n         */\n        _deepObjectExtend: function (target, source) {\n            var _target = utils.copy(target);\n\n            _.each(source, function (value, key) {\n                if (_.keys(value).length && typeof _target[key] !== 'undefined') {\n                    _target[key] = this._deepObjectExtend(_target[key], value);\n                } else {\n                    _target[key] = value;\n                }\n            }, this);\n\n            return _target;\n        },\n\n        /**\n         * Init price type box, in cases when product type has custom component or bodyTmpl\n         *\n         * @param {String} productType\n         * @private\n         */\n        _initPriceWithCustomMetaData: function (productType) {\n            var price = this._deepObjectExtend(\n                this.renders.prices['default'],\n                this.renders.prices[productType]\n            );\n\n            price.name = productType + '.default';\n            price.parent = this.name;\n            price.source = this.source;\n            price.productType = productType;\n            layout([price]);\n        },\n\n        /**\n         * Init Prices by product type and add them to layout\n         *\n         * @param {Array} _priceData\n         * @param {String} productType\n         * @private\n         */\n        _initPricesForProductType: function (_priceData, productType) {\n            var prices = [];\n\n            this._setPriceNamesToPrices(_priceData, productType);\n            _.sortBy(_priceData, this._comparePrices);\n\n            _.each(_priceData, function (priceData) {\n                if (!priceData.component) {\n                    return;\n                }\n\n                priceData.parent = this.name;\n                priceData.provider = this.provider;\n                priceData.productType = productType;\n                priceData = utils.template(priceData, this);\n                prices.push(priceData);\n            }, this);\n\n            layout(prices);\n        },\n\n        /**\n         * Init dynamic price components\n         *\n         * @param {Array} row\n         * @returns {void}\n         */\n        initPrices: function (row) {\n            var _priceData = [],\n                productType = row.type,\n                defaultPrice = this.renders.prices['default'];\n\n            if (this.pricesInit[productType]) {\n                return true;\n            }\n\n            this.pricesInit[productType] = true;\n\n            if (this.renders.prices[productType] && this._needToApplyCustomTemplate(this.renders.prices[productType])) {\n                return this._initPriceWithCustomMetaData(productType);\n            }\n\n            if (this.renders.prices[productType] && this.renders.prices[productType].children) {\n                _priceData = this._deepObjectExtend(defaultPrice.children, this.renders.prices[productType].children);\n            } else {\n                _priceData = defaultPrice.children;\n            }\n\n            return this._initPricesForProductType(_priceData, productType);\n        },\n\n        /**\n         * Set name to all price components\n         *\n         * @param {Array} prices\n         * @param {String} productType\n         * @private\n         */\n        _setPriceNamesToPrices: function (prices, productType) {\n            _.each(prices, function (price, name) {\n                price.priceType = name;\n                price.name = name + '.' + productType;\n            });\n\n            return prices;\n        },\n\n        /**\n         * Sort callback to compare prices by sort order\n         *\n         * @param {Number} firstPrice\n         * @param {Number} secondPrice\n         * @returns {Number}\n         * @private\n         */\n        _comparePrices: function (firstPrice, secondPrice) {\n            if (firstPrice.sortOrder < secondPrice.sortOrder) {\n                return -1;\n            }\n\n            if (firstPrice.sortOrder > secondPrice.sortOrder) {\n                return 1;\n            }\n\n            return 0;\n        },\n\n        /**\n         * Check whether metadata of product type prices was changed, and we should\n         * to apply custom template or custom component\n         *\n         * @param {Array} productData\n         * @returns {*}\n         * @private\n         */\n        _needToApplyCustomTemplate: function (productData) {\n            return productData.bodyTmpl || productData.component;\n        },\n\n        /**\n         * Returns path to the columns' body template.\n         *\n         * @returns {String}\n         */\n        getBody: function () {\n            return this.bodyTmpl;\n        },\n\n        /**\n         * Get price label.\n         *\n         * @returns {String}\n         */\n        getLabel: function () {\n            return this.label;\n        }\n    });\n});\n","Magento_Catalog/js/tier-price/percentage-processor.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'uiElement',\n    'underscore',\n    'Magento_Ui/js/lib/view/utils/async',\n    'Magento_Catalog/js/utils/percentage-price-calculator'\n], function (Element, _, $, percentagePriceCalculator) {\n    'use strict';\n\n    return Element.extend({\n        defaults: {\n            priceElem: '${ $.parentName }.price',\n            selector: 'input',\n            imports: {\n                priceValue: '${ $.priceElem }:priceValue'\n            },\n            exports: {\n                calculatedVal: '${ $.priceElem }:value'\n            }\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        initialize: function () {\n            this._super();\n\n            _.bindAll(this, 'initPriceListener', 'onInput');\n\n            $.async({\n                component: this.priceElem,\n                selector: this.selector\n            }, this.initPriceListener);\n\n            return this;\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        initObservable: function () {\n            return this._super()\n                .observe(['visible']);\n        },\n\n        /**\n         * Handles keyup event on price input.\n         *\n         * {@param} HTMLElement elem\n         */\n        initPriceListener: function (elem) {\n            $(elem).on('keyup.priceCalc', this.onInput);\n        },\n\n        /**\n         * Delegates calculation of the price input value to percentagePriceCalculator.\n         *\n         * {@param} object event\n         */\n        onInput: function (event) {\n            var value = event.currentTarget.value;\n\n            if (value.slice(-1) === '%') {\n                value = percentagePriceCalculator(this.priceValue, value);\n                this.set('calculatedVal', value);\n            }\n        }\n    });\n});\n","Magento_Catalog/js/tier-price/value-type-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/select',\n    'uiRegistry',\n    'underscore'\n], function (Select, uiRegistry, _) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            prices: {}\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        initialize: function () {\n            this._super();\n            delete this.prices.__disableTmpl;\n            this.prepareForm();\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        setInitialValue: function () {\n            this.initialValue = this.getInitialValue();\n\n            if (this.value.peek() !== this.initialValue) {\n                this.value(this.initialValue);\n            }\n\n            this.isUseDefault(this.disabled());\n\n            return this;\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        prepareForm: function () {\n            var elements = this.getElementsByPrices(),\n                prices = this.prices,\n                currencyType = _.keys(prices)[0],\n                select = this;\n\n            uiRegistry.get(elements, function () {\n                _.each(arguments, function (currentValue) {\n                    if (parseFloat(currentValue.value()) > 0) {\n                        _.each(prices, function (priceValue, priceKey) {\n                            if (priceValue === currentValue.name) {\n                                currencyType = priceKey;\n                            }\n                        });\n                    }\n                });\n                select.value(currencyType);\n                select.on('value', select.onUpdate.bind(select));\n                select.onUpdate();\n            });\n        },\n\n        /**\n         * @returns {Array}\n         */\n        getElementsByPrices: function () {\n            var elements = [];\n\n            _.each(this.prices, function (currentValue) {\n                elements.push(currentValue);\n            });\n\n            return elements;\n        },\n\n        /**\n         * Callback that fires when 'value' property is updated\n         */\n        onUpdate: function () {\n            var value = this.value(),\n                prices = this.prices,\n                select = this,\n                parentDataScopeArr = this.dataScope.split('.'),\n                parentDataScope,\n                elements = this.getElementsByPrices();\n\n            parentDataScopeArr.pop();\n            parentDataScope = parentDataScopeArr.join('.');\n\n            uiRegistry.get(elements, function () {\n                var sourceData = select.source.get(parentDataScope);\n\n                _.each(arguments, function (currentElement) {\n                    var index;\n\n                    _.each(prices, function (priceValue, priceKey) {\n                        if (priceValue === currentElement.name) {\n                            index = priceKey;\n                        }\n                    });\n\n                    if (value === index) {\n                        currentElement.visible(true);\n                        sourceData[currentElement.index] = currentElement.value();\n                    } else {\n                        currentElement.value('');\n                        currentElement.visible(false);\n                        delete sourceData[currentElement.index];\n                    }\n                });\n                select.source.set(parentDataScope, sourceData);\n            });\n        }\n    });\n});\n","Magento_Catalog/js/components/attributes-grid-paging.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/grid/paging/paging',\n    'underscore'\n], function (Paging, _) {\n    'use strict';\n\n    return Paging.extend({\n        defaults: {\n            totalTmpl: 'Magento_Catalog/attributes/grid/paging',\n            modules: {\n                selectionColumn: '${ $.selectProvider }'\n            },\n            listens: {\n                '${ $.selectProvider }:selected': 'changeLabel'\n            },\n            label: '',\n            selectedAttrs: []\n        },\n\n        /**\n         * Change label.\n         *\n         * @param {Array} selected\n         */\n        changeLabel: function (selected) {\n            this.selectedAttrs = [];\n            _.each(this.selectionColumn().rows(), function (row) {\n                if (selected.indexOf(row['attribute_id']) !== -1) {\n                    this.selectedAttrs.push(row['attribute_code']);\n                }\n            }, this);\n\n            this.label(this.selectedAttrs.join(', '));\n        },\n\n        /** @inheritdoc */\n        initObservable: function () {\n            this._super()\n                .observe('label');\n\n            return this;\n        }\n    });\n});\n","Magento_Catalog/js/components/new-category.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/ui-select'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n\n        /**\n         * Parse data and set it to options.\n         *\n         * @param {Object} data - Response data object.\n         * @returns {Object}\n         */\n        setParsed: function (data) {\n            var option = this.parseData(data);\n\n            if (data.error) {\n                return this;\n            }\n\n            this.options([]);\n            this.setOption(option);\n            this.set('newOption', option);\n        },\n\n        /**\n         * Normalize option object.\n         *\n         * @param {Object} data - Option object.\n         * @returns {Object}\n         */\n        parseData: function (data) {\n            return {\n                'is_active': data.category['is_active'],\n                level: data.category.level,\n                value: data.category['entity_id'],\n                label: data.category.name,\n                parent: data.category.parent\n            };\n        }\n    });\n});\n","Magento_Catalog/js/components/attribute-set-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/ui-select'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            listens: {\n                'value': 'changeFormSubmitUrl'\n            },\n            modules: {\n                formProvider: '${ $.provider }'\n            }\n        },\n\n        /**\n         * Change set parameter in save and validate urls of form\n         *\n         * @param {String|Number} value\n         */\n        changeFormSubmitUrl: function (value) {\n            var pattern = /(set\\/)(\\d)*?\\//,\n                change = '$1' + value + '/';\n\n            this.formProvider().client.urls.save = this.formProvider().client.urls.save.replace(pattern, change);\n            this.formProvider().client.urls.beforeSave = this.formProvider().client.urls.beforeSave.replace(\n                pattern,\n                change\n            );\n        }\n    });\n});\n","Magento_Catalog/js/components/new-attribute-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/form/form',\n    'Magento_Ui/js/modal/prompt',\n    'Magento_Ui/js/modal/alert'\n], function ($, Form, prompt, alert) {\n    'use strict';\n\n    return Form.extend({\n        defaults: {\n            newSetPromptMessage: '',\n            listens: {\n                responseData: 'processResponseData'\n            },\n            modules: {\n                productForm: 'product_form.product_form'\n            }\n        },\n\n        /**\n         * Process response data\n         *\n         * @param {Object} data\n         */\n        processResponseData: function (data) {\n            if (data.params['new_attribute_set_id']) {\n                this.productForm().params = {\n                    set: data.params['new_attribute_set_id']\n                };\n            }\n        },\n\n        /**\n         * Process Save In New Attribute Set prompt\n         */\n        saveAttributeInNewSet: function () {\n\n            var self = this;\n\n            this.validate();\n\n            if (!this.additionalInvalid && !this.source.get('params.invalid')) {\n                prompt({\n                    content: this.newSetPromptMessage,\n                    actions: {\n\n                        /**\n                         * @param {String} val\n                         * @this {actions}\n                         */\n                        confirm: function (val) {\n                            var rules = ['required-entry', 'validate-no-html-tags'],\n                                editForm = self,\n                                newAttributeSetName = val,\n                                i,\n                                params = {};\n\n                            if (!newAttributeSetName) {\n                                return;\n                            }\n\n                            for (i = 0; i < rules.length; i++) {\n                                if (!$.validator.methods[rules[i]](newAttributeSetName)) {\n                                    alert({\n                                        content: $.validator.messages[rules[i]]\n                                    });\n\n                                    return;\n                                }\n                            }\n\n                            params['new_attribute_set_name'] = newAttributeSetName;\n                            editForm.setAdditionalData(params);\n                            editForm.save();\n                        }\n                    }\n                });\n            } else {\n                this.focusInvalid();\n            }\n        }\n    });\n});\n","Magento_Catalog/js/components/dynamic-rows-per-page.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/dynamic-rows/dynamic-rows',\n    'underscore',\n    'mageUtils',\n    'uiLayout',\n    'rjsResolver'\n], function (DynamicRows, _, utils, layout, resolver) {\n    'use strict';\n\n    return DynamicRows.extend({\n        defaults: {\n            sizesConfig: {\n                component: 'Magento_Ui/js/grid/paging/sizes',\n                name: '${ $.name }_sizes',\n                options: {\n                    '20': {\n                        value: 20,\n                        label: 20\n                    },\n                    '30': {\n                        value: 30,\n                        label: 30\n                    },\n                    '50': {\n                        value: 50,\n                        label: 50\n                    },\n                    '100': {\n                        value: 100,\n                        label: 100\n                    },\n                    '200': {\n                        value: 200,\n                        label: 200\n                    }\n                },\n                storageConfig: {\n                    provider: '${ $.storageConfig.provider }',\n                    namespace: '${ $.storageConfig.namespace }'\n                },\n                enabled: false\n            },\n            links: {\n                options: '${ $.sizesConfig.name }:options',\n                pageSize: '${ $.sizesConfig.name }:value'\n            },\n            listens: {\n                'pageSize': 'onPageSizeChange'\n            },\n            modules: {\n                sizes: '${ $.sizesConfig.name }'\n            }\n        },\n\n        /**\n         * Initializes paging component.\n         *\n         * @returns {Paging} Chainable.\n         */\n        initialize: function () {\n            this._super()\n                .initSizes();\n\n            return this;\n        },\n\n        /**\n         * Initializes sizes component.\n         *\n         * @returns {Paging} Chainable.\n         */\n        initSizes: function () {\n            if (this.sizesConfig.enabled) {\n                layout([this.sizesConfig]);\n            }\n\n            return this;\n        },\n\n        /**\n         * Initializes observable properties.\n         *\n         * @returns {Paging} Chainable.\n         */\n        initObservable: function () {\n            this._super()\n                .track([\n                    'pageSize'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Handles changes of the page size.\n         */\n        onPageSizeChange: function () {\n            resolver(function () {\n                if (this.elems().length) {\n                    this.reload();\n                }\n            }, this);\n        }\n    });\n});\n","Magento_Catalog/js/components/custom-options-component.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/abstract'\n], function (_, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n        /**\n         * {@inheritdoc}\n         */\n        setInitialValue: function () {\n            this._super();\n\n            this.addBefore(this.addbefore);\n\n            return this;\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        initObservable: function () {\n            this._super();\n\n            this.observe('addBefore');\n\n            return this;\n        }\n    });\n});\n","Magento_Catalog/js/components/dynamic-rows-import-custom-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/dynamic-rows/dynamic-rows-grid',\n    'underscore',\n    'mageUtils'\n], function (DynamicRows, _, utils) {\n    'use strict';\n\n    return DynamicRows.extend({\n        defaults: {\n            mappingSettings: {\n                enabled: false,\n                distinct: false\n            },\n            update: true,\n            map: {\n                'option_id': 'option_id'\n            },\n            identificationProperty: 'option_id',\n            identificationDRProperty: 'option_id'\n        },\n\n        /** @inheritdoc */\n        processingInsertData: function (data) {\n            var options = [],\n                currentOption,\n                generalContext = this;\n\n            if (!data) {\n                return;\n            }\n            _.each(data, function (item) {\n                if (!item.options) {\n                    return;\n                }\n                _.each(item.options, function (option) {\n                    currentOption = utils.copy(option);\n\n                    if (currentOption.hasOwnProperty('option_id')) {\n                        delete currentOption['option_id'];\n                    }\n\n                    if (currentOption.values.length > 0) {\n                        generalContext.removeOptionsIds(currentOption.values);\n                    }\n                    options.push(currentOption);\n                });\n            });\n\n            if (!options.length) {\n                return;\n            }\n            this.cacheGridData = options;\n            _.each(options, function (opt) {\n                this.mappingValue(opt);\n            }, this);\n\n            this.insertData([]);\n        },\n\n        /**\n         * Removes option_id and option_type_id from every option\n         *\n         * @param {Array} options\n         */\n        removeOptionsIds: function (options) {\n            _.each(options, function (optionValue) {\n                delete optionValue['option_id'];\n                delete optionValue['option_type_id'];\n            });\n        },\n\n        /** @inheritdoc */\n        processingAddChild: function (ctx, index, prop) {\n            if (!ctx) {\n                this.showSpinner(true);\n                this.addChild(ctx, index, prop);\n\n                return;\n            }\n\n            this._super(ctx, index, prop);\n        },\n\n        /**\n         * Set empty array to dataProvider\n         */\n        clearDataProvider: function () {\n            this.source.set(this.dataProvider, []);\n        },\n\n        /**\n         * Mutes parent method\n         */\n        updateInsertData: function () {\n            return false;\n        }\n    });\n});\n","Magento_Catalog/js/components/url-key-handle-changes.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/form/element/single-checkbox'\n], function (Checkbox) {\n    'use strict';\n\n    return Checkbox.extend({\n        defaults: {\n            imports: {\n                handleUseDefault: '${ $.parentName }.use_default.url_key:checked',\n                urlKey: '${ $.provider }:data.url_key'\n            },\n            listens: {\n                urlKey: 'handleChanges'\n            },\n            modules: {\n                useDefault: '${ $.parentName }.use_default.url_key'\n            }\n        },\n\n        /**\n         * Disable checkbox field, when 'url_key' field without changes or 'use default' field is checked\n         */\n        handleChanges: function (newValue) {\n            this.disabled(newValue === this.valueMap['true'] || this.useDefault.checked);\n        },\n\n        /**\n         * Disable checkbox field, when 'url_key' field without changes or 'use default' field is checked\n         */\n        handleUseDefault: function (checkedUseDefault) {\n            this.disabled(this.urlKey === this.valueMap['true'] || checkedUseDefault);\n        }\n    });\n});\n","Magento_Catalog/js/components/attributes-insert-listing.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/lib/view/utils/async',\n    'uiRegistry',\n    'underscore',\n    'Magento_Ui/js/form/components/insert-listing'\n], function ($, registry, _, InsertListing) {\n    'use strict';\n\n    return InsertListing.extend({\n        defaults: {\n            addAttributeUrl: '',\n            attributeSetId: '',\n            attributeIds: '',\n            groupCode: '',\n            groupName: '',\n            groupSortOrder: 0,\n            productId: 0,\n            formProvider: '',\n            modules: {\n                form: '${ $.formProvider }',\n                modal: '${ $.parentName }'\n            },\n            productType: ''\n        },\n\n        /**\n         * Render attribute\n         */\n        render: function () {\n            this._super();\n        },\n\n        /**\n         * Save attribute\n         */\n        save: function () {\n            this.addSelectedAttributes();\n            this._super();\n        },\n\n        /**\n         * Add selected attributes\n         */\n        addSelectedAttributes: function () {\n            $.ajax({\n                url: this.addAttributeUrl,\n                type: 'POST',\n                dataType: 'json',\n                data: {\n                    attributeIds: this.selections().getSelections(),\n                    templateId: this.attributeSetId,\n                    groupCode: this.groupCode,\n                    groupName: this.groupName,\n                    groupSortOrder: this.groupSortOrder,\n                    productId: this.productId,\n                    componentJson: 1\n                },\n                success: function () {\n                    this.form().params = {\n                        set: this.attributeSetId,\n                        id: this.productId,\n                        type: this.productType\n                    };\n                    this.form().reload();\n                    this.modal().state(false);\n                    this.reload();\n                }.bind(this)\n            });\n        }\n    });\n});\n","Magento_Catalog/js/components/dynamic-rows-tier-price.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/dynamic-rows/dynamic-rows'\n], function (_, DynamicRows) {\n    'use strict';\n\n    /**\n     * @deprecated Parent method contains labels sorting.\n     * @see Magento_Ui/js/dynamic-rows/dynamic-rows\n     */\n    return DynamicRows.extend({\n\n        /**\n         * Init header elements\n         */\n        initHeader: function () {\n            var labels;\n\n            this._super();\n            labels = _.clone(this.labels());\n            labels = _.sortBy(labels, function (label) {\n                return label.sortOrder;\n            });\n\n            this.labels(labels);\n        }\n    });\n});\n","Magento_Catalog/js/components/attributes-fieldset.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/fieldset',\n    'Magento_Ui/js/core/app'\n], function (Fieldset, app) {\n    'use strict';\n\n    return Fieldset.extend({\n        defaults: {\n            listens: {\n                '${ $.provider }:additionalAttributes': 'onAttributeAdd'\n            }\n        },\n\n        /**\n         * On attribute add trigger\n         *\n         * @param {Object} listOfNewAttributes\n         */\n        onAttributeAdd: function (listOfNewAttributes) {\n            app(listOfNewAttributes, true);\n        }\n    });\n});\n","Magento_Catalog/js/components/disable-hide-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/select',\n    'Magento_Catalog/js/components/visible-on-option/strategy',\n    'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, visibleStrategy, disableStrategy) {\n    'use strict';\n\n    return Element.extend(visibleStrategy).extend(disableStrategy);\n});\n","Magento_Catalog/js/components/website-currency-symbol.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/select'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            currenciesForWebsites: {},\n            tracks: {\n                currency: true\n            }\n        },\n\n        /**\n         * Set currency symbol per website\n         *\n         * @param {String} value - currency symbol\n         */\n        setDifferedFromDefault: function (value) {\n            this.currency = this.currenciesForWebsites[value];\n\n            return this._super();\n        }\n    });\n});\n","Magento_Catalog/js/components/new-attribute-insert-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/insert-form'\n], function (InsertForm) {\n    'use strict';\n\n    return InsertForm.extend({\n        defaults: {\n            modules: {\n                productForm: 'product_form.product_form'\n            },\n            listens: {\n                responseStatus: 'processResponseStatus'\n            },\n            attributeSetId: 0,\n            productId: 0\n        },\n\n        /**\n         * Process response status.\n         */\n        processResponseStatus: function () {\n            if (this.responseStatus()) {\n\n                if (this.productForm().params === undefined) {\n                    this.productForm().params = {\n                        set: this.attributeSetId\n                    };\n                }\n\n                if (this.productId) {\n                    this.productForm().params.id = this.productId;\n                }\n                this.productForm().params.type = this.productType;\n\n                this.productForm().reload();\n                this.resetForm();\n            }\n        }\n    });\n});\n","Magento_Catalog/js/components/dynamic-rows-import-custom-options-per-page.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Catalog/js/components/dynamic-rows-import-custom-options',\n    'underscore',\n    'mageUtils',\n    'uiLayout',\n    'rjsResolver'\n], function (DrCustomOptions, _, utils, layout, resolver) {\n    'use strict';\n\n    return DrCustomOptions.extend({\n        defaults: {\n            sizesConfig: {\n                component: 'Magento_Ui/js/grid/paging/sizes',\n                name: '${ $.name }_sizes',\n                options: {\n                    '20': {\n                        value: 20,\n                        label: 20\n                    },\n                    '30': {\n                        value: 30,\n                        label: 30\n                    },\n                    '50': {\n                        value: 50,\n                        label: 50\n                    },\n                    '100': {\n                        value: 100,\n                        label: 100\n                    },\n                    '200': {\n                        value: 200,\n                        label: 200\n                    }\n                },\n                storageConfig: {\n                    provider: '${ $.storageConfig.provider }',\n                    namespace: '${ $.storageConfig.namespace }'\n                },\n                enabled: false\n            },\n            links: {\n                options: '${ $.sizesConfig.name }:options',\n                pageSize: '${ $.sizesConfig.name }:value'\n            },\n            listens: {\n                'pageSize': 'onPageSizeChange'\n            },\n            modules: {\n                sizes: '${ $.sizesConfig.name }'\n            }\n        },\n\n        /**\n         * Initializes paging component.\n         *\n         * @returns {Paging} Chainable.\n         */\n        initialize: function () {\n            this._super()\n                .initSizes();\n\n            return this;\n        },\n\n        /**\n         * Initializes sizes component.\n         *\n         * @returns {Paging} Chainable.\n         */\n        initSizes: function () {\n            if (this.sizesConfig.enabled) {\n                layout([this.sizesConfig]);\n            }\n\n            return this;\n        },\n\n        /**\n         * Initializes observable properties.\n         *\n         * @returns {Paging} Chainable.\n         */\n        initObservable: function () {\n            this._super()\n                .track([\n                    'pageSize'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Handles changes of the page size.\n         */\n        onPageSizeChange: function () {\n            resolver(function () {\n                if (this.elems().length) {\n                    this.reload();\n                }\n            }, this);\n        }\n    });\n});\n","Magento_Catalog/js/components/checkbox.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @deprecated since version 2.2.0\n */\ndefine([\n    'Magento_Ui/js/form/element/abstract',\n    'knockout'\n], function (Abstract, ko) {\n    'use strict';\n\n    return Abstract.extend({\n\n        /**\n         * Initializes observable properties of instance\n         *\n         * @returns {Element} Chainable.\n         */\n        initObservable: function () {\n            this._super()\n                .observe('checked');\n\n            this.value = ko.pureComputed({\n\n                /**\n                 * use 'mappedValue' as value if checked\n                 */\n                read: function () {\n                    return this.checked() ? this.mappedValue : '';\n                },\n\n                /**\n                 * any value made checkbox checked\n                 */\n                write: function (val) {\n                    if (val) {\n                        this.checked(true);\n                    }\n                },\n                owner: this\n            });\n\n            return this;\n        }\n    });\n});\n","Magento_Catalog/js/components/messages.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/html'\n], function (Html) {\n    'use strict';\n\n    return Html.extend({\n        defaults: {\n            form: '${ $.namespace }.${ $.namespace }',\n            visible: false,\n            imports: {\n                responseData: '${ $.form }:responseData',\n                visible: 'responseData.error',\n                content: 'responseData.messages'\n            },\n            listens: {\n                '${ $.provider }:data.reset': 'hide'\n            }\n        },\n\n        /**\n         * Show messages.\n         */\n        show: function () {\n            this.visible(true);\n        },\n\n        /**\n         * Hide messages.\n         */\n        hide: function () {\n            this.visible(false);\n        }\n    });\n});\n","Magento_Catalog/js/components/import-handler.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/abstract',\n    'underscore',\n    'uiRegistry'\n], function (Abstract, _, registry) {\n    'use strict';\n\n    return Abstract.extend({\n        defaults: {\n            allowImport: true,\n            autoImportIfEmpty: false,\n            values: {},\n            mask: '',\n            queryTemplate: 'ns = ${ $.ns }, index = '\n        },\n\n        /** @inheritdoc */\n        initialize: function () {\n            this._super();\n\n            if (this.allowImport) {\n                this.setHandlers();\n            }\n        },\n\n        /**\n         * Split mask placeholder and attach events to placeholder fields.\n         */\n        setHandlers: function () {\n            var str = this.mask || '',\n                placeholders;\n\n            placeholders = str.match(/{{(.*?)}}/g); // Get placeholders\n\n            _.each(placeholders, function (placeholder) {\n                placeholder = placeholder.replace(/[{{}}]/g, ''); // Remove curly braces\n\n                registry.get(this.queryTemplate + placeholder, function (component) {\n                    this.values[placeholder] = component.getPreview();\n                    component.on('value', this.updateValue.bind(this, placeholder, component));\n                    component.valueUpdate = 'keyup';\n                }.bind(this));\n            }, this);\n        },\n\n        /**\n         * Update field with mask value, if it's allowed.\n         *\n         * @param {Object} placeholder\n         * @param {Object} component\n         */\n        updateValue: function (placeholder, component) {\n            var string = this.mask || '',\n                nonEmptyValueFlag = false;\n\n            if (placeholder) {\n                this.values[placeholder] = component.getPreview() || '';\n            }\n\n            if (!this.allowImport) {\n                return;\n            }\n\n            _.each(this.values, function (propertyValue, propertyName) {\n                string = string.replace('{{' + propertyName + '}}', propertyValue);\n                nonEmptyValueFlag = nonEmptyValueFlag || !!propertyValue;\n            });\n\n            if (nonEmptyValueFlag) {\n                string = string.replace(/(<([^>]+)>)/ig, ''); // Remove html tags\n                this.value(string);\n            } else {\n                this.value('');\n            }\n        },\n\n        /**\n         * Disallow import when initial value isn't empty string\n         *\n         * @returns {*}\n         */\n        setInitialValue: function () {\n            this._super();\n\n            if (this.initialValue !== '') {\n                this.allowImport = false;\n            }\n\n            return this;\n        },\n\n        /**\n         *  Callback when value is changed by user,\n         *  and disallow/allow import value\n         */\n        userChanges: function () {\n\n            /**\n             *  As userChanges is called before updateValue,\n             *  we forced to get value from component by reference\n             */\n            var actualValue = arguments[1].currentTarget.value;\n\n            this._super();\n\n            if (actualValue === '') {\n                this.allowImport = true;\n\n                if (this.autoImportIfEmpty) {\n                    this.updateValue(null, null);\n                }\n            } else {\n                this.allowImport = false;\n            }\n        }\n    });\n});\n","Magento_Catalog/js/components/reset-dynamic-rows-grid-row-position-on-delete.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'uiRegistry',\n    'rjsResolver',\n    'Magento_Ui/js/dynamic-rows/dynamic-rows-grid'\n], function (_, registry, resolver, dynamicRowsGrid) {\n    'use strict';\n\n    return dynamicRowsGrid.extend({\n\n        /** @inheritdoc */\n        deleteRecord: function () {\n            this._super();\n            this.resetPosition();\n        },\n\n        /**\n         * Reset the position on delete of the record.\n         */\n        resetPosition() {\n            let self = this,\n                position = 0;\n\n            _.filter(this.elems(), function (elem, index) {\n                if (index === 0) {\n                    position = (self.currentPage() - 1) * self.pageSize + 1;\n                }\n                _.filter(elem.elems(),function (childElem) {\n                    if (childElem.index === 'position') {\n                        childElem.value(position);\n                    }\n                });\n                position++;\n            });\n        },\n\n        /** @inheritdoc */\n        nextPage: function () {\n            this._super();\n            resolver(function () {\n                if (this.elems().length) {\n                    this.resetPosition();\n                }\n            }, this);\n        }\n    });\n});\n","Magento_Catalog/js/components/product-ui-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @deprecated see Magento/Ui/view/base/web/js/grid/filters/elements/ui-select.js\n */\ndefine([\n    'Magento_Ui/js/form/element/ui-select',\n    'jquery',\n    'underscore'\n], function (Select, $, _) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            validationUrl: false,\n            loadedOption: [],\n            validationLoading: true\n        },\n\n        /** @inheritdoc */\n        initialize: function () {\n            this._super();\n\n            this.validateInitialValue();\n\n            return this;\n        },\n\n        /**\n         * Validate initial value actually exists\n         */\n        validateInitialValue: function () {\n            if (!_.isEmpty(this.value())) {\n                $.ajax({\n                    url: this.validationUrl,\n                    type: 'GET',\n                    dataType: 'json',\n                    context: this,\n                    data: {\n                        productId: this.value()\n                    },\n\n                    /** @param {Object} response */\n                    success: function (response) {\n                        if (!_.isEmpty(response)) {\n                            this.options([response]);\n                            this.loadedOption = response;\n                        }\n                    },\n\n                    /** set empty array if error occurs */\n                    error: function () {\n                        this.options([]);\n                    },\n\n                    /** stop loader */\n                    complete: function () {\n                        this.validationLoading(false);\n                        this.setCaption();\n                    }\n                });\n            } else {\n                this.validationLoading(false);\n            }\n        },\n\n        /** @inheritdoc */\n        getSelected: function () {\n            var options = this._super();\n\n            if (!_.isEmpty(this.loadedOption)) {\n                return this.value() === this.loadedOption.value ? [this.loadedOption] : options;\n            }\n\n            return options;\n        }\n    });\n});\n","Magento_Catalog/js/components/custom-options-price-type.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/select',\n    'uiRegistry'\n], function (_, Select, uiRegistry) {\n    'use strict';\n\n    return Select.extend({\n        /**\n         * {@inheritdoc}\n         */\n        onUpdate: function () {\n            this._super();\n\n            this.updateAddBeforeForPrice();\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        setInitialValue: function () {\n            this._super();\n\n            this.updateAddBeforeForPrice();\n\n            return this;\n        },\n\n        /**\n         * Update addbefore for price field. Change it to currency or % depends of price_type value.\n         */\n        updateAddBeforeForPrice: function () {\n            var addBefore, currentValue, priceIndex, priceName, uiPrice;\n\n            priceIndex = typeof this.imports.priceIndex == 'undefined' ? 'price' : this.imports.priceIndex;\n            priceName = this.parentName + '.' + priceIndex;\n\n            uiPrice = uiRegistry.get(priceName);\n\n            if (uiPrice && uiPrice.addbeforePool) {\n                currentValue = this.value();\n\n                uiPrice.addbeforePool.forEach(function (item) {\n                    if (item.value === currentValue) {\n                        addBefore = item.label;\n                    }\n                });\n\n                if (typeof addBefore != 'undefined') {\n                    uiPrice.addBefore(addBefore);\n                }\n            }\n        }\n    });\n});\n","Magento_Catalog/js/components/disable-on-option/strategy.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine(function () {\n    'use strict';\n\n    return {\n        defaults: {\n            valuesForEnable: [],\n            disabled: true,\n            imports: {\n                toggleDisable:\n                    'product_attribute_add_form.product_attribute_add_form.base_fieldset.frontend_input:value'\n            }\n        },\n\n        /**\n         * Toggle disabled state.\n         *\n         * @param {Number} selected\n         */\n        toggleDisable: function (selected) {\n            this.disabled(!(selected in this.valuesForEnable));\n        }\n    };\n});\n","Magento_Catalog/js/components/disable-on-option/yesno.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/single-checkbox',\n    'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    var comp = Element.extend(strategy).extend({\n\n        defaults: {\n            listens: {\n                disabled: 'updateValueForDisabledField',\n                visible: 'updateValueForDisabledField'\n            }\n        },\n\n        /**\n         * {@inheritdoc}\n         */\n        initialize: function () {\n            this._super();\n            this.updateValueForDisabledField();\n\n            return this;\n        },\n\n        /**\n         * Set element value to O(No) if element is invisible and disabled\n         * Set element value to initialValue if element becomes visible and enable\n         */\n        updateValueForDisabledField: function () {\n            if (!this.disabled() && this.visible()) {\n                this.set('value', this.initialValue);\n            } else {\n                this.set('value', 0);\n            }\n        }\n    });\n\n    return comp.extend(strategy);\n});\n","Magento_Catalog/js/components/disable-on-option/select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/select',\n    'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/disable-on-option/input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/abstract',\n    'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/use-parent-settings/single-checkbox.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/form/element/single-checkbox'\n], function (Component) {\n    'use strict';\n\n    return Component;\n});\n","Magento_Catalog/js/components/use-parent-settings/textarea.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/form/element/textarea'\n], function (Component) {\n    'use strict';\n\n    return Component;\n});\n","Magento_Catalog/js/components/use-parent-settings/toggle-disabled-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore'\n], function (_) {\n    'use strict';\n\n    var mixin = {\n        defaults: {\n            imports: {\n                toggleDisabled: '${ $.parentName }.custom_use_parent_settings:checked'\n            },\n            useParent: false,\n            useDefaults: false\n        },\n\n        /**\n         * Disable form input if settings for parent section is used\n         * or default value is applied.\n         *\n         * @param {Boolean} isUseParent\n         */\n        toggleDisabled: function (isUseParent) {\n            var disabled = this.useParent = isUseParent;\n\n            if (!disabled && !_.isUndefined(this.service)) {\n                disabled = !!this.isUseDefault();\n            }\n\n            this.saveUseDefaults();\n            this.disabled(disabled);\n        },\n\n        /**\n         * Stores original state of the field.\n         */\n        saveUseDefaults: function () {\n            this.useDefaults = this.disabled();\n        },\n\n        /** @inheritdoc */\n        setInitialValue: function () {\n            this._super();\n            this.isUseDefault(this.useDefaults);\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        toggleUseDefault: function (state) {\n            this._super();\n            this.disabled(state || this.useParent);\n        }\n    };\n\n    return function (target) {\n        return target.extend(mixin);\n    };\n});\n","Magento_Catalog/js/components/use-parent-settings/select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/form/element/select'\n], function (Component) {\n    'use strict';\n\n    return Component;\n});\n","Magento_Catalog/js/components/visible-on-option/strategy.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine(function () {\n    'use strict';\n\n    return {\n        defaults: {\n            valuesForOptions: [],\n            imports: {\n                toggleVisibility:\n                    'product_attribute_add_form.product_attribute_add_form.base_fieldset.frontend_input:value'\n            },\n            isShown: false,\n            inverseVisibility: false\n        },\n\n        /**\n         * Toggle visibility state.\n         *\n         * @param {Number} selected\n         */\n        toggleVisibility: function (selected) {\n            this.isShown = selected in this.valuesForOptions;\n            this.visible(this.inverseVisibility ? !this.isShown : this.isShown);\n        }\n    };\n});\n","Magento_Catalog/js/components/visible-on-option/fieldset.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/components/fieldset',\n    'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Fieldset, strategy) {\n    'use strict';\n\n    return Fieldset.extend(strategy).extend(\n        {\n            defaults: {\n                openOnShow: true\n            },\n\n            /**\n             * Toggle visibility state.\n             */\n            toggleVisibility: function () {\n                this._super();\n\n                if (this.openOnShow) {\n                    this.opened(this.inverseVisibility ? !this.isShown : this.isShown);\n                }\n            }\n        }\n    );\n});\n","Magento_Catalog/js/components/visible-on-option/yesno.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/single-checkbox',\n    'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/textarea.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/textarea',\n    'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/select',\n    'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/abstract',\n    'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/date.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/form/element/date',\n    'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n    'use strict';\n\n    return Element.extend(strategy);\n});\n","Magento_Catalog/js/utils/percentage-price-calculator.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine(['Magento_Ui/js/lib/validation/utils'], function (utils) {\n    'use strict';\n\n    /**\n     * Calculates the price input value when entered percentage value.\n     *\n     * @param {String} price\n     * @param {String} input\n     *\n     * @returns {String}\n     */\n    return function (price, input) {\n        var result,\n            lastInputSymbol = input.slice(-1),\n            inputPercent = input.slice(0, -1),\n            parsedPercent = utils.parseNumber(inputPercent),\n            parsedPrice = utils.parseNumber(price);\n\n        if (lastInputSymbol !== '%') {\n            result = input;\n        } else if (\n            input === '%' ||\n            isNaN(parsedPrice) ||\n            parsedPercent != inputPercent || /* eslint eqeqeq:0 */\n            isNaN(parsedPercent) ||\n            input === ''\n        ) {\n            result = '';\n        } else if (parsedPercent > 100) {\n            result = '0.00';\n        } else if (lastInputSymbol === '%') {\n            result = parsedPrice - parsedPrice * (inputPercent / 100);\n            result = result.toFixed(2);\n        } else {\n            result = input;\n        }\n\n        return result;\n    };\n});\n","Magento_Catalog/component/static-type-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/form/element/select'\n], function ($, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n\n        /**\n         * Checks is relevant value\n         *\n         * @param {String} value\n         * @returns {Boolean}\n         */\n        isRelevant: function (value) {\n            if (!value || $.inArray(value, ['drop_down', 'radio', 'checkbox', 'multiple']) !== -1) {\n                this.reset();\n                this.disabled(true);\n\n                return false;\n            }\n\n            this.disabled(false);\n\n            return true;\n        }\n    });\n});\n","Magento_Catalog/component/select-type-grid.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/dynamic-rows/dynamic-rows'\n], function ($, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n\n        /**\n         * Checks is relevant value\n         *\n         * @param {String} value\n         * @returns {Boolean}\n         */\n        isRelevant: function (value) {\n            if ($.inArray(value, ['drop_down', 'radio', 'checkbox', 'multiple']) !== -1) {\n                this.disabled(false);\n                this.visible(true);\n\n                return true;\n            }\n\n            this.reset();\n            this.disabled(true);\n            this.visible(false);\n\n            return false;\n        }\n    });\n});\n","Magento_Catalog/component/static-type-container.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/form/components/group'\n], function ($, Group) {\n    'use strict';\n\n    return Group.extend({\n\n        /**\n         * Checks is relevant value\n         *\n         * @param {String} value\n         * @returns {Boolean}\n         */\n        isRelevant: function (value) {\n            if ($.inArray(value, ['field', 'area', 'file', 'date', 'date_time', 'time']) !== -1) {\n                this.visible(true);\n\n                return true;\n            }\n\n            this.visible(false);\n\n            return false;\n        }\n    });\n});\n","Magento_Catalog/component/file-type-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/abstract'\n], function (Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n\n        /**\n         * Checks is relevant value\n         *\n         * @param {String} value\n         * @returns {Boolean}\n         */\n        isRelevant: function (value) {\n            if (value === 'file') {\n                this.disabled(false);\n                this.visible(true);\n\n                return true;\n            }\n\n            this.reset();\n            this.disabled(true);\n            this.visible(false);\n\n            return false;\n        }\n    });\n});\n","Magento_Catalog/component/text-type-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/form/element/abstract'\n], function ($, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n\n        /**\n         * Checks for relevant value\n         *\n         * @param {*} value\n         * @returns {Boolean}\n         */\n        isRelevant: function (value) {\n            if ($.inArray(value, ['field', 'area']) !== -1) {\n                this.disabled(false);\n                this.visible(true);\n\n                return true;\n            }\n\n            this.reset();\n            this.disabled(true);\n            this.visible(false);\n\n            return false;\n        }\n    });\n});\n","Magento_Catalog/component/static-type-input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'uiRegistry',\n    'Magento_Ui/js/form/element/abstract'\n], function (registry, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n        defaults: {\n            parentOption: null\n        },\n\n        /**\n         * Initialize component.\n         *\n         * @returns {Element}\n         */\n        initialize: function () {\n            return this\n                ._super()\n                .initLinkToParent();\n        },\n\n        /**\n         * Cache link to parent component - option holder.\n         *\n         * @returns {Element}\n         */\n        initLinkToParent: function () {\n            var pathToParent = this.parentName.replace(/(\\.[^.]*){2}$/, '');\n\n            this.parentOption = registry.async(pathToParent);\n            this.value() && this.parentOption('label', this.value());\n\n            return this;\n        },\n\n        /**\n         * On value change handler.\n         *\n         * @param {String} value\n         */\n        onUpdate: function (value) {\n            this.parentOption(function (component) {\n                component.set('label', value ? value : component.get('headerLabel'));\n            });\n\n            return this._super();\n        }\n    });\n});\n","Magento_Catalog/component/image-size-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/lib/validation/utils',\n    'Magento_Ui/js/form/element/abstract',\n    'Magento_Ui/js/lib/validation/validator',\n    'mage/translate'\n], function ($, utils, Abstract, validator) {\n    'use strict';\n\n    validator.addRule(\n        'validate-image-size-range',\n        function (value) {\n            var dataAttrRange = /^(\\d+)x(\\d+)$/,\n                m;\n\n            if (utils.isEmptyNoTrim(value)) {\n                return true;\n            }\n\n            m = dataAttrRange.exec(value);\n\n            return !!(m &&  m[1] > 0 && m[2] > 0);\n        },\n        $.mage.__('This value does not follow the specified format (for example, 200X300).')\n    );\n\n    return Abstract.extend({\n\n        /**\n         * Checks for relevant value\n         *\n         * @returns {Boolean}\n         */\n        isRangeCorrect: function () {\n            return validator('validate-image-size-range', this.value()).passed;\n        }\n    });\n});\n","Magento_AdminNotification/toolbar_entry.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery',\n    'jquery/ui',\n    'domReady!'\n], function ($) {\n    'use strict';\n\n    /**\n     * Mark notification as read via AJAX call.\n     *\n     * @param {String} notificationId\n     */\n    var markNotificationAsRead = function (notificationId) {\n            var requestUrl = $('.notifications-wrapper .admin__action-dropdown-menu').attr('data-mark-as-read-url');\n\n            $.ajax({\n                url: requestUrl,\n                type: 'POST',\n                dataType: 'json',\n                data: {\n                    id: notificationId\n                },\n                showLoader: false\n            });\n        },\n        notificationCount = $('.notifications-wrapper').attr('data-notification-count'),\n\n        /**\n         * Remove notification from the list.\n         *\n         * @param {jQuery} notificationEntry\n         */\n        removeNotificationFromList = function (notificationEntry) {\n            var notificationIcon, actionElement;\n\n            notificationEntry.remove();\n            notificationCount--;\n            $('.notifications-wrapper').attr('data-notification-count', notificationCount);\n\n            if (notificationCount == 0) {// eslint-disable-line eqeqeq\n                // Change appearance of the bubble and its behavior when the last notification is removed\n                $('.notifications-wrapper .admin__action-dropdown-menu').remove();\n                notificationIcon = $('.notifications-wrapper .notifications-icon');\n                notificationIcon.removeAttr('data-toggle');\n                notificationIcon.off('click.dropdown');\n                $('.notifications-action .notifications-counter').text('').hide();\n            } else {\n                // Change top counter only for allowable range\n                if (notificationCount <= 99) {\n                    $('.notifications-action .notifications-counter').text(notificationCount);\n                }\n                $('.notifications-entry-last .notifications-counter').text(notificationCount);\n                // Modify caption of the 'See All' link\n                actionElement = $('.notifications-wrapper .admin__action-dropdown-menu .last .action-more');\n                actionElement.text(actionElement.text().replace(/\\d+/, notificationCount));\n            }\n        },\n\n        /**\n         * Show notification details.\n         *\n         * @param {jQuery} notificationEntry\n         */\n        showNotificationDetails = function (notificationEntry) {\n            var notificationDescription = notificationEntry.find('.notifications-entry-description'),\n                notificationDescriptionEnd = notificationEntry.find('.notifications-entry-description-end');\n\n            if (notificationDescriptionEnd.length > 0) {\n                notificationDescriptionEnd.addClass('_show');\n            }\n\n            if (notificationDescription.hasClass('_cutted')) {\n                notificationDescription.removeClass('_cutted');\n            }\n        };\n\n    // Show notification description when corresponding item is clicked\n    $('.notifications-wrapper .admin__action-dropdown-menu .notifications-entry').on(\n        'click.showNotification',\n        function (event) {\n            // hide notification dropdown\n            $('.notifications-wrapper .notifications-icon').trigger('click.dropdown');\n\n            showNotificationDetails($(this));\n            event.stopPropagation();\n        }\n    );\n\n    // Remove corresponding notification from the list and mark it as read\n    $('.notifications-close').on('click.removeNotification', function (event) {\n        var notificationEntry = $(this).closest('.notifications-entry'),\n            notificationId = notificationEntry.attr('data-notification-id');\n\n        markNotificationAsRead(notificationId);\n        removeNotificationFromList(notificationEntry);\n\n        // Checking for last unread notification to hide dropdown\n        if (notificationCount == 0) {// eslint-disable-line eqeqeq\n            $('.notifications-wrapper').removeClass('active')\n                .find('.notifications-action')\n                .removeAttr('data-toggle')\n                .off('click.dropdown');\n        }\n        event.stopPropagation();\n    });\n\n    // Hide notifications bubble\n    if (notificationCount == 0) {// eslint-disable-line eqeqeq\n        $('.notifications-action .notifications-counter').hide();\n    } else {\n        $('.notifications-action .notifications-counter').show();\n    }\n});\n","Magento_AdminNotification/system/notification.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'jquery',\n    'mage/template',\n    'jquery/ui',\n    'Magento_Ui/js/modal/modal'\n], function ($, mageTemplate) {\n    'use strict';\n\n    $.widget('mage.systemMessageDialog', $.mage.modal, {\n        options: {\n            modalClass: 'modal-system-messages',\n            systemMessageTemplate:\n                '<% _.each(data.items, function(item) { %>' +\n                    '<li class=\"message message-warning' +\n                        '<% if (item.severity == 1) { %>error<% } else { %>warning<% } %>\">' +\n                        '<%= item.text %>' +\n                    '</li>' +\n                '<% }); %>'\n        },\n\n        /** @inheritdoc */\n        _create: function () {\n            this.options.title = $('#message-system-all').attr('title');\n            this._super();\n        },\n\n        /** @inheritdoc */\n        openModal: function (severity) {\n            var superMethod = $.proxy(this._super, this);\n\n            $.ajax({\n                url: this.options.ajaxUrl,\n                type: 'GET',\n                data: {\n                    severity: severity\n                }\n            }).done($.proxy(function (data) {\n                var tmpl = mageTemplate(this.options.systemMessageTemplate, {\n                    data: {\n                        items: data\n                    }\n                });\n\n                tmpl = $(tmpl);\n\n                this.element.html(\n                    $('<ul></ul>', {\n                        'class': 'message-system-list'\n                    }).append(tmpl)\n                ).trigger('contentUpdated');\n\n                superMethod();\n            }, this));\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        closeModal: function () {\n            this._super();\n        }\n    });\n\n    $(function () {\n        $('#system_messages .message-system-short .error').on('click', function () {\n            $('#message-system-all').systemMessageDialog('openModal', 1);\n        });\n\n        $('#system_messages .message-system-short .warning').on('click', function () {\n            $('#message-system-all').systemMessageDialog('openModal', 2);\n        });\n    });\n\n    return $.mage.systemMessageDialog;\n});\n","Magento_AdminNotification/js/system/messages/popup.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/modal'\n], function ($, modal) {\n    'use strict';\n\n    return function (data, element) {\n\n        if (modal.modal) {\n            modal.modal.html($(element).html());\n        } else {\n            modal.modal = $(element).modal({\n                modalClass: data.class,\n                type: 'popup',\n                buttons: []\n            });\n        }\n\n        modal.modal.modal('openModal');\n    };\n});\n","Magento_AdminNotification/js/grid/listing.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/grid/listing',\n    'Magento_Ui/js/lib/spinner',\n    'jquery'\n], function (Listing, loader, $) {\n    'use strict';\n\n    return Listing.extend({\n        defaults: {\n            imports: {\n                totalRecords: '${ $.provider }:data.totalRecords'\n            },\n            selectors: {\n                collapsible: '.message-system-collapsible',\n                messages: '.message-system'\n            }\n        },\n\n        /** @inheritdoc */\n        initObservable: function () {\n            this._super()\n                .track({\n                    totalRecords: 0\n                });\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        showLoader: function () {\n            if (!this.source.firstLoad) {\n                this.fixLoaderHeight();\n                this._super();\n            }\n        },\n\n        /**\n         * Calculates loader height\n         *\n         * @param {Boolean} [closed]\n         */\n        fixLoaderHeight: function (closed) {\n            var $messagesBlock = $(this.selectors.messages),\n                $collapsibleBlock = $(this.selectors.collapsible),\n                resultHeight = 0;\n\n            if ($messagesBlock.length) {\n                resultHeight += $messagesBlock.outerHeight();\n            }\n\n            if ($collapsibleBlock.length && $collapsibleBlock.is(':visible') && !closed) {\n                resultHeight += $collapsibleBlock.outerHeight();\n            }\n\n            loader.get(this.name).height(resultHeight);\n        }\n    });\n});\n","Magento_AdminNotification/js/grid/columns/message.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/grid/columns/column',\n    'underscore'\n], function (Column, _) {\n    'use strict';\n\n    return Column.extend({\n        defaults: {\n            bodyTmpl: 'Magento_AdminNotification/grid/cells/message',\n            messageIndex: 'text',\n            fieldClass: {\n                message: true,\n                'message-warning': false,\n                'message-progress': false,\n                'message-success': false,\n                'message-error': false\n            },\n            statusMap: {\n                0: 'info',\n                1: 'progress',\n                2: 'success',\n                3: 'error'\n            }\n        },\n\n        /** @inheritdoc */\n        getLabel: function (record) {\n            return record[this.messageIndex];\n        },\n\n        /**\n         * Proxy to getLabel function with UnsanitizedHtml suffix\n         *\n         * @param {Object} record\n         * @returns {String}\n         */\n        getLabelUnsanitizedHtml: function (record) {\n            return this.getLabel(record);\n        },\n\n        /** @inheritdoc */\n        getFieldClass: function ($row) {\n            var status = this.statusMap[$row.status] || 'warning',\n                result = {};\n\n            result['message-' + status] = true;\n            result = _.extend({}, this.fieldClass, result);\n\n            return result;\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/panel.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'uiElement',\n    'jquery',\n    'mage/translate'\n], function (Element, $, $t) {\n    'use strict';\n\n    return Element.extend({\n        defaults: {\n            containerId: '#adobe-stock-images-search-modal',\n            masonryComponentPath: 'adobe_stock_images_listing.adobe_stock_images_listing.adobe_stock_images_columns',\n            dataSourcePath: 'adobe_stock_images_listing.adobe_stock_images_listing_data_source',\n            modules: {\n                masonry: '${ $.masonryComponentPath }',\n                source: '${ $.dataSourcePath }'\n            }\n        },\n\n        /**\n         * Init component\n         *\n         * @return {exports}\n         */\n        initialize: function () {\n            this._super();\n\n            $(this.containerId).modal({\n                type: 'slide',\n                buttons: [],\n                modalClass: 'adobe-stock-modal',\n                title: $t('Adobe Stock')\n            }).on('openModal', function () {\n                this.masonry().setLayoutStylesWhenLoaded();\n            }.bind(this));\n\n            try {\n                $(this.containerId).applyBindings();\n            } catch (e) {\n                //already bounded\n            }\n\n            $(window).on('fileDeleted.mediabrowser', this.reloadGrid.bind(this));\n\n            return this;\n        },\n\n        /**\n         * Update listing data\n         */\n        reloadGrid: function () {\n            this.source().set('params.t', Date.now());\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/path-utility.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([], function () {\n    'use strict';\n\n    return {\n        /**\n         * Extracts image name from its path\n         *\n         * @param {String} path\n         * @returns {String}\n         */\n        getImageNameFromPath: function (path) {\n            var filePathArray = path.split('/'),\n                imageIndex = filePathArray.length - 1;\n\n            return filePathArray[imageIndex].substring(0, filePathArray[imageIndex].lastIndexOf('.'));\n        },\n\n        /**\n         * Generate meaningful name image file,\n         * allow only alphanumerics, dashes, and underscores\n         *\n         * @param {String} title\n         * @param {Number} id\n         * @return string\n         */\n        generateImageName: function (title, id) {\n            var fileName = title.substring(0, 32)\n                .replace(/[^a-zA-Z0-9_]/g, '-')\n                .replace(/-{2,}/g, '-')\n                .toLowerCase();\n\n            /* If the filename does not contain latin chars, use ID as a filename */\n            return fileName === '-' ? id : fileName;\n        },\n\n        /**\n         * Get image file extension\n         *\n         * @param {String} contentType\n         * @return string\n         */\n        getImageExtension: function (contentType) {\n            return contentType.match(/[^/]{1,4}$/);\n        },\n\n        /**\n         * Create path\n         *\n         * @param {String} directoryPath\n         * @param {String} fileName\n         * @param {String} contentType\n         * @returns {String}\n         */\n        buildPath: function (directoryPath, fileName, contentType) {\n            return directoryPath + '/' + fileName + '.' + this.getImageExtension(contentType);\n        }\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/media-gallery.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global Base64 */\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/confirm'\n], function ($, confirm) {\n    'use strict';\n\n    return {\n        jsTreeRootFolderId: 'root',\n        jsTreeFolderNameMaxLength: 20,\n\n        /**\n         * Locate downloaded image in media browser\n         *\n         * @param {String} path\n         */\n        locate: function (path) {\n            var imageFolder = this.selectFolder(path),\n                imageFilename = path.substring(path.lastIndexOf('/') + 1),\n                locatedImage;\n\n            if (imageFolder.length) {\n                locatedImage = $('div[data-row=\"file\"]:has(img[alt=\\\"' + imageFilename + '\\\"])');\n\n                return locatedImage.length ? locatedImage : false;\n            }\n\n            $.ajaxSetup({\n                async: true\n            });\n        },\n\n        /**\n         * Select folder\n         *\n         * @param {String} path\n         */\n        selectFolder: function (path) {\n            var imageFolder,\n                pathId,\n                imagePath = path.replace(/^\\/+/, ''),\n                folderPathParts = imagePath.split('/').slice(0, -1);\n\n            $.ajaxSetup({\n                async: false\n            });\n\n            if (folderPathParts.length > 1) {\n                this.openFolderTree(folderPathParts);\n            }\n\n            pathId = Base64.idEncode(folderPathParts.join('/'));\n            imageFolder = $('.jstree li[data-id=\"' + pathId + '\"]').children('a');\n\n            if (!imageFolder.length) {\n                imageFolder = $('.jstree li[data-id=\"' + this.jsTreeRootFolderId + '\"]')\n                    .children('a');\n            }\n\n            if (imageFolder.length) {\n                imageFolder[0].click();\n            }\n\n            return imageFolder;\n        },\n\n        /**\n         * Show popup that image cannot be located\n         */\n        notLocated: function () {\n            confirm({\n                title: $.mage.__('The image cannot be located'),\n                content: $.mage.__('We cannot find this image in the media gallery.'),\n                buttons: [{\n                    text: $.mage.__('Ok'),\n                    class: 'action-primary',\n                    attr: {},\n\n                    /**\n                     * Close modal on button click\n                     */\n                    click: function (event) {\n                        this.closeModal(event);\n                    }\n                }]\n            });\n        },\n\n        /**\n         * Open folder Tree\n         *\n         * @param {Array} folderPathParts\n         */\n        openFolderTree: function (folderPathParts) {\n            var i,\n                pathId,\n                openFolderButton,\n                folderPath = '';\n\n            for (i = 0; i < folderPathParts.length - 1; i++) {\n                if (folderPath === '') {\n                    folderPath = folderPathParts[i];\n                } else {\n                    folderPath = folderPath + '/' + folderPathParts[i];\n                }\n                pathId = Base64.idEncode(folderPath);\n                openFolderButton = $('.jstree li[data-id=\"' + pathId + '\"].jstree-closed').children('.jstree-icon');\n\n                if (openFolderButton.length) {\n                    openFolderButton.click();\n                }\n            }\n        }\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/signIn.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'Magento_AdobeIms/js/signIn',\n    'Magento_AdobeIms/js/action/authorization',\n    'Magento_Ui/js/modal/confirm'\n], function ($, signIn, auth, confirm) {\n    'use strict';\n\n    return signIn.extend({\n\n        defaults: {\n            userQuota: {},\n            // eslint-disable-next-line max-len\n            dataProvider: 'name = adobe_stock_images_listing.adobe_stock_images_listing_data_source, ns = adobe_stock_images_listing',\n            // eslint-disable-next-line max-len\n            previewProvider: 'name = adobe_stock_images_listing.adobe_stock_images_listing.adobe_stock_images_columns.preview, ns = adobe_stock_images_listing',\n            quotaUrl: 'adobe_stock/license/quota',\n            modules: {\n                source: '${ $.dataProvider }',\n                preview: '${ $.previewProvider }'\n            }\n        },\n\n        /**\n         * @inheritdoc\n         */\n        initObservable: function () {\n            this._super().observe(['userQuota']);\n\n            return this;\n        },\n\n        /**\n         * Login to Adobe\n         *\n         * @return {*}\n         */\n        login: function () {\n            var deferred = $.Deferred();\n\n            if (this.user().isAuthorized) {\n                return deferred.resolve();\n            }\n            auth(this.loginConfig)\n                .then(function (response) {\n                    this.loadUserProfile();\n                    deferred.resolve(response);\n                }.bind(this))\n                .fail(function (error) {\n                    deferred.reject(error);\n                });\n\n            return deferred.promise();\n        },\n\n        /**\n         * Login action with popup on error..\n         */\n        loginClick: function () {\n            this.login().fail(function (error) {\n                this.showLoginErrorPopup(error);\n            }.bind(this));\n        },\n\n        /**\n         * Show popup that user failed to login.\n         */\n        showLoginErrorPopup: function (error) {\n            confirm({\n                title: $.mage.__('Couldn\\'t log you in'),\n                content: error,\n                buttons: [{\n                    text: $.mage.__('Ok'),\n                    class: 'action-primary action-accept'\n                }],\n                actions: {\n\n                    /**\n                       * Close modal\n                       */\n                    confirm: function (event) {\n                        this.closeModal(event);\n                    }\n                }\n            });\n        },\n\n        /**\n         * Logout from adobe account\n         */\n        logout: function () {\n            $.ajax({\n                type: 'POST',\n                url: this.logoutUrl,\n                data: {\n                    'form_key': window.FORM_KEY\n                },\n                dataType: 'json',\n                context: this,\n                showLoader: true,\n                success: function () {\n                    this.user({\n                        isAuthorized: false,\n                        name: '',\n                        email: '',\n                        image: this.defaultProfileImage\n                    });\n                }.bind(this),\n\n                /**\n                 * @param {Object} response\n                 * @returns {String}\n                 */\n                error: function (response) {\n                    return response.message;\n                }\n            });\n        },\n\n        /**\n         * Retrieves full user quota.\n         */\n        getUserQuota: function () {\n            $.ajax({\n                type: 'GET',\n                url: this.quotaUrl,\n                dataType: 'json',\n                context: this,\n\n                /**\n                 * @param {Object} response\n                 * @returns void\n                 */\n                success: function (response) {\n                    this.userQuota(response.result);\n                },\n\n                /**\n                 * @param {Object} response\n                 * @returns {String}\n                 */\n                error: function (response) {\n                    return response.message;\n                }\n            });\n        },\n\n        /**\n         * @inheritdoc\n         */\n        loadUserProfile: function () {\n            $.ajax({\n                type: 'GET',\n                url: this.profileUrl,\n                dataType: 'json',\n                context: this,\n\n                /**\n                 * @param {Object} response\n                 * @returns void\n                 */\n                success: function (response) {\n                    this.user({\n                        isAuthorized: true,\n                        name: response.result.name,\n                        email: response.result.email,\n                        image: response.result.image\n                    });\n                    this.getUserQuota();\n                },\n\n                /**\n                 * @param {Object} response\n                 * @returns {String}\n                 */\n                error: function (response) {\n                    return response.message;\n                }\n            });\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/mediaGallery/grid/columns/licenseImage.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_MediaGalleryUi/js/grid/columns/image'\n], function (Image) {\n    'use strict';\n\n    return Image.extend({\n        defaults: {\n            viewConfig: [\n                {\n                    component: 'Magento_AdobeStockImageAdminUi/js/mediaGallery/grid/columns/image/licenseActions',\n                    name: '${ $.name }_actions',\n                    imageModelName: '${ $.name }',\n                    imageDetailsUrl: '${ $.imageDetailsurl }',\n                    imageComponent: '${ $.imageComponent }'\n                }\n            ]\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/mediaGallery/grid/columns/image/licenseActions.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'underscore',\n    'Magento_MediaGalleryUi/js/grid/columns/image/actions',\n    'Magento_MediaGalleryUi/js/action/getDetails',\n    'mage/translate'\n], function ($, _, Action, getDetails) {\n    'use strict';\n\n    return Action.extend({\n        defaults: {\n            template: 'Magento_AdobeStockImageAdminUi/mediaGallery/grid/columns/image/licenseActions',\n            licenseAction: {\n                name: 'license',\n                title: $.mage.__('License'),\n                handler: 'licenseImageAction'\n            },\n            modules: {\n                image: '${ $.imageComponent }'\n            }\n        },\n\n        /**\n         * Initialize the component\n         *\n         * @returns {Object}\n         */\n        initialize: function () {\n            this._super();\n            this.actionsList.push(this.licenseAction);\n\n            return this;\n        },\n\n        /**\n         * Init observable variables\n         *\n         * @return {Object}\n         */\n        initObservable: function () {\n            this._super()\n                .observe([\n                    'visible'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * License image\n         *\n         * @param {Object} record\n         */\n        licenseImageAction: function (record) {\n            this.getImageRecord(record.id);\n        },\n\n        /**\n         * Check if image licensed\n         *\n         * @param {Object} record\n         * @param {Object} name\n         */\n        isVisible: function (record, name) {\n            if (name === this.licenseAction.name) {\n                if (_.isUndefined(record.overlay) || record.overlay === '') {\n                    return false;\n                }\n\n                return true;\n            }\n\n            return true;\n        },\n\n        /**\n         * Get image record and start license process\n         *\n         * @param {Number} imageId\n         */\n        getImageRecord: function (imageId) {\n            getDetails(this.imageDetailsUrl, [imageId]).then(function (imageDetails) {\n                var id = imageDetails[imageId]['adobe_stock'][0].value;\n\n                this.image().actions().licenseProcess(\n                    id,\n                    imageDetails[imageId].title,\n                    imageDetails[imageId].path,\n                    imageDetails[imageId]['content_type'],\n                    true\n                ).then(function () {\n                    this.image().actions().login().getUserQuota();\n                    this.imageModel().reloadGrid();\n                    this.imageModel().addMessage('success', $.mage.__('The image has been licensed.'));\n                }.bind(this)).fail(function (error) {\n                    if (error) {\n                        this.imageModel().addMessage('error', error);\n                    }\n                }.bind(this));\n            }.bind(this)).fail(function (message) {\n                this.imageModel().addMessage('error', message);\n            }.bind(this));\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/validation/validate-image-name.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'mage/translate',\n    'jquery/validate'\n], function ($, $t) {\n    'use strict';\n\n    $.validator.addMethod(\n        'validate-image-name', function (value) {\n            return /^[a-zA-Z0-9\\-\\_]+$/i.test(value);\n\n        }, $t('Please name the file using only letters, numbers, underscores and dashes'));\n});\n","Magento_AdobeStockImageAdminUi/js/action/savePreview.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'Magento_AdobeStockImageAdminUi/js/action/save',\n    'Magento_AdobeStockImageAdminUi/js/confirmation/save',\n    'Magento_AdobeStockImageAdminUi/js/path-utility'\n], function ($, saveAction, saveConfirmation, pathUtility) {\n    'use strict';\n\n    return function (requestUrl, id, title, contentType, directoryPath) {\n        var deferred = $.Deferred(),\n            destinationPath;\n\n        saveConfirmation(\n            pathUtility.generateImageName(title, id),\n            pathUtility.getImageExtension(contentType)\n        ).then(function (fileName) {\n            destinationPath = pathUtility.buildPath(directoryPath, fileName, contentType);\n\n            saveAction(\n                requestUrl,\n                id,\n                destinationPath\n            ).then(function () {\n                deferred.resolve(destinationPath);\n            }).fail(function (error) {\n                deferred.reject(error);\n            });\n        }).fail(function (error) {\n            deferred.reject(error);\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/action/save.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    return function (requestUrl, adobeAssetId, destinationPath) {\n        var deferred = $.Deferred();\n\n        $.ajax({\n            type: 'POST',\n            url: requestUrl,\n            dataType: 'json',\n            showLoader: true,\n            data: {\n                'media_id': adobeAssetId,\n                'destination_path': destinationPath\n            },\n\n            /**\n             * Resolve on success\n             */\n            success: function () {\n                deferred.resolve();\n            },\n\n            /**\n             * Extract the error message and reject\n             *\n             * @param {Object} response\n             */\n            error: function (response) {\n                var message;\n\n                if (typeof response.responseJSON === 'undefined' ||\n                    typeof response.responseJSON.message === 'undefined'\n                ) {\n                    message = 'Could not save the asset!';\n                } else {\n                    message = response.responseJSON.message;\n                }\n                deferred.reject(message);\n            }\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/action/licenseAndSave.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'Magento_AdobeStockImageAdminUi/js/action/save',\n    'Magento_AdobeStockImageAdminUi/js/confirmation/license',\n    'Magento_AdobeStockImageAdminUi/js/path-utility'\n], function ($, saveAction, licenseConfirmation, pathUtility) {\n    'use strict';\n\n    return function (\n        requestUrl,\n        id,\n        title,\n        path,\n        contentType,\n        isDownloaded,\n        quotaMessage,\n        directoryPath\n    ) {\n        var deferred = $.Deferred(),\n            destinationPath;\n\n        licenseConfirmation(\n                title,\n                quotaMessage,\n                isDownloaded,\n                pathUtility.generateImageName(title, id),\n                pathUtility.getImageExtension(contentType)\n            ).then(function (fileName) {\n\n                if (typeof fileName === 'undefined') {\n                    fileName = pathUtility.getImageNameFromPath(path);\n                }\n\n                destinationPath = pathUtility.buildPath(directoryPath, fileName, contentType);\n\n                saveAction(\n                    requestUrl,\n                    id,\n                    destinationPath\n                ).then(function () {\n                    deferred.resolve(destinationPath);\n                }).fail(function (message) {\n                    deferred.reject(message);\n                });\n            }).fail(function (error) {\n                deferred.reject(error);\n            });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/action/getLicenseStatus.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    return function (requestUrl, ids) {\n        var deferred = $.Deferred();\n\n        $.ajax({\n            type: 'GET',\n            url: requestUrl + '?ids=' + ids.join(','),\n            data: {\n                'form_key': window.FORM_KEY\n            },\n            showLoader: true,\n            dataType: 'json',\n\n            /**\n             * Resolve with the response result\n             *\n             * @param {Object} response\n             */\n            success: function (response) {\n                deferred.resolve(response.result);\n            },\n\n            /**\n             * Reject with the message from response\n             *\n             * @param {Object} response\n             */\n            error: function (response) {\n                var message = response.message;\n\n                if (response.status === 403) {\n                    message = $.mage.__('Your admin role does not have permissions to license an image');\n                }\n\n                deferred.reject(message);\n            }\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/action/saveLicensed.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'Magento_AdobeStockImageAdminUi/js/action/save',\n    'Magento_AdobeStockImageAdminUi/js/confirmation/saveLicensed',\n    'Magento_AdobeStockImageAdminUi/js/path-utility'\n], function ($, saveAction, saveLicensedConfirmation, pathUtility) {\n    'use strict';\n\n    return function (requestUrl, id, title, path, contentType, directoryPath) {\n        var imageName = '',\n            destinationPath,\n            deferred = $.Deferred();\n\n        if (path !== '') {\n            imageName = pathUtility.getImageNameFromPath(path);\n            destinationPath = pathUtility.buildPath(directoryPath, imageName, contentType);\n            saveAction(\n                requestUrl,\n                id,\n                destinationPath\n            ).then(function () {\n                deferred.resolve(destinationPath);\n            }).fail(function (message) {\n                deferred.reject(message);\n            });\n\n            return deferred.promise();\n        }\n\n        saveLicensedConfirmation(\n            pathUtility.generateImageName(title, id),\n            pathUtility.getImageExtension(contentType)\n        ).then(function (fileName) {\n            destinationPath = pathUtility.buildPath(directoryPath, fileName, contentType);\n            saveAction(\n                requestUrl,\n                id,\n                destinationPath\n            ).then(function () {\n                deferred.resolve(destinationPath);\n            }).fail(function (message) {\n                deferred.reject(message);\n            });\n        }).fail(function (error) {\n            deferred.reject(error);\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/action/confirmQuota.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    return function (requestUrl, adobeAssetId) {\n        var deferred = $.Deferred();\n\n        $.ajax({\n            type: 'GET',\n            url: requestUrl,\n            dataType: 'json',\n            data: {\n                'media_id': adobeAssetId\n            },\n            showLoader: true,\n\n            /**\n             * Extract the data from the response and resolve\n             *\n             * @param {Object} response\n             */\n            success: function (response) {\n                deferred.resolve({\n                    canLicense: response.result.canLicense,\n                    message: response.result.message\n                });\n            },\n\n            /**\n             * Extract the error message and reject\n             *\n             * @param {Object} response\n             */\n            error: function (response) {\n                var message = response.JSON ? response.JSON.message\n                    : $.mage.__('Could not fetch licensing information.');\n\n                if (response.status === 403) {\n                    message = $.mage.__('Your admin role does not have permissions to license an image');\n                }\n\n                deferred.reject(message);\n            }\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/components/images-grid-sizes.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'Magento_Ui/js/grid/paging/sizes',\n    'underscore'\n], function (Sizes, _) {\n    'use strict';\n\n    return Sizes.extend({\n        defaults: {\n            value: 32,\n            minSize: 1,\n            maxSize: 64\n        },\n\n        exports: {\n            value: '${ $.provider }:params.paging.page',\n            options: '${ $.provider }:params.paging.options'\n        },\n\n        sizes: {\n            '32': {\n                value: 32,\n                label: 32\n            },\n            '48': {\n                value: 48,\n                label: 48\n            },\n            '64': {\n                value: 64,\n                label: 64\n            }\n        },\n\n        /**\n         * @inheritdoc\n         */\n        updateArray: function () {\n            if (_.isUndefined(this.options)) {\n                this.options = this.sizes;\n            }\n\n            return this._super();\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/components/grid/column/image-preview.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'uiLayout',\n    'Magento_Ui/js/grid/columns/image-preview'\n], function ($, layout, imagePreview) {\n    'use strict';\n\n    return imagePreview.extend({\n        defaults: {\n            downloadImagePreviewUrl: 'adobe_stock/preview/download',\n            licenseAndDownloadUrl: 'adobe_stock/license/license',\n            saveLicensedAndDownloadUrl: 'adobe_stock/license/saveLicensed',\n            confirmationUrl: 'adobe_stock/license/confirmation',\n            relatedImagesUrl: 'adobe_stock/preview/relatedimages',\n            buyCreditsUrl: 'https://stock.adobe.com/',\n            mediaGallerySelector: '.media-gallery-modal:has(#search_adobe_stock)',\n            adobeStockModalSelector: '.adobe-search-images-modal',\n            activeMediaGallerySelector: 'aside.modal-slide.adobe-stock-modal._show',\n            modules: {\n                keywords: '${ $.name }_keywords',\n                related: '${ $.name }_related',\n                actions: '${ $.name }_actions'\n            },\n            viewConfig: [\n                {\n                    component: 'Magento_AdobeStockImageAdminUi/js/components/grid/column/preview/keywords',\n                    name: '${ $.name }_keywords'\n                },\n                {\n                    component: 'Magento_AdobeStockImageAdminUi/js/components/grid/column/preview/related',\n                    name: '${ $.name }_related'\n                },\n                {\n                    component: 'Magento_AdobeStockImageAdminUi/js/components/grid/column/preview/actions',\n                    name: '${ $.name }_actions',\n                    provider: '${ $.provider }',\n                    mediaGallery: '${ $.mediaGalleryComponent }',\n                    mediaGalleryName: '${ $.mediaGalleryName }',\n                    mediaGalleryProvider: '${ $.mediaGalleryProvider }',\n                    mediaGallerySortBy: '${ $.mediaGallerySortBy }',\n                    mediaGallerySearchInput: '${ $.mediaGallerySearchInput }',\n                    mediaGalleryListingFilters: '${ $.mediaGalleryListingFilters }',\n                    getMediaGalleryAsset: '${ $.getMediaGalleryAsset }',\n                    imageEditDetailsUrl: '${ $.imageEditDetailsUrl }',\n                    listingPaging: '${ $.listingPaging }'\n                }\n            ],\n            listens: {\n                '${ $.sortByComponentName }:applied': 'hide'\n            }\n        },\n\n        /**\n         * Initialize the component\n         *\n         * @returns {Object}\n         */\n        initialize: function () {\n            this._super().initView();\n            $(window).on('fileDeleted.enhancedMediaGallery', this.reloadAdobeGrid.bind(this));\n            $(window).on('folderDeleted.enhancedMediaGallery', this.reloadAdobeGrid.bind(this));\n\n            return this;\n        },\n\n        /**\n         * Initialize child components\n         *\n         * @returns {Object}\n         */\n        initView: function () {\n            layout(this.viewConfig);\n\n            return this;\n        },\n\n        /**\n         * Get previous button disabled\n         *\n         * @param {Object} record\n         *\n         * @return {Boolean}\n         */\n        cannotViewPrevious: function (record) {\n            return this.related().cannotViewPrevious(record);\n        },\n\n        /**\n         * Get next button disabled\n         *\n         * @param {Object} record\n         *\n         * @return {Boolean}\n         */\n        cannotViewNext: function (record) {\n            return this.related().cannotViewNext(record);\n        },\n\n        /**\n         * Return active adobe gallery selector.\n         */\n        getAdobeModal: function () {\n            return $(this.activeMediaGallerySelector).find(this.adobeStockModalSelector);\n        },\n\n        /**\n         * @inheritdoc\n         */\n        next: function (record) {\n            if (this.related().selectedTab()) {\n                this.related().nextRelated(record);\n\n                return;\n            }\n            this.keywords().hideAllKeywords();\n            this._super(record);\n        },\n\n        /**\n         * @inheritdoc\n         */\n        prev: function (record) {\n            if (this.related().selectedTab()) {\n                this.related().prevRelated(record);\n\n                return;\n            }\n            this.keywords().hideAllKeywords();\n            this._super(record);\n        },\n\n        /**\n         * @inheritdoc\n         */\n        show: function (record) {\n            this.related().selectedTab(null);\n            this.keywords().hideAllKeywords();\n            this.displayedRecord(record);\n            this._super(record);\n            this.related().loadRelatedImages(record);\n        },\n\n        /**\n         * Show related image data in the preview section\n         *\n         * @param {Object} record\n         */\n        showRelated: function (record) {\n            this.keywords().hideAllKeywords();\n            this.displayedRecord(record);\n            this.updateHeight();\n        },\n\n        /**\n         * Returns attributes to display under the preview image\n         *\n         * @returns {*[]}\n         */\n        getDisplayAttributes: function () {\n            if (!this.displayedRecord()) {\n                return [];\n            }\n\n            return [\n                {\n                    name: 'Dimensions',\n                    value: this.displayedRecord().width + ' x ' + this.displayedRecord().height + ' px'\n                },\n                {\n                    name: 'File type',\n                    value: this.displayedRecord()['content_type'].toUpperCase()\n                },\n                {\n                    name: 'Category',\n                    value: this.displayedRecord().category.name || 'None'\n                },\n                {\n                    name: 'File #',\n                    value: this.displayedRecord().id\n                }\n            ];\n        },\n\n        /**\n         * Reload Adobe grid after deleting image\n         */\n        reloadAdobeGrid: function () {\n            this.actions().source().reload({\n                refresh: true\n            });\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/components/grid/column/overlay.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'underscore',\n    'Magento_Ui/js/grid/columns/overlay',\n    'Magento_AdobeStockImageAdminUi/js/action/getLicenseStatus'\n], function ($, _, overlay, getLicenseStatus) {\n    'use strict';\n\n    return overlay.extend({\n        defaults: {\n            // eslint-disable-next-line max-len\n            provider: 'name = adobe_stock_images_listing.adobe_stock_images_listing_data_source, ns = adobe_stock_images_listing',\n            loginProvider: 'name = adobe-login, ns = adobe-login',\n            getImagesUrl: 'adobe_stock/license/getlist',\n            licensed: {},\n            modules: {\n                login: '${ $.loginProvider }'\n            },\n            listens: {\n                '${ $.provider }:data.items': 'handleItemsUpdate',\n                '${ $.loginProvider }:user': 'handleUserUpdate'\n            },\n            imports: {\n                rows: '${ $.provider }:data.items'\n            }\n        },\n\n        /**\n         * Init observable variables\n         * @return {Object}\n         */\n        initObservable: function () {\n            this._super()\n                .observe([\n                    'licensed'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Updates the licensed data when items data is updated.\n         *\n         * @param {Array} items\n         */\n        handleItemsUpdate: function (items) {\n            var ids = this.getIds(items);\n\n            this.updateLicensed(ids);\n        },\n\n        /**\n         * Updates the licensed data when user data is updated.\n         */\n        handleUserUpdate: function () {\n            var ids = this.getIds(this.rows);\n\n            this.updateLicensed(ids);\n        },\n\n        /**\n         * Set Licensed images data.\n         *\n         * @param {Array} ids\n         */\n        updateLicensed: function (ids) {\n            if (!this.isUserAuthorized() || ids.length === 0) {\n                this.licensed({});\n\n                return;\n            }\n\n            getLicenseStatus(this.getImagesUrl, ids).then(function (licensed) {\n                this.licensed(licensed);\n            }.bind(this));\n        },\n\n        /**\n         * Checks if user is logged in and authorized\n         *\n         * @returns {Boolean}\n         */\n        isUserAuthorized: function () {\n            return !_.isUndefined(this.login()) && this.login().user().isAuthorized;\n        },\n\n        /**\n         * Get all ids from items array\n         *\n         * @param {Array} items\n         * @returns {Number[]}\n         */\n        getIds: function (items) {\n            var ids = [];\n\n            items.forEach(function (record) {\n                ids.push(record.id);\n            });\n\n            return ids;\n        },\n\n        /**\n         * Returns top displacement of overlay according to image height\n         *\n         * @param {Object} record - Data to be preprocessed.\n         * @returns {Object}\n         */\n        getStyles: function (record) {\n            var height = record.styles().height.replace('px', '') - 40;\n\n            return {\n                top: height + 'px'\n            };\n        },\n\n        /**\n         * If overlay should be visible\n         *\n         * @param {Object} row\n         * @returns {Boolean}\n         */\n        isVisible: function (row) {\n            return this.licensed()[row.id];\n        },\n\n        /**\n         * Get overlay label\n         *\n         * @param {Object} row\n         * @returns {String}\n         */\n        getLabel: function (row) {\n            return this.licensed()[row.id] ? 'Licensed' : '';\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/components/grid/column/preview/keywords.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'uiComponent',\n    'underscore'\n], function (Component, _) {\n    'use strict';\n\n    return Component.extend({\n        defaults: {\n            template: 'Magento_AdobeStockImageAdminUi/grid/column/preview/keywords',\n            chipsProvider: 'componentType = filtersChips, ns = ${ $.ns }',\n            defaultKeywordsLimit: 5,\n            keywordsLimit: 5,\n            canViewMoreKeywords: true,\n            modules: {\n                chips: '${ $.chipsProvider }',\n                preview: '${ $.parentName }.preview'\n            }\n        },\n\n        /**\n         * Init observable variables\n         * @return {Object}\n         */\n        initObservable: function () {\n            this._super()\n                .observe([\n                    'keywordsLimit',\n                    'canViewMoreKeywords'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Returns keywords to display under the attributes image\n         *\n         * @returns {*[]}\n         */\n        getKeywords: function (record) {\n            return record.keywords;\n        },\n\n        /**\n         * Returns keywords limit to show no of keywords\n         */\n        getKeywordsLimit: function () {\n            return this.keywordsLimit();\n        },\n\n        /**\n         * Show all the related keywords\n         */\n        viewAllKeywords: function (record) {\n            this.keywordsLimit(record.keywords.length);\n            this.canViewMoreKeywords(false);\n            this.preview().updateHeight();\n            this.preview().scrollToPreview();\n        },\n\n        /**\n         * Hide all the related keywords\n         */\n        hideAllKeywords: function () {\n            this.keywordsLimit(this.defaultKeywordsLimit);\n            this.canViewMoreKeywords(true);\n        },\n\n        /**\n         * Drop all filters and initiate search on keyword click event\n         */\n        searchByKeyWord: function (keyword) {\n            _.invoke(this.chips().elems(), 'clear');\n            _.invoke(this.chips().elems(), 'apply', keyword);\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/components/grid/column/preview/related.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'uiComponent',\n    'underscore',\n    'jquery'\n], function (Component, _, $) {\n    'use strict';\n\n    return Component.extend({\n        defaults: {\n            template: 'Magento_AdobeStockImageAdminUi/grid/column/preview/related',\n            filterChipsProvider: 'componentType = filters, ns = ${ $.ns }',\n            filterBookmarksSelector: '.admin__data-grid-action-bookmarks',\n            tabImagesLimit: 4,\n            tabsContainerId: '#adobe-stock-tabs',\n            serieFilterValue: '',\n            modelFilterValue: '',\n            selectedTab: null,\n            loader: false,\n            relatedImages: {\n                series: {},\n                model: {}\n            },\n            statefull: {\n                serieFilterValue: true,\n                modelFilterValue: true\n            },\n            modules: {\n                chips: '${ $.chipsProvider }',\n                filterChips: '${ $.filterChipsProvider }',\n                preview: '${ $.parentName }.preview'\n            },\n            exports: {\n                serieFilterValue: '${ $.provider }:params.filters.serie_id',\n                modelFilterValue: '${ $.provider }:params.filters.model_id'\n            }\n        },\n\n        /**\n         * Initializes related component.\n         */\n        initialize: function () {\n            this._super();\n\n            this.filterChips().updateActive();\n\n            return this;\n        },\n\n        /**\n         * Disable keydown event for related content tabs\n         */\n        disableTabsKeyDownEvent: function () {\n            if ($(this.tabsContainerId + ' li[role=tab]').length === 0) {\n                setTimeout(function () {\n                    this.disableTabsKeyDownEvent();\n                }.bind(this), 100);\n            } else {\n                $(this.tabsContainerId + ' li[role=tab]').off('keydown');\n            }\n        },\n\n        /**\n         * Init observable variables\n         * @return {Object}\n         */\n        initObservable: function () {\n            this._super()\n                .observe([\n                    'serieFilterValue',\n                    'modelFilterValue',\n                    'selectedTab',\n                    'relatedImages',\n                    'loader'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Check if visible container\n         *\n         * @param {Object} record\n         * @returns boolean\n         */\n        isVisible: function (record) {\n            return this.showSeriesTab(record) && this.showModelTab(record);\n        },\n\n        /**\n         * Get image related image series.s\n         *\n         * @param {Object} record\n         */\n        loadRelatedImages: function (record) {\n            var series = this.getSeries(record),\n                model = this.getModel(record);\n\n            if (series && series.length ||\n                model && model.length\n            ) {\n                return;\n            }\n            $.ajax({\n                type: 'GET',\n                url: this.preview().relatedImagesUrl,\n                dataType: 'json',\n                beforeSend: function () {\n                    this.loader(true);\n                }.bind(this),\n                data: {\n                    'image_id': record.id,\n                    'limit': this.tabImagesLimit\n                }\n            }).done(function (data) {\n                var relatedImages = this.relatedImages();\n\n                this.loader(false);\n                relatedImages.series[record.id] = data.result['same_series'];\n                relatedImages.model[record.id] = data.result['same_model'];\n\n                this.relatedImages(relatedImages);\n                this.preview().updateHeight();\n\n                /* Switch to the model tab if the series tab is hidden */\n                if (relatedImages.series[record.id].length === 0 && relatedImages.model[record.id].length > 0) {\n                    // eslint-disable-next-line jquery-no-input-event-shorthand\n                    $('#adobe-stock-tabs').data().mageTabs.select(1);\n                }\n            }.bind(this));\n        },\n\n        /**\n         * Returns true if the series tab should be show, false otherwise\n         *\n         * @param {Object} record\n         * @returns boolean\n         */\n        showSeriesTab: function (record) {\n            return typeof this.relatedImages().series[record.id] === 'undefined' ||\n                this.relatedImages().series[record.id].length !== 0;\n        },\n\n        /**\n         * Returns true if the model tab should be show, false otherwise\n         *\n         * @param {Object} record\n         * @returns boolean\n         */\n        showModelTab: function (record) {\n            return typeof this.relatedImages().model[record.id] === 'undefined' ||\n                this.relatedImages().model[record.id].length !== 0;\n        },\n\n        /**\n         * Returns series to display under the image\n         *\n         * @param {Object} record\n         * @returns {*[]}\n         */\n        getSeries: function (record) {\n            return this.relatedImages().series[record.id] || [];\n        },\n\n        /**\n         * Check if the number of related series image is greater than 4 or not\n         *\n         * @param {Object} record\n         * @returns boolean\n         */\n        canShowMoreSeriesImages: function (record) {\n            return this.getSeries(record).length >= this.tabImagesLimit;\n        },\n\n        /**\n         * Returns model to display under the image\n         *\n         * @param {Object} record\n         * @returns {*[]}\n         */\n        getModel: function (record) {\n            return this.relatedImages().model[record.id] || [];\n        },\n\n        /**\n         * Check if the number of related model image is greater than 4 or not\n         *\n         * @param {Object} record\n         * @returns boolean\n         */\n        canShowMoreModelImages: function (record) {\n            return this.getModel(record).length >= this.tabImagesLimit;\n        },\n\n        /**\n         * Filter images from serie_id\n         *\n         * @param {Object} record\n         */\n        seeMoreFromSeries: function (record) {\n            if (this.isSerieFilterApplied(record)) {\n                this.scrollToFilter();\n\n                return;\n            }\n            this.serieFilterValue(record.id);\n            this.applyFilter('serie_id', record.id.toString());\n        },\n\n        /**\n         * Filter images from serie_id\n         *\n         * @param {Object} record\n         */\n        seeMoreFromModel: function (record) {\n            if (this.isModelFilterApplied(record)) {\n                this.scrollToFilter();\n\n                return;\n            }\n            this.modelFilterValue(record.id);\n            this.applyFilter('model_id', record.id.toString());\n        },\n\n        /**\n         * Apply series or model id filter and scroll to top of the page\n         *\n         * @param {String} typeId\n         * @param {String} recordId\n         */\n        applyFilter: function (typeId, recordId) {\n            var data = {};\n\n            data[typeId] = recordId;\n\n            this.filterChips().clear();\n            this.filterChips().setData(data, true);\n            this.filterChips().apply();\n\n            this.scrollToFilter();\n        },\n\n        /**\n         * Checks if the filter is applied\n         *\n         * @param {Object} record\n         * @returns {Boolean}\n         */\n        isSerieFilterApplied: function (record) {\n            return this.filterChips().get('applied')['serie_id'] === record.id.toString();\n        },\n\n        /**\n         * Checks if the filter is applied\n         *\n         * @param {Object} record\n         * @returns {Boolean}\n         */\n        isModelFilterApplied: function (record) {\n            return this.filterChips().get('applied')['model_id'] === record.id.toString();\n        },\n\n        /**\n         * Scrolls user window to the filter bookmarks\n         */\n        scrollToFilter: function () {\n            $(this.preview().adobeStockModalSelector + ' ' + this.filterBookmarksSelector).get(0).scrollIntoView({\n                behavior: 'smooth',\n                block: 'center',\n                inline: 'nearest'\n            });\n        },\n\n        /**\n         * Next related image preview\n         *\n         * @param {Object} record\n         */\n        nextRelated: function (record) {\n            var relatedList = this.selectedTab() === 'series' ? this.getSeries(record) : this.getModel(record),\n                nextRelatedIndex = _.findLastIndex(\n                    relatedList,\n                    {\n                        id: this.preview().displayedRecord().id\n                    }\n                ) + 1,\n                nextRelated = relatedList[nextRelatedIndex];\n\n            if (typeof nextRelated === 'undefined') {\n                return;\n            }\n\n            this.switchImagePreviewToRelatedImage(nextRelated);\n        },\n\n        /**\n         * Previous related preview\n         *\n         * @param {Object} record\n         */\n        prevRelated: function (record) {\n            var relatedList = this.selectedTab() === 'series' ? this.getSeries(record) : this.getModel(record),\n                prevRelatedIndex = _.findLastIndex(\n                    relatedList,\n                    {\n                        id: this.preview().displayedRecord().id\n                    }\n                ) - 1,\n                prevRelated = relatedList[prevRelatedIndex];\n\n            if (typeof prevRelated === 'undefined') {\n                return;\n            }\n\n            this.switchImagePreviewToRelatedImage(prevRelated);\n        },\n\n        /**\n         * Get previous button disabled\n         *\n         * @param {Object} record\n         *\n         * @return {Boolean}\n         */\n        cannotViewPrevious: function (record) {\n            var relatedList, prevRelatedIndex, prevRelated;\n\n            if (!this.selectedTab()) {\n                return false;\n            }\n            relatedList = this.selectedTab() === 'series' ? this.getSeries(record) : this.getModel(record);\n            prevRelatedIndex = _.findLastIndex(\n                relatedList,\n                {\n                    id: this.preview().displayedRecord().id\n                }\n            ) - 1;\n            prevRelated = relatedList[prevRelatedIndex];\n\n            return typeof prevRelated === 'undefined';\n        },\n\n        /**\n         * Get next button disabled\n         *\n         * @param {Object} record\n         *\n         * @return {Boolean}\n         */\n        cannotViewNext: function (record) {\n            var relatedList, nextRelatedIndex, nextRelated;\n\n            if (!this.selectedTab()) {\n                return false;\n            }\n            relatedList = this.selectedTab() === 'series' ? this.getSeries(record) : this.getModel(record);\n            nextRelatedIndex = _.findLastIndex(\n                relatedList,\n                {\n                    id: this.preview().displayedRecord().id\n                }\n            ) + 1;\n            nextRelated = relatedList[nextRelatedIndex];\n\n            return typeof nextRelated === 'undefined';\n        },\n\n        /**\n         * Switch image preview to related image\n         *\n         * @param {Object|null} relatedImage\n         */\n        switchImagePreviewToRelatedImage: function (relatedImage) {\n            if (!relatedImage) {\n                this.selectedTab(null);\n\n                return;\n            }\n\n            if (this.preview().displayedRecord().id === relatedImage.id) {\n                return;\n            }\n\n            this.preview().showRelated(relatedImage);\n        },\n\n        /**\n         * Switch image preview to series image\n         *\n         * @param {Object} record\n         */\n        switchImagePreviewToSeriesImage: function (record) {\n            this.selectedTab('series');\n            this.switchImagePreviewToRelatedImage(record);\n        },\n\n        /**\n         * Switch image preview to model image\n         *\n         * @param {Object} record\n         */\n        switchImagePreviewToModelImage: function (record) {\n            this.selectedTab('model');\n            this.switchImagePreviewToRelatedImage(record);\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/components/grid/column/preview/actions.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'uiComponent',\n    'uiRegistry',\n    'jquery',\n    'underscore',\n    'Magento_AdobeStockImageAdminUi/js/action/save',\n    'Magento_AdobeStockImageAdminUi/js/action/savePreview',\n    'Magento_AdobeStockImageAdminUi/js/action/saveLicensed',\n    'Magento_AdobeStockImageAdminUi/js/action/licenseAndSave',\n    'Magento_AdobeStockImageAdminUi/js/action/confirmQuota',\n    'Magento_AdobeStockImageAdminUi/js/media-gallery',\n    'Magento_AdobeStockImageAdminUi/js/confirmation/buyCredits',\n    'Magento_AdobeStockImageAdminUi/js/action/getLicenseStatus',\n    'Magento_Ui/js/modal/alert'\n], function (\n    Component,\n    uiRegistry,\n    $,\n    _,\n    saveAction,\n    savePreviewAction,\n    saveLicensedAction,\n    licenseAndSaveAction,\n    confirmQuotaAction,\n    mediaGallery,\n    buyCreditsConfirmation,\n    getLicenseStatus,\n    uiAlert\n) {\n    'use strict';\n\n    return Component.extend({\n        defaults: {\n            template: 'Magento_AdobeStockImageAdminUi/grid/column/preview/actions',\n            loginProvider: 'name = adobe-login, ns = adobe-login',\n            mediaGallerySelector: '.media-gallery-modal:has(#search_adobe_stock)',\n            adobeStockModalSelector: '.adobe-search-images-modal',\n            downloadImagePreviewUrl: 'adobe_stock/preview/download',\n            licenseAndDownloadUrl: 'adobe_stock/license/license',\n            saveLicensedAndDownloadUrl: 'adobe_stock/license/saveLicensed',\n            buyCreditsUrl: 'https://stock.adobe.com/',\n            messageDelay: 5,\n            mediaGallery: '',\n            imageItems: [],\n            messages: [],\n            listens: {\n                '${ $.provider }:data.items': 'updateActions'\n            },\n            modules: {\n                login: '${ $.loginProvider }',\n                preview: '${ $.parentName }.preview',\n                overlay: '${ $.parentName }.overlay',\n                source: '${ $.provider }',\n                imageDirectory: '${ $.mediaGalleryName }',\n                mediaGallerySortBy: '${ $.mediaGallerySortBy }',\n                mediaGallerySearchInput: '${ $.mediaGallerySearchInput }',\n                mediaGalleryListingFilters: '${ $.mediaGalleryListingFilters }',\n                listingPaging: '${ $.listingPaging }'\n            },\n            imports: {\n                imageItems: '${ $.mediaGalleryProvider }:data.items'\n            }\n        },\n\n        /**\n         * Init observable variables\n         *\n         * @return {Object}\n         */\n        initObservable: function () {\n            this._super()\n                .observe([\n                    'imageItems',\n                    'messages'\n                ]);\n\n            return this;\n        },\n\n        /**\n         * Update displayed record data on data source update\n         */\n        updateActions: function () {\n            var displayedRecord = this.preview().displayedRecord(),\n                updatedDisplayedRecord = this.preview().displayedRecord(),\n                records = this.source().data.items,\n                index;\n\n            if (typeof displayedRecord.id === 'undefined') {\n                return;\n            }\n\n            for (index = 0; index < records.length; index++) {\n                if (records[index].id === displayedRecord.id) {\n                    updatedDisplayedRecord = records[index];\n                    break;\n                }\n            }\n\n            this.preview().displayedRecord(updatedDisplayedRecord);\n        },\n\n        /**\n         * Returns is_downloaded flag as observable for given record\n         *\n         * @returns {observable}\n         */\n        isDownloaded: function () {\n            return this.preview().displayedRecord()['is_downloaded'];\n        },\n\n        /**\n         * Is asset licensed in adobe stock in context of currently logged in account\n         *\n         * @returns {observable}\n         */\n        isLicensed: function () {\n            return this.overlay().licensed()[this.preview().displayedRecord().id] && !this.isLicensedLocally();\n        },\n\n        /**\n         * Is licensed version of asset saved locally\n         *\n         * @returns {observable}\n         */\n        isLicensedLocally: function () {\n            return this.preview().displayedRecord()['is_licensed_locally'];\n        },\n\n        /**\n         * Locate downloaded image in media browser\n         */\n        openInMediaGalleryClick: function () {\n            this.preview().getAdobeModal().trigger('closeModal');\n\n            if (!this.isMediaBrowser()) {\n                this.selectImageInNewMediaGalleryBySearch(this.preview().displayedRecord().id);\n            } else {\n                this.selectDisplayedImageForOldMediaGallery(this.preview().displayedRecord().path);\n            }\n        },\n\n        /**\n         * Return adobe stock asset by adobe id\n         *\n         * @param {String} adobeId\n         */\n        getAssetDetails: function (adobeId) {\n            return $.ajax({\n                url: this.getMediaGalleryAsset,\n                data: {\n                    'adobe_id': adobeId\n                },\n                context: this,\n                showLoader: true\n            });\n        },\n\n        /**\n         * Select image in new media gallery via search input\n         *\n         * @param {String} imageId\n         */\n        selectImageInNewMediaGalleryBySearch: function (imageId) {\n            var path;\n\n            this.mediaGalleryListingFilters().clear();\n            this.getAssetDetails(imageId).then(function (assetDetails) {\n                if (assetDetails.length === 0) {\n                    return;\n                }\n                this.mediaGallerySearchInput().apply(assetDetails.title);\n                path = assetDetails.path;\n                path = path.substring(0, path.lastIndexOf('/'));\n\n                if (path !== '') {\n                    this.imageDirectory().locateNode(path);\n                }\n                this.selectRecordFromMediaGalleryProvider(assetDetails.path);\n            }.bind(this));\n\n        },\n\n        /**\n         * Open recently saved image and go to first page\n         */\n        openNewestImage: function () {\n            this.listingPaging().goFirst();\n            this.mediaGallerySortBy().selectDefaultOption();\n        },\n\n        /**\n         * Selects displayed image in media gallery for old gallery\n         */\n        selectDisplayedImageForOldMediaGallery: function (path) {\n            var image = mediaGallery.locate(path);\n\n            image ? image.trigger('click') : mediaGallery.notLocated();\n        },\n\n        /**\n         * Select record by image file name\n         *\n         * @param {String} path\n         */\n        selectRecordFromMediaGalleryProvider: function (path) {\n            var subscription;\n\n            subscription = this.imageItems.subscribe(function (items) {\n                subscription.dispose();\n                items.each(function (item) {\n                    if (item.path === path) {\n                        this.selectRecord(item);\n\n                        return false;\n                    }\n                }.bind(this));\n            }.bind(this));\n\n            setTimeout(function () {\n                subscription.dispose();\n            }, 1500);\n        },\n\n        /**\n         * Set the record as selected\n         *\n         * @param {Object} record\n         */\n        selectRecord: function (record) {\n            uiRegistry.get('name =' + this.mediaGallery).select(record);\n        },\n\n        /**\n         * Save preview click handler\n         */\n        savePreviewClick: function () {\n            var record = this.preview().displayedRecord();\n\n            savePreviewAction(\n                this.preview().downloadImagePreviewUrl,\n                record.id,\n                record.title,\n                record['content_type'],\n                this.getDestinationDirectoryPath()\n            ).then(function (destinationPath) {\n                this.updateDownloadedDisplayedRecord(destinationPath);\n                this.reloadGrid().done(function () {\n                    this.openInMediaGalleryClick();\n                }.bind(this));\n            }.bind(this)).fail(function (error) {\n                if (error) {\n                    this.showErrorMessage(error);\n                }\n            }.bind(this));\n        },\n\n        /**\n         * Update displayed record after downloading\n         *\n         * @param {String} path\n         */\n        updateDownloadedDisplayedRecord: function (path) {\n            var record = this.preview().displayedRecord();\n\n            record['is_downloaded'] = 1;\n\n            if (record.path === '') {\n                record.path = path;\n            }\n\n            this.preview().displayedRecord(record);\n        },\n\n        /**\n         * Update displayed record after licensing\n         *\n         * @param {String} path\n         */\n        updateLicensedDisplayedRecord: function (path) {\n            var record = this.preview().displayedRecord();\n\n            record['is_downloaded'] = 1;\n\n            if (record.path === '') {\n                record.path = path;\n            }\n\n            record['is_licensed'] = 1;\n            record['is_licensed_locally'] = 1;\n\n            this.preview().displayedRecord(record);\n        },\n\n        /**\n         * Get image destination path\n         *\n         * @param {String} fileName\n         * @param {String} contentType\n         * @returns {String}\n         */\n        getDestinationPath: function (fileName, contentType) {\n            return this.getDestinationDirectoryPath() + '/' + fileName + '.' + this.getImageExtension(contentType);\n        },\n\n        /**\n         * Get destination directory path\n         *\n         * @returns {String}\n         */\n        getDestinationDirectoryPath: function () {\n            var activeNodePath,\n                activeNode;\n\n            if (this.isMediaBrowser()) {\n                activeNode = this.getMageMediaBrowserData().activeNode;\n\n                activeNodePath = _.isUndefined(activeNode.original.path) ? '' : activeNode.original.path;\n            } else {\n                activeNodePath = this.imageDirectory().activeNode() || '';\n            }\n\n            return activeNodePath;\n        },\n\n        /**\n         * Reload grid\n         *\n         * @returns {*}\n         */\n        reloadGrid: function () {\n            var provider,\n                dataStorage;\n\n            if (this.isMediaBrowser()) {\n                return this.getMageMediaBrowserData().reload();\n            }\n\n            provider = uiRegistry.get('index = media_gallery_listing_data_source'),\n                dataStorage = provider.storage();\n\n            dataStorage.clearRequests();\n\n            return provider.reload();\n        },\n\n        /**\n         * Get data for media browser\n         *\n         * @returns {Undefined|Object}\n         */\n        getMageMediaBrowserData: function () {\n            return $(this.preview().mediaGallerySelector).data('mageMediabrowser');\n        },\n\n        /**\n         * Is the media browser used in the content of the grid\n         *\n         * @returns {Boolean}\n         */\n        isMediaBrowser: function () {\n            return typeof this.getMageMediaBrowserData() !== 'undefined';\n        },\n\n        /**\n         * Generate meaningful name image file,\n         * allow only alphanumerics, dashes, and underscores\n         *\n         * @param {String} title\n         * @param {Number} id\n         * @return string\n         */\n        generateImageName: function (title, id) {\n            var fileName = title.substring(0, 32)\n                .replace(/[^a-zA-Z0-9_]/g, '-')\n                .replace(/-{2,}/g, '-')\n                .toLowerCase();\n\n            /* If the filename does not contain latin chars, use ID as a filename */\n            return fileName === '-' ? id : fileName;\n        },\n\n        /**\n         * Get image file extension\n         *\n         * @param {String} contentType\n         * @return string\n         */\n        getImageExtension: function (contentType) {\n            return contentType.match(/[^/]{1,4}$/);\n        },\n\n        /**\n         * Get messages\n         *\n         * @return {Array}\n         */\n        getMessages: function () {\n            return this.messages();\n        },\n\n        /**\n         * License click handler\n         */\n        licenseClick: function () {\n            var record = this.preview().displayedRecord();\n\n            this.licenseProcess(\n                record.id,\n                record.title,\n                record.path,\n                record['content_type'],\n                this.isDownloaded()\n            ).then(function (destinationPath) {\n                this.updateLicensedDisplayedRecord(destinationPath);\n                this.login().getUserQuota();\n                this.reloadGrid().done(function () {\n                    this.openInMediaGalleryClick();\n                }.bind(this));\n            }.bind(this)).fail(function (error) {\n                if (error) {\n                    uiAlert({\n                        content: error\n                    });\n                }\n            });\n        },\n\n        /**\n         * Process of license\n         *\n         * @param {Number} id\n         * @param {String} title\n         * @param {String} path\n         * @param {String} contentType\n         * @param {Boolean} isDownloaded\n         * @return {window.Promise}\n         */\n        licenseProcess: function (id, title, path, contentType, isDownloaded) {\n            var deferred = $.Deferred();\n\n            this.login().login()\n                .then(function () {\n                    getLicenseStatus(\n                        this.overlay().getImagesUrl,\n                        [id]\n                    ).then(function (licensedInfo) {\n                        var isLicensed = licensedInfo[id] || false;\n\n                        if (isLicensed) {\n                            saveLicensedAction(\n                                this.preview().saveLicensedAndDownloadUrl,\n                                id,\n                                title,\n                                path,\n                                contentType,\n                                this.getDestinationDirectoryPath()\n                            ).then(function (destinationPath) {\n                                deferred.resolve(destinationPath);\n                            }).fail(function (error) {\n                                deferred.reject(error);\n                            });\n                        } else {\n                            confirmQuotaAction(this.preview().confirmationUrl, id).then(function (data) {\n                                if (data.canLicense === false) {\n                                    buyCreditsConfirmation(\n                                        this.preview().buyCreditsUrl,\n                                        title,\n                                        data.message\n                                    );\n                                } else {\n                                    licenseAndSaveAction(\n                                        this.preview().licenseAndDownloadUrl,\n                                        id,\n                                        title,\n                                        path,\n                                        contentType,\n                                        isDownloaded,\n                                        data.message,\n                                        this.getDestinationDirectoryPath()\n                                    ).then(function (destinationPath) {\n                                        deferred.resolve(destinationPath);\n                                    }).fail(function (error) {\n                                        deferred.reject(error);\n                                    });\n                                }\n                            }.bind(this)).fail(function (error) {\n                                deferred.reject(error);\n                            });\n                        }\n                    }.bind(this)).fail(function (error) {\n                        deferred.reject(error);\n                    });\n                }.bind(this)).fail(function (error) {\n                deferred.reject(error);\n            });\n\n            return deferred.promise();\n        },\n\n        /**\n         * Save licensed click handler\n         */\n        saveLicensedClick: function () {\n            var record = this.preview().displayedRecord();\n\n            if (!this.login().user().isAuthorized) {\n                return;\n            }\n\n            if (!this.isLicensed()) {\n                return;\n            }\n\n            saveLicensedAction(\n                this.preview().saveLicensedAndDownloadUrl,\n                record.id,\n                record.title,\n                record.path,\n                record['content_type'],\n                this.getDestinationDirectoryPath()\n            ).then(function (destinationPath) {\n                this.updateLicensedDisplayedRecord(destinationPath);\n                this.login().getUserQuota();\n                this.reloadGrid().done(function () {\n                    this.openInMediaGalleryClick();\n                }.bind(this));\n            }.bind(this)).fail(function (error) {\n                if (error) {\n                    uiAlert({\n                        content: error\n                    });\n                }\n            });\n        },\n\n        /**\n         * Returns license button title depending on the existing saved preview\n         *\n         * @returns {String}\n         */\n        getLicenseButtonTitle: function () {\n            return this.isDownloaded() ? $.mage.__('License') : $.mage.__('License and Save');\n        },\n\n        /**\n         * Extracts image name from its path\n         *\n         * @param {String} path\n         * @returns {String}\n         */\n        getImageNameFromPath: function (path) {\n            var filePathArray = path.split('/'),\n                imageIndex = filePathArray.length - 1;\n\n            return filePathArray[imageIndex].substring(0, filePathArray[imageIndex].lastIndexOf('.'));\n        },\n\n        /**\n         * Show error message and schedule cleanup\n         *\n         * @param {String} message\n         */\n        showErrorMessage: function (message) {\n            this.messages.push({\n                code: 'error',\n                messageUnsanitizedHtml: message\n            });\n            this.messagesCleanup();\n        },\n\n        /**\n         * Messages cleanup\n         */\n        messagesCleanup: function () {\n            // eslint-disable-next-line no-unused-vars\n            var timerId;\n\n            // eslint-disable-next-line no-unused-vars\n            timerId = setTimeout(function () {\n                clearTimeout(timerId);\n                this.messages.removeAll();\n            }.bind(this), Number(this.messageDelay) * 1000);\n        }\n    });\n});\n","Magento_AdobeStockImageAdminUi/js/confirmation/license.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/prompt',\n    'text!Magento_AdobeStockImageAdminUi/template/modal/adobe-modal-prompt-content.html'\n], function ($, prompt, adobePromptContentTmpl) {\n    'use strict';\n\n    return function (recordTitle, quotaMessage, isPreviewDownloaded, proposedfileName, fileExtension) {\n        var confirmationContent = $.mage.__('License \"' + recordTitle + '\"'),\n            deferred = $.Deferred(),\n            displayFieldName = !isPreviewDownloaded ? '<b>' + $.mage.__('File Name') + '</b>' : '',\n            content = '<p>' + confirmationContent + '</p><p><b>' + quotaMessage + '</b></p><br>' + displayFieldName,\n            data = {\n                'title': $.mage.__('License Adobe Stock Images?'),\n                'content': content,\n                'visible': !isPreviewDownloaded,\n                'actions': {\n                    /**\n                     * Confirm action\n                     *\n                     * @param {String} fileName\n                     */\n                    confirm: function (fileName) {\n                        deferred.resolve(fileName);\n                    }\n                },\n                'buttons': [{\n                    text: $.mage.__('Cancel'),\n                    class: 'action-secondary action-dismiss',\n\n                    /**\n                     * Close modal\n                     */\n                    click: function () {\n                        this.closeModal();\n                        deferred.reject();\n                    }\n                }, {\n                    text: $.mage.__('Confirm'),\n                    class: 'action-primary action-accept'\n                }]\n\n            };\n\n        prompt({\n            title: data.title,\n            content:  data.content,\n            value: proposedfileName,\n            imageExtension: fileExtension,\n            visible: data.visible,\n            promptContentTmpl: adobePromptContentTmpl,\n            modalClass: 'adobe-stock-save-preview-prompt',\n            validation: true,\n            promptField: '[data-role=\"adobe-stock-image-name-field\"]',\n            validationRules: ['required-entry', 'validate-image-name'],\n            attributesForm: {\n                novalidate: 'novalidate',\n                action: '',\n                onkeydown: 'return event.key != \\'Enter\\';'\n            },\n            attributesField: {\n                name: 'name',\n                'data-validate': '{required:true}',\n                maxlength: '128'\n            },\n            context: this,\n            actions: data.actions,\n            buttons: data.buttons\n        });\n\n        if (!data.visible) {\n            $('.adobe-stock-save-preview-prompt').trigger('focus');\n        }\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/confirmation/save.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/prompt',\n    'text!Magento_AdobeStockImageAdminUi/template/modal/adobe-modal-prompt-content.html'\n], function ($, prompt, adobePromptContentTmpl) {\n    'use strict';\n\n    return function (proposedfileName, fileExtension) {\n        var deferred = $.Deferred(),\n            data = {\n                'title': $.mage.__('Save Preview'),\n                'content': $.mage.__('File Name'),\n                'visible': true,\n                'actions': {\n                    /**\n                     * Resolve with the specified file name\n                     *\n                     * @param {String} specifiedFileName\n                     */\n                    confirm: function (specifiedFileName) {\n                        deferred.resolve(specifiedFileName);\n                    }\n                },\n                'buttons': [{\n                    text: $.mage.__('Cancel'),\n                    class: 'action-secondary action-dismiss',\n\n                    /**\n                     * Close modal on button click\n                     */\n                    click: function () {\n                        this.closeModal();\n                        deferred.reject();\n                    }\n                }, {\n                    text: $.mage.__('Confirm'),\n                    class: 'action-primary action-accept'\n                }]\n\n            };\n\n        prompt({\n            title: data.title,\n            content:  data.content,\n            value: proposedfileName,\n            imageExtension: fileExtension,\n            visible: data.visible,\n            promptContentTmpl: adobePromptContentTmpl,\n            modalClass: 'adobe-stock-save-preview-prompt',\n            validation: true,\n            promptField: '[data-role=\"adobe-stock-image-name-field\"]',\n            validationRules: ['required-entry', 'validate-image-name'],\n            attributesForm: {\n                novalidate: 'novalidate',\n                action: '',\n                onkeydown: 'return event.key != \\'Enter\\';'\n            },\n            attributesField: {\n                name: 'name',\n                'data-validate': '{required:true}',\n                maxlength: '128'\n            },\n            context: this,\n            actions: data.actions,\n            buttons: data.buttons\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/confirmation/buyCredits.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/confirm'\n], function ($, confirm) {\n    'use strict';\n\n    return function (buyCreditsUrl, recordTitle, quotaMessage) {\n        var confirmationContent = $.mage.__('License \"' + recordTitle + '\"'),\n            content = '<p>' + confirmationContent + '</p><p><b>' + quotaMessage + '</b></p><br>';\n\n        confirm({\n            title: $.mage.__('License Adobe Stock Images?'),\n            content: content,\n            buttons: [{\n                text: $.mage.__('Cancel'),\n                class: 'action-secondary action-dismiss',\n\n                /**\n                 * Close modal\n                 */\n                click: function () {\n                    this.closeModal();\n                }\n            },{\n                text: $.mage.__('Buy Credits'),\n                class: 'action-primary action-accept',\n\n                /**\n                 * Close modal\n                 */\n                click: function () {\n                    window.open(buyCreditsUrl);\n                    this.closeModal();\n                }\n            }]\n        });\n    };\n});\n","Magento_AdobeStockImageAdminUi/js/confirmation/saveLicensed.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/prompt',\n    'text!Magento_AdobeStockImageAdminUi/template/modal/adobe-modal-prompt-content.html'\n], function ($, prompt, adobePromptContentTmpl) {\n    'use strict';\n\n    return function (proposedfileName, fileExtension) {\n        var deferred = $.Deferred(),\n            data = {\n                'title': $.mage.__('Save'),\n                'content': $.mage.__('File Name'),\n                'visible': true,\n                'actions': {\n                    /**\n                     * Resolve with the specified file name\n                     *\n                     * @param {String} fileName\n                     */\n                    confirm: function (fileName) {\n                        deferred.resolve(fileName);\n                    }\n                },\n                'buttons': [\n                    {\n                        text: $.mage.__('Cancel'),\n                        class: 'action-secondary action-dismiss',\n\n                        /**\n                         * Close modal on button click\n                         */\n                        click: function () {\n                            this.closeModal();\n                            deferred.reject();\n                        }\n                    },\n                    {\n                        text: $.mage.__('Confirm'),\n                        class: 'action-primary action-accept'\n                    }\n                ]\n            };\n\n        prompt({\n            title: data.title,\n            content:  data.content,\n            value: proposedfileName,\n            imageExtension: fileExtension,\n            visible: data.visible,\n            promptContentTmpl: adobePromptContentTmpl,\n            modalClass: 'adobe-stock-save-preview-prompt',\n            validation: true,\n            promptField: '[data-role=\"adobe-stock-image-name-field\"]',\n            validationRules: ['required-entry', 'validate-image-name'],\n            attributesForm: {\n                novalidate: 'novalidate',\n                action: '',\n                onkeydown: 'return event.key != \\'Enter\\';'\n            },\n            attributesField: {\n                name: 'name',\n                'data-validate': '{required:true}',\n                maxlength: '128'\n            },\n            context: this,\n            actions: data.actions,\n            buttons: data.buttons\n        });\n\n        return deferred.promise();\n    };\n});\n","Magento_ProductVideo/js/get-video-information.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/alert',\n    'jquery/ui',\n    'mage/translate'\n], function ($, alert) {\n        'use strict';\n\n        var videoRegister = {\n            _register: {},\n\n            /**\n             * Checks, if api is already registered\n             *\n             * @param {String} api\n             * @returns {bool}\n             */\n            isRegistered: function (api) {\n                return this._register[api] !== undefined;\n            },\n\n            /**\n             * Checks, if api is loaded\n             *\n             * @param {String} api\n             * @returns {bool}\n             */\n            isLoaded: function (api) {\n                return this._register[api] !== undefined && this._register[api] === true;\n            },\n\n            /**\n             * Register new video api\n             * @param {String} api\n             * @param {bool} loaded\n             */\n            register: function (api, loaded) {\n                loaded = loaded || false;\n                this._register[api] = loaded;\n            }\n        };\n\n        $.widget('mage.productVideoLoader', {\n\n            /**\n             * @private\n             */\n            _create: function () {\n                switch (this.element.data('type')) {\n                    case 'youtube':\n                        this.element.videoYoutube();\n                        this._player = this.element.data('mageVideoYoutube');\n                        break;\n\n                    case 'vimeo':\n                        this.element.videoVimeo();\n                        this._player = this.element.data('mageVideoVimeo');\n                        break;\n                    default:\n                        throw {\n                            name: $.mage.__('Video Error'),\n                            message: $.mage.__('Unknown video type'),\n\n                            /**\n                             * Return string\n                             */\n                            toString: function () {\n                                return this.name + ': ' + this.message;\n                            }\n                        };\n                }\n            },\n\n            /**\n             * Initializes variables\n             * @private\n             */\n            _initialize: function () {\n                this._params = this.element.data('params') || {};\n                this._code = this.element.data('code');\n                this._width = this.element.data('width');\n                this._height = this.element.data('height');\n                this._autoplay = !!this.element.data('autoplay');\n                this._playing = this._autoplay || false;\n                this.useYoutubeNocookie = this.element.data('youtubenocookie') || false;\n\n                this._responsive = this.element.data('responsive') !== false;\n\n                if (this._responsive === true) {\n                    this.element.addClass('responsive');\n                }\n\n                this._calculateRatio();\n            },\n\n            /**\n             * Abstract play command\n             */\n            play: function () {\n                this._player.play();\n            },\n\n            /**\n             * Abstract pause command\n             */\n            pause: function () {\n                this._player.pause();\n            },\n\n            /**\n             * Abstract stop command\n             */\n            stop: function () {\n                this._player.stop();\n            },\n\n            /**\n             * Abstract playing command\n             */\n            playing: function () {\n                return this._player.playing();\n            },\n\n            /**\n             * Abstract destroying command\n             */\n            destroy: function () {\n                if (this._player) {\n                    this._player.destroy();\n                }\n            },\n\n            /**\n             * Calculates ratio for responsive videos\n             * @private\n             */\n            _calculateRatio: function () {\n                if (!this._responsive) {\n                    return;\n                }\n                this.element.css('paddingBottom', this._height / this._width * 100 + '%');\n            }\n        });\n\n        $.widget('mage.videoYoutube', $.mage.productVideoLoader, {\n\n            /**\n             * Initialization of the Youtube widget\n             * @private\n             */\n            _create: function () {\n                var self = this;\n\n                this._initialize();\n\n                this.element.append('<div></div>');\n\n                this._on(window, {\n\n                    /**\n                     * Youtube state check\n                     * @private\n                     */\n                    'youtubeapiready': function () {\n                        var host = 'https://www.youtube.com';\n\n                        if (self.useYoutubeNocookie) {\n                            host = 'https://www.youtube-nocookie.com';\n                        }\n\n                        if (self._player !== undefined) {\n                            return;\n                        }\n\n                        if (self._autoplay) {\n                            self._params.autoplay = 1;\n                        }\n                        self._params.rel = 0;\n\n                        self._player = new window.YT.Player(self.element.children(':first')[0], {\n                            height: self._height,\n                            width: self._width,\n                            videoId: self._code,\n                            playerVars: self._params,\n                            host: host,\n                            events: {\n\n                                /**\n                                 * @private\n                                 */\n                                'onReady': function onPlayerReady() {\n                                    self._player.getDuration();\n                                },\n\n                                /**\n                                 * State change flag init\n                                 */\n                                onStateChange: function (data) {\n                                    switch (window.parseInt(data.data, 10)) {\n                                        case 1:\n                                            self._playing = true;\n                                            break;\n                                        default:\n                                            self._playing = false;\n                                            break;\n                                    }\n\n                                    self._trigger('statechange', {}, data);\n                                }\n                            }\n\n                        });\n                    }\n                });\n\n                this._loadApi();\n            },\n\n            /**\n             * Loads Youtube API and triggers event, when loaded\n             * @private\n             */\n            _loadApi: function () {\n                var element,\n                    scriptTag;\n\n                if (videoRegister.isRegistered('youtube')) {\n                    if (videoRegister.isLoaded('youtube')) {\n                        $(window).trigger('youtubeapiready');\n                    }\n\n                    return;\n                }\n                videoRegister.register('youtube');\n\n                element = document.createElement('script');\n                scriptTag = document.getElementsByTagName('script')[0];\n\n                element.async = true;\n                element.src = 'https://www.youtube.com/iframe_api';\n                scriptTag.parentNode.insertBefore(element, scriptTag);\n\n                /**\n                 * Trigger youtube api ready event\n                 */\n                window.onYouTubeIframeAPIReady = function () {\n                    $(window).trigger('youtubeapiready');\n                    videoRegister.register('youtube', true);\n                };\n            },\n\n            /**\n             * Play command for Youtube\n             */\n            play: function () {\n                this._player.playVideo();\n                this._playing = true;\n            },\n\n            /**\n             * Pause command for Youtube\n             */\n            pause: function () {\n                this._player.pauseVideo();\n                this._playing = false;\n            },\n\n            /**\n             * Stop command for Youtube\n             */\n            stop: function () {\n                this._player.stopVideo();\n                this._playing = false;\n            },\n\n            /**\n             * Playing command for Youtube\n             */\n            playing: function () {\n                return this._playing;\n            },\n\n            /**\n             * stops and unloads player\n             * @private\n             */\n            destroy: function () {\n                if (this._player) {\n                    this.stop();\n                    this._player.destroy();\n                    this._player = undefined;\n                }\n            }\n        });\n\n        $.widget('mage.videoVimeo', $.mage.productVideoLoader, {\n\n            /**\n             * Initialize the Vimeo widget\n             * @private\n             */\n            _create: function () {\n                var timestamp,\n                    src,\n                    additionalParams;\n\n                this._initialize();\n                timestamp = new Date().getTime();\n\n                if (this._autoplay) {\n                    additionalParams += '&autoplay=1';\n                }\n\n                src = 'https://player.vimeo.com/video/' +\n                    this._code + '?api=1&player_id=vimeo' +\n                    this._code +\n                    timestamp +\n                    additionalParams;\n                this.element.append(\n                    $('<iframe></iframe>')\n                        .attr('frameborder', 0)\n                        .attr('id', 'vimeo' + this._code + timestamp)\n                        .attr('width', this._width)\n                        .attr('height', this._height)\n                        .attr('src', src)\n                );\n\n            }\n        });\n\n        $.widget('mage.videoData', {\n            options: {\n                youtubeKey: '',\n                eventSource: '' //where is data going from - focus out or click on button\n            },\n\n            _REQUEST_VIDEO_INFORMATION_TRIGGER: 'request_video_information',\n\n            _UPDATE_VIDEO_INFORMATION_TRIGGER: 'updated_video_information',\n\n            _START_UPDATE_INFORMATION_TRIGGER: 'update_video_information',\n\n            _ERROR_UPDATE_INFORMATION_TRIGGER: 'error_updated_information',\n\n            _FINISH_UPDATE_INFORMATION_TRIGGER: 'finish_update_information',\n\n            _VIDEO_URL_VALIDATE_TRIGGER: 'validate_video_url',\n\n            _videoInformation: null,\n\n            _currentVideoUrl: null,\n\n            /**\n             * @private\n             */\n            _init: function () {\n                this.element.on(this._START_UPDATE_INFORMATION_TRIGGER, $.proxy(this._onRequestHandler, this));\n                this.element.on(this._ERROR_UPDATE_INFORMATION_TRIGGER, $.proxy(this._onVideoInvalid, this));\n                this.element.on(this._FINISH_UPDATE_INFORMATION_TRIGGER, $.proxy(\n                    function () {\n                        this._currentVideoUrl = null;\n                    }, this\n                ));\n                this.element.on(this._VIDEO_URL_VALIDATE_TRIGGER, $.proxy(this._onUrlValidateHandler, this));\n            },\n\n            /**\n             * @private\n             */\n            _onUrlValidateHandler: function (event, callback, forceVideo) {\n                var url = this.element.val(),\n                    videoInfo;\n\n                videoInfo = this._validateURL(url, forceVideo);\n\n                if (videoInfo) {\n                    callback();\n                } else {\n                    this._onRequestError($.mage.__('Invalid video url'));\n                }\n            },\n\n            /**\n             * @private\n             */\n            _onRequestHandler: function () {\n                var url = this.element.val(),\n                    self = this,\n                    videoInfo,\n                    type,\n                    id,\n                    googleapisUrl;\n\n                if (this._currentVideoUrl === url) {\n                    return;\n                }\n\n                this._currentVideoUrl = url;\n\n                this.element.trigger(this._REQUEST_VIDEO_INFORMATION_TRIGGER, {\n                    url: url\n                });\n\n                if (!url) {\n                    return;\n                }\n\n                videoInfo = this._validateURL(url);\n\n                if (!videoInfo) {\n                    this._onRequestError($.mage.__('Invalid video url'));\n\n                    return;\n                }\n\n                /**\n                 *\n                 * @param {Object} data\n                 * @private\n                 */\n                function _onYouTubeLoaded(data) {\n                    var tmp,\n                        uploadedFormatted,\n                        respData,\n                        createErrorMessage;\n\n                    /**\n                     * Create errors message\n                     *\n                     * @returns {String}\n                     */\n                    createErrorMessage = function () {\n                        var error = data.error,\n                            errors = error.errors,\n                            i,\n                            errLength = errors.length,\n                            tmpError,\n                            errReason,\n                            errorsMessage = [];\n\n                        for (i = 0; i < errLength; i++) {\n                            tmpError = errors[i];\n                            errReason = tmpError.reason;\n\n                            if (['keyInvalid'].indexOf(errReason) !== -1) {\n                                errorsMessage.push($.mage.__('Youtube API key is invalid'));\n\n                                break;\n                            }\n\n                            errorsMessage.push(tmpError.message);\n                        }\n\n                        return $.mage.__('Video cant be shown due to the following reason: ') +\n                            $.unique(errorsMessage).join(', ');\n                    };\n\n                    if (data.error && [400, 402, 403].indexOf(data.error.code) !== -1) {\n                        this._onRequestError(createErrorMessage());\n\n                        return;\n                    }\n\n                    if (!data.items || data.items.length < 1) {\n                        this._onRequestError($.mage.__('Video not found'));\n\n                        return;\n                    }\n\n                    tmp = data.items[0];\n                    uploadedFormatted = tmp.snippet.publishedAt.replace('T', ' ').replace(/\\..+/g, '');\n                    respData = {\n                        duration: this._formatYoutubeDuration(tmp.contentDetails.duration),\n                        channel: tmp.snippet.channelTitle,\n                        channelId: tmp.snippet.channelId,\n                        uploaded: uploadedFormatted,\n                        title: tmp.snippet.localized.title,\n                        description: tmp.snippet.description,\n                        thumbnail: tmp.snippet.thumbnails.high.url,\n                        videoId: videoInfo.id,\n                        videoProvider: videoInfo.type,\n                        useYoutubeNocookie: videoInfo.useYoutubeNocookie\n                    };\n                    this._videoInformation = respData;\n                    this.element.trigger(this._UPDATE_VIDEO_INFORMATION_TRIGGER, respData);\n                    this.element.trigger(this._FINISH_UPDATE_INFORMATION_TRIGGER, true);\n                }\n\n                /**\n                 * @private\n                 */\n                function _onVimeoLoaded(data) {\n                    var tmp,\n                        respData,\n                        videoDescription = '';\n\n                    if (!data) {\n                        this._onRequestError($.mage.__('Video not found'));\n\n                        return null;\n                    }\n                    tmp = data;\n\n                    if (tmp.description !== null) {\n                        videoDescription = tmp.description;\n                    }\n\n                    if (tmp.duration == null) {\n                        this._onRequestError(\n                            $.mage.__('Because of its privacy settings, this video cannot be played here.')\n                        );\n                    } else {\n                        respData = {\n                            duration: this._formatVimeoDuration(tmp.duration),\n                            channel: tmp['author_name'],\n                            channelId: tmp['author_url'],\n                            uploaded: tmp['upload_date'],\n                            title: tmp.title,\n                            description: videoDescription.replace(/(&nbsp;|<([^>]+)>)/ig, ''),\n                            thumbnail: tmp['thumbnail_url'],\n                            videoId: videoInfo.id,\n                            videoProvider: videoInfo.type\n                        };\n                        this._videoInformation = respData;\n                        this.element.trigger(this._UPDATE_VIDEO_INFORMATION_TRIGGER, respData);\n                        this.element.trigger(this._FINISH_UPDATE_INFORMATION_TRIGGER, true);\n                    }\n                }\n\n                type = videoInfo.type;\n                id = videoInfo.id;\n\n                if (type === 'youtube') {\n                    googleapisUrl = 'https://www.googleapis.com/youtube/v3/videos?id=' +\n                        id +\n                        '&part=snippet,contentDetails&key=' +\n                        this.options.youtubeKey + '&alt=json&callback=?';\n                    $.getJSON(googleapisUrl,\n                        {\n                            format: 'json'\n                        },\n                        $.proxy(_onYouTubeLoaded, self)\n                    ).fail(\n                        function () {\n                            self._onRequestError('Video not found');\n                        }\n                    );\n                } else if (type === 'vimeo') {\n                    $.ajax({\n                        url: 'https://vimeo.com/api/oembed.json',\n                        dataType: 'jsonp',\n                        data: {\n                            format: 'json',\n                            url: 'https://vimeo.com/' + id\n                        },\n                        timeout: 5000,\n                        success:  $.proxy(_onVimeoLoaded, self),\n\n                        /**\n                         * @private\n                         */\n                        error: function () {\n                            self._onRequestError($.mage.__('Video not found'));\n                        }\n                    });\n                }\n            },\n\n            /**\n             * @private\n             */\n            _onVideoInvalid: function (event, data) {\n                this._videoInformation = null;\n                this.element.val('');\n                alert({\n                    content: 'Error: \"' + data + '\"'\n                });\n            },\n\n            /**\n             * @private\n             */\n            _onRequestError: function (error) {\n                this.element.trigger(this._ERROR_UPDATE_INFORMATION_TRIGGER, error);\n                this.element.trigger(this._FINISH_UPDATE_INFORMATION_TRIGGER, false);\n                this._currentVideoUrl = null;\n            },\n\n            /**\n             * @private\n             */\n            _formatYoutubeDuration: function (duration) {\n                var match = duration.match(/PT(\\d+H)?(\\d+M)?(\\d+S)?/),\n                    hours = parseInt(match[1], 10) || 0,\n                    minutes = parseInt(match[2], 10) || 0,\n                    seconds = parseInt(match[3], 10) || 0;\n\n                return this._formatVimeoDuration(hours * 3600 + minutes * 60 + seconds);\n            },\n\n            /**\n             * @private\n             */\n            _formatVimeoDuration: function (seconds) {\n                return new Date(seconds * 1000).toUTCString().match(/(\\d\\d:\\d\\d:\\d\\d)/)[0];\n            },\n\n            /**\n             * @private\n             */\n            _parseHref: function (href) {\n                var a = document.createElement('a');\n\n                a.href = href;\n\n                return a;\n            },\n\n            /**\n             * @private\n             */\n            _validateURL: function (href, forceVideo) {\n                var id,\n                    type,\n                    ampersandPosition,\n                    vimeoRegex,\n                    useYoutubeNocookie = false;\n\n                if (typeof href !== 'string') {\n                    return href;\n                }\n                href = this._parseHref(href);\n\n                if (href.host.match(/youtube\\.com/) && href.search) {\n\n                    id = href.search.split('v=')[1];\n\n                    if (id) {\n                        ampersandPosition = id.indexOf('&');\n                        type = 'youtube';\n                    }\n\n                    if (id && ampersandPosition !== -1) {\n                        id = id.substring(0, ampersandPosition);\n                    }\n\n                } else if (href.host.match(/youtube\\.com|youtu\\.be|youtube-nocookie.com/)) {\n                    id = href.pathname.replace(/^\\/(embed\\/|v\\/)?/, '').replace(/\\/.*/, '');\n                    type = 'youtube';\n\n                    if (href.host.match(/youtube-nocookie.com/)) {\n                        useYoutubeNocookie = true;\n                    }\n                } else if (href.host.match(/vimeo\\.com/)) {\n                    type = 'vimeo';\n                    vimeoRegex = new RegExp(['https?:\\\\/\\\\/(?:www\\\\.|player\\\\.)?vimeo.com\\\\/(?:channels\\\\/(?:\\\\w+\\\\/)',\n                        '?|groups\\\\/([^\\\\/]*)\\\\/videos\\\\/|album\\\\/(\\\\d+)\\\\/video\\\\/|video\\\\/|)(\\\\d+)(?:$|\\\\/|\\\\?)'\n                    ].join(''));\n\n                    if (href.href.match(vimeoRegex) != null) {\n                        id = href.href.match(vimeoRegex)[3];\n                    }\n                }\n\n                if ((!id || !type) && forceVideo) {\n                    id = href.href;\n                    type = 'custom';\n                }\n\n                return id ? {\n                    id: id, type: type, s: href.search.replace(/^\\?/, ''), useYoutubeNocookie: useYoutubeNocookie\n                } : false;\n            }\n        });\n    });\n","Magento_ProductVideo/js/video-modal.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'productGallery',\n    'jquery/ui',\n    'Magento_Ui/js/modal/modal',\n    'mage/translate',\n    'mage/backend/tree-suggest',\n    'mage/backend/validation',\n    'newVideoDialog'\n], function ($, productGallery) {\n    'use strict';\n\n    $.widget('mage.productGallery', productGallery, {\n\n        /**\n         * Bind events\n         * @private\n         */\n        _bind: function () {\n            var events = {},\n                itemId;\n\n            this._super();\n\n            /**\n             * Add item_id value to opened modal\n             * @param {Object} event\n             */\n            events['click ' + this.options.imageSelector] = function (event) {\n                if (!$(event.currentTarget).is('.ui-sortable-helper')) {\n                    itemId = $(event.currentTarget).find('input')[0].name.match(/\\[([^\\]]*)\\]/g)[2];\n                    this.videoDialog.find('#item_id').val(itemId);\n                }\n            };\n            this._on(events);\n            this.element.prev().find('[data-role=\"add-video-button\"]').on('click', this.showModal.bind(this));\n            this.element.on('openDialog', '.gallery.ui-sortable', $.proxy(this._onOpenDialog, this));\n        },\n\n        /**\n         * @private\n         */\n        _create: function () {\n            this._super();\n            this.videoDialog = this.element.find('#new-video');\n            this.videoDialog.mage('newVideoDialog', this.videoDialog.data('modalInfo'));\n        },\n\n        /**\n         * Open dialog for external video\n         * @private\n         */\n        _onOpenDialog: function (e, imageData) {\n\n            if (imageData['media_type'] !== 'external-video') {\n                this._superApply(arguments);\n            } else {\n                this.showModal();\n            }\n        },\n\n        /**\n         * Fired on trigger \"openModal\"\n         */\n        showModal: function () {\n            this.videoDialog.modal('openModal');\n        }\n    });\n\n    return $.mage.productGallery;\n});\n","Magento_ProductVideo/js/new-video-dialog.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'underscore',\n    'jquery/ui',\n    'Magento_Ui/js/modal/modal',\n    'mage/translate',\n    'mage/backend/tree-suggest',\n    'mage/backend/validation',\n    'Magento_ProductVideo/js/get-video-information'\n], function ($, _) {\n    'use strict';\n\n    $.widget('mage.createVideoPlayer', {\n        options: {\n            videoId: '',\n            videoProvider: '',\n            container: '.video-player-container',\n            videoClass: 'product-video',\n            reset: false,\n            useYoutubeNocookie: false,\n            metaData: {\n                DOM: {\n                    title: '.video-information.title span',\n                    uploaded: '.video-information.uploaded span',\n                    uploader: '.video-information.uploader span',\n                    duration: '.video-information.duration span',\n                    all: '.video-information span',\n                    wrapper: '.video-information'\n                },\n                data: {\n                    title: '',\n                    uploaded: '',\n                    uploader: '',\n                    uploaderUrl: '',\n                    duration: ''\n                }\n            }\n        },\n\n        _FINISH_CREATE_VIDEO_TRIGGER: 'finish_create_video',\n\n        _FINISH_UPDATE_VIDEO_TRIGGER: 'finish_update_video',\n\n        /**\n         * @private\n         */\n        _init: function () {\n            if (this.options.reset) {\n                this.reset();\n            } else {\n                this.update();\n            }\n\n            this.element.on('reset', $.proxy(this.reset, this));\n\n        },\n\n        /**\n         * @returns {Boolean}\n         */\n        update: function () {\n            var checkVideoID =\n                this.element.find(this.options.container).find('.' + this.options.videoClass).data('code'),\n            eventVideoData = {\n                oldVideoId: checkVideoID ? checkVideoID.toString() : checkVideoID,\n                newVideoId: this.options.videoId ? this.options.videoId.toString() : this.options.videoId\n            };\n\n            if (checkVideoID && checkVideoID !== this.options.videoId) {\n                this._doUpdate();\n                this.element.trigger(this._FINISH_UPDATE_VIDEO_TRIGGER, eventVideoData);\n            } else if (checkVideoID && checkVideoID === this.options.videoId) {\n                return false;\n            } else if (!checkVideoID) {\n                this._doUpdate();\n                this.element.trigger(this._FINISH_CREATE_VIDEO_TRIGGER, eventVideoData);\n            }\n\n        },\n\n        /**\n         * @private\n         */\n        _doUpdate: function () {\n            var uploaderLinkUrl,\n                uploaderLink;\n\n            this.reset();\n            this.element.find(this.options.container).append(\n                '<div class=\"' +\n                this.options.videoClass +\n                '\" data-type=\"' +\n                this.options.videoProvider +\n                '\" data-code=\"' +\n                this.options.videoId +\n                '\" data-youtubenocookie=\"' +\n                this.options.useYoutubeNocookie +\n                '\" data-width=\"100%\" data-height=\"100%\"></div>'\n            );\n            this.element.find(this.options.metaData.DOM.wrapper).show();\n            this.element.find(this.options.metaData.DOM.title).text(this.options.metaData.data.title);\n            this.element.find(this.options.metaData.DOM.uploaded).text(this.options.metaData.data.uploaded);\n            this.element.find(this.options.metaData.DOM.duration).text(this.options.metaData.data.duration);\n\n            if (this.options.videoProvider === 'youtube') {\n                uploaderLinkUrl = 'https://youtube.com/channel/' + this.options.metaData.data.uploaderUrl;\n            } else if (this.options.videoProvider === 'vimeo') {\n                uploaderLinkUrl = this.options.metaData.data.uploaderUrl;\n            }\n            uploaderLink = document.createElement('a');\n            uploaderLink.setAttribute('href', uploaderLinkUrl);\n            uploaderLink.setAttribute('target', '_blank');\n            uploaderLink.innerText = this.options.metaData.data.uploader;\n            this.element.find(this.options.metaData.DOM.uploader)[0].appendChild(uploaderLink);\n            this.element.find('.' + this.options.videoClass).productVideoLoader();\n\n        },\n\n        /**\n         * Reset\n         */\n        reset: function () {\n            this.element.find(this.options.container).find('.' + this.options.videoClass).remove();\n            this.element.find(this.options.metaData.DOM.wrapper).hide();\n            this.element.find(this.options.metaData.DOM.all).text('');\n\n        }\n    });\n\n    $.widget('mage.updateInputFields', {\n        options: {\n            reset: false,\n            DOM: {\n                urlField: 'input[name=\"video_url\"]',\n                titleField: 'input[name=\"video_title\"]',\n                fileField: '#file_name',\n                descriptionField: 'textarea[name=\"video_description\"]',\n                thumbnailLocation: '.field-new_video_screenshot_preview .admin__field-control'\n            },\n            data: {\n                url: '',\n                title: '',\n                description: '',\n                thumbnail: ''\n            }\n        },\n\n        /**\n         * @private\n         */\n        _init: function () {\n            if (this.options.reset) {\n                this.reset();\n            } else {\n                this.update();\n            }\n        },\n\n        /**\n         * Update\n         */\n        update: function () {\n            $(this.options.DOM.titleField).val(this.options.data.title);\n            $(this.options.DOM.descriptionField).val(this.options.data.description);\n        },\n\n        /**\n         * Reset\n         */\n        reset: function () {\n            $(this.options.DOM.fileField).val('');\n            $(this.options.DOM.urlField).val('');\n            $(this.options.DOM.titleField).val('');\n            $(this.options.DOM.descriptionField).val('');\n        }\n    });\n\n    /**\n     */\n    $.widget('mage.newVideoDialog', {\n\n        _previewImage: null,\n\n        clickedElement: '',\n\n        _images: {},\n\n        _imageTypes: [\n            '.jpeg',\n            '.pjpeg',\n            '.jpeg',\n            '.jpg',\n            '.pjpeg',\n            '.png',\n            '.gif'\n        ],\n\n        _imageProductGalleryWrapperSelector: '#image-container',\n\n        _videoPreviewInputSelector: '#new_video_screenshot',\n\n        _videoPreviewRemoteSelector: '',\n\n        _videoDisableinputSelector: '#new_video_disabled',\n\n        _videoPreviewImagePointer: '#new_video_screenshot_preview',\n\n        _videoFormSelector: '#new_video_form',\n\n        _itemIdSelector: '#item_id',\n\n        _videoUrlSelector: '[name=\"video_url\"]',\n\n        _videoImageFilenameselector: '#file_name',\n\n        _videoUrlWidget: null,\n\n        _videoInformationBtnSelector: '[name=\"new_video_get\"]',\n\n        _editVideoBtnSelector: '.image',\n\n        _deleteGalleryVideoSelector: '[data-role=delete-button]',\n\n        _deleteGalleryVideoSelectorBtn: null,\n\n        _videoInformationGetBtn: null,\n\n        _videoInformationGetUrlField: null,\n\n        _videoInformationGetEditBtn: null,\n\n        _isEditPage: false,\n\n        _onlyVideoPlayer: false,\n\n        _tempPreviewImageData: null,\n\n        _videoPlayerSelector: '.mage-new-video-dialog',\n\n        _videoRequestComplete: null,\n\n        _gallery: null,\n\n        /**\n         * Bind events\n         * @private\n         */\n        _bind: function () {\n            var events = {\n                'setImage': '_onSetImage'\n            };\n\n            this._on(events);\n\n            this._videoUrlWidget = this.element.find(this._videoUrlSelector).videoData({\n                youtubeKey: this.options.youTubeApiKey,\n                eventSource: 'focusout'\n            });\n\n            this._videoInformationGetBtn = this.element.find(this._videoInformationBtnSelector);\n            this._videoInformationGetUrlField = this.element.find(this._videoUrlSelector);\n            this._videoInformationGetEditBtn = this._gallery.find(this._editVideoBtnSelector);\n\n            this._videoInformationGetBtn.on('click', $.proxy(this._onGetVideoInformationClick, this));\n            this._videoInformationGetUrlField.on('focusout', $.proxy(this._onGetVideoInformationFocusOut, this));\n\n            this._videoUrlWidget.on('updated_video_information', $.proxy(this._onGetVideoInformationSuccess, this));\n            this._videoUrlWidget.on('error_updated_information', $.proxy(this._onGetVideoInformationError, this));\n            this._videoUrlWidget.on(\n                'request_video_information',\n                $.proxy(this._onGetVideoInformationStartRequest, this)\n            );\n        },\n\n        /**\n         * Fired when user click on button \"Get video information\"\n         * @private\n         */\n        _onGetVideoInformationClick: function () {\n            var videoForm = this.element.find(this._videoFormSelector);\n\n            videoForm.validation();\n\n            if (this.element.find(this._videoUrlSelector).valid()) {\n                this._onlyVideoPlayer = false;\n                this._isEditPage = false;\n                this._videoUrlWidget.trigger('update_video_information');\n            }\n        },\n\n        /**\n         * Fired when user do focus out from url field\n         * @private\n         */\n        _onGetVideoInformationFocusOut: function () {\n            this._videoUrlWidget.trigger('update_video_information');\n        },\n\n        /**\n         * @private\n         */\n        _onGetVideoInformationStartRequest: function () {\n            var videoForm = this.element.find(this._videoFormSelector);\n\n            try {\n                videoForm.validation('clearError');\n            } catch (e) {\n                // Do nothing\n            }\n\n            this._videoRequestComplete = false;\n        },\n\n        /**\n         * Fired when user click Edit Video button\n         * @private\n         */\n        _onGetVideoInformationEditClick: function () {\n            this._onlyVideoPlayer = true;\n            this._isEditPage = true;\n            this._videoUrlWidget.trigger('update_video_information');\n        },\n\n        /**\n         * Fired when successfully received information about the video.\n         * @param {Object} e\n         * @param {Object} data\n         * @private\n         */\n        _onGetVideoInformationSuccess: function (e, data) {\n            var self = this;\n\n            self.element.on('finish_update_video finish_create_video', $.proxy(function (element, playerData) {\n                if (!self._onlyVideoPlayer ||\n                    !self._isEditPage && playerData.oldVideoId !== playerData.newVideoId ||\n                    playerData.oldVideoId && playerData.oldVideoId !== playerData.newVideoId\n                ) {\n                    self.element.updateInputFields({\n                        reset: false,\n                        data: {\n                            title: data.title,\n                            description: data.description\n                        }\n                    });\n                    this._loadRemotePreview(data.thumbnail);\n                }\n                self._onlyVideoPlayer = true;\n            }, this))\n            .createVideoPlayer({\n                videoId: data.videoId,\n                videoProvider: data.videoProvider,\n                useYoutubeNocookie: data.useYoutubeNocookie,\n                reset: false,\n                metaData: {\n                    DOM: {\n                        title: '.video-information.title span',\n                        uploaded: '.video-information.uploaded span',\n                        uploader: '.video-information.uploader span',\n                        duration: '.video-information.duration span',\n                        all: '.video-information span',\n                        wrapper: '.video-information'\n                    },\n                    data: {\n                        title: data.title,\n                        uploaded: data.uploaded,\n                        uploader: data.channel,\n                        duration: data.duration,\n                        uploaderUrl: data.channelId\n                    }\n                }\n            })\n            .off('finish_update_video finish_create_video');\n\n            this._videoRequestComplete = true;\n        },\n\n        /**\n         * Load preview from youtube/vimeo\n         * @param {String} sourceUrl\n         * @private\n         */\n        _loadRemotePreview: function (sourceUrl) {\n            var url = this.options.saveRemoteVideoUrl,\n                self = this;\n\n            this._getPreviewImage().attr('src', sourceUrl).hide();\n            this._blockActionButtons(true, true);\n            $.ajax({\n                url: url,\n                data: 'remote_image=' + sourceUrl,\n                type: 'post',\n                success: $.proxy(function (result) {\n                    this._tempPreviewImageData = result;\n                    this._getPreviewImage().attr('src', sourceUrl).show();\n                    this._blockActionButtons(false, true);\n                }, self)\n            });\n        },\n\n        /**\n         * Fired when receiving information about the video ended with error\n         * @private\n         */\n        _onGetVideoInformationError: function () {\n        },\n\n        /**\n         * Remove \".tmp\"\n         * @param {String} name\n         * @returns {*}\n         * @private\n         */\n        __prepareFilename: function (name) {\n            var tmppost = '.tmp';\n\n            if (!name) {\n                return name;\n            }\n\n            if (name.endsWith(tmppost)) {\n                name = name.slice(0, name.length - tmppost.length);\n            }\n\n            return name;\n        },\n\n        /**\n         * Set image data\n         * @param {String} file\n         * @param {Object} imageData\n         * @private\n         */\n        _setImage: function (file, imageData) {\n            file = this.__prepareFilename(file);\n            this._images[file] = imageData;\n            this._gallery.trigger('addItem', imageData);\n            this.element.trigger('setImage', imageData);\n            this._addVideoClass(imageData.url);\n        },\n\n        /**\n         * Get image data\n         *\n         * @param {String} file\n         * @returns {*}\n         * @private\n         */\n        _getImage: function (file) {\n            file = this.__prepareFilename(file);\n\n            return this._images[file];\n        },\n\n        /**\n         * Replace image (update)\n         * @param {String} oldFile\n         * @param {String} newFile\n         * @param {Object} imageData\n         * @private\n         */\n        _replaceImage: function (oldFile, newFile, imageData) {\n            var tmpNewFile = newFile,\n                tmpOldImage,\n                newImageId,\n                oldNewFilePosition,\n                fc,\n                suff,\n                searchsuff,\n                key,\n                oldValIdElem;\n\n            oldFile = this.__prepareFilename(oldFile);\n            newFile = this.__prepareFilename(newFile);\n            tmpOldImage = this._images[oldFile];\n\n            if (newFile === oldFile) {\n                this._images[newFile] = imageData;\n                this.saveImageRoles(imageData);\n                this._updateVisibility(imageData);\n                this._updateImageTitle(imageData);\n\n                return null;\n            }\n\n            this._removeImage(oldFile);\n            this._setImage(newFile, imageData);\n\n            if (!oldFile || !imageData.oldFile) {\n                return null;\n            }\n\n            newImageId = this.findElementId(tmpNewFile);\n            fc = this.element.find(this._itemIdSelector).val();\n\n            suff = 'product[media_gallery][images]' + fc;\n\n            searchsuff = 'input[name=\"' + suff + '[value_id]\"]';\n            key = this._gallery.find(searchsuff).val();\n\n            if (!key) {\n                return null;\n            }\n\n            oldValIdElem = document.createElement('input');\n            this._gallery.find('form[data-form=\"edit-product\"]').append(oldValIdElem);\n            $(oldValIdElem).attr({\n                type: 'hidden',\n                name: 'product[media_gallery][images][' + newImageId + '][save_data_from]'\n            }).val(key);\n\n            oldNewFilePosition = parseInt(tmpOldImage.position, 10);\n            imageData.position = oldNewFilePosition;\n\n            this._gallery.trigger('setPosition', {\n                imageData: imageData,\n                position: oldNewFilePosition\n            });\n        },\n\n        /**\n         * Remove image data\n         * @param {String} file\n         * @private\n         */\n        _removeImage: function (file) {\n            var imageData = this._getImage(file);\n\n            if (!imageData) {\n                return null;\n            }\n\n            this._gallery.trigger('removeItem', imageData);\n            this.element.trigger('removeImage', imageData);\n            delete this._images[file];\n        },\n\n        /**\n         * Fired when image setted\n         * @param {Event} event\n         * @param {Object} imageData\n         * @private\n         */\n        _onSetImage: function (event, imageData) {\n            this.saveImageRoles(imageData);\n        },\n\n        /**\n         *\n         * Wrap _uploadFile\n         * @param {String} file\n         * @param {String} oldFile\n         * @param {Function} callback\n         * @private\n         */\n        _uploadImage: function (file, oldFile, callback) {\n            var url = this.options.saveVideoUrl,\n            data = {\n                files: file,\n                url: url\n            };\n\n            this._blockActionButtons(true, true);\n            this._uploadFile(data, $.proxy(function (result) {\n                this._onImageLoaded(result, file, oldFile, callback);\n                this._blockActionButtons(false);\n            }, this));\n\n        },\n\n        /**\n         * @param {String} result\n         * @param {String} file\n         * @param {String} oldFile\n         * @param {Function} callback\n         * @private\n         */\n        _onImageLoaded: function (result, file, oldFile, callback) {\n            var data;\n\n            try {\n                data = JSON.parse(result);\n            } catch (e) {\n                data = result;\n            }\n\n            if (this.element.find('#video_url').parent().find('.image-upload-error').length > 0) {\n                this.element.find('.image-upload-error').remove();\n            }\n\n            if (data.errorcode || data.error) {\n                this.element.find('#video_url').parent().append('<div class=\"image-upload-error\">' +\n                '<div class=\"image-upload-error-cross\"></div><span>' + data.error + '</span></div>');\n\n                return;\n            }\n            $.each(this.element.find(this._videoFormSelector).serializeArray(), function (i, field) {\n                data[field.name] = field.value;\n            });\n            data.disabled = this.element.find(this._videoDisableinputSelector).prop('checked') ? 1 : 0;\n            data['media_type'] = 'external-video';\n            data.oldFile = oldFile;\n\n            oldFile ?\n                this._replaceImage(oldFile, data.file, data) :\n                this._setImage(data.file, data);\n            callback.call(0, data);\n        },\n\n        /**\n         * File uploader\n         * @private\n         */\n        _uploadFile: function (data, callback) {\n            var fu = this.element.find(this._videoPreviewInputSelector),\n                tmpInput = document.createElement('input'),\n                fileUploader = null;\n\n            $(tmpInput).attr({\n                'name': fu.attr('name'),\n                'value': fu.val(),\n                'type': 'file',\n                'data-ui-ud': fu.attr('data-ui-ud')\n            }).css('display', 'none');\n            fu.parent().append(tmpInput);\n            fileUploader = $(tmpInput).fileupload();\n            fileUploader.fileupload('send', data).done(function (result, textStatus, jqXHR) {\n                tmpInput.remove();\n                callback.call(null, result, textStatus, jqXHR);\n            });\n        },\n\n        /**\n         * Update style\n         * @param {String} url\n         * @private\n         */\n        _addVideoClass: function (url) {\n            var classVideo = 'video-item';\n\n            this._gallery.find('img[src=\"' + url + '\"]').addClass(classVideo);\n        },\n\n        /**\n         * Build widget\n         * @private\n         */\n        _create: function () {\n            var imgs = _.values(this.element.closest(this.options.videoSelector).data('images')) || [],\n                widget,\n                uploader,\n                tmp,\n                i;\n\n            this._gallery =  this.element.closest(this.options.videoSelector);\n\n            for (i = 0; i < imgs.length; i++) {\n                tmp = imgs[i];\n                this._images[tmp.file] = tmp;\n\n                if (tmp['media_type'] === 'external-video') {\n                    tmp.subclass = 'video-item';\n                    this._addVideoClass(tmp.url);\n                }\n            }\n\n            this._gallery.on('openDialog', $.proxy(this._onOpenDialog, this));\n            this._bind();\n            this.createVideoItemIcons();\n            widget = this;\n            uploader = this.element.find(this._videoPreviewInputSelector);\n            uploader.on('change', this._onImageInputChange.bind(this));\n            uploader.attr('accept', this._imageTypes.join(','));\n\n            this.element.modal({\n                type: 'slide',\n                //appendTo: this._gallery,\n                modalClass: 'mage-new-video-dialog form-inline',\n                title: $.mage.__('New Video'),\n                buttons: [\n                {\n                    text: $.mage.__('Save'),\n                    class: 'action-primary video-create-button',\n                    click: $.proxy(widget._onCreate, widget)\n                },\n                {\n                    text: $.mage.__('Cancel'),\n                    class: 'video-cancel-button',\n                    click: $.proxy(widget._onCancel, widget)\n                },\n                {\n                    text: $.mage.__('Delete'),\n                    class: 'video-delete-button',\n                    click: $.proxy(widget._onDelete, widget)\n                },\n                {\n                    text: $.mage.__('Save'),\n                    class: 'action-primary video-edit',\n                    click: $.proxy(widget._onUpdate, widget)\n                }\n                ],\n\n                /**\n                 * @returns {null}\n                 */\n                opened: function () {\n                    var roles,\n                        file,\n                        modalTitleElement,\n                        imageData,\n                        modal = widget.element.closest('.mage-new-video-dialog');\n\n                    widget.element.find('#video_url').focus();\n                    roles = widget.element.find('.video_image_role');\n                    roles.prop('disabled', false);\n                    file = widget.element.find('#file_name').val();\n                    widget._onGetVideoInformationEditClick();\n                    modalTitleElement = modal.find('.modal-title');\n\n                    if (!file) {\n                        widget._blockActionButtons(true);\n\n                        modal.find('.video-delete-button').hide();\n                        modal.find('.video-edit').hide();\n                        modal.find('.video-create-button').show();\n                        roles.prop('checked', widget._gallery.find('.image.item:not(.removed)').length < 1);\n                        modalTitleElement.text($.mage.__('New Video'));\n                        widget._isEditPage = false;\n\n                        return null;\n                    }\n                    widget._blockActionButtons(false);\n                    modalTitleElement.text($.mage.__('Edit Video'));\n                    widget._isEditPage = true;\n                    imageData = widget._getImage(file);\n\n                    if (!imageData) {\n                        imageData = {\n                            url: _.find(widget._gallery.find('.product-image'), function (image) {\n                                return image.src.indexOf(file) > -1;\n                            }).src\n                        };\n                    }\n\n                    widget._onPreview(null, imageData.url, false);\n                },\n\n                /**\n                 * Closed\n                 */\n                closed: function () {\n                    widget._onClose();\n                    widget.createVideoItemIcons();\n                }\n            });\n            this.toggleButtons();\n        },\n\n        /**\n         * @param {String} status\n         * @private\n         */\n        _blockActionButtons: function (status) {\n            this.element\n                .closest('.mage-new-video-dialog')\n                .find('.page-actions-buttons button.video-create-button, .page-actions-buttons button.video-edit')\n                .attr('disabled', status);\n        },\n\n        /**\n         * Check form\n         * @param {Function} callback\n         */\n        isValid: function (callback) {\n            var videoForm = this.element.find(this._videoFormSelector),\n                videoLoaded = true;\n\n            this._blockActionButtons(true);\n\n            this._videoUrlWidget.trigger('validate_video_url', $.proxy(function () {\n\n                videoForm.mage('validation', {\n\n                    /**\n                     * @param {jQuery} error\n                     * @param {jQuery} element\n                     */\n                    errorPlacement: function (error, element) {\n                        error.insertAfter(element);\n                    }\n                }).on('highlight.validate', function () {\n                    $(this).validation('option');\n                });\n\n                videoForm.validation();\n\n                if (this._videoRequestComplete === false) {\n                    videoLoaded = false;\n                }\n\n                callback(videoForm.valid() && videoLoaded);\n            }, this));\n\n            this._blockActionButtons(false);\n        },\n\n        /**\n         * Create video item icons\n         */\n        createVideoItemIcons: function () {\n            var $imageWidget = this._gallery.find('.product-image.video-item'),\n                $productGalleryWrapper = $(this._imageProductGalleryWrapperSelector).find('.product-image.video-item');\n\n            $imageWidget.parent().addClass('video-item');\n            $productGalleryWrapper.parent().addClass('video-item');\n            $imageWidget.removeClass('video-item');\n            $productGalleryWrapper.removeClass('video-item');\n            $('.video-item .action-delete').attr('title', $.mage.__('Delete video'));\n            $('.video-item .action-delete span').html($.mage.__('Delete video'));\n        },\n\n        /**\n         * Fired when click on create video\n         * @private\n         */\n        _onCreate: function () {\n            var nvs = this.element.find(this._videoPreviewInputSelector),\n                file = nvs.get(0),\n                reqClass = 'required-entry _required';\n\n            if (file && file.files && file.files.length) {\n                file = file.files[0];\n            } else {\n                file = null;\n            }\n\n            if (!file && !this._tempPreviewImageData) {\n                nvs.addClass(reqClass);\n            }\n\n            this.isValid($.proxy(\n                function (videoValidStatus) {\n\n                    if (!videoValidStatus) {\n                        return;\n                    }\n\n                    if (this._tempPreviewImageData) {\n                        this._onImageLoaded(this._tempPreviewImageData, null, null, $.proxy(this.close, this));\n                    } else {\n                        this._uploadImage(file, null, $.proxy(function () {\n                            this.close();\n                        }, this));\n                    }\n\n                    nvs.removeClass(reqClass);\n                },\n                this\n            ));\n        },\n\n        /**\n         * Fired when click on update video\n         * @private\n         */\n        _onUpdate: function () {\n            var inputFile, itemId, _inputSelector, mediaFields, imageData, flagChecked, fileName, callback;\n\n            this.isValid($.proxy(\n                function (videoValidStatus) {\n\n                    if (!videoValidStatus) {\n                        return;\n                    }\n\n                    imageData = this.imageData || {};\n                    inputFile = this.element.find(this._videoPreviewInputSelector);\n                    itemId = this.element.find(this._itemIdSelector).val();\n                    itemId = itemId.slice(1, itemId.length - 1);\n                    _inputSelector = '[name*=\"[' + itemId + ']\"]';\n                    mediaFields = this._gallery.find('input' + _inputSelector);\n                    $.each(mediaFields, function (i, el) {\n                        var elName = el.name,\n                            start = elName.indexOf(itemId) + itemId.length + 2,\n                            fieldName = elName.substring(start, el.name.length - 1),\n                            _field = this.element.find('#' + fieldName),\n                            _tmp;\n\n                        if (_field.length > 0) {\n                            _tmp = _inputSelector.slice(0, _inputSelector.length - 2) + '[' + fieldName + ']\"]';\n                            this._gallery.find(_tmp).val(_field.val());\n                            imageData[fieldName] = _field.val();\n                        }\n                    }.bind(this));\n                    flagChecked = this.element.find(this._videoDisableinputSelector).prop('checked') ? 1 : 0;\n                    this._gallery.find('input[name*=\"' + itemId + '][disabled]\"]').val(flagChecked);\n                    this._gallery.find(_inputSelector).siblings('.image-fade').css(\n                        'visibility',\n                        flagChecked ? 'visible' : 'hidden'\n                    );\n                    imageData.disabled = flagChecked;\n\n                    if (this._tempPreviewImageData) {\n                        this._onImageLoaded(\n                            this._tempPreviewImageData,\n                            null,\n                            imageData.file,\n                            $.proxy(this.close, this)\n                        );\n\n                        return;\n                    }\n                    fileName = inputFile.get(0).files;\n\n                    if (!fileName || !fileName.length) {\n                        fileName = null;\n                    }\n                    inputFile.replaceWith(inputFile);\n\n                    callback = $.proxy(function () {\n                        this.close();\n                    }, this);\n\n                    if (fileName) {\n                        this._uploadImage(fileName, imageData.file, callback);\n                    } else {\n                        this._replaceImage(imageData.file, imageData.file, imageData);\n                        callback(0, imageData);\n                    }\n                },\n                this\n            ));\n        },\n\n        /**\n         * Delegates call to producwt gallery to update video visibility.\n         *\n         * @param {Object} imageData\n         */\n        _updateVisibility: function (imageData) {\n            this._gallery.trigger('updateVisibility', {\n                disabled: imageData.disabled,\n                imageData: imageData\n            });\n        },\n\n        /**\n         * Delegates call to product gallery to update video title.\n         *\n         * @param {Object} imageData\n         */\n        _updateImageTitle: function (imageData) {\n            this._gallery.trigger('updateImageTitle', {\n                imageData: imageData\n            });\n        },\n\n        /**\n         * Fired when clicked on cancel\n         * @private\n         */\n        _onCancel: function () {\n            this.close();\n        },\n\n        /**\n         * Fired when clicked on delete\n         * @private\n         */\n        _onDelete: function () {\n            var filename = this.element.find(this._videoImageFilenameselector).val();\n\n            this._removeImage(filename);\n            this.close();\n        },\n\n        /**\n         * @param {String} file\n         * @param {Function} callback\n         * @private\n         */\n        _readPreviewLocal: function (file, callback) {\n            var fr = new FileReader;\n\n            if (!window.FileReader) {\n                return;\n            }\n\n            /**\n             * On load end\n             */\n            fr.onloadend = function () {\n                callback(fr.result);\n            };\n            fr.readAsDataURL(file);\n        },\n\n        /**\n         *  Image file input handler\n         * @private\n         */\n        _onImageInputChange: function () {\n            var jFile = this.element.find(this._videoPreviewInputSelector),\n                file = jFile[0],\n                val = jFile.val(),\n                prev = this._getPreviewImage(),\n                ext = '.' + val.split('.').pop();\n\n            if (!val) {\n                return;\n            }\n            ext = ext ? ext.toLowerCase() : '';\n\n            if (\n                ext.length < 2 ||\n                this._imageTypes.indexOf(ext.toLowerCase()) === -1 || !file.files || !file.files.length\n            ) {\n                prev.remove();\n                this._previewImage = null;\n                jFile.val('');\n\n                return;\n            } // end if\n            file = file.files[0];\n            this._tempPreviewImageData = null;\n            this._onPreview(null, file, true);\n        },\n\n        /**\n         * Change Preview\n         * @param {String} error\n         * @param {String} src\n         * @param {Boolean} local\n         * @private\n         */\n        _onPreview: function (error, src, local) {\n            var img, renderImage;\n\n            img = this._getPreviewImage();\n\n            /**\n             * Callback\n             * @param {String} source\n             */\n            renderImage = function (source) {\n                img.attr({\n                    'src': source\n                }).show();\n            };\n\n            if (error) {\n                return;\n            }\n\n            if (!local) {\n                renderImage(src);\n            } else {\n                this._readPreviewLocal(src, renderImage);\n            }\n        },\n\n        /**\n         *\n         * Return preview image imstance\n         * @returns {null}\n         * @private\n         */\n        _getPreviewImage: function () {\n\n            if (!this._previewImage) {\n                this._previewImage = $(document.createElement('img')).css({\n                    'width': '100%',\n                    'display': 'none',\n                    'src': ''\n                });\n                $(this._previewImage).insertAfter(this.element.find(this._videoPreviewImagePointer));\n                $(this._previewImage).attr('data-role', 'video_preview_image');\n            }\n\n            return this._previewImage;\n        },\n\n        /**\n         * Close slideout dialog\n         */\n        close: function () {\n            this.element.modal('closeModal');\n        },\n\n        /**\n         * Close dialog wrap\n         * @private\n         */\n        _onClose: function () {\n            var newVideoForm;\n\n            this._isEditPage = true;\n            this.imageData = null;\n\n            if (this._previewImage) {\n                this._previewImage.remove();\n                this._previewImage = null;\n            }\n            this._tempPreviewImageData = null;\n            this.element.trigger('reset');\n            newVideoForm = this.element.find(this._videoFormSelector);\n\n            $(newVideoForm).find('input[type=\"hidden\"][name!=\"form_key\"]').val('');\n            this._gallery.find(\n                'input[name*=\"' + this.element.find(this._itemIdSelector).val() + '\"]'\n            ).parent().removeClass('active');\n\n            try {\n                newVideoForm.validation('clearError');\n            } catch (e) {\n\n            }\n            newVideoForm.trigger('reset');\n        },\n\n        /**\n         * Find element by fileName\n         * @param {String} file\n         */\n        findElementId: function (file) {\n            var elem = this._gallery.find('.image.item').find('input[value=\"' + file + '\"]');\n\n            if (!elem.length) {\n                return null;\n            }\n\n            return $(elem).attr('name').replace('product[media_gallery][images][', '').replace('][file]', '');\n        },\n\n        /**\n         * Save image roles\n         * @param {Object} imageData\n         */\n        saveImageRoles: function (imageData) {\n            var data = imageData.file,\n                self = this,\n                containers;\n\n            if (data && data.length > 0) {\n                containers = this._gallery.find('.image-placeholder').siblings('input');\n                $.each(containers, function (i, el) {\n                    var start = el.name.indexOf('[') + 1,\n                        end = el.name.indexOf(']'),\n                        imageType = el.name.substring(start, end),\n                        imageCheckbox = self.element.find(\n                            self._videoFormSelector + ' input[value=\"' + imageType + '\"]'\n                        );\n\n                    self._changeRole(imageType, imageCheckbox.prop('checked'), imageData);\n                });\n            }\n        },\n\n        /**\n         * Change image role\n         * @param {String} imageType - role name\n         * @param {bool} isEnabled - role active status\n         * @param {Object} imageData - image data object\n         * @private\n         */\n        _changeRole: function (imageType, isEnabled, imageData) {\n            var needCheked = true;\n\n            if (!isEnabled) {\n                needCheked = this._gallery.find('input[name=\"product[' + imageType + ']\"]').val() === imageData.file;\n            }\n\n            if (!needCheked) {\n                return null;\n            }\n\n            this._gallery.trigger('setImageType', {\n                type: imageType,\n                imageData: isEnabled ? imageData : null\n            });\n        },\n\n        /**\n         * On open dialog\n         * @param {Object} e\n         * @param {Object} imageData\n         * @private\n         */\n        _onOpenDialog: function (e, imageData) {\n            var formFields, flagChecked, file,\n                modal = this.element.closest('.mage-new-video-dialog');\n\n            if (imageData['media_type'] === 'external-video') {\n                this.imageData = imageData;\n                modal.find('.video-create-button').hide();\n                modal.find('.video-delete-button').show();\n                modal.find('.video-edit').show();\n                modal.createVideoPlayer({\n                    reset: true\n                }).createVideoPlayer('reset');\n\n                formFields = modal.find(this._videoFormSelector).find('.edited-data');\n\n                $.each(formFields, function (i, field) {\n                    $(field).val(imageData[field.name]);\n                });\n\n                flagChecked = imageData.disabled > 0;\n                modal.find(this._videoDisableinputSelector).prop('checked', flagChecked);\n\n                file = modal.find('#file_name').val(imageData.file);\n\n                $.each(modal.find('.video_image_role'), function () {\n                    $(this).prop('checked', false).prop('disabled', false);\n                });\n\n                $.each(this._gallery.find('.image-placeholder').siblings('input:hidden'), function () {\n                    var start, end, imageRole;\n\n                    if ($(this).val() === file.val()) {\n                        start = this.name.indexOf('[') + 1;\n                        end = this.name.length - 1;\n                        imageRole = this.name.substring(start, end);\n                        modal.find('#new_video_form input[value=\"' + imageRole + '\"]').prop('checked', true);\n                    }\n                });\n            }\n\n        },\n\n        /**\n         * Toggle buttons\n         */\n        toggleButtons: function () {\n            var self = this,\n                modal = this.element.closest('.mage-new-video-dialog');\n\n            modal.find('.video-placeholder, .add-video-button-container > button').click(function () {\n                modal.find('.video-create-button').show();\n                modal.find('.video-delete-button').hide();\n                modal.find('.video-edit').hide();\n                modal.createVideoPlayer({\n                    reset: true\n                }).createVideoPlayer('reset').updateInputFields({\n                    reset: true\n                }).updateInputFields('reset');\n            });\n            this._gallery.on('click', '.item.video-item', function () {\n                modal.find('.video-create-button').hide();\n                modal.find('.video-delete-button').show();\n                modal.find('.video-edit').show();\n                modal.find('.mage-new-video-dialog').createVideoPlayer({\n                    reset: true\n                }).createVideoPlayer('reset');\n            });\n            this._gallery.on('click', '.item.video-item:not(.removed)', function () {\n                var flagChecked,\n                    file,\n                    formFields = modal.find('.edited-data'),\n                    container = $(this);\n\n                $.each(formFields, function (i, field) {\n                    $(field).val(container.find('input[name*=\"' + field.name + '\"]').val());\n                });\n\n                flagChecked = container.find('input[name*=\"disabled\"]').val() > 0;\n                self._gallery.find(self._videoDisableinputSelector).prop('checked', flagChecked);\n\n                file = self._gallery.find('#file_name').val(container.find('input[name*=\"file\"]').val());\n\n                $.each(self._gallery.find('.video_image_role'), function () {\n                    $(this).prop('checked', false).prop('disabled', false);\n                });\n\n                $.each(self._gallery.find('.image-placeholder').siblings('input:hidden'), function () {\n                    var start, end, imageRole;\n\n                    if ($(this).val() !== file.val()) {\n                        return null;\n                    }\n\n                    start = this.name.indexOf('[') + 1;\n                    end = this.name.length - 1;\n                    imageRole = this.name.substring(start, end);\n                    self._gallery.find('input[value=\"' + imageRole + '\"]').prop('checked', true);\n                });\n            });\n        }\n    });\n\n    $('#group-fields-image-management > legend > span').text($.mage.__('Images and Videos'));\n\n    return $.mage.newVideoDialog;\n});\n","Magento_Integration/js/integration.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * jQuery plugin is added.\n *\n * @api\n */\ndefine([\n    'jquery',\n    'Magento_Ui/js/modal/alert',\n    'jquery/ui',\n    'mage/translate',\n    'Magento_Ui/js/modal/modal'\n], function ($, alert) {\n    'use strict';\n\n    $.widget('mage.integration', {\n        /**\n         * Options common to all instances of this widget.\n         * @type {Object}\n         */\n        options: {\n            /**\n             * URL of the integration grid.\n             * @type {String}\n             */\n            gridUrl: ''\n        },\n\n        /**\n         * Bind event handler for the action when admin clicks \"Save & Activate\" button.\n         * @private\n         */\n        _create: function () {\n            if ($('#save-split-button-activate').length) {\n                // We're on the \"New integration\" page - bind related handler\n                this._form = $('#edit_form');\n                this._form.on('saveAndActivate', $.proxy(this._saveAndActivate, this));\n            }\n        },\n\n        /**\n         * Save new integration, then kick off the activate dialog.\n         * @private\n         */\n        _saveAndActivate: function () {\n            if (this._form.validation && !this._form.validation('isValid')) {\n                return false;\n            }\n\n            $.ajax({\n                url: this._form.prop('action'),\n                type: 'post',\n                data: this._form.serialize(),\n                dataType: 'json',\n                context: this,\n\n                /** @inheritdoc */\n                beforeSend: function () {\n                    $('body').trigger('processStart');\n                },\n\n                /** @inheritdoc */\n                success: function (data) {\n                    var integrationName, that;\n\n                    if (data._redirect) {\n                        window.location.href = data._redirect;\n                    } else if (data.integrationId) {\n                        integrationName = $('#integration_properties_name').val();\n                        window.integration.popup.show($('<span>').attr({\n                            'data-row-dialog': 'permissions',\n                            'data-row-id': data.integrationId,\n                            // We do escaping here instead of the place of actual output because _showPopup()\n                            // actually receives dialog window title from couple of places: from here and from the grid.\n                            // The issue is we always should escape values in the grid, so that value is already\n                            // escaped. To avoid double escaping we do it here instead of the output.\n                            'data-row-name': $('<div>').text(integrationName).html(),\n                            'data-row-is-reauthorize': '0',\n                            'data-row-is-token-exchange': data.isTokenExchange\n                        }));\n                        that = this;\n                        $('#integration-popup-container').on('dialogclose', function () {\n                            $('body').trigger('processStart');\n                            window.location.href = that.options.gridUrl;\n\n                            return false;\n                        });\n                    }\n                },\n\n                /** @inheritdoc */\n                error: function (jqXHR, status, error) {\n                    alert({\n                        content: $.mage.__('Sorry, something went wrong. Please try again later.')\n                    });\n                    window.console && console.log(status + ': ' + error + '\\nResponse text:\\n' + jqXHR.responseText);\n                },\n\n                /** @inheritdoc */\n                complete: function () {\n                    $('body').trigger('processStop');\n                }\n            });\n\n            return true;\n        }\n    });\n\n    /**\n     * @param {*} permissionsDialogUrl\n     * @param {*} tokensDialogUrl\n     * @param {*} tokensExchangeUrl\n     * @param {*} gridUrl\n     * @param {*} successCallbackUrl\n     * @return {Object}\n     * @constructor\n     */\n    window.Integration = function (\n        permissionsDialogUrl,\n        tokensDialogUrl,\n        tokensExchangeUrl,\n        gridUrl,\n        successCallbackUrl\n    ) {\n        var url = {\n            permissions: permissionsDialogUrl,\n            tokens: tokensDialogUrl,\n            tokensExchange: tokensExchangeUrl,\n            grid: gridUrl\n        },\n        IdentityLogin = {\n            win: null,\n            strLocation: null,\n            checker: null,\n            isCalledBack: false,\n            //Info popup dialog. Should be hidden when login window is closed\n            jqInfoDialog: $('#integration-popup-container'),\n            successCallbackUrl: successCallbackUrl,\n            Constants: {\n                /*\n                 This interval is set such that it adjusts to the child window closing timeout of 1000 ms. This will\n                 give the checker function enough time to detect if the successCallback has been invoked\n                 */\n                CHECKER_INTERVAL: 500,\n                //Login screen size plus some buffer\n                WIDTH: 680,\n                HEIGHT: 510,\n                // subtract pixels(30) and width(680) from screen width to move popup from extreme left\n                LEFT: screen.width - 680 - 30,\n                // subtract pixels(300) and height(300) from screen height to move from top\n                TOP: screen.height - 510 - 300\n            },\n\n            /**\n             * @param {*} identityCallbackUrl\n             * @param {*} consumerKey\n             * @param {*} jqInfoDialog\n             */\n            invokePopup: function (identityCallbackUrl, consumerKey, jqInfoDialog) {\n                var param;\n\n                // Callback should be invoked only once. Reset callback flag on subsequent invocations.\n                IdentityLogin.isCalledBack = false;\n                IdentityLogin.jqInfoDialog = jqInfoDialog;\n                param = $.param({\n                    'oauth_consumer_key': consumerKey,\n                    'success_call_back': IdentityLogin.successCallbackUrl\n                });\n                IdentityLogin.win = window.open(identityCallbackUrl + '?' + param, '',\n                    'top=' + IdentityLogin.Constants.TOP +\n                        ', left=' + IdentityLogin.Constants.LEFT +\n                        ', width=' + IdentityLogin.Constants.WIDTH +\n                        ', height=' + IdentityLogin.Constants.HEIGHT + ',scrollbars=no');\n\n                if (IdentityLogin.checker != null) {\n                    //Clear any previous check\n                    clearInterval(IdentityLogin.checker);\n                }\n                //Polling to detect url of the child window.\n                IdentityLogin.checker = setInterval(\n                    IdentityLogin.fnCheckLocation, IdentityLogin.Constants.CHECKER_INTERVAL\n                );\n            },\n\n            /**\n             * Function to check the location of the child popup window.\n             * Once detected if the callback is successful, parent window will be reloaded\n             */\n            fnCheckLocation: function () {\n                if (IdentityLogin.win == null) {\n                    return;\n                }\n                // Check to see if the location has changed.\n                try {\n                    //Is the success callback invoked\n                    if (IdentityLogin.win.closed ||\n                        IdentityLogin.win.location.href == IdentityLogin.successCallbackUrl //eslint-disable-line eqeqeq\n                    ) {\n                        //Stop the polling\n                        clearInterval(IdentityLogin.checker);\n                        $('body').trigger('processStart');\n                        //Check for window closed\n                        window.location.href = url.grid;\n                        IdentityLogin.jqInfoDialog.modal('closeModal');\n                    }\n                } catch (e) {\n                    //squash. In case Window closed without success callback, clear polling\n                    if (IdentityLogin.win.closed) {\n                        IdentityLogin.jqInfoDialog.modal('closeModal');\n                        clearInterval(IdentityLogin.checker);\n                    }\n\n                    return;\n                }\n            }\n        },\n\n        /**\n         * @param {Object} popupWindow\n         * @return {Boolean}\n         */\n        isPopupBlocked = function (popupWindow) {\n            try {\n                popupWindow.focus();\n            } catch (e) {\n                alert({\n                    content: $.mage.__('Popup Blocker is enabled! Please add this site to your exception list.')\n                });\n\n                return true;\n            }\n\n            return false;\n        },\n\n        /**\n         * @param {*} dialog\n         * @param {*} title\n         * @param {*} okButton\n         * @param {*} ajaxUrl\n         * @private\n         */\n        _showPopup = function (dialog, title, okButton, ajaxUrl) {\n            $.ajax({\n                url: ajaxUrl,\n                cache: false,\n                data: {\n                    'form_key': window.FORM_KEY\n                },\n                method: 'GET',\n\n                /** @inheritdoc */\n                beforeSend: function () {\n                    // Show the spinner\n                    $('body').trigger('processStart');\n                },\n\n                /** @inheritdoc */\n                success: function (result) {\n                    var redirect = result._redirect,\n                        identityLinkUrl, consumerKey, popupHtml, popup, resultObj, buttons, dialogProperties;\n\n                    if (redirect) {\n                        window.location.href = redirect;\n\n                        return;\n                    }\n\n                    identityLinkUrl = null;\n                    consumerKey = null;\n                    popupHtml = null;\n                    popup = $('#integration-popup-container');\n\n                    try {\n                        resultObj = typeof result === 'string' ?\n                            JSON.parse(result) :\n                            result;\n\n                        identityLinkUrl = resultObj['identity_link_url'];\n                        consumerKey      = resultObj['oauth_consumer_key'];\n                        popupHtml       = resultObj['popup_content'];\n\n                    } catch (e) {\n                        //This is expected if result is not json. Do nothing.\n                    }\n\n                    if (identityLinkUrl && consumerKey && popupHtml) {\n                        IdentityLogin.invokePopup(identityLinkUrl, consumerKey, popup);\n\n                        if (isPopupBlocked(IdentityLogin.win)) {\n                            return;\n                        }\n                    } else {\n                        popupHtml = result;\n                    }\n\n                    if (popup.length === 0) {\n                        popup = $('<div></div>');\n                    }\n                    popup.html(popupHtml);\n\n                    buttons = [];\n                    dialogProperties = {\n                        title: title,\n                        type: 'slide',\n                        dialogClass: dialog == 'permissions' ? 'integration-dialog' : 'integration-dialog no-close' //eslint-disable-line\n                    };\n\n                    // Add confirmation button to the list of dialog buttons. okButton not set for tokenExchange dialog\n                    if (okButton) {\n                        buttons.push(okButton);\n                    }\n                    // Add button only if its not empty\n                    if (buttons.length > 0) {\n                        dialogProperties.buttons = buttons;\n                    }\n                    popup.modal(dialogProperties);\n                    popup.modal('openModal');\n                },\n\n                /** @inheritdoc */\n                error: function (jqXHR, status, error) {\n                    alert({\n                        content: $.mage.__('Sorry, something went wrong. Please try again later.')\n                    });\n                    window.console && console.log(status + ': ' + error + '\\nResponse text:\\n' + jqXHR.responseText);\n                },\n\n                /** @inheritdoc */\n                complete: function () {\n                    // Hide the spinner\n                    $('body').trigger('processStop');\n                }\n            });\n        };\n\n        return {\n            popup: {\n                /**\n                 * @param {*} ctx\n                 */\n                show: function (ctx) {\n                    var dialog = $(ctx).attr('data-row-dialog'),\n                        isReauthorize = $(ctx).attr('data-row-is-reauthorize'),\n                        isTokenExchange = $(ctx).attr('data-row-is-token-exchange'),\n                        integrationId, ajaxUrl, integrationName, okButton;\n\n                    if (!url.hasOwnProperty(dialog)) {\n                        throw 'Invalid dialog type';\n                    }\n\n                    integrationId = $(ctx).attr('data-row-id');\n\n                    if (!integrationId) {\n                        throw 'Unable to find integration ID';\n                    }\n\n                    // Replace placeholders in URL\n                    ajaxUrl = url[dialog].replace(':id', integrationId).replace(':isReauthorize', isReauthorize);\n\n                    try {\n                        // Get integration name either from current element or from neighbor column\n                        integrationName = $(ctx).attr('data-row-name') ||\n                            $(ctx).parents('tr').find('.col-name').html().trim(); // eslint-disable-line jquery-no-trim\n\n                        if (integrationName.indexOf('<span') > -1) {\n                            // Remove unsecure URL warning from popup window title if it is present\n                            integrationName = integrationName.substring(0, integrationName.indexOf('<span'));\n                        }\n                    } catch (e) {\n                        throw 'Unable to find integration name';\n                    }\n\n                    okButton = {\n                        permissions: {\n                            text: isReauthorize == '1' ? $.mage.__('Reauthorize') : $.mage.__('Allow'), //eslint-disable-line\n                            'class': 'action-primary',\n                            attr: {\n                                'data-row-id': integrationId,\n                                'data-row-name': integrationName,\n                                'data-row-dialog': isTokenExchange == '1' ? 'tokensExchange' : 'tokens', //eslint-disable-line\n                                'data-row-is-reauthorize': isReauthorize,\n                                'data-row-is-token-exchange': isTokenExchange\n                            },\n\n                            /**\n                             * Click.\n                             */\n                            click: function () {\n                                // Find the 'Allow' button and clone - it has all necessary data, but is going to be\n                                // destroyed along with the current dialog\n                                var context = this.modal.find('button.action-primary').clone(true);\n\n                                this.closeModal();\n                                this.modal.remove();\n                                // Make popup out of data we saved from 'Allow' button\n                                window.integration.popup.show(context);\n                            }\n                        },\n                        tokens: {\n                            text: $.mage.__('Done'),\n                            'class': 'action-primary',\n\n                            /**\n                             * Click.\n                             */\n                            click: function () {\n                                // Integration has been activated at the point of generating tokens\n                                window.location.href = url.grid;\n                            }\n                        }\n                    };\n\n                    _showPopup(dialog, integrationName, okButton[dialog], ajaxUrl);\n                }\n            }\n        };\n    };\n\n    return $.mage.integration;\n});\n","Magento_InventoryInStorePickupSalesAdminUi/order/create/scripts-mixin.js":"/*\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(\n    [\n        'jquery',\n        'prototype'\n    ],\n    function (jQuery) {\n        'use strict';\n\n        return function () {\n            var STORE_PICKUP_METHOD = 'instore_pickup',\n                SOURCES_FIELD_SELECTOR = '#shipping_form_pickup_location_source',\n                SAME_AS_BILLING_SELECTOR = '#order-shipping_same_as_billing',\n                CUSTOMER_SHIPPING_ADDRESS_ID_SELECTOR = '#order-shipping_address_customer_address_id',\n                CUSTOMER_ADDRESS_SAVE_IN_ADDRESS_BOOK_SELECTOR = '#order-shipping_address_save_in_address_book',\n                IN_STORE_PICKUP_CHECKBOX_SELECTOR = '#s_method_instore_pickup';\n\n            /**\n             * Display sources dropdown field;\n             * And vice-versa\n             *\n             * @param {Boolean} isStorePickup\n             */\n            function setStorePickupMethod(isStorePickup) {\n                var sourcesInput = jQuery(SOURCES_FIELD_SELECTOR),\n                    shippingAddressSaveInAddressBook = jQuery(CUSTOMER_ADDRESS_SAVE_IN_ADDRESS_BOOK_SELECTOR);\n\n                if (isStorePickup) {\n                    shippingAddressSaveInAddressBook.prop('checked', false);\n                    sourcesInput.show();\n\n                    return;\n                }\n                window.order.disableShippingAddress(jQuery(SAME_AS_BILLING_SELECTOR).prop('checked'));\n                sourcesInput.hide();\n            }\n\n            /**\n             * Verify is store pickup delivery method is checked.\n             */\n            function isStorePickupSelected() {\n                var storePickupCheckbox = jQuery(IN_STORE_PICKUP_CHECKBOX_SELECTOR);\n\n                return storePickupCheckbox.length && storePickupCheckbox.prop('checked');\n            }\n\n            /**\n             * Always disable unwanted shipping address fields in case store pickup is selected.\n             */\n            window.AdminOrder.prototype.disableShippingAddress =\n                window.AdminOrder.prototype.disableShippingAddress.wrap(function (proceed, flag) {\n                    var shippingAddressId = jQuery(CUSTOMER_SHIPPING_ADDRESS_ID_SELECTOR),\n                        theSameAsBillingCheckBox = jQuery(SAME_AS_BILLING_SELECTOR),\n                        shippingAddressSaveInAddressBook = jQuery(CUSTOMER_ADDRESS_SAVE_IN_ADDRESS_BOOK_SELECTOR);\n\n                    proceed(flag);\n\n                    if (isStorePickupSelected()) {\n                        shippingAddressId.prop('disabled', true);\n                        theSameAsBillingCheckBox.prop('disabled', true);\n                        shippingAddressSaveInAddressBook.prop('disabled', true);\n                    }\n                });\n\n            /**\n             * Set shipping method override\n             *\n             * @param {String} method\n             */\n            window.AdminOrder.prototype.setShippingMethod = function (method) {\n                var data = {},\n                    areas = [\n                        'shipping_method',\n                        'totals',\n                        'billing_method',\n                        'shipping_address'\n                    ];\n\n                data['order[shipping_method]'] = method;\n\n                if (method === STORE_PICKUP_METHOD) {\n                    data = this.serializeData(this.shippingAddressContainer).toObject();\n                    data['order[shipping_method]'] = method;\n                    data['shipping_as_billing'] = 0;\n                    data['save_in_address_book'] = 0;\n                    this.shippingAsBilling = 0;\n                    this.saveInAddressBook = 0;\n                }\n\n                this.loadArea(areas, true, data).then(\n                    function () {\n                        setStorePickupMethod(method === STORE_PICKUP_METHOD);\n                    }\n                );\n            };\n\n            /**\n             * Replace shipping method area.\n             * Restore store pickup shipping method if it was already selected.\n             */\n            window.AdminOrder.prototype.resetShippingMethod = function () {\n                var storePickupCheckbox = jQuery(IN_STORE_PICKUP_CHECKBOX_SELECTOR);\n\n                if (!this.isOnlyVirtualProduct) {\n                    /* eslint-disable no-undef */\n                    $(this.getAreaId('shipping_method')).update(this.shippingTemplate);\n\n                    if (isStorePickupSelected()) {\n                        window.order.setShippingMethod(storePickupCheckbox.val());\n                    }\n                }\n            };\n        };\n    }\n);\n","Magento_InventoryInStorePickupSalesAdminUi/order/create/trigger-shipping-method-update.js":"/*\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(\n    [\n        'jquery',\n        'Magento_Sales/order/create/form'\n    ],\n    function ($) {\n        'use strict';\n\n        return function () {\n            var storePickupCheckbox = $('#s_method_instore_pickup');\n\n            if (storePickupCheckbox.length && storePickupCheckbox.prop('checked')) {\n                window.order.setShippingMethod(storePickupCheckbox.val());\n            }\n        };\n    }\n);\n","Magefan_Blog/js/post-gallery.js":"/**\n * Copyright \u00a9 Magefan (support@magefan.com). All rights reserved.\n * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).\n *\n * Glory to Ukraine! Glory to the heroes!\n */\n\n/*jshint jquery:true*/\ndefine([\n    'jquery',\n    'underscore',\n    'mage/template',\n    'uiRegistry',\n    'productGallery',\n    'jquery-ui-modules/core',\n    'jquery-ui-modules/widget',\n    'baseImage'\n], function ($, _, mageTemplate, registry, productGallery) {\n    'use strict';\n\n    $.widget('mage.productGallery', $.mage.productGallery, {\n        _showDialog: function (imageData) {}\n    });\n\n    return $.mage.productGallery;\n});\n","Magefan_Blog/js/jquery.tagsinput.js":"/*\r\n\r\n\tjQuery Tags Input Plugin 1.3.3\r\n\r\n\tCopyright (c) 2011 XOXCO, Inc\r\n\r\n\tDocumentation for this plugin lives here:\r\n\thttp://xoxco.com/clickable/jquery-tags-input\r\n\r\n\tLicensed under the MIT license:\r\n\thttp://www.opensource.org/licenses/mit-license.php\r\n\r\n\tben@xoxco.com\r\n\r\n*/\r\n\r\n(function($) {\r\n\r\n\tvar delimiter = new Array();\r\n\tvar tags_callbacks = new Array();\r\n\t$.fn.doAutosize = function(o){\r\n\t    var minWidth = $(this).data('minwidth'),\r\n\t        maxWidth = $(this).data('maxwidth'),\r\n\t        val = '',\r\n\t        input = $(this),\r\n\t        testSubject = $('#'+$(this).data('tester_id'));\r\n\r\n\t    if (val === (val = input.val())) {return;}\r\n\r\n\t    // Enter new content into testSubject\r\n\t    var escaped = val.replace(/&/g, '&amp;').replace(/\\s/g,' ').replace(/</g, '&lt;').replace(/>/g, '&gt;');\r\n\t    testSubject.html(escaped);\r\n\t    // Calculate new width + whether to change\r\n\t    var testerWidth = testSubject.width(),\r\n\t        newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,\r\n\t        currentWidth = input.width(),\r\n\t        isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)\r\n\t                             || (newWidth > minWidth && newWidth < maxWidth);\r\n\r\n\t    // Animate width\r\n\t    if (isValidWidthChange) {\r\n\t        input.width(newWidth);\r\n\t    }\r\n\r\n\r\n  };\r\n  $.fn.resetAutosize = function(options){\r\n    // alert(JSON.stringify(options));\r\n    var minWidth =  $(this).data('minwidth') || options.minInputWidth || $(this).width(),\r\n        maxWidth = $(this).data('maxwidth') || options.maxInputWidth || ($(this).closest('.tagsinput').width() - options.inputPadding),\r\n        val = '',\r\n        input = $(this),\r\n        testSubject = $('<tester/>').css({\r\n            position: 'absolute',\r\n            top: -9999,\r\n            left: -9999,\r\n            width: 'auto',\r\n            fontSize: input.css('fontSize'),\r\n            fontFamily: input.css('fontFamily'),\r\n            fontWeight: input.css('fontWeight'),\r\n            letterSpacing: input.css('letterSpacing'),\r\n            whiteSpace: 'nowrap'\r\n        }),\r\n        testerId = $(this).attr('id')+'_autosize_tester';\r\n    if(! $('#'+testerId).length > 0){\r\n      testSubject.attr('id', testerId);\r\n      testSubject.appendTo('body');\r\n    }\r\n\r\n    input.data('minwidth', minWidth);\r\n    input.data('maxwidth', maxWidth);\r\n    input.data('tester_id', testerId);\r\n    input.css('width', minWidth);\r\n  };\r\n\r\n\t$.fn.addTag = function(value,options) {\r\n\t\t\toptions = jQuery.extend({focus:false,callback:true},options);\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar id = $(this).attr('id');\r\n\r\n\t\t\t\tvar tagslist = $(this).val().split(delimiter[id]);\r\n\t\t\t\tif (tagslist[0] == '') {\r\n\t\t\t\t\ttagslist = new Array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvalue = jQuery.trim(value);\r\n\r\n\t\t\t\tif (options.unique) {\r\n\t\t\t\t\tvar skipTag = $(this).tagExist(value);\r\n\t\t\t\t\tif(skipTag == true) {\r\n\t\t\t\t\t    //Marks fake input as not_valid to let styling it\r\n    \t\t\t\t    $('#'+id+'_tag').addClass('not_valid');\r\n    \t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar skipTag = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value !='' && skipTag != true) {\r\n                    $('<span>').addClass('tag').append(\r\n                        $('<span>').text(value).append('&nbsp;&nbsp;'),\r\n                        $('<a>', {\r\n                            href  : '#',\r\n                            title : 'Removing tag',\r\n                            text  : 'x'\r\n                        }).click(function () {\r\n                            return $('#' + id).removeTag(escape(value));\r\n                        })\r\n                    ).insertBefore('#' + id + '_addTag');\r\n\r\n\t\t\t\t\ttagslist.push(value);\r\n\r\n\t\t\t\t\t$('#'+id+'_tag').val('');\r\n\t\t\t\t\tif (options.focus) {\r\n\t\t\t\t\t\t$('#'+id+'_tag').focus();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$('#'+id+'_tag').blur();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$.fn.tagsInput.updateTagsField(this,tagslist);\r\n\r\n\t\t\t\t\tif (options.callback && tags_callbacks[id] && tags_callbacks[id]['onAddTag']) {\r\n\t\t\t\t\t\tvar f = tags_callbacks[id]['onAddTag'];\r\n\t\t\t\t\t\tf.call(this, value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(tags_callbacks[id] && tags_callbacks[id]['onChange'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar i = tagslist.length;\r\n\t\t\t\t\t\tvar f = tags_callbacks[id]['onChange'];\r\n\t\t\t\t\t\tf.call(this, $(this), tagslist[i-1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t$.fn.removeTag = function(value) {\r\n\t\t\tvalue = unescape(value);\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar id = $(this).attr('id');\r\n\r\n\t\t\t\tvar old = $(this).val().split(delimiter[id]);\r\n\r\n\t\t\t\t$('#'+id+'_tagsinput .tag').remove();\r\n\t\t\t\tstr = '';\r\n\t\t\t\tfor (i=0; i< old.length; i++) {\r\n\t\t\t\t\tif (old[i]!=value) {\r\n\t\t\t\t\t\tstr = str + delimiter[id] +old[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$.fn.tagsInput.importTags(this,str);\r\n\r\n\t\t\t\tif (tags_callbacks[id] && tags_callbacks[id]['onRemoveTag']) {\r\n\t\t\t\t\tvar f = tags_callbacks[id]['onRemoveTag'];\r\n\t\t\t\t\tf.call(this, value);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t$.fn.tagExist = function(val) {\r\n\t\tvar id = $(this).attr('id');\r\n\t\tvar tagslist = $(this).val().split(delimiter[id]);\r\n\t\treturn (jQuery.inArray(val, tagslist) >= 0); //true when tag exists, false when not\r\n\t};\r\n\r\n   // clear all existing tags and import new ones from a string\r\n   $.fn.importTags = function(str) {\r\n      var id = $(this).attr('id');\r\n      $('#'+id+'_tagsinput .tag').remove();\r\n      $.fn.tagsInput.importTags(this,str);\r\n   }\r\n\r\n\t$.fn.tagsInput = function(options) {\r\n    var settings = jQuery.extend({\r\n      interactive:true,\r\n      defaultText:'add a tag',\r\n      minChars:0,\r\n      width:'300px',\r\n      height:'100px',\r\n      autocomplete: {selectFirst: false },\r\n      hide:true,\r\n      delimiter: ',',\r\n      unique:true,\r\n      removeWithBackspace:true,\r\n      placeholderColor:'#666666',\r\n      autosize: true,\r\n      comfortZone: 20,\r\n      inputPadding: 6*2\r\n    },options);\r\n\r\n    \tvar uniqueIdCounter = 0;\r\n\r\n\t\tthis.each(function() {\r\n         // If we have already initialized the field, do not do it again\r\n         if (typeof $(this).attr('data-tagsinput-init') !== 'undefined') {\r\n            return;\r\n         }\r\n\r\n         // Mark the field as having been initialized\r\n         $(this).attr('data-tagsinput-init', true);\r\n\r\n\t\t\tif (settings.hide) {\r\n\t\t\t\t$(this).hide();\r\n\t\t\t}\r\n\t\t\tvar id = $(this).attr('id');\r\n\t\t\tif (!id || delimiter[$(this).attr('id')]) {\r\n\t\t\t\tid = $(this).attr('id', 'tags' + new Date().getTime() + (uniqueIdCounter++)).attr('id');\r\n\t\t\t}\r\n\r\n\t\t\tvar data = jQuery.extend({\r\n\t\t\t\tpid:id,\r\n\t\t\t\treal_input: '#'+id,\r\n\t\t\t\tholder: '#'+id+'_tagsinput',\r\n\t\t\t\tinput_wrapper: '#'+id+'_addTag',\r\n\t\t\t\tfake_input: '#'+id+'_tag'\r\n\t\t\t},settings);\r\n\r\n\t\t\tdelimiter[id] = data.delimiter;\r\n\r\n\t\t\tif (settings.onAddTag || settings.onRemoveTag || settings.onChange) {\r\n\t\t\t\ttags_callbacks[id] = new Array();\r\n\t\t\t\ttags_callbacks[id]['onAddTag'] = settings.onAddTag;\r\n\t\t\t\ttags_callbacks[id]['onRemoveTag'] = settings.onRemoveTag;\r\n\t\t\t\ttags_callbacks[id]['onChange'] = settings.onChange;\r\n\t\t\t}\r\n\r\n\t\t\tvar markup = '<div id=\"'+id+'_tagsinput\" class=\"tagsinput\"><div id=\"'+id+'_addTag\">';\r\n\r\n\t\t\tif (settings.interactive) {\r\n\t\t\t\tmarkup = markup + '<input id=\"'+id+'_tag\" value=\"\" data-default=\"'+settings.defaultText+'\" />';\r\n\t\t\t}\r\n\r\n\t\t\tmarkup = markup + '</div><div class=\"tags_clear\"></div></div>';\r\n\r\n\t\t\t$(markup).insertAfter(this);\r\n\r\n\t\t\t$(data.holder).css('width',settings.width);\r\n\t\t\t$(data.holder).css('min-height',settings.height);\r\n\t\t\t$(data.holder).css('height',settings.height);\r\n\r\n\t\t\tif ($(data.real_input).val()!='') {\r\n\t\t\t\t$.fn.tagsInput.importTags($(data.real_input),$(data.real_input).val());\r\n\t\t\t}\r\n\t\t\tif (settings.interactive) {\r\n\t\t\t\t$(data.fake_input).val($(data.fake_input).attr('data-default'));\r\n\t\t\t\t$(data.fake_input).css('color',settings.placeholderColor);\r\n\t\t        $(data.fake_input).resetAutosize(settings);\r\n\r\n\t\t\t\t$(data.holder).bind('click',data,function(event) {\r\n\t\t\t\t\t$(event.data.fake_input).focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(data.fake_input).bind('focus',data,function(event) {\r\n\t\t\t\t\tif ($(event.data.fake_input).val()==$(event.data.fake_input).attr('data-default')) {\r\n\t\t\t\t\t\t$(event.data.fake_input).val('');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$(event.data.fake_input).css('color','#000000');\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (settings.autocomplete_url != undefined) {\r\n\t\t\t\t\tautocomplete_options = {source: settings.autocomplete_url};\r\n\t\t\t\t\tfor (attrname in settings.autocomplete) {\r\n\t\t\t\t\t\tautocomplete_options[attrname] = settings.autocomplete[attrname];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (jQuery.Autocompleter !== undefined) {\r\n\t\t\t\t\t\t$(data.fake_input).autocomplete(settings.autocomplete_url, settings.autocomplete);\r\n\t\t\t\t\t\t$(data.fake_input).bind('result',data,function(event,data,formatted) {\r\n\t\t\t\t\t\t\tif (data) {\r\n\t\t\t\t\t\t\t\t$('#'+id).addTag(data[0] + \"\",{focus:true,unique:(settings.unique)});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t  \t});\r\n\t\t\t\t\t} else if (jQuery.ui.autocomplete !== undefined) {\r\n\t\t\t\t\t\t$(data.fake_input).autocomplete(autocomplete_options);\r\n\t\t\t\t\t\t$(data.fake_input).bind('autocompleteselect',data,function(event,ui) {\r\n\t\t\t\t\t\t\t$(event.data.real_input).addTag(ui.item.value,{focus:true,unique:(settings.unique)});\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\t// if a user tabs out of the field, create a new tag\r\n\t\t\t\t\t\t// this is only available if autocomplete is not used.\r\n\t\t\t\t\t\t$(data.fake_input).bind('blur',data,function(event) {\r\n\t\t\t\t\t\t\tvar d = $(this).attr('data-default');\r\n\t\t\t\t\t\t\tif ($(event.data.fake_input).val()!='' && $(event.data.fake_input).val()!=d) {\r\n\t\t\t\t\t\t\t\tif( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )\r\n\t\t\t\t\t\t\t\t\t$(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$(event.data.fake_input).val($(event.data.fake_input).attr('data-default'));\r\n\t\t\t\t\t\t\t\t$(event.data.fake_input).css('color',settings.placeholderColor);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// if user types a default delimiter like comma,semicolon and then create a new tag\r\n\t\t\t\t$(data.fake_input).bind('keypress',data,function(event) {\r\n\t\t\t\t\tif (_checkDelimiter(event)) {\r\n\t\t\t\t\t    event.preventDefault();\r\n\t\t\t\t\t\tif( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )\r\n\t\t\t\t\t\t\t$(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});\r\n\t\t\t\t\t  \t$(event.data.fake_input).resetAutosize(settings);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} else if (event.data.autosize) {\r\n\t\t\t            $(event.data.fake_input).doAutosize(settings);\r\n\r\n          \t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t//Delete last tag on backspace\r\n\t\t\t\t// data.removeWithBackspace && $(data.fake_input).bind('keydown', function(event)\r\n\t\t\t\t// {\r\n\t\t\t\t// \tif(event.keyCode == 8 && $(this).val() == '')\r\n\t\t\t\t// \t{\r\n\t\t\t\t// \t\t event.preventDefault();\r\n\t\t\t\t// \t\t var last_tag = $(this).closest('.tagsinput').find('.tag:last').text();\r\n\t\t\t\t// \t\t var id = $(this).attr('id').replace(/_tag$/, '');\r\n\t\t\t\t// \t\t last_tag = last_tag.replace(/[\\s]+x$/, '');\r\n\t\t\t\t// \t\t $('#' + id).removeTag(escape(last_tag));\r\n\t\t\t\t// \t\t $(this).trigger('focus');\r\n\t\t\t\t// \t}\r\n\t\t\t\t// });\r\n\t\t\t\t// $(data.fake_input).blur();\r\n\r\n\t\t\t\t//Removes the not_valid class when user changes the value of the fake input\r\n\t\t\t\tif(data.unique) {\r\n\t\t\t\t    $(data.fake_input).keydown(function(event){\r\n\t\t\t\t        if(event.keyCode == 8 || String.fromCharCode(event.which).match(/\\w+|[\u00e1\u00e9\u00ed\u00f3\u00fa\u00c1\u00c9\u00cd\u00d3\u00da\u00f1\u00d1,/]+/)) {\r\n\t\t\t\t            $(this).removeClass('not_valid');\r\n\t\t\t\t        }\r\n\t\t\t\t    });\r\n\t\t\t\t}\r\n\t\t\t} // if settings.interactive\r\n\t\t});\r\n\r\n\t\treturn this;\r\n\r\n\t};\r\n\r\n\t$.fn.tagsInput.updateTagsField = function(obj,tagslist) {\r\n\t\tvar id = $(obj).attr('id');\r\n\t\t$(obj).val(tagslist.join(delimiter[id]));\r\n\t};\r\n\r\n\t$.fn.tagsInput.importTags = function(obj,val) {\r\n\t\t$(obj).val('');\r\n\t\tvar id = $(obj).attr('id');\r\n\t\tvar tags = val.split(delimiter[id]);\r\n\t\tfor (i=0; i<tags.length; i++) {\r\n\t\t\t$(obj).addTag(tags[i],{focus:false,callback:false});\r\n\t\t}\r\n\t\tif(tags_callbacks[id] && tags_callbacks[id]['onChange'])\r\n\t\t{\r\n\t\t\tvar f = tags_callbacks[id]['onChange'];\r\n\t\t\tf.call(obj, obj, tags[i]);\r\n\t\t}\r\n\t};\r\n\r\n   /**\r\n     * check delimiter Array\r\n     * @param event\r\n     * @returns {boolean}\r\n     * @private\r\n     */\r\n   var _checkDelimiter = function(event){\r\n      var found = false;\r\n      if (event.which == 13) {\r\n         return true;\r\n      }\r\n\r\n      if (typeof event.data.delimiter === 'string') {\r\n         if (event.which == event.data.delimiter.charCodeAt(0)) {\r\n            found = true;\r\n         }\r\n      } else {\r\n         $.each(event.data.delimiter, function(index, delimiter) {\r\n            if (event.which == delimiter.charCodeAt(0)) {\r\n               found = true;\r\n            }\r\n         });\r\n      }\r\n\r\n      return found;\r\n   }\r\n})(jQuery);\r\n","Magefan_Blog/js/form/element/link.js":"/**\n * Copyright \u00a9 Magefan (support@magefan.com). All rights reserved.\n * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).\n *\n * Glory to Ukraine! Glory to the heroes!\n */\n\ndefine([\n    'Magento_Ui/js/form/element/abstract'\n], function (AbstractElement) {\n    'use strict';\n\n    return AbstractElement.extend({\n        defaults: {\n            elementTmpl: 'Magefan_Blog/form/element/link'\n        },\n\n        initialize: function () {\n            this._super();\n\n            var value = this.value();\n            this.url = value.url;\n            this.title = value.title;\n            this.text = value.text;\n        },\n\n    });\n});","Magefan_Blog/js/components/new-category.js":"/**\n * Copyright \u00a9 Magefan (support@magefan.com). All rights reserved.\n * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).\n *\n * Glory to Ukraine! Glory to the heroes!\n */\n\ndefine([\n    'Magefan_Blog/js/components/new-tag'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n\n        /**\n         * Normalize option object.\n         *\n         * @param {Object} data - Option object.\n         * @returns {Object}\n         */\n        parseData: function (data) {\n            return {\n                'is_active': data.model['is_active'],\n                level: data.model['level'],\n                value: data.model['category_id'],\n                label: data.model['title'],\n                parent: data.model['parent_id']\n            };\n        }\n    });\n});\n","Magefan_Blog/js/components/new-tag.js":"/**\n * Copyright \u00a9 Magefan (support@magefan.com). All rights reserved.\n * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).\n *\n * Glory to Ukraine! Glory to the heroes!\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/ui-select'\n], function (_, Select) {\n    'use strict';\n\n    function flatten(a, s, cr)\n    {\n        var i = 0, c;\n        a = _.compact(a);\n        cr = cr || [];\n        for (i; i < a.length; i++) {\n            cr.push(a[i]);\n            if (a[i].hasOwnProperty(s)) {\n                c = a[i][s];\n                delete a[i][s];\n                flatten.call(this, c, s, cr);\n            }\n        }\n        return cr;\n    }\n\n    return Select.extend({\n\n        /**\n         * Parse data and set it to options.\n         *\n         * @param {Object} data - Response data object.\n         * @returns {Object}\n         */\n        setParsed: function (data) {\n            var option = this.parseData(data),\n                copyOptionsTree\n            if (data.error) {\n                return this;\n            }\n\n            this.options([]);\n            if (!option.parent) {\n                this.cacheOptions.tree.push(option);\n                copyOptionsTree = JSON.parse(JSON.stringify(this.cacheOptions.tree));\n                this.cacheOptions.plain = flatten(copyOptionsTree, this.separator);\n                this.options(this.cacheOptions.tree);\n            } else {\n                this.setOption(option);\n            }\n            this.set('newOption', option);\n        },\n\n        /**\n         * Normalize option object.\n         *\n         * @param {Object} data - Option object.\n         * @returns {Object}\n         */\n        parseData: function (data) {\n            return {\n                'is_active': \"1\",\n                level: 0,\n                value: data.model['tag_id'],\n                label: data.model['title'],\n                parent: 0\n            };\n        }\n    });\n});\n","Magento_PageBuilder/ts/babel/plugin-amd-to-magento-amd/ast-utils.js":"/* jscs:disable */\n/* eslint-disable */\n\n/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n\"use strict\";\n\nexports.__esModule = true;\nexports.extractDependencyAndFactory = extractDependencyAndFactory;\nexports.findAmdModule = findAmdModule;\nexports.extractDependencyMap = extractDependencyMap;\nexports.removeExportsDependency = removeExportsDependency;\nexports.isEsModulePropertyDefinition = isEsModulePropertyDefinition;\nexports.isObjectAssignment = isObjectAssignment;\nexports.isVoidExpression = isVoidExpression;\nexports.isInteropRequireCall = isInteropRequireCall;\nexports.isInteropRequireDefinition = isInteropRequireDefinition;\n\nvar t = _interopRequireWildcard(require(\"@babel/types\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar INTEROP_FUNCTION_NAME = '_interopRequire';\n\nvar findExpression = function findExpression(path) {\n    if (!t.isExpressionStatement(path.node)) {\n        return false;\n    }\n\n    return path.get('expression');\n};\n\nvar isObjectProperty = function isObjectProperty(path, objectName, propertyName) {\n    return t.isMemberExpression(path) && path.get('object').isIdentifier(t.identifier(objectName)) && path.get('property').isIdentifier(t.identifier(propertyName));\n};\n\nfunction extractDependencyAndFactory(path) {\n    var args = path.node.arguments;\n    var dependencies = path.get(\"arguments.\" + (args.length - 2));\n    var factory = path.get(\"arguments.\" + (args.length - 1));\n    return {\n        dependencies: dependencies,\n        factory: factory\n    };\n}\n\nfunction findAmdModule(path) {\n    if (!path.parentPath.isProgram()) {\n        return false;\n    }\n\n    var expression = findExpression(path);\n\n    if (!expression || !t.isCallExpression(expression) || !t.isIdentifier(expression.node.callee, {\n        name: 'define'\n    })) {\n        return false;\n    }\n\n    var _extractDependencyAnd = extractDependencyAndFactory(expression),\n        dependencies = _extractDependencyAnd.dependencies,\n        factory = _extractDependencyAnd.factory;\n\n    if (dependencies && factory) {\n        return expression;\n    }\n\n    return false;\n}\n\nfunction extractDependencyMap(path) {\n    var dependencyMap = {};\n\n    var _extractDependencyAnd2 = extractDependencyAndFactory(path),\n        dependencies = _extractDependencyAnd2.dependencies,\n        factory = _extractDependencyAnd2.factory;\n\n    var dependencyList = dependencies.node.elements;\n    var factoryParams = factory.node.params;\n    dependencyList.forEach(function (dependency, index) {\n        if (factoryParams[index]) {\n            dependencyMap[dependency.value] = factoryParams[index];\n        }\n    });\n    return dependencyMap;\n}\n\nfunction removeExportsDependency(path) {\n    var _extractDependencyAnd3 = extractDependencyAndFactory(path),\n        dependencies = _extractDependencyAnd3.dependencies,\n        factory = _extractDependencyAnd3.factory;\n\n    var dependencyMap = extractDependencyMap(path);\n\n    if (!dependencyMap.exports) {\n        return;\n    }\n\n    dependencies.node.elements = dependencies.node.elements.filter(function (item) {\n        return !t.isStringLiteral(item, {\n            value: 'exports'\n        });\n    });\n    factory.node.params = factory.node.params.filter(function (item) {\n        return !t.isIdentifier(item, dependencyMap.exports);\n    });\n}\n\nfunction isEsModulePropertyDefinition(path, scope) {\n    var callExpression = findExpression(path);\n    var callee = callExpression.get('callee');\n    var callArguments = callExpression.node.arguments;\n    var isObjectDefinePropertyCall = isObjectProperty(callee, 'Object', 'defineProperty');\n\n    if (isObjectDefinePropertyCall) {\n        var isEsModulePropertyInArguments = t.isStringLiteral(callArguments[1], {\n            value: '__esModule'\n        });\n        var isInScope = t.isIdentifier(callArguments[0], scope);\n        return isEsModulePropertyInArguments && isInScope;\n    }\n\n    return false;\n}\n\nfunction isObjectAssignment(path, objectId) {\n    var expression = t.isAssignmentExpression(path) ? path : findExpression(path);\n    var isMemberAssignment = t.isAssignmentExpression(expression) && t.isMemberExpression(expression.get('left'));\n\n    if (isMemberAssignment) {\n        return t.isNodesEquivalent(expression.get('left.object').node, objectId);\n    }\n\n    return false;\n}\n\nfunction isVoidExpression(path) {\n    return t.isUnaryExpression(path) && path.node.operator === 'void';\n}\n\nfunction isInteropRequireCall(path) {\n    var expression = findExpression(path);\n    var isAssignmentCall = t.isAssignmentExpression(expression) && t.isCallExpression(expression.get('right'));\n\n    if (isAssignmentCall) {\n        var callee = expression.get('right.callee');\n        return callee.isIdentifier() && callee.node.name.indexOf(INTEROP_FUNCTION_NAME) === 0;\n    }\n\n    return false;\n}\n\nfunction isInteropRequireDefinition(path) {\n    if (t.isFunction(path) && path.node.id) {\n        return path.node.id.name.indexOf(INTEROP_FUNCTION_NAME) === 0;\n    }\n\n    return false;\n}","Magento_PageBuilder/ts/babel/plugin-amd-to-magento-amd/index.js":"/* jscs:disable */\n/* eslint-disable */\n\n/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\n\nvar _astUtils = require(\"./ast-utils\");\n\nvar t = _interopRequireWildcard(require(\"@babel/types\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar replaceExportAssignment = function replaceExportAssignment(path, state) {\n    var property = path.get('left.property');\n    var expression = path.get('right');\n    path.remove();\n\n    if ((0, _astUtils.isVoidExpression)(expression)) {\n        return;\n    }\n\n    if (property.isIdentifier({\n        name: 'default'\n    })) {\n        state.defaultExport = expression.node;\n        return;\n    }\n\n    state.exports.push(t.objectProperty(property.node, expression.node));\n};\n\nvar memberExpressionVisitor = {\n    MemberExpression: function MemberExpression(path, state) {\n        var matchedDependencies = state.dependencies.filter(function (item) {\n            return path.get('object').isIdentifier({\n                name: item.name\n            });\n        });\n        var isDefaultDependency = matchedDependencies.length === 1 && path.get('property').isIdentifier({\n            name: 'default'\n        });\n\n        if (isDefaultDependency) {\n            path.replaceWith(matchedDependencies[0]);\n        }\n    }\n};\nvar functionBodyVisitor = {\n    ExpressionStatement: function ExpressionStatement(path, state) {\n        if ((0, _astUtils.isEsModulePropertyDefinition)(path, state.scope)) {\n            path.remove();\n        }\n\n        if ((0, _astUtils.isObjectAssignment)(path, state.scope)) {\n            replaceExportAssignment(path.get('expression'), state);\n        }\n\n        if ((0, _astUtils.isInteropRequireCall)(path)) {\n            path.remove();\n        }\n    },\n    Function: function Function(path, state) {\n        if ((0, _astUtils.isInteropRequireDefinition)(path)) {\n            path.remove();\n        }\n\n        path.traverse(memberExpressionVisitor, state);\n    },\n    ClassMethod: function ClassMethod(path, state) {\n        path.traverse(memberExpressionVisitor, state);\n    },\n    DirectiveLiteral: function DirectiveLiteral(path) {\n        if (path.node.value === 'use strict') {\n            path.parentPath.remove();\n        }\n    },\n    MemberExpression: memberExpressionVisitor.MemberExpression\n};\n\nvar processAmdDefinition = function processAmdDefinition(path) {\n    var _extractDependencyAnd = (0, _astUtils.extractDependencyAndFactory)(path),\n        factory = _extractDependencyAnd.factory;\n\n    var dependencyMap = (0, _astUtils.extractDependencyMap)(path);\n\n    if (dependencyMap.exports) {\n        (0, _astUtils.removeExportsDependency)(path);\n        var state = {\n            scope: dependencyMap.exports,\n            dependencies: Object.values(dependencyMap),\n            exports: []\n        };\n        factory.traverse(functionBodyVisitor, state);\n        var returnStatement = t.objectExpression(state.exports);\n\n        if (state.defaultExport) {\n            returnStatement = state.defaultExport;\n\n            if (state.exports.length > 0) {\n                returnStatement = t.callExpression(t.memberExpression(t.identifier('Object'), t.identifier('assign')), [state.defaultExport, t.objectExpression(state.exports)]);\n            }\n        }\n\n        factory.get('body').pushContainer('body', t.returnStatement(returnStatement));\n    }\n};\n\nvar programVisitor = {\n    ExpressionStatement: function ExpressionStatement(path) {\n        var amdModule = (0, _astUtils.findAmdModule)(path);\n\n        if (amdModule) {\n            processAmdDefinition(amdModule);\n        }\n    }\n};\n\nfunction _default() {\n    return {\n        visitor: {\n            Program: {\n                exit: function exit(path) {\n                    path.traverse(programVisitor);\n                }\n            }\n        }\n    };\n}","Magento_PageBuilder/ts/babel/plugin-resolve-magento-imports/index.js":"/* jscs:disable */\n/* eslint-disable */\n\n/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\nvar path = require('path');\n\n/**\n * Convert the relative path imports within TypeScript into absolute paths with pre-fixed module name\n *\n * @returns {{visitor: {ImportDeclaration: visitor.ImportDeclaration}}}\n */\nmodule.exports = function () {\n    'use strict';\n\n    return {\n        visitor: {\n            /**\n             * Convert ../../utils/util import into Magento_Module/js/utils/util\n             *\n             * @param {Object} importPath\n             * @param {Object} state\n             * @constructor\n             */\n            ImportDeclaration: function (importPath, state) {\n                var importExpression = importPath.node.source.value;\n\n                if (!state.opts.prefix) {\n                    throw Error('Prefix must be defined');\n                }\n\n                // Is the file being imported from another directory?\n                if (!path.isAbsolute(importExpression) && importExpression.includes('./')) {\n                    importPath.node.source.value = path.resolve(\n                        path.dirname(state.file.opts.filename.replace(\n                            state.opts.path,\n                            \"\"\n                        )),\n                        importExpression\n                    ).replace(\n                        process.cwd(),\n                        state.opts.prefix.replace(/\\/+$/, '')\n                    );\n                }\n            }\n        }\n    };\n};\n","Magento_PageBuilder/js/page-builder.js":"/*eslint-disable */\n/* jscs:disable */\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\ndefine([\"jquery\", \"knockout\", \"mage/translate\", \"Magento_PageBuilder/js/events\", \"Magento_Ui/js/lib/knockout/template/loader\", \"Magento_Ui/js/modal/alert\", \"mageUtils\", \"underscore\", \"Magento_PageBuilder/js/acl\", \"Magento_PageBuilder/js/binding/style\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/content-type-factory\", \"Magento_PageBuilder/js/panel\", \"Magento_PageBuilder/js/stage\", \"Magento_PageBuilder/js/template-manager\"], function (_jquery, _knockout, _translate, _events, _loader, _alert, _mageUtils, _underscore, _acl, _style, _config, _contentTypeFactory, _panel, _stage, _templateManager) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var PageBuilder = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function PageBuilder(config, initialValue) {\n      var _this = this;\n\n      this.template = \"Magento_PageBuilder/page-builder\";\n      this.isStageReady = _knockout.observable(false);\n      this.id = _mageUtils.uniqueid();\n      this.originalScrollTop = 0;\n      this.isFullScreen = _knockout.observable(false);\n      this.isSnapshot = _knockout.observable(false);\n      this.isSnapshotTransition = _knockout.observable(false);\n      this.loading = _knockout.observable(true);\n      this.wrapperStyles = _knockout.observable({});\n      this.stageStyles = _knockout.observable({});\n      this.viewport = _knockout.observable(\"\");\n      this.viewports = {};\n      this.viewportClasses = {};\n      this.previousStyles = {};\n\n      _config.setConfig(config);\n\n      _config.setMode(\"Preview\");\n\n      this.preloadTemplates(config);\n      this.initialValue = initialValue;\n      this.initViewports(config);\n      this.isFullScreen(config.isFullScreen);\n      this.isSnapshot(!!config.pagebuilder_content_snapshot);\n      this.isSnapshotTransition(false);\n      this.snapshot = !!config.pagebuilder_content_snapshot;\n      this.config = config;\n      this.isAllowedTemplateApply = (0, _acl.isAllowed)(_acl.resources.TEMPLATE_APPLY);\n      this.isAllowedTemplateSave = (0, _acl.isAllowed)(_acl.resources.TEMPLATE_SAVE); // Create the required root container for the stage\n\n      (0, _contentTypeFactory)(_config.getContentTypeConfig(_stage.rootContainerName), null, this.id).then(function (rootContainer) {\n        _this.stage = new _stage(_this, rootContainer);\n\n        _this.isStageReady(true);\n      });\n      this.panel = new _panel(this);\n      this.initListeners();\n    }\n    /**\n     * Destroy rootContainer instance.\n     */\n\n\n    var _proto = PageBuilder.prototype;\n\n    _proto.destroy = function destroy() {\n      this.stage.rootContainer.destroy();\n    }\n    /**\n     * Init listeners.\n     */\n    ;\n\n    _proto.initListeners = function initListeners() {\n      var _this2 = this;\n\n      _events.on(\"stage:\" + this.id + \":toggleFullscreen\", this.toggleFullScreen.bind(this));\n\n      this.isFullScreen.subscribe(function () {\n        return _this2.onFullScreenChange();\n      });\n    }\n    /**\n     * Tells the stage wrapper to expand to fullScreen\n     *\n     * @param {StageToggleFullScreenParamsInterface} args\n     */\n    ;\n\n    _proto.toggleFullScreen = function toggleFullScreen(args) {\n      var _this3 = this;\n\n      if (args.animate === false) {\n        this.isFullScreen(!this.isFullScreen());\n        return;\n      }\n\n      var stageWrapper = (0, _jquery)(\"#\" + this.stage.id).parent();\n      var pageBuilderWrapper = stageWrapper.parents(\".pagebuilder-wysiwyg-wrapper\");\n      var panel = stageWrapper.find(\".pagebuilder-panel\");\n\n      if (this.snapshot) {\n        stageWrapper.scrollTop(0);\n      }\n\n      if (!this.isFullScreen()) {\n        pageBuilderWrapper.css(\"height\", pageBuilderWrapper.outerHeight());\n        /**\n         * Fix the stage in the exact place it is when it's part of the content and allow it to transition to full\n         * screen.\n         */\n\n        var xPosition = parseInt(stageWrapper.offset().top.toString(), 10) - parseInt((0, _jquery)(window).scrollTop().toString(), 10) - (this.snapshot ? 63 : 0);\n        var yPosition = stageWrapper.offset().left - (this.snapshot ? 150 : 0);\n        this.previousStyles = {\n          position: this.snapshot ? \"relative\" : \"fixed\",\n          top: xPosition + \"px\",\n          left: yPosition + \"px\",\n          zIndex: \"800\",\n          width: stageWrapper.outerWidth().toString() + \"px\"\n        };\n\n        if (this.snapshot) {\n          this.isSnapshot(false);\n          this.stageStyles(this.previousStyles);\n        } else {\n          this.previousPanelHeight = panel.outerHeight();\n          panel.css(\"height\", this.previousPanelHeight + \"px\");\n          this.wrapperStyles(this.previousStyles);\n        }\n\n        this.isFullScreen(true);\n\n        _underscore.defer(function () {\n          // Remove all styles we applied to fix the position once we're transitioning\n          panel.css(\"height\", \"\");\n\n          if (_this3.snapshot) {\n            _this3.stageStyles(Object.keys(_this3.previousStyles).reduce(function (object, styleName) {\n              var _Object$assign;\n\n              return Object.assign(object, (_Object$assign = {}, _Object$assign[styleName] = \"\", _Object$assign));\n            }, {}));\n          } else {\n            _this3.wrapperStyles(Object.keys(_this3.previousStyles).reduce(function (object, styleName) {\n              var _Object$assign2;\n\n              return Object.assign(object, (_Object$assign2 = {}, _Object$assign2[styleName] = \"\", _Object$assign2));\n            }, {}));\n          }\n        });\n      } else {\n        // When leaving full screen mode just transition back to the original state\n        if (this.snapshot) {\n          this.isSnapshotTransition(true);\n          this.stageStyles(this.previousStyles);\n        } else {\n          this.wrapperStyles(this.previousStyles);\n          this.isFullScreen(false);\n        }\n\n        panel.css(\"height\", this.previousPanelHeight + \"px\"); // Wait for the 350ms animation to complete before changing these properties back\n\n        _underscore.delay(function () {\n          if (_this3.snapshot) {\n            _this3.isSnapshot(true);\n\n            _this3.isSnapshotTransition(false);\n\n            _this3.stageStyles(Object.keys(_this3.previousStyles).reduce(function (object, styleName) {\n              var _Object$assign3;\n\n              return Object.assign(object, (_Object$assign3 = {}, _Object$assign3[styleName] = \"\", _Object$assign3));\n            }, {}));\n\n            _this3.isFullScreen(false);\n          } else {\n            _this3.wrapperStyles(Object.keys(_this3.previousStyles).reduce(function (object, styleName) {\n              var _Object$assign4;\n\n              return Object.assign(object, (_Object$assign4 = {}, _Object$assign4[styleName] = \"\", _Object$assign4));\n            }, {}));\n          }\n\n          panel.css(\"height\", \"\");\n          pageBuilderWrapper.css(\"height\", \"\");\n          _this3.previousStyles = {};\n          _this3.previousPanelHeight = null;\n        }, 350);\n      }\n\n      return true;\n    }\n    /**\n     * Change window scroll base on full screen mode.\n     */\n    ;\n\n    _proto.onFullScreenChange = function onFullScreenChange() {\n      if (this.isFullScreen()) {\n        (0, _jquery)(\"body\").css(\"overflow\", \"hidden\");\n      } else {\n        (0, _jquery)(\"body\").css(\"overflow\", \"\");\n      }\n\n      _events.trigger(\"stage:\" + this.id + \":fullScreenModeChangeAfter\", {\n        fullScreen: this.isFullScreen()\n      });\n\n      _events.trigger(\"stage:fullScreenModeChangeAfter\", {\n        pageBuilderId: this.id,\n        fullScreen: this.isFullScreen()\n      });\n    }\n    /**\n     * Get template.\n     *\n     * @returns {string}\n     */\n    ;\n\n    _proto.getTemplate = function getTemplate() {\n      return this.template;\n    };\n\n    /**\n     * Toggle template manager\n     */\n    _proto.toggleTemplateManger = function toggleTemplateManger() {\n      if (!(0, _acl.isAllowed)(_acl.resources.TEMPLATE_APPLY)) {\n        (0, _alert)({\n          content: (0, _translate)(\"You do not have permission to apply templates.\"),\n          title: (0, _translate)(\"Permission Error\")\n        });\n        return false;\n      }\n\n      _events.trigger(\"stage:templateManager:open\", {\n        stage: this.stage\n      });\n    }\n    /**\n     * Enable saving the current stage as a template\n     */\n    ;\n\n    _proto.saveAsTemplate = function saveAsTemplate() {\n      return (0, _templateManager.saveAsTemplate)(this.stage);\n    };\n\n    _proto.toggleViewport = function toggleViewport(viewport) {\n      var previousViewport = this.viewport();\n      this.viewport(viewport);\n\n      _underscore.each(this.viewportClasses, function (viewportClass) {\n        viewportClass(false);\n      });\n\n      this.viewportClasses[viewport + \"-viewport\"](true);\n\n      _config.setConfig({\n        viewport: viewport\n      });\n\n      _events.trigger(\"stage:\" + this.id + \":viewportChangeAfter\", {\n        viewport: viewport,\n        previousViewport: previousViewport\n      });\n\n      _events.trigger(\"stage:viewportChangeAfter\", {\n        viewport: viewport,\n        previousViewport: previousViewport\n      });\n    }\n    /**\n     * Preload all templates into the window to reduce calls later in the app\n     *\n     * @param config\n     */\n    ;\n\n    _proto.preloadTemplates = function preloadTemplates(config) {\n      var previewTemplates = _underscore.values(config.content_types).map(function (contentType) {\n        return _underscore.values(contentType.appearances).map(function (appearance) {\n          return appearance.preview_template;\n        });\n      }).reduce(function (array, value) {\n        return array.concat(value);\n      }, []).map(function (value) {\n        return (0, _loader.formatPath)(value);\n      });\n\n      _underscore.defer(function () {\n        require(previewTemplates);\n      });\n    };\n\n    _proto.initViewports = function initViewports(config) {\n      var _this4 = this;\n\n      this.viewports = config.viewports;\n      this.defaultViewport = config.defaultViewport;\n      this.viewport(this.defaultViewport);\n\n      _config.setConfig({\n        viewport: this.defaultViewport\n      });\n\n      _underscore.each(this.viewports, function (viewport, name) {\n        _this4.viewportClasses[name + \"-viewport\"] = _knockout.observable(name === _this4.defaultViewport);\n      });\n    };\n\n    _createClass(PageBuilder, [{\n      key: \"viewportTemplate\",\n      get: function get() {\n        return \"Magento_PageBuilder/viewport/switcher\";\n      }\n    }]);\n\n    return PageBuilder;\n  }();\n\n  return PageBuilder;\n});\n//# sourceMappingURL=page-builder.js.map","Magento_PageBuilder/js/panel.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"consoleLogger\", \"jquery\", \"knockout\", \"mage/translate\", \"Magento_PageBuilder/js/events\", \"underscore\", \"Magento_PageBuilder/js/binding/draggable\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/drag-drop/drop-indicators\", \"Magento_PageBuilder/js/drag-drop/registry\", \"Magento_PageBuilder/js/panel/menu\", \"Magento_PageBuilder/js/panel/menu/content-type\", \"Magento_PageBuilder/js/utils/position-sticky\"], function (_consoleLogger, _jquery, _knockout, _translate, _events, _underscore, _draggable, _config, _dropIndicators, _registry, _menu, _contentType, _positionSticky) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Panel = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Panel(pageBuilder) {\n      this.menuSections = _knockout.observableArray([]);\n      this.searchResults = _knockout.observableArray([]);\n      this.isVisible = _knockout.observable(false);\n      this.isStickyBottom = _knockout.observable(false);\n      this.isStickyTop = _knockout.observable(false);\n      this.searching = _knockout.observable(false);\n      this.searchValue = _knockout.observable(\"\");\n      this.searchPlaceholder = (0, _translate)(\"Find items\");\n      this.searchNoResult = (0, _translate)(\"Nothing found\");\n      this.searchTitle = (0, _translate)(\"Clear Search\");\n      this.template = \"Magento_PageBuilder/panel\";\n      this.pageBuilder = pageBuilder;\n      this.id = this.pageBuilder.id;\n      this.initListeners();\n    }\n    /**\n     * On render init the panel\n     *\n     * @param {Element} element\n     */\n\n\n    var _proto = Panel.prototype;\n\n    _proto.afterRender = function afterRender(element) {\n      this.element = element;\n    }\n    /**\n     * Init listeners\n     */\n    ;\n\n    _proto.initListeners = function initListeners() {\n      var _this = this;\n\n      _events.on(\"stage:\" + this.id + \":readyAfter\", function () {\n        _this.populateContentTypes();\n\n        if (!(0, _positionSticky.supportsPositionSticky)()) {\n          _this.onScroll();\n        }\n\n        _this.isVisible(true);\n      });\n    }\n    /**\n     * Return the template string\n     *\n     * @returns {string}\n     */\n    ;\n\n    _proto.getTemplate = function getTemplate() {\n      return this.template;\n    }\n    /**\n     * Conduct a search on the available content types,\n     * and find matches for beginning of words.\n     *\n     * @param self\n     * @param event\n     */\n    ;\n\n    _proto.search = function search(self, event) {\n      var _this2 = this;\n\n      this.searchValue(event.currentTarget.value.toLowerCase());\n\n      if (this.searchValue() === \"\") {\n        this.searching(false);\n      } else {\n        this.searching(true);\n        this.searchResults(_underscore.map(_underscore.filter(_config.getConfig(\"content_types\"), function (contentType) {\n          if (contentType.is_system !== true) {\n            return false;\n          }\n\n          var escapedSearchValue = self.searchValue().replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n          var regEx = new RegExp(\"\\\\b\" + escapedSearchValue, \"gi\");\n          return regEx.test(contentType.label.toLowerCase());\n        }), function (contentType, identifier) {\n          // Create a new instance of GroupContentType for each result\n          return new _contentType.ContentType(identifier, contentType, _this2.pageBuilder.stage.id);\n        }));\n      }\n    }\n    /**\n     * Clear Search Results\n     */\n    ;\n\n    _proto.clearSearch = function clearSearch() {\n      this.searchValue(\"\");\n      this.searching(false);\n    }\n    /**\n     * Toggle stickiness of panel based on browser scroll position and height of panel\n     * Enable panel stickiness if panel and stage are available\n     * Only stick when panel height is smaller than stage height\n     * Stick panel to top when scroll reaches top position of stage\n     * Stick panel to bottom when scroll reaches bottom position of stage\n     */\n    ;\n\n    _proto.onScroll = function onScroll() {\n      var self = this;\n      var pageActions = (0, _jquery)(\".page-actions\");\n      var panel = (0, _jquery)(this.element);\n      panel.addClass(\"no-position-sticky\");\n      var stage = panel.siblings(\".pagebuilder-stage\");\n      (0, _jquery)(window).scroll(function () {\n        if (panel && panel.offset()) {\n          var panelOffsetTop = panel.offset().top;\n          var stageOffsetTop = stage.offset().top;\n          var panelHeight = panel.outerHeight();\n          var stageHeight = stage.outerHeight();\n          var currentPanelBottom = Math.round(panelOffsetTop + panel.outerHeight(true) - (0, _jquery)(this).scrollTop());\n          var currentStageBottom = Math.round(stageOffsetTop + stage.outerHeight(true) - (0, _jquery)(this).scrollTop());\n          var currentPanelTop = Math.round(panelOffsetTop - (0, _jquery)(this).scrollTop());\n          var currentStageTop = Math.round(stageOffsetTop - (0, _jquery)(this).scrollTop()); // When panel height is less than stage, begin stickiness\n\n          if (panelHeight <= stageHeight && pageActions.hasClass(\"_fixed\")) {\n            var pageActionsHeight = pageActions.outerHeight() + 15; // When scroll reaches top of stage, stick panel to top\n\n            if (currentStageTop <= pageActionsHeight) {\n              // When panel reaches bottom of stage, stick panel to bottom of stage\n              if (currentPanelBottom >= currentStageBottom && currentPanelTop <= pageActionsHeight) {\n                self.isStickyBottom(true);\n                self.isStickyTop(false);\n              } else {\n                self.isStickyBottom(false);\n                self.isStickyTop(true);\n              }\n            } else {\n              self.isStickyBottom(false);\n              self.isStickyTop(false);\n            }\n          } else {\n            self.isStickyBottom(false);\n            self.isStickyTop(false);\n          }\n        }\n      });\n    }\n    /**\n     * Retrieve the draggable options for the panel items\n     *\n     * @returns {JQueryUI.DraggableOptions}\n     */\n    ;\n\n    _proto.getDraggableOptions = function getDraggableOptions(element) {\n      // If we're within a modal make the containment be the current modal\n      var containment;\n\n      if ((0, _jquery)(element).parents(\".modal-inner-wrap\").length > 0) {\n        containment = (0, _jquery)(element).parents(\".modal-inner-wrap\");\n      }\n\n      var self = this;\n      return {\n        appendTo: \"body\",\n        cursor: \"-webkit-grabbing\",\n        connectToSortable: \".content-type-drop\",\n        containment: containment || \"document\",\n        scroll: true,\n        helper: function helper() {\n          return (0, _jquery)(this).clone().css({\n            width: (0, _jquery)(this).width(),\n            height: (0, _jquery)(this).height(),\n            zIndex: 10001,\n            pointerEvents: \"none\"\n          });\n        },\n        start: function start() {\n          var block = _knockout.dataFor(this);\n\n          if (block && block.config) {\n            // Blur any focused element\n            if (document.querySelector(\":focus\")) {\n              document.querySelector(\":focus\").blur();\n            }\n            /**\n             * Swap all sortable instances to use intersect, as the item from the left panel is a predictable\n             * size this yields better results when dragging\n             */\n\n\n            (0, _jquery)(\".content-type-container.ui-sortable\").each(function () {\n              if ((0, _jquery)(this).data(\"ui-sortable\")) {\n                (0, _jquery)(this).sortable(\"option\", \"tolerance\", \"intersect\");\n              }\n            });\n            (0, _dropIndicators.showDropIndicators)(block.config.name, self.pageBuilder.stage.id);\n            (0, _registry.setDraggedContentTypeConfig)(block.config);\n\n            _events.trigger(\"stage:interactionStart\", {\n              stage: self.pageBuilder.stage\n            });\n          }\n        },\n        stop: function stop() {\n          (0, _jquery)(\".content-type-container.ui-sortable\").each(function () {\n            if ((0, _jquery)(this).data(\"ui-sortable\")) {\n              (0, _jquery)(this).sortable(\"option\", \"tolerance\", \"pointer\");\n            }\n          });\n          (0, _dropIndicators.hideDropIndicators)();\n          (0, _registry.setDraggedContentTypeConfig)(null);\n\n          _events.trigger(\"stage:interactionStop\", {\n            stage: self.pageBuilder.stage\n          });\n        }\n      };\n    }\n    /**\n     * Populate the panel with the content types\n     */\n    ;\n\n    _proto.populateContentTypes = function populateContentTypes() {\n      var _this3 = this;\n\n      var menuSections = _config.getConfig(\"menu_sections\");\n\n      var contentTypes = _config.getConfig(\"content_types\"); // Verify the configuration contains the required information\n\n\n      if (menuSections && contentTypes) {\n        // Iterate through the menu sections creating new instances with their associated content types\n        _underscore.each(menuSections, function (menuSection, id) {\n          // Push the menu section instance into the observable array to update the UI\n          _this3.menuSections.push(new _menu.Menu(id, menuSection, _underscore.map(_underscore.where(contentTypes, {\n            menu_section: id,\n            is_system: true\n          }),\n          /* Retrieve content types with menu section id */\n          function (contentType, identifier) {\n            return new _contentType.ContentType(identifier, contentType, _this3.pageBuilder.stage.id);\n          }), _this3.pageBuilder.stage.id));\n        }); // Display the panel\n\n\n        this.isVisible(true); // Open first menu section\n\n        var hasGroups = (0 in this.menuSections());\n\n        if (hasGroups) {\n          this.menuSections()[0].active(true);\n        }\n      } else {\n        _consoleLogger.error(\"Unable to retrieve content types from server, please inspect network requests \" + \"response.\");\n      }\n    };\n\n    return Panel;\n  }();\n\n  return Panel;\n});\n//# sourceMappingURL=panel.js.map","Magento_PageBuilder/js/acl.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/config\"], function (_config) {\n  var resources = {\n    TEMPLATE_SAVE: \"template_save\",\n    TEMPLATE_APPLY: \"template_apply\"\n  };\n  /**\n   * Determine if the current user is allowed to access this resource\n   *\n   * Usage: isAllowed(resources.TEMPLATE_SAVE)\n   *\n   * @param resource\n   */\n\n  function isAllowed(resource) {\n    return _config.getConfig(\"acl\")[resource] === true;\n  }\n\n  return {\n    isAllowed: isAllowed,\n    resources: resources\n  };\n});\n//# sourceMappingURL=acl.js.map","Magento_PageBuilder/js/widget-initializer.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'underscore',\n    'jquery',\n    'mage/apply/main',\n    'Magento_Ui/js/lib/view/utils/dom-observer'\n], function (_, $, mage, domObserver) {\n    'use strict';\n\n    /**\n     * Initializes components assigned to HTML elements.\n     *\n     *\n     * @param {HTMLElement} el\n     * @param {Array} data\n     * @param {Object} breakpoints\n     * @param {Object} currentViewport\n     */\n    function initializeWidget(el, data, breakpoints, currentViewport) {\n        _.each(data, function (config, component) {\n            config = config || {};\n            config.breakpoints = breakpoints;\n            config.currentViewport = currentViewport;\n            mage.applyFor(el, config, component);\n        });\n    }\n\n    return function (data, contextElement) {\n        _.each(data.config, function (componentConfiguration, elementPath) {\n            domObserver.get(\n                elementPath,\n                function (element) {\n                    var $element = $(element);\n\n                    if (contextElement) {\n                        $element = $(contextElement).find(element);\n                    }\n\n                    if ($element.length) {\n                        initializeWidget($element, componentConfiguration, data.breakpoints, data.currentViewport);\n                    }\n                }\n            );\n        });\n    };\n});\n","Magento_PageBuilder/js/stage.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"jquery\", \"knockout\", \"Magento_PageBuilder/js/events\", \"Magento_PageBuilder/js/resource/jquery/ui/jquery.ui.touch-punch\", \"mageUtils\", \"underscore\", \"Magento_PageBuilder/js/binding/sortable\", \"Magento_PageBuilder/js/collection\", \"Magento_PageBuilder/js/data-store\", \"Magento_PageBuilder/js/drag-drop/matrix\", \"Magento_PageBuilder/js/master-format/render\", \"Magento_PageBuilder/js/stage-builder\", \"Magento_PageBuilder/js/utils/editor\", \"Magento_PageBuilder/js/utils/promise-deferred\"], function (_jquery, _knockout, _events, _jqueryUi, _mageUtils, _underscore, _sortable, _collection, _dataStore, _matrix, _render, _stageBuilder, _editor, _promiseDeferred) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var Stage = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * We always complete a single render when the stage is first loaded, so we can set the lock when the stage is\n     * created. The lock is used to halt the parent forms submission when Page Builder is rendering.\n     */\n\n    /**\n     * Debounce the applyBindings call by 500ms to stop duplicate calls\n     *\n     * @type {(() => void) & _.Cancelable}\n     */\n\n    /**\n     * @param {PageBuilderInterface} pageBuilder\n     * @param {ContentTypeCollectionInterface} rootContainer\n     */\n    function Stage(pageBuilder, rootContainer) {\n      var _this = this;\n\n      this.loading = _knockout.observable(true);\n      this.showBorders = _knockout.observable(false);\n      this.interacting = _knockout.observable(false);\n      this.userSelect = _knockout.observable(true);\n      this.focusChild = _knockout.observable(false);\n      this.dataStore = new _dataStore();\n      this.afterRenderDeferred = (0, _promiseDeferred)();\n      this.renderingLocks = [];\n      this.template = \"Magento_PageBuilder/content-type/preview\";\n      this.collection = new _collection();\n      this.applyBindingsDebounce = _underscore.debounce(function (renderId) {\n        _this.render.applyBindings(_this.rootContainer).then(function (renderedOutput) {\n          if (_this.lastRenderId === renderId) {\n            _events.trigger(\"stage:\" + _this.id + \":masterFormatRenderAfter\", {\n              value: (0, _editor.unescapeDoubleQuoteWithinWidgetDirective)(renderedOutput)\n            });\n\n            _this.renderingLocks.forEach(function (lock) {\n              lock.resolve(renderedOutput);\n            });\n          }\n        }).catch(function (error) {\n          if (error) {\n            console.error(error);\n          }\n        });\n      }, 500);\n      this.pageBuilder = pageBuilder;\n      this.id = pageBuilder.id;\n      this.render = new _render(pageBuilder.id);\n      this.rootContainer = rootContainer;\n      (0, _matrix.generateAllowedParents)(); // Fire an event after the DOM has rendered\n\n      this.afterRenderDeferred.promise.then(function () {\n        _this.render.setupChannel();\n\n        _events.trigger(\"stage:\" + _this.id + \":renderAfter\", {\n          stage: _this\n        });\n      }); // Wait for the stage to be built alongside the stage being rendered\n\n      Promise.all([(0, _stageBuilder)(this, (0, _editor.escapeDoubleQuoteWithinWidgetDirective)(this.pageBuilder.initialValue)), this.afterRenderDeferred.promise]).then(this.ready.bind(this)).catch(function (error) {\n        console.error(error);\n      });\n    }\n    /**\n     * Get template.\n     *\n     * @returns {string}\n     */\n\n\n    var _proto = Stage.prototype;\n\n    _proto.getTemplate = function getTemplate() {\n      return this.template;\n    }\n    /**\n     * The stage has been initiated fully and is ready\n     */\n    ;\n\n    _proto.ready = function ready() {\n      _events.trigger(\"stage:\" + this.id + \":readyAfter\", {\n        stage: this\n      });\n\n      this.loading(false);\n      this.initListeners(); // Ensure we complete an initial save of the data within the stage once we're ready\n\n      _events.trigger(\"stage:updateAfter\", {\n        stageId: this.id\n      });\n    }\n    /**\n     * Init listeners\n     */\n    ;\n\n    _proto.initListeners = function initListeners() {\n      var _this2 = this;\n\n      this.collection.getChildren().subscribe(function () {\n        return _events.trigger(\"stage:updateAfter\", {\n          stageId: _this2.id\n        });\n      }); // ContentType being removed from container\n\n      _events.on(\"contentType:removeAfter\", function (args) {\n        if (args.stageId === _this2.id) {\n          _this2.onContentTypeRemoved(args);\n        }\n      }); // Any store state changes trigger a stage update event\n\n\n      this.dataStore.subscribe(function () {\n        return _events.trigger(\"stage:updateAfter\", {\n          stageId: _this2.id\n        });\n      }); // Watch for stage update events & manipulations to the store, debounce for 50ms as multiple stage changes\n      // can occur concurrently.\n\n      _events.on(\"stage:updateAfter\", function (args) {\n        if (args.stageId === _this2.id) {\n          // Create the rendering lock straight away\n          _this2.createLock();\n\n          var renderId = _mageUtils.uniqueid();\n\n          _this2.lastRenderId = renderId;\n\n          _this2.applyBindingsDebounce(renderId);\n        }\n      });\n\n      var interactionLevel = 0;\n\n      _events.on(\"stage:interactionStart\", function () {\n        ++interactionLevel;\n\n        _this2.interacting(true);\n      });\n\n      _events.on(\"stage:interactionStop\", function (args) {\n        var forced = _underscore.isObject(args) && args.force === true;\n        interactionLevel = Math.max(interactionLevel - 1, 0);\n\n        if (interactionLevel === 0 || forced) {\n          _this2.interacting(false);\n\n          if (forced) {\n            interactionLevel = 0;\n          }\n        }\n      });\n\n      _events.on(\"stage:childFocusStart\", function () {\n        return _this2.focusChild(true);\n      });\n\n      _events.on(\"stage:childFocusStop\", function () {\n        return _this2.focusChild(false);\n      });\n    }\n    /**\n     * Create a new lock for rendering\n     */\n    ;\n\n    _proto.createLock = function createLock() {\n      this.renderingLocks.push(_jquery.Deferred());\n    }\n    /**\n     * On content type removed\n     *\n     * @param params\n     */\n    ;\n\n    _proto.onContentTypeRemoved = function onContentTypeRemoved(params) {\n      if (params.parentContentType) {\n        params.parentContentType.removeChild(params.contentType);\n      }\n    };\n\n    return Stage;\n  }();\n\n  Stage.rootContainerName = \"root-container\";\n  return Stage;\n});\n//# sourceMappingURL=stage.js.map","Magento_PageBuilder/js/events.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(['uiEvents'], function (uiEvents) {\n    'use strict';\n\n    return {\n\n        /**\n         * Calls callback when name event is triggered\n         *\n         * @param {String} events\n         * @param {Function} callback\n         * @param {Function} ns\n         * @return {Object}\n         */\n        on: function (events, callback, ns) {\n            uiEvents.on('pagebuilder:' + events, callback, 'pagebuilder:' + ns);\n\n            return this;\n        },\n\n        /**\n         * Removed callback from listening to target event\n         *\n         * @param {String} ns\n         * @return {Object}\n         */\n        off: function (ns) {\n            uiEvents.off('pagebuilder:' + ns);\n\n            return this;\n        },\n\n        /**\n         * Triggers event and executes all attached callbacks\n         *\n         * @param {String} name\n         * @param {any} args\n         * @returns {Boolean}\n         */\n        trigger: function (name, args) {\n            return uiEvents.trigger('pagebuilder:' + name, args);\n        }\n    };\n});\n","Magento_PageBuilder/js/content-type.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/events\", \"mageUtils\", \"underscore\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/data-store\"], function (_events, _mageUtils, _underscore, _config, _dataStore) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var ContentType = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * @param {ContentTypeInterface} parentContentType\n     * @param {ContentTypeConfigInterface} config\n     * @param {string} stageId\n     */\n    function ContentType(parentContentType, config, stageId) {\n      this.id = _mageUtils.uniqueid();\n      this.dataStore = new _dataStore();\n      this.dataStores = {};\n      this.dropped = false;\n      this.parentContentType = parentContentType;\n      this.config = config;\n      this.stageId = stageId;\n      this.initDataStores();\n      this.bindEvents();\n    }\n    /**\n     * Destroys current instance\n     */\n\n\n    var _proto = ContentType.prototype;\n\n    _proto.destroy = function destroy() {\n      var params = {\n        contentType: this,\n        index: this.parentContentType ? this.parentContentType.getChildren().indexOf(this) : null,\n        parentContentType: this.parentContentType,\n        stageId: this.stageId\n      };\n      this.preview ? this.preview.destroy() : this.content.destroy();\n\n      _events.trigger(\"contentType:removeAfter\", params);\n\n      _events.trigger(this.config.name + \":removeAfter\", params);\n    }\n    /**\n     * Get viewport fields.\n     *\n     * @param {string} viewport\n     * @param {DataObject} data\n     */\n    ;\n\n    _proto.getViewportFields = function getViewportFields(viewport, data) {\n      var viewportConfig = this.config.breakpoints[viewport];\n\n      if (!viewportConfig) {\n        return {};\n      }\n\n      return viewportConfig.fields[data.appearance + \"-appearance\"] || viewportConfig.fields.default;\n    }\n    /**\n     * Get data stores states only for viewport fields\n     */\n    ;\n\n    _proto.getDataStoresStates = function getDataStoresStates() {\n      var _this = this;\n\n      var result = {};\n\n      _underscore.each(this.dataStores, function (dataStore, name) {\n        if (_config.getConfig(\"defaultViewport\") !== name) {\n          var dataStoreFields = _underscore.keys(_this.getDiffViewportFields(name, dataStore.getState()));\n\n          result[name] = _underscore.pick(dataStore.getState(), dataStoreFields);\n        } else {\n          result[name] = dataStore.getState();\n        }\n      });\n\n      return result;\n    }\n    /**\n     * Set data to dataStore from dataStores base on current viewport.\n     *\n     * @param {String} viewport\n     */\n    ;\n\n    _proto.setViewportDataToDataStore = function setViewportDataToDataStore(viewport) {\n      var defaultViewport = _config.getConfig(\"defaultViewport\");\n\n      var currentViewportState = this.dataStores[viewport].getState();\n      var defaultViewportState = this.dataStores[defaultViewport].getState();\n\n      var viewportFields = _underscore.keys(this.getDiffViewportFields(viewport, currentViewportState)); // Filter viewport specific data for states\n\n\n      this.dataStore.setState(_underscore.extend({}, defaultViewportState, _underscore.pick(currentViewportState, viewportFields)));\n    };\n\n    _proto.bindEvents = function bindEvents() {\n      var _this2 = this;\n\n      var eventName = this.config.name + \":\" + this.id + \":updateAfter\";\n      var paramObj = {};\n      paramObj[this.id] = this;\n      this.dataStore.subscribe(function (state) {\n        var defaultViewport = _config.getConfig(\"defaultViewport\");\n\n        var viewport = _config.getConfig(\"viewport\") || defaultViewport;\n\n        if (viewport !== defaultViewport) {\n          var viewportFields = _underscore.keys(_this2.getViewportFields(viewport, state));\n\n          var diffViewportFields = _underscore.keys(_this2.getDiffViewportFields(viewport, state));\n\n          _this2.dataStores[defaultViewport].setState(_underscore.extend(_this2.dataStores[defaultViewport].getState(), _underscore.omit(state, viewportFields)));\n\n          _this2.dataStores[viewport].setState(_underscore.extend(_this2.dataStores[viewport].getState(), _underscore.pick(state, diffViewportFields)));\n        } else {\n          _this2.dataStores[viewport].setState(state);\n        }\n\n        return _events.trigger(eventName, paramObj);\n      });\n      this.dataStore.subscribe(function () {\n        return _events.trigger(\"stage:updateAfter\", {\n          stageId: _this2.stageId\n        });\n      });\n\n      _events.on(\"stage:\" + this.stageId + \":viewportChangeAfter\", this.onViewportSwitch.bind(this));\n    }\n    /**\n     * Change data stores on viewport change.\n     * @param {Object} args\n     */\n    ;\n\n    _proto.onViewportSwitch = function onViewportSwitch(args) {\n      this.setViewportDataToDataStore(args.viewport);\n    }\n    /**\n     * Init data store for each viewport.\n     */\n    ;\n\n    _proto.initDataStores = function initDataStores() {\n      var _this3 = this;\n\n      _underscore.each(_config.getConfig(\"viewports\"), function (value, name) {\n        _this3.dataStores[name] = new _dataStore();\n      });\n    }\n    /**\n     * Get viewport fields that is different from default.\n     *\n     * @param {string} viewport\n     * @param {DataObject} data\n     */\n    ;\n\n    _proto.getDiffViewportFields = function getDiffViewportFields(viewport, data) {\n      var fields = this.getViewportFields(viewport, data);\n\n      var defaultData = this.dataStores[_config.getConfig(\"defaultViewport\")].getState();\n\n      var excludedFields = [];\n\n      _underscore.each(fields, function (field, key) {\n        var comparison = _mageUtils.compare(data[key], defaultData[key]);\n\n        var isEmpty = !_underscore.find(comparison.changes, function (change) {\n          return !_underscore.isEmpty(change.oldValue);\n        });\n\n        if (comparison.equal || isEmpty) {\n          excludedFields.push(key);\n        }\n      });\n\n      return _underscore.omit(fields, excludedFields);\n    };\n\n    return ContentType;\n  }();\n\n  return ContentType;\n});\n//# sourceMappingURL=content-type.js.map","Magento_PageBuilder/js/collection.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"knockout\", \"Magento_PageBuilder/js/utils/array\"], function (_knockout, _array) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Collection = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Collection(children) {\n      this.children = children ? children : _knockout.observableArray([]);\n    }\n    /**\n     * Return the children of the current element\n     *\n     * @returns {KnockoutObservableArray<ContentTypeInterface | ContentTypeCollectionInterface>}\n     */\n\n\n    var _proto = Collection.prototype;\n\n    _proto.getChildren = function getChildren() {\n      return this.children;\n    }\n    /**\n     * Add a child into the observable array\n     *\n     * @param child\n     * @param index\n     */\n    ;\n\n    _proto.addChild = function addChild(child, index) {\n      if (typeof index === \"number\") {\n        // Use the arrayUtil function to add the item in the correct place within the array\n        (0, _array.moveArrayItemIntoArray)(child, this.children, index);\n      } else {\n        this.children.push(child);\n      }\n    }\n    /**\n     * Remove a child from the observable array\n     *\n     * @param child\n     */\n    ;\n\n    _proto.removeChild = function removeChild(child) {\n      (0, _array.removeArrayItem)(this.children, child);\n    }\n    /**\n     * Set the children observable array into the class\n     *\n     * @param children\n     */\n    ;\n\n    _proto.setChildren = function setChildren(children) {\n      this.children = children;\n    };\n\n    return Collection;\n  }();\n\n  return Collection;\n});\n//# sourceMappingURL=collection.js.map","Magento_PageBuilder/js/content-type-menu.js":"/*eslint-disable */\n/* jscs:disable */\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\ndefine([\"knockout\", \"underscore\"], function (_knockout, _underscore) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var ContentTypeMenu = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * Options constructor\n     *\n     * @param preview\n     * @param options\n     */\n    function ContentTypeMenu(preview, options) {\n      var _this = this;\n\n      this.options = _knockout.observableArray([]);\n      this.preview = preview;\n\n      var codes = _underscore.keys(options);\n\n      _underscore.values(options).forEach(function (option, index) {\n        option.code = codes[index];\n\n        _this.options.push(option);\n      });\n\n      this.sort();\n    }\n\n    var _proto = ContentTypeMenu.prototype;\n\n    /**\n     * Get an option from the options array\n     *\n     * @param {string} code\n     * @returns {OptionInterface}\n     */\n    _proto.getOption = function getOption(code) {\n      return this.options().find(function (option) {\n        return option.code === code;\n      });\n    }\n    /**\n     * Sort the options\n     */\n    ;\n\n    _proto.sort = function sort() {\n      this.options.sort(function (a, b) {\n        return a.sort === b.sort ? 0 : a.sort < b.sort ? -1 : 1;\n      });\n    };\n\n    _createClass(ContentTypeMenu, [{\n      key: \"template\",\n      get: function get() {\n        return \"Magento_PageBuilder/content-type/menu\";\n      }\n    }]);\n\n    return ContentTypeMenu;\n  }();\n\n  return ContentTypeMenu;\n});\n//# sourceMappingURL=content-type-menu.js.map","Magento_PageBuilder/js/config.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"underscore\"], function (_underscore) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var Config = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Config() {}\n\n    /**\n     * Set the initial config\n     *\n     * @param config\n     */\n    Config.setConfig = function setConfig(config) {\n      Config.config = _underscore.extend(Config.config, config);\n    }\n    /**\n     * Set the current instances mode, this differs between preview or master depending on whether we're rendering the\n     * admins preview or rendering the master format.\n     *\n     * @param {\"Preview\" | \"Master\"} mode\n     */\n    ;\n\n    Config.setMode = function setMode(mode) {\n      Config.mode = mode;\n    }\n    /**\n     * Retrieve the current instances mode\n     */\n    ;\n\n    Config.getMode = function getMode() {\n      return Config.mode;\n    }\n    /**\n     * Retrieve the init config\n     *\n     * @param {string} key\n     * @returns {T}\n     */\n    ;\n\n    Config.getConfig = function getConfig(key) {\n      if (key) {\n        if (typeof Config.config[key] !== \"undefined\") {\n          return Config.config[key];\n        }\n\n        return null;\n      }\n\n      return Config.config;\n    }\n    /**\n     * Retrieve a content type from the configuration\n     *\n     * @param {string} contentType\n     * @returns {any}\n     */\n    ;\n\n    Config.getContentTypeConfig = function getContentTypeConfig(contentType) {\n      if (typeof Config.getConfig(\"content_types\")[contentType] !== \"undefined\") {\n        return Config.getConfig(\"content_types\")[contentType];\n      }\n\n      return null;\n    };\n\n    return Config;\n  }();\n\n  Config.config = {\n    dataContentTypeAttributeName: \"data-content-type\",\n    bodyId: \"html-body\"\n  };\n  return Config;\n});\n//# sourceMappingURL=config.js.map","Magento_PageBuilder/js/content-type-toolbar.js":"/*eslint-disable */\n/* jscs:disable */\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\ndefine([\"jquery\", \"knockout\", \"Magento_PageBuilder/js/events\", \"Magento_PageBuilder/js/utils/check-stage-full-screen\", \"Magento_PageBuilder/js/utils/pagebuilder-header-height\", \"Magento_PageBuilder/js/utils/promise-deferred\"], function (_jquery, _knockout, _events, _checkStageFullScreen, _pagebuilderHeaderHeight, _promiseDeferred) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Toolbar = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * Toolbar Options constructor\n     *\n     * @param preview\n     * @param options\n     */\n    function Toolbar(preview, options) {\n      this.options = _knockout.observableArray([]);\n      this.afterRenderDeferred = (0, _promiseDeferred)();\n      this.preview = preview;\n      this.options(options);\n    }\n    /**\n     * Toolbar template\n     *\n     * @returns {string}\n     */\n\n\n    var _proto = Toolbar.prototype;\n\n    /**\n     * On render init the toolbar\n     *\n     * @param {Element} element\n     */\n    _proto.afterRender = function afterRender(element) {\n      this.element = element;\n      this.afterRenderDeferred.resolve(element);\n    }\n    /**\n     * Upon clicking the option update the value as directed\n     * When user toggles the option off, set the value back to default\n     *\n     * @param {OptionInterface} option\n     * @param {ValueInterface} value\n     */\n    ;\n\n    _proto.onOptionClick = function onOptionClick(option, value) {\n      var appearance = this.preview.appearance() + \"-appearance\";\n      var fields = this.preview.config.fields[appearance] || this.preview.config.fields.default;\n      var defaultValue = fields[option.key].default;\n      var currentValue = this.preview.contentType.dataStore.get(option.key);\n      this.preview.updateData(option.key, currentValue === value.value ? defaultValue : value.value);\n    }\n    /**\n     * Set state based on toolbar focusin event for the preview\n     *\n     * @param {ContentTypeToolbarPreviewInterface} context\n     * @param {Event} event\n     */\n    ;\n\n    _proto.onFocusIn = function onFocusIn(context, event) {\n      var currentContentTypeTarget = context.toolbar.getCurrentContentTypeTarget();\n      var toolbarOptions = currentContentTypeTarget.find(\".pagebuilder-toolbar-options\");\n      var currentContentTypeTargetClientRectTop = currentContentTypeTarget[0].getBoundingClientRect().top - (0, _pagebuilderHeaderHeight)(context.contentType.stageId); // Change toolbar orientation if overflow on full screen mode\n\n      if ((0, _checkStageFullScreen)(context.contentType.stageId) && currentContentTypeTargetClientRectTop < toolbarOptions.outerHeight()) {\n        context.toolbar.observer = new MutationObserver(function () {\n          toolbarOptions.css(\"transform\", \"translateY(\" + currentContentTypeTarget.outerHeight() + \"px)\");\n        });\n        context.toolbar.observer.observe(currentContentTypeTarget[0], {\n          attributes: true,\n          childList: true,\n          subtree: true\n        });\n        toolbarOptions.css(\"transform\", \"translateY(\" + currentContentTypeTarget.outerHeight() + \"px)\");\n      } else {\n        toolbarOptions.css(\"transform\", \"translateY(-100%)\");\n      }\n\n      (0, _jquery)(currentContentTypeTarget).addClass(\"pagebuilder-toolbar-active\");\n\n      _events.trigger(\"stage:interactionStart\");\n    }\n    /**\n     * Set state based on toolbar focusout event for the preview\n     *\n     * @param {ContentTypeToolbarPreviewInterface} context\n     * @param {Event} event\n     */\n    ;\n\n    _proto.onFocusOut = function onFocusOut(context, event) {\n      var currentContentTypeTarget = context.toolbar.getCurrentContentTypeTarget();\n      currentContentTypeTarget.removeClass(\"pagebuilder-toolbar-active\");\n      currentContentTypeTarget.find(\".pagebuilder-toolbar-options\").css(\"transform\", \"\");\n\n      if (typeof context.toolbar.observer !== \"undefined\") {\n        context.toolbar.observer.disconnect();\n      }\n\n      _events.trigger(\"stage:interactionStop\");\n    }\n    /**\n     * Get fixed toolbar container element referenced as selector in wysiwyg adapter settings\n     *\n     * @returns {jQuery}\n     */\n    ;\n\n    _proto.getCurrentContentTypeTarget = function getCurrentContentTypeTarget() {\n      return (0, _jquery)(\"#\" + this.preview.contentType.id).find(\".pagebuilder-content-type\");\n    };\n\n    _createClass(Toolbar, [{\n      key: \"template\",\n      get: function get() {\n        return \"Magento_PageBuilder/content-type-toolbar\";\n      }\n    }]);\n\n    return Toolbar;\n  }();\n  /**\n   * Preview interface for preview instances implementation the toolbar functionality\n   */\n\n\n  return Toolbar;\n});\n//# sourceMappingURL=content-type-toolbar.js.map","Magento_PageBuilder/js/content-type-factory.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/events\", \"underscore\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/content-type/master-factory\", \"Magento_PageBuilder/js/content-type/preview-factory\", \"Magento_PageBuilder/js/utils/loader\"], function (_events, _underscore, _config, _masterFactory, _previewFactory, _loader) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Create new content type\n   *\n   * @param {ContentTypeConfigInterface} config\n   * @param {ContentTypeInterface} parentContentType\n   * @param {string} stageId\n   * @param {object} data\n   * @param {number} childrenLength\n   * * @param {object} viewportsData\n   * @returns {Promise<ContentTypeInterface>}\n   * @api\n   */\n  function createContentType(config, parentContentType, stageId, data, childrenLength, viewportsData) {\n    if (data === void 0) {\n      data = {};\n    }\n\n    if (childrenLength === void 0) {\n      childrenLength = 0;\n    }\n\n    if (viewportsData === void 0) {\n      viewportsData = {};\n    }\n\n    return new Promise(function (resolve, reject) {\n      (0, _loader)([config.component], function (contentTypeComponent) {\n        try {\n          var _contentType = new contentTypeComponent(parentContentType, config, stageId);\n\n          var viewFactory = _config.getMode() === \"Preview\" ? _previewFactory : _masterFactory;\n          viewFactory(_contentType, config).then(function (viewComponent) {\n            var viewName = _config.getMode() === \"Preview\" ? \"preview\" : \"content\"; // @ts-ignore\n\n            _contentType[viewName] = viewComponent;\n            assignDataToDataStores(_contentType, config, data, viewportsData);\n            resolve(_contentType);\n          }).catch(function (error) {\n            reject(error);\n          });\n        } catch (error) {\n          reject(\"Error within component (\" + config.component + \") for \" + config.name + \".\");\n          console.error(error);\n        }\n      }, function (error) {\n        reject(\"Unable to load component (\" + config.component + \") for \" + config.name + \". Please check component exists\" + \" and content type configuration is correct.\");\n        console.error(error);\n      });\n    }).then(function (contentType) {\n      _events.trigger(\"contentType:createAfter\", {\n        id: contentType.id,\n        contentType: contentType\n      });\n\n      _events.trigger(config.name + \":createAfter\", {\n        id: contentType.id,\n        contentType: contentType\n      });\n\n      fireContentTypeReadyEvent(contentType, childrenLength);\n      return contentType;\n    }).catch(function (error) {\n      console.error(error);\n      return null;\n    });\n  }\n\n  function assignDataToDataStores(contentType, config, data, viewportsData) {\n    var defaultData = prepareData(config, data);\n\n    var currentViewport = _config.getConfig(\"viewport\") || _config.getConfig(\"defaultViewport\");\n\n    _underscore.each(_config.getConfig(\"viewports\"), function (viewport, name) {\n      var viewportData = {};\n      var breakpoint = config.breakpoints[name];\n      var viewportConfig = breakpoint && breakpoint.fields ? _underscore.extend({}, breakpoint, {\n        name: config.name\n      }) : {};\n\n      if (!_underscore.isEmpty(viewportConfig)) {\n        viewportsData[name] = viewportsData[name] || {};\n        viewportData = prepareData(viewportConfig, viewportsData[name]);\n      }\n\n      contentType.dataStores[name].setState(_underscore.extend({}, defaultData, viewportData));\n    });\n\n    contentType.setViewportDataToDataStore(currentViewport);\n  }\n  /**\n   * Merge defaults and content type data\n   *\n   * @param {ContentTypeConfigInterface} config\n   * @param {object} data\n   * @returns {any}\n   */\n\n\n  function prepareData(config, data) {\n    var appearance = data.appearance + \"-appearance\";\n    var fields = config.fields[appearance] || config.fields.default;\n    var defaults = prepareDefaults(fields || {}); // Set all content types to be displayed by default\n\n    defaults.display = true;\n    return _underscore.extend(defaults, data, {\n      name: config.name\n    });\n  }\n  /**\n   * Prepare the default values for fields within the form\n   *\n   * @param {ConfigFieldInterface} fields\n   * @returns {FieldDefaultsInterface}\n   */\n\n\n  function prepareDefaults(fields) {\n    if (_underscore.isEmpty(fields)) {\n      return {};\n    }\n\n    return _underscore.mapObject(fields, function (field) {\n      if (!_underscore.isUndefined(field.default)) {\n        return field.default;\n      } else if (_underscore.isObject(field)) {\n        return prepareDefaults(field);\n      }\n    });\n  }\n  /**\n   * A content type is ready once all of its children have mounted\n   *\n   * @param {ContentTypeInterface | ContentTypeCollectionInterface} contentType\n   * @param {number} childrenLength\n   */\n\n\n  function fireContentTypeReadyEvent(contentType, childrenLength) {\n    if (childrenLength === void 0) {\n      childrenLength = 0;\n    }\n\n    var fire = function fire() {\n      var params = {\n        id: contentType.id,\n        contentType: contentType,\n        expectChildren: childrenLength\n      };\n\n      _events.trigger(\"contentType:mountAfter\", params);\n\n      _events.trigger(contentType.config.name + \":mountAfter\", params);\n    };\n\n    if (childrenLength === 0) {\n      fire();\n    } else {\n      var mountCounter = 0;\n\n      _events.on(\"contentType:mountAfter\", function (args) {\n        if (args.contentType.parentContentType.id === contentType.id) {\n          mountCounter++;\n\n          if (mountCounter === childrenLength) {\n            mountCounter = 0;\n            fire();\n\n            _events.off(\"contentType:\" + contentType.id + \":mountAfter\");\n          }\n        }\n      }, \"contentType:\" + contentType.id + \":mountAfter\");\n    }\n  }\n  /**\n   * @api\n   */\n\n\n  return createContentType;\n});\n//# sourceMappingURL=content-type-factory.js.map","Magento_PageBuilder/js/data-store.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"jquery\", \"Magento_PageBuilder/js/utils/object\"], function (_jquery, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var DataStore = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function DataStore() {\n      this.state = {};\n      this.events = (0, _jquery)({});\n      this.previousState = {};\n    }\n\n    var _proto = DataStore.prototype;\n\n    /**\n     * Retrieve specific data from the data store\n     *\n     * @param {string} key\n     * @param defaultValue\n     * @returns {T}\n     */\n    _proto.get = function get(key, defaultValue) {\n      return (0, _object.get)(this.state, key, defaultValue);\n    }\n    /**\n     * Retrieve the entire state of the data object\n     *\n     * @returns {DataObject}\n     */\n    ;\n\n    _proto.getState = function getState() {\n      return this.state;\n    }\n    /**\n     * Retrieve the entire previous state of the data object\n     *\n     * @returns {DataObject}\n     */\n    ;\n\n    _proto.getPreviousState = function getPreviousState() {\n      return this.previousState;\n    }\n    /**\n     * Set a specific keys value in the data store\n     *\n     * @param {string} key\n     * @param value\n     */\n    ;\n\n    _proto.set = function set(key, value) {\n      this.previousState = Object.assign({}, this.state);\n      (0, _object.set)(this.state, key, value);\n      this.emitState();\n    }\n    /**\n     * Update the entire state for the content type\n     *\n     * @param {DataObject} state\n     */\n    ;\n\n    _proto.setState = function setState(state) {\n      this.previousState = Object.assign({}, this.state);\n      this.state = state;\n      this.emitState();\n    }\n    /**\n     * Remove item from DataStore\n     *\n     * @param {string | number} key\n     */\n    ;\n\n    _proto.unset = function unset(key) {\n      var storeState = this.state;\n      delete storeState[key];\n      this.setState(storeState);\n    }\n    /**\n     * Subscribe to data changes within the data store of a content type\n     *\n     * @param {(state: DataObject, event: Event) => void} handler\n     * @param {string | number} key\n     */\n    ;\n\n    _proto.subscribe = function subscribe(handler, key) {\n      var _this = this;\n\n      this.events.on(\"state\", function (event, data) {\n        if (key) {\n          if (_this.previousState[key] !== data.state[key]) {\n            handler(data.state, event);\n          }\n        } else {\n          if (_this.previousState !== data.state) {\n            handler(data.state, event);\n          }\n        }\n      });\n    }\n    /**\n     * Emit state updates through events\n     */\n    ;\n\n    _proto.emitState = function emitState() {\n      this.events.trigger(\"state\", {\n        state: this.state\n      });\n    };\n\n    return DataStore;\n  }();\n\n  return DataStore;\n});\n//# sourceMappingURL=data-store.js.map","Magento_PageBuilder/js/uploader.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/events\", \"uiLayout\", \"uiRegistry\"], function (_events, _uiLayout, _uiRegistry) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Uploader = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * Config data of uploader instance\n     */\n\n    /**\n     * The supplied data store\n     */\n\n    /**\n     * @param {String} name Name to use for lookup reference in registry\n     * @param {Object} uploaderConfig The config used when initializing the Uploader UI component\n     * @param {String} contentTypeId The id of the content type this will be used in\n     * @param {DataStore} dataStore The datastore that the selected image should be stored in.\n     * @param {Object[]} initialValue The value that should be used for the initial state of the component.\n     * @param {Function} onChangeCallback Called when image is added or updated\n     * @param {Function} onDeleteCallback Called when currently set image is deleted from storage\n     */\n    function Uploader(name, uploaderConfig, contentTypeId, dataStore, initialValue, onChangeCallback, onDeleteCallback) {\n      if (onChangeCallback === void 0) {\n        onChangeCallback = null;\n      }\n\n      if (onDeleteCallback === void 0) {\n        onDeleteCallback = null;\n      }\n\n      var config = Object.assign({}, uploaderConfig, {\n        value: initialValue\n      });\n      config.id = contentTypeId;\n      config.name = name;\n      this.dataStore = dataStore;\n\n      _events.on(\"image:\" + contentTypeId + \":uploadAfter\", onChangeCallback ? onChangeCallback : this.onImageChanged.bind(this));\n\n      _events.on(\"image:\" + contentTypeId + \":deleteFileAfter\", onDeleteCallback ? onDeleteCallback : this.onImageDeleted.bind(this));\n\n      this.config = config; // Render uploader\n\n      this.render();\n    }\n    /**\n     * Default callback for upload event\n     * @param {object[]} data\n     */\n\n\n    var _proto = Uploader.prototype;\n\n    _proto.onImageChanged = function onImageChanged(data) {\n      this.dataStore.set(this.config.dataScope.toString(), data);\n    }\n    /**\n     * Default callback for image deleted event\n     */\n    ;\n\n    _proto.onImageDeleted = function onImageDeleted() {\n      this.dataStore.set(this.config.dataScope.toString(), \"\");\n    }\n    /**\n     * Get registry callback reference to uploader UI component\n     *\n     * @returns {Function}\n     */\n    ;\n\n    _proto.getUiComponent = function getUiComponent() {\n      return _uiRegistry.async(this.config.name);\n    }\n    /**\n     * Instantiate uploader through layout UI component renderer\n     */\n    ;\n\n    _proto.render = function render() {\n      (0, _uiLayout)([this.config]);\n    };\n\n    return Uploader;\n  }();\n\n  return Uploader;\n});\n//# sourceMappingURL=uploader.js.map","Magento_PageBuilder/js/stage-builder.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"mage/translate\", \"Magento_PageBuilder/js/events\", \"Magento_Ui/js/modal/alert\", \"underscore\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/content-type-collection\", \"Magento_PageBuilder/js/content-type-factory\", \"Magento_PageBuilder/js/content-type/appearance-config\", \"Magento_PageBuilder/js/content-type/style-registry\", \"Magento_PageBuilder/js/master-format/validator\", \"Magento_PageBuilder/js/utils/directives\", \"Magento_PageBuilder/js/utils/loader\", \"Magento_PageBuilder/js/utils/object\"], function (_translate, _events, _alert, _, _config, _contentTypeCollection, _contentTypeFactory, _appearanceConfig, _styleRegistry, _validator, _directives, _loader, _object) {\n  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Build the stage with the provided value\n   *\n   * @param {stage} stage\n   * @param {string} value\n   * @returns {Promise<void>}\n   */\n  function buildFromContent(stage, value) {\n    var stageDocument = new DOMParser().parseFromString(value, \"text/html\");\n    stageDocument.body.setAttribute(_config.getConfig(\"dataContentTypeAttributeName\"), \"stage\");\n    stageDocument.body.id = _config.getConfig(\"bodyId\");\n    convertToInlineStyles(stageDocument);\n    return buildElementIntoStage(stageDocument.body, stage.rootContainer, stage);\n  }\n  /**\n   * Convert styles to block to inline styles.\n   *\n   * @param document\n   */\n\n\n  function convertToInlineStyles(document) {\n    var styleBlocks = document.getElementsByTagName(\"style\");\n    var viewportStyles = {};\n\n    _.each(_config.getConfig(\"viewports\"), function (viewport, name) {\n      return viewportStyles[name] = {};\n    });\n\n    if (styleBlocks.length > 0) {\n      Array.from(styleBlocks).forEach(function (styleBlock) {\n        var cssRules = styleBlock.sheet.cssRules;\n        processCssRules(cssRules, viewportStyles, _config.getConfig(\"defaultViewport\"));\n        styleBlock.remove();\n      });\n    }\n\n    _.each(viewportStyles, function (styles, name) {\n      _.each(styles, function (stylesArray, selector) {\n        var element = document.querySelector(selector);\n\n        _.each(stylesArray, function (style) {\n          element.setAttribute(\"data-\" + name + \"-style\", element.getAttribute(\"data-\" + name + \"-style\") ? element.getAttribute(\"data-\" + name + \"-style\") + style.cssText : style.cssText);\n        });\n      });\n    });\n\n    document.querySelectorAll(\"[\" + _styleRegistry.pbStyleAttribute + \"]\").forEach(function (element) {\n      element.removeAttribute(_styleRegistry.pbStyleAttribute);\n    });\n  }\n  /**\n   * Process styles and assign them to corespondent style object.\n   *\n   * @param cssRules\n   * @param styles\n   * @param scope\n   */\n\n\n  function processCssRules(cssRules, styles, scope) {\n    Array.from(cssRules).forEach(function (rule) {\n      if (rule instanceof CSSStyleRule) {\n        var selectors = rule.selectorText.split(\",\").map(function (selector) {\n          return selector.trim();\n        });\n        selectors.forEach(function (selector) {\n          if (!styles[scope][selector]) {\n            styles[scope][selector] = [];\n          }\n\n          styles[scope][selector].push(rule.style);\n        });\n      } else if (rule instanceof CSSMediaRule) {\n        var mediaCssRules = rule.cssRules;\n\n        var mediaScope = _.findKey(_config.getConfig(\"viewports\"), function (viewport) {\n          return rule.conditionText === viewport.media;\n        });\n\n        if (mediaScope) {\n          processCssRules(mediaCssRules, styles, mediaScope);\n        }\n      }\n    });\n  }\n  /**\n   * Build an element and it's children into the stage\n   *\n   * @param {Element} element\n   * @param {ContentTypeCollectionInterface} contentType\n   * @param {stage} stage\n   * @returns {Promise<void>}\n   */\n\n\n  function buildElementIntoStage(element, contentType, stage) {\n    if (element instanceof HTMLElement && element.getAttribute(_config.getConfig(\"dataContentTypeAttributeName\"))) {\n      var childPromises = [];\n      var childElements = [];\n      var children = getElementChildren(element);\n\n      if (children.length > 0) {\n        _.forEach(children, function (childElement) {\n          childPromises.push(createElementContentType(childElement, stage, contentType));\n          childElements.push(childElement);\n        });\n      } // Wait for all the promises to finish and add the instances to the stage\n\n\n      return Promise.all(childPromises).then(function (childrenPromises) {\n        return Promise.all(childrenPromises.map(function (child, index) {\n          contentType.addChild(child); // Only render children if the content type implements the collection\n\n          if (child instanceof _contentTypeCollection) {\n            return buildElementIntoStage(childElements[index], child, stage);\n          }\n        }));\n      });\n    }\n  }\n  /**\n   * Parse an element in the structure and build the required element\n   *\n   * @param {Element} element\n   * @param {ContentTypeCollectionInterface} contentType\n   * @param {stage} stage\n   * @returns {Promise<ContentTypeInterface>}\n   */\n\n\n  function createElementContentType(element, stage, contentType) {\n    contentType = contentType || stage.rootContainer;\n    var role = element.getAttribute(_config.getConfig(\"dataContentTypeAttributeName\"));\n\n    if (!role) {\n      return Promise.reject(\"Invalid master format: Content type element does not contain\\n            \" + _config.getConfig(\"dataContentTypeAttributeName\") + \" attribute.\");\n    }\n\n    var config = _config.getContentTypeConfig(role);\n\n    if (!config) {\n      return Promise.reject(\"Unable to load Page Builder configuration for content type \\\"\" + role + \"\\\".\");\n    }\n\n    return getElementData(element, config).then( // @ts-ignore\n    function (data) {\n      return (0, _contentTypeFactory)(config, contentType, stage.id, data[_config.getConfig(\"defaultViewport\")], getElementChildren(element).length, data);\n    });\n  }\n  /**\n   * Retrieve the elements data\n   *\n   * @param {HTMLElement} element\n   * @param {ContentTypeConfigInterface} config\n   * @returns {Promise<{[p: string]: any}>}\n   */\n\n\n  function getElementData(element, config) {\n    // Create an object with all fields for the content type with an empty value\n    var appearance = element.dataset.appearance + \"-appearance\";\n    var fields = config.fields[appearance] || config.fields.default;\n    var result = createInitialElementData(fields);\n    return new Promise(function (resolve) {\n      var role = element.getAttribute(_config.getConfig(\"dataContentTypeAttributeName\"));\n\n      if (!_config.getConfig(\"content_types\").hasOwnProperty(role)) {\n        resolve(result);\n      } else {\n        var readerComponents = (0, _appearanceConfig)(role, element.dataset.appearance).reader;\n        (0, _loader)([readerComponents], function () {\n          for (var _len = arguments.length, readers = new Array(_len), _key = 0; _key < _len; _key++) {\n            readers[_key] = arguments[_key];\n          }\n\n          var ReaderComponent = readers.pop();\n          var reader = new ReaderComponent();\n          reader.read(element).then(function (readerData) {\n            /**\n             * Iterate through the reader data and set the values onto the result array to ensure dot notation\n             * keys are properly handled.\n             */\n            _.each(readerData[_config.getConfig(\"defaultViewport\")], function (value, key) {\n              (0, _object.set)(result, key, value);\n            });\n\n            readerData[_config.getConfig(\"defaultViewport\")] = result;\n            resolve(readerData);\n          });\n        });\n      }\n    });\n  }\n  /**\n   * Create the initial object for storing the elements data\n   *\n   * @param {ConfigFieldInterface} fields\n   * @returns {FieldDefaultsInterface}\n   */\n\n\n  function createInitialElementData(fields) {\n    return _.mapObject(fields, function (field) {\n      if (!_.isUndefined(field.default)) {\n        return \"\";\n      } else if (_.isObject(field)) {\n        return createInitialElementData(field);\n      }\n    });\n  }\n  /**\n   * Return elements children, search for direct descendants, or traverse through to find deeper children\n   *\n   * @param {HTMLElement} element\n   * @returns {Array<HTMLElement>}\n   */\n\n\n  function getElementChildren(element) {\n    if (element.hasChildNodes()) {\n      var children = []; // Find direct children of the element\n\n      _.forEach(element.childNodes, function (child) {\n        if (child.nodeType === Node.ELEMENT_NODE) {\n          if (child.hasAttribute(_config.getConfig(\"dataContentTypeAttributeName\"))) {\n            children.push(child);\n          } else {\n            children = getElementChildren(child);\n          }\n        }\n      });\n\n      return children;\n    }\n\n    return [];\n  }\n  /**\n   * Build a new instance of stage, add row & text content types if needed\n   *\n   * @param {Stage} stage\n   * @param {string} initialValue\n   * @returns {Promise<any>}\n   */\n\n\n  function buildEmpty(stage, initialValue) {\n    var stageConfig = _config.getConfig(\"stage_config\");\n\n    var rootContainer = stage.rootContainer;\n\n    var rootContentTypeConfig = _config.getContentTypeConfig(stageConfig.root_content_type);\n\n    var htmlDisplayContentTypeConfig = _config.getContentTypeConfig(stageConfig.html_display_content_type); // @ts-ignore\n\n\n    var promise = Promise.resolve();\n\n    if (stageConfig.root_content_type && stageConfig.root_content_type !== \"none\") {\n      promise = (0, _contentTypeFactory)(rootContentTypeConfig, rootContainer, stage.id);\n      promise.then(function (rootContentType) {\n        if (!rootContentType) {\n          return Promise.reject(\"Unable to create initial \" + stageConfig.root_content_type + \" content type \" + \" within stage.\");\n        }\n\n        rootContainer.addChild(rootContentType);\n      });\n    }\n\n    promise.then(function (rootContentType) {\n      if (htmlDisplayContentTypeConfig && initialValue) {\n        return (0, _contentTypeFactory)(htmlDisplayContentTypeConfig, rootContainer, stage.id, {\n          html: initialValue\n        }).then(function (html) {\n          if (rootContentType) {\n            rootContentType.addChild(html);\n          } else {\n            rootContainer.addChild(html);\n          }\n        });\n      }\n    });\n    return promise;\n  }\n  /**\n   * Build a stage with the provided content type, content observable and initial value\n   *\n   * @param {Stage} stage\n   * @param {string} content\n   * @returns {Promise}\n   */\n\n\n  function build(stage, content) {\n    var currentBuild;\n    content = (0, _directives.removeQuotesInMediaDirectives)(content); // Determine if we're building from existing page builder content\n\n    if ((0, _validator)(content)) {\n      currentBuild = buildFromContent(stage, content).catch(function (error) {\n        console.error(error);\n        stage.rootContainer.children([]);\n        currentBuild = buildEmpty(stage, content);\n      });\n    } else {\n      currentBuild = buildEmpty(stage, content);\n    } // Once the build process is finished the stage is ready\n\n\n    return currentBuild.catch(function (error) {\n      (0, _alert)({\n        content: (0, _translate)(\"An error has occurred while initiating Page Builder. Please consult with your technical \" + \"support contact.\"),\n        title: (0, _translate)(\"Page Builder Error\")\n      });\n\n      _events.trigger(\"stage:error\", error);\n\n      console.error(error);\n    });\n  }\n\n  return build;\n});\n//# sourceMappingURL=stage-builder.js.map","Magento_PageBuilder/js/template-manager.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"html2canvas\", \"jquery\", \"mage/translate\", \"Magento_PageBuilder/js/modal/confirm-alert\", \"Magento_PageBuilder/js/modal/template-manager-save\", \"text!Magento_PageBuilder/template/modal/template-manager/save-content-modal.html\", \"uiRegistry\", \"underscore\", \"Magento_PageBuilder/js/acl\", \"Magento_PageBuilder/js/config\"], function (_html2canvas, _jquery, _translate, _confirmAlert, _templateManagerSave, _saveContentModal, _uiRegistry, _underscore, _acl, _config) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Save the current stage contents as a template\n   *\n   * @param stage\n   */\n  function saveAsTemplate(stage) {\n    if (!(0, _acl.isAllowed)(_acl.resources.TEMPLATE_SAVE)) {\n      (0, _confirmAlert)({\n        content: (0, _translate)(\"You do not have permission to save new templates.\"),\n        title: (0, _translate)(\"Permission Error\")\n      });\n      return false;\n    }\n\n    var capture = createCapture(stage);\n    var prompt = (0, _templateManagerSave)({\n      title: (0, _translate)(\"Save Content as Template\"),\n      promptContentTmpl: _saveContentModal,\n      templateTypes: _config.getConfig(\"stage_config\").template_types,\n      createdForNote: (0, _translate)(\"Created For is to help with filtering templates. This does not restrict where this template can be used.\"),\n      typeLabel: (0, _translate)(\"Created For\"),\n      label: (0, _translate)(\"Template Name\"),\n      validation: true,\n      modalClass: \"template-manager-save\",\n      validationRules: [\"required-entry\"],\n      attributesForm: {\n        novalidate: \"novalidate\",\n        action: \"\"\n      },\n      attributesField: {\n        \"name\": \"name\",\n        \"data-validate\": \"{required:true}\",\n        \"maxlength\": \"255\"\n      },\n      actions: {\n        /**\n         * Handle confirmation of the prompt\n         *\n         * @param {String} name\n         * @param {String} createdFor\n         * @this {actions}\n         */\n        confirm: function confirm(name, createdFor) {\n          return new Promise(function (resolve, reject) {\n            // Wait for the screenshot and the rendering lock to complete before making the request\n            var renderingLock = stage.renderingLocks[stage.renderingLocks.length - 1];\n\n            _jquery.when(capture, renderingLock).then(function (imageSrc, content) {\n              _jquery.ajax({\n                url: _config.getConfig(\"template_save_url\"),\n                data: {\n                  name: name,\n                  template: content,\n                  previewImage: imageSrc,\n                  createdFor: createdFor\n                },\n                method: \"POST\",\n                dataType: \"json\"\n              }).done(function (data) {\n                if (data.status === \"ok\") {\n                  (0, _confirmAlert)({\n                    content: (0, _translate)(\"The current contents of Page Builder has been successfully saved as a template.\"),\n                    title: (0, _translate)(\"Template Saved\")\n                  });\n                  refreshGrid();\n                  resolve();\n                } else if (data.status === \"error\") {\n                  (0, _confirmAlert)({\n                    content: data.message || (0, _translate)(\"An issue occurred while attempting to save \" + \"the template, please try again.\"),\n                    title: (0, _translate)(\"An error occurred\")\n                  });\n                  reject();\n                }\n              }).fail(function () {\n                (0, _confirmAlert)({\n                  content: (0, _translate)(\"An issue occurred while attempting to save the template, \" + \"please try again.\"),\n                  title: (0, _translate)(\"Template Save Error\")\n                });\n                reject();\n              });\n            });\n          });\n        }\n      }\n    }); // Update the UI with the preview image once available\n\n    capture.then(function (imageSrc) {\n      // @ts-ignore\n      prompt.templateManagerSave(\"setPreviewImage\", imageSrc);\n    });\n  }\n  /**\n   * Refresh the grid if it exists\n   */\n\n\n  function refreshGrid() {\n    var templateStageGrid = _uiRegistry.get(\"pagebuilder_stage_template_grid.pagebuilder_stage_template_grid_data_source\");\n\n    if (templateStageGrid) {\n      templateStageGrid.storage().clearRequests();\n      templateStageGrid.reload();\n    }\n  }\n  /**\n   * Create a capture of the stage\n   *\n   * @param stage\n   */\n\n\n  function createCapture(stage) {\n    var scrollY = window.scrollY;\n    var stageElement = document.querySelector(\"#\" + stage.id);\n\n    var deferred = _jquery.Deferred(); // Wait for the stage to complete rendering before taking the capture\n\n\n    var renderingLock = stage.renderingLocks[stage.renderingLocks.length - 1];\n    renderingLock.then(function () {\n      // Resolve issues with Parallax\n      var parallaxRestore = disableParallax(stageElement);\n      stageElement.style.height = (0, _jquery)(stageElement).outerHeight(false) + \"px\";\n      stageElement.classList.add(\"capture\");\n      stageElement.classList.add(\"interacting\");\n\n      if (stage.pageBuilder.isFullScreen()) {\n        window.scrollTo({\n          top: 0\n        });\n      }\n\n      _underscore.defer(function () {\n        (0, _html2canvas)(document.querySelector(\"#\" + stage.id + \" .pagebuilder-canvas\"), {\n          scale: 1,\n          useCORS: true,\n          scrollY: window.pageYOffset * -1\n        }).then(function (canvas) {\n          var imageSrc = canvas.toDataURL(\"image/jpeg\", 0.85);\n          deferred.resolve(imageSrc);\n\n          if (stage.pageBuilder.isFullScreen()) {\n            window.scrollTo({\n              top: scrollY\n            });\n          }\n\n          stageElement.style.height = null;\n          stageElement.classList.remove(\"capture\");\n          stageElement.classList.remove(\"interacting\");\n          restoreParallax(parallaxRestore);\n        });\n      });\n    });\n    return deferred;\n  }\n  /**\n   * Disable the parallax elements in the stage\n   *\n   * @param {Element} stageElement\n   */\n\n\n  function disableParallax(stageElement) {\n    var rowsToReset = [];\n    var parallaxRows = stageElement.querySelectorAll(\"[data-jarallax-original-styles]\");\n\n    _underscore.each(parallaxRows, function (row) {\n      var originalStyles = row.getAttribute(\"data-jarallax-original-styles\");\n      var jarallaxStyle = row.style.cssText;\n      row.style.cssText = originalStyles;\n      var jarallaxContainer = row.querySelector('div[id*=\"jarallax-container\"]');\n      jarallaxContainer.style.display = \"none\";\n      rowsToReset.push({\n        element: row,\n        styles: jarallaxStyle,\n        container: jarallaxContainer\n      });\n    });\n\n    return rowsToReset;\n  }\n  /**\n   * Restore parallax on modified nodes\n   *\n   * @param rows\n   */\n\n\n  function restoreParallax(rows) {\n    _underscore.each(rows, function (_ref) {\n      var element = _ref.element,\n          styles = _ref.styles,\n          container = _ref.container;\n      element.style.cssText = styles;\n      container.style.display = \"\";\n    });\n  }\n\n  return {\n    saveAsTemplate: saveAsTemplate\n  };\n});\n//# sourceMappingURL=template-manager.js.map","Magento_PageBuilder/js/content-type-collection.js":"/*eslint-disable */\n/* jscs:disable */\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\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\ndefine([\"Magento_PageBuilder/js/events\", \"underscore\", \"Magento_PageBuilder/js/collection\", \"Magento_PageBuilder/js/content-type\"], function (_events, _underscore, _collection, _contentType) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var ContentTypeCollection = /*#__PURE__*/function (_contentType2) {\n    \"use strict\";\n\n    _inheritsLoose(ContentTypeCollection, _contentType2);\n\n    /**\n     * @param {ContentTypeInterface} parentContentType\n     * @param {ContentTypeConfigInterface} config\n     * @param {string} stageId\n     */\n    function ContentTypeCollection(parentContentType, config, stageId) {\n      var _this;\n\n      _this = _contentType2.call(this, parentContentType, config, stageId) || this;\n      _this.collection = new _collection();\n\n      _this.collection.getChildren().subscribe(function () {\n        return _events.trigger(\"stage:updateAfter\", {\n          stageId: _this.stageId\n        });\n      });\n\n      return _this;\n    }\n    /**\n     * Return the children of the current element\n     *\n     * @returns {KnockoutObservableArray<ContentTypeInterface | ContentTypeCollectionInterface>}\n     */\n\n\n    var _proto = ContentTypeCollection.prototype;\n\n    _proto.getChildren = function getChildren() {\n      return this.collection.getChildren();\n    }\n    /**\n     * Add a child into the observable array\n     *\n     * @param {ContentTypeInterface | ContentTypeCollectionInterface} child\n     * @param {number} index\n     */\n    ;\n\n    _proto.addChild = function addChild(child, index) {\n      child.parentContentType = this;\n      this.collection.addChild(child, index); // Trigger a mount event when a child is added into a container content type, meaning it'll be re-rendered\n\n      _underscore.defer(function () {\n        _events.trigger(\"contentType:mountAfter\", {\n          id: child.id,\n          contentType: child\n        });\n\n        _events.trigger(child.config.name + \":mountAfter\", {\n          id: child.id,\n          contentType: child\n        });\n      });\n    }\n    /**\n     * Remove a child from the observable array\n     *\n     * @param {ContentTypeInterface} child\n     */\n    ;\n\n    _proto.removeChild = function removeChild(child) {\n      this.collection.removeChild(child);\n    }\n    /**\n     * Destroys current instance and all children\n     */\n    ;\n\n    _proto.destroy = function destroy() {\n      [].concat(this.getChildren()()).forEach(function (contentType) {\n        contentType.destroy();\n      });\n\n      _contentType2.prototype.destroy.call(this);\n    }\n    /**\n     * Set the children observable array into the class\n     *\n     * @param {KnockoutObservableArray<ContentTypeInterface>} children\n     */\n    ;\n\n    _proto.setChildren = function setChildren(children) {\n      this.collection.setChildren(children);\n    };\n\n    _createClass(ContentTypeCollection, [{\n      key: \"children\",\n      get: function get() {\n        return this.collection.getChildren();\n      }\n    }]);\n\n    return ContentTypeCollection;\n  }(_contentType);\n\n  return ContentTypeCollection;\n});\n//# sourceMappingURL=content-type-collection.js.map","Magento_PageBuilder/js/master-format/render.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"jquery\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/master-format/render/serialize\"], function (_jquery, _config, _serialize) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var MasterFormatRenderer = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * @param stageId\n     */\n    function MasterFormatRenderer(stageId) {\n      this.ready = false;\n      this.readyDeferred = _jquery.Deferred();\n      this.stageId = stageId;\n    }\n    /**\n     * Render the root container into a string utilising our sandboxed iframe\n     *\n     * @param {ContentTypeCollection} rootContainer\n     * @returns {Promise<string>}\n     */\n\n\n    var _proto = MasterFormatRenderer.prototype;\n\n    _proto.applyBindings = function applyBindings(rootContainer) {\n      var _this = this;\n\n      return new Promise(function (resolve, reject) {\n        if (!_this.getRenderFrame()) {\n          // If the stage exists we should also have a frame\n          if (document.getElementById(_this.stageId)) {\n            return reject(\"No render frame present for Page Builder instance.\");\n          } // Otherwise the instance of Page Builder has been removed from the DOM and this is an old instance.\n\n\n          return reject();\n        }\n\n        if (_this.ready) {\n          _this.channel.port1.postMessage({\n            type: \"render\",\n            message: {\n              stageId: _this.stageId,\n              tree: (0, _serialize.getSerializedTree)(rootContainer)\n            }\n          });\n\n          _this.channel.port1.onmessage = function (event) {\n            if (event.isTrusted) {\n              if (event.data.type === \"render\") {\n                resolve(event.data.message);\n              }\n\n              if (event.data.type === \"template\") {\n                _this.loadTemplate(event.data.message);\n              }\n            } else {\n              reject(\"Render event was not trusted.\");\n            }\n          };\n        } else {\n          _this.readyDeferred.then(function () {\n            _this.applyBindings(rootContainer).then(function (rendered) {\n              resolve(rendered);\n            }).catch(function (error) {\n              reject(error);\n            });\n          });\n        }\n      });\n    }\n    /**\n     * Create a channel to communicate with our sandboxed iframe. Firstly add a listener to the current window and then\n     * set the src of the iframe. Listening for a specific message event with a predefined term and then hand over the\n     * MessageChannel port to allow communication between the main window and iframe.\n     */\n    ;\n\n    _proto.setupChannel = function setupChannel() {\n      var _this2 = this;\n\n      this.channel = new MessageChannel();\n      var frame = this.getRenderFrame();\n      window.addEventListener(\"message\", function (event) {\n        if (!_this2.ready && event.data.name === \"PB_RENDER_READY\" && _this2.stageId === event.data.stageId) {\n          frame.contentWindow.postMessage(\"PB_RENDER_PORT\", \"*\", [_this2.channel.port2]);\n          _this2.ready = true;\n\n          _this2.readyDeferred.resolve();\n        }\n      });\n      frame.src = _config.getConfig(\"render_url\") + \"?stageId=\" + this.stageId;\n    }\n    /**\n     * Use the text! RequireJS plugin to load a template and send it back to the child render iframe\n     *\n     * @param name\n     */\n    ;\n\n    _proto.loadTemplate = function loadTemplate(name) {\n      var _this3 = this;\n\n      require([\"text!\" + name], function (template) {\n        _this3.channel.port1.postMessage({\n          type: \"template\",\n          message: {\n            name: name,\n            template: template\n          }\n        });\n      });\n    }\n    /**\n     * Retrieve the render frame\n     *\n     * @returns {HTMLIFrameElement}\n     */\n    ;\n\n    _proto.getRenderFrame = function getRenderFrame() {\n      return document.getElementById(\"render_frame_\" + this.stageId);\n    };\n\n    return MasterFormatRenderer;\n  }();\n\n  return MasterFormatRenderer;\n});\n//# sourceMappingURL=render.js.map","Magento_PageBuilder/js/master-format/filter-html.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"jquery\"], function (_jquery) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Filter the HTML output to only include necessary attributes & nodes\n   *\n   * @param {JQuery} element\n   * @returns {JQuery}\n   */\n  function filterHtml(element) {\n    var isWhiteSpaceOrComment = function isWhiteSpaceOrComment() {\n      return this.nodeType === Node.COMMENT_NODE || this.nodeType === Node.TEXT_NODE && this.data.match(/^\\s+$/);\n    };\n\n    element.find(\"[data-bind]\").each(function (index, value) {\n      (0, _jquery)(value).removeAttr(\"data-bind\");\n    });\n    element.contents().filter(isWhiteSpaceOrComment).remove();\n    element.find(\"*\").filter(function (index, descendentEl) {\n      // filter out elements that are iframes or have .bypass-html-filter ancestor\n      var isIframe = descendentEl.tagName === \"IFRAME\";\n      var isBeingBypassedByThisFilter = !!(0, _jquery)(descendentEl).closest(\".bypass-html-filter\").length;\n      return !isIframe && !isBeingBypassedByThisFilter;\n    }).each(function (index, descendentEl) {\n      (0, _jquery)(descendentEl).contents().filter(isWhiteSpaceOrComment).remove();\n    });\n    element.find(\"[data-wrapper]\").each(function (index, value) {\n      (0, _jquery)(value).parent().append((0, _jquery)(value).children());\n      (0, _jquery)(value).remove();\n    });\n    element.find(\".bypass-html-filter\").each(function (index, value) {\n      (0, _jquery)(value).removeClass(\"bypass-html-filter\").filter('[class=\"\"]').removeAttr(\"class\");\n    });\n    return element;\n  }\n\n  return filterHtml;\n});\n//# sourceMappingURL=filter-html.js.map","Magento_PageBuilder/js/master-format/validator.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/config\"], function (_config) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Validate if content has page builder format by checking for any data-content-type attributes\n   *\n   * @param {string} content\n   * @returns {boolean}\n   */\n  function validate(content) {\n    var stageDocument = new DOMParser().parseFromString(content, \"text/html\");\n    return !!stageDocument.querySelector(\"[\" + _config.getConfig(\"dataContentTypeAttributeName\") + \"]\");\n  }\n\n  return validate;\n});\n//# sourceMappingURL=validator.js.map","Magento_PageBuilder/js/master-format/read-interface.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  \"use strict\";\n});\n//# sourceMappingURL=read-interface.js.map","Magento_PageBuilder/js/master-format/read/configurable.js":"/*eslint-disable */\n/* jscs:disable */\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[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.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\ndefine([\"jquery\", \"mageUtils\", \"underscore\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/content-type/appearance-config\", \"Magento_PageBuilder/js/converter/converter-pool-factory\", \"Magento_PageBuilder/js/mass-converter/converter-pool-factory\", \"Magento_PageBuilder/js/property/property-reader-pool-factory\"], function (_jquery, _mageUtils, _underscore, _config, _appearanceConfig, _converterPoolFactory, _converterPoolFactory2, _propertyReaderPoolFactory) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Configurable = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Configurable() {}\n\n    var _proto = Configurable.prototype;\n\n    /**\n     * Read data from the dom based on configuration\n     *\n     * @param element HTMLElement\n     * @returns {Promise<any>}\n     */\n    _proto.read = function read(element) {\n      var _this = this;\n\n      var role = element.getAttribute(_config.getConfig(\"dataContentTypeAttributeName\"));\n      var config = (0, _appearanceConfig)(role, element.getAttribute(\"data-appearance\"));\n      var componentsPromise = [(0, _propertyReaderPoolFactory)(role), (0, _converterPoolFactory)(role), (0, _converterPoolFactory2)(role)];\n      return new Promise(function (resolve) {\n        Promise.all(componentsPromise).then(function (loadedComponents) {\n          var propertyReaderPool = loadedComponents[0],\n              converterPool = loadedComponents[1],\n              massConverterPool = loadedComponents[2];\n\n          var viewports = _config.getConfig(\"viewports\");\n\n          var data = {};\n\n          _underscore.each(viewports, function (viewport, name) {\n            return data[name] = {};\n          });\n\n          var _loop = function _loop() {\n            var elementName = _Object$keys[_i];\n            var elementConfig = config.elements[elementName];\n\n            var currentElement = _this.findElementByName(element, elementName); // If we cannot locate the current element skip trying to read any attributes from it\n\n\n            if (currentElement === null || currentElement === undefined) {\n              return \"continue\";\n            }\n\n            _underscore.each(viewports, function (viewportObj, viewport) {\n              currentElement.setAttribute(\"style\", currentElement.getAttribute(\"data-\" + viewport + \"-style\"));\n\n              if (elementConfig.style.length) {\n                data[viewport] = _this.readStyle(elementConfig.style, currentElement, data[viewport], propertyReaderPool, converterPool);\n              }\n\n              if (elementConfig.attributes.length) {\n                data[viewport] = _this.readAttributes(elementConfig.attributes, currentElement, data[viewport], propertyReaderPool, converterPool);\n              }\n\n              if (undefined !== elementConfig.html.var) {\n                data[viewport] = _this.readHtml(elementConfig, currentElement, data[viewport], converterPool);\n              }\n\n              if (undefined !== elementConfig.tag.var) {\n                data[viewport] = _this.readHtmlTag(elementConfig, currentElement, data[viewport]);\n              }\n\n              if (undefined !== elementConfig.css.var) {\n                data[viewport] = _this.readCss(elementConfig, currentElement, data[viewport]);\n              }\n            });\n          };\n\n          for (var _i = 0, _Object$keys = Object.keys(config.elements); _i < _Object$keys.length; _i++) {\n            var _ret = _loop();\n\n            if (_ret === \"continue\") continue;\n          }\n\n          _underscore.each(viewports, function (viewportObj, viewport) {\n            data[viewport] = _this.convertData(config, data[viewport], massConverterPool);\n          });\n\n          resolve(data);\n        }).catch(function (error) {\n          console.error(error);\n        });\n      });\n    }\n    /**\n     * Find the element for the current content type by it's name, avoiding searching in other content types by\n     * removing any other element which contains it's own data-content-type.\n     *\n     * @param {HTMLElement} element\n     * @param {string} name\n     * @returns {HTMLElement}\n     */\n    ;\n\n    _proto.findElementByName = function findElementByName(element, name) {\n      // Create a clone of the element to avoid modifying the source\n      var currentElement = (0, _jquery)(element).clone();\n\n      if (currentElement.attr(\"data-element\") === name) {\n        return currentElement[0];\n      } // Attempt to find the element in the children of the data-content-type\n\n\n      var searchInChildren = currentElement.find(\"[data-element=\\\"\" + name + \"\\\"]\"); // Ensure the element is within the current content type\n\n      if (searchInChildren.length > 0 && searchInChildren.closest(\"[data-content-type]\")[0] === currentElement[0]) {\n        return searchInChildren[0];\n      }\n\n      return null;\n    }\n    /**\n     * Read attributes for element\n     *\n     * @param {DataMappingAttributesInterface[]} config\n     * @param {HTMLElement} element\n     * @param {object} data\n     * @param {typeof PropertyReaderPool} propertyReaderPool\n     * @param {typeof ConverterPool} converterPool\n     * @returns {any}\n     */\n    ;\n\n    _proto.readAttributes = function readAttributes(config, element, data, propertyReaderPool, converterPool) {\n      var result = {};\n\n      for (var _iterator = _createForOfIteratorHelperLoose(config), _step; !(_step = _iterator()).done;) {\n        var attributeConfig = _step.value;\n\n        if (\"write\" === attributeConfig.persistence_mode) {\n          continue;\n        }\n\n        var value = !!attributeConfig.static ? attributeConfig.value : propertyReaderPool.get(attributeConfig.reader).read(element, attributeConfig.name);\n\n        if (converterPool.get(attributeConfig.converter)) {\n          value = converterPool.get(attributeConfig.converter).fromDom(value);\n        }\n\n        if (_jquery.type(result[attributeConfig.var]) === \"object\") {\n          var _mageUtils$extend;\n\n          value = _mageUtils.extend((_mageUtils$extend = {}, _mageUtils$extend[attributeConfig.name] = value, _mageUtils$extend), result[attributeConfig.var]);\n        }\n\n        result[attributeConfig.var] = value;\n      }\n\n      return _underscore.extend(data, result);\n    }\n    /**\n     * Read style properties for element\n     *\n     * @param {DataMappingStyleInterface[]} config\n     * @param {HTMLElement} element\n     * @param {object} data\n     * @param {typeof PropertyReaderPool} propertyReaderPool\n     * @param {typeof ConverterPool} converterPool\n     * @returns {{[p: string]: string}}\n     */\n    ;\n\n    _proto.readStyle = function readStyle(config, element, data, propertyReaderPool, converterPool) {\n      var result = _underscore.extend({}, data);\n\n      for (var _iterator2 = _createForOfIteratorHelperLoose(config), _step2; !(_step2 = _iterator2()).done;) {\n        var propertyConfig = _step2.value;\n\n        if (\"write\" === propertyConfig.persistence_mode) {\n          continue;\n        }\n\n        var value = !!propertyConfig.static ? propertyConfig.value : propertyReaderPool.get(propertyConfig.reader).read(element, propertyConfig.name);\n\n        if (converterPool.get(propertyConfig.converter)) {\n          value = converterPool.get(propertyConfig.converter).fromDom(value);\n        }\n\n        if (_jquery.type(result[propertyConfig.var]) === \"object\") {\n          value = _mageUtils.extend(result[propertyConfig.var], value);\n        }\n\n        result[propertyConfig.var] = value;\n      }\n\n      return result;\n    }\n    /**\n     * Read element's tag\n     *\n     * @param {object} config\n     * @param {HTMLElement} element\n     * @param {object} data\n     * @returns {object}\n     */\n    ;\n\n    _proto.readHtmlTag = function readHtmlTag(config, element, data) {\n      var result = {};\n      result[config.tag.var] = element.nodeName.toLowerCase();\n      return _underscore.extend(data, result);\n    }\n    /**\n     * Read element's css\n     *\n     * @param {ContentTypeConfigAppearanceElementInterface} config\n     * @param {HTMLElement} element\n     * @param {object} data\n     * @returns {any}\n     */\n    ;\n\n    _proto.readCss = function readCss(config, element, data) {\n      var result = {};\n      var css = element.getAttribute(\"class\") !== null ? element.getAttribute(\"class\") : \"\";\n\n      if (config.css !== undefined && config.css.filter !== undefined && config.css.filter.length) {\n        for (var _iterator3 = _createForOfIteratorHelperLoose(config.css.filter), _step3; !(_step3 = _iterator3()).done;) {\n          var filterClass = _step3.value;\n          css = css.replace(filterClass, \"\");\n        }\n      }\n\n      result[config.css.var] = css.replace(/\\s{2,}/g, \" \").trim();\n      return _underscore.extend(data, result);\n    }\n    /**\n     * Read element's content\n     *\n     * @param {ContentTypeConfigAppearanceElementInterface} config\n     * @param {HTMLElement} element\n     * @param {object} data\n     * @param {typeof ConverterPool} converterPool\n     * @returns {any}\n     */\n    ;\n\n    _proto.readHtml = function readHtml(config, element, data, converterPool) {\n      var result = {};\n      var value = element.innerHTML;\n\n      if (converterPool.get(config.html.converter)) {\n        value = converterPool.get(config.html.converter).fromDom(value);\n      }\n\n      result[config.html.var] = value;\n      return _underscore.extend(data, result);\n    }\n    /**\n     * Convert data after it's read for all elements\n     *\n     * @param config\n     * @param {object} data\n     * @param {typeof MassConverterPool} massConverterPool\n     * @returns {object}\n     */\n    ;\n\n    _proto.convertData = function convertData(config, data, massConverterPool) {\n      for (var _iterator4 = _createForOfIteratorHelperLoose(config.converters), _step4; !(_step4 = _iterator4()).done;) {\n        var converterConfig = _step4.value;\n\n        if (massConverterPool.get(converterConfig.component)) {\n          data = massConverterPool.get(converterConfig.component).fromDom(data, converterConfig.config);\n        }\n      }\n\n      return data;\n    };\n\n    return Configurable;\n  }();\n\n  return Configurable;\n});\n//# sourceMappingURL=configurable.js.map","Magento_PageBuilder/js/master-format/render/frame.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"csso\", \"jquery\", \"knockout\", \"Magento_Ui/js/lib/knockout/template/engine\", \"mageUtils\", \"underscore\", \"Magento_PageBuilder/js/binding/master-style\", \"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/content-type-factory\", \"Magento_PageBuilder/js/content-type/style-registry\", \"Magento_PageBuilder/js/utils/directives\", \"Magento_PageBuilder/js/master-format/filter-html\"], function (_csso, _jquery, _knockout, _engine, _mageUtils, _underscore, _masterStyle, _config, _contentTypeFactory, _styleRegistry, _directives, _filterHtml) {\n  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var port = null;\n\n  var portDeferred = _jquery.Deferred();\n\n  var deferredTemplates = {};\n  var lastRenderId;\n  /**\n   * Debounce the render call, so we don't render until the final request\n   */\n\n  var debounceRender = _underscore.debounce(function (message, renderId) {\n    render(message, renderId).then(function (output) {\n      // Only post the most recent render back to the parent\n      if (lastRenderId === renderId) {\n        port.postMessage({\n          type: \"render\",\n          message: output\n        });\n      }\n    });\n  }, 50);\n  /**\n   * Listen for requests from the parent window for a render\n   */\n\n\n  function listen(config) {\n    var stageId = window.location.href.split(\"?\")[1].split(\"=\")[1];\n\n    _config.setConfig(config);\n\n    _config.setMode(\"Master\"); // Override assign with extend to prevent deep object overriding.\n\n\n    Object.assign = _mageUtils.extend;\n    /**\n     * Create a listener within our iframe so we can observe messages from the parent, once we receive a port on the\n     * MessageChannel we utilise that for all communication.\n     */\n\n    window.addEventListener(\"message\", function (event) {\n      if (event.ports && event.ports.length) {\n        port = event.ports[0];\n        portDeferred.resolve(port);\n\n        port.onmessage = function (messageEvent) {\n          if (messageEvent.data.type === \"render\") {\n            var renderId = _mageUtils.uniqueid();\n\n            lastRenderId = renderId;\n            debounceRender(messageEvent.data.message, renderId);\n          }\n\n          if (messageEvent.data.type === \"template\") {\n            var message = messageEvent.data.message;\n\n            if (message.name in deferredTemplates) {\n              deferredTemplates[message.name].resolve(message.template);\n              delete deferredTemplates[message.name];\n            }\n          }\n        };\n      }\n    }, false); // Inform the parent iframe that we're ready to receive the port\n\n    window.parent.postMessage({\n      name: \"PB_RENDER_READY\",\n      stageId: stageId\n    }, \"*\");\n  }\n  /**\n   * Use our MessageChannel to load a template from the parent window, this is required as the iframe isn't allowed to\n   * make same origin XHR requests.\n   *\n   * @param name\n   */\n\n\n  function loadTemplate(name) {\n    return new Promise(function (resolve) {\n      if (!(name in deferredTemplates)) {\n        deferredTemplates[name] = _jquery.Deferred();\n      }\n\n      deferredTemplates[name].then(function (template) {\n        resolve(template);\n      });\n\n      if (port) {\n        port.postMessage({\n          type: \"template\",\n          message: name\n        });\n      } else {\n        portDeferred.then(function (messagePort) {\n          messagePort.postMessage({\n            type: \"template\",\n            message: name\n          });\n        });\n      }\n    });\n  }\n  /**\n   * Assert if the render has finished\n   */\n\n\n  var assertRenderFinished = _underscore.debounce(function (element, expectedCount, callback) {\n    if (element.querySelectorAll(\"[data-content-type]\").length === expectedCount) {\n      callback();\n    }\n  }, 50);\n  /**\n   * Iterate over the root container and count all content types\n   *\n   * @param rootContainer\n   * @param count\n   */\n\n\n  function countContentTypes(rootContainer, count) {\n    count = count || 0;\n    rootContainer.getChildren()().forEach(function (child) {\n      ++count;\n\n      if (typeof child.getChildren !== \"undefined\" && child.getChildren()().length > 0) {\n        count = countContentTypes(child, count);\n      }\n    });\n    return count;\n  }\n  /**\n   * Perform a render of the provided data\n   *\n   * @param message\n   * @param renderId\n   */\n\n\n  function render(message, renderId) {\n    var styleRegistries = {};\n\n    _underscore.each(_config.getConfig(\"viewports\"), function (viewport, name) {\n      styleRegistries[name] = new _styleRegistry(name + renderId);\n    });\n\n    return new Promise(function (resolve, reject) {\n      createRenderTree(message.stageId, message.tree).then(function (rootContainer) {\n        var element = document.createElement(\"div\");\n        /**\n         * Setup an event on the element to observe changes and count the expected amount of content types are\n         * present within the content.\n         */\n\n        var renderFinished = _jquery.Deferred();\n\n        var observer = new MutationObserver(function () {\n          assertRenderFinished(element, countContentTypes(rootContainer), renderFinished.resolve);\n        });\n        observer.observe(element, {\n          attributes: true,\n          childList: true,\n          subtree: true\n        }); // Combine this event with our engine waitForRenderFinish to ensure rendering is completed\n\n        _jquery.when(_engine.waitForFinishRender(), renderFinished).then(function () {\n          observer.disconnect();\n\n          _knockout.cleanNode(element);\n\n          var styles = generateMasterCssForViewports(styleRegistries);\n\n          if (styles) {\n            (0, _jquery)(element).append((0, _jquery)(\"<style/>\").html(styles));\n          }\n\n          _underscore.each(styleRegistries, function (value, name) {\n            return (0, _styleRegistry.deleteStyleRegistry)(name + renderId);\n          });\n\n          var filtered = (0, _filterHtml)((0, _jquery)(element));\n          var output = (0, _directives.replaceWithSrc)((0, _directives)(filtered.html()));\n          resolve(output);\n        });\n\n        _knockout.applyBindingsToNode(element, {\n          template: {\n            data: rootContainer.content,\n            name: rootContainer.content.template\n          }\n        }, {\n          id: renderId\n        });\n      }).catch(function (error) {\n        reject(error);\n      });\n    });\n  }\n  /**\n   * Rebuild the content type tree using their original data and configuration\n   *\n   * @param stageId\n   * @param tree\n   * @param parent\n   */\n\n\n  function createRenderTree(stageId, tree, parent) {\n    if (parent === void 0) {\n      parent = null;\n    }\n\n    return new Promise(function (resolve, reject) {\n      (0, _contentTypeFactory)(_config.getContentTypeConfig(tree.name), parent, stageId, tree.data, parent !== null ? tree.children.length : 0, tree.viewportsData).then(function (contentType) {\n        // Ensure  we retain the original tree ID's\n        contentType.id = tree.id;\n\n        if (tree.children.length > 0) {\n          var childPromises = [];\n          tree.children.forEach(function (child) {\n            childPromises.push(createRenderTree(stageId, child, contentType));\n          });\n          Promise.all(childPromises).then(function (children) {\n            children.forEach(function (child) {\n              contentType.addChild(child);\n            });\n            resolve(contentType);\n          });\n        } else {\n          resolve(contentType);\n        }\n      }).catch(function (error) {\n        reject(error);\n      });\n    });\n  }\n  /**\n   * Generate the master format CSS\n   *\n   * @param registry\n   */\n\n\n  function generateMasterCss(registry) {\n    var scopes = Object.keys(registry.getAllStyles()).map(function (selector) {\n      return [selector];\n    });\n    return _csso.minify((0, _styleRegistry.generateCss)(registry.getAllStyles()), {\n      usage: {\n        scopes: scopes\n      }\n    }).css;\n  }\n\n  function generateMasterCssForViewports(registries) {\n    var result = \"\";\n\n    _underscore.each(registries, function (registry, name) {\n      var css = generateMasterCss(registry);\n\n      var media = _config.getConfig(\"viewports\")[name].media;\n\n      if (media && css) {\n        result += \"@media \" + media + \" { \" + css + \" }\";\n      } else {\n        result += css;\n      }\n    });\n\n    return result;\n  }\n\n  return Object.assign(listen, {\n    loadTemplate: loadTemplate\n  });\n});\n//# sourceMappingURL=frame.js.map","Magento_PageBuilder/js/master-format/render/events.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * The frame does not need to create or observe events, however the app will naturally attempt to. So let's stop that!\n   */\n  var _default = {\n    on: function on() {\n      return this;\n    },\n    off: function off() {\n      return this;\n    },\n    trigger: function trigger() {\n      return this;\n    }\n  };\n  return _default;\n});\n//# sourceMappingURL=events.js.map","Magento_PageBuilder/js/master-format/render/serialize.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/content-type-collection\"], function (_config, _contentTypeCollection) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Serialize the tree as a simplified object for rendering\n   *\n   * @param contentType\n   */\n  function buildTree(contentType) {\n    var data = getData(contentType);\n    var viewportsData = getViewportsData(contentType);\n    var tree = {\n      name: contentType.config.name,\n      id: contentType.id,\n      data: data,\n      children: [],\n      viewportsData: viewportsData\n    };\n\n    if (contentType instanceof _contentTypeCollection && contentType.getChildren()().length > 0) {\n      contentType.getChildren()().forEach(function (child) {\n        tree.children.push(buildTree(child));\n      });\n    }\n\n    return tree;\n  }\n  /**\n   * Get a serialized version of the tree\n   *\n   * @param contentType\n   */\n\n\n  function getSerializedTree(contentType) {\n    return buildTree(contentType);\n  }\n  /**\n   * Retrieve the master data from the content types instance\n   *\n   * @param contentType\n   */\n\n\n  function getData(contentType) {\n    /**\n     * Flip flop to JSON and back again to ensure all data is serializable. Magento by default adds functions into\n     * some basic types which cannot be serialized when calling PostMessage.\n     */\n    return JSON.parse(JSON.stringify(contentType.dataStores[_config.getConfig(\"defaultViewport\")].getState())) || {};\n  }\n  /**\n   * Retrieve the master data from the content types instance\n   *\n   * @param contentType\n   */\n\n\n  function getViewportsData(contentType) {\n    /**\n     * Flip flop to JSON and back again to ensure all data is serializable. Magento by default adds functions into\n     * some basic types which cannot be serialized when calling PostMessage.\n     */\n    var result = {};\n    Object.keys(contentType.dataStores).forEach(function (name) {\n      result[name] = JSON.parse(JSON.stringify(contentType.dataStores[name].getState())) || {};\n    });\n    return result;\n  }\n\n  return {\n    buildTree: buildTree,\n    getSerializedTree: getSerializedTree\n  };\n});\n//# sourceMappingURL=serialize.js.map","Magento_PageBuilder/js/master-format/render/requirejs/text.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"mage/requirejs/text\", \"Magento_PageBuilder/js/master-format/render/frame\"], function (_text, _frame) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Within our render frame we override the RequireJS text! plugin, this is originally implemented within\n   * lib/web/mage/requirejs/text.js. The override uses the MessageChannel to communicate with the parent frame to\n   * retrieve any requested HTML knockout template. We do this due to the sandbox restrictions on the iframe disallow\n   * XHR requests to the same origin domain.\n   */\n\n  /**\n   * Load a template\n   *\n   * @param name\n   * @param req\n   * @param onLoad\n   */\n  function load(name, req, onLoad) {\n    (0, _frame.loadTemplate)(name).then(function (template) {\n      onLoad(template);\n    }).catch(function (error) {\n      onLoad.error(error);\n    });\n  }\n  /**\n   * Retrieve a template\n   *\n   * @param url\n   * @param callback\n   * @param fail\n   * @param headers\n   */\n\n\n  function get(url, callback, fail, headers) {\n    _text.get.apply(_text, arguments);\n  }\n\n  return {\n    load: load,\n    get: get\n  };\n});\n//# sourceMappingURL=text.js.map","Magento_PageBuilder/js/converter/converter-pool.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var ConverterPool = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function ConverterPool() {\n      this.converters = {};\n    }\n\n    var _proto = ConverterPool.prototype;\n\n    /**\n     * Retrieve a converter from the pool\n     *\n     * @param {string} name\n     * @returns {ConverterInterface}\n     */\n    _proto.get = function get(name) {\n      return this.converters[name] !== undefined ? this.converters[name] : null;\n    }\n    /**\n     * Register a new converter into the pool\n     *\n     * @param {string} name\n     * @param {ConverterInterface} converter\n     */\n    ;\n\n    _proto.register = function register(name, converter) {\n      this.converters[name] = converter;\n    };\n\n    return ConverterPool;\n  }();\n\n  var _default = new ConverterPool();\n\n  return _default;\n});\n//# sourceMappingURL=converter-pool.js.map","Magento_PageBuilder/js/converter/converter-interface.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  \"use strict\";\n});\n//# sourceMappingURL=converter-interface.js.map","Magento_PageBuilder/js/converter/converter-pool-factory.js":"/*eslint-disable */\n/* jscs:disable */\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[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.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\ndefine([\"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/utils/loader\", \"Magento_PageBuilder/js/converter/converter-pool\"], function (_config, _loader, _converterPool) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Create a new instance of converter pool\n   */\n  function create(contentType) {\n    var config = _config.getContentTypeConfig(contentType);\n\n    var converters = [];\n    var appearanceName;\n\n    for (var _i = 0, _Object$keys = Object.keys(config.appearances); _i < _Object$keys.length; _i++) {\n      appearanceName = _Object$keys[_i];\n      var appearance = config.appearances[appearanceName];\n\n      if (appearance !== undefined && appearance.elements !== undefined) {\n        var elementName = void 0;\n\n        for (var _i2 = 0, _Object$keys2 = Object.keys(appearance.elements); _i2 < _Object$keys2.length; _i2++) {\n          elementName = _Object$keys2[_i2];\n\n          if (appearance.elements[elementName].style !== undefined) {\n            for (var _iterator = _createForOfIteratorHelperLoose(appearance.elements[elementName].style), _step; !(_step = _iterator()).done;) {\n              var propertyConfig = _step.value;\n\n              if (!!propertyConfig.converter && converters.indexOf(propertyConfig.converter) === -1 && !_converterPool.get(propertyConfig.converter)) {\n                converters.push(propertyConfig.converter);\n              }\n\n              if (!!propertyConfig.preview_converter && converters.indexOf(propertyConfig.preview_converter) === -1 && !_converterPool.get(propertyConfig.preview_converter)) {\n                converters.push(propertyConfig.preview_converter);\n              }\n            }\n          }\n\n          if (appearance.elements[elementName].attributes !== undefined) {\n            for (var _iterator2 = _createForOfIteratorHelperLoose(appearance.elements[elementName].attributes), _step2; !(_step2 = _iterator2()).done;) {\n              var attributeConfig = _step2.value;\n\n              if (!!attributeConfig.converter && converters.indexOf(attributeConfig.converter) === -1 && !_converterPool.get(attributeConfig.converter)) {\n                converters.push(attributeConfig.converter);\n              }\n\n              if (!!attributeConfig.preview_converter && converters.indexOf(attributeConfig.preview_converter) === -1 && !_converterPool.get(attributeConfig.preview_converter)) {\n                converters.push(attributeConfig.preview_converter);\n              }\n            }\n          }\n\n          if (appearance.elements[elementName].html !== undefined) {\n            var htmlConfig = appearance.elements[elementName].html;\n\n            if (!!htmlConfig.converter && converters.indexOf(htmlConfig.converter) === -1 && !_converterPool.get(htmlConfig.converter)) {\n              converters.push(htmlConfig.converter);\n            }\n\n            if (!!htmlConfig.preview_converter && converters.indexOf(htmlConfig.preview_converter) === -1 && !_converterPool.get(htmlConfig.preview_converter)) {\n              converters.push(htmlConfig.preview_converter);\n            }\n          }\n        }\n      }\n    }\n\n    return new Promise(function (resolve) {\n      (0, _loader)(converters, function () {\n        for (var _len = arguments.length, loadedConverters = new Array(_len), _key = 0; _key < _len; _key++) {\n          loadedConverters[_key] = arguments[_key];\n        }\n\n        for (var i = 0; i < converters.length; i++) {\n          _converterPool.register(converters[i], new loadedConverters[i]());\n        }\n\n        resolve(_converterPool);\n      });\n    });\n  }\n\n  return create;\n});\n//# sourceMappingURL=converter-pool-factory.js.map","Magento_PageBuilder/js/converter/attribute/link-href.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"underscore\", \"Magento_PageBuilder/js/utils/object\"], function (_underscore, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var CreateValueForHref = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function CreateValueForHref() {\n      this.widgetParamsByLinkType = {\n        category: {\n          type: \"Magento\\\\Catalog\\\\Block\\\\Category\\\\Widget\\\\Link\",\n          id_path: \"category/:href\",\n          template: \"Magento_PageBuilder::widget/link_href.phtml\",\n          type_name: \"Catalog Category Link\"\n        },\n        product: {\n          type: \"Magento\\\\Catalog\\\\Block\\\\Product\\\\Widget\\\\Link\",\n          id_path: \"product/:href\",\n          template: \"Magento_PageBuilder::widget/link_href.phtml\",\n          type_name: \"Catalog Product Link\"\n        },\n        page: {\n          type: \"Magento\\\\Cms\\\\Block\\\\Widget\\\\Page\\\\Link\",\n          page_id: \":href\",\n          template: \"Magento_PageBuilder::widget/link_href.phtml\",\n          type_name: \"CMS Page Link\"\n        }\n      };\n    }\n\n    var _proto = CreateValueForHref.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var link = (0, _object.get)(data, name);\n      var href = \"\";\n\n      if (!link) {\n        return href;\n      }\n\n      var linkType = link.type;\n      var isHrefId = !isNaN(parseInt(link[linkType], 10));\n\n      if (isHrefId && link) {\n        href = this.convertToWidget(link[linkType], linkType);\n      } else if (typeof link[linkType] === \"string\") {\n        href = link[linkType];\n      }\n\n      return href;\n    }\n    /**\n     * @param {string} href\n     * @param {string} linkType\n     * @returns {string}\n     */\n    ;\n\n    _proto.convertToWidget = function convertToWidget(href, linkType) {\n      if (!href || !this.widgetParamsByLinkType[linkType]) {\n        return href;\n      }\n\n      var attributesString = _underscore.map(this.widgetParamsByLinkType[linkType], function (val, key) {\n        return key + \"='\" + val.replace(\":href\", href) + \"'\";\n      }).join(\" \");\n\n      return \"{{widget \" + attributesString + \" }}\";\n    };\n\n    return CreateValueForHref;\n  }();\n\n  return CreateValueForHref;\n});\n//# sourceMappingURL=link-href.js.map","Magento_PageBuilder/js/converter/attribute/src.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/config\", \"Magento_PageBuilder/js/utils/image\", \"Magento_PageBuilder/js/utils/object\", \"Magento_PageBuilder/js/utils/url\"], function (_config, _image, _object, _url) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Src = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Src() {}\n\n    var _proto = Src.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      if (!value) {\n        return \"\";\n      }\n\n      return (0, _image.decodeUrl)(value);\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value[0] === undefined || value[0].url === undefined) {\n        return \"\";\n      }\n\n      var imageUrl = value[0].url;\n      var mediaUrl = (0, _url.convertUrlToPathIfOtherUrlIsOnlyAPath)(_config.getConfig(\"media_url\"), imageUrl);\n      var mediaPath = imageUrl.split(mediaUrl);\n      return \"{{media url=\" + mediaPath[1] + \"}}\";\n    };\n\n    return Src;\n  }();\n\n  return Src;\n});\n//# sourceMappingURL=src.js.map","Magento_PageBuilder/js/converter/attribute/video-overlay-color.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var OverlayColor = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function OverlayColor() {}\n\n    var _proto = OverlayColor.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value === \"transparent\" ? \"\" : value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      if (data.video_overlay_color) {\n        return data.video_overlay_color.toString();\n      }\n\n      return \"\";\n    };\n\n    return OverlayColor;\n  }();\n\n  return OverlayColor;\n});\n//# sourceMappingURL=video-overlay-color.js.map","Magento_PageBuilder/js/converter/attribute/link-target.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var CreateValueForTarget = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function CreateValueForTarget() {}\n\n    var _proto = CreateValueForTarget.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (!value) {\n        return \"\";\n      }\n\n      return value.setting ? \"_blank\" : \"\";\n    };\n\n    return CreateValueForTarget;\n  }();\n\n  return CreateValueForTarget;\n});\n//# sourceMappingURL=link-target.js.map","Magento_PageBuilder/js/converter/attribute/link-type.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var CreateValueForLinkType = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function CreateValueForLinkType() {}\n\n    var _proto = CreateValueForLinkType.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n      return value && value.type ? value.type : \"default\";\n    };\n\n    return CreateValueForLinkType;\n  }();\n\n  return CreateValueForLinkType;\n});\n//# sourceMappingURL=link-type.js.map","Magento_PageBuilder/js/converter/attribute/preview/src.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Src = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Src() {}\n\n    var _proto = Src.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value && typeof value[0] === \"object\") {\n        return value[0].url;\n      }\n\n      return \"\";\n    };\n\n    return Src;\n  }();\n\n  return Src;\n});\n//# sourceMappingURL=src.js.map","Magento_PageBuilder/js/converter/attribute/preview/store-id.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"jquery\"], function (_jquery) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var StoreId = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function StoreId() {}\n\n    var _proto = StoreId.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      if (typeof data[name] !== \"string\") {\n        return \"\";\n      }\n\n      var storeId = (0, _jquery)('[data-role=\"store-view-id\"]').val() || \"0\";\n      return data[name].replace(/}}$/, \" store_id=\\\"\" + storeId + \"\\\"}}\");\n    };\n\n    return StoreId;\n  }();\n\n  return StoreId;\n});\n//# sourceMappingURL=store-id.js.map","Magento_PageBuilder/js/converter/html/directive.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/directives\", \"Magento_PageBuilder/js/utils/editor\", \"Magento_PageBuilder/js/utils/object\"], function (_directives, _editor, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Directives = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Directives() {}\n\n    var _proto = Directives.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param {string} value\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {Object} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      return (0, _editor.encodeContent)((0, _directives.convertMediaDirectivesToUrls)((0, _directives.removeQuotesInMediaDirectives)((0, _object.get)(data, name))));\n    };\n\n    return Directives;\n  }();\n\n  return Directives;\n});\n//# sourceMappingURL=directive.js.map","Magento_PageBuilder/js/converter/html/decode.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/directives\", \"Magento_PageBuilder/js/utils/object\"], function (_directives, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Decode = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Decode() {}\n\n    var _proto = Decode.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param {string} value\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      // Convert the encoded string back to HTML without executing\n      var html = new DOMParser().parseFromString(value, \"text/html\");\n      return html.body.textContent;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {Object} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      return (0, _directives.removeQuotesInMediaDirectives)((0, _object.get)(data, name));\n    };\n\n    return Decode;\n  }();\n\n  return Decode;\n});\n//# sourceMappingURL=decode.js.map","Magento_PageBuilder/js/converter/html/tag-escaper.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"underscore\", \"Magento_PageBuilder/js/utils/object\"], function (_underscore, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var TagEscaper = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function TagEscaper() {}\n\n    var _proto = TagEscaper.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param {string} value\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      var result = (0, _underscore.unescape)(value); // Have to do a manual &nbsp; replace since underscore un-escape does not un-escape &nbsp;\n\n      return result.replace(/&nbsp;/g, String.fromCharCode(160));\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {Object} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      return (0, _underscore.escape)((0, _object.get)(data, name));\n    };\n\n    return TagEscaper;\n  }();\n\n  return TagEscaper;\n});\n//# sourceMappingURL=tag-escaper.js.map","Magento_PageBuilder/js/converter/style/display.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"underscore\", \"Magento_PageBuilder/js/utils/object\"], function (_underscore, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Display = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Display() {}\n\n    var _proto = Display.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return !(value === \"none\");\n    }\n    /**\n     * Convert value to knockout format, we only provide a none property if we intend for the content type to be hidden,\n     * otherwise we let the original display property handle the display of the content type.\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (!_underscore.isUndefined(value) && value === false) {\n        return \"none\";\n      }\n\n      return;\n    };\n\n    return Display;\n  }();\n\n  return Display;\n});\n//# sourceMappingURL=display.js.map","Magento_PageBuilder/js/converter/style/video-overlay-color.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var VideoOverlayColor = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function VideoOverlayColor() {}\n\n    var _proto = VideoOverlayColor.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value !== \"\" && value !== undefined) {\n        return value;\n      }\n\n      return \"transparent\";\n    };\n\n    return VideoOverlayColor;\n  }();\n\n  return VideoOverlayColor;\n});\n//# sourceMappingURL=video-overlay-color.js.map","Magento_PageBuilder/js/converter/style/remove-px.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var RemovePx = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function RemovePx() {}\n\n    var _proto = RemovePx.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value.replace(\"px\", \"\");\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value) {\n        return value + \"px\";\n      }\n    };\n\n    return RemovePx;\n  }();\n\n  return RemovePx;\n});\n//# sourceMappingURL=remove-px.js.map","Magento_PageBuilder/js/converter/style/border-width.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var BorderWidth = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function BorderWidth() {}\n\n    var _proto = BorderWidth.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value === \"initial\" ? \"\" : value.replace(\"px\", \"\");\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value) {\n        return value + \"px\";\n      }\n    };\n\n    return BorderWidth;\n  }();\n\n  return BorderWidth;\n});\n//# sourceMappingURL=border-width.js.map","Magento_PageBuilder/js/converter/style/margins.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"underscore\", \"Magento_PageBuilder/js/utils/object\"], function (_underscore, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Margins = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Margins() {}\n\n    var _proto = Margins.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      if (undefined !== value.margin) {\n        return {\n          margin: {\n            top: value.margin.top.replace(\"px\", \"\"),\n            left: value.margin.left.replace(\"px\", \"\"),\n            right: value.margin.right.replace(\"px\", \"\"),\n            bottom: value.margin.bottom.replace(\"px\", \"\")\n          }\n        };\n      }\n\n      return {};\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var result = {};\n      var value = (0, _object.get)(data, name);\n\n      if (value && _underscore.isString(value)) {\n        value = JSON.parse(value);\n      }\n\n      if (value && undefined !== value.margin) {\n        result.marginLeft = value.margin.left ? value.margin.left + \"px\" : \"\";\n        result.marginTop = value.margin.top ? value.margin.top + \"px\" : \"\";\n        result.marginRight = value.margin.right ? value.margin.right + \"px\" : \"\";\n        result.marginBottom = value.margin.bottom ? value.margin.bottom + \"px\" : \"\";\n      }\n\n      return result;\n    };\n\n    return Margins;\n  }();\n\n  return Margins;\n});\n//# sourceMappingURL=margins.js.map","Magento_PageBuilder/js/converter/style/color.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Color = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Color() {}\n\n    var _proto = Color.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      if (value === \"default\" || value === \"initial\" || value === \"\") {\n        value = \"\";\n      } else {\n        var regexp = /(\\d{0,3}),\\s(\\d{0,3}),\\s(\\d{0,3})/;\n        var matches = regexp.exec(value);\n\n        if (matches) {\n          value = \"#\" + this.fromIntToHex(parseInt(matches[1], 10)) + this.fromIntToHex(parseInt(matches[2], 10)) + this.fromIntToHex(parseInt(matches[3], 10));\n        }\n      }\n\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      return (0, _object.get)(data, name, \"\");\n    }\n    /**\n     * Convert from int to hex\n     *\n     * @param {number} value\n     * @returns {string}\n     */\n    ;\n\n    _proto.fromIntToHex = function fromIntToHex(value) {\n      var hex = value.toString(16);\n      return hex.length === 1 ? \"0\" + hex : hex;\n    };\n\n    return Color;\n  }();\n\n  return Color;\n});\n//# sourceMappingURL=color.js.map","Magento_PageBuilder/js/converter/style/width.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Subtract margin from width to ensure adjacent elements do not\n   * move or resize when positive or negative margins are present\n   *\n   * @api\n   */\n  var Width = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Width() {}\n\n    var _proto = Width.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      if (value.indexOf(\"calc\") !== -1) {\n        return value.split(\"%\")[0].split(\"(\")[1] + \"%\";\n      }\n\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      if (data[name] && data[name] !== \"\") {\n        var marginsAndPadding = data.margins_and_padding || {};\n        var margins = marginsAndPadding.margin || \"\";\n        var marginLeft = margins.left ? parseInt(margins.left, 10) : 0;\n        var marginRight = margins.right ? parseInt(margins.right, 10) : 0;\n\n        if (marginLeft === 0 && marginRight === 0) {\n          return data[name].toString();\n        }\n\n        return \"calc(\" + data[name].toString() + \" - \" + (marginLeft + marginRight) + \"px)\";\n      }\n    };\n\n    return Width;\n  }();\n\n  return Width;\n});\n//# sourceMappingURL=width.js.map","Magento_PageBuilder/js/converter/style/background-image.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var BackgroundImage = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function BackgroundImage() {}\n\n    var _proto = BackgroundImage.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return null;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      return null;\n    };\n\n    return BackgroundImage;\n  }();\n\n  return BackgroundImage;\n});\n//# sourceMappingURL=background-image.js.map","Magento_PageBuilder/js/converter/style/min-height.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var MinHeight = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function MinHeight() {}\n\n    var _proto = MinHeight.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value.indexOf(\"calc\") !== -1 ? value.substring(5, value.length - 1) : value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n      return value.split(/\\+|\\-|\\*|\\//).length > 1 ? \"calc(\" + (0, _object.get)(data, name) + \")\" : value;\n    };\n\n    return MinHeight;\n  }();\n\n  return MinHeight;\n});\n//# sourceMappingURL=min-height.js.map","Magento_PageBuilder/js/converter/style/border-style.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var BorderStyleDefault = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function BorderStyleDefault() {}\n\n    var _proto = BorderStyleDefault.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      if (!value) {\n        return \"_default\";\n      }\n\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value && value !== \"_default\") {\n        return value;\n      }\n    };\n\n    return BorderStyleDefault;\n  }();\n\n  return BorderStyleDefault;\n});\n//# sourceMappingURL=border-style.js.map","Magento_PageBuilder/js/converter/style/overlay-border-radius.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Takes difference of border width from border radius to conform snugly to edges of wrapper border\n   *\n   * @api\n   */\n  var OverlayBorderRadius = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function OverlayBorderRadius() {}\n\n    var _proto = OverlayBorderRadius.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var borderRadius = data.border_radius ? parseInt(data.border_radius, 10) : 0;\n      var borderWidth = data.border_width ? parseInt(data.border_width, 10) : 0;\n\n      if (borderRadius <= borderWidth) {\n        return \"0\";\n      }\n\n      return borderRadius - borderWidth + \"px\";\n    };\n\n    return OverlayBorderRadius;\n  }();\n\n  return OverlayBorderRadius;\n});\n//# sourceMappingURL=overlay-border-radius.js.map","Magento_PageBuilder/js/converter/style/paddings.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"underscore\", \"Magento_PageBuilder/js/utils/object\"], function (_underscore, _object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Paddings = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Paddings() {}\n\n    var _proto = Paddings.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      if (undefined !== value.padding) {\n        return {\n          padding: {\n            top: value.padding.top.replace(\"px\", \"\"),\n            left: value.padding.left.replace(\"px\", \"\"),\n            right: value.padding.right.replace(\"px\", \"\"),\n            bottom: value.padding.bottom.replace(\"px\", \"\")\n          }\n        };\n      }\n\n      return {};\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param {string} name\n     * @param {DataObject} data\n     * @returns {string | object}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var result = {};\n      var value = (0, _object.get)(data, name);\n\n      if (value && _underscore.isString(value)) {\n        value = JSON.parse(value);\n      }\n\n      if (value && undefined !== value.padding) {\n        result.paddingLeft = value.padding.left ? value.padding.left + \"px\" : \"\";\n        result.paddingTop = value.padding.top ? value.padding.top + \"px\" : \"\";\n        result.paddingRight = value.padding.right ? value.padding.right + \"px\" : \"\";\n        result.paddingBottom = value.padding.bottom ? value.padding.bottom + \"px\" : \"\";\n      }\n\n      return result;\n    };\n\n    return Paddings;\n  }();\n\n  return Paddings;\n});\n//# sourceMappingURL=paddings.js.map","Magento_PageBuilder/js/converter/style/preview/display.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var Display = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function Display() {}\n\n    var _proto = Display.prototype;\n\n    /**\n     * Ensure the display none property doesn't persist to the preview\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return;\n    }\n    /**\n     * Ensure the display none property doesn't persist to the preview\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      return;\n    };\n\n    return Display;\n  }();\n\n  return Display;\n});\n//# sourceMappingURL=display.js.map","Magento_PageBuilder/js/converter/style/preview/background-image.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"Magento_PageBuilder/js/utils/object\"], function (_object) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @api\n   */\n  var BackgroundImage = /*#__PURE__*/function () {\n    \"use strict\";\n\n    function BackgroundImage() {}\n\n    var _proto = BackgroundImage.prototype;\n\n    /**\n     * Convert value to internal format\n     *\n     * @param value string\n     * @returns {string | object}\n     */\n    _proto.fromDom = function fromDom(value) {\n      return value;\n    }\n    /**\n     * Convert value to knockout format\n     *\n     * @param name string\n     * @param data Object\n     * @returns {string}\n     */\n    ;\n\n    _proto.toDom = function toDom(name, data) {\n      var value = (0, _object.get)(data, name);\n\n      if (value && typeof value[0] === \"object\") {\n        return \"url(\" + value[0].url + \")\";\n      }\n\n      return \"\";\n    };\n\n    return BackgroundImage;\n  }();\n\n  return BackgroundImage;\n});\n//# sourceMappingURL=background-image.js.map","Magento_PageBuilder/js/wysiwyg/factory.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"jquery\", \"Magento_PageBuilder/js/utils/loader\"], function (_jquery, _loader) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * @param {String} contentTypeId The ID in the registry of the content type.\n   * @param {String} elementId The ID of the editor element in the DOM.\n   * @param {String} contentTypeName The type of content type this editor will be used in. E.g. \"banner\".\n   * @param {AdditionalDataConfigInterface} config The configuration for the wysiwyg.\n   * @param {DataStore} dataStore The datastore to store the content in.\n   * @param {String} fieldName The key in the provided datastore to set the data.\n   * @param {String} stageId The ID in the registry of the stage containing the content type.\n   * @returns {Wysiwyg}\n   */\n  function create(contentTypeId, elementId, contentTypeName, config, dataStore, fieldName, stageId) {\n    config = _jquery.extend(true, {}, config);\n    return new Promise(function (resolve) {\n      (0, _loader)([config.adapter_config.component], function (WysiwygInstance) {\n        new Promise(function (configResolve) {\n          if (config.adapter_config.config_modifiers && config.adapter_config.config_modifiers[contentTypeName]) {\n            (0, _loader)([config.adapter_config.config_modifiers[contentTypeName]], function (ConfigModifierType) {\n              var modifier = new ConfigModifierType(); // Allow dynamic settings to be set before editor is initialized\n\n              modifier.modify(contentTypeId, config);\n              configResolve();\n            });\n          } else {\n            configResolve();\n          }\n        }).then(function () {\n          // Instantiate the component\n          var wysiwyg = new WysiwygInstance(contentTypeId, elementId, config, dataStore, fieldName, stageId);\n\n          if (config.adapter_config.component_initializers && config.adapter_config.component_initializers[contentTypeName]) {\n            (0, _loader)([config.adapter_config.component_initializers[contentTypeName]], function (InitializerType) {\n              var initializer = new InitializerType(); // Allow dynamic bindings from configuration such as events from the editor\n\n              initializer.initialize(wysiwyg);\n              resolve(wysiwyg);\n            });\n          } else {\n            resolve(wysiwyg);\n          }\n        });\n      });\n    });\n  }\n\n  return create;\n});\n//# sourceMappingURL=factory.js.map","Magento_PageBuilder/js/wysiwyg/component-initializer-interface.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  \"use strict\";\n});\n//# sourceMappingURL=component-initializer-interface.js.map","Magento_PageBuilder/js/wysiwyg/tinymce.js":"/*eslint-disable */\n/* jscs:disable */\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[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.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\ndefine([\"jquery\", \"mage/adminhtml/wysiwyg/events\", \"mage/adminhtml/wysiwyg/tiny_mce/setup\", \"Magento_PageBuilder/js/events\", \"underscore\", \"Magento_PageBuilder/js/utils/check-stage-full-screen\", \"Magento_PageBuilder/js/utils/delay-until\", \"Magento_PageBuilder/js/utils/pagebuilder-header-height\"], function (_jquery, _events, _setup, _events2, _underscore, _checkStageFullScreen, _delayUntil, _pagebuilderHeaderHeight) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n\n  /**\n   * Inline editing wysiwyg component\n   *\n   * @api\n   */\n  var Wysiwyg = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * The id of the editor element\n     */\n\n    /**\n     * The supplied wysiwyg configuration\n     */\n\n    /**\n     * Id of content type\n     */\n\n    /**\n     * Id of the stage\n     */\n\n    /**\n     * Wysiwyg adapter instance\n     */\n\n    /**\n     * Content type's data store\n     */\n\n    /**\n     * Field name in data store reflecting value held in wysiwyg\n     */\n\n    /**\n     * Create a debounce to save the content into the data store\n     */\n\n    /**\n     * @param {String} contentTypeId The ID in the registry of the content type.\n     * @param {String} elementId The ID of the editor element in the DOM.\n     * @param {AdditionalDataConfigInterface} config The configuration for the wysiwyg.\n     * @param {DataStore} dataStore The datastore to store the content in.\n     * @param {String} fieldName The key in the provided datastore to set the data.\n     * @param {String} stageId The ID in the registry of the stage containing the content type.\n     */\n    function Wysiwyg(contentTypeId, elementId, config, dataStore, fieldName, stageId) {\n      this.saveContentDebounce = _underscore.debounce(this.saveContentFromWysiwygToDataStore.bind(this), 500);\n      this.contentTypeId = contentTypeId;\n      this.elementId = elementId;\n      this.fieldName = fieldName;\n      this.config = config;\n      this.dataStore = dataStore;\n      this.stageId = stageId;\n\n      if (this.config.adapter_config.mode === \"inline\") {\n        /**\n         * Don't include content_css within the inline mode of TinyMCE, if any stylesheets are included here they're\n         * appended to the head of the main page, and thus cause other styles to be modified.\n         *\n         * The styles for typography in the inline editor are scoped within _typography.less\n         */\n        this.config.adapter.tinymce.content_css = [];\n      }\n\n      var wysiwygSetup = new _setup(this.elementId, this.config.adapter);\n      wysiwygSetup.setup(this.config.adapter_config.mode);\n      this.wysiwygAdapter = wysiwygSetup.wysiwygInstance;\n\n      if (this.config.adapter_config.mode === \"inline\") {\n        this.wysiwygAdapter.eventBus.attachEventHandler(_events.afterFocus, this.onFocus.bind(this));\n        this.wysiwygAdapter.eventBus.attachEventHandler(_events.afterBlur, this.onBlur.bind(this));\n      } // Update content in our data store after our stage preview wysiwyg gets updated\n\n\n      this.wysiwygAdapter.eventBus.attachEventHandler(_events.afterChangeContent, this.onChangeContent.bind(this)); // Update content in our stage preview wysiwyg after its slideout counterpart gets updated\n\n      _events2.on(\"form:\" + this.contentTypeId + \":saveAfter\", this.setContentFromDataStoreToWysiwyg.bind(this));\n\n      _events2.on(\"stage:\" + this.stageId + \":fullScreenModeChangeAfter\", this.toggleFullScreen.bind(this));\n    }\n    /**\n     * Hide TinyMce inline toolbar options after fullscreen exit\n     */\n\n\n    var _proto = Wysiwyg.prototype;\n\n    _proto.toggleFullScreen = function toggleFullScreen() {\n      var _this = this;\n\n      var $editor = (0, _jquery)(\"#\" + this.elementId); // wait for fullscreen to close\n\n      _underscore.defer(function () {\n        if (!(0, _checkStageFullScreen)(_this.stageId) && _this.config.adapter_config.mode === \"inline\" && $editor.hasClass(\"mce-edit-focus\")) {\n          $editor.removeClass(\"mce-edit-focus\");\n\n          _this.onBlur();\n        }\n      });\n    }\n    /**\n     * @returns {WysiwygInstanceInterface}\n     */\n    ;\n\n    _proto.getAdapter = function getAdapter() {\n      return this.wysiwygAdapter;\n    }\n    /**\n     * Called for the onFocus event\n     */\n    ;\n\n    _proto.onFocus = function onFocus() {\n      var _this2 = this;\n\n      this.getFixedToolbarContainer().addClass(\"pagebuilder-toolbar-active\");\n\n      _events2.trigger(\"stage:interactionStart\");\n\n      var element = document.querySelector(\"#\" + this.elementId);\n\n      if (!element) {\n        return;\n      } // Wait for everything else to finish\n\n\n      _underscore.defer(function () {\n        return (0, _delayUntil)(function () {\n          var $inlineToolbar = _this2.getFixedToolbarContainer().find(\".tox-tinymce-inline\");\n\n          var self = _this2;\n          $inlineToolbar.css(\"min-width\", _this2.config.adapter_config.minToolbarWidth + \"px\");\n\n          _this2.invertInlineEditorToAccommodateOffscreenToolbar(); // Update toolbar when the height changes\n\n\n          _this2.toolbarHeight = $inlineToolbar.height();\n\n          if ($inlineToolbar.length) {\n            _this2.resizeObserver = new ResizeObserver(function (entries) {\n              for (var _iterator = _createForOfIteratorHelperLoose(entries), _step; !(_step = _iterator()).done;) {\n                var entry = _step.value;\n\n                if (entry.target === $inlineToolbar.get(0) && entry.target.clientHeight !== self.toolbarHeight) {\n                  self.invertInlineEditorToAccommodateOffscreenToolbar();\n                  self.toolbarHeight = entry.target.clientHeight;\n                }\n              }\n            });\n\n            _this2.resizeObserver.observe($inlineToolbar.get(0));\n          }\n\n          var dialogContainer = document.querySelector(\"#\" + _this2.elementId + \" ~ .tox-tinymce-aux\");\n\n          if (!!dialogContainer) {\n            dialogContainer.setAttribute(\"data-editor-aux\", _this2.elementId);\n            document.body.appendChild(dialogContainer);\n          }\n        }, function () {\n          return element.classList.contains(\"mce-edit-focus\");\n        }, 10);\n      });\n    }\n    /**\n     * Called for the onChangeContent event\n     */\n    ;\n\n    _proto.onChangeContent = function onChangeContent() {\n      this.saveContentDebounce();\n      this.invertInlineEditorToAccommodateOffscreenToolbar();\n    }\n    /**\n     * Called for the onBlur events\n     */\n    ;\n\n    _proto.onBlur = function onBlur() {\n      this.getFixedToolbarContainer().removeClass(\"pagebuilder-toolbar-active\").find(\".tox-tinymce-inline\").css(\"top\", \"\");\n\n      if (this.resizeObserver) {\n        this.resizeObserver.unobserve(this.getFixedToolbarContainer().find(\".tox-tinymce-inline\").get(0));\n      }\n\n      this.toolbarHeight = 0;\n      var dialogContainer = document.querySelector(\"[data-editor-aux=\" + this.elementId + \"]\");\n\n      if (!!dialogContainer) {\n        dialogContainer.removeAttribute(\"data-editor-aux\");\n        document.querySelector(\"#\" + this.elementId).parentNode.appendChild(dialogContainer);\n      }\n\n      _events2.trigger(\"stage:interactionStop\");\n    }\n    /**\n     * Update content in our data store after our stage preview wysiwyg gets updated\n     */\n    ;\n\n    _proto.saveContentFromWysiwygToDataStore = function saveContentFromWysiwygToDataStore() {\n      this.dataStore.set(this.fieldName, this.getAdapter().getContent());\n    }\n    /**\n     * Update content in our stage wysiwyg after our data store gets updated\n     */\n    ;\n\n    _proto.setContentFromDataStoreToWysiwyg = function setContentFromDataStoreToWysiwyg() {\n      this.getAdapter().setContent(this.dataStore.get(this.fieldName));\n    }\n    /**\n     * Adjust padding on stage if in fullscreen mode to accommodate inline wysiwyg toolbar overflowing fixed viewport\n     */\n    ;\n\n    _proto.invertInlineEditorToAccommodateOffscreenToolbar = function invertInlineEditorToAccommodateOffscreenToolbar() {\n      if (this.config.adapter_config.mode !== \"inline\") {\n        return;\n      }\n\n      var $inlineToolbar = this.getFixedToolbarContainer().find(\".tox-tinymce-inline\");\n\n      if (!$inlineToolbar.length) {\n        return;\n      }\n\n      var inlineWysiwygClientRectTop = this.getFixedToolbarContainer().get(0).getBoundingClientRect().top - (0, _pagebuilderHeaderHeight)(this.stageId);\n\n      if (!(0, _checkStageFullScreen)(this.stageId) || $inlineToolbar.height() < inlineWysiwygClientRectTop) {\n        var extraHeight = 0;\n\n        if ($inlineToolbar.parents(\".pagebuilder-slide[data-appearance='collage-left']\").length || $inlineToolbar.parents(\".pagebuilder-slide[data-appearance='collage-right']\").length || $inlineToolbar.parents(\".pagebuilder-slide[data-appearance='collage-centered']\").length) {\n          extraHeight = 29;\n        }\n\n        $inlineToolbar.css(\"top\", ($inlineToolbar.height() - extraHeight) * -1);\n        return;\n      }\n\n      $inlineToolbar.css(\"top\", \"\");\n    }\n    /**\n     * Get fixed toolbar container element referenced as selector in wysiwyg adapter settings\n     *\n     * @returns {jQuery}\n     */\n    ;\n\n    _proto.getFixedToolbarContainer = function getFixedToolbarContainer() {\n      return (0, _jquery)(\"#\" + this.elementId).closest(\"\" + this.config.adapter.settings.fixed_toolbar_container);\n    };\n\n    return Wysiwyg;\n  }();\n\n  return Wysiwyg;\n});\n//# sourceMappingURL=tinymce.js.map","Magento_PageBuilder/js/wysiwyg/config-modifier-interface.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  \"use strict\";\n});\n//# sourceMappingURL=config-modifier-interface.js.map","Magento_PageBuilder/js/wysiwyg/wysiwyg-interface.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([], function () {\n  \"use strict\";\n});\n//# sourceMappingURL=wysiwyg-interface.js.map","Magento_PageBuilder/js/panel/menu.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"knockout\"], function (_knockout) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var Menu = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * Menu constructor\n     *\n     * @param id\n     * @param menu\n     * @param contentTypes\n     * @param stageId\n     */\n    function Menu(id, menu, contentTypes, stageId) {\n      if (contentTypes === void 0) {\n        contentTypes = [];\n      }\n\n      this.hidden = _knockout.observable(false);\n      this.id = _knockout.observable();\n      this.code = _knockout.observable(\"\");\n      this.label = _knockout.observable(\"\");\n      this.icon = _knockout.observable(\"\");\n      this.sort = _knockout.observable();\n      this.contentTypes = _knockout.observableArray([]);\n      this.active = _knockout.observable(false);\n      this.id(id);\n      this.code(menu.code);\n      this.label(menu.label);\n      this.icon(menu.icon);\n      this.sort(menu.sort);\n      this.contentTypes(contentTypes);\n      this.stageId = stageId;\n    }\n    /**\n     * Toggle the menu\n     */\n\n\n    var _proto = Menu.prototype;\n\n    _proto.toggle = function toggle() {\n      this.active(!this.active());\n    };\n\n    return Menu;\n  }();\n\n  return {\n    Menu: Menu\n  };\n});\n//# sourceMappingURL=menu.js.map","Magento_PageBuilder/js/panel/menu/content-type.js":"/*eslint-disable */\n/* jscs:disable */\ndefine([\"knockout\", \"Magento_PageBuilder/js/drag-drop/matrix\"], function (_knockout, _matrix) {\n  /**\n   * Copyright \u00a9 Magento, Inc. All rights reserved.\n   * See COPYING.txt for license details.\n   */\n  var ContentType = /*#__PURE__*/function () {\n    \"use strict\";\n\n    /**\n     * @param {string} identifier\n     * @param {ContentTypeConfigInterface} config\n     * @param {string} stageId\n     */\n    function ContentType(identifier, config, stageId) {\n      this.droppable = true;\n      this.icon = _knockout.observable(\"\");\n      this.identifier = _knockout.observable(\"\");\n      this.label = _knockout.observable(\"\");\n      this.config = config;\n      this.identifier(identifier);\n      this.label(config.label);\n      this.icon(config.icon);\n      this.stageId = stageId;\n    }\n    /**\n     * Retrieve the config object\n     *\n     * @returns {ContentTypeConfigInterface}\n     */\n\n\n    var _proto = ContentType.prototype;\n\n    _proto.getConfig = function getConfig() {\n      return this.config;\n    }\n    /**\n     * Only connect to container sortable instances that the current content type is accepted into\n     *\n     * @returns {string}\n     */\n    ;\n\n    _proto.getDraggableOptions = function getDraggableOptions() {\n      return {\n        connectToSortable: (0, _matrix.getAllowedContainersClasses)(this.config.name, this.stageId)\n      };\n    };\n\n    return ContentType;\n  }();\n\n  return {\n    ContentType: ContentType\n  };\n});\n//# sourceMappingURL=content-type.js.map","Magento_PageBuilder/js/system/config/validator-rules-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    return function (target) {\n        $.validator.addMethod(\n            'validate-google-map-style',\n            function (value) {\n                if ($.mage.isEmptyNoTrim(value)) {\n                    return true;\n                }\n\n                try {\n                    JSON.parse(value);\n                } catch (e) {\n                    return false;\n                }\n\n                return true;\n            },\n            $.mage.__('Google Maps Style JSON is invalid. Please paste the valid JSON style.')\n        );\n\n        $.validator.addMethod(\n            'validate-greater-than-one',\n            function (value) {\n                return !(value <= 1);\n            },\n            $.mage.__('Please enter a number 2 or greater in this field.')\n        );\n\n        $.validator.addMethod(\n            'validate-default-grid-size',\n            function (value) {\n                return !(parseInt(value, 10) >\n                    parseInt($('[name=\"groups[pagebuilder][fields][column_grid_max][value]\"]').val(), 10)\n                );\n            },\n            $.mage.__('Default grid size must be less than the maximum grid size.')\n        );\n\n        return target;\n    };\n});\n","Magento_PageBuilder/js/system/config/enable-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'mage/translate',\n    'Magento_Ui/js/modal/confirm',\n    'domReady!'\n], function ($, $t, confirm) {\n    'use strict';\n\n    return function (config, enableSelectEl) {\n\n        var $enableSelectEl = $(enableSelectEl),\n            isEnabledInDatabase = !!parseInt($enableSelectEl.val(), 10);\n\n        $enableSelectEl.on('change', function () {\n            var userIsDisabling = !parseInt($enableSelectEl.val(), 10);\n\n            if (!isEnabledInDatabase || !userIsDisabling) {\n                return;\n            }\n\n            confirm({\n                title: $t(config.modalTitleText),\n                content: $t(config.modalContentBody),\n                buttons: [{\n                    text: $t('Cancel'),\n                    class: 'action-secondary action-dismiss action-pagebuilder-cancel',\n\n                    /**\n                     * Close modal and trigger 'cancel' action on click\n                     */\n                    click: function (event) {\n                        this.closeModal(event);\n                    }\n                }, {\n                    text: $t('Turn Off'),\n                    class: 'action-primary action-accept',\n\n                    /**\n                     * Close modal and trigger 'confirm' action on click\n                     */\n                    click: function (event) {\n                        this.closeModal(event, true);\n                    }\n                }],\n                actions: {\n\n                    /**\n                     * Revert back to original Enabled setting\n                     */\n                    cancel: function () {\n                        $enableSelectEl.val(Number(true));\n                    }\n                }\n            });\n        });\n    };\n});\n","Magento_PageBuilder/js/system/config/google-maps-api-key-validator.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(['jquery'], function ($) {\n    'use strict';\n\n    /**\n     * Initialize click and input events to handle validation\n     *\n     * @param {Object} config\n     * @param {HTMLElement} el\n     */\n    var GoogleMapsApiKeyValidator = function (config, el) {\n        var sourceElement = $('#' + config.sourceField),\n            initialValue = sourceElement.val(),\n            resultElement = $('#' + config.elementId + ' > .result');\n\n        if (initialValue) {\n            $(el).attr('disabled', false);\n        }\n\n        $(el).on('click', function () {\n            var resultText = config.invalidLabel,\n                resultIcon = 'icon-admin-pagebuilder-error',\n                resultHtml;\n\n            $.ajax({\n                url: config.validateUrl,\n                showLoader: true,\n                data: {\n                    googleMapsApiKey: sourceElement.val()\n                }\n            }).done(function (data) {\n                if (data.success) {\n                    resultText = config.validLabel;\n                    resultIcon = 'icon-admin-pagebuilder-success';\n                }\n\n                resultHtml = '<i class=\"' + resultIcon + '\"></i> ' + resultText;\n                resultElement.html(resultHtml);\n            });\n        });\n\n        sourceElement.on('keyup', function (event) {\n            var elementValue = event.currentTarget.value,\n                buttonText = config.buttonLabel;\n\n            $(el).attr('disabled', !elementValue);\n            resultElement.html(buttonText);\n        });\n    };\n\n    return GoogleMapsApiKeyValidator;\n});\n","Magento_PageBuilder/js/system/config/switch-attribute-type.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'mage/translate',\n    'Magento_Ui/js/modal/confirm',\n    'domReady!'\n], function ($, $t, confirm) {\n    'use strict';\n\n    return function (config, attributeDropDownEl) {\n\n        var $attributeDropDownEl = $(attributeDropDownEl),\n            previousOption = '';\n\n        $attributeDropDownEl.on('focus', function () {\n            // Store the current value on focus and on change\n            previousOption = this.value;\n        });\n\n        $attributeDropDownEl.on('change', function () {\n\n            if (attributeDropDownEl.options.length > 3 ||\n                this.value === 'pagebuilder' ||\n                previousOption !== 'pagebuilder'\n            ) {\n                return;\n            }\n\n            confirm({\n                title: $t(config.modalTitleText),\n                content: $t(config.modalContentBody),\n                buttons: [{\n                    text: $t('Cancel'),\n                    class: 'action-secondary action-dismiss action-pagebuilder-cancel',\n\n                    /**\n                     * Close modal and trigger 'cancel' action on click\n                     */\n                    click: function (event) {\n                        this.closeModal(event);\n                    }\n                }, {\n                    text: $t('Change Input Type'),\n                    class: 'action-primary action-accept',\n\n                    /**\n                     * Close modal and trigger 'confirm' action on click\n                     */\n                    click: function (event) {\n                        this.closeModal(event, true);\n                    }\n                }],\n                actions: {\n\n                    /**\n                     * Revert back to 'pagebuilder' setting\n                     */\n                    cancel: function () {\n                        $attributeDropDownEl.val('pagebuilder');\n                        $attributeDropDownEl.trigger('change');\n                    }\n                }\n            });\n        });\n    };\n});\n","Magento_PageBuilder/js/form/form-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'jquery',\n    'Magento_PageBuilder/js/events',\n    'consoleLogger'\n], function (_, $, events, consoleLogger) {\n    'use strict';\n\n    var mixin = {\n        defaults: {\n            pageBuilderInstances: []\n        },\n\n        /**\n         * Record instances of Page Builder initialized in the forms namespace\n         */\n        initialize: function () {\n            var self = this;\n\n            this._super();\n\n            events.on('pagebuilder:register', function (data) {\n                if (data.ns === self.ns) {\n                    self.pageBuilderInstances.push(data.instance);\n                }\n            });\n\n            return this;\n        },\n\n        /**\n         * Intercept save call to ensure any Page Builder rendering is completed before submitting form\n         *\n         * @param {String} redirect\n         * @param {Object} data\n         */\n        save: function (redirect, data) {\n            var submit = this._super.bind(this, redirect, data),\n                timeout,\n                locks;\n\n            if (_.isEmpty(this.pageBuilderInstances)) {\n                submit();\n            } else {\n                timeout = setTimeout(function () {\n                    consoleLogger.error('Page Builder was rendering for 5 seconds without releasing locks.');\n                }, 5000);\n\n                $('body').trigger('processStart');\n\n                // Wait for all rendering locks within Page Builder stages to resolve\n                $.when.apply(\n                    null,\n                    this.pageBuilderInstances.map(function (instance) {\n                        locks = instance.stage.renderingLocks;\n\n                        return locks[locks.length - 1];\n                    })\n                ).then(function () {\n                    $('body').trigger('processStop');\n                    clearTimeout(timeout);\n                    submit();\n                });\n            }\n        }\n    };\n\n    return function (target) {\n        return target.extend(mixin);\n    };\n});\n","Magento_PageBuilder/js/form/map-location-provider.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/provider',\n    'Magento_PageBuilder/js/events'\n], function (Provider, events) {\n    'use strict';\n\n    return Provider.extend({\n        /** @inheritdoc **/\n        initClient: function () {\n            return this;\n        },\n\n        /** @inheritdoc **/\n        save: function () {\n            events.trigger('mapLocation:saveAfter', this.get('data'));\n\n            return this;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/provider.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/provider',\n    'Magento_PageBuilder/js/events'\n], function (Provider, events) {\n    'use strict';\n\n    return Provider.extend({\n        /** @inheritdoc **/\n        initClient: function () {\n            return this;\n        },\n\n        /** @inheritdoc **/\n        save: function () {\n            events.trigger('form:' + this.id + ':saveAfter', this.get('data'));\n\n            return this;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/product-totals.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'jquery',\n    'mage/translate',\n    'Magento_PageBuilder/js/form/provider/conditions-data-processor',\n    'Magento_Ui/js/form/element/abstract'\n], function (_, $, $t, conditionsDataProcessor, Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n        defaults: {\n            conditionOption: '',\n            conditionValue: '',\n            formData: {},\n            totalProductCount: 0,\n            totalDisabledProducts: 0,\n            totalNotVisibleProducts: 0,\n            previousConditions: false,\n            listens: {\n                conditionOption: 'updateProductTotals',\n                conditionValue: 'updateProductTotals',\n                '${ $.provider }:data.modalClosed': 'abortRunningRequest'\n            },\n            imports: {\n                formData: '${ $.provider }:data'\n            },\n            links: {\n                value: false\n            },\n            url: null,\n            valuePlaceholder: $t('of %1 total'),\n            disabledPlaceholder: $t('%1 disabled'),\n            notVisiblePlaceholder: $t('%1 not visible'),\n            showSpinner: true,\n            loading: false,\n            jqXHR: null\n        },\n\n        /**\n         * Abort running Ajax request\n         */\n        abortRunningRequest: function () {\n            if (this.jqXHR && this.jqXHR.readyState !== 4) {\n                this.jqXHR.abort();\n            }\n        },\n\n        /** @inheritdoc */\n        initObservable: function () {\n            return this._super()\n                .observe('value totalProductCount totalDisabledProducts totalNotVisibleProducts loading');\n        },\n\n        /**\n         * If we haven't aborted the request, continue and display the error\n         *\n         * @param {Object} jqXHR\n         */\n        callSuperError: function (jqXHR) {\n            // eslint-disable-next-line jquery-no-bind-unbind\n            var superError = $.ajaxSettings.error.bind(window, jqXHR);\n\n            superError();\n        },\n\n        /**\n         * Update product count.\n         */\n        updateProductTotals: _.debounce(function () {\n            var totalText,\n                negativeTotals = [];\n\n            if (!this.conditionOption || _.isEmpty(this.formData)) {\n                return;\n            }\n\n            if (this.conditionOption === 'category_ids' && typeof this.formData['category_ids'] !== 'string') {\n                this.formData['category_ids'] = '';\n            }\n\n            _.extend(this.formData, this.conditionValue);\n            conditionsDataProcessor(this.formData, this.conditionOption + '_source');\n\n            // Store the previous conditions so we don't update the totals when nothing has changed\n            if (this.previousConditions === this.formData['conditions_encoded']) {\n                return;\n            }\n            this.previousConditions = this.formData['conditions_encoded'];\n\n            this.loading(true);\n            this.abortRunningRequest();\n            this.jqXHR = $.ajax({\n                url: this.url,\n                method: 'POST',\n                data: {\n                    conditionValue: this.formData['conditions_encoded']\n                },\n                error: function (jqXHR) {\n                    if (jqXHR.statusText !== 'abort') {\n                        this.callSuperError(jqXHR);\n                    }\n                }.bind(this)\n            }).done(function (response) {\n                this.totalProductCount(parseInt(response.total, 10));\n                this.totalDisabledProducts(parseInt(response.disabled, 10));\n                this.totalNotVisibleProducts(parseInt(response.notVisible, 10));\n                totalText = this.valuePlaceholder\n                    .replace('%1', parseInt(response.total, 10));\n\n                if (parseInt(response.disabled, 10) > 0) {\n                    negativeTotals.push(this.disabledPlaceholder.replace('%1', parseInt(response.disabled, 10)));\n                }\n\n                if (parseInt(response.notVisible, 10) > 0) {\n                    negativeTotals.push(this.notVisiblePlaceholder.replace('%1', parseInt(response.notVisible, 10)));\n                }\n\n                if (negativeTotals.length > 0) {\n                    totalText += ' (' + negativeTotals.join(', ') + ')';\n                }\n\n                this.value(totalText);\n                this.loading(false);\n            }.bind(this)).fail(function () {\n                if (this.jqXHR.statusText !== 'abort') {\n                    this.value($t('An unknown error occurred. Please try again.'));\n                }\n                this.loading(false);\n            }.bind(this));\n        }, 10)\n    });\n});\n","Magento_PageBuilder/js/form/element/validator-rules-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'underscore',\n    'Magento_Ui/js/lib/validation/utils'\n], function ($, _, utils) {\n    'use strict';\n\n    /**\n     * Validate the number is between the min and max provided\n     *\n     * @param {Number} value\n     * @param {Number} min\n     * @param {Number} max\n     * @return {Boolean}\n     */\n    function validateNumberBetween(value, min, max) {\n        var numValue;\n\n        if ($.mage.isEmptyNoTrim(value)) {\n            return true;\n        }\n\n        numValue = $.mage.parseNumber(value);\n\n        if (isNaN(numValue)) {\n            return false;\n        }\n\n        return $.mage.isBetween(numValue, min, max);\n    }\n\n    /**\n     * Validate that string is url\n     * @param {String} href\n     * @return {Boolean}\n     */\n    function validateIsUrl(href) {\n        return (/^(http|https|ftp):\\/\\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\\d+))?(\\/[A-Z0-9~](([A-Z0-9_~-]|\\.)*[A-Z0-9~]|))*\\/?(.*)?$/i).test(href);//eslint-disable-line max-len\n    }\n\n    /**\n     * Validate that string has an anchor tag\n     * @param {String} str\n     * @return {Boolean}\n     */\n    function validateWysiwygHasAnchorTags(str) {\n        return (/<a[\\s]+([^>]+)>|<a>|<\\/a>/igm).test(str);\n    }\n\n    /**\n     * Validate that string has a widget\n     * @param {String} str\n     * @return {Boolean}\n     */\n    function validateWysiwygHasWidget(str) {\n        return (/\\{\\{widget(.*?)\\}\\}/ig).test(str);\n    }\n\n    /**\n     * Validate that string is a proper css-class\n     * @param {String} str\n     * @return {Boolean}\n     */\n    function validateCssClass(str) {\n        return (/^[a-zA-Z _\\-\\d]+$/i).test(str);\n    }\n\n    /**\n     * Validate message field and url field anchor tag is used exclusively by one field\n     * @param {String} message\n     * @param {Object} url\n     * @return {Boolean}\n     */\n    function validateOneAnchorTagField(message, url) {\n        return !(validateWysiwygHasAnchorTags(message) &&\n            ['page', 'product', 'category', 'default'].indexOf(url.type) !== -1 &&\n            url[url.type] &&\n            url[url.type].length > 0);\n    }\n\n    /**\n     * Validate message field and url field html standards, nested widget\n     * @param {String} message\n     * @param {Object} url\n     * @return {Boolean}\n     */\n    function validateNestedWidgetElement(message, url) {\n        return !(validateWysiwygHasWidget(message) &&\n            ['page', 'product', 'category', 'default'].indexOf(url.type) !== -1 &&\n            url[url.type] &&\n            url[url.type].length > 0);\n    }\n\n    /**\n     * Validate a field with an expected data value of type object, like margins_and_padding field\n     * @param {Function} validator\n     * @param {String} ruleName\n     */\n    function validateObjectField(validator, ruleName) {\n        var rule = validator.getRule(ruleName);\n\n        validator.addRule(\n            ruleName,\n            function (value, params) {\n                var allNumbers = true,\n                    handler = rule.handler.bind(this);\n\n                if (typeof value !== 'object') {\n                    return handler(value, params);\n                }\n\n                _.flatten(_.map(value, _.values)).forEach(function (val) {\n                    if (!handler(val, params)) {\n                        allNumbers = false;\n\n                        return allNumbers;\n                    }\n                });\n\n                return allNumbers;\n            },\n            $.mage.__(rule.message)\n        );\n    }\n\n    /**\n     * Validate calc value.\n     *\n     * @param {String} value\n     * @returns {Boolean}\n     */\n    function validateCalc(value) {\n        var el = document.createElement('div'),\n            style = el.style;\n\n        if (!value.trim().length) {\n            return true;\n        }\n\n        style.width = 'calc(' + value + ')';\n\n        return !!style.width.length;\n    }\n\n    return function (validator) {\n        var requiredInputRule = validator.getRule('required-entry');\n\n        validator.addRule(\n            'required-entry-location-name',\n            requiredInputRule.handler,\n            $.mage.__('Please enter the location name.')\n        );\n\n        validator.addRule(\n            'required-entry-latitude',\n            requiredInputRule.handler,\n            $.mage.__('Enter latitude')\n        );\n\n        validator.addRule(\n            'required-entry-longitude',\n            requiredInputRule.handler,\n            $.mage.__('Enter longitude')\n        );\n\n        validator.addRule(\n            'validate-latitude',\n            function (value) {\n                return validateNumberBetween(value, -85, 85);\n            },\n            $.mage.__('Please enter a number between -85 and 85')\n        );\n\n        validator.addRule(\n            'validate-longitude',\n            function (value) {\n                return validateNumberBetween(value, -180, 180);\n            },\n            $.mage.__('Please enter a number between -180 and 180')\n        );\n\n        validator.addRule(\n            'validate-video-url',\n            function (href) {\n                if (utils.isEmptyNoTrim(href)) {\n                    return true;\n                }\n\n                href = (href || '').replace(/^\\s+/, '').replace(/\\s+$/, '');\n\n                return validateIsUrl(href) && (href.match(/youtube\\.com|youtu\\.be/) || href.match(/vimeo\\.com/));\n            },\n            $.mage.__('Please enter a valid video URL.')\n        );\n\n        validator.addRule(\n            'validate-video-source',\n            function (href) {\n                if (utils.isEmptyNoTrim(href)) {\n                    return true;\n                }\n\n                href = (href || '').replace(/^\\s+/, '').replace(/\\s+$/, '');\n\n                return validateIsUrl(href) && (\n                    href.match(/youtube\\.com|youtu\\.be/) ||\n                    href.match(/vimeo\\.com/) ||\n                    href.match(/\\.(mp4|ogv|webm)(?!\\w)/)\n                );\n            },\n            $.mage.__('Please enter a valid video URL. Valid URLs have a video file extension (.mp4, .webm, .ogv) or links to videos on YouTube or Vimeo.')//eslint-disable-line max-len\n        );\n\n        validator.addRule(\n            'validate-css-class',\n            function (value) {\n                if (utils.isEmptyNoTrim(value)) {\n                    return true;\n                }\n\n                return validateCssClass(value);\n            },\n            $.mage.__('Please enter a valid CSS class.')\n        );\n\n        validator.addRule(\n            'required-entry',\n            function (value) {\n                var allFilled;\n\n                // Validation only for margins and paddings\n                if (typeof value === 'object' && !!(value.padding || value.margin)) {\n                    allFilled = true;\n\n                    _.flatten(_.map(value, _.values)).forEach(function (val) {\n                        if (utils.isEmpty(val)) {\n                            allFilled = false;\n\n                            return allFilled;\n                        }\n                    });\n\n                    return allFilled;\n                }\n\n                return requiredInputRule.handler(value);\n            },\n            $.mage.__(requiredInputRule.message)\n        );\n\n        validator.addRule(\n            'validate-message-no-link',\n            function (url, message) {\n                return validateOneAnchorTagField(message, url);\n            },\n            $.mage.__('Adding link in both content and outer element is not allowed.')\n        );\n\n        validator.addRule(\n            'validate-no-url',\n            function (message, url) {\n                return validateOneAnchorTagField(message, url);\n            },\n            $.mage.__('Adding link in both content and outer element is not allowed.')\n        );\n\n        validator.addRule(\n            'validate-message-no-widget',\n            function (url, message) {\n                return validateNestedWidgetElement(message, url);\n            },\n            $.mage.__('Adding link in outer element and widget in content is not allowed.')\n        );\n\n        validator.addRule(\n            'validate-no-widget',\n            function (message, url) {\n                return validateNestedWidgetElement(message, url);\n            },\n            $.mage.__('Adding widget in content and link in outer element is not allowed.')\n        );\n\n        validator.addRule(\n            'validate-calc',\n            function (value) {\n                return validateCalc(value);\n            },\n            $.mage.__('Please enter a valid number or calculation: Valid numbers must have an extension (px, %, pt, vh). Calculations must have white space around the + and - operators and cannot divide by zero.')//eslint-disable-line max-len\n        );\n\n        validator.addRule(\n            'validate-grid-size',\n            function (value, params, additionalParams) {\n                if (value < additionalParams.non_empty_column_count) {\n                    return false;\n                }\n\n                return true;\n            },\n            $.mage.__('Grid size cannot be smaller than the current total amount of columns, minus any empty columns.')\n        );\n\n        validator.addRule(\n            'validate-max-grid-size',\n            function (value, params, additionalParams) {\n                if (value > additionalParams.max_grid_size) {\n                    return false;\n                }\n\n                return true;\n            },\n            $.mage.__('Please enter a value less than or equal to the Maximum Column Grid Size configuration.')\n        );\n\n        validateObjectField(validator, 'validate-number');\n        validateObjectField(validator, 'less-than-equals-to');\n        validateObjectField(validator, 'greater-than-equals-to');\n\n        return validator;\n    };\n});\n","Magento_PageBuilder/js/form/element/select-filtered-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/select'\n], function (_, Select) {\n    'use strict';\n\n    return Select.extend({\n\n        defaults: {\n            excludeOptions: []\n        },\n\n        /** @inheritdoc */\n        onUpdate: function () {\n            if (!this.updatedByFilter) {\n                this.transferredValue = null;\n            } else {\n                this.updatedByFilter = false;\n            }\n\n            return this._super();\n        },\n\n        /**\n         * Excluding options according excludeOptions configuration based on the passed value\n         *\n         * @param {String} value\n         */\n        filter: function (value) {\n            var source = this.initialOptions,\n                initialValue = this.value(),\n                result,\n                excludeOptions =  this.excludeOptions[value],\n                excludedOptionsArray = excludeOptions ? excludeOptions.split(',') : [];\n\n            result = _.filter(source, function (item) {\n                return !excludeOptions || excludedOptionsArray.indexOf(item.value) === -1;\n            });\n\n            this.updatedByFilter = true;\n            this.setOptions(result);\n\n            this.value(this.transferredValue ? this.transferredValue : initialValue);\n\n            if (excludedOptionsArray.indexOf(initialValue) !== -1) {\n                this.transferredValue = initialValue;\n            } else {\n                this.transferredValue = null;\n            }\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/visual-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_Ui/js/form/element/select'\n], function (_, Select) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            noticeMessage: '',\n            listens: {\n                value: 'setNoticeMessage'\n            }\n        },\n\n        /**\n         * Initializes observable properties of instance\n         *\n         * @returns {Abstract} Chainable.\n         */\n        initObservable: function () {\n            this._super();\n            this.observe('noticeMessage');\n\n            return this;\n        },\n\n        /**\n         * Parses incoming options, considers options with undefined value property\n         *     as caption\n         *\n         * @param  {Array} nodes\n         * @param {Object} captionValue\n         * @return {Object} captionValue\n         */\n        parseOptions: function (nodes, captionValue) {\n            var caption,\n                value;\n\n            nodes = _.map(nodes, function (node) {\n                value = node.value;\n\n                if ((value === null || value === captionValue) && _.isUndefined(caption)) {\n                    caption = node.label;\n                }\n\n                return node;\n            });\n\n            return {\n                options: _.compact(nodes),\n                caption: _.isString(caption) ? caption : false\n            };\n        },\n\n        /**\n         * Recursively set to object item like value and item.value like key.\n         *\n         * @param {Array} data\n         * @param {Object} result\n         * @returns {Object}\n         */\n        indexOptions: function (data, result) {\n            var value;\n\n            result = result || {};\n\n            data.forEach(function (item) {\n                value = item.value;\n\n                if (Array.isArray(value)) {\n                    this.indexOptions(value, result);\n                } else {\n                    result[value] = item;\n                }\n            });\n\n            return result;\n        },\n\n        /**\n         * Sets 'data' to 'options' observable array, if instance has\n         * 'customEntry' property set to true, calls 'setHidden' method\n         *  passing !options.length as a parameter\n         *\n         * @param {Array} data\n         * @returns {Object} Chainable\n         */\n        setOptions: function (data) {\n            var captionValue = this.captionValue || '',\n                result = this.parseOptions(data, captionValue),\n                isVisible;\n\n            this.indexedOptions = this.indexOptions(result.options);\n\n            this.options(result.options);\n\n            if (!this.caption()) {\n                this.caption(result.caption);\n            }\n\n            if (this.customEntry) {\n                isVisible = !!result.options.length;\n\n                this.setVisible(isVisible);\n                this.toggleInput(!isVisible);\n            }\n\n            return this;\n        },\n\n        /**\n         * Set the notice message on value change\n         *\n         * @param {any} value\n         * @returns {exports}\n         */\n        setNoticeMessage: function (value) {\n            var noticeMessage = '',\n                selectedOption = _.find(this.options(), function (option) {\n                    return option.value === value;\n                });\n\n            if (selectedOption && typeof selectedOption.noticeMessage !== 'undefined') {\n                noticeMessage = selectedOption.noticeMessage;\n            }\n\n            this.noticeMessage(noticeMessage);\n\n            return this;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/dependent-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/select'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            visible: false\n        },\n\n        /**\n         * Dependently display dropdown component if it contains more than one option\n         *\n         * @returns {Object} Chainable\n         */\n        setOptions: function () {\n            this._super();\n\n            if (this.options().length > 1) {\n                this.setVisible(true);\n            }\n\n            return this;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/conditional-disable-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore'\n], function (_) {\n    'use strict';\n\n    var setDisabledSetting = {\n        defaults: {\n            disabledValues: []\n        },\n\n        /**\n         * Set the field as disabled when it's empty or is equal to a value within disabledValues\n         *\n         * @param {Array} value\n         */\n        setDisabled: function (value) {\n            if (_.indexOf(_.values(this.disabledValues), value) !== -1) {\n                this.disable();\n            } else {\n                this.enable();\n            }\n        }\n    };\n\n    return function (target) {\n        return target.extend(setDisabledSetting);\n    };\n});\n","Magento_PageBuilder/js/form/element/block-chooser.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'uiLayout',\n    'uiElement',\n    'Magento_PageBuilder/js/config',\n    'mage/translate',\n    'mage/utils/objects'\n], function ($, layout, Element, Config, $t, objectUtils) {\n    'use strict';\n\n    return Element.extend({\n        id: null,\n        meta: {},\n        errorMessage: null,\n        displayMetadata: true,\n        messages: {\n            UNKOWN_ERROR: $t('Sorry, there was an error getting requested content. ' +\n                'Please contact the store owner.'),\n            UNKNOWN_SELECTION: $t('The currently selected block does not exist.')\n        },\n        defaults: {\n            template: 'Magento_PageBuilder/form/element/block-chooser',\n            requestParameter: null,\n            dataUrlConfigPath: null,\n            modalName: null,\n            buttonComponentConfig: {\n                title: '${ $.buttonTitle }',\n                component: 'Magento_Ui/js/form/components/button',\n                actions: [{\n                    targetName: '${ $.modalName }',\n                    actionName: 'openModal'\n                }]\n            },\n            requestData: {\n                method: 'POST',\n                data: {\n                    'form_key': window.FORM_KEY\n                }\n            },\n            listens: {\n                id: 'updateFromServer'\n            }\n        },\n\n        /**\n         * @inheritdoc\n         */\n        initObservable: function () {\n            return this._super()\n                .observe('id meta errorMessage displayMetadata');\n        },\n\n        /**\n         * Updates the block data from the server\n         *\n         * @returns void\n         */\n        updateFromServer: function () {\n            var requestData = $.extend(true, {}, this.requestData);\n\n            // The component hasn't be configured yet. Nothing to do.\n            if (!this.id().length || !this.requestParameter || !this.dataUrlConfigPath) {\n                this.meta({});\n\n                return;\n            }\n\n            requestData.data[this.requestParameter] = this.id();\n            $('body').trigger('processStart');\n\n            $.ajax(objectUtils.nested(Config.getConfig(), this.dataUrlConfigPath), requestData)\n                .always(function () {\n                    $('body').trigger('processStop');\n                    this.errorMessage(null);\n                }.bind(this))\n                .done(function (response) {\n                    if (typeof response !== 'object' || response.error) {\n                        this.meta({});\n                        this.errorMessage(this.messages.UNKOWN_ERROR);\n\n                        return;\n                    } else if (Array.isArray(response)) {\n                        this.meta({});\n                        this.errorMessage(this.messages.UNKNOWN_SELECTION);\n\n                        return;\n                    }\n\n                    this.meta(response);\n                }.bind(this))\n                .fail(function () {\n                    this.meta({});\n                    this.errorMessage(this.messages.UNKOWN_ERROR);\n                }.bind(this));\n        },\n\n        /**\n         * Creates the button component for rendering\n         *\n         * @returns {Object} The button component\n         */\n        getButton: function () {\n            var elementConfig = this.buttonComponentConfig;\n\n            elementConfig.name = this.name + '_button';\n            layout([elementConfig]);\n\n            return this.requestModule(elementConfig.name);\n        },\n\n        /**\n         * Determines the status label for the currently loaded block\n         *\n         * @returns {String}\n         */\n        getStatusLabel: function () {\n            return this.meta()['is_active'] === '1' ? $t('Active') : $t('Inactive');\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/grid-size.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'Magento_Ui/js/form/element/abstract'\n], function (Abstract) {\n    'use strict';\n\n    return Abstract.extend({\n        validate: function () {\n            var externalFormSourceData = this.requestModule('index=' + this.ns)().source.data;\n\n            this.validationParams = {\n                'non_empty_column_count': externalFormSourceData.non_empty_column_count,\n                'max_grid_size': externalFormSourceData.max_grid_size\n            };\n\n            return this._super();\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/conditions-loader.js":"define([\n    'jquery',\n    'Magento_Rule/rules',\n    'uiRegistry',\n    'mage/utils/objects'\n], function ($, RulesForm, uiRegistry, objectUtils) {\n    'use strict';\n\n    return function (config, conditionsFormPlaceholder) {\n        var $conditionsFormPlaceholder = $(conditionsFormPlaceholder),\n            attributeData = uiRegistry.get(config.formNamespace + '.' + config.formNamespace).source.data,\n            conditions = objectUtils.nested(attributeData, config.attribute) || '[]';\n\n        $('body').trigger('processStart');\n\n        $.ajax(config.componentUrl, {\n            method: 'POST',\n            data: {\n                conditions: conditions\n            }\n        })\n        .done(function (response) {\n            $conditionsFormPlaceholder.html(response);\n            window[config.jsObjectName] = new RulesForm(config.jsObjectName, config.childComponentUrl);\n            $('body').trigger('processStop');\n        });\n    };\n});\n","Magento_PageBuilder/js/form/element/page-ui-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/element/ui-select'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n\n        /**\n         * Get path to current option\n         *\n         * @param {Object} data - option data\n         * @returns {String} path\n         */\n        getPath: function (data) {\n            var path = '';\n\n            if (this.renderPath) {\n                path = data.identifier || path;\n            }\n\n            return path;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/condition-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_PageBuilder/js/form/element/visual-select'\n], function (Select) {\n    'use strict';\n\n    return Select.extend({\n\n        /** @inheritdoc */\n        initialize: function () {\n            this._super();\n\n            this.showRelatedElement(this.value());\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        initObservable: function () {\n            this._super();\n\n            this.options().forEach(function (option) {\n                this.observe(option.value + 'Visible');\n            }.bind(this));\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        onUpdate: function (value) {\n            this.showRelatedElement(value);\n\n            return this._super();\n        },\n\n        /**\n         * Sets exported property, linked with visibility of the element, defined as option\n         *\n         * @param {String} value\n         * @returns {Object} Chainable\n         */\n        showRelatedElement: function (value) {\n            this[value + 'Visible'](true);\n            this.options().forEach(function (option) {\n                if (value !== option.value) {\n                    this[option.value + 'Visible'](false);\n                }\n            }.bind(this));\n\n            return this;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/image-uploader.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'underscore',\n    'uiRegistry',\n    'Magento_Ui/js/form/element/image-uploader',\n    'Magento_PageBuilder/js/resource/resize-observer/ResizeObserver',\n    'Magento_PageBuilder/js/events',\n    'mage/translate'\n], function ($, _, uiRegistry, Uploader, ResizeObserver, events, $t) {\n    'use strict';\n\n    var initializedOnce = false;\n\n    return Uploader.extend({\n        defaults: {\n            $uploadArea: null,\n            isShowImageUploadInstructions: true,\n            isShowImageUploadOptions: false,\n            visibleControls: true,\n            classes: {\n                dragging: 'dragging',\n                draggingInside: 'dragging-inside',\n                draggingOutside: 'dragging-outside'\n            },\n            // listed in ascending order\n            elementWidthModifierClasses: {\n                '_micro-ui': {\n                    maxWidth: 130\n                },\n                '_compact-ui': {\n                    minWidth: 131,\n                    maxWidth: 440\n                }\n            },\n            translations: {\n                allowedFileTypes: $t('Allowed file types'),\n                dragImageHere: $t('Drag image here'),\n                dropHere: $t('Drop here'),\n                maximumFileSize: $t('Maximum file size'),\n                selectFromGallery: $t('Select from Gallery'),\n                or: $t('or'),\n                uploadImage: $t('Upload Image'),\n                uploadNewImage: $t('Upload New Image')\n            },\n            tracks: {\n                visibleControls: true\n            }\n        },\n\n        /**\n         * Bind drag events to highlight/unhighlight dropzones\n         * {@inheritDoc}\n         */\n        initialize: function () {\n            var $document = $(document);\n\n            this._super();\n\n            events.on('image:' + this.id + ':assignAfter', this.onAssignedFile.bind(this));\n\n            // bind dropzone highlighting using event delegation only once\n            if (!initializedOnce) {\n                // dropzone highlighting\n                $document.on('dragover', this.highlightDropzone.bind(this));\n\n                // dropzone unhighlighting\n                $document.on('dragend dragleave mouseup', this.unhighlightDropzone.bind(this));\n\n                initializedOnce = true;\n            }\n        },\n\n        /**\n         * {@inheritDoc}\n         */\n        initUploader: function (fileInput) {\n            this._super(fileInput);\n            this.$uploadArea = $(this.$fileInput).closest('.pagebuilder-image-empty-preview');\n            new ResizeObserver(this.updateResponsiveClasses.bind(this)).observe(this.$uploadArea.get(0));\n        },\n\n        /**\n         * Checks if provided file is allowed to be uploaded.\n         * {@inheritDoc}\n         */\n        isFileAllowed: function () {\n            var result = this._super(),\n                allowedExtensions = this.getAllowedFileExtensionsInCommaDelimitedFormat();\n\n            if (!result.passed && result.rule === 'validate-file-type') {\n                result.message += ' ' + this.translations.allowedFileTypes + ': ' + allowedExtensions + '.';\n            }\n\n            return result;\n        },\n\n        /**\n         * Remove draggable classes from dropzones\n         * {@inheritDoc}\n         */\n        onBeforeFileUpload: function () {\n            this.removeDraggableClassesFromDropzones();\n            this._super();\n        },\n\n        /**\n         * Add/remove CSS classes to $dropzone element to provide UI feedback\n         *\n         * @param {jQuery.event} e\n         */\n        highlightDropzone: function (e) {\n            var $dropzone = $(e.target).closest(this.dropZone),\n                $otherDropzones = $(this.dropZone).not($dropzone),\n                isInsideDropzone = !!$dropzone.length;\n\n            if (isInsideDropzone) {\n                $dropzone\n                  .removeClass(this.classes.draggingOutside)\n                  .addClass([this.classes.dragging, this.classes.draggingInside].join(' '));\n            }\n\n            $otherDropzones\n              .removeClass(this.classes.draggingInside)\n              .addClass([this.classes.dragging, this.classes.draggingOutside].join(' '));\n        },\n\n        /**\n         * Remove all UI styling from dropzone\n         *\n         * @param {jQuery.event} e\n         */\n        unhighlightDropzone: function (e) {\n            var isMouseReleased = e.type === 'mouseup' || e.type === 'dragend',\n                isActuallyLeavingThePage = e.type === 'dragleave' && (e.clientX === 0 || e.clientY === 0);\n\n            if (!isMouseReleased && !isActuallyLeavingThePage) {\n                return;\n            }\n\n            this.removeDraggableClassesFromDropzones();\n        },\n\n        /**\n         * Remove draggable CSS classes from dropzone elements\n         */\n        removeDraggableClassesFromDropzones: function () {\n            var $dropzones = $(this.dropZone);\n\n            $dropzones\n                .removeClass([\n                    this.classes.dragging,\n                    this.classes.draggingInside,\n                    this.classes.draggingOutside\n                ].join(' '));\n        },\n\n        /**\n         * Trigger image:uploadAfter event to be handled by PageBuilder image component\n         * {@inheritDoc}\n         */\n        addFile: function (file) {\n            this._super();\n\n            events.trigger('image:' + this.id + ':uploadAfter', [file]);\n\n            return this;\n        },\n\n        /**\n         * Trigger image:deleteFileAfter event to be handled by PageBuilder image component\n         * {inheritDoc}\n         */\n        clear: function () {\n            this._super();\n\n            events.trigger('image:' + this.id + ':deleteFileAfter');\n\n            return this;\n        },\n\n        /**\n         * Propagate file changes through all image uploaders sharing the same id\n         *\n         * @param {Object} file\n         */\n        onAssignedFile: function (file) {\n            this.value([file]);\n        },\n\n        /**\n         * Adds the appropriate ui state class to the upload control area based on the current rendered size\n         */\n        updateResponsiveClasses: function () {\n            var classesToAdd = [],\n                classConfig,\n                elementWidth = this.$uploadArea.width(),\n                modifierClass;\n\n            if (!this.$uploadArea.is(':visible')) {\n                return;\n            }\n\n            this.$uploadArea.removeClass(Object.keys(this.elementWidthModifierClasses).join(' '));\n\n            for (modifierClass in this.elementWidthModifierClasses) {\n                if (!this.elementWidthModifierClasses.hasOwnProperty(modifierClass)) {\n                    // jscs:disable disallowKeywords\n                    continue;\n                    // jscs:enable disallowKeywords\n                }\n\n                classConfig = this.elementWidthModifierClasses[modifierClass];\n\n                if (classConfig.minWidth && classConfig.maxWidth &&\n                    (classConfig.minWidth <= elementWidth && elementWidth <= classConfig.maxWidth) ||\n                    classConfig.minWidth && !classConfig.maxWidth && classConfig.minWidth <= elementWidth ||\n                    classConfig.maxWidth && !classConfig.minWidth && elementWidth <= classConfig.maxWidth\n                ) {\n                    classesToAdd.push(modifierClass);\n                }\n            }\n\n            if (classesToAdd.length) {\n                this.$uploadArea.addClass(classesToAdd.join(' '));\n            }\n        },\n\n        /**\n         * {@inheritDoc}\n         */\n        hasData: function () {\n            // Some of the components automatically add an empty object if the value is unset.\n            return this._super() && !$.isEmptyObject(this.value()[0]);\n        },\n\n        /**\n         * Stop event to prevent it from reaching any objects other than the current object.\n         *\n         * @param {Object} uploader\n         * @param {Event} event\n         * @returns {Boolean}\n         */\n        stopEvent: function (uploader, event) {\n            event.stopPropagation();\n\n            return true;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/dependent-fieldset.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/fieldset'\n], function (Fieldset) {\n    'use strict';\n\n    return Fieldset.extend({\n        defaults: {\n            originalLabelValue: ''\n        },\n\n        /**\n         * Observe label\n         * {@inheritDoc}\n         */\n        initObservable: function () {\n            this._super().observe('label');\n\n            return this;\n        },\n\n        /**\n         * Store original label value\n         * {@inheritDoc}\n         */\n        initConfig: function () {\n            this._super();\n            this.originalLabelValue = this.label;\n        },\n\n        /**\n         * Hide fieldset if number of field options is <= 1 and it is the only element in the group\n         *\n         * @param {Array} options\n         */\n        hideFieldset: function (options) {\n            this.visible(options.length > 1 || this.elems().length > 1);\n        },\n\n        /**\n         * Hide label if number of field options is <= 1\n         *\n         * @param {Array} options\n         */\n        hideLabel: function (options) {\n            this.label(options.length > 1 ? this.originalLabelValue : '');\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/dependent-visual-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'Magento_PageBuilder/js/form/element/visual-select'\n], function (_, Select) {\n    'use strict';\n\n    return Select.extend({\n        defaults: {\n            visible: false\n        },\n\n        /**\n         * Dependently display dropdown component if it contains more than one option\n         *\n         * @returns {Object} Chainable\n         */\n        setOptions: function () {\n            this._super();\n\n            if (this.options().length > 1) {\n                this.setVisible(true);\n            }\n\n            return this;\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/margins-and-padding.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/*eslint-disable vars-on-top, strict */\n\ndefine([\n    'underscore',\n    'ko',\n    'Magento_Ui/js/form/element/abstract'\n], function (_, ko, Abstract) {\n    'use strict';\n\n    var defaultValue = '';\n\n    return Abstract.extend({\n        defaults: {\n            elementTmpl: 'Magento_PageBuilder/form/element/margins-and-padding',\n            marginTop: defaultValue,\n            marginRight: defaultValue,\n            marginBottom: defaultValue,\n            marginLeft: defaultValue,\n            paddingTop: defaultValue,\n            paddingRight: defaultValue,\n            paddingBottom: defaultValue,\n            paddingLeft: defaultValue,\n            listens: {\n                marginTop: 'updateValue',\n                marginRight: 'updateValue',\n                marginBottom: 'updateValue',\n                marginLeft: 'updateValue',\n                paddingTop: 'updateValue',\n                paddingRight: 'updateValue',\n                paddingBottom: 'updateValue',\n                paddingLeft: 'updateValue'\n            }\n        },\n\n        /**\n         * Init observable on our margin & padding properties\n         *\n         * @returns {exports}\n         */\n        initObservable: function () {\n            this._super();\n            this.observe('marginTop marginRight marginBottom marginLeft ' +\n                'paddingTop paddingRight paddingBottom paddingLeft');\n\n            return this;\n        },\n\n        /**\n         * Update the value on individual property changes\n         */\n        updateValue: function () {\n            this.value({\n                margin: {\n                    top: this.marginTop(),\n                    right: this.marginRight(),\n                    bottom: this.marginBottom(),\n                    left: this.marginLeft()\n                },\n                padding: {\n                    top: this.paddingTop(),\n                    right: this.paddingRight(),\n                    bottom: this.paddingBottom(),\n                    left: this.paddingLeft()\n                }\n            });\n        },\n\n        /**\n         * On set of the initial value update our individual observables\n         *\n         * @returns {exports}\n         */\n        setInitialValue: function () {\n            this._super();\n            this._updateObservables(this.initialValue);\n\n            return this;\n        },\n\n        /**\n         * On update of the value property update our individual observables, the data provider can have data\n         * set on it after the initial construction, this ensures we translate our values\n         *\n         * @returns {exports}\n         */\n        onUpdate: function () {\n            this._super();\n            this._updateObservables(this.value());\n\n            return this;\n        },\n\n        /**\n         * Update the observable properties\n         *\n         * @param {Number} value\n         * @private\n         */\n        _updateObservables: function (value) {\n            if (value && _.isString(value)) {\n                value = JSON.parse(value);\n            }\n\n            if (value && _.isObject(value)) {\n                _.each(value, function (attributeData, attributeType) {\n                    _.each(attributeData, function (attributeValue, attributeDirection) {\n                        if (attributeValue !== defaultValue) {\n                            this[attributeType + attributeDirection.capitalize()](attributeValue);\n                        }\n                    }, this);\n                }, this);\n            }\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/wysiwyg.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'underscore',\n    'Magento_Ui/js/form/element/wysiwyg',\n    'mage/translate',\n    'Magento_PageBuilder/js/events',\n    'Magento_Ui/js/lib/view/utils/dom-observer',\n    'Magento_PageBuilder/js/page-builder',\n    'Magento_Ui/js/lib/view/utils/async'\n], function ($, _, Wysiwyg, $t, events, domObserver, PageBuilder) {\n    'use strict';\n\n    /**\n     * Extend the original WYSIWYG with added PageBuilder functionality\n     */\n    return Wysiwyg.extend({\n        defaults: {\n            transition: false,\n            transitionOut: false,\n            elementSelector: '> textarea',\n            stageSelector: '.pagebuilder-stage-wrapper',\n            fieldsetSelector: 'fieldset.admin__fieldset',\n            overlaySelector: '.pagebuilder-wysiwyg-overlay',\n            overlayMouseover: false,\n            pageBuilder: false,\n            visiblePageBuilder: false,\n            isComponentInitialized: false,\n            wysiwygConfigData: {\n                isFullScreen: false\n            },\n            pageBuilderEditButtonText: $t('Edit with Page Builder'),\n            isWithinModal: false,\n            modal: false\n        },\n\n        /**\n         * @inheritdoc\n         */\n        initialize: function () {\n            this._super();\n\n            if (!this.wysiwygConfigData()['pagebuilder_button'] ||\n                this.wysiwygConfigData()['pagebuilder_content_snapshot']) {\n                this.initPageBuilder();\n            }\n\n            return this;\n        },\n\n        /**\n         * @inheritdoc\n         */\n        initObservable: function () {\n            this._super()\n                .observe('isComponentInitialized visiblePageBuilder wysiwygConfigData loading transition ' +\n                    'transitionOut overlayMouseover');\n\n            return this;\n        },\n\n        /**\n         * Handle button click, init the Page Builder application\n         */\n        pageBuilderEditButtonClick: function (context, event) {\n            this.determineIfWithinModal(event.currentTarget);\n            this.transition(false);\n\n            if (!this.isComponentInitialized()) {\n                this.disableDomObserver($(event.currentTarget).parent()[0]);\n            }\n\n            this.initPageBuilder();\n            this.toggleFullScreen();\n        },\n\n        /**\n         * Init Page Builder\n         */\n        initPageBuilder: function () {\n            if (!this.isComponentInitialized()) {\n                this.loading(true);\n                this.pageBuilder = new PageBuilder(\n                  this.wysiwygConfigData(),\n                  this.initialValue\n                );\n                events.trigger('pagebuilder:register', {\n                    ns: this.ns,\n                    instance: this.pageBuilder\n                });\n                this.initPageBuilderListeners();\n                this.isComponentInitialized(true);\n\n                // Disable the domObserver for the entire stage\n                $.async({\n                    component: this,\n                    selector: this.stageSelector\n                }, this.disableDomObserver.bind(this));\n\n                if (!this.wysiwygConfigData()['pagebuilder_button'] ||\n                    this.wysiwygConfigData()['pagebuilder_content_snapshot']) {\n                    this.visiblePageBuilder(true);\n                }\n            }\n        },\n\n        /**\n         * Disable the domObserver on the PageBuilder stage to improve performance\n         *\n         * @param {HTMLElement} node\n         */\n        disableDomObserver: function (node) {\n            this.determineIfWithinModal(node);\n            domObserver.disableNode(node);\n            domObserver.disableNode($(node).parents(this.fieldsetSelector)[0]);\n        },\n\n        /**\n         * Changes tabindex and content editable on stage elements\n         */\n        toggleFocusableElements: function () {\n            var pageBuilderSelector = '#' + this.pageBuilder.id,\n                editable = $(pageBuilderSelector).find('[contenteditable]:not(.mceNonEditable)'),\n                focusableSelector = ' :focusable:not(' + this.overlaySelector + ')',\n                mediaSelector = pageBuilderSelector + ' iframe,' + pageBuilderSelector + ' video',\n                tabIndexValue = this.pageBuilder.isFullScreen() ? '0' : '-1',\n                editableValue = this.pageBuilder.isFullScreen();\n\n            editable.attr('contenteditable', editableValue);\n            $(pageBuilderSelector + focusableSelector).attr('tabindex', tabIndexValue);\n            $(mediaSelector).attr('tabindex', tabIndexValue);\n        },\n\n        /**\n         * Determine if the current instance is within a modal\n         *\n         * @param {HTMLElement} element\n         */\n        determineIfWithinModal: function (element) {\n            var modalInnerWrap = $(element).parents('.modal-inner-wrap');\n\n            // Determine if the Page Builder instance is within a modal\n            this.isWithinModal = modalInnerWrap.length === 1;\n\n            if (this.isWithinModal) {\n                this.modal = modalInnerWrap;\n            }\n        },\n\n        /**\n         * Press Enter key on Overlay\n         */\n        onOverlayKeyDown: function (context, event) {\n            if (event.which === 13 || event.keyCode === 13) {\n                this.pageBuilderEditButtonClick(context, event);\n            }\n\n            return true;\n        },\n\n        /**\n         * Toggle Page Builder full screen mode\n         */\n        toggleFullScreen: function () {\n            events.trigger('stage:' + this.pageBuilder.id + ':toggleFullscreen', {\n                animate: !!this.wysiwygConfigData()['pagebuilder_content_snapshot']\n            });\n        },\n\n        /**\n         * Init various listeners on the stage\n         */\n        initPageBuilderListeners: function () {\n            var id = this.pageBuilder.id,\n                renderDeferred = $.Deferred(),\n                fullScreenDeferred = $.Deferred(),\n                rendered = false;\n\n            events.on('stage:' + id + ':readyAfter', function () {\n                this.loading(false);\n            }.bind(this));\n\n            events.on('stage:' + id + ':renderAfter', function () {\n                renderDeferred.resolve();\n                rendered = true;\n            });\n\n            events.on('stage:' + id + ':masterFormatRenderAfter', function (args) {\n                this.value(args.value);\n\n                if (this.wysiwygConfigData()['pagebuilder_content_snapshot']) {\n                    this.toggleFocusableElements();\n                }\n            }.bind(this));\n\n            events.on('stage:' + id + ':fullScreenModeChangeAfter', function (args) {\n                if (!args.fullScreen) {\n                    if (this.isWithinModal && this.modal) {\n                        _.delay(function () {\n                            this.modal.css({\n                                transform: '',\n                                transition: ''\n                            });\n                        }.bind(this), 350);\n                    }\n\n                    if (this.wysiwygConfigData()['pagebuilder_button'] &&\n                        !this.wysiwygConfigData()['pagebuilder_content_snapshot']) {\n                        // Force full screen mode whilst the animation occurs\n                        this.transitionOut(true);\n                        // Trigger animation out\n                        this.transition(false);\n\n                        // Reset the transition out class and hide the stage\n                        _.delay(function () {\n                            this.transitionOut(false);\n                            this.visiblePageBuilder(false);\n                        }.bind(this), 185);\n                    }\n                } else if (args.fullScreen) {\n                    if (this.isWithinModal && this.modal) {\n                        this.modal.css({\n                            transform: 'none',\n                            transition: 'none'\n                        });\n                    }\n\n                    if (this.wysiwygConfigData()['pagebuilder_button'] &&\n                        !this.wysiwygConfigData()['pagebuilder_content_snapshot']) {\n                        this.visiblePageBuilder(true);\n\n                        fullScreenDeferred.resolve();\n\n                        /* eslint-disable max-depth */\n                        // If the stage has already rendered once we don't need to wait until animating the stage in\n                        if (rendered) {\n                            _.defer(function () {\n                                this.transition(true);\n                            }.bind(this));\n                        }\n                        /* eslint-enable max-depth */\n                    }\n                }\n\n                if (this.wysiwygConfigData()['pagebuilder_content_snapshot']) {\n                    this.toggleFocusableElements();\n                }\n            }.bind(this));\n\n            // Wait until the stage is rendered and full screen mode is activated\n            $.when(renderDeferred, fullScreenDeferred).done(function () {\n                _.defer(function () {\n                    this.transition(true);\n                }.bind(this));\n            }.bind(this));\n        },\n\n        /** @inheritdoc */\n        destroy: function () {\n            this.pageBuilder && this.pageBuilder.destroy();\n            this._super();\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/html.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/html',\n    'jquery',\n    'underscore'\n], function (Html, $, _) {\n    'use strict';\n\n    return Html.extend({\n        defaults: {\n            inputSelector: '[data-form-part=${ $.ns }]',\n            elements: [],\n            value: {}\n        },\n\n        /** @inheritdoc */\n        initialize: function () {\n            this._super();\n            this.initInputListener();\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        initObservable: function () {\n            return this._super()\n                .observe('value');\n        },\n\n        /**\n         * Listen for value change on each field that has been added.\n         */\n        initInputListener: function () {\n            $.async({\n                component: this,\n                selector: this.inputSelector\n            }, function (el) {\n                this.elements.push(el);\n                $(el).on('change', this.updateValue.bind(this));\n                $(el).nextAll('.rule-param-apply').on('click', function () {\n                    $(el).trigger('change');\n                });\n                $(el).closest('li').find('.rule-param-remove').on('click', function () {\n                    $(el).val('').trigger('change');\n                });\n                this.updateValue(this);\n            }.bind(this));\n        },\n\n        /**\n         * Collect data and update value.\n         */\n        updateValue: function () {\n            var result = {},\n                name;\n\n            this.elements.forEach(function (item) {\n                switch (item.type) {\n                    case 'checkbox':\n                        result[item.name] = +!!item.checked;\n                        break;\n\n                    case 'radio':\n                        if (item.checked) {\n                            result[item.name] = item.value;\n                        }\n                        break;\n\n                    case 'select-multiple':\n                        name = item.name.substring(0, item.name.length - 2); //remove [] from the name ending\n                        result[name] = _.pluck(item.selectedOptions, 'value');\n                        break;\n\n                    default:\n                        result[item.name] = item.value;\n                }\n            });\n\n            this.value(result);\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/html-code.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global MediabrowserUtility, widgetTools, MagentovariablePlugin */\ndefine([\n    'Magento_Ui/js/form/element/textarea',\n    'mage/adminhtml/wysiwyg/widget'\n], function (Textarea) {\n    'use strict';\n\n    var HTML_ID_PLACEHOLDER = 'HTML_ID_PLACEHOLDER';\n\n    return Textarea.extend({\n        defaults: {\n            elementTmpl: 'Magento_PageBuilder/form/element/html-code'\n        },\n\n        /**\n         * Click event for Insert Widget Button\n         */\n        clickInsertWidget: function () {\n            return widgetTools.openDialog(\n                this.widgetUrl.replace(HTML_ID_PLACEHOLDER, this.uid)\n            );\n        },\n\n        /**\n         * Click event for Insert Image Button\n         */\n        clickInsertImage: function () {\n            return MediabrowserUtility.openDialog(\n                this.imageUrl.replace(HTML_ID_PLACEHOLDER, this.uid)\n            );\n        },\n\n        /**\n         * Click event for Insert Variable Button\n         */\n        clickInsertVariable: function () {\n            return MagentovariablePlugin.loadChooser(\n                this.variableUrl,\n                this.uid\n            );\n        }\n    });\n});\n","Magento_PageBuilder/js/form/element/dependent-value-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([], function () {\n    'use strict';\n\n    var setDependentValuesSetting = {\n        defaults: {\n            dependentValues: {}\n        },\n\n        /**\n         * Change value of component if it present in dependentValues\n         */\n        setDependentValues: function (value) {\n            if (this.dependentValues.hasOwnProperty(value)) {\n                this.previousValue = this.value();\n                this.value(this.dependentValues[value]);\n            } else if (this.hasOwnProperty('previousValue')) {\n                this.value(this.previousValue);\n            }\n        }\n    };\n\n    return function (target) {\n        return target.extend(setDependentValuesSetting);\n    };\n});\n","Magento_PageBuilder/js/form/element/map.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/*eslint-disable vars-on-top, strict */\n\ndefine([\n    'Magento_Ui/js/form/element/abstract',\n    'Magento_PageBuilder/js/utils/map',\n    'module',\n    'Magento_PageBuilder/js/events'\n], function (AbstractField, GoogleMap, module, events) {\n    'use strict';\n\n    var google = window.google || {};\n\n    return AbstractField.extend({\n        defaults: {\n            elementTmpl: 'Magento_PageBuilder/form/element/map',\n            map: false,\n            marker: false,\n            apiKeyValid: !!module.config().apiKey,\n            apiKeyErrorMessage: module.config().apiKeyErrorMessage\n        },\n\n        /**\n         * Initializes observable properties of instance\n         *\n         * @returns {Abstract} Chainable.\n         */\n        initObservable: function () {\n            this._super();\n\n            this.observe('apiKeyValid');\n\n            return this;\n        },\n\n        /**\n         * Render the map into the field\n         *\n         * @param {HTMLElement} element\n         */\n        renderMap: function (element) {\n            // Get the start value and convert the value into an array\n            var startValue = this.value(),\n                mapOptions,\n                latitudeLongitude;\n\n            if (!this.apiKeyValid()) {\n                return;\n            }\n\n            if (typeof startValue === 'string' && startValue !== '') {\n                startValue = JSON.parse(startValue);\n            }\n\n            mapOptions = {\n                navigationControl: true,\n                navigationControlOptions: {\n                    style: google.maps.NavigationControlStyle.DEFAULT\n                }\n            };\n\n            events.on('googleMaps:authFailure', function () {\n                this.apiKeyValid(false);\n            }.bind(this));\n\n            // Create the map\n            this.mapElement = new GoogleMap(element, [], mapOptions);\n\n            if (!this.mapElement || !this.mapElement.map) {\n                return;\n            }\n\n            // Add marker if there is a start value\n            if (startValue.latitude !== '' && startValue.longitude !== '') {\n                latitudeLongitude = new google.maps.LatLng(\n                    parseFloat(startValue.latitude),\n                    parseFloat(startValue.longitude)\n                );\n\n                this.mapElement.map.setCenter(latitudeLongitude);\n                this.addMarker(startValue.latitude, startValue.longitude);\n            }\n\n            // After click, add and update both Latitude and Longitude.\n            google.maps.event.addListener(this.mapElement.map, 'click', this.onClick.bind(this));\n            google.maps.event.addListener(this.mapElement.map, 'dblclick', this.onDblClick.bind(this));\n            google.maps.event.trigger(this.marker, 'click');\n        },\n\n        /**\n         * Adds a map marker\n         *\n         * @param {String} latitude\n         * @param {String} longitude\n         */\n        addMarker: function (latitude, longitude) {\n            this.marker = new google.maps.Marker({\n                draggable: true,\n                map: this.mapElement.map,\n                position: new google.maps.LatLng(latitude, longitude)\n            });\n            google.maps.event.addListener(this.marker, 'dragend', this.onDragEnd.bind(this));\n        },\n\n        /**\n         * Event for drag end to update value\n         */\n        onDragEnd: function () {\n            this.value(this.exportValue());\n        },\n\n        /**\n         * Event for click to update marker, delayed by 300ms in case of double click\n         *\n         * @param {Event} event\n         */\n        onClick: function (event) {\n            this.clickTimer = setTimeout(function () {\n                if (!this.marker) {\n                    this.addMarker(event.latLng.lat(), event.latLng.lng());\n                }\n                this.value(this.exportValue(event.latLng));\n            }.bind(this), 300);\n        },\n\n        /**\n         * Event for double click to prevent call from single click\n         */\n        onDblClick: function () {\n            clearTimeout(this.clickTimer);\n        },\n\n        /**\n         * Callback after an update to map\n         */\n        onUpdate: function () {\n            if (!this.mapElement) {\n                return;\n            }\n\n            this._super();\n            var content = this.value(),\n                latitudeLongitude;\n\n            if (this.marker && content.latitude === '' && content.longitude === '') {\n                this.marker.setMap(null);\n                delete this.marker;\n\n                return;\n            }\n\n            if (!this.validateCoordinate(content) ||\n                this.mapElement &&\n                !this.mapElement.map ||\n                this.value() === '' ||\n                this.value() === this.exportValue()) {\n                return;\n            }\n\n            if (typeof this.value() === 'string' && this.value() !== '') {\n                content = JSON.parse(this.value());\n            }\n            latitudeLongitude = new google.maps.LatLng(parseFloat(content.latitude), parseFloat(content.longitude));\n\n            if (!this.marker) {\n                this.addMarker(latitudeLongitude.lat(), latitudeLongitude.lng());\n            }\n\n            this.marker.setPosition(latitudeLongitude);\n            this.mapElement.map.setCenter(latitudeLongitude);\n        },\n\n        /**\n         * Coordinate validation\n         *\n         * @param {Object} coordinates\n         * @return {Boolean}\n         */\n        validateCoordinate: function (coordinates) {\n            var valid = true;\n\n            if (coordinates.longitude === '' ||\n                coordinates.latitude === '' ||\n                isNaN(coordinates.longitude) ||\n                isNaN(coordinates.latitude) ||\n                parseFloat(coordinates.longitude) < -180 ||\n                parseFloat(coordinates.longitude) > 180 ||\n                parseFloat(coordinates.latitude) < -90 ||\n                parseFloat(coordinates.latitude) > 90\n            ) {\n                valid = false;\n            }\n\n            return valid;\n        },\n\n        /**\n         * Returns current latitude and longitude as an object\n         *\n         * @param {Object} coordinate\n         * @return {Object}\n         */\n        exportValue: function (coordinate) {\n            var position = this.marker ?\n                this.marker.getPosition() :\n                new google.maps.LatLng(this.mapElement.map.center.lat(), this.mapElement.map.center.lng()),\n                currentCoordinate = coordinate ? coordinate : position;\n\n            return {\n                latitude: currentCoordinate.lat(),\n                longitude: currentCoordinate.lng()\n            };\n        }\n    });\n});\n","Magento_PageBuilder/js/form/provider/conditions-data-processor.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'underscore',\n    'mage/utils/objects',\n    'Magento_Rule/conditions-data-normalizer'\n], function (_, objectUtils, ConditionsDataNormalizer) {\n    'use strict';\n\n    var serializer = new ConditionsDataNormalizer();\n\n    return function (data, attribute) {\n        var pairs = {},\n            conditions = '';\n\n        /*\n         * The Condition Rule Tree is not a UI component and doesn't provide good data.\n         * The best solution is to implement the tree as a UI component that can provide good data but\n         * that is outside of the scope of the feature for now.\n         */\n        _.each(data, function (element, key) {\n            // parameters is hardcoded in the Magento\\Rule model that creates the HTML forms.\n            if (key.indexOf('parameters[' + attribute + ']') === 0) {\n                // Remove the bad, un-normalized data.\n                delete data[key];\n                pairs[key] = element;\n            }\n        });\n\n        /*\n         * The Combine Condition rule needs to have children,\n         * if does not have, we cannot parse the rule in the backend.\n         */\n        _.each(pairs, function (element, key) {\n            var keyIds = key.match(/[\\d?-]+/g),\n              combineElement = 'Magento\\\\CatalogWidget\\\\Model\\\\Rule\\\\Condition\\\\Combine',\n              nextPairsFirstKey = 'parameters[condition_source][NEXT_ITEM--1][type]',\n              nextPairsSecondKey = 'parameters[condition_source][NEXT_ITEM--2][type]';\n\n            if (keyIds !== null && element === combineElement) {\n                if (pairs[nextPairsFirstKey.replace('NEXT_ITEM', keyIds[0])] === undefined ||\n                    pairs[nextPairsFirstKey.replace('NEXT_ITEM', keyIds[0])] === combineElement &&\n                    pairs[nextPairsSecondKey.replace('NEXT_ITEM', keyIds[0])] === undefined) {\n                    pairs[key] = '';\n                }\n            }\n        });\n\n        /*\n         * Add pairs in case conditions source is not rules configurator\n         */\n        if (data['condition_option'] !== 'condition') {\n            pairs['parameters[' + attribute + '][1--1][operator]'] =\n                data[data['condition_option'] + '-condition_operator'] ?\n                data[data['condition_option'] + '-condition_operator'] :\n                '==';\n            pairs['parameters[' + attribute + '][1--1][type]'] =\n                'Magento\\\\CatalogWidget\\\\Model\\\\Rule\\\\Condition\\\\Product';\n            pairs['parameters[' + attribute + '][1][aggregator]'] = 'all';\n            pairs['parameters[' + attribute + '][1][new_child]'] = '';\n            pairs['parameters[' + attribute + '][1][type]'] = 'Magento\\\\CatalogWidget\\\\Model\\\\Rule\\\\Condition\\\\Combine';\n            pairs['parameters[' + attribute + '][1][value]'] = '1';\n            pairs['parameters[' + attribute + '][1--1][attribute]'] = data['condition_option'];\n            pairs['parameters[' + attribute + '][1--1][value]'] = _.isString(data[data['condition_option']]) ?\n                data[data['condition_option']].trim() :\n                '';\n        }\n\n        if (!_.isEmpty(pairs)) {\n            conditions = JSON.stringify(serializer.normalize(pairs).parameters[attribute]);\n            data['conditions_encoded'] = conditions;\n            objectUtils.nested(data, attribute, conditions);\n        }\n    };\n});\n","Magento_PageBuilder/js/form/components/insert-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/insert-form',\n    'Magento_PageBuilder/js/events',\n    'jquery'\n], function (Insert, events, $) {\n    'use strict';\n\n    return Insert.extend({\n        defaults: {\n            appearanceIndex: '',\n            configs: {},\n            tracks: {\n                id: true\n            },\n            listens: {\n                appearance: 'onAppearanceChange'\n            }\n        },\n\n        /** @inheritdoc */\n        initialize: function () {\n            this._super();\n\n            events.on('form:renderAfter', function (params) {\n                this.render(params);\n            }.bind(this));\n\n            return this;\n        },\n\n        /** @inheritdoc */\n        render: function (params) {\n            this.availableAppearances = params.appearances;\n            this.title = params.title;\n            this.defaultNamespace = params.defaultNamespace;\n            this.destroyInserted();\n            this.setData(params);\n\n            return this._super({\n                namespace: params.namespace,\n                handle: params.namespace\n            });\n        },\n\n        /**\n         * Set data for new form.\n         *\n         * @param {Object} params\n         */\n        setData: function (params) {\n            var formQuery = 'index=' + params.namespace,\n                dataProviderQuery = 'index=' + params.namespace + '_data_source';\n\n            this.providerData = params.data;\n            this.id = params.id;\n            this.externalForm = this.requestModule(formQuery);\n            this.externalSource = this.requestModule(dataProviderQuery);\n            this.setLinks({\n                appearance: 'ns = ' + params.namespace + ', index = ' + this.appearanceIndex + ':value'\n            }, 'imports');\n            this.setLinks({\n                providerData: dataProviderQuery + ':data',\n                prefix: formQuery + ':selectorPrefix',\n                id: dataProviderQuery + ':id'\n            }, 'exports');\n        },\n\n        /** @inheritdoc **/\n        requestData: function (params) {\n            var deffer = $.Deferred(),\n                formConfig = this.configs[params.namespace];\n\n            if (formConfig) {\n                return deffer.resolve(formConfig);\n            }\n\n            return this._super().done(function (data) {\n                this.configs[params.namespace] = data;\n            }.bind(this));\n        },\n\n        /**\n         * Re-render after appearance change\n         *\n         * @param {String} value\n         */\n        onAppearanceChange: function (value) {\n            var namespace = this.availableAppearances[value] && this.availableAppearances[value].form ||\n                this.defaultNamespace;\n\n            if (namespace !== this.previousParams.namespace) {\n                this.render({\n                    namespace: namespace,\n                    id: this.id,\n                    data: this.externalSource().get('data'),\n                    appearances: this.availableAppearances,\n                    title: this.title,\n                    defaultNamespace: this.defaultNamespace\n                });\n            }\n        }\n    });\n});\n","Magento_PageBuilder/js/form/components/action-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/button'\n], function (Button) {\n    'use strict';\n\n    return Button.extend({\n        defaults: {\n            modules: {\n                parent: '${ $.parentName }',\n                insertForm: '${ $.insertFormProvider }',\n                modal: '${ $.modalProvider }'\n            }\n        },\n\n        /**\n         * Edit form with data assigning.\n         */\n        edit: function () {\n            this.modal().openModal();\n            this.insertForm().edit(this.parent().data());\n        },\n\n        /**\n         * Delete record from dynamic row.\n         */\n        deleteRecord: function () {\n            var record = this.parent(),\n                dynamicRow = record.parentComponent(),\n                prop = dynamicRow.identificationProperty,\n                id = record.data()[prop];\n\n            dynamicRow.deleteRecord(record.index, id);\n        }\n    });\n});\n","Magento_PageBuilder/js/form/components/map-location-insert-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/form/components/insert-form'\n], function (Insert) {\n    'use strict';\n\n    return Insert.extend({\n        /**\n         * Clear form content and reinsert data in argument\n         * @param {Object} data\n         */\n        edit: function (data) {\n            this.destroyInserted();\n            this.render();\n            this.setData(data);\n        },\n\n        /**\n         * Set data for new form\n         *\n         * @param {Object} data\n         */\n        setData: function (data) {\n            var formQuery = 'index=' + this.ns,\n                dataProviderQuery = 'index=' + this.ns + '_data_source';\n\n            this.providerData = data;\n            this.externalForm = this.requestModule(formQuery);\n            this.externalSource = this.requestModule(dataProviderQuery);\n            this.setLinks({\n                providerData: dataProviderQuery + ':data'\n            }, 'exports');\n        }\n    });\n});\n","Magento_PageBuilder/js/form/components/map-location-dynamic-rows.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_Ui/js/dynamic-rows/dynamic-rows',\n    'Magento_PageBuilder/js/events',\n    'underscore',\n    'jquery'\n], function (dynamicRows, Events, _, $) {\n    'use strict';\n\n    /**\n     * Returns sortable values\n     *\n     * @param {String | Number | Object | Array} value\n     * @return {String | Number}\n     */\n    var sortValueValidator = function (value) {\n        if (typeof value === 'string') {\n            return value.toLowerCase();\n        }\n\n        if (typeof value === 'number') {\n            return value;\n        }\n\n        return '';\n    };\n\n    return dynamicRows.extend({\n        defaults: {\n            modules: {\n                insertForm: '${ $.insertFormProvider }',\n                modal: '${$.modalProvider}'\n            }\n        },\n\n        /** @inheritdoc */\n        initLinks: function () {\n            this._super();\n            Events.on('mapLocation:saveAfter', function (data) {\n                this.modal().closeModal();\n                this.reInitData(data);\n            }.bind(this), this.name);\n\n            return this;\n        },\n\n        /**\n         * Open the location modal and insert form with the data from selected record\n         *\n         * @param {Object} record\n         */\n        edit: function (record) {\n            this.modal().openModal();\n            this.insertForm().edit(record.data());\n        },\n\n        /**\n         * Reinitializing of dynamic row records.\n         *\n         * @param {Object} data\n         */\n        reInitData: function (data) {\n            var recordData = this.recordData().slice(),\n                prop = this.identificationProperty,\n                isExists = false;\n\n            _.each(recordData, function (elem, index) {\n                if (elem[prop] === data[prop]) {\n                    recordData[index] = data;\n                    isExists = true;\n                }\n            }, this);\n\n            if (!isExists) {\n                recordData.push(data);\n            }\n\n            this.recordData(recordData);\n\n            _.each(this.labels(), function (label) {\n                if (label.columnsHeaderClasses) {\n                    this.sortRecord(label.name, label.columnsHeaderClasses === '_ascend');\n                }\n            }.bind(this));\n\n            this.reload();\n        },\n\n        /**\n         * Logic to toggle ascend and descend sorting for headers\n         *\n         * @param {KnockoutObservableArray} property\n         */\n        sortByHeader: function (property) {\n            var ascend,\n                activeLabel,\n                allLabels,\n                placeholder;\n\n            if (property().name === 'actions') {\n                return;\n            }\n\n            if (property().columnsHeaderClasses) {\n                activeLabel = $.extend({}, property());\n                activeLabel.columnsHeaderClasses =\n                    property().columnsHeaderClasses === '_ascend' ? '_descend' : '_ascend';\n                ascend = activeLabel.columnsHeaderClasses === '_ascend';\n                property(activeLabel);\n            } else {\n                allLabels = this.labels().slice();\n                allLabels.forEach(function (label) {\n\n                    if (label.name === property().name) {\n                        label.columnsHeaderClasses = '_ascend';\n                    } else {\n                        label.columnsHeaderClasses = '';\n                    }\n                });\n                ascend = true;\n                this.labels(allLabels);\n            }\n\n            if (this.recordData().length) {\n                placeholder = this.emptyContentPlaceholder;\n\n                this.emptyContentPlaceholder = false;\n                this.sortRecord(property().name, ascend);\n                this.reload();\n                this.emptyContentPlaceholder = placeholder;\n            }\n        },\n\n        /**\n         * Sorting of dynamic row records.\n         *\n         * @param {String} sortBy\n         * @param {Boolean} ascend\n         */\n        sortRecord: function (sortBy, ascend) {\n            this.recordData.sort(function (left, right) {\n                var record1 = ascend ? left : right,\n                    record2 = ascend ? right : left;\n\n                record1 = sortValueValidator(record1[sortBy]);\n                record2 = sortValueValidator(record2[sortBy]);\n\n                return record1 === record2 ? 0 : record1 < record2 ? -1 : 1;\n            });\n        },\n\n        /** @inheritdoc */\n        destroy: function () {\n            this._super();\n            Events.off(this.name);\n        }\n    });\n});\n","Magento_PageBuilder/js/resource/object-path.js":"(function (root, factory){\n    'use strict';\n\n    /*istanbul ignore next:cant test*/\n    if (typeof module === 'object' && typeof module.exports === 'object') {\n        module.exports = factory();\n    } else if (typeof define === 'function' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define([], factory);\n    } else {\n        // Browser globals\n        root.objectPath = factory();\n    }\n})(this, function(){\n    'use strict';\n\n    var toStr = Object.prototype.toString;\n    function hasOwnProperty(obj, prop) {\n        if(obj == null) {\n            return false\n        }\n        //to handle objects with null prototypes (too edge case?)\n        return Object.prototype.hasOwnProperty.call(obj, prop)\n    }\n\n    function isEmpty(value){\n        if (!value) {\n            return true;\n        }\n        if (isArray(value) && value.length === 0) {\n            return true;\n        } else if (typeof value !== 'string') {\n            for (var i in value) {\n                if (hasOwnProperty(value, i)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n        return false;\n    }\n\n    function toString(type){\n        return toStr.call(type);\n    }\n\n    function isObject(obj){\n        return typeof obj === 'object' && toString(obj) === \"[object Object]\";\n    }\n\n    var isArray = Array.isArray || function(obj){\n        /*istanbul ignore next:cant test*/\n        return toStr.call(obj) === '[object Array]';\n    }\n\n    function isBoolean(obj){\n        return typeof obj === 'boolean' || toString(obj) === '[object Boolean]';\n    }\n\n    function getKey(key){\n        var intKey = parseInt(key);\n        if (intKey.toString() === key) {\n            return intKey;\n        }\n        return key;\n    }\n\n    function factory(options) {\n        options = options || {}\n\n        var objectPath = function(obj) {\n            return Object.keys(objectPath).reduce(function(proxy, prop) {\n                if(prop === 'create') {\n                    return proxy;\n                }\n\n                /*istanbul ignore else*/\n                if (typeof objectPath[prop] === 'function') {\n                    proxy[prop] = objectPath[prop].bind(objectPath, obj);\n                }\n\n                return proxy;\n            }, {});\n        };\n\n        var hasShallowProperty\n        if (options.includeInheritedProps) {\n            hasShallowProperty = function () {\n                return true\n            }\n        } else {\n            hasShallowProperty = function (obj, prop) {\n                return (typeof prop === 'number' && Array.isArray(obj)) || hasOwnProperty(obj, prop)\n            }\n        }\n\n        function getShallowProperty(obj, prop) {\n            if (hasShallowProperty(obj, prop)) {\n                return obj[prop];\n            }\n        }\n\n        function set(obj, path, value, doNotReplace){\n            if (typeof path === 'number') {\n                path = [path];\n            }\n            if (!path || path.length === 0) {\n                return obj;\n            }\n            if (typeof path === 'string') {\n                return set(obj, path.split('.').map(getKey), value, doNotReplace);\n            }\n            var currentPath = path[0];\n            var currentValue = getShallowProperty(obj, currentPath);\n            if (options.includeInheritedProps && (currentPath === '__proto__' ||\n                (currentPath === 'constructor' && typeof currentValue === 'function'))) {\n                throw new Error('For security reasons, object\\'s magic properties cannot be set')\n            }\n            if (path.length === 1) {\n                if (currentValue === void 0 || !doNotReplace) {\n                    obj[currentPath] = value;\n                }\n                return currentValue;\n            }\n\n            if (currentValue === void 0) {\n                //check if we assume an array\n                if(typeof path[1] === 'number') {\n                    obj[currentPath] = [];\n                } else {\n                    obj[currentPath] = {};\n                }\n            }\n\n            return set(obj[currentPath], path.slice(1), value, doNotReplace);\n        }\n\n        objectPath.has = function (obj, path) {\n            if (typeof path === 'number') {\n                path = [path];\n            } else if (typeof path === 'string') {\n                path = path.split('.');\n            }\n\n            if (!path || path.length === 0) {\n                return !!obj;\n            }\n\n            for (var i = 0; i < path.length; i++) {\n                var j = getKey(path[i]);\n\n                if((typeof j === 'number' && isArray(obj) && j < obj.length) ||\n                    (options.includeInheritedProps ? (j in Object(obj)) : hasOwnProperty(obj, j))) {\n                    obj = obj[j];\n                } else {\n                    return false;\n                }\n            }\n\n            return true;\n        };\n\n        objectPath.ensureExists = function (obj, path, value){\n            return set(obj, path, value, true);\n        };\n\n        objectPath.set = function (obj, path, value, doNotReplace){\n            return set(obj, path, value, doNotReplace);\n        };\n\n        objectPath.insert = function (obj, path, value, at){\n            var arr = objectPath.get(obj, path);\n            at = ~~at;\n            if (!isArray(arr)) {\n                arr = [];\n                objectPath.set(obj, path, arr);\n            }\n            arr.splice(at, 0, value);\n        };\n\n        objectPath.empty = function(obj, path) {\n            if (isEmpty(path)) {\n                return void 0;\n            }\n            if (obj == null) {\n                return void 0;\n            }\n\n            var value, i;\n            if (!(value = objectPath.get(obj, path))) {\n                return void 0;\n            }\n\n            if (typeof value === 'string') {\n                return objectPath.set(obj, path, '');\n            } else if (isBoolean(value)) {\n                return objectPath.set(obj, path, false);\n            } else if (typeof value === 'number') {\n                return objectPath.set(obj, path, 0);\n            } else if (isArray(value)) {\n                value.length = 0;\n            } else if (isObject(value)) {\n                for (i in value) {\n                    if (hasShallowProperty(value, i)) {\n                        delete value[i];\n                    }\n                }\n            } else {\n                return objectPath.set(obj, path, null);\n            }\n        };\n\n        objectPath.push = function (obj, path /*, values */){\n            var arr = objectPath.get(obj, path);\n            if (!isArray(arr)) {\n                arr = [];\n                objectPath.set(obj, path, arr);\n            }\n\n            arr.push.apply(arr, Array.prototype.slice.call(arguments, 2));\n        };\n\n        objectPath.coalesce = function (obj, paths, defaultValue) {\n            var value;\n\n            for (var i = 0, len = paths.length; i < len; i++) {\n                if ((value = objectPath.get(obj, paths[i])) !== void 0) {\n                    return value;\n                }\n            }\n\n            return defaultValue;\n        };\n\n        objectPath.get = function (obj, path, defaultValue){\n            if (typeof path === 'number') {\n                path = [path];\n            }\n            if (!path || path.length === 0) {\n                return obj;\n            }\n            if (obj == null) {\n                return defaultValue;\n            }\n            if (typeof path === 'string') {\n                return objectPath.get(obj, path.split('.'), defaultValue);\n            }\n\n            var currentPath = getKey(path[0]);\n            var nextObj = getShallowProperty(obj, currentPath)\n            if (nextObj === void 0) {\n                return defaultValue;\n            }\n\n            if (path.length === 1) {\n                return nextObj;\n            }\n\n            return objectPath.get(obj[currentPath], path.slice(1), defaultValue);\n        };\n\n        objectPath.del = function del(obj, path) {\n            if (typeof path === 'number') {\n                path = [path];\n            }\n\n            if (obj == null) {\n                return obj;\n            }\n\n            if (isEmpty(path)) {\n                return obj;\n            }\n            if(typeof path === 'string') {\n                return objectPath.del(obj, path.split('.'));\n            }\n\n            var currentPath = getKey(path[0]);\n            if (!hasShallowProperty(obj, currentPath)) {\n                return obj;\n            }\n\n            if(path.length === 1) {\n                if (isArray(obj)) {\n                    obj.splice(currentPath, 1);\n                } else {\n                    delete obj[currentPath];\n                }\n            } else {\n                return objectPath.del(obj[currentPath], path.slice(1));\n            }\n\n            return obj;\n        }\n\n        return objectPath;\n    }\n\n    var mod = factory();\n    mod.create = factory;\n    mod.withInheritedProps = factory({includeInheritedProps: true})\n    return mod;\n});","Magento_PageBuilder/js/resource/dropzone/dropzone.js":"// Uses AMD or browser globals to create a jQuery plugin.\n(function (factory) {\n    if (typeof define === 'function' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define(['jquery'], factory);\n    } else {\n        // Browser globals\n        factory(jQuery);\n    }\n} (function (jQuery) {\n    var module = { exports: { } }; // Fake component\n\n\n    /*\n     *\n     * More info at [www.dropzonejs.com](http://www.dropzonejs.com)\n     *\n     * Copyright (c) 2012, Matias Meno\n     *\n     * Permission is hereby granted, free of charge, to any person obtaining a copy\n     * of this software and associated documentation files (the \"Software\"), to deal\n     * in the Software without restriction, including without limitation the rights\n     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n     * copies of the Software, and to permit persons to whom the Software is\n     * furnished to do so, subject to the following conditions:\n     *\n     * The above copyright notice and this permission notice shall be included in\n     * all copies or substantial portions of the Software.\n     *\n     * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n     * THE SOFTWARE.\n     *\n     */\n\n    (function() {\n        var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,\n            __slice = [].slice,\n            __hasProp = {}.hasOwnProperty,\n            __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n        noop = function() {};\n\n        Emitter = (function() {\n            function Emitter() {}\n\n            Emitter.prototype.addEventListener = Emitter.prototype.on;\n\n            Emitter.prototype.on = function(event, fn) {\n                this._callbacks = this._callbacks || {};\n                if (!this._callbacks[event]) {\n                    this._callbacks[event] = [];\n                }\n                this._callbacks[event].push(fn);\n                return this;\n            };\n\n            Emitter.prototype.emit = function() {\n                var args, callback, callbacks, event, _i, _len;\n                event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\n                this._callbacks = this._callbacks || {};\n                callbacks = this._callbacks[event];\n                if (callbacks) {\n                    for (_i = 0, _len = callbacks.length; _i < _len; _i++) {\n                        callback = callbacks[_i];\n                        callback.apply(this, args);\n                    }\n                }\n                return this;\n            };\n\n            Emitter.prototype.removeListener = Emitter.prototype.off;\n\n            Emitter.prototype.removeAllListeners = Emitter.prototype.off;\n\n            Emitter.prototype.removeEventListener = Emitter.prototype.off;\n\n            Emitter.prototype.off = function(event, fn) {\n                var callback, callbacks, i, _i, _len;\n                if (!this._callbacks || arguments.length === 0) {\n                    this._callbacks = {};\n                    return this;\n                }\n                callbacks = this._callbacks[event];\n                if (!callbacks) {\n                    return this;\n                }\n                if (arguments.length === 1) {\n                    delete this._callbacks[event];\n                    return this;\n                }\n                for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) {\n                    callback = callbacks[i];\n                    if (callback === fn) {\n                        callbacks.splice(i, 1);\n                        break;\n                    }\n                }\n                return this;\n            };\n\n            return Emitter;\n\n        })();\n\n        Dropzone = (function(_super) {\n            var extend, resolveOption;\n\n            __extends(Dropzone, _super);\n\n            Dropzone.prototype.Emitter = Emitter;\n\n\n            /*\n             This is a list of all available events you can register on a dropzone object.\n\n             You can register an event handler like this:\n\n             dropzone.on(\"dragEnter\", function() { });\n             */\n\n            Dropzone.prototype.events = [\"drop\", \"dragstart\", \"dragend\", \"dragenter\", \"dragover\", \"dragleave\", \"addedfile\", \"addedfiles\", \"removedfile\", \"thumbnail\", \"error\", \"errormultiple\", \"processing\", \"processingmultiple\", \"uploadprogress\", \"totaluploadprogress\", \"sending\", \"sendingmultiple\", \"success\", \"successmultiple\", \"canceled\", \"canceledmultiple\", \"complete\", \"completemultiple\", \"reset\", \"maxfilesexceeded\", \"maxfilesreached\", \"queuecomplete\"];\n\n            Dropzone.prototype.defaultOptions = {\n                url: null,\n                method: \"post\",\n                withCredentials: false,\n                parallelUploads: 2,\n                uploadMultiple: false,\n                maxFilesize: 256,\n                paramName: \"file\",\n                createImageThumbnails: true,\n                maxThumbnailFilesize: 10,\n                thumbnailWidth: 120,\n                thumbnailHeight: 120,\n                filesizeBase: 1000,\n                maxFiles: null,\n                params: {},\n                clickable: true,\n                ignoreHiddenFiles: true,\n                acceptedFiles: null,\n                acceptedMimeTypes: null,\n                autoProcessQueue: true,\n                autoQueue: true,\n                addRemoveLinks: false,\n                previewsContainer: null,\n                hiddenInputContainer: \"body\",\n                capture: null,\n                dictDefaultMessage: \"Drop files here to upload\",\n                dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n                dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n                dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n                dictInvalidFileType: \"You can't upload files of this type.\",\n                dictResponseError: \"Server responded with {{statusCode}} code.\",\n                dictCancelUpload: \"Cancel upload\",\n                dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n                dictRemoveFile: \"Remove file\",\n                dictRemoveFileConfirmation: null,\n                dictMaxFilesExceeded: \"You can not upload any more files.\",\n                accept: function(file, done) {\n                    return done();\n                },\n                init: function() {\n                    return noop;\n                },\n                forceFallback: false,\n                fallback: function() {\n                    var child, messageElement, span, _i, _len, _ref;\n                    this.element.className = \"\" + this.element.className + \" dz-browser-not-supported\";\n                    _ref = this.element.getElementsByTagName(\"div\");\n                    for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                        child = _ref[_i];\n                        if (/(^| )dz-message($| )/.test(child.className)) {\n                            messageElement = child;\n                            child.className = \"dz-message\";\n                            continue;\n                        }\n                    }\n                    if (!messageElement) {\n                        messageElement = Dropzone.createElement(\"<div class=\\\"dz-message\\\"><span></span></div>\");\n                        this.element.appendChild(messageElement);\n                    }\n                    span = messageElement.getElementsByTagName(\"span\")[0];\n                    if (span) {\n                        if (span.textContent != null) {\n                            span.textContent = this.options.dictFallbackMessage;\n                        } else if (span.innerText != null) {\n                            span.innerText = this.options.dictFallbackMessage;\n                        }\n                    }\n                    return this.element.appendChild(this.getFallbackForm());\n                },\n                resize: function(file) {\n                    var info, srcRatio, trgRatio;\n                    info = {\n                        srcX: 0,\n                        srcY: 0,\n                        srcWidth: file.width,\n                        srcHeight: file.height\n                    };\n                    srcRatio = file.width / file.height;\n                    info.optWidth = this.options.thumbnailWidth;\n                    info.optHeight = this.options.thumbnailHeight;\n                    if ((info.optWidth == null) && (info.optHeight == null)) {\n                        info.optWidth = info.srcWidth;\n                        info.optHeight = info.srcHeight;\n                    } else if (info.optWidth == null) {\n                        info.optWidth = srcRatio * info.optHeight;\n                    } else if (info.optHeight == null) {\n                        info.optHeight = (1 / srcRatio) * info.optWidth;\n                    }\n                    trgRatio = info.optWidth / info.optHeight;\n                    if (file.height < info.optHeight || file.width < info.optWidth) {\n                        info.trgHeight = info.srcHeight;\n                        info.trgWidth = info.srcWidth;\n                    } else {\n                        if (srcRatio > trgRatio) {\n                            info.srcHeight = file.height;\n                            info.srcWidth = info.srcHeight * trgRatio;\n                        } else {\n                            info.srcWidth = file.width;\n                            info.srcHeight = info.srcWidth / trgRatio;\n                        }\n                    }\n                    info.srcX = (file.width - info.srcWidth) / 2;\n                    info.srcY = (file.height - info.srcHeight) / 2;\n                    return info;\n                },\n\n                /*\n                 Those functions register themselves to the events on init and handle all\n                 the user interface specific stuff. Overwriting them won't break the upload\n                 but can break the way it's displayed.\n                 You can overwrite them if you don't like the default behavior. If you just\n                 want to add an additional event handler, register it on the dropzone object\n                 and don't overwrite those options.\n                 */\n                drop: function(e) {\n                    return this.element.classList.remove(\"dz-drag-hover\");\n                },\n                dragstart: noop,\n                dragend: function(e) {\n                    return this.element.classList.remove(\"dz-drag-hover\");\n                },\n                dragenter: function(e) {\n                    return this.element.classList.add(\"dz-drag-hover\");\n                },\n                dragover: function(e) {\n                    return this.element.classList.add(\"dz-drag-hover\");\n                },\n                dragleave: function(e) {\n                    return this.element.classList.remove(\"dz-drag-hover\");\n                },\n                paste: noop,\n                reset: function() {\n                    return this.element.classList.remove(\"dz-started\");\n                },\n                addedfile: function(file) {\n                    var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;\n                    if (this.element === this.previewsContainer) {\n                        this.element.classList.add(\"dz-started\");\n                    }\n                    if (this.previewsContainer) {\n                        file.previewElement = Dropzone.createElement(this.options.template.trim());\n                        file.template = file.previewElement;\n                        this.previewsContainer.appendChild(file.previewElement);\n                        _ref = file.previewElement.querySelectorAll(\"[data-dz-name]\");\n                        for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                            node = _ref[_i];\n                            node.textContent = file.name;\n                        }\n                        _ref1 = file.previewElement.querySelectorAll(\"[data-dz-size]\");\n                        for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\n                            node = _ref1[_j];\n                            node.innerHTML = this.filesize(file.size);\n                        }\n                        if (this.options.addRemoveLinks) {\n                            file._removeLink = Dropzone.createElement(\"<a class=\\\"dz-remove\\\" href=\\\"javascript:undefined;\\\" data-dz-remove>\" + this.options.dictRemoveFile + \"</a>\");\n                            file.previewElement.appendChild(file._removeLink);\n                        }\n                        removeFileEvent = (function(_this) {\n                            return function(e) {\n                                e.preventDefault();\n                                e.stopPropagation();\n                                if (file.status === Dropzone.UPLOADING) {\n                                    return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {\n                                        return _this.removeFile(file);\n                                    });\n                                } else {\n                                    if (_this.options.dictRemoveFileConfirmation) {\n                                        return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {\n                                            return _this.removeFile(file);\n                                        });\n                                    } else {\n                                        return _this.removeFile(file);\n                                    }\n                                }\n                            };\n                        })(this);\n                        _ref2 = file.previewElement.querySelectorAll(\"[data-dz-remove]\");\n                        _results = [];\n                        for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {\n                            removeLink = _ref2[_k];\n                            _results.push(removeLink.addEventListener(\"click\", removeFileEvent));\n                        }\n                        return _results;\n                    }\n                },\n                removedfile: function(file) {\n                    var _ref;\n                    if (file.previewElement) {\n                        if ((_ref = file.previewElement) != null) {\n                            _ref.parentNode.removeChild(file.previewElement);\n                        }\n                    }\n                    return this._updateMaxFilesReachedClass();\n                },\n                thumbnail: function(file, dataUrl) {\n                    var thumbnailElement, _i, _len, _ref;\n                    if (file.previewElement) {\n                        file.previewElement.classList.remove(\"dz-file-preview\");\n                        _ref = file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\");\n                        for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                            thumbnailElement = _ref[_i];\n                            thumbnailElement.alt = file.name;\n                            thumbnailElement.src = dataUrl;\n                        }\n                        return setTimeout(((function(_this) {\n                            return function() {\n                                return file.previewElement.classList.add(\"dz-image-preview\");\n                            };\n                        })(this)), 1);\n                    }\n                },\n                error: function(file, message) {\n                    var node, _i, _len, _ref, _results;\n                    if (file.previewElement) {\n                        file.previewElement.classList.add(\"dz-error\");\n                        if (typeof message !== \"String\" && message.error) {\n                            message = message.error;\n                        }\n                        _ref = file.previewElement.querySelectorAll(\"[data-dz-errormessage]\");\n                        _results = [];\n                        for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                            node = _ref[_i];\n                            _results.push(node.textContent = message);\n                        }\n                        return _results;\n                    }\n                },\n                errormultiple: noop,\n                processing: function(file) {\n                    if (file.previewElement) {\n                        file.previewElement.classList.add(\"dz-processing\");\n                        if (file._removeLink) {\n                            return file._removeLink.textContent = this.options.dictCancelUpload;\n                        }\n                    }\n                },\n                processingmultiple: noop,\n                uploadprogress: function(file, progress, bytesSent) {\n                    var node, _i, _len, _ref, _results;\n                    if (file.previewElement) {\n                        _ref = file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\");\n                        _results = [];\n                        for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                            node = _ref[_i];\n                            if (node.nodeName === 'PROGRESS') {\n                                _results.push(node.value = progress);\n                            } else {\n                                _results.push(node.style.width = \"\" + progress + \"%\");\n                            }\n                        }\n                        return _results;\n                    }\n                },\n                totaluploadprogress: noop,\n                sending: noop,\n                sendingmultiple: noop,\n                success: function(file) {\n                    if (file.previewElement) {\n                        return file.previewElement.classList.add(\"dz-success\");\n                    }\n                },\n                successmultiple: noop,\n                canceled: function(file) {\n                    return this.emit(\"error\", file, \"Upload canceled.\");\n                },\n                canceledmultiple: noop,\n                complete: function(file) {\n                    if (file._removeLink) {\n                        file._removeLink.textContent = this.options.dictRemoveFile;\n                    }\n                    if (file.previewElement) {\n                        return file.previewElement.classList.add(\"dz-complete\");\n                    }\n                },\n                completemultiple: noop,\n                maxfilesexceeded: noop,\n                maxfilesreached: noop,\n                queuecomplete: noop,\n                addedfiles: noop,\n                template: \"<div class=\\\"dz-preview dz-file-preview\\\">\\n  <div class=\\\"dz-image\\\"><img data-dz-thumbnail /></div>\\n  <div class=\\\"dz-details\\\">\\n    <div class=\\\"dz-size\\\"><span data-dz-size></span></div>\\n    <div class=\\\"dz-filename\\\"><span data-dz-name></span></div>\\n  </div>\\n  <div class=\\\"dz-progress\\\"><span class=\\\"dz-upload\\\" data-dz-uploadprogress></span></div>\\n  <div class=\\\"dz-error-message\\\"><span data-dz-errormessage></span></div>\\n  <div class=\\\"dz-success-mark\\\">\\n    <svg width=\\\"54px\\\" height=\\\"54px\\\" viewBox=\\\"0 0 54 54\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" xmlns:sketch=\\\"http://www.bohemiancoding.com/sketch/ns\\\">\\n      <title>Check</title>\\n      <defs></defs>\\n      <g id=\\\"Page-1\\\" stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\" sketch:type=\\\"MSPage\\\">\\n        <path d=\\\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\\\" id=\\\"Oval-2\\\" stroke-opacity=\\\"0.198794158\\\" stroke=\\\"#747474\\\" fill-opacity=\\\"0.816519475\\\" fill=\\\"#FFFFFF\\\" sketch:type=\\\"MSShapeGroup\\\"></path>\\n      </g>\\n    </svg>\\n  </div>\\n  <div class=\\\"dz-error-mark\\\">\\n    <svg width=\\\"54px\\\" height=\\\"54px\\\" viewBox=\\\"0 0 54 54\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" xmlns:sketch=\\\"http://www.bohemiancoding.com/sketch/ns\\\">\\n      <title>Error</title>\\n      <defs></defs>\\n      <g id=\\\"Page-1\\\" stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\" sketch:type=\\\"MSPage\\\">\\n        <g id=\\\"Check-+-Oval-2\\\" sketch:type=\\\"MSLayerGroup\\\" stroke=\\\"#747474\\\" stroke-opacity=\\\"0.198794158\\\" fill=\\\"#FFFFFF\\\" fill-opacity=\\\"0.816519475\\\">\\n          <path d=\\\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\\\" id=\\\"Oval-2\\\" sketch:type=\\\"MSShapeGroup\\\"></path>\\n        </g>\\n      </g>\\n    </svg>\\n  </div>\\n</div>\"\n            };\n\n            extend = function() {\n                var key, object, objects, target, val, _i, _len;\n                target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\n                for (_i = 0, _len = objects.length; _i < _len; _i++) {\n                    object = objects[_i];\n                    for (key in object) {\n                        val = object[key];\n                        target[key] = val;\n                    }\n                }\n                return target;\n            };\n\n            function Dropzone(element, options) {\n                var elementOptions, fallback, _ref;\n                this.element = element;\n                this.version = Dropzone.version;\n                this.defaultOptions.template = this.defaultOptions.template.replace(/\\n*/g, \"\");\n                this.clickableElements = [];\n                this.listeners = [];\n                this.files = [];\n                if (typeof this.element === \"string\") {\n                    this.element = document.querySelector(this.element);\n                }\n                if (!(this.element && (this.element.nodeType != null))) {\n                    throw new Error(\"Invalid dropzone element.\");\n                }\n                if (this.element.dropzone) {\n                    throw new Error(\"Dropzone already attached.\");\n                }\n                Dropzone.instances.push(this);\n                this.element.dropzone = this;\n                elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};\n                this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});\n                if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {\n                    return this.options.fallback.call(this);\n                }\n                if (this.options.url == null) {\n                    this.options.url = this.element.getAttribute(\"action\");\n                }\n                if (!this.options.url) {\n                    throw new Error(\"No URL provided.\");\n                }\n                if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {\n                    throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n                }\n                if (this.options.acceptedMimeTypes) {\n                    this.options.acceptedFiles = this.options.acceptedMimeTypes;\n                    delete this.options.acceptedMimeTypes;\n                }\n                this.options.method = this.options.method.toUpperCase();\n                if ((fallback = this.getExistingFallback()) && fallback.parentNode) {\n                    fallback.parentNode.removeChild(fallback);\n                }\n                if (this.options.previewsContainer !== false) {\n                    if (this.options.previewsContainer) {\n                        this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, \"previewsContainer\");\n                    } else {\n                        this.previewsContainer = this.element;\n                    }\n                }\n                if (this.options.clickable) {\n                    if (this.options.clickable === true) {\n                        this.clickableElements = [this.element];\n                    } else {\n                        this.clickableElements = Dropzone.getElements(this.options.clickable, \"clickable\");\n                    }\n                }\n                this.init();\n            }\n\n            Dropzone.prototype.getAcceptedFiles = function() {\n                var file, _i, _len, _ref, _results;\n                _ref = this.files;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    file = _ref[_i];\n                    if (file.accepted) {\n                        _results.push(file);\n                    }\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.getRejectedFiles = function() {\n                var file, _i, _len, _ref, _results;\n                _ref = this.files;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    file = _ref[_i];\n                    if (!file.accepted) {\n                        _results.push(file);\n                    }\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.getFilesWithStatus = function(status) {\n                var file, _i, _len, _ref, _results;\n                _ref = this.files;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    file = _ref[_i];\n                    if (file.status === status) {\n                        _results.push(file);\n                    }\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.getQueuedFiles = function() {\n                return this.getFilesWithStatus(Dropzone.QUEUED);\n            };\n\n            Dropzone.prototype.getUploadingFiles = function() {\n                return this.getFilesWithStatus(Dropzone.UPLOADING);\n            };\n\n            Dropzone.prototype.getAddedFiles = function() {\n                return this.getFilesWithStatus(Dropzone.ADDED);\n            };\n\n            Dropzone.prototype.getActiveFiles = function() {\n                var file, _i, _len, _ref, _results;\n                _ref = this.files;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    file = _ref[_i];\n                    if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {\n                        _results.push(file);\n                    }\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.init = function() {\n                var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;\n                if (this.element.tagName === \"form\") {\n                    this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n                }\n                if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) {\n                    this.element.appendChild(Dropzone.createElement(\"<div class=\\\"dz-default dz-message\\\"><span>\" + this.options.dictDefaultMessage + \"</span></div>\"));\n                }\n                if (this.clickableElements.length) {\n                    setupHiddenFileInput = (function(_this) {\n                        return function() {\n                            if (_this.hiddenFileInput) {\n                                _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);\n                            }\n                            _this.hiddenFileInput = document.createElement(\"input\");\n                            _this.hiddenFileInput.setAttribute(\"type\", \"file\");\n                            if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {\n                                _this.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n                            }\n                            _this.hiddenFileInput.className = \"dz-hidden-input\";\n                            if (_this.options.acceptedFiles != null) {\n                                _this.hiddenFileInput.setAttribute(\"accept\", _this.options.acceptedFiles);\n                            }\n                            if (_this.options.capture != null) {\n                                _this.hiddenFileInput.setAttribute(\"capture\", _this.options.capture);\n                            }\n                            _this.hiddenFileInput.style.visibility = \"hidden\";\n                            _this.hiddenFileInput.style.position = \"absolute\";\n                            _this.hiddenFileInput.style.top = \"0\";\n                            _this.hiddenFileInput.style.left = \"0\";\n                            _this.hiddenFileInput.style.height = \"0\";\n                            _this.hiddenFileInput.style.width = \"0\";\n                            document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);\n                            return _this.hiddenFileInput.addEventListener(\"change\", function() {\n                                var file, files, _i, _len;\n                                files = _this.hiddenFileInput.files;\n                                if (files.length) {\n                                    for (_i = 0, _len = files.length; _i < _len; _i++) {\n                                        file = files[_i];\n                                        _this.addFile(file);\n                                    }\n                                }\n                                _this.emit(\"addedfiles\", files);\n                                return setupHiddenFileInput();\n                            });\n                        };\n                    })(this);\n                    setupHiddenFileInput();\n                }\n                this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;\n                _ref1 = this.events;\n                for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\n                    eventName = _ref1[_i];\n                    this.on(eventName, this.options[eventName]);\n                }\n                this.on(\"uploadprogress\", (function(_this) {\n                    return function() {\n                        return _this.updateTotalUploadProgress();\n                    };\n                })(this));\n                this.on(\"removedfile\", (function(_this) {\n                    return function() {\n                        return _this.updateTotalUploadProgress();\n                    };\n                })(this));\n                this.on(\"canceled\", (function(_this) {\n                    return function(file) {\n                        return _this.emit(\"complete\", file);\n                    };\n                })(this));\n                this.on(\"complete\", (function(_this) {\n                    return function(file) {\n                        if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {\n                            return setTimeout((function() {\n                                return _this.emit(\"queuecomplete\");\n                            }), 0);\n                        }\n                    };\n                })(this));\n                noPropagation = function(e) {\n                    e.stopPropagation();\n                    if (e.preventDefault) {\n                        return e.preventDefault();\n                    } else {\n                        return e.returnValue = false;\n                    }\n                };\n                this.listeners = [\n                    {\n                        element: this.element,\n                        events: {\n                            \"dragstart\": (function(_this) {\n                                return function(e) {\n                                    return _this.emit(\"dragstart\", e);\n                                };\n                            })(this),\n                            \"dragenter\": (function(_this) {\n                                return function(e) {\n                                    noPropagation(e);\n                                    return _this.emit(\"dragenter\", e);\n                                };\n                            })(this),\n                            \"dragover\": (function(_this) {\n                                return function(e) {\n                                    var efct;\n                                    try {\n                                        efct = e.dataTransfer.effectAllowed;\n                                    } catch (_error) {}\n                                    e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';\n                                    noPropagation(e);\n                                    return _this.emit(\"dragover\", e);\n                                };\n                            })(this),\n                            \"dragleave\": (function(_this) {\n                                return function(e) {\n                                    return _this.emit(\"dragleave\", e);\n                                };\n                            })(this),\n                            \"drop\": (function(_this) {\n                                return function(e) {\n                                    noPropagation(e);\n                                    return _this.drop(e);\n                                };\n                            })(this),\n                            \"dragend\": (function(_this) {\n                                return function(e) {\n                                    return _this.emit(\"dragend\", e);\n                                };\n                            })(this)\n                        }\n                    }\n                ];\n                this.clickableElements.forEach((function(_this) {\n                    return function(clickableElement) {\n                        return _this.listeners.push({\n                            element: clickableElement,\n                            events: {\n                                \"click\": function(evt) {\n                                    if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(\".dz-message\")))) {\n                                        _this.hiddenFileInput.click();\n                                    }\n                                    return true;\n                                }\n                            }\n                        });\n                    };\n                })(this));\n                this.enable();\n                return this.options.init.call(this);\n            };\n\n            Dropzone.prototype.destroy = function() {\n                var _ref;\n                this.disable();\n                this.removeAllFiles(true);\n                if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {\n                    this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n                    this.hiddenFileInput = null;\n                }\n                delete this.element.dropzone;\n                return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);\n            };\n\n            Dropzone.prototype.updateTotalUploadProgress = function() {\n                var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;\n                totalBytesSent = 0;\n                totalBytes = 0;\n                activeFiles = this.getActiveFiles();\n                if (activeFiles.length) {\n                    _ref = this.getActiveFiles();\n                    for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                        file = _ref[_i];\n                        totalBytesSent += file.upload.bytesSent;\n                        totalBytes += file.upload.total;\n                    }\n                    totalUploadProgress = 100 * totalBytesSent / totalBytes;\n                } else {\n                    totalUploadProgress = 100;\n                }\n                return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n            };\n\n            Dropzone.prototype._getParamName = function(n) {\n                if (typeof this.options.paramName === \"function\") {\n                    return this.options.paramName(n);\n                } else {\n                    return \"\" + this.options.paramName + (this.options.uploadMultiple ? \"[\" + n + \"]\" : \"\");\n                }\n            };\n\n            Dropzone.prototype.getFallbackForm = function() {\n                var existingFallback, fields, fieldsString, form;\n                if (existingFallback = this.getExistingFallback()) {\n                    return existingFallback;\n                }\n                fieldsString = \"<div class=\\\"dz-fallback\\\">\";\n                if (this.options.dictFallbackText) {\n                    fieldsString += \"<p>\" + this.options.dictFallbackText + \"</p>\";\n                }\n                fieldsString += \"<input type=\\\"file\\\" name=\\\"\" + (this._getParamName(0)) + \"\\\" \" + (this.options.uploadMultiple ? 'multiple=\"multiple\"' : void 0) + \" /><input type=\\\"submit\\\" value=\\\"Upload!\\\"></div>\";\n                fields = Dropzone.createElement(fieldsString);\n                if (this.element.tagName !== \"FORM\") {\n                    form = Dropzone.createElement(\"<form action=\\\"\" + this.options.url + \"\\\" enctype=\\\"multipart/form-data\\\" method=\\\"\" + this.options.method + \"\\\"></form>\");\n                    form.appendChild(fields);\n                } else {\n                    this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n                    this.element.setAttribute(\"method\", this.options.method);\n                }\n                return form != null ? form : fields;\n            };\n\n            Dropzone.prototype.getExistingFallback = function() {\n                var fallback, getFallback, tagName, _i, _len, _ref;\n                getFallback = function(elements) {\n                    var el, _i, _len;\n                    for (_i = 0, _len = elements.length; _i < _len; _i++) {\n                        el = elements[_i];\n                        if (/(^| )fallback($| )/.test(el.className)) {\n                            return el;\n                        }\n                    }\n                };\n                _ref = [\"div\", \"form\"];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    tagName = _ref[_i];\n                    if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\n                        return fallback;\n                    }\n                }\n            };\n\n            Dropzone.prototype.setupEventListeners = function() {\n                var elementListeners, event, listener, _i, _len, _ref, _results;\n                _ref = this.listeners;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    elementListeners = _ref[_i];\n                    _results.push((function() {\n                        var _ref1, _results1;\n                        _ref1 = elementListeners.events;\n                        _results1 = [];\n                        for (event in _ref1) {\n                            listener = _ref1[event];\n                            _results1.push(elementListeners.element.addEventListener(event, listener, false));\n                        }\n                        return _results1;\n                    })());\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.removeEventListeners = function() {\n                var elementListeners, event, listener, _i, _len, _ref, _results;\n                _ref = this.listeners;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    elementListeners = _ref[_i];\n                    _results.push((function() {\n                        var _ref1, _results1;\n                        _ref1 = elementListeners.events;\n                        _results1 = [];\n                        for (event in _ref1) {\n                            listener = _ref1[event];\n                            _results1.push(elementListeners.element.removeEventListener(event, listener, false));\n                        }\n                        return _results1;\n                    })());\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.disable = function() {\n                var file, _i, _len, _ref, _results;\n                this.clickableElements.forEach(function(element) {\n                    return element.classList.remove(\"dz-clickable\");\n                });\n                this.removeEventListeners();\n                _ref = this.files;\n                _results = [];\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    file = _ref[_i];\n                    _results.push(this.cancelUpload(file));\n                }\n                return _results;\n            };\n\n            Dropzone.prototype.enable = function() {\n                this.clickableElements.forEach(function(element) {\n                    return element.classList.add(\"dz-clickable\");\n                });\n                return this.setupEventListeners();\n            };\n\n            Dropzone.prototype.filesize = function(size) {\n                var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;\n                selectedSize = 0;\n                selectedUnit = \"b\";\n                if (size > 0) {\n                    units = ['TB', 'GB', 'MB', 'KB', 'b'];\n                    for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {\n                        unit = units[i];\n                        cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n                        if (size >= cutoff) {\n                            selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n                            selectedUnit = unit;\n                            break;\n                        }\n                    }\n                    selectedSize = Math.round(10 * selectedSize) / 10;\n                }\n                return \"<strong>\" + selectedSize + \"</strong> \" + selectedUnit;\n            };\n\n            Dropzone.prototype._updateMaxFilesReachedClass = function() {\n                if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {\n                    if (this.getAcceptedFiles().length === this.options.maxFiles) {\n                        this.emit('maxfilesreached', this.files);\n                    }\n                    return this.element.classList.add(\"dz-max-files-reached\");\n                } else {\n                    return this.element.classList.remove(\"dz-max-files-reached\");\n                }\n            };\n\n            Dropzone.prototype.drop = function(e) {\n                var files, items;\n                if (!e.dataTransfer) {\n                    return;\n                }\n                this.emit(\"drop\", e);\n                files = e.dataTransfer.files;\n                this.emit(\"addedfiles\", files);\n                if (files.length) {\n                    items = e.dataTransfer.items;\n                    if (items && items.length && (items[0].webkitGetAsEntry != null)) {\n                        this._addFilesFromItems(items);\n                    } else {\n                        this.handleFiles(files);\n                    }\n                }\n            };\n\n            Dropzone.prototype.paste = function(e) {\n                var items, _ref;\n                if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {\n                    return;\n                }\n                this.emit(\"paste\", e);\n                items = e.clipboardData.items;\n                if (items.length) {\n                    return this._addFilesFromItems(items);\n                }\n            };\n\n            Dropzone.prototype.handleFiles = function(files) {\n                var file, _i, _len, _results;\n                _results = [];\n                for (_i = 0, _len = files.length; _i < _len; _i++) {\n                    file = files[_i];\n                    _results.push(this.addFile(file));\n                }\n                return _results;\n            };\n\n            Dropzone.prototype._addFilesFromItems = function(items) {\n                var entry, item, _i, _len, _results;\n                _results = [];\n                for (_i = 0, _len = items.length; _i < _len; _i++) {\n                    item = items[_i];\n                    if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {\n                        if (entry.isFile) {\n                            _results.push(this.addFile(item.getAsFile()));\n                        } else if (entry.isDirectory) {\n                            _results.push(this._addFilesFromDirectory(entry, entry.name));\n                        } else {\n                            _results.push(void 0);\n                        }\n                    } else if (item.getAsFile != null) {\n                        if ((item.kind == null) || item.kind === \"file\") {\n                            _results.push(this.addFile(item.getAsFile()));\n                        } else {\n                            _results.push(void 0);\n                        }\n                    } else {\n                        _results.push(void 0);\n                    }\n                }\n                return _results;\n            };\n\n            Dropzone.prototype._addFilesFromDirectory = function(directory, path) {\n                var dirReader, entriesReader;\n                dirReader = directory.createReader();\n                entriesReader = (function(_this) {\n                    return function(entries) {\n                        var entry, _i, _len;\n                        for (_i = 0, _len = entries.length; _i < _len; _i++) {\n                            entry = entries[_i];\n                            if (entry.isFile) {\n                                entry.file(function(file) {\n                                    if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {\n                                        return;\n                                    }\n                                    file.fullPath = \"\" + path + \"/\" + file.name;\n                                    return _this.addFile(file);\n                                });\n                            } else if (entry.isDirectory) {\n                                _this._addFilesFromDirectory(entry, \"\" + path + \"/\" + entry.name);\n                            }\n                        }\n                    };\n                })(this);\n                return dirReader.readEntries(entriesReader, function(error) {\n                    return typeof console !== \"undefined\" && console !== null ? typeof console.log === \"function\" ? console.log(error) : void 0 : void 0;\n                });\n            };\n\n            Dropzone.prototype.accept = function(file, done) {\n                if (file.size > this.options.maxFilesize * 1024 * 1024) {\n                    return done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\n                } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {\n                    return done(this.options.dictInvalidFileType);\n                } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {\n                    done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\n                    return this.emit(\"maxfilesexceeded\", file);\n                } else {\n                    return this.options.accept.call(this, file, done);\n                }\n            };\n\n            Dropzone.prototype.addFile = function(file) {\n                file.upload = {\n                    progress: 0,\n                    total: file.size,\n                    bytesSent: 0\n                };\n                this.files.push(file);\n                file.status = Dropzone.ADDED;\n                this.emit(\"addedfile\", file);\n                this._enqueueThumbnail(file);\n                return this.accept(file, (function(_this) {\n                    return function(error) {\n                        if (error) {\n                            file.accepted = false;\n                            _this._errorProcessing([file], error);\n                        } else {\n                            file.accepted = true;\n                            if (_this.options.autoQueue) {\n                                _this.enqueueFile(file);\n                            }\n                        }\n                        return _this._updateMaxFilesReachedClass();\n                    };\n                })(this));\n            };\n\n            Dropzone.prototype.enqueueFiles = function(files) {\n                var file, _i, _len;\n                for (_i = 0, _len = files.length; _i < _len; _i++) {\n                    file = files[_i];\n                    this.enqueueFile(file);\n                }\n                return null;\n            };\n\n            Dropzone.prototype.enqueueFile = function(file) {\n                if (file.status === Dropzone.ADDED && file.accepted === true) {\n                    file.status = Dropzone.QUEUED;\n                    if (this.options.autoProcessQueue) {\n                        return setTimeout(((function(_this) {\n                            return function() {\n                                return _this.processQueue();\n                            };\n                        })(this)), 0);\n                    }\n                } else {\n                    throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\n                }\n            };\n\n            Dropzone.prototype._thumbnailQueue = [];\n\n            Dropzone.prototype._processingThumbnail = false;\n\n            Dropzone.prototype._enqueueThumbnail = function(file) {\n                if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {\n                    this._thumbnailQueue.push(file);\n                    return setTimeout(((function(_this) {\n                        return function() {\n                            return _this._processThumbnailQueue();\n                        };\n                    })(this)), 0);\n                }\n            };\n\n            Dropzone.prototype._processThumbnailQueue = function() {\n                if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\n                    return;\n                }\n                this._processingThumbnail = true;\n                return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) {\n                    return function() {\n                        _this._processingThumbnail = false;\n                        return _this._processThumbnailQueue();\n                    };\n                })(this));\n            };\n\n            Dropzone.prototype.removeFile = function(file) {\n                if (file.status === Dropzone.UPLOADING) {\n                    this.cancelUpload(file);\n                }\n                this.files = without(this.files, file);\n                this.emit(\"removedfile\", file);\n                if (this.files.length === 0) {\n                    return this.emit(\"reset\");\n                }\n            };\n\n            Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) {\n                var file, _i, _len, _ref;\n                if (cancelIfNecessary == null) {\n                    cancelIfNecessary = false;\n                }\n                _ref = this.files.slice();\n                for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                    file = _ref[_i];\n                    if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\n                        this.removeFile(file);\n                    }\n                }\n                return null;\n            };\n\n            Dropzone.prototype.createThumbnail = function(file, callback) {\n                var fileReader;\n                fileReader = new FileReader;\n                fileReader.onload = (function(_this) {\n                    return function() {\n                        if (file.type === \"image/svg+xml\") {\n                            _this.emit(\"thumbnail\", file, fileReader.result);\n                            if (callback != null) {\n                                callback();\n                            }\n                            return;\n                        }\n                        return _this.createThumbnailFromUrl(file, fileReader.result, callback);\n                    };\n                })(this);\n                return fileReader.readAsDataURL(file);\n            };\n\n            Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) {\n                var img;\n                img = document.createElement(\"img\");\n                if (crossOrigin) {\n                    img.crossOrigin = crossOrigin;\n                }\n                img.onload = (function(_this) {\n                    return function() {\n                        var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;\n                        file.width = img.width;\n                        file.height = img.height;\n                        resizeInfo = _this.options.resize.call(_this, file);\n                        if (resizeInfo.trgWidth == null) {\n                            resizeInfo.trgWidth = resizeInfo.optWidth;\n                        }\n                        if (resizeInfo.trgHeight == null) {\n                            resizeInfo.trgHeight = resizeInfo.optHeight;\n                        }\n                        canvas = document.createElement(\"canvas\");\n                        ctx = canvas.getContext(\"2d\");\n                        canvas.width = resizeInfo.trgWidth;\n                        canvas.height = resizeInfo.trgHeight;\n                        drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\n                        thumbnail = canvas.toDataURL(\"image/png\");\n                        _this.emit(\"thumbnail\", file, thumbnail);\n                        if (callback != null) {\n                            return callback();\n                        }\n                    };\n                })(this);\n                if (callback != null) {\n                    img.onerror = callback;\n                }\n                return img.src = imageUrl;\n            };\n\n            Dropzone.prototype.processQueue = function() {\n                var i, parallelUploads, processingLength, queuedFiles;\n                parallelUploads = this.options.parallelUploads;\n                processingLength = this.getUploadingFiles().length;\n                i = processingLength;\n                if (processingLength >= parallelUploads) {\n                    return;\n                }\n                queuedFiles = this.getQueuedFiles();\n                if (!(queuedFiles.length > 0)) {\n                    return;\n                }\n                if (this.options.uploadMultiple) {\n                    return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n                } else {\n                    while (i < parallelUploads) {\n                        if (!queuedFiles.length) {\n                            return;\n                        }\n                        this.processFile(queuedFiles.shift());\n                        i++;\n                    }\n                }\n            };\n\n            Dropzone.prototype.processFile = function(file) {\n                return this.processFiles([file]);\n            };\n\n            Dropzone.prototype.processFiles = function(files) {\n                var file, _i, _len;\n                for (_i = 0, _len = files.length; _i < _len; _i++) {\n                    file = files[_i];\n                    file.processing = true;\n                    file.status = Dropzone.UPLOADING;\n                    this.emit(\"processing\", file);\n                }\n                if (this.options.uploadMultiple) {\n                    this.emit(\"processingmultiple\", files);\n                }\n                return this.uploadFiles(files);\n            };\n\n            Dropzone.prototype._getFilesWithXhr = function(xhr) {\n                var file, files;\n                return files = (function() {\n                    var _i, _len, _ref, _results;\n                    _ref = this.files;\n                    _results = [];\n                    for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                        file = _ref[_i];\n                        if (file.xhr === xhr) {\n                            _results.push(file);\n                        }\n                    }\n                    return _results;\n                }).call(this);\n            };\n\n            Dropzone.prototype.cancelUpload = function(file) {\n                var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;\n                if (file.status === Dropzone.UPLOADING) {\n                    groupedFiles = this._getFilesWithXhr(file.xhr);\n                    for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {\n                        groupedFile = groupedFiles[_i];\n                        groupedFile.status = Dropzone.CANCELED;\n                    }\n                    file.xhr.abort();\n                    for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {\n                        groupedFile = groupedFiles[_j];\n                        this.emit(\"canceled\", groupedFile);\n                    }\n                    if (this.options.uploadMultiple) {\n                        this.emit(\"canceledmultiple\", groupedFiles);\n                    }\n                } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {\n                    file.status = Dropzone.CANCELED;\n                    this.emit(\"canceled\", file);\n                    if (this.options.uploadMultiple) {\n                        this.emit(\"canceledmultiple\", [file]);\n                    }\n                }\n                if (this.options.autoProcessQueue) {\n                    return this.processQueue();\n                }\n            };\n\n            resolveOption = function() {\n                var args, option;\n                option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\n                if (typeof option === 'function') {\n                    return option.apply(this, args);\n                }\n                return option;\n            };\n\n            Dropzone.prototype.uploadFile = function(file) {\n                return this.uploadFiles([file]);\n            };\n\n            Dropzone.prototype.uploadFiles = function(files) {\n                var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;\n                xhr = new XMLHttpRequest();\n                for (_i = 0, _len = files.length; _i < _len; _i++) {\n                    file = files[_i];\n                    file.xhr = xhr;\n                }\n                method = resolveOption(this.options.method, files);\n                url = resolveOption(this.options.url, files);\n                xhr.open(method, url, true);\n                xhr.withCredentials = !!this.options.withCredentials;\n                response = null;\n                handleError = (function(_this) {\n                    return function() {\n                        var _j, _len1, _results;\n                        _results = [];\n                        for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\n                            file = files[_j];\n                            _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr));\n                        }\n                        return _results;\n                    };\n                })(this);\n                updateProgress = (function(_this) {\n                    return function(e) {\n                        var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;\n                        if (e != null) {\n                            progress = 100 * e.loaded / e.total;\n                            for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\n                                file = files[_j];\n                                file.upload = {\n                                    progress: progress,\n                                    total: e.total,\n                                    bytesSent: e.loaded\n                                };\n                            }\n                        } else {\n                            allFilesFinished = true;\n                            progress = 100;\n                            for (_k = 0, _len2 = files.length; _k < _len2; _k++) {\n                                file = files[_k];\n                                if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {\n                                    allFilesFinished = false;\n                                }\n                                file.upload.progress = progress;\n                                file.upload.bytesSent = file.upload.total;\n                            }\n                            if (allFilesFinished) {\n                                return;\n                            }\n                        }\n                        _results = [];\n                        for (_l = 0, _len3 = files.length; _l < _len3; _l++) {\n                            file = files[_l];\n                            _results.push(_this.emit(\"uploadprogress\", file, progress, file.upload.bytesSent));\n                        }\n                        return _results;\n                    };\n                })(this);\n                xhr.onload = (function(_this) {\n                    return function(e) {\n                        var _ref;\n                        if (files[0].status === Dropzone.CANCELED) {\n                            return;\n                        }\n                        if (xhr.readyState !== 4) {\n                            return;\n                        }\n                        response = xhr.responseText;\n                        if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) {\n                            try {\n                                response = JSON.parse(response);\n                            } catch (_error) {\n                                e = _error;\n                                response = \"Invalid JSON response from server.\";\n                            }\n                        }\n                        updateProgress();\n                        if (!((200 <= (_ref = xhr.status) && _ref < 300))) {\n                            return handleError();\n                        } else {\n                            return _this._finished(files, response, e);\n                        }\n                    };\n                })(this);\n                xhr.onerror = (function(_this) {\n                    return function() {\n                        if (files[0].status === Dropzone.CANCELED) {\n                            return;\n                        }\n                        return handleError();\n                    };\n                })(this);\n                progressObj = (_ref = xhr.upload) != null ? _ref : xhr;\n                progressObj.onprogress = updateProgress;\n                headers = {\n                    \"Accept\": \"application/json\",\n                    \"Cache-Control\": \"no-cache\",\n                    \"X-Requested-With\": \"XMLHttpRequest\"\n                };\n                if (this.options.headers) {\n                    extend(headers, this.options.headers);\n                }\n                for (headerName in headers) {\n                    headerValue = headers[headerName];\n                    if (headerValue) {\n                        xhr.setRequestHeader(headerName, headerValue);\n                    }\n                }\n                formData = new FormData();\n                if (this.options.params) {\n                    _ref1 = this.options.params;\n                    for (key in _ref1) {\n                        value = _ref1[key];\n                        formData.append(key, value);\n                    }\n                }\n                for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\n                    file = files[_j];\n                    this.emit(\"sending\", file, xhr, formData);\n                }\n                if (this.options.uploadMultiple) {\n                    this.emit(\"sendingmultiple\", files, xhr, formData);\n                }\n                if (this.element.tagName === \"FORM\") {\n                    _ref2 = this.element.querySelectorAll(\"input, textarea, select, button\");\n                    for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {\n                        input = _ref2[_k];\n                        inputName = input.getAttribute(\"name\");\n                        inputType = input.getAttribute(\"type\");\n                        if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\n                            _ref3 = input.options;\n                            for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {\n                                option = _ref3[_l];\n                                if (option.selected) {\n                                    formData.append(inputName, option.value);\n                                }\n                            }\n                        } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== \"checkbox\" && _ref4 !== \"radio\") || input.checked) {\n                            formData.append(inputName, input.value);\n                        }\n                    }\n                }\n                for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {\n                    formData.append(this._getParamName(i), files[i], files[i].name);\n                }\n                return this.submitRequest(xhr, formData, files);\n            };\n\n            Dropzone.prototype.submitRequest = function(xhr, formData, files) {\n                return xhr.send(formData);\n            };\n\n            Dropzone.prototype._finished = function(files, responseText, e) {\n                var file, _i, _len;\n                for (_i = 0, _len = files.length; _i < _len; _i++) {\n                    file = files[_i];\n                    file.status = Dropzone.SUCCESS;\n                    this.emit(\"success\", file, responseText, e);\n                    this.emit(\"complete\", file);\n                }\n                if (this.options.uploadMultiple) {\n                    this.emit(\"successmultiple\", files, responseText, e);\n                    this.emit(\"completemultiple\", files);\n                }\n                if (this.options.autoProcessQueue) {\n                    return this.processQueue();\n                }\n            };\n\n            Dropzone.prototype._errorProcessing = function(files, message, xhr) {\n                var file, _i, _len;\n                for (_i = 0, _len = files.length; _i < _len; _i++) {\n                    file = files[_i];\n                    file.status = Dropzone.ERROR;\n                    this.emit(\"error\", file, message, xhr);\n                    this.emit(\"complete\", file);\n                }\n                if (this.options.uploadMultiple) {\n                    this.emit(\"errormultiple\", files, message, xhr);\n                    this.emit(\"completemultiple\", files);\n                }\n                if (this.options.autoProcessQueue) {\n                    return this.processQueue();\n                }\n            };\n\n            return Dropzone;\n\n        })(Emitter);\n\n        Dropzone.version = \"4.2.0\";\n\n        Dropzone.options = {};\n\n        Dropzone.optionsForElement = function(element) {\n            if (element.getAttribute(\"id\")) {\n                return Dropzone.options[camelize(element.getAttribute(\"id\"))];\n            } else {\n                return void 0;\n            }\n        };\n\n        Dropzone.instances = [];\n\n        Dropzone.forElement = function(element) {\n            if (typeof element === \"string\") {\n                element = document.querySelector(element);\n            }\n            if ((element != null ? element.dropzone : void 0) == null) {\n                throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\n            }\n            return element.dropzone;\n        };\n\n        Dropzone.autoDiscover = true;\n\n        Dropzone.discover = function() {\n            var checkElements, dropzone, dropzones, _i, _len, _results;\n            if (document.querySelectorAll) {\n                dropzones = document.querySelectorAll(\".dropzone\");\n            } else {\n                dropzones = [];\n                checkElements = function(elements) {\n                    var el, _i, _len, _results;\n                    _results = [];\n                    for (_i = 0, _len = elements.length; _i < _len; _i++) {\n                        el = elements[_i];\n                        if (/(^| )dropzone($| )/.test(el.className)) {\n                            _results.push(dropzones.push(el));\n                        } else {\n                            _results.push(void 0);\n                        }\n                    }\n                    return _results;\n                };\n                checkElements(document.getElementsByTagName(\"div\"));\n                checkElements(document.getElementsByTagName(\"form\"));\n            }\n            _results = [];\n            for (_i = 0, _len = dropzones.length; _i < _len; _i++) {\n                dropzone = dropzones[_i];\n                if (Dropzone.optionsForElement(dropzone) !== false) {\n                    _results.push(new Dropzone(dropzone));\n                } else {\n                    _results.push(void 0);\n                }\n            }\n            return _results;\n        };\n\n        Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\\/12/i];\n\n        Dropzone.isBrowserSupported = function() {\n            var capableBrowser, regex, _i, _len, _ref;\n            capableBrowser = true;\n            if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\n                if (!(\"classList\" in document.createElement(\"a\"))) {\n                    capableBrowser = false;\n                } else {\n                    _ref = Dropzone.blacklistedBrowsers;\n                    for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n                        regex = _ref[_i];\n                        if (regex.test(navigator.userAgent)) {\n                            capableBrowser = false;\n                            continue;\n                        }\n                    }\n                }\n            } else {\n                capableBrowser = false;\n            }\n            return capableBrowser;\n        };\n\n        without = function(list, rejectedItem) {\n            var item, _i, _len, _results;\n            _results = [];\n            for (_i = 0, _len = list.length; _i < _len; _i++) {\n                item = list[_i];\n                if (item !== rejectedItem) {\n                    _results.push(item);\n                }\n            }\n            return _results;\n        };\n\n        camelize = function(str) {\n            return str.replace(/[\\-_](\\w)/g, function(match) {\n                return match.charAt(1).toUpperCase();\n            });\n        };\n\n        Dropzone.createElement = function(string) {\n            var div;\n            div = document.createElement(\"div\");\n            div.innerHTML = string;\n            return div.childNodes[0];\n        };\n\n        Dropzone.elementInside = function(element, container) {\n            if (element === container) {\n                return true;\n            }\n            while (element = element.parentNode) {\n                if (element === container) {\n                    return true;\n                }\n            }\n            return false;\n        };\n\n        Dropzone.getElement = function(el, name) {\n            var element;\n            if (typeof el === \"string\") {\n                element = document.querySelector(el);\n            } else if (el.nodeType != null) {\n                element = el;\n            }\n            if (element == null) {\n                throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector or a plain HTML element.\");\n            }\n            return element;\n        };\n\n        Dropzone.getElements = function(els, name) {\n            var e, el, elements, _i, _j, _len, _len1, _ref;\n            if (els instanceof Array) {\n                elements = [];\n                try {\n                    for (_i = 0, _len = els.length; _i < _len; _i++) {\n                        el = els[_i];\n                        elements.push(this.getElement(el, name));\n                    }\n                } catch (_error) {\n                    e = _error;\n                    elements = null;\n                }\n            } else if (typeof els === \"string\") {\n                elements = [];\n                _ref = document.querySelectorAll(els);\n                for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {\n                    el = _ref[_j];\n                    elements.push(el);\n                }\n            } else if (els.nodeType != null) {\n                elements = [els];\n            }\n            if (!((elements != null) && elements.length)) {\n                throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\");\n            }\n            return elements;\n        };\n\n        Dropzone.confirm = function(question, accepted, rejected) {\n            if (window.confirm(question)) {\n                return accepted();\n            } else if (rejected != null) {\n                return rejected();\n            }\n        };\n\n        Dropzone.isValidFile = function(file, acceptedFiles) {\n            var baseMimeType, mimeType, validType, _i, _len;\n            if (!acceptedFiles) {\n                return true;\n            }\n            acceptedFiles = acceptedFiles.split(\",\");\n            mimeType = file.type;\n            baseMimeType = mimeType.replace(/\\/.*$/, \"\");\n            for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {\n                validType = acceptedFiles[_i];\n                validType = validType.trim();\n                if (validType.charAt(0) === \".\") {\n                    if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {\n                        return true;\n                    }\n                } else if (/\\/\\*$/.test(validType)) {\n                    if (baseMimeType === validType.replace(/\\/.*$/, \"\")) {\n                        return true;\n                    }\n                } else {\n                    if (mimeType === validType) {\n                        return true;\n                    }\n                }\n            }\n            return false;\n        };\n\n        if (typeof jQuery !== \"undefined\" && jQuery !== null) {\n            jQuery.fn.dropzone = function(options) {\n                return this.each(function() {\n                    return new Dropzone(this, options);\n                });\n            };\n        }\n\n        if (typeof module !== \"undefined\" && module !== null) {\n            module.exports = Dropzone;\n        } else {\n            window.Dropzone = Dropzone;\n        }\n\n        Dropzone.ADDED = \"added\";\n\n        Dropzone.QUEUED = \"queued\";\n\n        Dropzone.ACCEPTED = Dropzone.QUEUED;\n\n        Dropzone.UPLOADING = \"uploading\";\n\n        Dropzone.PROCESSING = Dropzone.UPLOADING;\n\n        Dropzone.CANCELED = \"canceled\";\n\n        Dropzone.ERROR = \"error\";\n\n        Dropzone.SUCCESS = \"success\";\n\n\n        /*\n\n         Bugfix for iOS 6 and 7\n         Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\n         based on the work of https://github.com/stomita/ios-imagefile-megapixel\n         */\n\n        detectVerticalSquash = function(img) {\n            var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;\n            iw = img.naturalWidth;\n            ih = img.naturalHeight;\n            canvas = document.createElement(\"canvas\");\n            canvas.width = 1;\n            canvas.height = ih;\n            ctx = canvas.getContext(\"2d\");\n            ctx.drawImage(img, 0, 0);\n            data = ctx.getImageData(0, 0, 1, ih).data;\n            sy = 0;\n            ey = ih;\n            py = ih;\n            while (py > sy) {\n                alpha = data[(py - 1) * 4 + 3];\n                if (alpha === 0) {\n                    ey = py;\n                } else {\n                    sy = py;\n                }\n                py = (ey + sy) >> 1;\n            }\n            ratio = py / ih;\n            if (ratio === 0) {\n                return 1;\n            } else {\n                return ratio;\n            }\n        };\n\n        drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\n            var vertSquashRatio;\n            vertSquashRatio = detectVerticalSquash(img);\n            return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\n        };\n\n\n        /*\n         * contentloaded.js\n         *\n         * Author: Diego Perini (diego.perini at gmail.com)\n         * Summary: cross-browser wrapper for DOMContentLoaded\n         * Updated: 20101020\n         * License: MIT\n         * Version: 1.2\n         *\n         * URL:\n         * http://javascript.nwbox.com/ContentLoaded/\n         * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n         */\n\n        contentLoaded = function(win, fn) {\n            var add, doc, done, init, poll, pre, rem, root, top;\n            done = false;\n            top = true;\n            doc = win.document;\n            root = doc.documentElement;\n            add = (doc.addEventListener ? \"addEventListener\" : \"attachEvent\");\n            rem = (doc.addEventListener ? \"removeEventListener\" : \"detachEvent\");\n            pre = (doc.addEventListener ? \"\" : \"on\");\n            init = function(e) {\n                if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") {\n                    return;\n                }\n                (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\n                if (!done && (done = true)) {\n                    return fn.call(win, e.type || e);\n                }\n            };\n            poll = function() {\n                var e;\n                try {\n                    root.doScroll(\"left\");\n                } catch (_error) {\n                    e = _error;\n                    setTimeout(poll, 50);\n                    return;\n                }\n                return init(\"poll\");\n            };\n            if (doc.readyState !== \"complete\") {\n                if (doc.createEventObject && root.doScroll) {\n                    try {\n                        top = !win.frameElement;\n                    } catch (_error) {}\n                    if (top) {\n                        poll();\n                    }\n                }\n                doc[add](pre + \"DOMContentLoaded\", init, false);\n                doc[add](pre + \"readystatechange\", init, false);\n                return win[add](pre + \"load\", init, false);\n            }\n        };\n\n        Dropzone._autoDiscoverFunction = function() {\n            if (Dropzone.autoDiscover) {\n                return Dropzone.discover();\n            }\n        };\n\n        contentLoaded(window, Dropzone._autoDiscoverFunction);\n\n    }).call(this);\n\n    return module.exports;\n}));","Magento_PageBuilder/js/resource/dropzone/knockout-dropzone.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/*eslint-disable vars-on-top, strict*/\n\n(function (factory) {\n    if (typeof define === 'function' && define.amd) {\n        // AMD anonymous module\n        define(['knockout', 'jquery', 'Magento_PageBuilder/js/resource/dropzone/dropzone', 'mage/translate'], factory);\n    } else if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {\n        // CommonJS module\n        var ko = require('knockout'),\n            jQuery = require('jquery'),\n            Dropzone = require('Magento_PageBuilder/js/resource/dropzone/dropzone'),\n            translate = require('mage/translate');\n\n        factory(ko, jQuery, Dropzone, translate);\n    } else {\n        // No module loader (plain <script> tag) - put directly in global namespace\n        factory(window.ko, window.jQuery, window.Dropzone, window.translate);\n    }\n})(function (ko, jQuery, Dropzone, $t) {\n\n    // Create a new sortable Knockout binding\n    ko.bindingHandlers.dropzone = {\n\n        /**\n         * Init the dropzone element\n         *\n         * @param element\n         * @param valueAccessor\n         */\n        init: function (element, valueAccessor) {\n            var value = ko.unwrap(valueAccessor()),\n                originalSuccess = value.success,\n                options = {\n                    uploadMultiple: false,\n                    createImageThumbnails: false,\n                    addRemoveLinks: false,\n                    dictDefaultMessage: $t('Drop files here, or click to upload'),\n                    init: function () {\n                        // Add the current formKey into the request\n                        this.on('sending', function (file, xhr, formData) {\n                            formData.append('form_key', FORM_KEY);\n                        });\n                    },\n                    success: function (file, response) {\n                        return originalSuccess.call(this, file, response, value.bindKey);\n                    }\n                };\n\n            // Delete the success value\n            delete value.success;\n\n            // Extend the options with the values provided\n            jQuery.extend(options, value);\n\n            jQuery(element).addClass('dropzone');\n            new Dropzone(element, options);\n        }\n\n    };\n});","Magento_PageBuilder/js/resource/csso/csso.min.js":"!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t((e=e||self).csso={})}(this,(function(e){\"use strict\";function t(e){return{prev:null,next:null,data:e}}function n(e,t,n){var r;return null!==a?(r=a,a=a.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function r(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=a,a=t}var a=null,i=function(){this.cursor=null,this.head=null,this.tail=null};i.createItem=t,i.prototype.createItem=t,i.prototype.updateCursors=function(e,t,n,r){for(var a=this.cursor;null!==a;)a.prev===e&&(a.prev=t),a.next===n&&(a.next=r),a=a.cursor},i.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},i.prototype.fromArray=function(e){var n=null;this.head=null;for(var r=0;r<e.length;r++){var a=t(e[r]);null!==n?n.next=a:this.head=a,a.prev=n,n=a}return this.tail=n,this},i.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},i.prototype.toJSON=i.prototype.toArray,i.prototype.isEmpty=function(){return null===this.head},i.prototype.first=function(){return this.head&&this.head.data},i.prototype.last=function(){return this.tail&&this.tail.data},i.prototype.each=function(e,t){var a;void 0===t&&(t=this);for(var i=n(this,null,this.head);null!==i.next;)a=i.next,i.next=a.next,e.call(t,a.data,a,this);r(this)},i.prototype.forEach=i.prototype.each,i.prototype.eachRight=function(e,t){var a;void 0===t&&(t=this);for(var i=n(this,this.tail,null);null!==i.prev;)a=i.prev,i.prev=a.prev,e.call(t,a.data,a,this);r(this)},i.prototype.forEachRight=i.prototype.eachRight,i.prototype.nextUntil=function(e,t,a){if(null!==e){var i;void 0===a&&(a=this);for(var o=n(this,null,e);null!==o.next&&(i=o.next,o.next=i.next,!t.call(a,i.data,i,this)););r(this)}},i.prototype.prevUntil=function(e,t,a){if(null!==e){var i;void 0===a&&(a=this);for(var o=n(this,e,null);null!==o.prev&&(i=o.prev,o.prev=i.prev,!t.call(a,i.data,i,this)););r(this)}},i.prototype.some=function(e,t){var n=this.head;for(void 0===t&&(t=this);null!==n;){if(e.call(t,n.data,n,this))return!0;n=n.next}return!1},i.prototype.map=function(e,t){var n=new i,r=this.head;for(void 0===t&&(t=this);null!==r;)n.appendData(e.call(t,r.data,r,this)),r=r.next;return n},i.prototype.filter=function(e,t){var n=new i,r=this.head;for(void 0===t&&(t=this);null!==r;)e.call(t,r.data,r,this)&&n.appendData(r.data),r=r.next;return n},i.prototype.clear=function(){this.head=null,this.tail=null},i.prototype.copy=function(){for(var e=new i,n=this.head;null!==n;)e.insert(t(n.data)),n=n.next;return e},i.prototype.prepend=function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this},i.prototype.prependData=function(e){return this.prepend(t(e))},i.prototype.append=function(e){return this.insert(e)},i.prototype.appendData=function(e){return this.insert(t(e))},i.prototype.insert=function(e,t){if(null!=t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error(\"before doesn't belong to list\");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this},i.prototype.insertData=function(e,n){return this.insert(t(e),n)},i.prototype.remove=function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error(\"item doesn't belong to list\");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error(\"item doesn't belong to list\");this.tail=e.prev}return e.prev=null,e.next=null,e},i.prototype.push=function(e){this.insert(t(e))},i.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},i.prototype.unshift=function(e){this.prepend(t(e))},i.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},i.prototype.prependList=function(e){return this.insertList(e,this.head)},i.prototype.appendList=function(e){return this.insertList(e)},i.prototype.insertList=function(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this},i.prototype.replace=function(e,t){\"head\"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)};var o=i,s=function(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return n.name=e,n.message=t,Object.defineProperty(n,\"stack\",{get:function(){return(r.stack||\"\").replace(/^(.+\\n){1,3}/,e+\": \"+t+\"\\n\")}}),n};function l(e,t){function n(e,t){return r.slice(e,t).map((function(t,n){for(var r=String(e+n+1);r.length<l;)r=\" \"+r;return r+\" |\"+t})).join(\"\\n\")}var r=e.source.split(/\\r\\n?|\\n|\\f/),a=e.line,i=e.column,o=Math.max(1,a-t)-1,s=Math.min(a+t,r.length+1),l=Math.max(4,String(s).length)+1,c=0;(i+=(\"    \".length-1)*(r[a-1].substr(0,i-1).match(/\\t/g)||[]).length)>100&&(c=i-60+3,i=58);for(var u=o;u<=s;u++)u>=0&&u<r.length&&(r[u]=r[u].replace(/\\t/g,\"    \"),r[u]=(c>0&&r[u].length>c?\"\u2026\":\"\")+r[u].substr(c,98)+(r[u].length>c+100-1?\"\u2026\":\"\"));return[n(o,a),new Array(i+l+2).join(\"-\")+\"^\",n(a,s)].filter(Boolean).join(\"\\n\")}var c=function(e,t,n,r,a){var i=s(\"SyntaxError\",e);return i.source=t,i.offset=n,i.line=r,i.column=a,i.sourceFragment=function(e){return l(i,isNaN(e)?0:e)},Object.defineProperty(i,\"formattedMessage\",{get:function(){return\"Parse error: \"+i.message+\"\\n\"+l(i,2)}}),i.parseError={offset:n,line:r,column:a},i},u={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},h=Object.keys(u).reduce((function(e,t){return e[u[t]]=t,e}),{}),d={TYPE:u,NAME:h};function p(e){return e>=48&&e<=57}function f(e){return e>=65&&e<=90}function m(e){return e>=97&&e<=122}function g(e){return f(e)||m(e)}function b(e){return e>=128}function y(e){return g(e)||b(e)||95===e}function k(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function v(e){return 10===e||13===e||12===e}function w(e){return v(e)||32===e||9===e}function x(e,t){return 92===e&&(!v(t)&&0!==t)}var S=new Array(128);A.Eof=128,A.WhiteSpace=130,A.Digit=131,A.NameStart=132,A.NonPrintable=133;for(var C=0;C<S.length;C++)switch(!0){case w(C):S[C]=A.WhiteSpace;break;case p(C):S[C]=A.Digit;break;case y(C):S[C]=A.NameStart;break;case k(C):S[C]=A.NonPrintable;break;default:S[C]=C||A.Eof}function A(e){return e<128?S[e]:A.NameStart}var z={isDigit:p,isHexDigit:function(e){return p(e)||e>=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:f,isLowercaseLetter:m,isLetter:g,isNonAscii:b,isNameStart:y,isName:function(e){return y(e)||p(e)||45===e},isNonPrintable:k,isNewline:v,isWhiteSpace:w,isValidEscape:x,isIdentifierStart:function(e,t,n){return 45===e?y(t)||45===t||x(t,n):!!y(e)||92===e&&x(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?p(t)?2:46===t&&p(n)?3:0:46===e?p(t)?2:0:p(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:A},P=z.isDigit,L=z.isHexDigit,T=z.isUppercaseLetter,E=z.isName,O=z.isWhiteSpace,D=z.isValidEscape;function R(e,t){return t<e.length?e.charCodeAt(t):0}function I(e,t,n){return 13===n&&10===R(e,t+1)?2:1}function M(e,t,n){var r=e.charCodeAt(t);return T(r)&&(r|=32),r===n}function N(e,t){for(;t<e.length&&P(e.charCodeAt(t));t++);return t}function B(e,t){if(L(R(e,(t+=2)-1))){for(var n=Math.min(e.length,t+5);t<n&&L(R(e,t));t++);var r=R(e,t);O(r)&&(t+=I(e,t,r))}return t}var j={consumeEscaped:B,consumeName:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(!E(n)){if(!D(n,R(e,t+1)))break;t=B(e,t)-1}}return t},consumeNumber:function(e,t){var n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),P(n)&&(t=N(e,t+1),n=e.charCodeAt(t)),46===n&&P(e.charCodeAt(t+1))&&(n=e.charCodeAt(t+=2),t=N(e,t)),M(e,t,101)){var r=0;45!==(n=e.charCodeAt(t+1))&&43!==n||(r=1,n=e.charCodeAt(t+2)),P(n)&&(t=N(e,t+1+r+1))}return t},consumeBadUrlRemnants:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(41===n){t++;break}D(n,R(e,t+1))&&(t=B(e,t))}return t},cmpChar:M,cmpStr:function(e,t,n,r){if(n-t!==r.length)return!1;if(t<0||n>e.length)return!1;for(var a=t;a<n;a++){var i=e.charCodeAt(a),o=r.charCodeAt(a-t);if(T(i)&&(i|=32),i!==o)return!1}return!0},getNewlineLength:I,findWhiteSpaceStart:function(e,t){for(;t>=0&&O(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t<e.length&&O(e.charCodeAt(t));t++);return t}},_=d.TYPE,q=d.NAME,W=j.cmpStr,F=_.EOF,U=_.WhiteSpace,Y=_.Comment,H=function(){this.offsetAndType=null,this.balance=null,this.reset()};H.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset},lookupType:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>24:F},lookupOffset:function(e){return(e+=this.tokenIndex)<this.tokenCount?16777215&this.offsetAndType[e-1]:this.source.length},lookupValue:function(e,t){return(e+=this.tokenIndex)<this.tokenCount&&W(this.source,16777215&this.offsetAndType[e-1],16777215&this.offsetAndType[e],t)},getTokenStart:function(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?16777215&this.offsetAndType[e-1]:16777215&this.offsetAndType[this.tokenCount]:this.firstCharOffset},getRawLength:function(e,t){var n,r=e,a=16777215&this.offsetAndType[Math.max(r-1,0)];e:for(;r<this.tokenCount&&!((n=this.balance[r])<e);r++)switch(t(this.offsetAndType[r]>>24,this.source,a)){case 1:break e;case 2:r++;break e;default:a=16777215&this.offsetAndType[r],this.balance[n]===r&&(r=n)}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]<e},isDelim:function(e,t){return t?this.lookupType(t)===_.Delim&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===_.Delim&&this.source.charCodeAt(this.tokenStart)===e},getTokenValue:function(){return this.source.substring(this.tokenStart,this.tokenEnd)},getTokenLength:function(){return this.tokenEnd-this.tokenStart},substrToCursor:function(e){return this.source.substring(e,this.tokenStart)},skipWS:function(){for(var e=this.tokenIndex,t=0;e<this.tokenCount&&this.offsetAndType[e]>>24===U;e++,t++);t>0&&this.skip(t)},skipSC:function(){for(;this.tokenType===U||this.tokenType===Y;)this.next()},skip:function(e){var t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=16777215&this.offsetAndType[t-1],t=this.offsetAndType[t],this.tokenType=t>>24,this.tokenEnd=16777215&t):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>24,this.tokenEnd=16777215&e):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=F,this.tokenStart=this.tokenEnd=this.source.length)},dump:function(){var e=this.firstCharOffset;return Array.prototype.slice.call(this.offsetAndType,0,this.tokenCount).map((function(t,n){var r=e,a=16777215&t;return e=a,{idx:n,type:q[t>>24],chunk:this.source.substring(r,a),balance:this.balance[n]}}),this)}};var V=H;function K(e){return e}function G(e,t,n,r){var a,i;switch(e.type){case\"Group\":a=function(e,t,n,r){var a=\" \"===e.combinator||r?e.combinator:\" \"+e.combinator+\" \",i=e.terms.map((function(e){return G(e,t,n,r)})).join(a);return(e.explicit||n)&&(i=(r||\",\"===i[0]?\"[\":\"[ \")+i+(r?\"]\":\" ]\")),i}(e,t,n,r)+(e.disallowEmpty?\"!\":\"\");break;case\"Multiplier\":return G(e.term,t,n,r)+t(0===(i=e).min&&0===i.max?\"*\":0===i.min&&1===i.max?\"?\":1===i.min&&0===i.max?i.comma?\"#\":\"+\":1===i.min&&1===i.max?\"\":(i.comma?\"#\":\"\")+(i.min===i.max?\"{\"+i.min+\"}\":\"{\"+i.min+\",\"+(0!==i.max?i.max:\"\")+\"}\"),e);case\"Type\":a=\"<\"+e.name+(e.opts?t(function(e){switch(e.type){case\"Range\":return\" [\"+(null===e.min?\"-\u221e\":e.min)+\",\"+(null===e.max?\"\u221e\":e.max)+\"]\";default:throw new Error(\"Unknown node type `\"+e.type+\"`\")}}(e.opts),e.opts):\"\")+\">\";break;case\"Property\":a=\"<'\"+e.name+\"'>\";break;case\"Keyword\":a=e.name;break;case\"AtKeyword\":a=\"@\"+e.name;break;case\"Function\":a=e.name+\"(\";break;case\"String\":case\"Token\":a=e.value;break;case\"Comma\":a=\",\";break;default:throw new Error(\"Unknown node type `\"+e.type+\"`\")}return t(a,e)}var $=function(e,t){var n=K,r=!1,a=!1;return\"function\"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),a=Boolean(t.compact),\"function\"==typeof t.decorate&&(n=t.decorate)),G(e,n,r,a)};function Q(e,t){var n=e&&e.loc&&e.loc[t];return n?{offset:n.offset,line:n.line,column:n.column}:null}var X=function(e,t){var n=s(\"SyntaxReferenceError\",e+(t?\" `\"+t+\"`\":\"\"));return n.reference=t,n},Z=function(e,t,n,r){var a=s(\"SyntaxMatchError\",e),i=function(e){for(var t=e.tokens,n=e.longestMatch,r=n<t.length?t[n].node:null,a=-1,i=0,o=\"\",s=0;s<t.length;s++)s===n&&(a=o.length),null!==r&&t[s].node===r&&(s<=n?i++:i=0),o+=t[s].value;return{node:r,css:o,mismatchOffset:-1===a?o.length:a,last:null===r||i>1}}(r),o=i.mismatchOffset||0,l=i.node||n,c=Q(l,\"end\"),u=i.last?c:Q(l,\"start\"),h=i.css;return a.rawMessage=e,a.syntax=t?$(t):\"<generic>\",a.css=h,a.mismatchOffset=o,a.loc={source:l&&l.loc&&l.loc.source||\"<unknown>\",start:u,end:c},a.line=u?u.line:void 0,a.column=u?u.column:void 0,a.offset=u?u.offset:void 0,a.message=e+\"\\n  syntax: \"+a.syntax+\"\\n   value: \"+(a.css||\"<empty string>\")+\"\\n  --------\"+new Array(a.mismatchOffset+1).join(\"-\")+\"^\",a},J=Object.prototype.hasOwnProperty,ee=Object.create(null),te=Object.create(null);function ne(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function re(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){var n=e.indexOf(\"-\",t+2);if(-1!==n)return e.substring(t,n+1)}return\"\"}var ae={keyword:function(e){if(J.call(ee,e))return ee[e];var t=e.toLowerCase();if(J.call(ee,t))return ee[e]=ee[t];var n=ne(t,0),r=n?\"\":re(t,0);return ee[e]=Object.freeze({basename:t.substr(r.length),name:t,vendor:r,prefix:r,custom:n})},property:function(e){if(J.call(te,e))return te[e];var t=e,n=e[0];\"/\"===n?n=\"/\"===e[1]?\"//\":\"/\":\"_\"!==n&&\"*\"!==n&&\"$\"!==n&&\"#\"!==n&&\"+\"!==n&&\"&\"!==n&&(n=\"\");var r=ne(t,n.length);if(!r&&(t=t.toLowerCase(),J.call(te,t)))return te[e]=te[t];var a=r?\"\":re(t,n.length),i=t.substr(0,n.length+a.length);return te[e]=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:a,prefix:i,custom:r})},isCustomProperty:ne,vendorPrefix:re},ie=\"undefined\"!=typeof Uint32Array?Uint32Array:Array,oe=function(e,t){return null===e||e.length<t?new ie(Math.max(t+1024,16384)):e},se=d.TYPE,le=z.isNewline,ce=z.isName,ue=z.isValidEscape,he=z.isNumberStart,de=z.isIdentifierStart,pe=z.charCodeCategory,fe=z.isBOM,me=j.cmpStr,ge=j.getNewlineLength,be=j.findWhiteSpaceEnd,ye=j.consumeEscaped,ke=j.consumeName,ve=j.consumeNumber,we=j.consumeBadUrlRemnants;function xe(e,t){function n(t){return t<o?e.charCodeAt(t):0}function r(){return h=ve(e,h),de(n(h),n(h+1),n(h+2))?(g=se.Dimension,void(h=ke(e,h))):37===n(h)?(g=se.Percentage,void h++):void(g=se.Number)}function a(){const t=h;return h=ke(e,h),me(e,t,h,\"url\")&&40===n(h)?34===n(h=be(e,h+1))||39===n(h)?(g=se.Function,void(h=t+4)):void function(){for(g=se.Url,h=be(e,h);h<e.length;h++){var t=e.charCodeAt(h);switch(pe(t)){case 41:return void h++;case pe.Eof:return;case pe.WhiteSpace:return 41===n(h=be(e,h))||h>=e.length?void(h<e.length&&h++):(h=we(e,h),void(g=se.BadUrl));case 34:case 39:case 40:case pe.NonPrintable:return h=we(e,h),void(g=se.BadUrl);case 92:if(ue(t,n(h+1))){h=ye(e,h)-1;break}return h=we(e,h),void(g=se.BadUrl)}}}():40===n(h)?(g=se.Function,void h++):void(g=se.Ident)}function i(t){for(t||(t=n(h++)),g=se.String;h<e.length;h++){var r=e.charCodeAt(h);switch(pe(r)){case t:return void h++;case pe.Eof:return;case pe.WhiteSpace:if(le(r))return h+=ge(e,h,r),void(g=se.BadString);break;case 92:if(h===e.length-1)break;var a=n(h+1);le(a)?h+=ge(e,h+1,a):ue(r,a)&&(h=ye(e,h)-1)}}}t||(t=new V);for(var o=(e=String(e||\"\")).length,s=oe(t.offsetAndType,o+1),l=oe(t.balance,o+1),c=0,u=fe(n(0)),h=u,d=0,p=0,f=0;h<o;){var m=e.charCodeAt(h),g=0;switch(l[c]=o,pe(m)){case pe.WhiteSpace:g=se.WhiteSpace,h=be(e,h+1);break;case 34:i();break;case 35:ce(n(h+1))||ue(n(h+1),n(h+2))?(g=se.Hash,h=ke(e,h+1)):(g=se.Delim,h++);break;case 39:i();break;case 40:g=se.LeftParenthesis,h++;break;case 41:g=se.RightParenthesis,h++;break;case 43:he(m,n(h+1),n(h+2))?r():(g=se.Delim,h++);break;case 44:g=se.Comma,h++;break;case 45:he(m,n(h+1),n(h+2))?r():45===n(h+1)&&62===n(h+2)?(g=se.CDC,h+=3):de(m,n(h+1),n(h+2))?a():(g=se.Delim,h++);break;case 46:he(m,n(h+1),n(h+2))?r():(g=se.Delim,h++);break;case 47:42===n(h+1)?(g=se.Comment,1===(h=e.indexOf(\"*/\",h+2)+2)&&(h=e.length)):(g=se.Delim,h++);break;case 58:g=se.Colon,h++;break;case 59:g=se.Semicolon,h++;break;case 60:33===n(h+1)&&45===n(h+2)&&45===n(h+3)?(g=se.CDO,h+=4):(g=se.Delim,h++);break;case 64:de(n(h+1),n(h+2),n(h+3))?(g=se.AtKeyword,h=ke(e,h+1)):(g=se.Delim,h++);break;case 91:g=se.LeftSquareBracket,h++;break;case 92:ue(m,n(h+1))?a():(g=se.Delim,h++);break;case 93:g=se.RightSquareBracket,h++;break;case 123:g=se.LeftCurlyBracket,h++;break;case 125:g=se.RightCurlyBracket,h++;break;case pe.Digit:r();break;case pe.NameStart:a();break;case pe.Eof:break;default:g=se.Delim,h++}switch(g){case d:for(d=(p=l[f=16777215&p])>>24,l[c]=f,l[f++]=c;f<c;f++)l[f]===o&&(l[f]=c);break;case se.LeftParenthesis:case se.Function:l[c]=p,p=(d=se.RightParenthesis)<<24|c;break;case se.LeftSquareBracket:l[c]=p,p=(d=se.RightSquareBracket)<<24|c;break;case se.LeftCurlyBracket:l[c]=p,p=(d=se.RightCurlyBracket)<<24|c}s[c++]=g<<24|h}for(s[c]=se.EOF<<24|h,l[c]=o,l[o]=o;0!==p;)p=l[f=16777215&p],l[f]=o;return t.source=e,t.firstCharOffset=u,t.offsetAndType=s,t.tokenCount=c,t.balance=l,t.reset(),t.next(),t}Object.keys(d).forEach((function(e){xe[e]=d[e]})),Object.keys(z).forEach((function(e){xe[e]=z[e]})),Object.keys(j).forEach((function(e){xe[e]=j[e]}));var Se=xe,Ce=Se.isDigit,Ae=Se.cmpChar,ze=Se.TYPE,Pe=ze.Delim,Le=ze.WhiteSpace,Te=ze.Comment,Ee=ze.Ident,Oe=ze.Number,De=ze.Dimension;function Re(e,t){return null!==e&&e.type===Pe&&e.value.charCodeAt(0)===t}function Ie(e,t,n){for(;null!==e&&(e.type===Le||e.type===Te);)e=n(++t);return t}function Me(e,t,n,r){if(!e)return 0;var a=e.value.charCodeAt(t);if(43===a||45===a){if(n)return 0;t++}for(;t<e.value.length;t++)if(!Ce(e.value.charCodeAt(t)))return 0;return r+1}function Ne(e,t,n){var r=!1,a=Ie(e,t,n);if(null===(e=n(a)))return t;if(e.type!==Oe){if(!Re(e,43)&&!Re(e,45))return t;if(r=!0,a=Ie(n(++a),a,n),null===(e=n(a))&&e.type!==Oe)return 0}if(!r){var i=e.value.charCodeAt(0);if(43!==i&&45!==i)return 0}return Me(e,r?0:1,r,a)}var Be=Se.isHexDigit,je=Se.cmpChar,_e=Se.TYPE,qe=_e.Ident,We=_e.Delim,Fe=_e.Number,Ue=_e.Dimension;function Ye(e,t){return null!==e&&e.type===We&&e.value.charCodeAt(0)===t}function He(e,t){return e.value.charCodeAt(0)===t}function Ve(e,t,n){for(var r=t,a=0;r<e.value.length;r++){var i=e.value.charCodeAt(r);if(45===i&&n&&0!==a)return Ve(e,t+a+1,!1)>0?6:0;if(!Be(i))return 0;if(++a>6)return 0}return a}function Ke(e,t,n){if(!e)return 0;for(;Ye(n(t),63);){if(++e>6)return 0;t++}return t}var Ge=Se.isIdentifierStart,$e=Se.isHexDigit,Qe=Se.isDigit,Xe=Se.cmpStr,Ze=Se.consumeNumber,Je=Se.TYPE,et=[\"unset\",\"initial\",\"inherit\"],tt=[\"calc(\",\"-moz-calc(\",\"-webkit-calc(\"];function nt(e,t){return t<e.length?e.charCodeAt(t):0}function rt(e,t){return Xe(e,0,e.length,t)}function at(e,t){for(var n=0;n<t.length;n++)if(rt(e,t[n]))return!0;return!1}function it(e,t){return t===e.length-2&&(92===e.charCodeAt(t)&&Qe(e.charCodeAt(t+1)))}function ot(e,t,n){if(e&&\"Range\"===e.type){var r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r))return!0;if(null!==e.min&&r<e.min)return!0;if(null!==e.max&&r>e.max)return!0}return!1}function st(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function lt(e){return function(t,n,r){return null===t?0:t.type===Je.Function&&at(t.value,tt)?st(t,n):e(t,n,r)}}function ct(e){return function(t){return null===t||t.type!==e?0:1}}function ut(e){return function(t,n,r){if(null===t||t.type!==Je.Dimension)return 0;var a=Ze(t.value,0);if(null!==e){var i=t.value.indexOf(\"\\\\\",a),o=-1!==i&&it(t.value,i)?t.value.substring(a,i):t.value.substr(a);if(!1===e.hasOwnProperty(o.toLowerCase()))return 0}return ot(r,t.value,a)?0:1}}function ht(e){return\"function\"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===Je.Number&&0===Number(t.value)?1:e(t,n,r)}}var dt,pt={\"ident-token\":ct(Je.Ident),\"function-token\":ct(Je.Function),\"at-keyword-token\":ct(Je.AtKeyword),\"hash-token\":ct(Je.Hash),\"string-token\":ct(Je.String),\"bad-string-token\":ct(Je.BadString),\"url-token\":ct(Je.Url),\"bad-url-token\":ct(Je.BadUrl),\"delim-token\":ct(Je.Delim),\"number-token\":ct(Je.Number),\"percentage-token\":ct(Je.Percentage),\"dimension-token\":ct(Je.Dimension),\"whitespace-token\":ct(Je.WhiteSpace),\"CDO-token\":ct(Je.CDO),\"CDC-token\":ct(Je.CDC),\"colon-token\":ct(Je.Colon),\"semicolon-token\":ct(Je.Semicolon),\"comma-token\":ct(Je.Comma),\"[-token\":ct(Je.LeftSquareBracket),\"]-token\":ct(Je.RightSquareBracket),\"(-token\":ct(Je.LeftParenthesis),\")-token\":ct(Je.RightParenthesis),\"{-token\":ct(Je.LeftCurlyBracket),\"}-token\":ct(Je.RightCurlyBracket),string:ct(Je.String),ident:ct(Je.Ident),\"custom-ident\":function(e){if(null===e||e.type!==Je.Ident)return 0;var t=e.value.toLowerCase();return at(t,et)||rt(t,\"default\")?0:1},\"custom-property-name\":function(e){return null===e||e.type!==Je.Ident||45!==nt(e.value,0)||45!==nt(e.value,1)?0:1},\"hex-color\":function(e){if(null===e||e.type!==Je.Hash)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n<t;n++)if(!$e(e.value.charCodeAt(n)))return 0;return 1},\"id-selector\":function(e){return null===e||e.type!==Je.Hash?0:Ge(nt(e.value,1),nt(e.value,2),nt(e.value,3))?1:0},\"an-plus-b\":function(e,t){var n=0;if(!e)return 0;if(e.type===Oe)return Me(e,0,!1,n);if(e.type===Ee&&45===e.value.charCodeAt(0)){if(!Ae(e.value,1,110))return 0;switch(e.value.length){case 2:return Ne(t(++n),n,t);case 3:return 45!==e.value.charCodeAt(2)?0:(n=Ie(t(++n),n,t),Me(e=t(n),0,!0,n));default:return 45!==e.value.charCodeAt(2)?0:Me(e,3,!0,n)}}else if(e.type===Ee||Re(e,43)&&t(n+1).type===Ee){if(e.type!==Ee&&(e=t(++n)),null===e||!Ae(e.value,0,110))return 0;switch(e.value.length){case 1:return Ne(t(++n),n,t);case 2:return 45!==e.value.charCodeAt(1)?0:(n=Ie(t(++n),n,t),Me(e=t(n),0,!0,n));default:return 45!==e.value.charCodeAt(1)?0:Me(e,2,!0,n)}}else if(e.type===De){for(var r=e.value.charCodeAt(0),a=43===r||45===r?1:0,i=a;i<e.value.length&&Ce(e.value.charCodeAt(i));i++);return i===a?0:Ae(e.value,i,110)?i+1===e.value.length?Ne(t(++n),n,t):45!==e.value.charCodeAt(i+1)?0:i+2===e.value.length?(n=Ie(t(++n),n,t),Me(e=t(n),0,!0,n)):Me(e,i+2,!0,n):0}return 0},urange:function(e,t){var n=0;if(null===e||e.type!==qe||!je(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(Ye(e,43))return null===(e=t(++n))?0:e.type===qe?Ke(Ve(e,0,!0),++n,t):Ye(e,63)?Ke(1,++n,t):0;if(e.type===Fe){if(!He(e,43))return 0;var r=Ve(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===Ue||e.type===Fe?He(e,45)&&Ve(e,1,!1)?n+1:0:Ke(r,n,t)}return e.type===Ue&&He(e,43)?Ke(Ve(e,1,!0),++n,t):0},\"declaration-value\":function(e,t){if(!e)return 0;var n=0,r=0,a=e.index;e:do{switch(e.type){case Je.BadString:case Je.BadUrl:break e;case Je.RightCurlyBracket:case Je.RightParenthesis:case Je.RightSquareBracket:if(e.balance>e.index||e.balance<a)break e;r--;break;case Je.Semicolon:if(0===r)break e;break;case Je.Delim:if(\"!\"===e.value&&0===r)break e;break;case Je.Function:case Je.LeftParenthesis:case Je.LeftSquareBracket:case Je.LeftCurlyBracket:r++}if(n++,e.balance<=a)break}while(e=t(n));return n},\"any-value\":function(e,t){if(!e)return 0;var n=e.index,r=0;e:do{switch(e.type){case Je.BadString:case Je.BadUrl:break e;case Je.RightCurlyBracket:case Je.RightParenthesis:case Je.RightSquareBracket:if(e.balance>e.index||e.balance<n)break e}if(r++,e.balance<=n)break}while(e=t(r));return r},dimension:lt(ut(null)),angle:lt(ut({deg:!0,grad:!0,rad:!0,turn:!0})),decibel:lt(ut({db:!0})),frequency:lt(ut({hz:!0,khz:!0})),flex:lt(ut({fr:!0})),length:lt(ht(ut({px:!0,mm:!0,cm:!0,in:!0,pt:!0,pc:!0,q:!0,em:!0,ex:!0,ch:!0,rem:!0,vh:!0,vw:!0,vmin:!0,vmax:!0,vm:!0}))),resolution:lt(ut({dpi:!0,dpcm:!0,dppx:!0,x:!0})),semitones:lt(ut({st:!0})),time:lt(ut({s:!0,ms:!0})),percentage:lt((function(e,t,n){return null===e||e.type!==Je.Percentage||ot(n,e.value,e.value.length-1)?0:1})),zero:ht(),number:lt((function(e,t,n){if(null===e)return 0;var r=Ze(e.value,0);return r===e.value.length||it(e.value,r)?ot(n,e.value,r)?0:1:0})),integer:lt((function(e,t,n){if(null===e||e.type!==Je.Number)return 0;for(var r=43===e.value.charCodeAt(0)||45===e.value.charCodeAt(0)?1:0;r<e.value.length;r++)if(!Qe(e.value.charCodeAt(r)))return 0;return ot(n,e.value,r)?0:1})),\"-ms-legacy-expression\":(dt=\"expression\",dt+=\"(\",function(e,t){return null!==e&&rt(e.value,dt)?st(e,t):0})},ft=function(e,t,n){var r=s(\"SyntaxError\",e);return r.input=t,r.offset=n,r.rawMessage=e,r.message=r.rawMessage+\"\\n  \"+r.input+\"\\n--\"+new Array((r.offset||r.input.length)+1).join(\"-\")+\"^\",r},mt=function(e){this.str=e,this.pos=0};mt.prototype={charCodeAt:function(e){return e<this.str.length?this.str.charCodeAt(e):0},charCode:function(){return this.charCodeAt(this.pos)},nextCharCode:function(){return this.charCodeAt(this.pos+1)},nextNonWsCode:function(e){return this.charCodeAt(this.findWsEnd(e))},findWsEnd:function(e){for(;e<this.str.length;e++){var t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e},substringToPos:function(e){return this.str.substring(this.pos,this.pos=e)},eat:function(e){this.charCode()!==e&&this.error(\"Expect `\"+String.fromCharCode(e)+\"`\"),this.pos++},peek:function(){return this.pos<this.str.length?this.str.charAt(this.pos++):\"\"},error:function(e){throw new ft(e,this.str,this.pos)}};var gt=mt,bt=function(e){for(var t=\"function\"==typeof Uint32Array?new Uint32Array(128):new Array(128),n=0;n<128;n++)t[n]=e(String.fromCharCode(n))?1:0;return t}((function(e){return/[a-zA-Z0-9\\-]/.test(e)})),yt={\" \":1,\"&&\":2,\"||\":3,\"|\":4};function kt(e){return e.substringToPos(e.findWsEnd(e.pos))}function vt(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n>=128||0===bt[n])break}return e.pos===t&&e.error(\"Expect a keyword\"),e.substringToPos(t)}function wt(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error(\"Expect a number\"),e.substringToPos(t)}function xt(e){var t=e.str.indexOf(\"'\",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error(\"Expect an apostrophe\")),e.substringToPos(t+1)}function St(e){var t,n=null;return e.eat(123),t=wt(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=wt(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function Ct(e,t){var n=function(e){var t=null,n=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,n=!0,t=123===e.charCode()?St(e):{min:1,max:0};break;case 123:t=St(e);break;default:return null}return{type:\"Multiplier\",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,n):t}function At(e){var t=e.peek();return\"\"===t?null:{type:\"Token\",value:t}}function zt(e){var t,n=null;return e.eat(60),t=vt(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+=\"()\"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(kt(e),n=function(e){var t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():t=r*Number(wt(e)),kt(e),e.eat(44),kt(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(wt(e))),e.eat(93),null===t&&null===n?null:{type:\"Range\",min:t,max:n}}(e)),e.eat(62),Ct(e,{type:\"Type\",name:t,opts:n})}function Pt(e,t){function n(e,t){return{type:\"Group\",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}for(t=Object.keys(t).sort((function(e,t){return yt[e]-yt[t]}));t.length>0;){for(var r=t.shift(),a=0,i=0;a<e.length;a++){var o=e[a];\"Combinator\"===o.type&&(o.value===r?(-1===i&&(i=a-1),e.splice(a,1),a--):(-1!==i&&a-i>1&&(e.splice(i,a-i,n(e.slice(i,a),r)),a=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,a-i,n(e.slice(i,a),r))}return r}function Lt(e){for(var t,n=[],r={},a=null,i=e.pos;t=Tt(e);)\"Spaces\"!==t.type&&(\"Combinator\"===t.type?(null!==a&&\"Combinator\"!==a.type||(e.pos=i,e.error(\"Unexpected combinator\")),r[t.value]=!0):null!==a&&\"Combinator\"!==a.type&&(r[\" \"]=!0,n.push({type:\"Combinator\",value:\" \"})),n.push(t),a=t,i=e.pos);return null!==a&&\"Combinator\"===a.type&&(e.pos-=i,e.error(\"Unexpected combinator\")),{type:\"Group\",terms:n,combinator:Pt(n,r)||\" \",disallowEmpty:!1,explicit:!1}}function Tt(e){var t=e.charCode();if(t<128&&1===bt[t])return function(e){var t;return t=vt(e),40===e.charCode()?(e.pos++,{type:\"Function\",name:t}):Ct(e,{type:\"Keyword\",name:t})}(e);switch(t){case 93:break;case 91:return Ct(e,function(e){var t;return e.eat(91),t=Lt(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){var t;return e.eat(60),e.eat(39),t=vt(e),e.eat(39),e.eat(62),Ct(e,{type:\"Property\",name:t})}(e):zt(e);case 124:return{type:\"Combinator\",value:e.substringToPos(124===e.nextCharCode()?e.pos+2:e.pos+1)};case 38:return e.pos++,e.eat(38),{type:\"Combinator\",value:\"&&\"};case 44:return e.pos++,{type:\"Comma\"};case 39:return Ct(e,{type:\"String\",value:xt(e)});case 32:case 9:case 10:case 13:case 12:return{type:\"Spaces\",value:kt(e)};case 64:return(t=e.nextCharCode())<128&&1===bt[t]?(e.pos++,{type:\"AtKeyword\",name:vt(e)}):At(e);case 42:case 43:case 63:case 35:case 33:break;case 123:if((t=e.nextCharCode())<48||t>57)return At(e);break;default:return At(e)}}function Et(e){var t=new gt(e),n=Lt(t);return t.pos!==e.length&&t.error(\"Unexpected input\"),1===n.terms.length&&\"Group\"===n.terms[0].type&&(n=n.terms[0]),n}Et(\"[a&&<b>#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!\");var Ot=Et,Dt=function(){};function Rt(e){return\"function\"==typeof e?e:Dt}var It=function(e,t,n){var r=Dt,a=Dt;if(\"function\"==typeof t?r=t:t&&(r=Rt(t.enter),a=Rt(t.leave)),r===Dt&&a===Dt)throw new Error(\"Neither `enter` nor `leave` walker handler is set or both aren't a function\");!function e(t){switch(r.call(n,t),t.type){case\"Group\":t.terms.forEach(e);break;case\"Multiplier\":e(t.term);break;case\"Type\":case\"Property\":case\"Keyword\":case\"AtKeyword\":case\"Function\":case\"String\":case\"Token\":case\"Comma\":break;default:throw new Error(\"Unknown type: \"+t.type)}a.call(n,t)}(e)},Mt=new V,Nt={decorator:function(e){var t=null,n={len:0,node:null},r=[n],a=\"\";return{children:e.children,node:function(n){var r=t;t=n,e.node.call(this,n),t=r},chunk:function(e){a+=e,n.node!==t?r.push({len:e.length,node:t}):n.len+=e.length},result:function(){return Bt(a,r)}}}};function Bt(e,t){var n=[],r=0,a=0,i=t?t[a].node:null;for(Se(e,Mt);!Mt.eof;){if(t)for(;a<t.length&&r+t[a].len<=Mt.tokenStart;)r+=t[a++].len,i=t[a].node;n.push({type:Mt.tokenType,value:Mt.getTokenValue(),index:Mt.tokenIndex,balance:Mt.balance[Mt.tokenIndex],node:i}),Mt.next()}return n}var jt={type:\"Match\"},_t={type:\"Mismatch\"},qt={type:\"DisallowEmpty\"};function Wt(e,t,n){return t===jt&&n===_t||e===jt&&t===jt&&n===jt?e:(\"If\"===e.type&&e.else===_t&&t===jt&&(t=e.then,e=e.match),{type:\"If\",match:e,then:t,else:n})}function Ft(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function Ut(e){return\"Keyword\"===e.type||\"AtKeyword\"===e.type||\"Function\"===e.type||\"Type\"===e.type&&Ft(e.name)}function Yt(e){if(\"function\"==typeof e)return{type:\"Generic\",fn:e};switch(e.type){case\"Group\":var t=function e(t,n,r){switch(t){case\" \":for(var a=jt,i=n.length-1;i>=0;i--){a=Wt(l=n[i],a,_t)}return a;case\"|\":a=_t;var o=null;for(i=n.length-1;i>=0;i--){if(Ut(l=n[i])&&(null===o&&i>0&&Ut(n[i-1])&&(a=Wt({type:\"Enum\",map:o=Object.create(null)},jt,a)),null!==o)){var s=(Ft(l.name)?l.name.slice(0,-1):l.name).toLowerCase();if(s in o==!1){o[s]=l;continue}}o=null,a=Wt(l,jt,a)}return a;case\"&&\":if(n.length>5)return{type:\"MatchOnce\",terms:n,all:!0};for(a=_t,i=n.length-1;i>=0;i--){var l=n[i];c=n.length>1?e(t,n.filter((function(e){return e!==l})),!1):jt,a=Wt(l,c,a)}return a;case\"||\":if(n.length>5)return{type:\"MatchOnce\",terms:n,all:!1};for(a=r?jt:_t,i=n.length-1;i>=0;i--){var c;l=n[i];c=n.length>1?e(t,n.filter((function(e){return e!==l})),!0):jt,a=Wt(l,c,a)}return a}}(e.combinator,e.terms.map(Yt),!1);return e.disallowEmpty&&(t=Wt(t,qt,_t)),t;case\"Multiplier\":return function(e){var t=jt,n=Yt(e.term);if(0===e.max)n=Wt(n,qt,_t),(t=Wt(n,null,_t)).then=Wt(jt,jt,t),e.comma&&(t.then.else=Wt({type:\"Comma\",syntax:e},t,_t));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==jt&&(t=Wt({type:\"Comma\",syntax:e},t,_t)),t=Wt(n,Wt(jt,jt,t),_t);if(0===e.min)t=Wt(jt,jt,t);else for(r=0;r<e.min-1;r++)e.comma&&t!==jt&&(t=Wt({type:\"Comma\",syntax:e},t,_t)),t=Wt(n,t,_t);return t}(e);case\"Type\":case\"Property\":return{type:e.type,name:e.name,syntax:e};case\"Keyword\":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case\"AtKeyword\":return{type:e.type,name:\"@\"+e.name.toLowerCase(),syntax:e};case\"Function\":return{type:e.type,name:e.name.toLowerCase()+\"(\",syntax:e};case\"String\":return 3===e.value.length?{type:\"Token\",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\\\'/g,\"'\"),syntax:e};case\"Token\":return{type:e.type,value:e.value,syntax:e};case\"Comma\":return{type:e.type,syntax:e};default:throw new Error(\"Unknown node type:\",e.type)}}var Ht=jt,Vt=_t,Kt=qt,Gt=function(e,t){return\"string\"==typeof e&&(e=Ot(e)),{type:\"MatchGraph\",match:Yt(e),syntax:t||null,source:e}},$t=Object.prototype.hasOwnProperty,Qt=Ht,Xt=Vt,Zt=Kt,Jt=d.TYPE;function en(e){for(var t=null,n=null,r=e;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}function tn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=65&&r<=90&&(r|=32),r!==t.charCodeAt(n))return!1}return!0}function nn(e){return null===e||(e.type===Jt.Comma||e.type===Jt.Function||e.type===Jt.LeftParenthesis||e.type===Jt.LeftSquareBracket||e.type===Jt.LeftCurlyBracket||e.type===Jt.Delim)}function rn(e){return null===e||(e.type===Jt.RightParenthesis||e.type===Jt.RightSquareBracket||e.type===Jt.RightCurlyBracket||e.type===Jt.Delim)}function an(e,t,n){function r(){do{b++,g=b<e.length?e[b]:null}while(null!==g&&(g.type===Jt.WhiteSpace||g.type===Jt.Comment))}function a(t){var n=b+t;return n<e.length?e[n]:null}function i(e,t){return{nextState:e,matchStack:k,syntaxStack:u,thenStack:h,tokenIndex:b,prev:t}}function o(e){h={nextState:e,matchStack:k,syntaxStack:u,prev:h}}function s(e){d=i(e,d)}function l(){k={type:1,syntax:t.syntax,token:g,prev:k},r(),p=null,b>y&&(y=b)}function c(){k=2===k.type?k.prev:{type:3,syntax:u.syntax,token:k.token,prev:k},u=u.prev}var u=null,h=null,d=null,p=null,f=0,m=null,g=null,b=-1,y=0,k={type:0,syntax:null,token:null,prev:null};for(r();null===m&&++f<15e3;)switch(t.type){case\"Match\":if(null===h){if(null!==g&&(b!==e.length-1||\"\\\\0\"!==g.value&&\"\\\\9\"!==g.value)){t=Xt;break}m=\"Match\";break}if((t=h.nextState)===Zt){if(h.matchStack===k){t=Xt;break}t=Qt}for(;h.syntaxStack!==u;)c();h=h.prev;break;case\"Mismatch\":if(null!==p&&!1!==p)(null===d||b>d.tokenIndex)&&(d=p,p=!1);else if(null===d){m=\"Mismatch\";break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,b=d.tokenIndex,g=b<e.length?e[b]:null,d=d.prev;break;case\"MatchGraph\":t=t.match;break;case\"If\":t.else!==Xt&&s(t.else),t.then!==Qt&&o(t.then),t=t.match;break;case\"MatchOnce\":t={type:\"MatchOnceBuffer\",syntax:t,index:0,mask:0};break;case\"MatchOnceBuffer\":var v=t.syntax.terms;if(t.index===v.length){if(0===t.mask||t.syntax.all){t=Xt;break}t=Qt;break}if(t.mask===(1<<v.length)-1){t=Qt;break}for(;t.index<v.length;t.index++){var w=1<<t.index;if(0==(t.mask&w)){s(t),o({type:\"AddMatchOnce\",syntax:t.syntax,mask:t.mask|w}),t=v[t.index++];break}}break;case\"AddMatchOnce\":t={type:\"MatchOnceBuffer\",syntax:t.syntax,index:0,mask:t.mask};break;case\"Enum\":if(null!==g)if(-1!==(z=g.value.toLowerCase()).indexOf(\"\\\\\")&&(z=z.replace(/\\\\[09].*$/,\"\")),$t.call(t.map,z)){t=t.map[z];break}t=Xt;break;case\"Generic\":var x=null!==u?u.opts:null,S=b+Math.floor(t.fn(g,a,x));if(!isNaN(S)&&S>b){for(;b<S;)l();t=Qt}else t=Xt;break;case\"Type\":case\"Property\":var C=\"Type\"===t.type?\"types\":\"properties\",A=$t.call(n,C)?n[C][t.name]:null;if(!A||!A.match)throw new Error(\"Bad syntax reference: \"+(\"Type\"===t.type?\"<\"+t.name+\">\":\"<'\"+t.name+\"'>\"));if(!1!==p&&null!==g&&\"Type\"===t.type)if(\"custom-ident\"===t.name&&g.type===Jt.Ident||\"length\"===t.name&&\"0\"===g.value){null===p&&(p=i(t,d)),t=Xt;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:2,syntax:t.syntax,token:k.token,prev:k},t=A.match;break;case\"Keyword\":var z=t.name;if(null!==g){var P=g.value;if(-1!==P.indexOf(\"\\\\\")&&(P=P.replace(/\\\\[09].*$/,\"\")),tn(P,z)){l(),t=Qt;break}}t=Xt;break;case\"AtKeyword\":case\"Function\":if(null!==g&&tn(g.value,t.name)){l(),t=Qt;break}t=Xt;break;case\"Token\":if(null!==g&&g.value===t.value){l(),t=Qt;break}t=Xt;break;case\"Comma\":null!==g&&g.type===Jt.Comma?nn(k.token)?t=Xt:(l(),t=rn(g)?Xt:Qt):t=nn(k.token)||rn(g)?Qt:Xt;break;case\"String\":var L=\"\";for(S=b;S<e.length&&L.length<t.value.length;S++)L+=e[S].value;if(tn(L,t.value)){for(;b<S;)l();t=Qt}else t=Xt;break;default:throw new Error(\"Unknown node type: \"+t.type)}switch(f,m){case null:console.warn(\"[csstree-match] BREAK after 15000 iterations\"),m=\"Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)\",k=null;break;case\"Match\":for(;null!==u;)c();break;default:k=null}return{tokens:e,reason:m,iterations:f,match:k,longestMatch:y}}var on=function(e,t,n){var r=an(e,t,n||{});if(null===r.match)return r;var a=r.match,i=r.match={syntax:t.syntax||null,match:[]},o=[i];for(a=en(a).prev;null!==a;){switch(a.type){case 2:i.match.push(i={syntax:a.syntax,match:[]}),o.push(i);break;case 3:o.pop(),i=o[o.length-1];break;default:i.match.push({syntax:a.syntax||null,token:a.token.value,node:a.token.node})}a=a.prev}return r};function sn(e){function t(e){return null!==e&&(\"Type\"===e.type||\"Property\"===e.type||\"Keyword\"===e.type)}var n=null;return null!==this.matched&&function r(a){if(Array.isArray(a.match)){for(var i=0;i<a.match.length;i++)if(r(a.match[i]))return t(a.syntax)&&n.unshift(a.syntax),!0}else if(a.node===e)return n=t(a.syntax)?[a.syntax]:[],!0;return!1}(this.matched),n}function ln(e,t,n){var r=sn.call(e,t);return null!==r&&r.some(n)}var cn={getTrace:sn,isType:function(e,t){return ln(this,e,(function(e){return\"Type\"===e.type&&e.name===t}))},isProperty:function(e,t){return ln(this,e,(function(e){return\"Property\"===e.type&&e.name===t}))},isKeyword:function(e){return ln(this,e,(function(e){return\"Keyword\"===e.type}))}};var un={matchFragments:function(e,t,n,r,a){var i=[];return null!==n.matched&&function n(s){if(null!==s.syntax&&s.syntax.type===r&&s.syntax.name===a){var l=function e(t){return\"node\"in t?t.node:e(t.match[0])}(s),c=function e(t){return\"node\"in t?t.node:e(t.match[t.match.length-1])}(s);e.syntax.walk(t,(function(e,t,n){if(e===l){var r=new o;do{if(r.appendData(t.data),t.data===c)break;t=t.next}while(null!==t);i.push({parent:n,nodes:r})}}))}Array.isArray(s.match)&&s.match.forEach(n)}(n.matched),i}},hn=Object.prototype.hasOwnProperty;function dn(e){return\"number\"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function pn(e){return Boolean(e)&&dn(e.offset)&&dn(e.line)&&dn(e.column)}function fn(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,\"Type of node should be an Object\");for(var a in n){var i=!0;if(!1!==hn.call(n,a)){if(\"type\"===a)n.type!==e&&r(n,\"Wrong node type `\"+n.type+\"`, expected `\"+e+\"`\");else if(\"loc\"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if(\"string\"!=typeof n.loc.source)a+=\".source\";else if(pn(n.loc.start)){if(pn(n.loc.end))continue;a+=\".end\"}else a+=\".start\";i=!1}else if(t.hasOwnProperty(a)){var s=0;for(i=!1;!i&&s<t[a].length;s++){var l=t[a][s];switch(l){case String:i=\"string\"==typeof n[a];break;case Boolean:i=\"boolean\"==typeof n[a];break;case null:i=null===n[a];break;default:\"string\"==typeof l?i=n[a]&&n[a].type===l:Array.isArray(l)&&(i=n[a]instanceof o)}}}else r(n,\"Unknown field `\"+a+\"` for \"+e+\" node type\");i||r(n,\"Bad value for `\"+e+\".\"+a+\"`\")}}for(var a in t)hn.call(t,a)&&!1===hn.call(n,a)&&r(n,\"Field `\"+e+\".\"+a+\"` is missed\")}}function mn(e,t){var n=t.structure,r={type:String,loc:!0},a={type:'\"'+e+'\"'};for(var i in n)if(!1!==hn.call(n,i)){for(var o=[],s=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]],l=0;l<s.length;l++){var c=s[l];if(c===String||c===Boolean)o.push(c.name);else if(null===c)o.push(\"null\");else if(\"string\"==typeof c)o.push(\"<\"+c+\">\");else{if(!Array.isArray(c))throw new Error(\"Wrong value `\"+c+\"` in `\"+e+\".\"+i+\"` structure definition\");o.push(\"List\")}}a[i]=o.join(\" | \")}return{docs:a,check:fn(e,r)}}var gn=X,bn=Z,yn=Gt,kn=on,vn=function(e){var t={};if(e.node)for(var n in e.node)if(hn.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error(\"Missed `structure` field in `\"+n+\"` node type definition\");t[n]=mn(n,r)}return t},wn=yn(\"inherit | initial | unset\"),xn=yn(\"inherit | initial | unset | <-ms-legacy-expression>\");function Sn(e,t,n){var r={};for(var a in e)e[a].syntax&&(r[a]=n?e[a].syntax:$(e[a].syntax,{compact:t}));return r}function Cn(e,t,n){return{matched:e,iterations:n,error:t,getTrace:cn.getTrace,isType:cn.isType,isProperty:cn.isProperty,isKeyword:cn.isKeyword}}function An(e,t,n,r){var a,i=function(e,t){return\"string\"==typeof e?Bt(e,null):t.generate(e,Nt)}(n,e.syntax);return function(e){for(var t=0;t<e.length;t++)if(\"var(\"===e[t].value.toLowerCase())return!0;return!1}(i)?Cn(null,new Error(\"Matching for a tree with var() is not supported\")):(r&&(a=kn(i,e.valueCommonSyntax,e)),r&&a.match||(a=kn(i,t.match,e)).match?Cn(a.match,null,a.iterations):Cn(null,new bn(a.reason,t.syntax,n,a),a.iterations))}var zn=function(e,t,n){if(this.valueCommonSyntax=wn,this.syntax=t,this.generic=!1,this.atrules={},this.properties={},this.types={},this.structure=n||vn(e),e){if(e.types)for(var r in e.types)this.addType_(r,e.types[r]);if(e.generic)for(var r in this.generic=!0,pt)this.addType_(r,pt[r]);if(e.atrules)for(var r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(var r in e.properties)this.addProperty_(r,e.properties[r])}};zn.prototype={structure:{},checkStructure:function(e){function t(e,t){r.push({node:e,message:t})}var n=this.structure,r=[];return this.syntax.walk(e,(function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,\"Unknown node type `\"+e.type+\"`\")})),!!r.length&&r},createDescriptor:function(e,t,n){var r={type:t,name:n},a={type:t,name:n,syntax:null,match:null};return\"function\"==typeof e?a.match=yn(e,r):(\"string\"==typeof e?Object.defineProperty(a,\"syntax\",{get:function(){return Object.defineProperty(a,\"syntax\",{value:Ot(e)}),a.syntax}}):a.syntax=e,Object.defineProperty(a,\"match\",{get:function(){return Object.defineProperty(a,\"match\",{value:yn(a.syntax,r)}),a.match}})),a},addAtrule_:function(e,t){this.atrules[e]={prelude:t.prelude?this.createDescriptor(t.prelude,\"AtrulePrelude\",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((e,n)=>(e[n]=this.createDescriptor(t.descriptors[n],\"AtruleDescriptor\",n),e),{}):null}},addProperty_:function(e,t){this.properties[e]=this.createDescriptor(t,\"Property\",e)},addType_:function(e,t){this.types[e]=this.createDescriptor(t,\"Type\",e),t===pt[\"-ms-legacy-expression\"]&&(this.valueCommonSyntax=xn)},matchAtrulePrelude:function(e,t){var n=ae.keyword(e),r=n.vendor?this.getAtrulePrelude(n.name)||this.getAtrulePrelude(n.basename):this.getAtrulePrelude(n.name);return r?An(this,r,t,!0):n.basename in this.atrules?Cn(null,new Error(\"At-rule `\"+e+\"` should not contain a prelude\")):Cn(null,new gn(\"Unknown at-rule\",e))},matchAtruleDescriptor:function(e,t,n){var r=ae.keyword(e),a=ae.keyword(t),i=r.vendor?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name];if(!i)return Cn(null,new gn(\"Unknown at-rule\",e));if(!i.descriptors)return Cn(null,new Error(\"At-rule `\"+e+\"` has no known descriptors\"));var o=a.vendor?i.descriptors[a.name]||i.descriptors[a.basename]:i.descriptors[a.name];return o?An(this,o,n,!0):Cn(null,new gn(\"Unknown at-rule descriptor\",t))},matchDeclaration:function(e){return\"Declaration\"!==e.type?Cn(null,new Error(\"Not a Declaration node\")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=ae.property(e);if(n.custom)return Cn(null,new Error(\"Lexer matching doesn't applicable for custom properties\"));var r=n.vendor?this.getProperty(n.name)||this.getProperty(n.basename):this.getProperty(n.name);return r?An(this,r,t,!0):Cn(null,new gn(\"Unknown property\",e))},matchType:function(e,t){var n=this.getType(e);return n?An(this,n,t,!1):Cn(null,new gn(\"Unknown type\",e))},match:function(e,t){return\"string\"==typeof e||e&&e.type?(\"string\"!=typeof e&&e.match||(e=this.createDescriptor(e,\"Type\",\"anonymous\")),An(this,e,t,!1)):Cn(null,new gn(\"Bad syntax\"))},findValueFragments:function(e,t,n,r){return un.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return un.matchFragments(this,e.value,this.matchDeclaration(e),t,n)},findAllFragments:function(e,t,n){var r=[];return this.syntax.walk(e,{visit:\"Declaration\",enter:function(e){r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}.bind(this)}),r},getAtrulePrelude:function(e){return this.atrules.hasOwnProperty(e)?this.atrules[e].prelude:null},getAtruleDescriptor:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null},getProperty:function(e){return this.properties.hasOwnProperty(e)?this.properties[e]:null},getType:function(e){return this.types.hasOwnProperty(e)?this.types[e]:null},validate:function(){function e(r,a,i,o){if(i.hasOwnProperty(a))return i[a];i[a]=!1,null!==o.syntax&&It(o.syntax,(function(o){if(\"Type\"===o.type||\"Property\"===o.type){var s=\"Type\"===o.type?r.types:r.properties,l=\"Type\"===o.type?t:n;s.hasOwnProperty(o.name)&&!e(r,o.name,l,s[o.name])||(i[a]=!0)}}),this)}var t={},n={};for(var r in this.types)e(this,r,t,this.types[r]);for(var r in this.properties)e(this,r,n,this.properties[r]);return t=Object.keys(t).filter((function(e){return t[e]})),n=Object.keys(n).filter((function(e){return n[e]})),t.length||n.length?{types:t,properties:n}:null},dump:function(e,t){return{generic:this.generic,types:Sn(this.types,!t,e),properties:Sn(this.properties,!t,e)}},toString:function(){return JSON.stringify(this.dump())}};var Pn=zn,Ln={SyntaxError:ft,parse:Ot,generate:$,walk:It},Tn=Se.isBOM;var En=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1};En.prototype={setSource:function(e,t,n,r){this.source=e,this.startOffset=void 0===t?0:t,this.startLine=void 0===n?1:n,this.startColumn=void 0===r?1:r,this.linesAndColumnsComputed=!1},ensureLinesAndColumnsComputed:function(){this.linesAndColumnsComputed||(!function(e,t){for(var n=t.length,r=oe(e.lines,n),a=e.startLine,i=oe(e.columns,n),o=e.startColumn,s=t.length>0?Tn(t.charCodeAt(0)):0;s<n;s++){var l=t.charCodeAt(s);r[s]=a,i[s]=o++,10!==l&&13!==l&&12!==l||(13===l&&s+1<n&&10===t.charCodeAt(s+1)&&(r[++s]=a,i[s]=o),a++,o=1)}r[s]=a,i[s]=o,e.lines=r,e.columns=i}(this,this.source),this.linesAndColumnsComputed=!0)},getLocation:function(e,t){return this.ensureLinesAndColumnsComputed(),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}},getLocationRange:function(e,t,n){return this.ensureLinesAndColumnsComputed(),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}};var On=En,Dn=Se.TYPE,Rn=Dn.WhiteSpace,In=Dn.Comment,Mn=function(e){var t=this.createList(),n=null,r={recognizer:e,space:null,ignoreWS:!1,ignoreWSAfter:!1};for(this.scanner.skipSC();!this.scanner.eof;){switch(this.scanner.tokenType){case In:this.scanner.next();continue;case Rn:r.ignoreWS?this.scanner.next():r.space=this.WhiteSpace();continue}if(void 0===(n=e.getNode.call(this,r)))break;null!==r.space&&(t.push(r.space),r.space=null),t.push(n),r.ignoreWSAfter?(r.ignoreWSAfter=!1,r.ignoreWS=!0):r.ignoreWS=!1}return t},Nn=j.findWhiteSpaceStart,Bn=function(){},jn=d.TYPE,_n=d.NAME,qn=jn.WhiteSpace,Wn=jn.Ident,Fn=jn.Function,Un=jn.Url,Yn=jn.Hash,Hn=jn.Percentage,Vn=jn.Number;function Kn(e){return function(){return this[e]()}}var Gn=function(e){var t={scanner:new V,locationMap:new On,filename:\"<unknown>\",needPositions:!1,onParseError:Bn,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Mn,createList:function(){return new o},createSingleNodeList:function(e){return(new o).appendData(e)},getFirstListNode:function(e){return e&&e.first()},getLastListNode:function(e){return e.last()},parseWithFallback:function(e,t){var n=this.scanner.tokenIndex;try{return e.call(this)}catch(e){if(this.onParseErrorThrow)throw e;var r=t.call(this,n);return this.onParseErrorThrow=!0,this.onParseError(e,r),this.onParseErrorThrow=!1,r}},lookupNonWSType:function(e){do{var t=this.scanner.lookupType(e++);if(t!==qn)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=_n[e]+\" is expected\";switch(e){case Wn:this.scanner.tokenType===Fn||this.scanner.tokenType===Un?(t=this.scanner.tokenEnd-1,n=\"Identifier is expected but function found\"):n=\"Identifier is expected\";break;case Yn:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n=\"Name is expected\");break;case Hn:this.scanner.tokenType===Vn&&(t=this.scanner.tokenEnd,n=\"Percent sign is expected\");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===e&&(t+=1)}this.error(n,t)}this.scanner.next()},consume:function(e){var t=this.scanner.getTokenValue();return this.eat(e),t},consumeFunctionName:function(){var e=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(Fn),e},getLocation:function(e,t){return this.needPositions?this.locationMap.getLocationRange(e,t,this.filename):null},getLocationFromList:function(e){if(this.needPositions){var t=this.getFirstListNode(e),n=this.getLastListNode(e);return this.locationMap.getLocationRange(null!==t?t.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==n?n.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(e,t){var n=void 0!==t&&t<this.scanner.source.length?this.locationMap.getLocation(t):this.scanner.eof?this.locationMap.getLocation(Nn(this.scanner.source,this.scanner.source.length-1)):this.locationMap.getLocation(this.scanner.tokenStart);throw new c(e||\"Unexpected input\",this.scanner.source,n.offset,n.line,n.column)}};for(var n in e=function(e){var t={context:{},scope:{},atrule:{},pseudo:{}};if(e.parseContext)for(var n in e.parseContext)switch(typeof e.parseContext[n]){case\"function\":t.context[n]=e.parseContext[n];break;case\"string\":t.context[n]=Kn(e.parseContext[n])}if(e.scope)for(var n in e.scope)t.scope[n]=e.scope[n];if(e.atrule)for(var n in e.atrule){var r=e.atrule[n];r.parse&&(t.atrule[n]=r.parse)}if(e.pseudo)for(var n in e.pseudo){var a=e.pseudo[n];a.parse&&(t.pseudo[n]=a.parse)}if(e.node)for(var n in e.node)t[n]=e.node[n].parse;return t}(e||{}))t[n]=e[n];return function(e,n){var r,a=(n=n||{}).context||\"default\";if(Se(e,t.scanner),t.locationMap.setSource(e,n.offset,n.line,n.column),t.filename=n.filename||\"<unknown>\",t.needPositions=Boolean(n.positions),t.onParseError=\"function\"==typeof n.onParseError?n.onParseError:Bn,t.onParseErrorThrow=!1,t.parseAtrulePrelude=!(\"parseAtrulePrelude\"in n)||Boolean(n.parseAtrulePrelude),t.parseRulePrelude=!(\"parseRulePrelude\"in n)||Boolean(n.parseRulePrelude),t.parseValue=!(\"parseValue\"in n)||Boolean(n.parseValue),t.parseCustomProperty=\"parseCustomProperty\"in n&&Boolean(n.parseCustomProperty),!t.context.hasOwnProperty(a))throw new Error(\"Unknown context `\"+a+\"`\");return r=t.context[a].call(t,n),t.scanner.eof||t.error(),r}},$n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\"),Qn=function(e){if(0<=e&&e<$n.length)return $n[e];throw new TypeError(\"Must be between 0 and 63: \"+e)};var Xn=function(e){var t,n=\"\",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&r,(r>>>=5)>0&&(t|=32),n+=Qn(t)}while(r>0);return n};function Zn(e){return e&&e.default||e}var Jn=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('\"'+t+'\" is a required argument.')};var n=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function a(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t=\"\";return e.scheme&&(t+=e.scheme+\":\"),t+=\"//\",e.auth&&(t+=e.auth+\"@\"),e.host&&(t+=e.host),e.port&&(t+=\":\"+e.port),e.path&&(t+=e.path),t}function o(e){var n=e,r=a(e);if(r){if(!r.path)return e;n=r.path}for(var o,s=t.isAbsolute(n),l=n.split(/\\/+/),c=0,u=l.length-1;u>=0;u--)\".\"===(o=l[u])?l.splice(u,1):\"..\"===o?c++:c>0&&(\"\"===o?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return\"\"===(n=l.join(\"/\"))&&(n=s?\"/\":\".\"),r?(r.path=n,i(r)):n}function s(e,t){\"\"===e&&(e=\".\"),\"\"===t&&(t=\".\");var n=a(t),s=a(e);if(s&&(e=s.path||\"/\"),n&&!n.scheme)return s&&(n.scheme=s.scheme),i(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var l=\"/\"===t.charAt(0)?t:o(e.replace(/\\/+$/,\"\")+\"/\"+t);return s?(s.path=l,i(s)):l}t.urlParse=a,t.urlGenerate=i,t.normalize=o,t.join=s,t.isAbsolute=function(e){return\"/\"===e.charAt(0)||n.test(e)},t.relative=function(e,t){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var n=0;0!==t.indexOf(e+\"/\");){var r=e.lastIndexOf(\"/\");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\\/]+:\\/)?\\/*$/))return t;++n}return Array(n+1).join(\"../\")+t.substr(e.length+1)};var l=!(\"__proto__\"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function h(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?\"$\"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=h(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=h(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=h(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:h(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\\)]}'[^\\n]*\\n/,\"\"))},t.computeSourceURL=function(e,t,n){if(t=t||\"\",e&&(\"/\"!==e[e.length-1]&&\"/\"!==t[0]&&(e+=\"/\"),t=e+t),n){var r=a(n);if(!r)throw new Error(\"sourceMapURL could not be parsed\");if(r.path){var l=r.path.lastIndexOf(\"/\");l>=0&&(r.path=r.path.substring(0,l+1))}t=s(i(r),t)}return o(t)}})),er=(Jn.getArg,Jn.urlParse,Jn.urlGenerate,Jn.normalize,Jn.join,Jn.isAbsolute,Jn.relative,Jn.toSetString,Jn.fromSetString,Jn.compareByOriginalPositions,Jn.compareByGeneratedPositionsDeflated,Jn.compareByGeneratedPositionsInflated,Jn.parseSourceMapInput,Jn.computeSourceURL,Object.prototype.hasOwnProperty),tr=\"undefined\"!=typeof Map;function nr(){this._array=[],this._set=tr?new Map:Object.create(null)}nr.fromArray=function(e,t){for(var n=new nr,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},nr.prototype.size=function(){return tr?this._set.size:Object.getOwnPropertyNames(this._set).length},nr.prototype.add=function(e,t){var n=tr?e:Jn.toSetString(e),r=tr?this.has(e):er.call(this._set,n),a=this._array.length;r&&!t||this._array.push(e),r||(tr?this._set.set(e,a):this._set[n]=a)},nr.prototype.has=function(e){if(tr)return this._set.has(e);var t=Jn.toSetString(e);return er.call(this._set,t)},nr.prototype.indexOf=function(e){if(tr){var t=this._set.get(e);if(t>=0)return t}else{var n=Jn.toSetString(e);if(er.call(this._set,n))return this._set[n]}throw new Error('\"'+e+'\" is not in the set.')},nr.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error(\"No element indexed by \"+e)},nr.prototype.toArray=function(){return this._array.slice()};var rr={ArraySet:nr};function ar(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ar.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},ar.prototype.add=function(e){var t,n,r,a,i,o;t=this._last,n=e,r=t.generatedLine,a=n.generatedLine,i=t.generatedColumn,o=n.generatedColumn,a>r||a==r&&o>=i||Jn.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},ar.prototype.toArray=function(){return this._sorted||(this._array.sort(Jn.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var ir=rr.ArraySet,or={MappingList:ar}.MappingList;function sr(e){e||(e={}),this._file=Jn.getArg(e,\"file\",null),this._sourceRoot=Jn.getArg(e,\"sourceRoot\",null),this._skipValidation=Jn.getArg(e,\"skipValidation\",!1),this._sources=new ir,this._names=new ir,this._mappings=new or,this._sourcesContents=null}sr.prototype._version=3,sr.fromSourceMap=function(e){var t=e.sourceRoot,n=new sr({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=Jn.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var a=r;null!==t&&(a=Jn.relative(t,r)),n._sources.has(a)||n._sources.add(a);var i=e.sourceContentFor(r);null!=i&&n.setSourceContent(r,i)})),n},sr.prototype.addMapping=function(e){var t=Jn.getArg(e,\"generated\"),n=Jn.getArg(e,\"original\",null),r=Jn.getArg(e,\"source\",null),a=Jn.getArg(e,\"name\",null);this._skipValidation||this._validateMapping(t,n,r,a),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:a})},sr.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=Jn.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Jn.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[Jn.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},sr.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\\'s \"file\" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=Jn.relative(a,r));var i=new ir,o=new ir;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=n&&(t.source=Jn.join(n,t.source)),null!=a&&(t.source=Jn.relative(a,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var l=t.source;null==l||i.has(l)||i.add(l);var c=t.name;null==c||o.has(c)||o.add(c)}),this),this._sources=i,this._names=o,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=Jn.join(n,t)),null!=a&&(t=Jn.relative(a,t)),this.setSourceContent(t,r))}),this)},sr.prototype._validateMapping=function(e,t,n,r){if(t&&\"number\"!=typeof t.line&&\"number\"!=typeof t.column)throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if((!(e&&\"line\"in e&&\"column\"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&\"line\"in e&&\"column\"in e&&t&&\"line\"in t&&\"column\"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error(\"Invalid mapping: \"+JSON.stringify({generated:e,source:n,original:t,name:r}))},sr.prototype._serializeMappings=function(){for(var e,t,n,r,a=0,i=1,o=0,s=0,l=0,c=0,u=\"\",h=this._mappings.toArray(),d=0,p=h.length;d<p;d++){if(e=\"\",(t=h[d]).generatedLine!==i)for(a=0;t.generatedLine!==i;)e+=\";\",i++;else if(d>0){if(!Jn.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=\",\"}e+=Xn(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=Xn(r-c),c=r,e+=Xn(t.originalLine-1-s),s=t.originalLine-1,e+=Xn(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=Xn(n-l),l=n)),u+=e}return u},sr.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=Jn.relative(t,e));var n=Jn.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},sr.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},sr.prototype.toString=function(){return JSON.stringify(this.toJSON())};var lr={SourceMapGenerator:sr}.SourceMapGenerator,cr={Atrule:!0,Selector:!0,Declaration:!0},ur=Object.prototype.hasOwnProperty;function hr(e,t){var n=e.children,r=null;\"function\"!=typeof t?n.forEach(this.node,this):n.forEach((function(e){null!==r&&t.call(this,r),this.node(e),r=e}),this)}var dr=function(e){function t(e){if(!ur.call(n,e.type))throw new Error(\"Unknown node type: \"+e.type);n[e.type].call(this,e)}var n={};if(e.node)for(var r in e.node)n[r]=e.node[r].generate;return function(e,n){var r=\"\",a={children:hr,node:t,chunk:function(e){r+=e},result:function(){return r}};return n&&(\"function\"==typeof n.decorator&&(a=n.decorator(a)),n.sourceMap&&(a=function(e){var t=new lr,n=1,r=0,a={line:1,column:0},i={line:0,column:0},o=!1,s={line:1,column:0},l={generated:s},c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&cr.hasOwnProperty(e.type)){var u=e.loc.start.line,h=e.loc.start.column-1;i.line===u&&i.column===h||(i.line=u,i.column=h,a.line=n,a.column=r,o&&(o=!1,a.line===s.line&&a.column===s.column||t.addMapping(l)),o=!0,t.addMapping({source:e.loc.source,original:i,generated:a}))}c.call(this,e),o&&cr.hasOwnProperty(e.type)&&(s.line=n,s.column=r)};var u=e.chunk;e.chunk=function(e){for(var t=0;t<e.length;t++)10===e.charCodeAt(t)?(n++,r=0):r++;u(e)};var h=e.result;return e.result=function(){return o&&t.addMapping(l),{css:h(),map:t}},e}(a))),a.node(e),a.result()}},pr=Object.prototype.hasOwnProperty,fr=function(){};function mr(e){return\"function\"==typeof e?e:fr}function gr(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function br(e,t){var n=t.structure,r=[];for(var a in n)if(!1!==pr.call(n,a)){var i=n[a],o={name:a,type:!1,nullable:!1};Array.isArray(n[a])||(i=[n[a]]);for(var s=0;s<i.length;s++){var l=i[s];null===l?o.nullable=!0:\"string\"==typeof l?o.type=\"node\":Array.isArray(l)&&(o.type=\"list\")}o.type&&r.push(o)}return r.length?{context:t.walkContext,fields:r}:null}function yr(e,t){var n=e.fields.slice(),r=e.context,a=\"string\"==typeof r;return t&&n.reverse(),function(e,i,o){var s;a&&(s=i[r],i[r]=e);for(var l=0;l<n.length;l++){var c=n[l],u=e[c.name];c.nullable&&!u||(\"list\"===c.type?t?u.forEachRight(o):u.forEach(o):o(u))}a&&(i[r]=s)}}function kr(e){return{Atrule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Rule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Declaration:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block,DeclarationList:e.DeclarationList}}}var vr=function(e){var t=function(e){var t={};for(var n in e.node)if(pr.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error(\"Missed `structure` field in `\"+n+\"` node type definition\");t[n]=br(0,r)}return t}(e),n={},r={};for(var a in t)pr.call(t,a)&&null!==t[a]&&(n[a]=yr(t[a],!1),r[a]=yr(t[a],!0));var i=kr(n),o=kr(r),s=function(e,a){var s=fr,l=fr,c=n,u={root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(\"function\"==typeof a)s=a;else if(a&&(s=mr(a.enter),l=mr(a.leave),a.reverse&&(c=r),a.visit)){if(i.hasOwnProperty(a.visit))c=a.reverse?o[a.visit]:i[a.visit];else if(!t.hasOwnProperty(a.visit))throw new Error(\"Bad value `\"+a.visit+\"` for `visit` option (should be: \"+Object.keys(t).join(\", \")+\")\");s=gr(s,a.visit),l=gr(l,a.visit)}if(s===fr&&l===fr)throw new Error(\"Neither `enter` nor `leave` walker handler is set or both aren't a function\");if(a.reverse){var h=s;s=l,l=h}!function e(t,n,r){s.call(u,t,n,r),c.hasOwnProperty(t.type)&&c[t.type](t,u,e),l.call(u,t,n,r)}(e)};return s.find=function(e,t){var n=null;return s(e,(function(e,r,a){null===n&&t.call(this,e,r,a)&&(n=e)})),n},s.findLast=function(e,t){var n=null;return s(e,{reverse:!0,enter:function(e,r,a){null===n&&t.call(this,e,r,a)&&(n=e)}}),n},s.findAll=function(e,t){var n=[];return s(e,(function(e,r,a){t.call(this,e,r,a)&&n.push(e)})),n},s},wr=function e(t){var n={};for(var r in t){var a=t[r];a&&(Array.isArray(a)||a instanceof o?a=a.map(e):a.constructor===Object&&(a=e(a))),n[r]=a}return n},xr=Object.prototype.hasOwnProperty,Sr={generic:!0,types:{},atrules:{},properties:{},parseContext:{},scope:{},atrule:[\"parse\"],pseudo:[\"parse\"],node:[\"name\",\"structure\",\"parse\",\"generate\",\"walkContext\"]};function Cr(e){return e&&e.constructor===Object}function Ar(e){return Cr(e)?Object.assign({},e):e}function zr(e,t){for(var n in t)xr.call(t,n)&&(Cr(e[n])?zr(e[n],Ar(t[n])):e[n]=Ar(t[n]))}var Pr=function(e,t){return function e(t,n,r){for(var a in r)if(!1!==xr.call(r,a))if(!0===r[a])a in n&&xr.call(n,a)&&(t[a]=Ar(n[a]));else if(r[a]){if(Cr(r[a]))zr(i={},t[a]),zr(i,n[a]),t[a]=i;else if(Array.isArray(r[a])){var i={},o=r[a].reduce((function(e,t){return e[t]=!0,e}),{});for(var s in t[a])xr.call(t[a],s)&&(i[s]={},t[a]&&t[a][s]&&e(i[s],t[a][s],o));for(var s in n[a])xr.call(n[a],s)&&(i[s]||(i[s]={}),n[a]&&n[a][s]&&e(i[s],n[a][s],o));t[a]=i}}return t}(e,t,Sr)};function Lr(e){var t=Gn(e),n=vr(e),r=dr(e),a=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof o==!1&&(e.children=(new o).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof o&&(e.children=e.children.toArray())}}),t}}}(n),i={List:o,SyntaxError:c,TokenStream:V,Lexer:Pn,vendorPrefix:ae.vendorPrefix,keyword:ae.keyword,property:ae.property,isCustomProperty:ae.isCustomProperty,definitionSyntax:Ln,lexer:null,createLexer:function(e){return new Pn(e,i,i.lexer.structure)},tokenize:Se,parse:t,walk:n,generate:r,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:wr,fromPlainObject:a.fromPlainObject,toPlainObject:a.toPlainObject,createSyntax:function(e){return Lr(Pr({},e))},fork:function(t){var n=Pr({},e);return Lr(\"function\"==typeof t?t(n,Object.assign):Pr(n,t))}};return i.lexer=new Pn({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},i),i}var Tr=function(e){return Lr(Pr({},e))},Er={\"absolute-size\":\"xx-small|x-small|small|medium|large|x-large|xx-large\",\"alpha-value\":\"<number>|<percentage>\",\"angle-percentage\":\"<angle>|<percentage>\",\"angular-color-hint\":\"<angle-percentage>\",\"angular-color-stop\":\"<color>&&<color-stop-angle>?\",\"angular-color-stop-list\":\"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>\",\"animateable-feature\":\"scroll-position|contents|<custom-ident>\",attachment:\"scroll|fixed|local\",\"attr()\":\"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )\",\"attr-matcher\":\"['~'|'|'|'^'|'$'|'*']? '='\",\"attr-modifier\":\"i|s\",\"attribute-selector\":\"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'\",\"auto-repeat\":\"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )\",\"auto-track-list\":\"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?\",\"baseline-position\":\"[first|last]? baseline\",\"basic-shape\":\"<inset()>|<circle()>|<ellipse()>|<polygon()>\",\"bg-image\":\"none|<image>\",\"bg-layer\":\"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>\",\"bg-position\":\"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]\",\"bg-size\":\"[<length-percentage>|auto]{1,2}|cover|contain\",\"blur()\":\"blur( <length> )\",\"blend-mode\":\"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity\",box:\"border-box|padding-box|content-box\",\"brightness()\":\"brightness( <number-percentage> )\",\"calc()\":\"calc( <calc-sum> )\",\"calc-sum\":\"<calc-product> [['+'|'-'] <calc-product>]*\",\"calc-product\":\"<calc-value> ['*' <calc-value>|'/' <number>]*\",\"calc-value\":\"<number>|<dimension>|<percentage>|( <calc-sum> )\",\"cf-final-image\":\"<image>|<color>\",\"cf-mixing-image\":\"<percentage>?&&<image>\",\"circle()\":\"circle( [<shape-radius>]? [at <position>]? )\",\"clamp()\":\"clamp( <calc-sum>#{3} )\",\"class-selector\":\"'.' <ident-token>\",\"clip-source\":\"<url>\",color:\"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>\",\"color-stop\":\"<color-stop-length>|<color-stop-angle>\",\"color-stop-angle\":\"<angle-percentage>{1,2}\",\"color-stop-length\":\"<length-percentage>{1,2}\",\"color-stop-list\":\"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>\",combinator:\"'>'|'+'|'~'|['||']\",\"common-lig-values\":\"[common-ligatures|no-common-ligatures]\",compat:\"searchfield|textarea|push-button|button-bevel|slider-horizontal|checkbox|radio|square-button|menulist|menulist-button|listbox|meter|progress-bar\",\"composite-style\":\"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor\",\"compositing-operator\":\"add|subtract|intersect|exclude\",\"compound-selector\":\"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!\",\"compound-selector-list\":\"<compound-selector>#\",\"complex-selector\":\"<compound-selector> [<combinator>? <compound-selector>]*\",\"complex-selector-list\":\"<complex-selector>#\",\"conic-gradient()\":\"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )\",\"contextual-alt-values\":\"[contextual|no-contextual]\",\"content-distribution\":\"space-between|space-around|space-evenly|stretch\",\"content-list\":\"[<string>|contents|<url>|<quote>|<attr()>|counter( <ident> , <'list-style-type'>? )]+\",\"content-position\":\"center|start|end|flex-start|flex-end\",\"content-replacement\":\"<image>\",\"contrast()\":\"contrast( [<number-percentage>] )\",\"counter()\":\"counter( <custom-ident> , [<counter-style>|none]? )\",\"counter-style\":\"<counter-style-name>|symbols( )\",\"counter-style-name\":\"<custom-ident>\",\"counters()\":\"counters( <custom-ident> , <string> , [<counter-style>|none]? )\",\"cross-fade()\":\"cross-fade( <cf-mixing-image> , <cf-final-image>? )\",\"cubic-bezier-timing-function\":\"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number> , <number> , <number> , <number> )\",\"deprecated-system-color\":\"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText\",\"discretionary-lig-values\":\"[discretionary-ligatures|no-discretionary-ligatures]\",\"display-box\":\"contents|none\",\"display-inside\":\"flow|flow-root|table|flex|grid|ruby\",\"display-internal\":\"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container\",\"display-legacy\":\"inline-block|inline-list-item|inline-table|inline-flex|inline-grid\",\"display-listitem\":\"<display-outside>?&&[flow|flow-root]?&&list-item\",\"display-outside\":\"block|inline|run-in\",\"drop-shadow()\":\"drop-shadow( <length>{2,3} <color>? )\",\"east-asian-variant-values\":\"[jis78|jis83|jis90|jis04|simplified|traditional]\",\"east-asian-width-values\":\"[full-width|proportional-width]\",\"element()\":\"element( <id-selector> )\",\"ellipse()\":\"ellipse( [<shape-radius>{2}]? [at <position>]? )\",\"ending-shape\":\"circle|ellipse\",\"env()\":\"env( <custom-ident> , <declaration-value>? )\",\"explicit-track-list\":\"[<line-names>? <track-size>]+ <line-names>?\",\"family-name\":\"<string>|<custom-ident>+\",\"feature-tag-value\":\"<string> [<integer>|on|off]?\",\"feature-type\":\"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation\",\"feature-value-block\":\"<feature-type> '{' <feature-value-declaration-list> '}'\",\"feature-value-block-list\":\"<feature-value-block>+\",\"feature-value-declaration\":\"<custom-ident> : <integer>+ ;\",\"feature-value-declaration-list\":\"<feature-value-declaration>\",\"feature-value-name\":\"<custom-ident>\",\"fill-rule\":\"nonzero|evenodd\",\"filter-function\":\"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>\",\"filter-function-list\":\"[<filter-function>|<url>]+\",\"final-bg-layer\":\"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>\",\"fit-content()\":\"fit-content( [<length>|<percentage>] )\",\"fixed-breadth\":\"<length-percentage>\",\"fixed-repeat\":\"repeat( [<positive-integer>] , [<line-names>? <fixed-size>]+ <line-names>? )\",\"fixed-size\":\"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )\",\"font-stretch-absolute\":\"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>\",\"font-variant-css21\":\"[normal|small-caps]\",\"font-weight-absolute\":\"normal|bold|<number>\",\"frequency-percentage\":\"<frequency>|<percentage>\",\"general-enclosed\":\"[<function-token> <any-value> )]|( <ident> <any-value> )\",\"generic-family\":\"serif|sans-serif|cursive|fantasy|monospace|-apple-system\",\"generic-name\":\"serif|sans-serif|cursive|fantasy|monospace\",\"geometry-box\":\"<shape-box>|fill-box|stroke-box|view-box\",gradient:\"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<-legacy-gradient>\",\"grayscale()\":\"grayscale( <number-percentage> )\",\"grid-line\":\"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]\",\"historical-lig-values\":\"[historical-ligatures|no-historical-ligatures]\",\"hsl()\":\"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )\",\"hsla()\":\"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )\",hue:\"<number>|<angle>\",\"hue-rotate()\":\"hue-rotate( <angle> )\",image:\"<url>|<image()>|<image-set()>|<element()>|<cross-fade()>|<gradient>\",\"image()\":\"image( <image-tags>? [<image-src>? , <color>?]! )\",\"image-set()\":\"image-set( <image-set-option># )\",\"image-set-option\":\"[<image>|<string>] <resolution>\",\"image-src\":\"<url>|<string>\",\"image-tags\":\"ltr|rtl\",\"inflexible-breadth\":\"<length>|<percentage>|min-content|max-content|auto\",\"inset()\":\"inset( <length-percentage>{1,4} [round <'border-radius'>]? )\",\"invert()\":\"invert( <number-percentage> )\",\"keyframes-name\":\"<custom-ident>|<string>\",\"keyframe-block\":\"<keyframe-selector># { <declaration-list> }\",\"keyframe-block-list\":\"<keyframe-block>+\",\"keyframe-selector\":\"from|to|<percentage>\",\"leader()\":\"leader( <leader-type> )\",\"leader-type\":\"dotted|solid|space|<string>\",\"length-percentage\":\"<length>|<percentage>\",\"line-names\":\"'[' <custom-ident>* ']'\",\"line-name-list\":\"[<line-names>|<name-repeat>]+\",\"line-style\":\"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset\",\"line-width\":\"<length>|thin|medium|thick\",\"linear-color-hint\":\"<length-percentage>\",\"linear-color-stop\":\"<color> <color-stop-length>?\",\"linear-gradient()\":\"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )\",\"mask-layer\":\"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>\",\"mask-position\":\"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?\",\"mask-reference\":\"none|<image>|<mask-source>\",\"mask-source\":\"<url>\",\"masking-mode\":\"alpha|luminance|match-source\",\"matrix()\":\"matrix( <number>#{6} )\",\"matrix3d()\":\"matrix3d( <number>#{16} )\",\"max()\":\"max( <calc-sum># )\",\"media-and\":\"<media-in-parens> [and <media-in-parens>]+\",\"media-condition\":\"<media-not>|<media-and>|<media-or>|<media-in-parens>\",\"media-condition-without-or\":\"<media-not>|<media-and>|<media-in-parens>\",\"media-feature\":\"( [<mf-plain>|<mf-boolean>|<mf-range>] )\",\"media-in-parens\":\"( <media-condition> )|<media-feature>|<general-enclosed>\",\"media-not\":\"not <media-in-parens>\",\"media-or\":\"<media-in-parens> [or <media-in-parens>]+\",\"media-query\":\"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?\",\"media-query-list\":\"<media-query>#\",\"media-type\":\"<ident>\",\"mf-boolean\":\"<mf-name>\",\"mf-name\":\"<ident>\",\"mf-plain\":\"<mf-name> : <mf-value>\",\"mf-range\":\"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>\",\"mf-value\":\"<number>|<dimension>|<ident>|<ratio>\",\"min()\":\"min( <calc-sum># )\",\"minmax()\":\"minmax( [<length>|<percentage>|<flex>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )\",\"named-color\":\"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>\",\"namespace-prefix\":\"<ident>\",\"ns-prefix\":\"[<ident-token>|'*']? '|'\",\"number-percentage\":\"<number>|<percentage>\",\"numeric-figure-values\":\"[lining-nums|oldstyle-nums]\",\"numeric-fraction-values\":\"[diagonal-fractions|stacked-fractions]\",\"numeric-spacing-values\":\"[proportional-nums|tabular-nums]\",nth:\"<an-plus-b>|even|odd\",\"opacity()\":\"opacity( [<number-percentage>] )\",\"overflow-position\":\"unsafe|safe\",\"outline-radius\":\"<length>|<percentage>\",\"page-body\":\"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>\",\"page-margin-box\":\"<page-margin-box-type> '{' <declaration-list> '}'\",\"page-margin-box-type\":\"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom\",\"page-selector-list\":\"[<page-selector>#]?\",\"page-selector\":\"<pseudo-page>+|<ident> <pseudo-page>*\",\"perspective()\":\"perspective( <length> )\",\"polygon()\":\"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )\",position:\"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]\",\"pseudo-class-selector\":\"':' <ident-token>|':' <function-token> <any-value> ')'\",\"pseudo-element-selector\":\"':' <pseudo-class-selector>\",\"pseudo-page\":\": [left|right|first|blank]\",quote:\"open-quote|close-quote|no-open-quote|no-close-quote\",\"radial-gradient()\":\"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )\",\"relative-selector\":\"<combinator>? <complex-selector>\",\"relative-selector-list\":\"<relative-selector>#\",\"relative-size\":\"larger|smaller\",\"repeat-style\":\"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}\",\"repeating-linear-gradient()\":\"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )\",\"repeating-radial-gradient()\":\"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )\",\"rgb()\":\"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )\",\"rgba()\":\"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )\",\"rotate()\":\"rotate( [<angle>|<zero>] )\",\"rotate3d()\":\"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )\",\"rotateX()\":\"rotateX( [<angle>|<zero>] )\",\"rotateY()\":\"rotateY( [<angle>|<zero>] )\",\"rotateZ()\":\"rotateZ( [<angle>|<zero>] )\",\"saturate()\":\"saturate( <number-percentage> )\",\"scale()\":\"scale( <number> , <number>? )\",\"scale3d()\":\"scale3d( <number> , <number> , <number> )\",\"scaleX()\":\"scaleX( <number> )\",\"scaleY()\":\"scaleY( <number> )\",\"scaleZ()\":\"scaleZ( <number> )\",\"self-position\":\"center|start|end|self-start|self-end|flex-start|flex-end\",\"shape-radius\":\"<length-percentage>|closest-side|farthest-side\",\"skew()\":\"skew( [<angle>|<zero>] , [<angle>|<zero>]? )\",\"skewX()\":\"skewX( [<angle>|<zero>] )\",\"skewY()\":\"skewY( [<angle>|<zero>] )\",\"sepia()\":\"sepia( <number-percentage> )\",shadow:\"inset?&&<length>{2,4}&&<color>?\",\"shadow-t\":\"[<length>{2,3}&&<color>?]\",shape:\"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )\",\"shape-box\":\"<box>|margin-box\",\"side-or-corner\":\"[left|right]||[top|bottom]\",\"single-animation\":\"<time>||<timing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]\",\"single-animation-direction\":\"normal|reverse|alternate|alternate-reverse\",\"single-animation-fill-mode\":\"none|forwards|backwards|both\",\"single-animation-iteration-count\":\"infinite|<number>\",\"single-animation-play-state\":\"running|paused\",\"single-transition\":\"[none|<single-transition-property>]||<time>||<timing-function>||<time>\",\"single-transition-property\":\"all|<custom-ident>\",size:\"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}\",\"step-position\":\"jump-start|jump-end|jump-none|jump-both|start|end\",\"step-timing-function\":\"step-start|step-end|steps( <integer> [, <step-position>]? )\",\"subclass-selector\":\"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>\",\"supports-condition\":\"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*\",\"supports-in-parens\":\"( <supports-condition> )|<supports-feature>|<general-enclosed>\",\"supports-feature\":\"<supports-decl>|<supports-selector-fn>\",\"supports-decl\":\"( <declaration> )\",\"supports-selector-fn\":\"selector( <complex-selector> )\",symbol:\"<string>|<image>|<custom-ident>\",target:\"<target-counter()>|<target-counters()>|<target-text()>\",\"target-counter()\":\"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )\",\"target-counters()\":\"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )\",\"target-text()\":\"target-text( [<string>|<url>] , [content|before|after|first-letter]? )\",\"time-percentage\":\"<time>|<percentage>\",\"timing-function\":\"linear|<cubic-bezier-timing-function>|<step-timing-function>\",\"track-breadth\":\"<length-percentage>|<flex>|min-content|max-content|auto\",\"track-list\":\"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?\",\"track-repeat\":\"repeat( [<positive-integer>] , [<line-names>? <track-size>]+ <line-names>? )\",\"track-size\":\"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )\",\"transform-function\":\"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>\",\"transform-list\":\"<transform-function>+\",\"translate()\":\"translate( <length-percentage> , <length-percentage>? )\",\"translate3d()\":\"translate3d( <length-percentage> , <length-percentage> , <length> )\",\"translateX()\":\"translateX( <length-percentage> )\",\"translateY()\":\"translateY( <length-percentage> )\",\"translateZ()\":\"translateZ( <length> )\",\"type-or-unit\":\"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%\",\"type-selector\":\"<wq-name>|<ns-prefix>? '*'\",\"var()\":\"var( <custom-property-name> , <declaration-value>? )\",\"viewport-length\":\"auto|<length-percentage>\",\"wq-name\":\"<ns-prefix>? <ident-token>\",\"-legacy-gradient\":\"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>\",\"-legacy-linear-gradient\":\"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )\",\"-legacy-repeating-linear-gradient\":\"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )\",\"-legacy-linear-gradient-arguments\":\"[<angle>|<side-or-corner>]? , <color-stop-list>\",\"-legacy-radial-gradient\":\"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )\",\"-legacy-repeating-radial-gradient\":\"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )\",\"-legacy-radial-gradient-arguments\":\"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>\",\"-legacy-radial-gradient-size\":\"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover\",\"-legacy-radial-gradient-shape\":\"circle|ellipse\",\"-non-standard-font\":\"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body\",\"-non-standard-color\":\"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text\",\"-non-standard-image-rendering\":\"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast\",\"-non-standard-overflow\":\"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable\",\"-non-standard-width\":\"min-intrinsic|intrinsic|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content\",\"-webkit-gradient()\":\"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )\",\"-webkit-gradient-color-stop\":\"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )\",\"-webkit-gradient-point\":\"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]\",\"-webkit-gradient-radius\":\"<length>|<percentage>\",\"-webkit-gradient-type\":\"linear|radial\",\"-webkit-mask-box-repeat\":\"repeat|stretch|round\",\"-webkit-mask-clip-style\":\"border|border-box|padding|padding-box|content|content-box|text\",\"-ms-filter-function-list\":\"<-ms-filter-function>+\",\"-ms-filter-function\":\"<-ms-filter-function-progid>|<-ms-filter-function-legacy>\",\"-ms-filter-function-progid\":\"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]\",\"-ms-filter-function-legacy\":\"<ident-token>|<function-token> <any-value>? )\",\"-ms-filter\":\"<string>\",age:\"child|young|old\",\"attr-name\":\"<wq-name>\",\"attr-fallback\":\"<any-value>\",\"border-radius\":\"<length-percentage>{1,2}\",bottom:\"<length>|auto\",\"generic-voice\":\"[<age>? <gender> <integer>?]\",gender:\"male|female|neutral\",left:\"<length>|auto\",\"mask-image\":\"<mask-reference>#\",\"name-repeat\":\"repeat( [<positive-integer>|auto-fill] , <line-names>+ )\",paint:\"none|<color>|<url> [none|<color>]?|context-fill|context-stroke\",\"path()\":\"path( <string> )\",ratio:\"<integer> / <integer>\",right:\"<length>|auto\",\"svg-length\":\"<percentage>|<length>|<number>\",\"svg-writing-mode\":\"lr-tb|rl-tb|tb-rl|lr|rl|tb\",top:\"<length>|auto\",\"track-group\":\"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>\",\"track-list-v0\":\"[<string>* <track-group> <string>*]+|none\",\"track-minmax\":\"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content\",x:\"<number>\",y:\"<number>\",declaration:\"<ident-token> : <declaration-value>? ['!' important]?\",\"declaration-list\":\"[<declaration>? ';']* <declaration>?\",url:\"url( <string> <url-modifier>* )|<url-token>\",\"url-modifier\":\"<ident>|<function-token> <any-value> )\",\"number-zero-one\":\"<number [0,1]>\",\"number-one-or-greater\":\"<number [1,\u221e]>\",\"positive-integer\":\"<integer [0,\u221e]>\"},Or={\"--*\":\"<declaration-value>\",\"-ms-accelerator\":\"false|true\",\"-ms-block-progression\":\"tb|rl|bt|lr\",\"-ms-content-zoom-chaining\":\"none|chained\",\"-ms-content-zooming\":\"none|zoom\",\"-ms-content-zoom-limit\":\"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>\",\"-ms-content-zoom-limit-max\":\"<percentage>\",\"-ms-content-zoom-limit-min\":\"<percentage>\",\"-ms-content-zoom-snap\":\"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>\",\"-ms-content-zoom-snap-points\":\"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )\",\"-ms-content-zoom-snap-type\":\"none|proximity|mandatory\",\"-ms-filter\":\"<string>\",\"-ms-flow-from\":\"[none|<custom-ident>]#\",\"-ms-flow-into\":\"[none|<custom-ident>]#\",\"-ms-high-contrast-adjust\":\"auto|none\",\"-ms-hyphenate-limit-chars\":\"auto|<integer>{1,3}\",\"-ms-hyphenate-limit-lines\":\"no-limit|<integer>\",\"-ms-hyphenate-limit-zone\":\"<percentage>|<length>\",\"-ms-ime-align\":\"auto|after\",\"-ms-overflow-style\":\"auto|none|scrollbar|-ms-autohiding-scrollbar\",\"-ms-scrollbar-3dlight-color\":\"<color>\",\"-ms-scrollbar-arrow-color\":\"<color>\",\"-ms-scrollbar-base-color\":\"<color>\",\"-ms-scrollbar-darkshadow-color\":\"<color>\",\"-ms-scrollbar-face-color\":\"<color>\",\"-ms-scrollbar-highlight-color\":\"<color>\",\"-ms-scrollbar-shadow-color\":\"<color>\",\"-ms-scrollbar-track-color\":\"<color>\",\"-ms-scroll-chaining\":\"chained|none\",\"-ms-scroll-limit\":\"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>\",\"-ms-scroll-limit-x-max\":\"auto|<length>\",\"-ms-scroll-limit-x-min\":\"<length>\",\"-ms-scroll-limit-y-max\":\"auto|<length>\",\"-ms-scroll-limit-y-min\":\"<length>\",\"-ms-scroll-rails\":\"none|railed\",\"-ms-scroll-snap-points-x\":\"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )\",\"-ms-scroll-snap-points-y\":\"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )\",\"-ms-scroll-snap-type\":\"none|proximity|mandatory\",\"-ms-scroll-snap-x\":\"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>\",\"-ms-scroll-snap-y\":\"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>\",\"-ms-scroll-translation\":\"none|vertical-to-horizontal\",\"-ms-text-autospace\":\"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space\",\"-ms-touch-select\":\"grippers|none\",\"-ms-user-select\":\"none|element|text\",\"-ms-wrap-flow\":\"auto|both|start|end|maximum|clear\",\"-ms-wrap-margin\":\"<length>\",\"-ms-wrap-through\":\"wrap|none\",\"-moz-appearance\":\"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized\",\"-moz-binding\":\"<url>|none\",\"-moz-border-bottom-colors\":\"<color>+|none\",\"-moz-border-left-colors\":\"<color>+|none\",\"-moz-border-right-colors\":\"<color>+|none\",\"-moz-border-top-colors\":\"<color>+|none\",\"-moz-context-properties\":\"none|[fill|fill-opacity|stroke|stroke-opacity]#\",\"-moz-float-edge\":\"border-box|content-box|margin-box|padding-box\",\"-moz-force-broken-image-icon\":\"<integer>\",\"-moz-image-region\":\"<shape>|auto\",\"-moz-orient\":\"inline|block|horizontal|vertical\",\"-moz-outline-radius\":\"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?\",\"-moz-outline-radius-bottomleft\":\"<outline-radius>\",\"-moz-outline-radius-bottomright\":\"<outline-radius>\",\"-moz-outline-radius-topleft\":\"<outline-radius>\",\"-moz-outline-radius-topright\":\"<outline-radius>\",\"-moz-stack-sizing\":\"ignore|stretch-to-fit\",\"-moz-text-blink\":\"none|blink\",\"-moz-user-focus\":\"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none\",\"-moz-user-input\":\"auto|none|enabled|disabled\",\"-moz-user-modify\":\"read-only|read-write|write-only\",\"-moz-window-dragging\":\"drag|no-drag\",\"-moz-window-shadow\":\"default|menu|tooltip|sheet|none\",\"-webkit-appearance\":\"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|listbox|listitem|media-fullscreen-button|media-mute-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield\",\"-webkit-border-before\":\"<'border-width'>||<'border-style'>||<'color'>\",\"-webkit-border-before-color\":\"<'color'>\",\"-webkit-border-before-style\":\"<'border-style'>\",\"-webkit-border-before-width\":\"<'border-width'>\",\"-webkit-box-reflect\":\"[above|below|right|left]? <length>? <image>?\",\"-webkit-line-clamp\":\"none|<integer>\",\"-webkit-mask\":\"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#\",\"-webkit-mask-attachment\":\"<attachment>#\",\"-webkit-mask-clip\":\"[<box>|border|padding|content|text]#\",\"-webkit-mask-composite\":\"<composite-style>#\",\"-webkit-mask-image\":\"<mask-reference>#\",\"-webkit-mask-origin\":\"[<box>|border|padding|content]#\",\"-webkit-mask-position\":\"<position>#\",\"-webkit-mask-position-x\":\"[<length-percentage>|left|center|right]#\",\"-webkit-mask-position-y\":\"[<length-percentage>|top|center|bottom]#\",\"-webkit-mask-repeat\":\"<repeat-style>#\",\"-webkit-mask-repeat-x\":\"repeat|no-repeat|space|round\",\"-webkit-mask-repeat-y\":\"repeat|no-repeat|space|round\",\"-webkit-mask-size\":\"<bg-size>#\",\"-webkit-overflow-scrolling\":\"auto|touch\",\"-webkit-tap-highlight-color\":\"<color>\",\"-webkit-text-fill-color\":\"<color>\",\"-webkit-text-stroke\":\"<length>||<color>\",\"-webkit-text-stroke-color\":\"<color>\",\"-webkit-text-stroke-width\":\"<length>\",\"-webkit-touch-callout\":\"default|none\",\"-webkit-user-modify\":\"read-only|read-write|read-write-plaintext-only\",\"align-content\":\"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>\",\"align-items\":\"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]\",\"align-self\":\"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>\",all:\"initial|inherit|unset|revert\",animation:\"<single-animation>#\",\"animation-delay\":\"<time>#\",\"animation-direction\":\"<single-animation-direction>#\",\"animation-duration\":\"<time>#\",\"animation-fill-mode\":\"<single-animation-fill-mode>#\",\"animation-iteration-count\":\"<single-animation-iteration-count>#\",\"animation-name\":\"[none|<keyframes-name>]#\",\"animation-play-state\":\"<single-animation-play-state>#\",\"animation-timing-function\":\"<timing-function>#\",appearance:\"none|auto|button|textfield|<compat>\",azimuth:\"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards\",\"backdrop-filter\":\"none|<filter-function-list>\",\"backface-visibility\":\"visible|hidden\",background:\"[<bg-layer> ,]* <final-bg-layer>\",\"background-attachment\":\"<attachment>#\",\"background-blend-mode\":\"<blend-mode>#\",\"background-clip\":\"<box>#\",\"background-color\":\"<color>\",\"background-image\":\"<bg-image>#\",\"background-origin\":\"<box>#\",\"background-position\":\"<bg-position>#\",\"background-position-x\":\"[center|[left|right|x-start|x-end]? <length-percentage>?]#\",\"background-position-y\":\"[center|[top|bottom|y-start|y-end]? <length-percentage>?]#\",\"background-repeat\":\"<repeat-style>#\",\"background-size\":\"<bg-size>#\",\"block-overflow\":\"clip|ellipsis|<string>\",\"block-size\":\"<'width'>\",border:\"<line-width>||<line-style>||<color>\",\"border-block\":\"<'border-top-width'>||<'border-top-style'>||<'color'>\",\"border-block-color\":\"<'border-top-color'>{1,2}\",\"border-block-style\":\"<'border-top-style'>\",\"border-block-width\":\"<'border-top-width'>\",\"border-block-end\":\"<'border-top-width'>||<'border-top-style'>||<'color'>\",\"border-block-end-color\":\"<'border-top-color'>\",\"border-block-end-style\":\"<'border-top-style'>\",\"border-block-end-width\":\"<'border-top-width'>\",\"border-block-start\":\"<'border-top-width'>||<'border-top-style'>||<'color'>\",\"border-block-start-color\":\"<'border-top-color'>\",\"border-block-start-style\":\"<'border-top-style'>\",\"border-block-start-width\":\"<'border-top-width'>\",\"border-bottom\":\"<line-width>||<line-style>||<color>\",\"border-bottom-color\":\"<'border-top-color'>\",\"border-bottom-left-radius\":\"<length-percentage>{1,2}\",\"border-bottom-right-radius\":\"<length-percentage>{1,2}\",\"border-bottom-style\":\"<line-style>\",\"border-bottom-width\":\"<line-width>\",\"border-collapse\":\"collapse|separate\",\"border-color\":\"<color>{1,4}\",\"border-end-end-radius\":\"<length-percentage>{1,2}\",\"border-end-start-radius\":\"<length-percentage>{1,2}\",\"border-image\":\"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>\",\"border-image-outset\":\"[<length>|<number>]{1,4}\",\"border-image-repeat\":\"[stretch|repeat|round|space]{1,2}\",\"border-image-slice\":\"<number-percentage>{1,4}&&fill?\",\"border-image-source\":\"none|<image>\",\"border-image-width\":\"[<length-percentage>|<number>|auto]{1,4}\",\"border-inline\":\"<'border-top-width'>||<'border-top-style'>||<'color'>\",\"border-inline-end\":\"<'border-top-width'>||<'border-top-style'>||<'color'>\",\"border-inline-color\":\"<'border-top-color'>{1,2}\",\"border-inline-style\":\"<'border-top-style'>\",\"border-inline-width\":\"<'border-top-width'>\",\"border-inline-end-color\":\"<'border-top-color'>\",\"border-inline-end-style\":\"<'border-top-style'>\",\"border-inline-end-width\":\"<'border-top-width'>\",\"border-inline-start\":\"<'border-top-width'>||<'border-top-style'>||<'color'>\",\"border-inline-start-color\":\"<'border-top-color'>\",\"border-inline-start-style\":\"<'border-top-style'>\",\"border-inline-start-width\":\"<'border-top-width'>\",\"border-left\":\"<line-width>||<line-style>||<color>\",\"border-left-color\":\"<color>\",\"border-left-style\":\"<line-style>\",\"border-left-width\":\"<line-width>\",\"border-radius\":\"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?\",\"border-right\":\"<line-width>||<line-style>||<color>\",\"border-right-color\":\"<color>\",\"border-right-style\":\"<line-style>\",\"border-right-width\":\"<line-width>\",\"border-spacing\":\"<length> <length>?\",\"border-start-end-radius\":\"<length-percentage>{1,2}\",\"border-start-start-radius\":\"<length-percentage>{1,2}\",\"border-style\":\"<line-style>{1,4}\",\"border-top\":\"<line-width>||<line-style>||<color>\",\"border-top-color\":\"<color>\",\"border-top-left-radius\":\"<length-percentage>{1,2}\",\"border-top-right-radius\":\"<length-percentage>{1,2}\",\"border-top-style\":\"<line-style>\",\"border-top-width\":\"<line-width>\",\"border-width\":\"<line-width>{1,4}\",bottom:\"<length>|<percentage>|auto\",\"box-align\":\"start|center|end|baseline|stretch\",\"box-decoration-break\":\"slice|clone\",\"box-direction\":\"normal|reverse|inherit\",\"box-flex\":\"<number>\",\"box-flex-group\":\"<integer>\",\"box-lines\":\"single|multiple\",\"box-ordinal-group\":\"<integer>\",\"box-orient\":\"horizontal|vertical|inline-axis|block-axis|inherit\",\"box-pack\":\"start|center|end|justify\",\"box-shadow\":\"none|<shadow>#\",\"box-sizing\":\"content-box|border-box\",\"break-after\":\"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region\",\"break-before\":\"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region\",\"break-inside\":\"auto|avoid|avoid-page|avoid-column|avoid-region\",\"caption-side\":\"top|bottom|block-start|block-end|inline-start|inline-end\",\"caret-color\":\"auto|<color>\",clear:\"none|left|right|both|inline-start|inline-end\",clip:\"<shape>|auto\",\"clip-path\":\"<clip-source>|[<basic-shape>||<geometry-box>]|none\",color:\"<color>\",\"color-adjust\":\"economy|exact\",\"column-count\":\"<integer>|auto\",\"column-fill\":\"auto|balance|balance-all\",\"column-gap\":\"normal|<length-percentage>\",\"column-rule\":\"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>\",\"column-rule-color\":\"<color>\",\"column-rule-style\":\"<'border-style'>\",\"column-rule-width\":\"<'border-width'>\",\"column-span\":\"none|all\",\"column-width\":\"<length>|auto\",columns:\"<'column-width'>||<'column-count'>\",contain:\"none|strict|content|[size||layout||style||paint]\",content:\"normal|none|[<content-replacement>|<content-list>] [/ <string>]?\",\"counter-increment\":\"[<custom-ident> <integer>?]+|none\",\"counter-reset\":\"[<custom-ident> <integer>?]+|none\",\"counter-set\":\"[<custom-ident> <integer>?]+|none\",cursor:\"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]\",direction:\"ltr|rtl\",display:\"block|contents|flex|flow|flow-root|grid|inline|inline-block|inline-flex|inline-grid|inline-list-item|inline-table|list-item|none|ruby|ruby-base|ruby-base-container|ruby-text|ruby-text-container|run-in|table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|-ms-flexbox|-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box\",\"empty-cells\":\"show|hide\",filter:\"none|<filter-function-list>|<-ms-filter-function-list>\",flex:\"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]\",\"flex-basis\":\"content|<'width'>\",\"flex-direction\":\"row|row-reverse|column|column-reverse\",\"flex-flow\":\"<'flex-direction'>||<'flex-wrap'>\",\"flex-grow\":\"<number>\",\"flex-shrink\":\"<number>\",\"flex-wrap\":\"nowrap|wrap|wrap-reverse\",float:\"left|right|none|inline-start|inline-end\",font:\"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar\",\"font-family\":\"[<family-name>|<generic-family>]#\",\"font-feature-settings\":\"normal|<feature-tag-value>#\",\"font-kerning\":\"auto|normal|none\",\"font-language-override\":\"normal|<string>\",\"font-optical-sizing\":\"auto|none\",\"font-variation-settings\":\"normal|[<string> <number>]#\",\"font-size\":\"<absolute-size>|<relative-size>|<length-percentage>\",\"font-size-adjust\":\"none|<number>\",\"font-stretch\":\"<font-stretch-absolute>\",\"font-style\":\"normal|italic|oblique <angle>?\",\"font-synthesis\":\"none|[weight||style]\",\"font-variant\":\"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]\",\"font-variant-alternates\":\"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]\",\"font-variant-caps\":\"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps\",\"font-variant-east-asian\":\"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]\",\"font-variant-ligatures\":\"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]\",\"font-variant-numeric\":\"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]\",\"font-variant-position\":\"normal|sub|super\",\"font-weight\":\"<font-weight-absolute>|bolder|lighter\",gap:\"<'row-gap'> <'column-gap'>?\",grid:\"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>\",\"grid-area\":\"<grid-line> [/ <grid-line>]{0,3}\",\"grid-auto-columns\":\"<track-size>+\",\"grid-auto-flow\":\"[row|column]||dense\",\"grid-auto-rows\":\"<track-size>+\",\"grid-column\":\"<grid-line> [/ <grid-line>]?\",\"grid-column-end\":\"<grid-line>\",\"grid-column-gap\":\"<length-percentage>\",\"grid-column-start\":\"<grid-line>\",\"grid-gap\":\"<'grid-row-gap'> <'grid-column-gap'>?\",\"grid-row\":\"<grid-line> [/ <grid-line>]?\",\"grid-row-end\":\"<grid-line>\",\"grid-row-gap\":\"<length-percentage>\",\"grid-row-start\":\"<grid-line>\",\"grid-template\":\"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?\",\"grid-template-areas\":\"none|<string>+\",\"grid-template-columns\":\"none|<track-list>|<auto-track-list>\",\"grid-template-rows\":\"none|<track-list>|<auto-track-list>\",\"hanging-punctuation\":\"none|[first||[force-end|allow-end]||last]\",height:\"[<length>|<percentage>]&&[border-box|content-box]?|available|min-content|max-content|fit-content|auto\",hyphens:\"none|manual|auto\",\"image-orientation\":\"from-image|<angle>|[<angle>? flip]\",\"image-rendering\":\"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>\",\"image-resolution\":\"[from-image||<resolution>]&&snap?\",\"ime-mode\":\"auto|normal|active|inactive|disabled\",\"initial-letter\":\"normal|[<number> <integer>?]\",\"initial-letter-align\":\"[auto|alphabetic|hanging|ideographic]\",\"inline-size\":\"<'width'>\",inset:\"<'top'>{1,4}\",\"inset-block\":\"<'top'>{1,2}\",\"inset-block-end\":\"<'top'>\",\"inset-block-start\":\"<'top'>\",\"inset-inline\":\"<'top'>{1,2}\",\"inset-inline-end\":\"<'top'>\",\"inset-inline-start\":\"<'top'>\",isolation:\"auto|isolate\",\"justify-content\":\"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]\",\"justify-items\":\"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]\",\"justify-self\":\"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]\",left:\"<length>|<percentage>|auto\",\"letter-spacing\":\"normal|<length-percentage>\",\"line-break\":\"auto|loose|normal|strict\",\"line-clamp\":\"none|<integer>\",\"line-height\":\"normal|<number>|<length>|<percentage>\",\"line-height-step\":\"<length>\",\"list-style\":\"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>\",\"list-style-image\":\"<url>|none\",\"list-style-position\":\"inside|outside\",\"list-style-type\":\"<counter-style>|<string>|none\",margin:\"[<length>|<percentage>|auto]{1,4}\",\"margin-block\":\"<'margin-left'>{1,2}\",\"margin-block-end\":\"<'margin-left'>\",\"margin-block-start\":\"<'margin-left'>\",\"margin-bottom\":\"<length>|<percentage>|auto\",\"margin-inline\":\"<'margin-left'>{1,2}\",\"margin-inline-end\":\"<'margin-left'>\",\"margin-inline-start\":\"<'margin-left'>\",\"margin-left\":\"<length>|<percentage>|auto\",\"margin-right\":\"<length>|<percentage>|auto\",\"margin-top\":\"<length>|<percentage>|auto\",mask:\"<mask-layer>#\",\"mask-border\":\"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>\",\"mask-border-mode\":\"luminance|alpha\",\"mask-border-outset\":\"[<length>|<number>]{1,4}\",\"mask-border-repeat\":\"[stretch|repeat|round|space]{1,2}\",\"mask-border-slice\":\"<number-percentage>{1,4} fill?\",\"mask-border-source\":\"none|<image>\",\"mask-border-width\":\"[<length-percentage>|<number>|auto]{1,4}\",\"mask-clip\":\"[<geometry-box>|no-clip]#\",\"mask-composite\":\"<compositing-operator>#\",\"mask-image\":\"<mask-reference>#\",\"mask-mode\":\"<masking-mode>#\",\"mask-origin\":\"<geometry-box>#\",\"mask-position\":\"<position>#\",\"mask-repeat\":\"<repeat-style>#\",\"mask-size\":\"<bg-size>#\",\"mask-type\":\"luminance|alpha\",\"max-block-size\":\"<'max-width'>\",\"max-height\":\"<length>|<percentage>|none|max-content|min-content|fit-content|fill-available\",\"max-inline-size\":\"<'max-width'>\",\"max-lines\":\"none|<integer>\",\"max-width\":\"<length>|<percentage>|none|max-content|min-content|fit-content|fill-available|<-non-standard-width>\",\"min-block-size\":\"<'min-width'>\",\"min-height\":\"<length>|<percentage>|auto|max-content|min-content|fit-content|fill-available\",\"min-inline-size\":\"<'min-width'>\",\"min-width\":\"<length>|<percentage>|auto|max-content|min-content|fit-content|fill-available|<-non-standard-width>\",\"mix-blend-mode\":\"<blend-mode>\",\"object-fit\":\"fill|contain|cover|none|scale-down\",\"object-position\":\"<position>\",offset:\"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?\",\"offset-anchor\":\"auto|<position>\",\"offset-distance\":\"<length-percentage>\",\"offset-path\":\"none|ray( [<angle>&&<size>?&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]\",\"offset-position\":\"auto|<position>\",\"offset-rotate\":\"[auto|reverse]||<angle>\",opacity:\"<number-zero-one>\",order:\"<integer>\",orphans:\"<integer>\",outline:\"[<'outline-color'>||<'outline-style'>||<'outline-width'>]\",\"outline-color\":\"<color>|invert\",\"outline-offset\":\"<length>\",\"outline-style\":\"auto|<'border-style'>\",\"outline-width\":\"<line-width>\",overflow:\"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>\",\"overflow-anchor\":\"auto|none\",\"overflow-block\":\"visible|hidden|clip|scroll|auto\",\"overflow-clip-box\":\"padding-box|content-box\",\"overflow-inline\":\"visible|hidden|clip|scroll|auto\",\"overflow-wrap\":\"normal|break-word|anywhere\",\"overflow-x\":\"visible|hidden|clip|scroll|auto\",\"overflow-y\":\"visible|hidden|clip|scroll|auto\",\"overscroll-behavior\":\"[contain|none|auto]{1,2}\",\"overscroll-behavior-x\":\"contain|none|auto\",\"overscroll-behavior-y\":\"contain|none|auto\",padding:\"[<length>|<percentage>]{1,4}\",\"padding-block\":\"<'padding-left'>{1,2}\",\"padding-block-end\":\"<'padding-left'>\",\"padding-block-start\":\"<'padding-left'>\",\"padding-bottom\":\"<length>|<percentage>\",\"padding-inline\":\"<'padding-left'>{1,2}\",\"padding-inline-end\":\"<'padding-left'>\",\"padding-inline-start\":\"<'padding-left'>\",\"padding-left\":\"<length>|<percentage>\",\"padding-right\":\"<length>|<percentage>\",\"padding-top\":\"<length>|<percentage>\",\"page-break-after\":\"auto|always|avoid|left|right|recto|verso\",\"page-break-before\":\"auto|always|avoid|left|right|recto|verso\",\"page-break-inside\":\"auto|avoid\",\"paint-order\":\"normal|[fill||stroke||markers]\",perspective:\"none|<length>\",\"perspective-origin\":\"<position>\",\"place-content\":\"<'align-content'> <'justify-content'>?\",\"place-items\":\"<'align-items'> <'justify-items'>?\",\"place-self\":\"<'align-self'> <'justify-self'>?\",\"pointer-events\":\"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit\",position:\"static|relative|absolute|sticky|fixed|-webkit-sticky\",quotes:\"none|[<string> <string>]+\",resize:\"none|both|horizontal|vertical|block|inline\",right:\"<length>|<percentage>|auto\",rotate:\"none|<angle>|[x|y|z|<number>{3}]&&<angle>\",\"row-gap\":\"normal|<length-percentage>\",\"ruby-align\":\"start|center|space-between|space-around\",\"ruby-merge\":\"separate|collapse|auto\",\"ruby-position\":\"over|under|inter-character\",scale:\"none|<number>{1,3}\",\"scrollbar-color\":\"auto|dark|light|<color>{2}\",\"scrollbar-width\":\"auto|thin|none\",\"scroll-behavior\":\"auto|smooth\",\"scroll-margin\":\"<length>{1,4}\",\"scroll-margin-block\":\"<length>{1,2}\",\"scroll-margin-block-start\":\"<length>\",\"scroll-margin-block-end\":\"<length>\",\"scroll-margin-bottom\":\"<length>\",\"scroll-margin-inline\":\"<length>{1,2}\",\"scroll-margin-inline-start\":\"<length>\",\"scroll-margin-inline-end\":\"<length>\",\"scroll-margin-left\":\"<length>\",\"scroll-margin-right\":\"<length>\",\"scroll-margin-top\":\"<length>\",\"scroll-padding\":\"[auto|<length-percentage>]{1,4}\",\"scroll-padding-block\":\"[auto|<length-percentage>]{1,2}\",\"scroll-padding-block-start\":\"auto|<length-percentage>\",\"scroll-padding-block-end\":\"auto|<length-percentage>\",\"scroll-padding-bottom\":\"auto|<length-percentage>\",\"scroll-padding-inline\":\"[auto|<length-percentage>]{1,2}\",\"scroll-padding-inline-start\":\"auto|<length-percentage>\",\"scroll-padding-inline-end\":\"auto|<length-percentage>\",\"scroll-padding-left\":\"auto|<length-percentage>\",\"scroll-padding-right\":\"auto|<length-percentage>\",\"scroll-padding-top\":\"auto|<length-percentage>\",\"scroll-snap-align\":\"[none|start|end|center]{1,2}\",\"scroll-snap-coordinate\":\"none|<position>#\",\"scroll-snap-destination\":\"<position>\",\"scroll-snap-points-x\":\"none|repeat( <length-percentage> )\",\"scroll-snap-points-y\":\"none|repeat( <length-percentage> )\",\"scroll-snap-stop\":\"normal|always\",\"scroll-snap-type\":\"none|[x|y|block|inline|both] [mandatory|proximity]?\",\"scroll-snap-type-x\":\"none|mandatory|proximity\",\"scroll-snap-type-y\":\"none|mandatory|proximity\",\"shape-image-threshold\":\"<number>\",\"shape-margin\":\"<length-percentage>\",\"shape-outside\":\"none|<shape-box>||<basic-shape>|<image>\",\"tab-size\":\"<integer>|<length>\",\"table-layout\":\"auto|fixed\",\"text-align\":\"start|end|left|right|center|justify|match-parent\",\"text-align-last\":\"auto|start|end|left|right|center|justify\",\"text-combine-upright\":\"none|all|[digits <integer>?]\",\"text-decoration\":\"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>\",\"text-decoration-color\":\"<color>\",\"text-decoration-line\":\"none|[underline||overline||line-through||blink]\",\"text-decoration-skip\":\"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]\",\"text-decoration-skip-ink\":\"auto|none\",\"text-decoration-style\":\"solid|double|dotted|dashed|wavy\",\"text-emphasis\":\"<'text-emphasis-style'>||<'text-emphasis-color'>\",\"text-emphasis-color\":\"<color>\",\"text-emphasis-position\":\"[over|under]&&[right|left]\",\"text-emphasis-style\":\"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>\",\"text-indent\":\"<length-percentage>&&hanging?&&each-line?\",\"text-justify\":\"auto|inter-character|inter-word|none\",\"text-orientation\":\"mixed|upright|sideways\",\"text-overflow\":\"[clip|ellipsis|<string>]{1,2}\",\"text-rendering\":\"auto|optimizeSpeed|optimizeLegibility|geometricPrecision\",\"text-shadow\":\"none|<shadow-t>#\",\"text-size-adjust\":\"none|auto|<percentage>\",\"text-transform\":\"none|capitalize|uppercase|lowercase|full-width|full-size-kana\",\"text-underline-position\":\"auto|[under||[left|right]]\",top:\"<length>|<percentage>|auto\",\"touch-action\":\"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation\",transform:\"none|<transform-list>\",\"transform-box\":\"border-box|fill-box|view-box\",\"transform-origin\":\"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?\",\"transform-style\":\"flat|preserve-3d\",transition:\"<single-transition>#\",\"transition-delay\":\"<time>#\",\"transition-duration\":\"<time>#\",\"transition-property\":\"none|<single-transition-property>#\",\"transition-timing-function\":\"<timing-function>#\",translate:\"none|<length-percentage> [<length-percentage> <length>?]?\",\"unicode-bidi\":\"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate\",\"user-select\":\"auto|text|none|contain|all\",\"vertical-align\":\"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>\",visibility:\"visible|hidden|collapse\",\"white-space\":\"normal|pre|nowrap|pre-wrap|pre-line\",widows:\"<integer>\",width:\"[<length>|<percentage>]&&[border-box|content-box]?|available|min-content|max-content|fit-content|auto\",\"will-change\":\"auto|<animateable-feature>#\",\"word-break\":\"normal|break-all|keep-all|break-word\",\"word-spacing\":\"normal|<length-percentage>\",\"word-wrap\":\"normal|break-word\",\"writing-mode\":\"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>\",\"z-index\":\"auto|<integer>\",zoom:\"normal|reset|<number>|<percentage>\",\"-moz-background-clip\":\"padding|border\",\"-moz-border-radius-bottomleft\":\"<'border-bottom-left-radius'>\",\"-moz-border-radius-bottomright\":\"<'border-bottom-right-radius'>\",\"-moz-border-radius-topleft\":\"<'border-top-left-radius'>\",\"-moz-border-radius-topright\":\"<'border-bottom-right-radius'>\",\"-moz-control-character-visibility\":\"visible|hidden\",\"-moz-osx-font-smoothing\":\"auto|grayscale\",\"-moz-user-select\":\"none|text|all|-moz-none\",\"-ms-flex-align\":\"start|end|center|baseline|stretch\",\"-ms-flex-item-align\":\"auto|start|end|center|baseline|stretch\",\"-ms-flex-line-pack\":\"start|end|center|justify|distribute|stretch\",\"-ms-flex-negative\":\"<'flex-shrink'>\",\"-ms-flex-pack\":\"start|end|center|justify|distribute\",\"-ms-flex-order\":\"<integer>\",\"-ms-flex-positive\":\"<'flex-grow'>\",\"-ms-flex-preferred-size\":\"<'flex-basis'>\",\"-ms-interpolation-mode\":\"nearest-neighbor|bicubic\",\"-ms-grid-column-align\":\"start|end|center|stretch\",\"-ms-grid-columns\":\"<track-list-v0>\",\"-ms-grid-row-align\":\"start|end|center|stretch\",\"-ms-grid-rows\":\"<track-list-v0>\",\"-ms-hyphenate-limit-last\":\"none|always|column|page|spread\",\"-webkit-background-clip\":\"[<box>|border|padding|content|text]#\",\"-webkit-column-break-after\":\"always|auto|avoid\",\"-webkit-column-break-before\":\"always|auto|avoid\",\"-webkit-column-break-inside\":\"always|auto|avoid\",\"-webkit-font-smoothing\":\"auto|none|antialiased|subpixel-antialiased\",\"-webkit-mask-box-image\":\"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?\",\"-webkit-print-color-adjust\":\"economy|exact\",\"-webkit-text-security\":\"none|circle|disc|square\",\"-webkit-user-drag\":\"none|element|auto\",\"-webkit-user-select\":\"auto|none|text|all\",\"alignment-baseline\":\"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical\",\"baseline-shift\":\"baseline|sub|super|<svg-length>\",behavior:\"<url>+\",\"clip-rule\":\"nonzero|evenodd\",cue:\"<'cue-before'> <'cue-after'>?\",\"cue-after\":\"<url> <decibel>?|none\",\"cue-before\":\"<url> <decibel>?|none\",\"dominant-baseline\":\"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge\",fill:\"<paint>\",\"fill-opacity\":\"<number-zero-one>\",\"fill-rule\":\"nonzero|evenodd\",\"glyph-orientation-horizontal\":\"<angle>\",\"glyph-orientation-vertical\":\"<angle>\",kerning:\"auto|<svg-length>\",marker:\"none|<url>\",\"marker-end\":\"none|<url>\",\"marker-mid\":\"none|<url>\",\"marker-start\":\"none|<url>\",pause:\"<'pause-before'> <'pause-after'>?\",\"pause-after\":\"<time>|none|x-weak|weak|medium|strong|x-strong\",\"pause-before\":\"<time>|none|x-weak|weak|medium|strong|x-strong\",rest:\"<'rest-before'> <'rest-after'>?\",\"rest-after\":\"<time>|none|x-weak|weak|medium|strong|x-strong\",\"rest-before\":\"<time>|none|x-weak|weak|medium|strong|x-strong\",\"shape-rendering\":\"auto|optimizeSpeed|crispEdges|geometricPrecision\",src:\"[<url> [format( <string># )]?|local( <family-name> )]#\",speak:\"auto|none|normal\",\"speak-as\":\"normal|spell-out||digits||[literal-punctuation|no-punctuation]\",stroke:\"<paint>\",\"stroke-dasharray\":\"none|[<svg-length>+]#\",\"stroke-dashoffset\":\"<svg-length>\",\"stroke-linecap\":\"butt|round|square\",\"stroke-linejoin\":\"miter|round|bevel\",\"stroke-miterlimit\":\"<number-one-or-greater>\",\"stroke-opacity\":\"<number-zero-one>\",\"stroke-width\":\"<svg-length>\",\"text-anchor\":\"start|middle|end\",\"unicode-range\":\"<urange>#\",\"voice-balance\":\"<number>|left|center|right|leftwards|rightwards\",\"voice-duration\":\"auto|<time>\",\"voice-family\":\"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve\",\"voice-pitch\":\"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]\",\"voice-range\":\"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]\",\"voice-rate\":\"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>\",\"voice-stress\":\"normal|strong|moderate|none|reduced\",\"voice-volume\":\"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]\"},Dr={generic:!0,types:Er,properties:Or},Rr=Object.freeze({__proto__:null,generic:!0,types:Er,properties:Or,default:Dr}),Ir=Se.cmpChar,Mr=Se.isDigit,Nr=Se.TYPE,Br=Nr.WhiteSpace,jr=Nr.Comment,_r=Nr.Ident,qr=Nr.Number,Wr=Nr.Dimension;function Fr(e,t){var n=this.scanner.tokenStart+e,r=this.scanner.source.charCodeAt(n);for(43!==r&&45!==r||(t&&this.error(\"Number sign is not allowed\"),n++);n<this.scanner.tokenEnd;n++)Mr(this.scanner.source.charCodeAt(n))||this.error(\"Integer is expected\",n)}function Ur(e){return Fr.call(this,0,e)}function Yr(e,t){if(!Ir(this.scanner.source,this.scanner.tokenStart+e,t)){var n=\"\";switch(t){case 110:n=\"N is expected\";break;case 45:n=\"HyphenMinus is expected\"}this.error(n,this.scanner.tokenStart+e)}}function Hr(){for(var e=0,t=0,n=this.scanner.tokenType;n===Br||n===jr;)n=this.scanner.lookupType(++e);if(n!==qr){if(!this.scanner.isDelim(43,e)&&!this.scanner.isDelim(45,e))return null;t=this.scanner.isDelim(43,e)?43:45;do{n=this.scanner.lookupType(++e)}while(n===Br||n===jr);n!==qr&&(this.scanner.skip(e),Ur.call(this,!0))}return e>0&&this.scanner.skip(e),0===t&&43!==(n=this.scanner.source.charCodeAt(this.scanner.tokenStart))&&45!==n&&this.error(\"Number sign is expected\"),Ur.call(this,0!==t),45===t?\"-\"+this.consume(qr):this.consume(qr)}var Vr={name:\"AnPlusB\",structure:{a:[String,null],b:[String,null]},parse:function(){var e=this.scanner.tokenStart,t=null,n=null;if(this.scanner.tokenType===qr)Ur.call(this,!1),n=this.consume(qr);else if(this.scanner.tokenType===_r&&Ir(this.scanner.source,this.scanner.tokenStart,45))switch(t=\"-1\",Yr.call(this,1,110),this.scanner.getTokenLength()){case 2:this.scanner.next(),n=Hr.call(this);break;case 3:Yr.call(this,2,45),this.scanner.next(),this.scanner.skipSC(),Ur.call(this,!0),n=\"-\"+this.consume(qr);break;default:Yr.call(this,2,45),Fr.call(this,3,!0),this.scanner.next(),n=this.scanner.substrToCursor(e+2)}else if(this.scanner.tokenType===_r||this.scanner.isDelim(43)&&this.scanner.lookupType(1)===_r){var r=0;switch(t=\"1\",this.scanner.isDelim(43)&&(r=1,this.scanner.next()),Yr.call(this,0,110),this.scanner.getTokenLength()){case 1:this.scanner.next(),n=Hr.call(this);break;case 2:Yr.call(this,1,45),this.scanner.next(),this.scanner.skipSC(),Ur.call(this,!0),n=\"-\"+this.consume(qr);break;default:Yr.call(this,1,45),Fr.call(this,2,!0),this.scanner.next(),n=this.scanner.substrToCursor(e+r+1)}}else if(this.scanner.tokenType===Wr){for(var a=this.scanner.source.charCodeAt(this.scanner.tokenStart),i=(r=43===a||45===a,this.scanner.tokenStart+r);i<this.scanner.tokenEnd&&Mr(this.scanner.source.charCodeAt(i));i++);i===this.scanner.tokenStart+r&&this.error(\"Integer is expected\",this.scanner.tokenStart+r),Yr.call(this,i-this.scanner.tokenStart,110),t=this.scanner.source.substring(e,i),i+1===this.scanner.tokenEnd?(this.scanner.next(),n=Hr.call(this)):(Yr.call(this,i-this.scanner.tokenStart+1,45),i+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),Ur.call(this,!0),n=\"-\"+this.consume(qr)):(Fr.call(this,i-this.scanner.tokenStart+2,!0),this.scanner.next(),n=this.scanner.substrToCursor(i+1)))}else this.error();return null!==t&&43===t.charCodeAt(0)&&(t=t.substr(1)),null!==n&&43===n.charCodeAt(0)&&(n=n.substr(1)),{type:\"AnPlusB\",loc:this.getLocation(e,this.scanner.tokenStart),a:t,b:n}},generate:function(e){var t=null!==e.a&&void 0!==e.a,n=null!==e.b&&void 0!==e.b;t?(this.chunk(\"+1\"===e.a?\"+n\":\"1\"===e.a?\"n\":\"-1\"===e.a?\"-n\":e.a+\"n\"),n&&(\"-\"===(n=String(e.b)).charAt(0)||\"+\"===n.charAt(0)?(this.chunk(n.charAt(0)),this.chunk(n.substr(1))):(this.chunk(\"+\"),this.chunk(n)))):this.chunk(String(e.b))}},Kr=Se.TYPE,Gr=Kr.WhiteSpace,$r=Kr.Semicolon,Qr=Kr.LeftCurlyBracket,Xr=Kr.Delim;function Zr(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===Gr?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function Jr(){return 0}var ea={name:\"Raw\",structure:{value:String},parse:function(e,t,n){var r,a=this.scanner.getTokenStart(e);return this.scanner.skip(this.scanner.getRawLength(e,t||Jr)),r=n&&this.scanner.tokenStart>a?Zr.call(this):this.scanner.tokenStart,{type:\"Raw\",loc:this.getLocation(a,r),value:this.scanner.source.substring(a,r)}},generate:function(e){this.chunk(e.value)},mode:{default:Jr,leftCurlyBracket:function(e){return e===Qr?1:0},leftCurlyBracketOrSemicolon:function(e){return e===Qr||e===$r?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===Xr&&33===t.charCodeAt(n)||e===$r?1:0},semicolonIncluded:function(e){return e===$r?2:0}}},ta=Se.TYPE,na=ea.mode,ra=ta.AtKeyword,aa=ta.Semicolon,ia=ta.LeftCurlyBracket,oa=ta.RightCurlyBracket;function sa(e){return this.Raw(e,na.leftCurlyBracketOrSemicolon,!0)}function la(){for(var e,t=1;e=this.scanner.lookupType(t);t++){if(e===oa)return!0;if(e===ia||e===ra)return!1}return!1}var ca={name:\"Atrule\",structure:{name:String,prelude:[\"AtrulePrelude\",\"Raw\",null],block:[\"Block\",null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null,a=null;switch(this.eat(ra),t=(e=this.scanner.substrToCursor(n+1)).toLowerCase(),this.scanner.skipSC(),!1===this.scanner.eof&&this.scanner.tokenType!==ia&&this.scanner.tokenType!==aa&&(this.parseAtrulePrelude?\"AtrulePrelude\"===(r=this.parseWithFallback(this.AtrulePrelude.bind(this,e),sa)).type&&null===r.children.head&&(r=null):r=sa.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case aa:this.scanner.next();break;case ia:a=this.atrule.hasOwnProperty(t)&&\"function\"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(la.call(this))}return{type:\"Atrule\",loc:this.getLocation(n,this.scanner.tokenStart),name:e,prelude:r,block:a}},generate:function(e){this.chunk(\"@\"),this.chunk(e.name),null!==e.prelude&&(this.chunk(\" \"),this.node(e.prelude)),e.block?this.node(e.block):this.chunk(\";\")},walkContext:\"atrule\"},ua=Se.TYPE,ha=ua.Semicolon,da=ua.LeftCurlyBracket,pa={name:\"AtrulePrelude\",structure:{children:[[]]},parse:function(e){var t=null;return null!==e&&(e=e.toLowerCase()),this.scanner.skipSC(),t=this.atrule.hasOwnProperty(e)&&\"function\"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),!0!==this.scanner.eof&&this.scanner.tokenType!==da&&this.scanner.tokenType!==ha&&this.error(\"Semicolon or block is expected\"),null===t&&(t=this.createList()),{type:\"AtrulePrelude\",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e)},walkContext:\"atrulePrelude\"},fa=Se.TYPE,ma=fa.Ident,ga=fa.String,ba=fa.Colon,ya=fa.LeftSquareBracket,ka=fa.RightSquareBracket;function va(){this.scanner.eof&&this.error(\"Unexpected end of input\");var e=this.scanner.tokenStart,t=!1,n=!0;return this.scanner.isDelim(42)?(t=!0,n=!1,this.scanner.next()):this.scanner.isDelim(124)||this.eat(ma),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(ma)):t&&this.error(\"Identifier is expected\",this.scanner.tokenEnd):t&&this.error(\"Vertical line is expected\"),n&&this.scanner.tokenType===ba&&(this.scanner.next(),this.eat(ma)),{type:\"Identifier\",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}}function wa(){var e=this.scanner.tokenStart,t=this.scanner.source.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error(\"Attribute selector (=, ~=, ^=, $=, *=, |=) is expected\"),this.scanner.next(),61!==t&&(this.scanner.isDelim(61)||this.error(\"Equal sign is expected\"),this.scanner.next()),this.scanner.substrToCursor(e)}var xa={name:\"AttributeSelector\",structure:{name:\"Identifier\",matcher:[String,null],value:[\"String\",\"Identifier\",null],flags:[String,null]},parse:function(){var e,t=this.scanner.tokenStart,n=null,r=null,a=null;return this.eat(ya),this.scanner.skipSC(),e=va.call(this),this.scanner.skipSC(),this.scanner.tokenType!==ka&&(this.scanner.tokenType!==ma&&(n=wa.call(this),this.scanner.skipSC(),r=this.scanner.tokenType===ga?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===ma&&(a=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(ka),{type:\"AttributeSelector\",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:n,value:r,flags:a}},generate:function(e){var t=\" \";this.chunk(\"[\"),this.node(e.name),null!==e.matcher&&(this.chunk(e.matcher),null!==e.value&&(this.node(e.value),\"String\"===e.value.type&&(t=\"\"))),null!==e.flags&&(this.chunk(t),this.chunk(e.flags)),this.chunk(\"]\")}},Sa=Se.TYPE,Ca=ea.mode,Aa=Sa.WhiteSpace,za=Sa.Comment,Pa=Sa.Semicolon,La=Sa.AtKeyword,Ta=Sa.LeftCurlyBracket,Ea=Sa.RightCurlyBracket;function Oa(e){return this.Raw(e,null,!0)}function Da(){return this.parseWithFallback(this.Rule,Oa)}function Ra(e){return this.Raw(e,Ca.semicolonIncluded,!0)}function Ia(){if(this.scanner.tokenType===Pa)return Ra.call(this,this.scanner.tokenIndex);var e=this.parseWithFallback(this.Declaration,Ra);return this.scanner.tokenType===Pa&&this.scanner.next(),e}var Ma={name:\"Block\",structure:{children:[[\"Atrule\",\"Rule\",\"Declaration\"]]},parse:function(e){var t=e?Ia:Da,n=this.scanner.tokenStart,r=this.createList();this.eat(Ta);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case Ea:break e;case Aa:case za:this.scanner.next();break;case La:r.push(this.parseWithFallback(this.Atrule,Oa));break;default:r.push(t.call(this))}return this.scanner.eof||this.eat(Ea),{type:\"Block\",loc:this.getLocation(n,this.scanner.tokenStart),children:r}},generate:function(e){this.chunk(\"{\"),this.children(e,(function(e){\"Declaration\"===e.type&&this.chunk(\";\")})),this.chunk(\"}\")},walkContext:\"block\"},Na=Se.TYPE,Ba=Na.LeftSquareBracket,ja=Na.RightSquareBracket,_a={name:\"Brackets\",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(Ba),n=e.call(this,t),this.scanner.eof||this.eat(ja),{type:\"Brackets\",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk(\"[\"),this.children(e),this.chunk(\"]\")}},qa=Se.TYPE.CDC,Wa={name:\"CDC\",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(qa),{type:\"CDC\",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk(\"--\\x3e\")}},Fa=Se.TYPE.CDO,Ua={name:\"CDO\",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(Fa),{type:\"CDO\",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk(\"\\x3c!--\")}},Ya=Se.TYPE.Ident,Ha={name:\"ClassSelector\",structure:{name:String},parse:function(){return this.scanner.isDelim(46)||this.error(\"Full stop is expected\"),this.scanner.next(),{type:\"ClassSelector\",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(Ya)}},generate:function(e){this.chunk(\".\"),this.chunk(e.name)}},Va=Se.TYPE.Ident,Ka={name:\"Combinator\",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 62:case 43:case 126:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.tokenType===Va&&!1!==this.scanner.lookupValue(0,\"deep\")||this.error(\"Identifier `deep` is expected\"),this.scanner.next(),this.scanner.isDelim(47)||this.error(\"Solidus is expected\"),this.scanner.next();break;default:this.error(\"Combinator is expected\")}return{type:\"Combinator\",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},Ga=Se.TYPE.Comment,$a={name:\"Comment\",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=this.scanner.tokenEnd;return this.eat(Ga),t-e+2>=2&&42===this.scanner.source.charCodeAt(t-2)&&47===this.scanner.source.charCodeAt(t-1)&&(t-=2),{type:\"Comment\",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e+2,t)}},generate:function(e){this.chunk(\"/*\"),this.chunk(e.value),this.chunk(\"*/\")}},Qa=ae.isCustomProperty,Xa=Se.TYPE,Za=ea.mode,Ja=Xa.Ident,ei=Xa.Hash,ti=Xa.Colon,ni=Xa.Semicolon,ri=Xa.Delim;function ai(e){return this.Raw(e,Za.exclamationMarkOrSemicolon,!0)}function ii(e){return this.Raw(e,Za.exclamationMarkOrSemicolon,!1)}function oi(){var e=this.scanner.tokenIndex,t=this.Value();return\"Raw\"!==t.type&&!1===this.scanner.eof&&this.scanner.tokenType!==ni&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(e)&&this.error(),t}var si={name:\"Declaration\",structure:{important:[Boolean,String],property:String,value:[\"Value\",\"Raw\"]},parse:function(){var e,t=this.scanner.tokenStart,n=this.scanner.tokenIndex,r=li.call(this),a=Qa(r),i=a?this.parseCustomProperty:this.parseValue,o=a?ii:ai,s=!1;return this.scanner.skipSC(),this.eat(ti),a||this.scanner.skipSC(),e=i?this.parseWithFallback(oi,o):o.call(this,this.scanner.tokenIndex),this.scanner.isDelim(33)&&(s=ci.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==ni&&!1===this.scanner.isBalanceEdge(n)&&this.error(),{type:\"Declaration\",loc:this.getLocation(t,this.scanner.tokenStart),important:s,property:r,value:e}},generate:function(e){this.chunk(e.property),this.chunk(\":\"),this.node(e.value),e.important&&this.chunk(!0===e.important?\"!important\":\"!\"+e.important)},walkContext:\"declaration\"};function li(){var e=this.scanner.tokenStart;if(this.scanner.tokenType===ri)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next()}return this.scanner.tokenType===ei?this.eat(ei):this.eat(Ja),this.scanner.substrToCursor(e)}function ci(){this.eat(ri),this.scanner.skipSC();var e=this.consume(Ja);return\"important\"===e||e}var ui=Se.TYPE,hi=ea.mode,di=ui.WhiteSpace,pi=ui.Comment,fi=ui.Semicolon;function mi(e){return this.Raw(e,hi.semicolonIncluded,!0)}var gi={name:\"DeclarationList\",structure:{children:[[\"Declaration\"]]},parse:function(){for(var e=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case di:case pi:case fi:this.scanner.next();break;default:e.push(this.parseWithFallback(this.Declaration,mi))}return{type:\"DeclarationList\",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(e){\"Declaration\"===e.type&&this.chunk(\";\")}))}},bi=j.consumeNumber,yi=Se.TYPE.Dimension,ki={name:\"Dimension\",structure:{value:String,unit:String},parse:function(){var e=this.scanner.tokenStart,t=bi(this.scanner.source,e);return this.eat(yi),{type:\"Dimension\",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t),unit:this.scanner.source.substring(t,this.scanner.tokenStart)}},generate:function(e){this.chunk(e.value),this.chunk(e.unit)}},vi=Se.TYPE.RightParenthesis,wi={name:\"Function\",structure:{name:String,children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart,a=this.consumeFunctionName(),i=a.toLowerCase();return n=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.scanner.eof||this.eat(vi),{type:\"Function\",loc:this.getLocation(r,this.scanner.tokenStart),name:a,children:n}},generate:function(e){this.chunk(e.name),this.chunk(\"(\"),this.children(e),this.chunk(\")\")},walkContext:\"function\"},xi=Se.TYPE.Hash,Si={name:\"HexColor\",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(xi),{type:\"HexColor\",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk(\"#\"),this.chunk(e.value)}},Ci=Se.TYPE.Ident,Ai={name:\"Identifier\",structure:{name:String},parse:function(){return{type:\"Identifier\",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(Ci)}},generate:function(e){this.chunk(e.name)}},zi=Se.TYPE.Hash,Pi={name:\"IdSelector\",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(zi),{type:\"IdSelector\",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk(\"#\"),this.chunk(e.name)}},Li=Se.TYPE,Ti=Li.Ident,Ei=Li.Number,Oi=Li.Dimension,Di=Li.LeftParenthesis,Ri=Li.RightParenthesis,Ii=Li.Colon,Mi=Li.Delim,Ni={name:\"MediaFeature\",structure:{name:String,value:[\"Identifier\",\"Number\",\"Dimension\",\"Ratio\",null]},parse:function(){var e,t=this.scanner.tokenStart,n=null;if(this.eat(Di),this.scanner.skipSC(),e=this.consume(Ti),this.scanner.skipSC(),this.scanner.tokenType!==Ri){switch(this.eat(Ii),this.scanner.skipSC(),this.scanner.tokenType){case Ei:n=this.lookupNonWSType(1)===Mi?this.Ratio():this.Number();break;case Oi:n=this.Dimension();break;case Ti:n=this.Identifier();break;default:this.error(\"Number, dimension, ratio or identifier is expected\")}this.scanner.skipSC()}return this.eat(Ri),{type:\"MediaFeature\",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:n}},generate:function(e){this.chunk(\"(\"),this.chunk(e.name),null!==e.value&&(this.chunk(\":\"),this.node(e.value)),this.chunk(\")\")}},Bi=Se.TYPE,ji=Bi.WhiteSpace,_i=Bi.Comment,qi=Bi.Ident,Wi=Bi.LeftParenthesis,Fi={name:\"MediaQuery\",structure:{children:[[\"Identifier\",\"MediaFeature\",\"WhiteSpace\"]]},parse:function(){this.scanner.skipSC();var e=this.createList(),t=null,n=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case _i:this.scanner.next();continue;case ji:n=this.WhiteSpace();continue;case qi:t=this.Identifier();break;case Wi:t=this.MediaFeature();break;default:break e}null!==n&&(e.push(n),n=null),e.push(t)}return null===t&&this.error(\"Identifier or parenthesis is expected\"),{type:\"MediaQuery\",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}},Ui=Se.TYPE.Comma,Yi={name:\"MediaQueryList\",structure:{children:[[\"MediaQuery\"]]},parse:function(e){var t=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(t.push(this.MediaQuery(e)),this.scanner.tokenType===Ui);)this.scanner.next();return{type:\"MediaQueryList\",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e,(function(){this.chunk(\",\")}))}},Hi=Se.TYPE.Number,Vi={name:\"Number\",structure:{value:String},parse:function(){return{type:\"Number\",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Hi)}},generate:function(e){this.chunk(e.value)}},Ki={name:\"Operator\",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.next(),{type:\"Operator\",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},Gi=Se.TYPE,$i=Gi.LeftParenthesis,Qi=Gi.RightParenthesis,Xi={name:\"Parentheses\",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat($i),n=e.call(this,t),this.scanner.eof||this.eat(Qi),{type:\"Parentheses\",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk(\"(\"),this.children(e),this.chunk(\")\")}},Zi=j.consumeNumber,Ji=Se.TYPE.Percentage,eo={name:\"Percentage\",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=Zi(this.scanner.source,e);return this.eat(Ji),{type:\"Percentage\",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t)}},generate:function(e){this.chunk(e.value),this.chunk(\"%\")}},to=Se.TYPE,no=to.Ident,ro=to.Function,ao=to.Colon,io=to.RightParenthesis,oo={name:\"PseudoClassSelector\",structure:{name:String,children:[[\"Raw\"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(ao),this.scanner.tokenType===ro?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(io)):e=this.consume(no),{type:\"PseudoClassSelector\",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk(\":\"),this.chunk(e.name),null!==e.children&&(this.chunk(\"(\"),this.children(e),this.chunk(\")\"))},walkContext:\"function\"},so=Se.TYPE,lo=so.Ident,co=so.Function,uo=so.Colon,ho=so.RightParenthesis,po={name:\"PseudoElementSelector\",structure:{name:String,children:[[\"Raw\"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(uo),this.eat(uo),this.scanner.tokenType===co?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(ho)):e=this.consume(lo),{type:\"PseudoElementSelector\",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk(\"::\"),this.chunk(e.name),null!==e.children&&(this.chunk(\"(\"),this.children(e),this.chunk(\")\"))},walkContext:\"function\"},fo=Se.isDigit,mo=Se.TYPE,go=mo.Number,bo=mo.Delim;function yo(){this.scanner.skipWS();for(var e=this.consume(go),t=0;t<e.length;t++){var n=e.charCodeAt(t);fo(n)||46===n||this.error(\"Unsigned number is expected\",this.scanner.tokenStart-e.length+t)}return 0===Number(e)&&this.error(\"Zero number is not allowed\",this.scanner.tokenStart-e.length),e}var ko={name:\"Ratio\",structure:{left:String,right:String},parse:function(){var e,t=this.scanner.tokenStart,n=yo.call(this);return this.scanner.skipWS(),this.scanner.isDelim(47)||this.error(\"Solidus is expected\"),this.eat(bo),e=yo.call(this),{type:\"Ratio\",loc:this.getLocation(t,this.scanner.tokenStart),left:n,right:e}},generate:function(e){this.chunk(e.left),this.chunk(\"/\"),this.chunk(e.right)}},vo=Se.TYPE,wo=ea.mode,xo=vo.LeftCurlyBracket;function So(e){return this.Raw(e,wo.leftCurlyBracket,!0)}function Co(){var e=this.SelectorList();return\"Raw\"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==xo&&this.error(),e}var Ao={name:\"Rule\",structure:{prelude:[\"SelectorList\",\"Raw\"],block:[\"Block\"]},parse:function(){var e,t,n=this.scanner.tokenIndex,r=this.scanner.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Co,So):So.call(this,n),t=this.Block(!0),{type:\"Rule\",loc:this.getLocation(r,this.scanner.tokenStart),prelude:e,block:t}},generate:function(e){this.node(e.prelude),this.node(e.block)},walkContext:\"rule\"},zo=Se.TYPE.Comma,Po={name:\"SelectorList\",structure:{children:[[\"Selector\",\"Raw\"]]},parse:function(){for(var e=this.createList();!this.scanner.eof&&(e.push(this.Selector()),this.scanner.tokenType===zo);)this.scanner.next();return{type:\"SelectorList\",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(){this.chunk(\",\")}))},walkContext:\"selector\"},Lo=Se.TYPE.String,To={name:\"String\",structure:{value:String},parse:function(){return{type:\"String\",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Lo)}},generate:function(e){this.chunk(e.value)}},Eo=Se.TYPE,Oo=Eo.WhiteSpace,Do=Eo.Comment,Ro=Eo.AtKeyword,Io=Eo.CDO,Mo=Eo.CDC;function No(e){return this.Raw(e,null,!1)}var Bo={name:\"StyleSheet\",structure:{children:[[\"Comment\",\"CDO\",\"CDC\",\"Atrule\",\"Rule\",\"Raw\"]]},parse:function(){for(var e,t=this.scanner.tokenStart,n=this.createList();!this.scanner.eof;){switch(this.scanner.tokenType){case Oo:this.scanner.next();continue;case Do:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}e=this.Comment();break;case Io:e=this.CDO();break;case Mo:e=this.CDC();break;case Ro:e=this.parseWithFallback(this.Atrule,No);break;default:e=this.parseWithFallback(this.Rule,No)}n.push(e)}return{type:\"StyleSheet\",loc:this.getLocation(t,this.scanner.tokenStart),children:n}},generate:function(e){this.children(e)},walkContext:\"stylesheet\"},jo=Se.TYPE.Ident;function _o(){this.scanner.tokenType!==jo&&!1===this.scanner.isDelim(42)&&this.error(\"Identifier or asterisk is expected\"),this.scanner.next()}var qo={name:\"TypeSelector\",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),_o.call(this)):(_o.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),_o.call(this))),{type:\"TypeSelector\",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},Wo=Se.isHexDigit,Fo=Se.cmpChar,Uo=Se.TYPE,Yo=Se.NAME,Ho=Uo.Ident,Vo=Uo.Number,Ko=Uo.Dimension;function Go(e,t){for(var n=this.scanner.tokenStart+e,r=0;n<this.scanner.tokenEnd;n++){var a=this.scanner.source.charCodeAt(n);if(45===a&&t&&0!==r)return 0===Go.call(this,e+r+1,!1)&&this.error(),-1;Wo(a)||this.error(t&&0!==r?\"HyphenMinus\"+(r<6?\" or hex digit\":\"\")+\" is expected\":r<6?\"Hex digit is expected\":\"Unexpected input\",n),++r>6&&this.error(\"Too many hex digits\",n)}return this.scanner.next(),r}function $o(e){for(var t=0;this.scanner.isDelim(63);)++t>e&&this.error(\"Too many question marks\"),this.scanner.next()}function Qo(e){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==e&&this.error(Yo[e]+\" is expected\")}function Xo(){var e=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===Ho?void((e=Go.call(this,0,!0))>0&&$o.call(this,6-e)):this.scanner.isDelim(63)?(this.scanner.next(),void $o.call(this,5)):void this.error(\"Hex digit or question mark is expected\")):this.scanner.tokenType===Vo?(Qo.call(this,43),e=Go.call(this,1,!0),this.scanner.isDelim(63)?void $o.call(this,6-e):this.scanner.tokenType===Ko||this.scanner.tokenType===Vo?(Qo.call(this,45),void Go.call(this,1,!1)):void 0):this.scanner.tokenType===Ko?(Qo.call(this,43),void((e=Go.call(this,1,!0))>0&&$o.call(this,6-e))):void this.error()}var Zo={name:\"UnicodeRange\",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return Fo(this.scanner.source,e,117)||this.error(\"U is expected\"),Fo(this.scanner.source,e+1,43)||this.error(\"Plus sign is expected\"),this.scanner.next(),Xo.call(this),{type:\"UnicodeRange\",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},Jo=Se.isWhiteSpace,es=Se.cmpStr,ts=Se.TYPE,ns=ts.Function,rs=ts.Url,as=ts.RightParenthesis,is={name:\"Url\",structure:{value:[\"String\",\"Raw\"]},parse:function(){var e,t=this.scanner.tokenStart;switch(this.scanner.tokenType){case rs:for(var n=t+4,r=this.scanner.tokenEnd-1;n<r&&Jo(this.scanner.source.charCodeAt(n));)n++;for(;n<r&&Jo(this.scanner.source.charCodeAt(r-1));)r--;e={type:\"Raw\",loc:this.getLocation(n,r),value:this.scanner.source.substring(n,r)},this.eat(rs);break;case ns:es(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,\"url(\")||this.error(\"Function name must be `url`\"),this.eat(ns),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(as);break;default:this.error(\"Url or Function is expected\")}return{type:\"Url\",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(e){this.chunk(\"url\"),this.chunk(\"(\"),this.node(e.value),this.chunk(\")\")}},os=Se.TYPE.WhiteSpace,ss=Object.freeze({type:\"WhiteSpace\",loc:null,value:\" \"}),ls={AnPlusB:Vr,Atrule:ca,AtrulePrelude:pa,AttributeSelector:xa,Block:Ma,Brackets:_a,CDC:Wa,CDO:Ua,ClassSelector:Ha,Combinator:Ka,Comment:$a,Declaration:si,DeclarationList:gi,Dimension:ki,Function:wi,HexColor:Si,Identifier:Ai,IdSelector:Pi,MediaFeature:Ni,MediaQuery:Fi,MediaQueryList:Yi,Nth:{name:\"Nth\",structure:{nth:[\"AnPlusB\",\"Identifier\"],selector:[\"SelectorList\",null]},parse:function(e){this.scanner.skipSC();var t,n=this.scanner.tokenStart,r=n,a=null;return t=this.scanner.lookupValue(0,\"odd\")||this.scanner.lookupValue(0,\"even\")?this.Identifier():this.AnPlusB(),this.scanner.skipSC(),e&&this.scanner.lookupValue(0,\"of\")?(this.scanner.next(),a=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(a.children).loc.end.offset)):this.needPositions&&(r=t.loc.end.offset),{type:\"Nth\",loc:this.getLocation(n,r),nth:t,selector:a}},generate:function(e){this.node(e.nth),null!==e.selector&&(this.chunk(\" of \"),this.node(e.selector))}},Number:Vi,Operator:Ki,Parentheses:Xi,Percentage:eo,PseudoClassSelector:oo,PseudoElementSelector:po,Ratio:ko,Raw:ea,Rule:Ao,Selector:{name:\"Selector\",structure:{children:[[\"TypeSelector\",\"IdSelector\",\"ClassSelector\",\"AttributeSelector\",\"PseudoClassSelector\",\"PseudoElementSelector\",\"Combinator\",\"WhiteSpace\"]]},parse:function(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error(\"Selector is expected\"),{type:\"Selector\",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}},SelectorList:Po,String:To,StyleSheet:Bo,TypeSelector:qo,UnicodeRange:Zo,Url:is,Value:{name:\"Value\",structure:{children:[[]]},parse:function(){var e=this.scanner.tokenStart,t=this.readSequence(this.scope.Value);return{type:\"Value\",loc:this.getLocation(e,this.scanner.tokenStart),children:t}},generate:function(e){this.children(e)}},WhiteSpace:{name:\"WhiteSpace\",structure:{value:String},parse:function(){return this.eat(os),ss},generate:function(e){this.chunk(e.value)}}},cs=Zn(Rr),us={generic:!0,types:cs.types,atrules:cs.atrules,properties:cs.properties,node:ls},hs=Se.cmpChar,ds=Se.cmpStr,ps=Se.TYPE,fs=ps.Ident,ms=ps.String,gs=ps.Number,bs=ps.Function,ys=ps.Url,ks=ps.Hash,vs=ps.Dimension,ws=ps.Percentage,xs=ps.LeftParenthesis,Ss=ps.LeftSquareBracket,Cs=ps.Comma,As=ps.Delim,zs=function(e){switch(this.scanner.tokenType){case ks:return this.HexColor();case Cs:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case xs:return this.Parentheses(this.readSequence,e.recognizer);case Ss:return this.Brackets(this.readSequence,e.recognizer);case ms:return this.String();case vs:return this.Dimension();case ws:return this.Percentage();case gs:return this.Number();case bs:return ds(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,\"url(\")?this.Url():this.Function(this.readSequence,e.recognizer);case ys:return this.Url();case fs:return hs(this.scanner.source,this.scanner.tokenStart,117)&&hs(this.scanner.source,this.scanner.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case As:var t=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(47===t||42===t||43===t||45===t)return this.Operator();35===t&&this.error(\"Hex or identifier is expected\",this.scanner.tokenStart+1)}},Ps={getNode:zs},Ls=Se.TYPE,Ts=Ls.Delim,Es=Ls.Ident,Os=Ls.Dimension,Ds=Ls.Percentage,Rs=Ls.Number,Is=Ls.Hash,Ms=Ls.Colon,Ns=Ls.LeftSquareBracket;var Bs={getNode:function(e){switch(this.scanner.tokenType){case Ns:return this.AttributeSelector();case Is:return this.IdSelector();case Ms:return this.scanner.lookupType(1)===Ms?this.PseudoElementSelector():this.PseudoClassSelector();case Es:return this.TypeSelector();case Rs:case Ds:return this.Percentage();case Os:46===this.scanner.source.charCodeAt(this.scanner.tokenStart)&&this.error(\"Identifier is expected\",this.scanner.tokenStart+1);break;case Ts:switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 43:case 62:case 126:return e.space=null,e.ignoreWSAfter=!0,this.Combinator();case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}},js=function(){this.scanner.skipSC();var e=this.createSingleNodeList(this.IdSelector());return this.scanner.skipSC(),e},_s=Se.TYPE,qs=ea.mode,Ws=_s.Comma,Fs={AtrulePrelude:Ps,Selector:Bs,Value:{getNode:zs,\"-moz-element\":js,element:js,expression:function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))},var:function(){var e=this.createList();return this.scanner.skipSC(),e.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===Ws&&(e.push(this.Operator()),e.push(this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,qs.exclamationMarkOrSemicolon,!1))),e}}},Us=Se.TYPE,Ys=Us.String,Hs=Us.Ident,Vs=Us.Url,Ks=Us.Function,Gs=Us.LeftParenthesis,$s={parse:{prelude:function(){var e=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case Ys:e.push(this.String());break;case Vs:case Ks:e.push(this.Url());break;default:this.error(\"String or url() is expected\")}return this.lookupNonWSType(0)!==Hs&&this.lookupNonWSType(0)!==Gs||(e.push(this.WhiteSpace()),e.push(this.MediaQueryList())),e},block:null}},Qs=Se.TYPE,Xs=Qs.WhiteSpace,Zs=Qs.Comment,Js=Qs.Ident,el=Qs.Function,tl=Qs.Colon,nl=Qs.LeftParenthesis;function rl(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function al(){return this.scanner.skipSC(),this.scanner.tokenType===Js&&this.lookupNonWSType(1)===tl?this.createSingleNodeList(this.Declaration()):il.call(this)}function il(){var e,t=this.createList(),n=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case Xs:n=this.WhiteSpace();continue;case Zs:this.scanner.next();continue;case el:e=this.Function(rl,this.scope.AtrulePrelude);break;case Js:e=this.Identifier();break;case nl:e=this.Parentheses(al,this.scope.AtrulePrelude);break;default:break e}null!==n&&(t.push(n),n=null),t.push(e)}return t}var ol={parse:function(){return this.createSingleNodeList(this.SelectorList())}},sl={parse:function(){return this.createSingleNodeList(this.Nth(!0))}},ll={parse:function(){return this.createSingleNodeList(this.Nth(!1))}};var cl=Tr(function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}(us,{parseContext:{default:\"StyleSheet\",stylesheet:\"StyleSheet\",atrule:\"Atrule\",atrulePrelude:function(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:\"MediaQueryList\",mediaQuery:\"MediaQuery\",rule:\"Rule\",selectorList:\"SelectorList\",selector:\"Selector\",block:function(){return this.Block(!0)},declarationList:\"DeclarationList\",declaration:\"Declaration\",value:\"Value\"},scope:Fs,atrule:{\"font-face\":{parse:{prelude:null,block:function(){return this.Block(!0)}}},import:$s,media:{parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}},page:{parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}},supports:{parse:{prelude:function(){var e=il.call(this);return null===this.getFirstListNode(e)&&this.error(\"Condition is expected\"),e},block:function(){return this.Block(!1)}}}},pseudo:{dir:{parse:function(){return this.createSingleNodeList(this.Identifier())}},has:{parse:function(){return this.createSingleNodeList(this.SelectorList())}},lang:{parse:function(){return this.createSingleNodeList(this.Identifier())}},matches:ol,not:ol,\"nth-child\":sl,\"nth-last-child\":sl,\"nth-last-of-type\":ll,\"nth-of-type\":ll,slotted:{parse:function(){return this.createSingleNodeList(this.Selector())}}},node:ls},{node:ls})),ul=Object.prototype.hasOwnProperty;function hl(e,t){var n=Object.create(null);if(!Array.isArray(e))return null;for(var r=0;r<e.length;r++){var a=e[r];t&&(a=a.toLowerCase()),n[a]=!0}return n}function dl(e){if(!e)return null;var t=hl(e.tags,!0),n=hl(e.ids),r=hl(e.classes);return null===t&&null===n&&null===r?null:{tags:t,ids:n,classes:r}}var pl={buildIndex:function(e){var t=!1;if(e.scopes&&Array.isArray(e.scopes)){t=Object.create(null);for(var n=0;n<e.scopes.length;n++){var r=e.scopes[n];if(!r||!Array.isArray(r))throw new Error(\"Wrong usage format\");for(var a=0;a<r.length;a++){var i=r[a];if(ul.call(t,i))throw new Error(\"Class can't be used for several scopes: \"+i);t[i]=n+1}}}return{whitelist:dl(e),blacklist:dl(e.blacklist),scopes:t}}},fl={hasNoChildren:function(e){return!e||!e.children||e.children.isEmpty()},isNodeChildrenList:function(e,t){return null!==e&&e.children===t}},ml=cl.keyword,{hasNoChildren:gl}=fl,{isNodeChildrenList:bl}=fl,yl=Object.prototype.hasOwnProperty,kl=cl.walk,{hasNoChildren:vl}=fl;var{isNodeChildrenList:wl}=fl;function xl(e){return\"Operator\"===e.type&&\"+\"!==e.value&&\"-\"!==e.value}var Sl=cl.walk,Cl={Atrule:function(e,t,n){if(e.block&&(null!==this.stylesheet&&(this.stylesheet.firstAtrulesAllowed=!1),gl(e.block)))n.remove(t);else switch(e.name){case\"charset\":if(gl(e.prelude))return void n.remove(t);if(t.prev)return void n.remove(t);break;case\"import\":if(null===this.stylesheet||!this.stylesheet.firstAtrulesAllowed)return void n.remove(t);n.prevUntil(t.prev,(function(e){if(\"Atrule\"!==e.type||\"import\"!==e.name&&\"charset\"!==e.name)return this.root.firstAtrulesAllowed=!1,n.remove(t),!0}),this);break;default:var r=ml(e.name).basename;\"keyframes\"!==r&&\"media\"!==r&&\"supports\"!==r||(gl(e.prelude)||gl(e.block))&&n.remove(t)}},Comment:function(e,t,n){n.remove(t)},Declaration:function(e,t,n){e.value.children&&e.value.children.isEmpty()&&n.remove(t)},Raw:function(e,t,n){(bl(this.stylesheet,n)||bl(this.block,n))&&n.remove(t)},Rule:function(e,t,n,r){if(vl(e.prelude)||vl(e.block))n.remove(t);else{var a=r.usage;!a||null===a.whitelist&&null===a.blacklist||(function e(t,n){return t.children.each((function(r,a,i){var o=!1;kl(r,(function(r){if(null===this.selector||this.selector===t)switch(r.type){case\"SelectorList\":null!==this.function&&\"not\"===this.function.name.toLowerCase()||e(r,n)&&(o=!0);break;case\"ClassSelector\":null===n.whitelist||null===n.whitelist.classes||yl.call(n.whitelist.classes,r.name)||(o=!0),null!==n.blacklist&&null!==n.blacklist.classes&&yl.call(n.blacklist.classes,r.name)&&(o=!0);break;case\"IdSelector\":null===n.whitelist||null===n.whitelist.ids||yl.call(n.whitelist.ids,r.name)||(o=!0),null!==n.blacklist&&null!==n.blacklist.ids&&yl.call(n.blacklist.ids,r.name)&&(o=!0);break;case\"TypeSelector\":\"*\"!==r.name.charAt(r.name.length-1)&&(null===n.whitelist||null===n.whitelist.tags||yl.call(n.whitelist.tags,r.name.toLowerCase())||(o=!0),null!==n.blacklist&&null!==n.blacklist.tags&&yl.call(n.blacklist.tags,r.name.toLowerCase())&&(o=!0))}})),o&&i.remove(a)})),t.children.isEmpty()}(e.prelude,a),!vl(e.prelude))||n.remove(t)}},TypeSelector:function(e,t,n){if(\"*\"===t.data.name){var r=t.next&&t.next.data.type;\"IdSelector\"!==r&&\"ClassSelector\"!==r&&\"AttributeSelector\"!==r&&\"PseudoClassSelector\"!==r&&\"PseudoElementSelector\"!==r||n.remove(t)}},WhiteSpace:function(e,t,n){null!==t.next&&null!==t.prev?wl(this.stylesheet,n)||wl(this.block,n)?n.remove(t):\"WhiteSpace\"!==t.next.data.type?(xl(t.prev.data)||xl(t.next.data))&&n.remove(t):n.remove(t):n.remove(t)}},Al=cl.keyword,zl=/\\\\([0-9A-Fa-f]{1,6})(\\r\\n|[ \\t\\n\\f\\r])?|\\\\./g,Pl=/^(-?\\d|--)|[\\u0000-\\u002c\\u002e\\u002f\\u003A-\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u009f]/;var Ll=cl.List;var Tl=function(e){e.children.each((function(e,t,n){\"Identifier\"===e.type&&\"none\"===e.name.toLowerCase()&&(n.head===n.tail?t.data={type:\"Number\",loc:e.loc,value:\"0\"}:function(e,t){var n=t.prev,r=t.next;null!==r?\"WhiteSpace\"!==r.data.type||null!==n&&\"WhiteSpace\"!==n.data.type||e.remove(r):null!==n&&\"WhiteSpace\"===n.data.type&&e.remove(n),e.remove(t)}(n,t))}))},El=cl.property,Ol={font:function(e){var t=e.children;t.eachRight((function(e,t){if(\"Identifier\"===e.type)if(\"bold\"===e.name)t.data={type:\"Number\",loc:e.loc,value:\"700\"};else if(\"normal\"===e.name){var n=t.prev;n&&\"Operator\"===n.data.type&&\"/\"===n.data.value&&this.remove(n),this.remove(t)}else if(\"medium\"===e.name){var r=t.next;r&&\"Operator\"===r.data.type||this.remove(t)}})),t.each((function(e,t){\"WhiteSpace\"===e.type&&(t.prev&&t.next&&\"WhiteSpace\"!==t.next.data.type||this.remove(t))})),t.isEmpty()&&t.insert(t.createItem({type:\"Identifier\",name:\"normal\"}))},\"font-weight\":function(e){var t=e.children.head.data;if(\"Identifier\"===t.type)switch(t.name){case\"normal\":e.children.head.data={type:\"Number\",loc:t.loc,value:\"400\"};break;case\"bold\":e.children.head.data={type:\"Number\",loc:t.loc,value:\"700\"}}},background:function(e){function t(){if(a.length)return a[a.length-1].type}function n(){\"WhiteSpace\"===t()&&a.pop(),a.length||a.unshift({type:\"Number\",loc:null,value:\"0\"},{type:\"WhiteSpace\",value:\" \"},{type:\"Number\",loc:null,value:\"0\"}),r.push.apply(r,a),a=[]}var r=[],a=[];e.children.each((function(e){if(\"Operator\"===e.type&&\",\"===e.value)return n(),void r.push(e);(\"Identifier\"!==e.type||\"transparent\"!==e.name&&\"none\"!==e.name&&\"repeat\"!==e.name&&\"scroll\"!==e.name)&&(\"WhiteSpace\"!==e.type||a.length&&\"WhiteSpace\"!==t())&&a.push(e)})),n(),e.children=(new Ll).fromArray(r)},border:Tl,outline:Tl},Dl=/^(?:\\+|(-))?0*(\\d*)(?:\\.0*|(\\.\\d*?)0*)?$/,Rl=/^([\\+\\-])?0*(\\d*)(?:\\.0*|(\\.\\d*?)0*)?$/,Il={Dimension:!0,HexColor:!0,Identifier:!0,Number:!0,Raw:!0,UnicodeRange:!0};function Ml(e,t){var n=t&&null!==t.prev&&Il.hasOwnProperty(t.prev.data.type)?Rl:Dl;return\"\"!==(e=String(e).replace(n,\"$1$2$3\"))&&\"-\"!==e||(e=\"0\"),e}var Nl=function(e,t){e.value=Ml(e.value,t)},Bl=Nl.pack=Ml,jl={px:!0,mm:!0,cm:!0,in:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vh:!0,vw:!0,vmin:!0,vmax:!0,vm:!0},_l=cl.lexer,ql=Nl.pack,Wl=new Set([\"width\",\"min-width\",\"max-width\",\"height\",\"min-height\",\"max-height\",\"flex\",\"-ms-flex\"]),Fl=new RegExp(\"^((\\\\\\\\[0-9a-f]{1,6}(\\\\r\\\\n|[ \\\\n\\\\r\\\\t\\\\f])?|\\\\\\\\[^\\\\n\\\\r\\\\f0-9a-fA-F])|[^\\\"'\\\\(\\\\)\\\\\\\\\\\\s\\0\\b\\v\u000e-\u001f])*$\",\"i\"),Ul=cl.lexer,Yl=Nl.pack,Hl={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"0ff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"00f\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"0ff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgrey:\"a9a9a9\",darkgreen:\"006400\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"f0f\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",grey:\"808080\",green:\"008000\",greenyellow:\"adff2f\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgrey:\"d3d3d3\",lightgreen:\"90ee90\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"639\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},Vl={8e5:\"maroon\",800080:\"purple\",808e3:\"olive\",808080:\"gray\",\"00ffff\":\"cyan\",f0ffff:\"azure\",f5f5dc:\"beige\",ffe4c4:\"bisque\",\"000000\":\"black\",\"0000ff\":\"blue\",a52a2a:\"brown\",ff7f50:\"coral\",ffd700:\"gold\",\"008000\":\"green\",\"4b0082\":\"indigo\",fffff0:\"ivory\",f0e68c:\"khaki\",\"00ff00\":\"lime\",faf0e6:\"linen\",\"000080\":\"navy\",ffa500:\"orange\",da70d6:\"orchid\",cd853f:\"peru\",ffc0cb:\"pink\",dda0dd:\"plum\",f00:\"red\",ff0000:\"red\",fa8072:\"salmon\",a0522d:\"sienna\",c0c0c0:\"silver\",fffafa:\"snow\",d2b48c:\"tan\",\"008080\":\"teal\",ff6347:\"tomato\",ee82ee:\"violet\",f5deb3:\"wheat\",ffffff:\"white\",ffff00:\"yellow\"};function Kl(e,t,n){return n<0&&(n+=1),n>1&&(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 Gl(e,t,n,r){var a,i,o;if(0===t)a=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;a=Kl(l,s,e+1/3),i=Kl(l,s,e),o=Kl(l,s,e-1/3)}return[Math.round(255*a),Math.round(255*i),Math.round(255*o),r]}function $l(e){return 1===(e=e.toString(16)).length?\"0\"+e:e}function Ql(e,t,n){for(var r=e.head,a=[],i=!1;null!==r;){var o=r.data,s=o.type;switch(s){case\"Number\":case\"Percentage\":if(i)return;i=!0,a.push({type:s,value:Number(o.value)});break;case\"Operator\":if(\",\"===o.value){if(!i)return;i=!1}else if(i||\"+\"!==o.value)return;break;default:return}r=r.next}if(a.length===t){if(4===a.length){if(\"Number\"!==a[3].type)return;a[3].type=\"Alpha\"}if(n){if(a[0].type!==a[1].type||a[0].type!==a[2].type)return}else{if(\"Number\"!==a[0].type||\"Percentage\"!==a[1].type||\"Percentage\"!==a[2].type)return;a[0].type=\"Angle\"}return a.map((function(e){var t=Math.max(0,e.value);switch(e.type){case\"Number\":t=Math.min(t,255);break;case\"Percentage\":if(t=Math.min(t,100)/100,!n)return t;t*=255;break;case\"Angle\":return(t%360+360)%360/360;case\"Alpha\":return Math.min(t,1)}return Math.round(t)}))}}function Xl(e,t){var n=e.value.toLowerCase();6===n.length&&n[0]===n[1]&&n[2]===n[3]&&n[4]===n[5]&&(n=n[0]+n[2]+n[4]),Vl[n]?t.data={type:\"Identifier\",loc:e.loc,name:Vl[n]}:e.value=n}var Zl={compressFunction:function(e,t,n){var r,a=e.name;if(\"rgba\"===a||\"hsla\"===a){if(!(r=Ql(e.children,4,\"rgba\"===a)))return;if(\"hsla\"===a&&(r=Gl.apply(null,r),e.name=\"rgba\"),0===r[3]){var i=this.function&&this.function.name;if(0===r[0]&&0===r[1]&&0===r[2]||!/^(?:to|from|color-stop)$|gradient$/i.test(i))return void(t.data={type:\"Identifier\",loc:e.loc,name:\"transparent\"})}if(1!==r[3])return void e.children.each((function(e,t,n){\"Operator\"!==e.type?t.data={type:\"Number\",loc:e.loc,value:Yl(r.shift(),null)}:\",\"!==e.value&&n.remove(t)}));a=\"rgb\"}if(\"hsl\"===a){if(!(r=r||Ql(e.children,3,!1)))return;r=Gl.apply(null,r),a=\"rgb\"}if(\"rgb\"===a){if(!(r=r||Ql(e.children,3,!0)))return;var o=t.next;o&&\"WhiteSpace\"!==o.data.type&&n.insert(n.createItem({type:\"WhiteSpace\",value:\" \"}),o),t.data={type:\"HexColor\",loc:e.loc,value:$l(r[0])+$l(r[1])+$l(r[2])},Xl(t.data,t)}},compressIdent:function(e,t){if(null!==this.declaration){var n=e.name.toLowerCase();if(Hl.hasOwnProperty(n)&&Ul.matchDeclaration(this.declaration).isType(e,\"color\")){var r=Hl[n];r.length+1<=n.length?t.data={type:\"HexColor\",loc:e.loc,value:r}:(\"grey\"===n&&(n=\"gray\"),e.name=n)}}},compressHex:Xl},Jl=cl.walk,ec={Atrule:function(e){\"keyframes\"===Al(e.name).basename&&function(e){e.block.children.each((function(e){e.prelude.children.each((function(e){e.children.each((function(e,t){\"Percentage\"===e.type&&\"100\"===e.value?t.data={type:\"TypeSelector\",loc:e.loc,name:\"to\"}:\"TypeSelector\"===e.type&&\"from\"===e.name&&(t.data={type:\"Percentage\",loc:e.loc,value:\"0\"})}))}))}))}(e)},AttributeSelector:function(e){var t=e.value;if(t&&\"String\"===t.type){var n=t.value.replace(/^(.)(.*)\\1$/,\"$2\");(function(e){if(\"\"!==e&&\"-\"!==e)return e=e.replace(zl,\"a\"),!Pl.test(e)})(n)&&(e.value={type:\"Identifier\",loc:t.loc,name:n})}},Value:function(e){if(this.declaration){var t=El(this.declaration.property);Ol.hasOwnProperty(t.basename)&&Ol[t.basename](e)}},Dimension:function(e,t){var n=Bl(e.value,t);if(e.value=n,\"0\"===n&&null!==this.declaration&&null===this.atrulePrelude){var r=e.unit.toLowerCase();if(!jl.hasOwnProperty(r))return;if(\"-ms-flex\"===this.declaration.property||\"flex\"===this.declaration.property)return;if(this.function&&\"calc\"===this.function.name)return;t.data={type:\"Number\",loc:e.loc,value:n}}},Percentage:function(e,t){e.value=ql(e.value,t),\"0\"===e.value&&this.declaration&&!Wl.has(this.declaration.property)&&(t.data={type:\"Number\",loc:e.loc,value:e.value},_l.matchDeclaration(this.declaration).isType(t.data,\"length\")||(t.data=e))},Number:Nl,String:function(e){var t=e.value;t=t.replace(/\\\\(\\r\\n|\\r|\\n|\\f)/g,\"\"),e.value=t},Url:function(e){var t=e.value;if(\"String\"===t.type){var n=t.value[0],r=t.value.substr(1,t.value.length-2);r=r.replace(/\\\\\\\\/g,\"/\"),Fl.test(r)?e.value={type:\"Raw\",loc:e.value.loc,value:r}:e.value.value=-1===r.indexOf('\"')?'\"'+r+'\"':n+r+n}},HexColor:Zl.compressHex,Identifier:Zl.compressIdent,Function:Zl.compressFunction},tc=cl.generate;function nc(){this.seed=0,this.map=Object.create(null)}nc.prototype.resolve=function(e){var t=this.map[e];return t||(t=++this.seed,this.map[e]=t),t};var rc=cl.generate,ac={\"first-letter\":!0,\"first-line\":!0,after:!0,before:!0},ic={link:!0,visited:!0,hover:!0,active:!0,\"first-letter\":!0,\"first-line\":!0,after:!0,before:!0},oc=cl.keyword,sc=cl.walk,lc=cl.generate,cc=function(e,t){var n,r=(n=new nc,function(e){var t=tc(e);return e.id=n.resolve(t),e.length=t.length,e.fingerprint=null,e});return sc(e,{visit:\"Rule\",enter:function(e){e.block.children.each(r),function(e,t){var n=Object.create(null),r=!1;e.prelude.children.each((function(e){var a=\"*\",i=0;e.children.each((function(o){switch(o.type){case\"ClassSelector\":if(t&&t.scopes){var s=t.scopes[o.name]||0;if(0!==i&&s!==i)throw new Error(\"Selector can't has classes from different scopes: \"+rc(e));i=s}break;case\"PseudoClassSelector\":var l=o.name.toLowerCase();ic.hasOwnProperty(l)||(n[l]=!0,r=!0);break;case\"PseudoElementSelector\":l=o.name.toLowerCase();ac.hasOwnProperty(l)||(n[l]=!0,r=!0);break;case\"TypeSelector\":a=o.name.toLowerCase();break;case\"AttributeSelector\":o.flags&&(n[\"[\"+o.flags.toLowerCase()+\"]\"]=!0,r=!0);break;case\"WhiteSpace\":case\"Combinator\":a=\"*\"}})),e.compareMarker=function(e){var t=0,n=0,r=0;return e.children.each((function e(a){switch(a.type){case\"SelectorList\":case\"Selector\":a.children.each(e);break;case\"IdSelector\":t++;break;case\"ClassSelector\":case\"AttributeSelector\":n++;break;case\"PseudoClassSelector\":switch(a.name.toLowerCase()){case\"not\":a.children.each(e);break;case\"before\":case\"after\":case\"first-line\":case\"first-letter\":r++;break;default:n++}break;case\"PseudoElementSelector\":r++;break;case\"TypeSelector\":\"*\"!==a.name.charAt(a.name.length-1)&&r++}})),[t,n,r]}(e).toString(),e.id=null,e.id=rc(e),i&&(e.compareMarker+=\":\"+i),\"*\"!==a&&(e.compareMarker+=\",\"+a)})),e.pseudoSignature=r&&Object.keys(n).sort().join(\",\")}(e,t.usage)}}),sc(e,{visit:\"Atrule\",enter:function(e){e.prelude&&(e.prelude.id=null,e.prelude.id=lc(e.prelude)),\"keyframes\"===oc(e.name).basename&&(e.block.avoidRulesMerge=!0,e.block.children.each((function(e){e.prelude.children.each((function(e){e.compareMarker=e.id}))})))}}),{declaration:r}},uc=cl.List,hc=cl.keyword,dc=Object.prototype.hasOwnProperty,pc=cl.walk;function fc(e,t,n,r){var a=t.data,i=hc(a.name).basename,o=a.name.toLowerCase()+\"/\"+(a.prelude?a.prelude.id:null);dc.call(e,i)||(e[i]=Object.create(null)),r&&delete e[i][o],dc.call(e[i],o)||(e[i][o]=new uc),e[i][o].append(n.remove(t))}function mc(e){return\"Atrule\"===e.type&&\"media\"===e.name}function gc(e,t,n){if(mc(e)){var r=t.prev&&t.prev.data;r&&mc(r)&&e.prelude&&r.prelude&&e.prelude.id===r.prelude.id&&(r.block.children.appendList(e.block.children),n.remove(t))}}var bc=function(e,t){!function(e,t){var n=Object.create(null),r=null;for(var a in e.children.each((function(e,a,i){if(\"Atrule\"===e.type){var o=hc(e.name).basename;switch(o){case\"keyframes\":return void fc(n,a,i,!0);case\"media\":if(t.forceMediaMerge)return void fc(n,a,i,!1)}null===r&&\"charset\"!==o&&\"import\"!==o&&(r=a)}else null===r&&(r=a)})),n)for(var i in n[a])e.children.insertList(n[a][i],\"media\"===a?null:r)}(e,t),pc(e,{visit:\"Atrule\",reverse:!0,enter:gc})},yc=Object.prototype.hasOwnProperty;function kc(e,t){for(var n=e.head;null!==n;){for(var r=t.head;null!==r;){if(n.data.compareMarker===r.data.compareMarker)return!0;r=r.next}n=n.next}return!1}var vc={isEqualSelectors:function(e,t){for(var n=e.head,r=t.head;null!==n&&null!==r&&n.data.id===r.data.id;)n=n.next,r=r.next;return null===n&&null===r},isEqualDeclarations:function(e,t){for(var n=e.head,r=t.head;null!==n&&null!==r&&n.data.id===r.data.id;)n=n.next,r=r.next;return null===n&&null===r},compareDeclarations:function(e,t){for(var n={eq:[],ne1:[],ne2:[],ne2overrided:[]},r=Object.create(null),a=Object.create(null),i=t.head;i;i=i.next)a[i.data.id]=!0;for(i=e.head;i;i=i.next){(o=i.data).fingerprint&&(r[o.fingerprint]=o.important),a[o.id]?(a[o.id]=!1,n.eq.push(o)):n.ne1.push(o)}for(i=t.head;i;i=i.next){var o;a[(o=i.data).id]&&((!yc.call(r,o.fingerprint)||!r[o.fingerprint]&&o.important)&&n.ne2.push(o),n.ne2overrided.push(o))}return n},addSelectors:function(e,t){return t.each((function(t){for(var n=t.id,r=e.head;r;){var a=r.data.id;if(a===n)return;if(a>n)break;r=r.next}e.insert(e.createItem(t),r)})),e},hasSimilarSelectors:kc,unsafeToSkipNode:function e(t){switch(t.type){case\"Rule\":return kc(t.prelude.children,this);case\"Atrule\":if(t.block)return t.block.children.some(e,this);break;case\"Declaration\":return!1}return!0}},wc=cl.walk;function xc(e,t,n){var r=e.prelude.children,a=e.block.children;n.prevUntil(t.prev,(function(i){if(\"Rule\"!==i.type)return vc.unsafeToSkipNode.call(r,i);var o=i.prelude.children,s=i.block.children;if(e.pseudoSignature===i.pseudoSignature){if(vc.isEqualSelectors(o,r))return s.appendList(a),n.remove(t),!0;if(vc.isEqualDeclarations(a,s))return vc.addSelectors(o,r),n.remove(t),!0}return vc.hasSimilarSelectors(r,o)}))}var Sc=cl.List,Cc=cl.walk;function Ac(e,t,n){for(var r=e.prelude.children;r.head!==r.tail;){var a=new Sc;a.insert(r.remove(r.head)),n.insert(n.createItem({type:\"Rule\",loc:e.loc,prelude:{type:\"SelectorList\",loc:e.prelude.loc,children:a},block:{type:\"Block\",loc:e.block.loc,children:e.block.children.copy()},pseudoSignature:e.pseudoSignature}),t)}}var zc=cl.List,Pc=cl.generate,Lc=cl.walk,Tc=[\"top\",\"right\",\"bottom\",\"left\"],Ec={\"margin-top\":\"top\",\"margin-right\":\"right\",\"margin-bottom\":\"bottom\",\"margin-left\":\"left\",\"padding-top\":\"top\",\"padding-right\":\"right\",\"padding-bottom\":\"bottom\",\"padding-left\":\"left\",\"border-top-color\":\"top\",\"border-right-color\":\"right\",\"border-bottom-color\":\"bottom\",\"border-left-color\":\"left\",\"border-top-width\":\"top\",\"border-right-width\":\"right\",\"border-bottom-width\":\"bottom\",\"border-left-width\":\"left\",\"border-top-style\":\"top\",\"border-right-style\":\"right\",\"border-bottom-style\":\"bottom\",\"border-left-style\":\"left\"},Oc={margin:\"margin\",\"margin-top\":\"margin\",\"margin-right\":\"margin\",\"margin-bottom\":\"margin\",\"margin-left\":\"margin\",padding:\"padding\",\"padding-top\":\"padding\",\"padding-right\":\"padding\",\"padding-bottom\":\"padding\",\"padding-left\":\"padding\",\"border-color\":\"border-color\",\"border-top-color\":\"border-color\",\"border-right-color\":\"border-color\",\"border-bottom-color\":\"border-color\",\"border-left-color\":\"border-color\",\"border-width\":\"border-width\",\"border-top-width\":\"border-width\",\"border-right-width\":\"border-width\",\"border-bottom-width\":\"border-width\",\"border-left-width\":\"border-width\",\"border-style\":\"border-style\",\"border-top-style\":\"border-style\",\"border-right-style\":\"border-style\",\"border-bottom-style\":\"border-style\",\"border-left-style\":\"border-style\"};function Dc(e){this.name=e,this.loc=null,this.iehack=void 0,this.sides={top:null,right:null,bottom:null,left:null}}function Rc(e,t,n,r){var a=e.block.children,i=e.prelude.children.first().id;return e.block.children.eachRight((function(e,o){var s=e.property;if(Oc.hasOwnProperty(s)){var l,c,u=Oc[s];r&&i!==r||u in t&&(c=2,l=t[u]),l&&l.add(s,e)||(c=1,(l=new Dc(u)).add(s,e))?(t[u]=l,n.push({operation:c,block:a,item:o,shorthand:l}),r=i):r=null}})),r}Dc.prototype.getValueSequence=function(e,t){var n=[],r=\"\";return!(e.value.children.some((function(t){var a=!1;switch(t.type){case\"Identifier\":switch(t.name){case\"\\\\0\":case\"\\\\9\":return void(r=t.name);case\"inherit\":case\"initial\":case\"unset\":case\"revert\":a=t.name}break;case\"Dimension\":switch(t.unit){case\"rem\":case\"vw\":case\"vh\":case\"vmin\":case\"vmax\":case\"vm\":a=t.unit}break;case\"HexColor\":case\"Number\":case\"Percentage\":break;case\"Function\":a=t.name;break;case\"WhiteSpace\":return!1;default:return!0}n.push({node:t,special:a,important:e.important})}))||n.length>t)&&((\"string\"!=typeof this.iehack||this.iehack===r)&&(this.iehack=r,n))},Dc.prototype.canOverride=function(e,t){var n=this.sides[e];return!n||t.important&&!n.important},Dc.prototype.add=function(e,t){return!!function(){var n=this.sides,r=Ec[e];if(r){if(r in n==!1)return!1;if(!(i=this.getValueSequence(t,1))||!i.length)return!1;for(var a in n)if(null!==n[a]&&n[a].special!==i[0].special)return!1;return!this.canOverride(r,i[0])||(n[r]=i[0],!0)}if(e===this.name){var i;if(!(i=this.getValueSequence(t,4))||!i.length)return!1;switch(i.length){case 1:i[1]=i[0],i[2]=i[0],i[3]=i[0];break;case 2:i[2]=i[0],i[3]=i[1];break;case 3:i[3]=i[1]}for(var o=0;o<4;o++)for(var a in n)if(null!==n[a]&&n[a].special!==i[o].special)return!1;for(o=0;o<4;o++)this.canOverride(Tc[o],i[o])&&(n[Tc[o]]=i[o]);return!0}}.call(this)&&(this.loc||(this.loc=t.loc),!0)},Dc.prototype.isOkToMinimize=function(){var e=this.sides.top,t=this.sides.right,n=this.sides.bottom,r=this.sides.left;if(e&&t&&n&&r){var a=e.important+t.important+n.important+r.important;return 0===a||4===a}return!1},Dc.prototype.getValue=function(){var e=new zc,t=this.sides,n=[t.top,t.right,t.bottom,t.left],r=[Pc(t.top.node),Pc(t.right.node),Pc(t.bottom.node),Pc(t.left.node)];r[3]===r[1]&&(n.pop(),r[2]===r[0]&&(n.pop(),r[1]===r[0]&&n.pop()));for(var a=0;a<n.length;a++)a&&e.appendData({type:\"WhiteSpace\",value:\" \"}),e.appendData(n[a].node);return this.iehack&&(e.appendData({type:\"WhiteSpace\",value:\" \"}),e.appendData({type:\"Identifier\",loc:null,name:this.iehack})),{type:\"Value\",loc:null,children:e}},Dc.prototype.getDeclaration=function(){return{type:\"Declaration\",loc:this.loc,important:this.sides.top.important,property:this.name,value:this.getValue()}};var Ic=function(e,t){var n={},r=[];Lc(e,{visit:\"Rule\",reverse:!0,enter:function(e){var t,a,i=this.block||this.stylesheet,o=(e.pseudoSignature||\"\")+\"|\"+e.prelude.children.first().id;n.hasOwnProperty(i.id)?t=n[i.id]:(t={lastShortSelector:null},n[i.id]=t),t.hasOwnProperty(o)?a=t[o]:(a={},t[o]=a),t.lastShortSelector=Rc.call(this,e,a,r,t.lastShortSelector)}}),function(e,t){e.forEach((function(e){var n=e.shorthand;n.isOkToMinimize()&&(1===e.operation?e.item.data=t(n.getDeclaration()):e.block.remove(e.item))}))}(r,t.declaration)},Mc=cl.property,Nc=cl.keyword,Bc=cl.walk,jc=cl.generate,_c=1,qc={src:1},Wc={display:/table|ruby|flex|-(flex)?box$|grid|contents|run-in/i,\"text-align\":/^(start|end|match-parent|justify-all)$/i},Fc=[\"auto\",\"crosshair\",\"default\",\"move\",\"text\",\"wait\",\"help\",\"n-resize\",\"e-resize\",\"s-resize\",\"w-resize\",\"ne-resize\",\"nw-resize\",\"se-resize\",\"sw-resize\",\"pointer\",\"progress\",\"not-allowed\",\"no-drop\",\"vertical-text\",\"all-scroll\",\"col-resize\",\"row-resize\"],Uc=[\"static\",\"relative\",\"absolute\",\"fixed\"],Yc={\"border-width\":[\"border\"],\"border-style\":[\"border\"],\"border-color\":[\"border\"],\"border-top\":[\"border\"],\"border-right\":[\"border\"],\"border-bottom\":[\"border\"],\"border-left\":[\"border\"],\"border-top-width\":[\"border-top\",\"border-width\",\"border\"],\"border-right-width\":[\"border-right\",\"border-width\",\"border\"],\"border-bottom-width\":[\"border-bottom\",\"border-width\",\"border\"],\"border-left-width\":[\"border-left\",\"border-width\",\"border\"],\"border-top-style\":[\"border-top\",\"border-style\",\"border\"],\"border-right-style\":[\"border-right\",\"border-style\",\"border\"],\"border-bottom-style\":[\"border-bottom\",\"border-style\",\"border\"],\"border-left-style\":[\"border-left\",\"border-style\",\"border\"],\"border-top-color\":[\"border-top\",\"border-color\",\"border\"],\"border-right-color\":[\"border-right\",\"border-color\",\"border\"],\"border-bottom-color\":[\"border-bottom\",\"border-color\",\"border\"],\"border-left-color\":[\"border-left\",\"border-color\",\"border\"],\"margin-top\":[\"margin\"],\"margin-right\":[\"margin\"],\"margin-bottom\":[\"margin\"],\"margin-left\":[\"margin\"],\"padding-top\":[\"padding\"],\"padding-right\":[\"padding\"],\"padding-bottom\":[\"padding\"],\"padding-left\":[\"padding\"],\"font-style\":[\"font\"],\"font-variant\":[\"font\"],\"font-weight\":[\"font\"],\"font-size\":[\"font\"],\"font-family\":[\"font\"],\"list-style-type\":[\"list-style\"],\"list-style-position\":[\"list-style\"],\"list-style-image\":[\"list-style\"]};function Hc(e,t,n){var r=Mc(e).basename;if(\"background\"===r)return e+\":\"+jc(t.value);var a=t.id,i=n[a];if(!i){switch(t.value.type){case\"Value\":var o=\"\",s=\"\",l={},c=!1;t.value.children.each((function e(t){switch(t.type){case\"Value\":case\"Brackets\":case\"Parentheses\":t.children.each(e);break;case\"Raw\":c=!0;break;case\"Identifier\":var n=t.name;o||(o=Nc(n).vendor),/\\\\[09]/.test(n)&&(s=RegExp.lastMatch),\"cursor\"===r?-1===Fc.indexOf(n)&&(l[n]=!0):\"position\"===r?-1===Uc.indexOf(n)&&(l[n]=!0):Wc.hasOwnProperty(r)&&Wc[r].test(n)&&(l[n]=!0);break;case\"Function\":n=t.name;if(o||(o=Nc(n).vendor),\"rect\"===n)t.children.some((function(e){return\"Operator\"===e.type&&\",\"===e.value}))||(n=\"rect-backward\");l[n+\"()\"]=!0,t.children.each(e);break;case\"Dimension\":var a=t.unit;switch(/\\\\[09]/.test(a)&&(s=RegExp.lastMatch),a){case\"rem\":case\"vw\":case\"vh\":case\"vmin\":case\"vmax\":case\"vm\":l[a]=!0}}})),i=c?\"!\"+_c++:\"!\"+Object.keys(l).sort()+\"|\"+s+o;break;case\"Raw\":i=\"!\"+t.value.value;break;default:i=jc(t.value)}n[a]=i}return e+i}function Vc(e,t,n,r,a){var i=e.block.children;i.eachRight((function(e,t){var n,o=e.property,s=Hc(o,e,a);(n=r[s])&&!qc.hasOwnProperty(o)?e.important&&!n.item.data.important?(r[s]={block:i,item:t},n.block.remove(n.item)):i.remove(t):(n=function(e,t,n){var r=Mc(t.property);if(Yc.hasOwnProperty(r.basename))for(var a=Yc[r.basename],i=0;i<a.length;i++){var o=Hc(r.prefix+a[i],t,n),s=e.hasOwnProperty(o)?e[o]:null;if(s&&(!t.important||s.item.data.important))return s}}(r,e,a))?i.remove(t):(e.fingerprint=s,r[s]={block:i,item:t})})),i.isEmpty()&&n.remove(t)}var Kc=cl.walk;function Gc(e,t,n){var r=e.prelude.children,a=e.block.children,i=r.first().compareMarker,o={};n.nextUntil(t.next,(function(t,s){if(\"Rule\"!==t.type)return vc.unsafeToSkipNode.call(r,t);if(e.pseudoSignature!==t.pseudoSignature)return!0;var l=t.prelude.children.head,c=t.block.children,u=l.data.compareMarker;if(u in o)return!0;if(r.head===r.tail&&r.first().id===l.data.id)return a.appendList(c),void n.remove(s);if(vc.isEqualDeclarations(a,c)){var h=l.data.id;return r.some((function(e,t){var n=e.id;return h<n?(r.insert(l,t),!0):t.next?void 0:(r.insert(l),!0)})),void n.remove(s)}if(u===i)return!0;o[u]=!0}))}var $c=cl.List,Qc=cl.walk;function Xc(e){var t=0;return e.each((function(e){t+=e.id.length+1})),t-1}function Zc(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].length;return t+e.length-1}function Jc(e,t,n){var r=null!==this.block&&this.block.avoidRulesMerge,a=e.prelude.children,i=e.block,o=Object.create(null),s=!0,l=!0;n.prevUntil(t.prev,(function(c,u){var h=c.block,d=c.type;if(\"Rule\"!==d){var p=vc.unsafeToSkipNode.call(a,c);return!p&&\"Atrule\"===d&&h&&Qc(h,{visit:\"Rule\",enter:function(e){e.prelude.children.each((function(e){o[e.compareMarker]=!0}))}}),p}var f=c.prelude.children;if(e.pseudoSignature!==c.pseudoSignature)return!0;if(!(l=!f.some((function(e){return e.compareMarker in o})))&&!s)return!0;if(s&&vc.isEqualSelectors(f,a))return h.children.appendList(i.children),n.remove(t),!0;var m=vc.compareDeclarations(i.children,h.children);if(m.eq.length){if(!m.ne1.length&&!m.ne2.length)return l&&(vc.addSelectors(a,f),n.remove(u)),!0;if(!r)if(m.ne1.length&&!m.ne2.length){var g=Xc(a),b=Zc(m.eq);s&&g<b&&(vc.addSelectors(f,a),i.children=(new $c).fromArray(m.ne1))}else if(!m.ne1.length&&m.ne2.length){g=Xc(f),b=Zc(m.eq);l&&g<b&&(vc.addSelectors(a,f),h.children=(new $c).fromArray(m.ne2))}else{var y={type:\"SelectorList\",loc:null,children:vc.addSelectors(f.copy(),a)},k=Xc(y.children)+2;if((b=Zc(m.eq))>=k){var v=n.createItem({type:\"Rule\",loc:null,prelude:y,block:{type:\"Block\",loc:null,children:(new $c).fromArray(m.eq)},pseudoSignature:e.pseudoSignature});return i.children=(new $c).fromArray(m.ne1),h.children=(new $c).fromArray(m.ne2overrided),s?n.insert(v,u):n.insert(v,t),!0}}}s&&(s=!f.some((function(e){return a.some((function(t){return t.compareMarker===e.compareMarker}))}))),f.each((function(e){o[e.compareMarker]=!0}))}))}var eu=function(e,t){var n=cc(e,t);t.logger(\"prepare\",e),bc(e,t),t.logger(\"mergeAtrule\",e),function(e){wc(e,{visit:\"Rule\",enter:xc})}(e),t.logger(\"initialMergeRuleset\",e),function(e){Cc(e,{visit:\"Rule\",reverse:!0,enter:Ac})}(e),t.logger(\"disjoinRuleset\",e),Ic(e,n),t.logger(\"restructShorthand\",e),function(e){var t={},n=Object.create(null);Bc(e,{visit:\"Rule\",reverse:!0,enter:function(e,r,a){var i,o,s=this.block||this.stylesheet,l=(e.pseudoSignature||\"\")+\"|\"+e.prelude.children.first().id;t.hasOwnProperty(s.id)?i=t[s.id]:(i={},t[s.id]=i),i.hasOwnProperty(l)?o=i[l]:(o={},i[l]=o),Vc.call(this,e,r,a,o,n)}})}(e),t.logger(\"restructBlock\",e),function(e){Kc(e,{visit:\"Rule\",enter:Gc})}(e),t.logger(\"mergeRuleset\",e),function(e){Qc(e,{visit:\"Rule\",reverse:!0,enter:Jc})}(e),t.logger(\"restructRuleset\",e)},tu=cl.List,nu=cl.clone,ru=cl.walk;function au(e,t){var n,r=new tu,a=!1;return e.nextUntil(e.head,(function(e,i,o){if(\"Comment\"===e.type)return t&&\"!\"===e.value.charAt(0)?!(!a&&!n)||(o.remove(i),void(n=e)):void o.remove(i);\"WhiteSpace\"!==e.type&&(a=!0),r.insert(o.remove(i))})),{comment:n,stylesheet:{type:\"StyleSheet\",loc:null,children:r}}}function iu(e,t,n,r){r.logger(\"Compress block #\"+n,null,!0);var a=1;return\"StyleSheet\"===e.type&&(e.firstAtrulesAllowed=t,e.id=a++),ru(e,{visit:\"Atrule\",enter:function(e){null!==e.block&&(e.block.id=a++)}}),r.logger(\"init\",e),function(e,t){Sl(e,{leave:function(e,n,r){Cl.hasOwnProperty(e.type)&&Cl[e.type].call(this,e,n,r,t)}})}(e,r),r.logger(\"clean\",e),function(e){Jl(e,{leave:function(e,t,n){ec.hasOwnProperty(e.type)&&ec[e.type].call(this,e,t,n)}})}(e),r.logger(\"replace\",e),r.restructuring&&eu(e,r),e}function ou(e){return\"restructure\"in e?e.restructure:!(\"restructuring\"in e)||e.restructuring}var su=function(e,t){e=e||{type:\"StyleSheet\",loc:null,children:new tu};var n,r,a,i,o={logger:\"function\"==typeof(t=t||{}).logger?t.logger:function(){},restructuring:ou(t),forceMediaMerge:Boolean(t.forceMediaMerge),usage:!!t.usage&&pl.buildIndex(t.usage)},s=function(e){var t=\"comments\"in e?e.comments:\"exclamation\";return\"boolean\"==typeof t?t=!!t&&\"exclamation\":\"exclamation\"!==t&&\"first-exclamation\"!==t&&(t=!1),t}(t),l=!0,c=new tu,u=1;t.clone&&(e=nu(e)),\"StyleSheet\"===e.type?(n=e.children,e.children=c):(i=e,n=(new tu).appendData({type:\"Rule\",loc:null,prelude:{type:\"SelectorList\",loc:null,children:(new tu).appendData({type:\"Selector\",loc:null,children:(new tu).appendData({type:\"TypeSelector\",loc:null,name:\"x\"})})},block:i}));do{if(iu((r=au(n,Boolean(s))).stylesheet,l,u++,o),a=r.stylesheet.children,r.comment&&(c.isEmpty()||c.insert(tu.createItem({type:\"Raw\",value:\"\\n\"})),c.insert(tu.createItem(r.comment)),a.isEmpty()||c.insert(tu.createItem({type:\"Raw\",value:\"\\n\"}))),l&&!a.isEmpty()){var h=a.last();(\"Atrule\"!==h.type||\"import\"!==h.name&&\"charset\"!==h.name)&&(l=!1)}\"exclamation\"!==s&&(s=!1),c.appendList(a)}while(!n.isEmpty());return{ast:e}},lu={version:\"4.0.3\"},cu=Zn(Object.freeze({__proto__:null,version:\"4.0.3\",default:lu})),uu=cl.parse,hu=cl.generate;function du(e,t,n,r){return t.debug&&console.error(\"## \"+e+\" done in %d ms\\n\",Date.now()-n),r}function pu(e){var t,n;return\"function\"!=typeof(e=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e)).logger&&e.debug&&(e.logger=(t=e.debug,function(e,r){var a=e;if(r&&(a=\"[\"+((Date.now()-n)/1e3).toFixed(3)+\"s] \"+a),t>1&&r){var i=hu(r);2===t&&i.length>256&&(i=i.substr(0,256)+\"...\"),a+=\"\\n  \"+i+\"\\n\"}console.error(a),n=Date.now()})),e}function fu(e,t,n){Array.isArray(n)||(n=[n]),n.forEach((function(n){n(e,t)}))}function mu(e,t,n){var r=(n=n||{}).filename||\"<unknown>\",a=du(\"parsing\",n,Date.now(),uu(t,{context:e,filename:r,positions:Boolean(n.sourceMap)}));n.beforeCompress&&du(\"beforeCompress\",n,Date.now(),fu(a,n,n.beforeCompress));var i,o=du(\"compress\",n,Date.now(),su(a,pu(n)));return n.afterCompress&&du(\"afterCompress\",n,Date.now(),fu(o,n,n.afterCompress)),n.sourceMap?du(\"generate(sourceMap: true)\",n,Date.now(),((i=hu(o.ast,{sourceMap:!0})).map._file=r,i.map.setSourceContent(r,t),i)):du(\"generate\",n,Date.now(),{css:hu(o.ast),map:null})}var gu={version:cu.version,minify:function(e,t){return mu(\"stylesheet\",e,t)},minifyBlock:function(e,t){return mu(\"declarationList\",e,t)},syntax:Object.assign({compress:su},cl)},bu=gu.version,yu=gu.minify,ku=gu.minifyBlock,vu=gu.syntax;e.default=gu,e.minify=yu,e.minifyBlock=ku,e.syntax=vu,e.version=bu,Object.defineProperty(e,\"__esModule\",{value:!0})}));","Magento_PageBuilder/js/resource/jarallax/jarallax-wrapper.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'Magento_PageBuilder/js/resource/jarallax/jarallax'\n], function(jarallax){\n    'use strict';\n\n    window.jarallax = window.jarallax || jarallax;\n});\n","Magento_PageBuilder/js/resource/jarallax/jarallax.js":"/*!\n * Jarallax v2.0.3 (https://github.com/nk-o/jarallax)\n * Copyright 2022 nK <https://nkdev.info>\n * Licensed under MIT (https://github.com/nk-o/jarallax/blob/master/LICENSE)\n */\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n      typeof define === 'function' && define.amd ? define(factory) :\n          (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.jarallax = factory());\n})(this, (function () { 'use strict';\n\n  function ready(callback) {\n    if ('complete' === document.readyState || 'interactive' === document.readyState) {\n      // Already ready or interactive, execute callback\n      callback();\n    } else {\n      document.addEventListener('DOMContentLoaded', callback, {\n        capture: true,\n        once: true,\n        passive: true\n      });\n    }\n  }\n\n  /* eslint-disable import/no-mutable-exports */\n\n  /* eslint-disable no-restricted-globals */\n  let win;\n\n  if ('undefined' !== typeof window) {\n    win = window;\n  } else if ('undefined' !== typeof global) {\n    win = global;\n  } else if ('undefined' !== typeof self) {\n    win = self;\n  } else {\n    win = {};\n  }\n\n  var global$1 = win;\n\n  const {\n    navigator\n  } = global$1;\n  const isMobile = /*#__PURE__*/ /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n  let $deviceHelper;\n  /**\n   * The most popular mobile browsers changes height after page scroll and this generates image jumping.\n   * We can fix it using this workaround with vh units.\n   */\n\n  function getDeviceHeight() {\n    if (!$deviceHelper && document.body) {\n      $deviceHelper = document.createElement('div');\n      $deviceHelper.style.cssText = 'position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;';\n      document.body.appendChild($deviceHelper);\n    }\n\n    return ($deviceHelper ? $deviceHelper.clientHeight : 0) || global$1.innerHeight || document.documentElement.clientHeight;\n  } // Window height data\n\n\n  let wndH;\n\n  function updateWndVars() {\n    if (isMobile) {\n      wndH = getDeviceHeight();\n    } else {\n      wndH = global$1.innerHeight || document.documentElement.clientHeight;\n    }\n  }\n\n  updateWndVars();\n  global$1.addEventListener('resize', updateWndVars);\n  global$1.addEventListener('orientationchange', updateWndVars);\n  global$1.addEventListener('load', updateWndVars);\n  ready(() => {\n    updateWndVars();\n  }); // list with all jarallax instances\n  // need to render all in one scroll/resize event\n\n  const jarallaxList = []; // get all parents of the element.\n\n  function getParents(elem) {\n    const parents = [];\n\n    while (null !== elem.parentElement) {\n      elem = elem.parentElement;\n\n      if (1 === elem.nodeType) {\n        parents.push(elem);\n      }\n    }\n\n    return parents;\n  }\n\n  function updateParallax() {\n    if (!jarallaxList.length) {\n      return;\n    }\n\n    jarallaxList.forEach((data, k) => {\n      const {\n        instance,\n        oldData\n      } = data;\n      const clientRect = instance.$item.getBoundingClientRect();\n      const newData = {\n        width: clientRect.width,\n        height: clientRect.height,\n        top: clientRect.top,\n        bottom: clientRect.bottom,\n        wndW: global$1.innerWidth,\n        wndH\n      };\n      const isResized = !oldData || oldData.wndW !== newData.wndW || oldData.wndH !== newData.wndH || oldData.width !== newData.width || oldData.height !== newData.height;\n      const isScrolled = isResized || !oldData || oldData.top !== newData.top || oldData.bottom !== newData.bottom;\n      jarallaxList[k].oldData = newData;\n\n      if (isResized) {\n        instance.onResize();\n      }\n\n      if (isScrolled) {\n        instance.onScroll();\n      }\n    });\n    global$1.requestAnimationFrame(updateParallax);\n  }\n\n  let instanceID = 0; // Jarallax class\n\n  class Jarallax {\n    constructor(item, userOptions) {\n      const self = this;\n      self.instanceID = instanceID;\n      instanceID += 1;\n      self.$item = item;\n      self.defaults = {\n        type: 'scroll',\n        // type of parallax: scroll, scale, opacity, scale-opacity, scroll-opacity\n        speed: 0.5,\n        // supported value from -1 to 2\n        imgSrc: null,\n        imgElement: '.jarallax-img',\n        imgSize: 'cover',\n        imgPosition: '50% 50%',\n        imgRepeat: 'no-repeat',\n        // supported only for background, not for <img> tag\n        keepImg: false,\n        // keep <img> tag in it's default place\n        elementInViewport: null,\n        zIndex: -100,\n        disableParallax: false,\n        disableVideo: false,\n        // video\n        videoSrc: null,\n        videoStartTime: 0,\n        videoEndTime: 0,\n        videoVolume: 0,\n        videoLoop: true,\n        videoPlayOnlyVisible: true,\n        videoLazyLoading: true,\n        // events\n        onScroll: null,\n        // function(calculations) {}\n        onInit: null,\n        // function() {}\n        onDestroy: null,\n        // function() {}\n        onCoverImage: null // function() {}\n\n      }; // prepare data-options\n\n      const dataOptions = self.$item.dataset || {};\n      const pureDataOptions = {};\n      Object.keys(dataOptions).forEach(key => {\n        const loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n\n        if (loweCaseOption && 'undefined' !== typeof self.defaults[loweCaseOption]) {\n          pureDataOptions[loweCaseOption] = dataOptions[key];\n        }\n      });\n      self.options = self.extend({}, self.defaults, pureDataOptions, userOptions);\n      self.pureOptions = self.extend({}, self.options); // prepare 'true' and 'false' strings to boolean\n\n      Object.keys(self.options).forEach(key => {\n        if ('true' === self.options[key]) {\n          self.options[key] = true;\n        } else if ('false' === self.options[key]) {\n          self.options[key] = false;\n        }\n      }); // fix speed option [-1.0, 2.0]\n\n      self.options.speed = Math.min(2, Math.max(-1, parseFloat(self.options.speed))); // prepare disableParallax callback\n\n      if ('string' === typeof self.options.disableParallax) {\n        self.options.disableParallax = new RegExp(self.options.disableParallax);\n      }\n\n      if (self.options.disableParallax instanceof RegExp) {\n        const disableParallaxRegexp = self.options.disableParallax;\n\n        self.options.disableParallax = () => disableParallaxRegexp.test(navigator.userAgent);\n      }\n\n      if ('function' !== typeof self.options.disableParallax) {\n        self.options.disableParallax = () => false;\n      } // prepare disableVideo callback\n\n\n      if ('string' === typeof self.options.disableVideo) {\n        self.options.disableVideo = new RegExp(self.options.disableVideo);\n      }\n\n      if (self.options.disableVideo instanceof RegExp) {\n        const disableVideoRegexp = self.options.disableVideo;\n\n        self.options.disableVideo = () => disableVideoRegexp.test(navigator.userAgent);\n      }\n\n      if ('function' !== typeof self.options.disableVideo) {\n        self.options.disableVideo = () => false;\n      } // custom element to check if parallax in viewport\n\n\n      let elementInVP = self.options.elementInViewport; // get first item from array\n\n      if (elementInVP && 'object' === typeof elementInVP && 'undefined' !== typeof elementInVP.length) {\n        [elementInVP] = elementInVP;\n      } // check if dom element\n\n\n      if (!(elementInVP instanceof Element)) {\n        elementInVP = null;\n      }\n\n      self.options.elementInViewport = elementInVP;\n      self.image = {\n        src: self.options.imgSrc || null,\n        $container: null,\n        useImgTag: false,\n        // 1. Position fixed is needed for the most of browsers because absolute position have glitches\n        // 2. On MacOS with smooth scroll there is a huge lags with absolute position - https://github.com/nk-o/jarallax/issues/75\n        // 3. Previously used 'absolute' for mobile devices. But we re-tested on iPhone 12 and 'fixed' position is working better, then 'absolute', so for now position is always 'fixed'\n        position: 'fixed'\n      };\n\n      if (self.initImg() && self.canInitParallax()) {\n        self.init();\n      }\n    } // add styles to element\n    // eslint-disable-next-line class-methods-use-this\n\n\n    css(el, styles) {\n      if ('string' === typeof styles) {\n        return global$1.getComputedStyle(el).getPropertyValue(styles);\n      }\n\n      Object.keys(styles).forEach(key => {\n        el.style[key] = styles[key];\n      });\n      return el;\n    } // Extend like jQuery.extend\n    // eslint-disable-next-line class-methods-use-this\n\n\n    extend(out, ...args) {\n      out = out || {};\n      Object.keys(args).forEach(i => {\n        if (!args[i]) {\n          return;\n        }\n\n        Object.keys(args[i]).forEach(key => {\n          out[key] = args[i][key];\n        });\n      });\n      return out;\n    } // get window size and scroll position. Useful for extensions\n    // eslint-disable-next-line class-methods-use-this\n\n\n    getWindowData() {\n      return {\n        width: global$1.innerWidth || document.documentElement.clientWidth,\n        height: wndH,\n        y: document.documentElement.scrollTop\n      };\n    } // Jarallax functions\n\n\n    initImg() {\n      const self = this; // find image element\n\n      let $imgElement = self.options.imgElement;\n\n      if ($imgElement && 'string' === typeof $imgElement) {\n        $imgElement = self.$item.querySelector($imgElement);\n      } // check if dom element\n\n\n      if (!($imgElement instanceof Element)) {\n        if (self.options.imgSrc) {\n          $imgElement = new Image();\n          $imgElement.src = self.options.imgSrc;\n        } else {\n          $imgElement = null;\n        }\n      }\n\n      if ($imgElement) {\n        if (self.options.keepImg) {\n          self.image.$item = $imgElement.cloneNode(true);\n        } else {\n          self.image.$item = $imgElement;\n          self.image.$itemParent = $imgElement.parentNode;\n        }\n\n        self.image.useImgTag = true;\n      } // true if there is img tag\n\n\n      if (self.image.$item) {\n        return true;\n      } // get image src\n\n\n      if (null === self.image.src) {\n        self.image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n        self.image.bgImage = self.css(self.$item, 'background-image');\n      }\n\n      return !(!self.image.bgImage || 'none' === self.image.bgImage);\n    }\n\n    canInitParallax() {\n      return !this.options.disableParallax();\n    }\n\n    init() {\n      const self = this;\n      const containerStyles = {\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        width: '100%',\n        height: '100%',\n        overflow: 'hidden'\n      };\n      let imageStyles = {\n        pointerEvents: 'none',\n        transformStyle: 'preserve-3d',\n        backfaceVisibility: 'hidden',\n        willChange: 'transform,opacity'\n      };\n\n      if (!self.options.keepImg) {\n        // save default user styles\n        const curStyle = self.$item.getAttribute('style');\n\n        if (curStyle) {\n          self.$item.setAttribute('data-jarallax-original-styles', curStyle);\n        }\n\n        if (self.image.useImgTag) {\n          const curImgStyle = self.image.$item.getAttribute('style');\n\n          if (curImgStyle) {\n            self.image.$item.setAttribute('data-jarallax-original-styles', curImgStyle);\n          }\n        }\n      } // set relative position and z-index to the parent\n\n\n      if ('static' === self.css(self.$item, 'position')) {\n        self.css(self.$item, {\n          position: 'relative'\n        });\n      }\n\n      if ('auto' === self.css(self.$item, 'z-index')) {\n        self.css(self.$item, {\n          zIndex: 0\n        });\n      } // container for parallax image\n\n\n      self.image.$container = document.createElement('div');\n      self.css(self.image.$container, containerStyles);\n      self.css(self.image.$container, {\n        'z-index': self.options.zIndex\n      }); // it will remove some image overlapping\n      // overlapping occur due to an image position fixed inside absolute position element\n      // needed only when background in fixed position\n\n      if ('fixed' === this.image.position) {\n        self.css(self.image.$container, {\n          '-webkit-clip-path': 'polygon(0 0, 100% 0, 100% 100%, 0 100%)',\n          'clip-path': 'polygon(0 0, 100% 0, 100% 100%, 0 100%)'\n        });\n      }\n\n      self.image.$container.setAttribute('id', `jarallax-container-${self.instanceID}`);\n      self.$item.appendChild(self.image.$container); // use img tag\n\n      if (self.image.useImgTag) {\n        imageStyles = self.extend({\n          'object-fit': self.options.imgSize,\n          'object-position': self.options.imgPosition,\n          'max-width': 'none'\n        }, containerStyles, imageStyles); // use div with background image\n      } else {\n        self.image.$item = document.createElement('div');\n\n        if (self.image.src) {\n          imageStyles = self.extend({\n            'background-position': self.options.imgPosition,\n            'background-size': self.options.imgSize,\n            'background-repeat': self.options.imgRepeat,\n            'background-image': self.image.bgImage || `url(\"${self.image.src}\")`\n          }, containerStyles, imageStyles);\n        }\n      }\n\n      if ('opacity' === self.options.type || 'scale' === self.options.type || 'scale-opacity' === self.options.type || 1 === self.options.speed) {\n        self.image.position = 'absolute';\n      } // 1. Check if one of parents have transform style (without this check, scroll transform will be inverted if used parallax with position fixed)\n      //    discussion - https://github.com/nk-o/jarallax/issues/9\n      // 2. Check if parents have overflow scroll\n\n\n      if ('fixed' === self.image.position) {\n        const $parents = getParents(self.$item).filter(el => {\n          const styles = global$1.getComputedStyle(el);\n          const parentTransform = styles['-webkit-transform'] || styles['-moz-transform'] || styles.transform;\n          const overflowRegex = /(auto|scroll)/;\n          return parentTransform && 'none' !== parentTransform || overflowRegex.test(styles.overflow + styles['overflow-y'] + styles['overflow-x']);\n        });\n        self.image.position = $parents.length ? 'absolute' : 'fixed';\n      } // add position to parallax block\n\n\n      imageStyles.position = self.image.position; // insert parallax image\n\n      self.css(self.image.$item, imageStyles);\n      self.image.$container.appendChild(self.image.$item); // set initial position and size\n\n      self.onResize();\n      self.onScroll(true); // call onInit event\n\n      if (self.options.onInit) {\n        self.options.onInit.call(self);\n      } // remove default user background\n\n\n      if ('none' !== self.css(self.$item, 'background-image')) {\n        self.css(self.$item, {\n          'background-image': 'none'\n        });\n      }\n\n      self.addToParallaxList();\n    } // add to parallax instances list\n\n\n    addToParallaxList() {\n      jarallaxList.push({\n        instance: this\n      });\n\n      if (1 === jarallaxList.length) {\n        global$1.requestAnimationFrame(updateParallax);\n      }\n    } // remove from parallax instances list\n\n\n    removeFromParallaxList() {\n      const self = this;\n      jarallaxList.forEach((data, key) => {\n        if (data.instance.instanceID === self.instanceID) {\n          jarallaxList.splice(key, 1);\n        }\n      });\n    }\n\n    destroy() {\n      const self = this;\n      self.removeFromParallaxList(); // return styles on container as before jarallax init\n\n      const originalStylesTag = self.$item.getAttribute('data-jarallax-original-styles');\n      self.$item.removeAttribute('data-jarallax-original-styles'); // null occurs if there is no style tag before jarallax init\n\n      if (!originalStylesTag) {\n        self.$item.removeAttribute('style');\n      } else {\n        self.$item.setAttribute('style', originalStylesTag);\n      }\n\n      if (self.image.useImgTag) {\n        // return styles on img tag as before jarallax init\n        const originalStylesImgTag = self.image.$item.getAttribute('data-jarallax-original-styles');\n        self.image.$item.removeAttribute('data-jarallax-original-styles'); // null occurs if there is no style tag before jarallax init\n\n        if (!originalStylesImgTag) {\n          self.image.$item.removeAttribute('style');\n        } else {\n          self.image.$item.setAttribute('style', originalStylesTag);\n        } // move img tag to its default position\n\n\n        if (self.image.$itemParent) {\n          self.image.$itemParent.appendChild(self.image.$item);\n        }\n      } // remove additional dom elements\n\n\n      if (self.image.$container) {\n        self.image.$container.parentNode.removeChild(self.image.$container);\n      } // call onDestroy event\n\n\n      if (self.options.onDestroy) {\n        self.options.onDestroy.call(self);\n      } // delete jarallax from item\n\n\n      delete self.$item.jarallax;\n    } // Fallback for removed function.\n    // Does nothing now.\n    // eslint-disable-next-line class-methods-use-this\n\n\n    clipContainer() {}\n\n    coverImage() {\n      const self = this;\n      const rect = self.image.$container.getBoundingClientRect();\n      const contH = rect.height;\n      const {\n        speed\n      } = self.options;\n      const isScroll = 'scroll' === self.options.type || 'scroll-opacity' === self.options.type;\n      let scrollDist = 0;\n      let resultH = contH;\n      let resultMT = 0; // scroll parallax\n\n      if (isScroll) {\n        // scroll distance and height for image\n        if (0 > speed) {\n          scrollDist = speed * Math.max(contH, wndH);\n\n          if (wndH < contH) {\n            scrollDist -= speed * (contH - wndH);\n          }\n        } else {\n          scrollDist = speed * (contH + wndH);\n        } // size for scroll parallax\n\n\n        if (1 < speed) {\n          resultH = Math.abs(scrollDist - wndH);\n        } else if (0 > speed) {\n          resultH = scrollDist / speed + Math.abs(scrollDist);\n        } else {\n          resultH += (wndH - contH) * (1 - speed);\n        }\n\n        scrollDist /= 2;\n      } // store scroll distance\n\n\n      self.parallaxScrollDistance = scrollDist; // vertical center\n\n      if (isScroll) {\n        resultMT = (wndH - resultH) / 2;\n      } else {\n        resultMT = (contH - resultH) / 2;\n      } // apply result to item\n\n\n      self.css(self.image.$item, {\n        height: `${resultH}px`,\n        marginTop: `${resultMT}px`,\n        left: 'fixed' === self.image.position ? `${rect.left}px` : '0',\n        width: `${rect.width}px`\n      }); // call onCoverImage event\n\n      if (self.options.onCoverImage) {\n        self.options.onCoverImage.call(self);\n      } // return some useful data. Used in the video cover function\n\n\n      return {\n        image: {\n          height: resultH,\n          marginTop: resultMT\n        },\n        container: rect\n      };\n    }\n\n    isVisible() {\n      return this.isElementInViewport || false;\n    }\n\n    onScroll(force) {\n      const self = this;\n      const rect = self.$item.getBoundingClientRect();\n      const contT = rect.top;\n      const contH = rect.height;\n      const styles = {}; // check if in viewport\n\n      let viewportRect = rect;\n\n      if (self.options.elementInViewport) {\n        viewportRect = self.options.elementInViewport.getBoundingClientRect();\n      }\n\n      self.isElementInViewport = 0 <= viewportRect.bottom && 0 <= viewportRect.right && viewportRect.top <= wndH && viewportRect.left <= global$1.innerWidth; // stop calculations if item is not in viewport\n\n      if (force ? false : !self.isElementInViewport) {\n        return;\n      } // calculate parallax helping variables\n\n\n      const beforeTop = Math.max(0, contT);\n      const beforeTopEnd = Math.max(0, contH + contT);\n      const afterTop = Math.max(0, -contT);\n      const beforeBottom = Math.max(0, contT + contH - wndH);\n      const beforeBottomEnd = Math.max(0, contH - (contT + contH - wndH));\n      const afterBottom = Math.max(0, -contT + wndH - contH);\n      const fromViewportCenter = 1 - 2 * ((wndH - contT) / (wndH + contH)); // calculate on how percent of section is visible\n\n      let visiblePercent = 1;\n\n      if (contH < wndH) {\n        visiblePercent = 1 - (afterTop || beforeBottom) / contH;\n      } else if (beforeTopEnd <= wndH) {\n        visiblePercent = beforeTopEnd / wndH;\n      } else if (beforeBottomEnd <= wndH) {\n        visiblePercent = beforeBottomEnd / wndH;\n      } // opacity\n\n\n      if ('opacity' === self.options.type || 'scale-opacity' === self.options.type || 'scroll-opacity' === self.options.type) {\n        styles.transform = 'translate3d(0,0,0)';\n        styles.opacity = visiblePercent;\n      } // scale\n\n\n      if ('scale' === self.options.type || 'scale-opacity' === self.options.type) {\n        let scale = 1;\n\n        if (0 > self.options.speed) {\n          scale -= self.options.speed * visiblePercent;\n        } else {\n          scale += self.options.speed * (1 - visiblePercent);\n        }\n\n        styles.transform = `scale(${scale}) translate3d(0,0,0)`;\n      } // scroll\n\n\n      if ('scroll' === self.options.type || 'scroll-opacity' === self.options.type) {\n        let positionY = self.parallaxScrollDistance * fromViewportCenter; // fix if parallax block in absolute position\n\n        if ('absolute' === self.image.position) {\n          positionY -= contT;\n        }\n\n        styles.transform = `translate3d(0,${positionY}px,0)`;\n      }\n\n      self.css(self.image.$item, styles); // call onScroll event\n\n      if (self.options.onScroll) {\n        self.options.onScroll.call(self, {\n          section: rect,\n          beforeTop,\n          beforeTopEnd,\n          afterTop,\n          beforeBottom,\n          beforeBottomEnd,\n          afterBottom,\n          visiblePercent,\n          fromViewportCenter\n        });\n      }\n    }\n\n    onResize() {\n      this.coverImage();\n    }\n\n  } // global definition\n\n\n  const jarallax = function (items, options, ...args) {\n    // check for dom element\n    // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n    if ('object' === typeof HTMLElement ? items instanceof HTMLElement : items && 'object' === typeof items && null !== items && 1 === items.nodeType && 'string' === typeof items.nodeName) {\n      items = [items];\n    }\n\n    const len = items.length;\n    let k = 0;\n    let ret;\n\n    for (k; k < len; k += 1) {\n      if ('object' === typeof options || 'undefined' === typeof options) {\n        if (!items[k].jarallax) {\n          items[k].jarallax = new Jarallax(items[k], options);\n        }\n      } else if (items[k].jarallax) {\n        // eslint-disable-next-line prefer-spread\n        ret = items[k].jarallax[options].apply(items[k].jarallax, args);\n      }\n\n      if ('undefined' !== typeof ret) {\n        return ret;\n      }\n    }\n\n    return items;\n  };\n\n  jarallax.constructor = Jarallax;\n\n  const $ = global$1.jQuery; // jQuery support\n\n  if ('undefined' !== typeof $) {\n    const $Plugin = function (...args) {\n      Array.prototype.unshift.call(args, this);\n      const res = jarallax.apply(global$1, args);\n      return 'object' !== typeof res ? res : this;\n    };\n\n    $Plugin.constructor = jarallax.constructor; // no conflict\n\n    const old$Plugin = $.fn.jarallax;\n    $.fn.jarallax = $Plugin;\n\n    $.fn.jarallax.noConflict = function () {\n      $.fn.jarallax = old$Plugin;\n      return this;\n    };\n  } // data-jarallax initialization\n\n\n  ready(() => {\n    jarallax(document.querySelectorAll('[data-jarallax]'));\n  });\n\n  return jarallax;\n\n}));\n//# sourceMappingURL=jarallax.js.map\n","Magento_PageBuilder/js/resource/jarallax/jarallax-video.js":"/*!\n * Video Extension for Jarallax v2.0.3 (https://github.com/nk-o/jarallax)\n * Copyright 2022 nK <https://nkdev.info>\n * Licensed under MIT (https://github.com/nk-o/jarallax/blob/master/LICENSE)\n */\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n      typeof define === 'function' && define.amd ? define(factory) :\n          (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.jarallaxVideo = factory());\n})(this, (function () { 'use strict';\n\n  /*!\n   * Name    : Video Worker\n   * Version : 2.0.0\n   * Author  : nK <https://nkdev.info>\n   * GitHub  : https://github.com/nk-o/video-worker\n   */\n\n  /* eslint-disable import/no-mutable-exports */\n\n  /* eslint-disable no-restricted-globals */\n  let win$1;\n\n  if (typeof window !== 'undefined') {\n    win$1 = window;\n  } else if (typeof global !== 'undefined') {\n    win$1 = global;\n  } else if (typeof self !== 'undefined') {\n    win$1 = self;\n  } else {\n    win$1 = {};\n  }\n\n  var global$1$1 = win$1; // Deferred\n  // thanks http://stackoverflow.com/questions/18096715/implement-deferred-object-without-using-jquery\n\n  function Deferred() {\n    this.doneCallbacks = [];\n    this.failCallbacks = [];\n  }\n\n  Deferred.prototype = {\n    execute(list, args) {\n      let i = list.length; // eslint-disable-next-line no-param-reassign\n\n      args = Array.prototype.slice.call(args);\n\n      while (i) {\n        i -= 1;\n        list[i].apply(null, args);\n      }\n    },\n\n    resolve(...args) {\n      this.execute(this.doneCallbacks, args);\n    },\n\n    reject(...args) {\n      this.execute(this.failCallbacks, args);\n    },\n\n    done(callback) {\n      this.doneCallbacks.push(callback);\n    },\n\n    fail(callback) {\n      this.failCallbacks.push(callback);\n    }\n\n  };\n  let ID = 0;\n  let YoutubeAPIadded = 0;\n  let VimeoAPIadded = 0;\n  let loadingYoutubePlayer = 0;\n  let loadingVimeoPlayer = 0;\n  const loadingYoutubeDefer = /*#__PURE__*/new Deferred();\n  const loadingVimeoDefer = /*#__PURE__*/new Deferred();\n\n  class VideoWorker {\n    constructor(url, options) {\n      const self = this;\n      self.url = url;\n      self.options_default = {\n        autoplay: false,\n        loop: false,\n        mute: false,\n        volume: 100,\n        showControls: true,\n        accessibilityHidden: false,\n        // start / end video time in seconds\n        startTime: 0,\n        endTime: 0\n      };\n      self.options = self.extend({}, self.options_default, options); // Fix wrong option name.\n      // Thanks to https://github.com/nk-o/video-worker/issues/13.\n\n      if (typeof self.options.showContols !== 'undefined') {\n        self.options.showControls = self.options.showContols;\n        delete self.options.showContols;\n      } // check URL\n\n\n      self.videoID = self.parseURL(url); // init\n\n      if (self.videoID) {\n        self.ID = ID;\n        ID += 1;\n        self.loadAPI();\n        self.init();\n      }\n    } // Extend like jQuery.extend\n    // eslint-disable-next-line class-methods-use-this\n\n\n    extend(...args) {\n      const out = args[0] || {};\n      Object.keys(args).forEach(i => {\n        if (!args[i]) {\n          return;\n        }\n\n        Object.keys(args[i]).forEach(key => {\n          out[key] = args[i][key];\n        });\n      });\n      return out;\n    }\n\n    parseURL(url) {\n      // parse youtube ID\n      function getYoutubeID(ytUrl) {\n        // eslint-disable-next-line no-useless-escape\n        const regExp = /.*(?:youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=)([^#\\&\\?]*).*/;\n        const match = ytUrl.match(regExp);\n        return match && match[1].length === 11 ? match[1] : false;\n      } // parse vimeo ID\n\n\n      function getVimeoID(vmUrl) {\n        // eslint-disable-next-line no-useless-escape\n        const regExp = /https?:\\/\\/(?:www\\.|player\\.)?vimeo.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/([^/]*)\\/videos\\/|album\\/(\\d+)\\/video\\/|video\\/|)(\\d+)(?:$|\\/|\\?)/;\n        const match = vmUrl.match(regExp);\n        return match && match[3] ? match[3] : false;\n      } // parse local string\n\n\n      function getLocalVideos(locUrl) {\n        // eslint-disable-next-line no-useless-escape\n        const videoFormats = locUrl.split(/,(?=mp4\\:|webm\\:|ogv\\:|ogg\\:)/);\n        const result = {};\n        let ready = 0;\n        videoFormats.forEach(val => {\n          // eslint-disable-next-line no-useless-escape\n          const match = val.match(/^(mp4|webm|ogv|ogg)\\:(.*)/);\n\n          if (match && match[1] && match[2]) {\n            // eslint-disable-next-line prefer-destructuring\n            result[match[1] === 'ogv' ? 'ogg' : match[1]] = match[2];\n            ready = 1;\n          }\n        });\n        return ready ? result : false;\n      }\n\n      const Youtube = getYoutubeID(url);\n      const Vimeo = getVimeoID(url);\n      const Local = getLocalVideos(url);\n\n      if (Youtube) {\n        this.type = 'youtube';\n        return Youtube;\n      }\n\n      if (Vimeo) {\n        this.type = 'vimeo';\n        return Vimeo;\n      }\n\n      if (Local) {\n        this.type = 'local';\n        return Local;\n      }\n\n      return false;\n    }\n\n    isValid() {\n      return !!this.videoID;\n    } // events\n\n\n    on(name, callback) {\n      this.userEventsList = this.userEventsList || []; // add new callback in events list\n\n      (this.userEventsList[name] || (this.userEventsList[name] = [])).push(callback);\n    }\n\n    off(name, callback) {\n      if (!this.userEventsList || !this.userEventsList[name]) {\n        return;\n      }\n\n      if (!callback) {\n        delete this.userEventsList[name];\n      } else {\n        this.userEventsList[name].forEach((val, key) => {\n          if (val === callback) {\n            this.userEventsList[name][key] = false;\n          }\n        });\n      }\n    }\n\n    fire(name, ...args) {\n      if (this.userEventsList && typeof this.userEventsList[name] !== 'undefined') {\n        this.userEventsList[name].forEach(val => {\n          // call with all arguments\n          if (val) {\n            val.apply(this, args);\n          }\n        });\n      }\n    }\n\n    play(start) {\n      const self = this;\n\n      if (!self.player) {\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.playVideo) {\n        if (typeof start !== 'undefined') {\n          self.player.seekTo(start || 0);\n        }\n\n        if (global$1$1.YT.PlayerState.PLAYING !== self.player.getPlayerState()) {\n          self.player.playVideo();\n        }\n      }\n\n      if (self.type === 'vimeo') {\n        if (typeof start !== 'undefined') {\n          self.player.setCurrentTime(start);\n        }\n\n        self.player.getPaused().then(paused => {\n          if (paused) {\n            self.player.play();\n          }\n        });\n      }\n\n      if (self.type === 'local') {\n        if (typeof start !== 'undefined') {\n          self.player.currentTime = start;\n        }\n\n        if (self.player.paused) {\n          self.player.play();\n        }\n      }\n    }\n\n    pause() {\n      const self = this;\n\n      if (!self.player) {\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.pauseVideo) {\n        if (global$1$1.YT.PlayerState.PLAYING === self.player.getPlayerState()) {\n          self.player.pauseVideo();\n        }\n      }\n\n      if (self.type === 'vimeo') {\n        self.player.getPaused().then(paused => {\n          if (!paused) {\n            self.player.pause();\n          }\n        });\n      }\n\n      if (self.type === 'local') {\n        if (!self.player.paused) {\n          self.player.pause();\n        }\n      }\n    }\n\n    mute() {\n      const self = this;\n\n      if (!self.player) {\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.mute) {\n        self.player.mute();\n      }\n\n      if (self.type === 'vimeo' && self.player.setVolume) {\n        self.player.setVolume(0);\n      }\n\n      if (self.type === 'local') {\n        self.$video.muted = true;\n      }\n    }\n\n    unmute() {\n      const self = this;\n\n      if (!self.player) {\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.mute) {\n        self.player.unMute();\n      }\n\n      if (self.type === 'vimeo' && self.player.setVolume) {\n        self.player.setVolume(self.options.volume);\n      }\n\n      if (self.type === 'local') {\n        self.$video.muted = false;\n      }\n    }\n\n    setVolume(volume = false) {\n      const self = this;\n\n      if (!self.player || !volume) {\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.setVolume) {\n        self.player.setVolume(volume);\n      }\n\n      if (self.type === 'vimeo' && self.player.setVolume) {\n        self.player.setVolume(volume);\n      }\n\n      if (self.type === 'local') {\n        self.$video.volume = volume / 100;\n      }\n    }\n\n    getVolume(callback) {\n      const self = this;\n\n      if (!self.player) {\n        callback(false);\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.getVolume) {\n        callback(self.player.getVolume());\n      }\n\n      if (self.type === 'vimeo' && self.player.getVolume) {\n        self.player.getVolume().then(volume => {\n          callback(volume);\n        });\n      }\n\n      if (self.type === 'local') {\n        callback(self.$video.volume * 100);\n      }\n    }\n\n    getMuted(callback) {\n      const self = this;\n\n      if (!self.player) {\n        callback(null);\n        return;\n      }\n\n      if (self.type === 'youtube' && self.player.isMuted) {\n        callback(self.player.isMuted());\n      }\n\n      if (self.type === 'vimeo' && self.player.getVolume) {\n        self.player.getVolume().then(volume => {\n          callback(!!volume);\n        });\n      }\n\n      if (self.type === 'local') {\n        callback(self.$video.muted);\n      }\n    }\n\n    getImageURL(callback) {\n      const self = this;\n\n      if (self.videoImage) {\n        callback(self.videoImage);\n        return;\n      }\n\n      if (self.type === 'youtube') {\n        const availableSizes = ['maxresdefault', 'sddefault', 'hqdefault', '0'];\n        let step = 0;\n        const tempImg = new Image();\n\n        tempImg.onload = function () {\n          // if no thumbnail, youtube add their own image with width = 120px\n          if ((this.naturalWidth || this.width) !== 120 || step === availableSizes.length - 1) {\n            // ok\n            self.videoImage = `https://img.youtube.com/vi/${self.videoID}/${availableSizes[step]}.jpg`;\n            callback(self.videoImage);\n          } else {\n            // try another size\n            step += 1;\n            this.src = `https://img.youtube.com/vi/${self.videoID}/${availableSizes[step]}.jpg`;\n          }\n        };\n\n        tempImg.src = `https://img.youtube.com/vi/${self.videoID}/${availableSizes[step]}.jpg`;\n      }\n\n      if (self.type === 'vimeo') {\n        let request = new XMLHttpRequest(); // https://vimeo.com/api/oembed.json?url=https://vimeo.com/235212527\n\n        request.open('GET', `https://vimeo.com/api/oembed.json?url=${self.url}`, true);\n\n        request.onreadystatechange = function () {\n          if (this.readyState === 4) {\n            if (this.status >= 200 && this.status < 400) {\n              // Success!\n              const response = JSON.parse(this.responseText);\n\n              if (response.thumbnail_url) {\n                self.videoImage = response.thumbnail_url;\n                callback(self.videoImage);\n              }\n            }\n          }\n        };\n\n        request.send();\n        request = null;\n      }\n    } // fallback to the old version.\n\n\n    getIframe(callback) {\n      this.getVideo(callback);\n    }\n\n    getVideo(callback) {\n      const self = this; // return generated video block\n\n      if (self.$video) {\n        callback(self.$video);\n        return;\n      } // generate new video block\n\n\n      self.onAPIready(() => {\n        let hiddenDiv;\n\n        if (!self.$video) {\n          hiddenDiv = document.createElement('div');\n          hiddenDiv.style.display = 'none';\n        } // Youtube\n\n\n        if (self.type === 'youtube') {\n          self.playerOptions = {\n            // GDPR Compliance.\n            host: 'https://www.youtube-nocookie.com',\n            videoId: self.videoID,\n            playerVars: {\n              autohide: 1,\n              rel: 0,\n              autoplay: 0,\n              // autoplay enable on mobile devices\n              playsinline: 1\n            }\n          }; // hide controls\n\n          if (!self.options.showControls) {\n            self.playerOptions.playerVars.iv_load_policy = 3;\n            self.playerOptions.playerVars.modestbranding = 1;\n            self.playerOptions.playerVars.controls = 0;\n            self.playerOptions.playerVars.showinfo = 0;\n            self.playerOptions.playerVars.disablekb = 1;\n          } // events\n\n\n          let ytStarted;\n          let ytProgressInterval;\n          self.playerOptions.events = {\n            onReady(e) {\n              // mute\n              if (self.options.mute) {\n                e.target.mute();\n              } else if (self.options.volume) {\n                e.target.setVolume(self.options.volume);\n              } // autoplay\n\n\n              if (self.options.autoplay) {\n                self.play(self.options.startTime);\n              }\n\n              self.fire('ready', e); // For seamless loops, set the endTime to 0.1 seconds less than the video's duration\n              // https://github.com/nk-o/video-worker/issues/2\n\n              if (self.options.loop && !self.options.endTime) {\n                const secondsOffset = 0.1;\n                self.options.endTime = self.player.getDuration() - secondsOffset;\n              } // volumechange\n\n\n              setInterval(() => {\n                self.getVolume(volume => {\n                  if (self.options.volume !== volume) {\n                    self.options.volume = volume;\n                    self.fire('volumechange', e);\n                  }\n                });\n              }, 150);\n            },\n\n            onStateChange(e) {\n              // loop\n              if (self.options.loop && e.data === global$1$1.YT.PlayerState.ENDED) {\n                self.play(self.options.startTime);\n              }\n\n              if (!ytStarted && e.data === global$1$1.YT.PlayerState.PLAYING) {\n                ytStarted = 1;\n                self.fire('started', e);\n              }\n\n              if (e.data === global$1$1.YT.PlayerState.PLAYING) {\n                self.fire('play', e);\n              }\n\n              if (e.data === global$1$1.YT.PlayerState.PAUSED) {\n                self.fire('pause', e);\n              }\n\n              if (e.data === global$1$1.YT.PlayerState.ENDED) {\n                self.fire('ended', e);\n              } // progress check\n\n\n              if (e.data === global$1$1.YT.PlayerState.PLAYING) {\n                ytProgressInterval = setInterval(() => {\n                  self.fire('timeupdate', e); // check for end of video and play again or stop\n\n                  if (self.options.endTime && self.player.getCurrentTime() >= self.options.endTime) {\n                    if (self.options.loop) {\n                      self.play(self.options.startTime);\n                    } else {\n                      self.pause();\n                    }\n                  }\n                }, 150);\n              } else {\n                clearInterval(ytProgressInterval);\n              }\n            },\n\n            onError(e) {\n              self.fire('error', e);\n            }\n\n          };\n          const firstInit = !self.$video;\n\n          if (firstInit) {\n            const div = document.createElement('div');\n            div.setAttribute('id', self.playerID);\n            hiddenDiv.appendChild(div);\n            document.body.appendChild(hiddenDiv);\n          }\n\n          self.player = self.player || new global$1$1.YT.Player(self.playerID, self.playerOptions);\n\n          if (firstInit) {\n            self.$video = document.getElementById(self.playerID); // add accessibility attributes\n\n            if (self.options.accessibilityHidden) {\n              self.$video.setAttribute('tabindex', '-1');\n              self.$video.setAttribute('aria-hidden', 'true');\n            } // get video width and height\n\n\n            self.videoWidth = parseInt(self.$video.getAttribute('width'), 10) || 1280;\n            self.videoHeight = parseInt(self.$video.getAttribute('height'), 10) || 720;\n          }\n        } // Vimeo\n\n\n        if (self.type === 'vimeo') {\n          self.playerOptions = {\n            // GDPR Compliance.\n            dnt: 1,\n            id: self.videoID,\n            autopause: 0,\n            transparent: 0,\n            autoplay: self.options.autoplay ? 1 : 0,\n            loop: self.options.loop ? 1 : 0,\n            muted: self.options.mute ? 1 : 0\n          };\n\n          if (self.options.volume) {\n            self.playerOptions.volume = self.options.volume;\n          } // hide controls\n\n\n          if (!self.options.showControls) {\n            self.playerOptions.badge = 0;\n            self.playerOptions.byline = 0;\n            self.playerOptions.portrait = 0;\n            self.playerOptions.title = 0;\n            self.playerOptions.background = 1;\n          }\n\n          if (!self.$video) {\n            let playerOptionsString = '';\n            Object.keys(self.playerOptions).forEach(key => {\n              if (playerOptionsString !== '') {\n                playerOptionsString += '&';\n              }\n\n              playerOptionsString += `${key}=${encodeURIComponent(self.playerOptions[key])}`;\n            }); // we need to create iframe manually because when we create it using API\n            // js events won't triggers after iframe moved to another place\n\n            self.$video = document.createElement('iframe');\n            self.$video.setAttribute('id', self.playerID);\n            self.$video.setAttribute('src', `https://player.vimeo.com/video/${self.videoID}?${playerOptionsString}`);\n            self.$video.setAttribute('frameborder', '0');\n            self.$video.setAttribute('mozallowfullscreen', '');\n            self.$video.setAttribute('allowfullscreen', '');\n            self.$video.setAttribute('title', 'Vimeo video player'); // add accessibility attributes\n\n            if (self.options.accessibilityHidden) {\n              self.$video.setAttribute('tabindex', '-1');\n              self.$video.setAttribute('aria-hidden', 'true');\n            }\n\n            hiddenDiv.appendChild(self.$video);\n            document.body.appendChild(hiddenDiv);\n          }\n\n          self.player = self.player || new global$1$1.Vimeo.Player(self.$video, self.playerOptions); // set current time for autoplay\n\n          if (self.options.startTime && self.options.autoplay) {\n            self.player.setCurrentTime(self.options.startTime);\n          } // get video width and height\n\n\n          self.player.getVideoWidth().then(width => {\n            self.videoWidth = width || 1280;\n          });\n          self.player.getVideoHeight().then(height => {\n            self.videoHeight = height || 720;\n          }); // events\n\n          let vmStarted;\n          self.player.on('timeupdate', e => {\n            if (!vmStarted) {\n              self.fire('started', e);\n              vmStarted = 1;\n            }\n\n            self.fire('timeupdate', e); // check for end of video and play again or stop\n\n            if (self.options.endTime) {\n              if (self.options.endTime && e.seconds >= self.options.endTime) {\n                if (self.options.loop) {\n                  self.play(self.options.startTime);\n                } else {\n                  self.pause();\n                }\n              }\n            }\n          });\n          self.player.on('play', e => {\n            self.fire('play', e); // check for the start time and start with it\n\n            if (self.options.startTime && e.seconds === 0) {\n              self.play(self.options.startTime);\n            }\n          });\n          self.player.on('pause', e => {\n            self.fire('pause', e);\n          });\n          self.player.on('ended', e => {\n            self.fire('ended', e);\n          });\n          self.player.on('loaded', e => {\n            self.fire('ready', e);\n          });\n          self.player.on('volumechange', e => {\n            self.fire('volumechange', e);\n          });\n          self.player.on('error', e => {\n            self.fire('error', e);\n          });\n        } // Local\n\n\n        function addSourceToLocal(element, src, type) {\n          const source = document.createElement('source');\n          source.src = src;\n          source.type = type;\n          element.appendChild(source);\n        }\n\n        if (self.type === 'local') {\n          if (!self.$video) {\n            self.$video = document.createElement('video'); // show controls\n\n            if (self.options.showControls) {\n              self.$video.controls = true;\n            } // mute\n\n\n            if (self.options.mute) {\n              self.$video.muted = true;\n            } else if (self.$video.volume) {\n              self.$video.volume = self.options.volume / 100;\n            } // loop\n\n\n            if (self.options.loop) {\n              self.$video.loop = true;\n            } // autoplay enable on mobile devices\n\n\n            self.$video.setAttribute('playsinline', '');\n            self.$video.setAttribute('webkit-playsinline', ''); // add accessibility attributes\n\n            if (self.options.accessibilityHidden) {\n              self.$video.setAttribute('tabindex', '-1');\n              self.$video.setAttribute('aria-hidden', 'true');\n            }\n\n            self.$video.setAttribute('id', self.playerID);\n            hiddenDiv.appendChild(self.$video);\n            document.body.appendChild(hiddenDiv);\n            Object.keys(self.videoID).forEach(key => {\n              addSourceToLocal(self.$video, self.videoID[key], `video/${key}`);\n            });\n          }\n\n          self.player = self.player || self.$video;\n          let locStarted;\n          self.player.addEventListener('playing', e => {\n            if (!locStarted) {\n              self.fire('started', e);\n            }\n\n            locStarted = 1;\n          });\n          self.player.addEventListener('timeupdate', function (e) {\n            self.fire('timeupdate', e); // check for end of video and play again or stop\n\n            if (self.options.endTime) {\n              if (self.options.endTime && this.currentTime >= self.options.endTime) {\n                if (self.options.loop) {\n                  self.play(self.options.startTime);\n                } else {\n                  self.pause();\n                }\n              }\n            }\n          });\n          self.player.addEventListener('play', e => {\n            self.fire('play', e);\n          });\n          self.player.addEventListener('pause', e => {\n            self.fire('pause', e);\n          });\n          self.player.addEventListener('ended', e => {\n            self.fire('ended', e);\n          });\n          self.player.addEventListener('loadedmetadata', function () {\n            // get video width and height\n            self.videoWidth = this.videoWidth || 1280;\n            self.videoHeight = this.videoHeight || 720;\n            self.fire('ready'); // autoplay\n\n            if (self.options.autoplay) {\n              self.play(self.options.startTime);\n            }\n          });\n          self.player.addEventListener('volumechange', e => {\n            self.getVolume(volume => {\n              self.options.volume = volume;\n            });\n            self.fire('volumechange', e);\n          });\n          self.player.addEventListener('error', e => {\n            self.fire('error', e);\n          });\n        }\n\n        callback(self.$video);\n      });\n    }\n\n    init() {\n      const self = this;\n      self.playerID = `VideoWorker-${self.ID}`;\n    }\n\n    loadAPI() {\n      const self = this;\n\n      if (YoutubeAPIadded && VimeoAPIadded) {\n        return;\n      }\n\n      let src = ''; // load Youtube API\n\n      if (self.type === 'youtube' && !YoutubeAPIadded) {\n        YoutubeAPIadded = 1;\n        src = 'https://www.youtube.com/iframe_api';\n      } // load Vimeo API\n\n\n      if (self.type === 'vimeo' && !VimeoAPIadded) {\n        VimeoAPIadded = 1; // Useful when Vimeo API added using RequireJS https://github.com/nk-o/video-worker/pull/7\n\n        if (typeof global$1$1.Vimeo !== 'undefined') {\n          return;\n        }\n\n        src = 'https://player.vimeo.com/api/player.js';\n      }\n\n      if (!src) {\n        return;\n      } // add script in head section\n\n\n      let tag = document.createElement('script');\n      let head = document.getElementsByTagName('head')[0];\n      tag.src = src;\n      head.appendChild(tag);\n      head = null;\n      tag = null;\n    }\n\n    onAPIready(callback) {\n      const self = this; // Youtube\n\n      if (self.type === 'youtube') {\n        // Listen for global YT player callback\n        if ((typeof global$1$1.YT === 'undefined' || global$1$1.YT.loaded === 0) && !loadingYoutubePlayer) {\n          // Prevents Ready event from being called twice\n          loadingYoutubePlayer = 1; // Creates deferred so, other players know when to wait.\n\n          global$1$1.onYouTubeIframeAPIReady = function () {\n            global$1$1.onYouTubeIframeAPIReady = null;\n            loadingYoutubeDefer.resolve('done');\n            callback();\n          };\n        } else if (typeof global$1$1.YT === 'object' && global$1$1.YT.loaded === 1) {\n          callback();\n        } else {\n          loadingYoutubeDefer.done(() => {\n            callback();\n          });\n        }\n      } // Vimeo\n\n\n      if (self.type === 'vimeo') {\n        if (typeof global$1$1.Vimeo === 'undefined' && !loadingVimeoPlayer) {\n          loadingVimeoPlayer = 1;\n          const vimeoInterval = setInterval(() => {\n            if (typeof global$1$1.Vimeo !== 'undefined') {\n              clearInterval(vimeoInterval);\n              loadingVimeoDefer.resolve('done');\n              callback();\n            }\n          }, 20);\n        } else if (typeof global$1$1.Vimeo !== 'undefined') {\n          callback();\n        } else {\n          loadingVimeoDefer.done(() => {\n            callback();\n          });\n        }\n      } // Local\n\n\n      if (self.type === 'local') {\n        callback();\n      }\n    }\n\n  }\n\n  function ready(callback) {\n    if ('complete' === document.readyState || 'interactive' === document.readyState) {\n      // Already ready or interactive, execute callback\n      callback();\n    } else {\n      document.addEventListener('DOMContentLoaded', callback, {\n        capture: true,\n        once: true,\n        passive: true\n      });\n    }\n  }\n\n  /* eslint-disable import/no-mutable-exports */\n\n  /* eslint-disable no-restricted-globals */\n  let win;\n\n  if ('undefined' !== typeof window) {\n    win = window;\n  } else if ('undefined' !== typeof global) {\n    win = global;\n  } else if ('undefined' !== typeof self) {\n    win = self;\n  } else {\n    win = {};\n  }\n\n  var global$1 = win;\n\n  function jarallaxVideo(jarallax = global$1.jarallax) {\n    if ('undefined' === typeof jarallax) {\n      return;\n    }\n\n    const Jarallax = jarallax.constructor; // append video after when block will be visible.\n\n    const defOnScroll = Jarallax.prototype.onScroll;\n\n    Jarallax.prototype.onScroll = function () {\n      const self = this;\n      defOnScroll.apply(self);\n      const isReady = !self.isVideoInserted && self.video && (!self.options.videoLazyLoading || self.isElementInViewport) && !self.options.disableVideo();\n\n      if (isReady) {\n        self.isVideoInserted = true;\n        self.video.getVideo(video => {\n          const $parent = video.parentNode;\n          self.css(video, {\n            position: self.image.position,\n            top: '0px',\n            left: '0px',\n            right: '0px',\n            bottom: '0px',\n            width: '100%',\n            height: '100%',\n            maxWidth: 'none',\n            maxHeight: 'none',\n            pointerEvents: 'none',\n            transformStyle: 'preserve-3d',\n            backfaceVisibility: 'hidden',\n            willChange: 'transform,opacity',\n            margin: 0,\n            zIndex: -1\n          });\n          self.$video = video; // add Poster attribute to self-hosted video\n\n          if ('local' === self.video.type) {\n            if (self.image.src) {\n              self.$video.setAttribute('poster', self.image.src);\n            } else if (self.image.$item && 'IMG' === self.image.$item.tagName && self.image.$item.src) {\n              self.$video.setAttribute('poster', self.image.$item.src);\n            }\n          } // insert video tag\n\n\n          self.image.$container.appendChild(video); // remove parent video element (created by VideoWorker)\n\n          $parent.parentNode.removeChild($parent); // call onVideoInsert event\n\n          if (self.options.onVideoInsert) {\n            self.options.onVideoInsert.call(self);\n          }\n        });\n      }\n    }; // cover video\n\n\n    const defCoverImage = Jarallax.prototype.coverImage;\n\n    Jarallax.prototype.coverImage = function () {\n      const self = this;\n      const imageData = defCoverImage.apply(self);\n      const node = self.image.$item ? self.image.$item.nodeName : false;\n\n      if (imageData && self.video && node && ('IFRAME' === node || 'VIDEO' === node)) {\n        let h = imageData.image.height;\n        let w = h * self.image.width / self.image.height;\n        let ml = (imageData.container.width - w) / 2;\n        let mt = imageData.image.marginTop;\n\n        if (imageData.container.width > w) {\n          w = imageData.container.width;\n          h = w * self.image.height / self.image.width;\n          ml = 0;\n          mt += (imageData.image.height - h) / 2;\n        } // add video height over than need to hide controls\n\n\n        if ('IFRAME' === node) {\n          h += 400;\n          mt -= 200;\n        }\n\n        self.css(self.$video, {\n          width: `${w}px`,\n          marginLeft: `${ml}px`,\n          height: `${h}px`,\n          marginTop: `${mt}px`\n        });\n      }\n\n      return imageData;\n    }; // init video\n\n\n    const defInitImg = Jarallax.prototype.initImg;\n\n    Jarallax.prototype.initImg = function () {\n      const self = this;\n      const defaultResult = defInitImg.apply(self);\n\n      if (!self.options.videoSrc) {\n        self.options.videoSrc = self.$item.getAttribute('data-jarallax-video') || null;\n      }\n\n      if (self.options.videoSrc) {\n        self.defaultInitImgResult = defaultResult;\n        return true;\n      }\n\n      return defaultResult;\n    };\n\n    const defCanInitParallax = Jarallax.prototype.canInitParallax;\n\n    Jarallax.prototype.canInitParallax = function () {\n      const self = this;\n      let defaultResult = defCanInitParallax.apply(self);\n\n      if (!self.options.videoSrc) {\n        return defaultResult;\n      } // Init video api\n\n\n      const video = new VideoWorker(self.options.videoSrc, {\n        autoplay: true,\n        loop: self.options.videoLoop,\n        showControls: false,\n        accessibilityHidden: true,\n        startTime: self.options.videoStartTime || 0,\n        endTime: self.options.videoEndTime || 0,\n        mute: self.options.videoVolume ? 0 : 1,\n        volume: self.options.videoVolume || 0\n      }); // call onVideoWorkerInit event\n\n      if (self.options.onVideoWorkerInit) {\n        self.options.onVideoWorkerInit.call(self, video);\n      }\n\n      function resetDefaultImage() {\n        if (self.image.$default_item) {\n          self.image.$item = self.image.$default_item;\n          self.image.$item.style.display = 'block'; // set image width and height\n\n          self.coverImage();\n          self.onScroll();\n        }\n      }\n\n      if (video.isValid()) {\n        // Force enable parallax.\n        // When the parallax disabled on mobile devices, we still need to display videos.\n        // https://github.com/nk-o/jarallax/issues/159\n        if (this.options.disableParallax()) {\n          defaultResult = true;\n          self.image.position = 'absolute';\n          self.options.type = 'scroll';\n          self.options.speed = 1;\n        } // if parallax will not be inited, we can add thumbnail on background.\n\n\n        if (!defaultResult) {\n          if (!self.defaultInitImgResult) {\n            video.getImageURL(url => {\n              // save default user styles\n              const curStyle = self.$item.getAttribute('style');\n\n              if (curStyle) {\n                self.$item.setAttribute('data-jarallax-original-styles', curStyle);\n              } // set new background\n\n\n              self.css(self.$item, {\n                'background-image': `url(\"${url}\")`,\n                'background-position': 'center',\n                'background-size': 'cover'\n              });\n            });\n          } // init video\n\n        } else {\n          video.on('ready', () => {\n            if (self.options.videoPlayOnlyVisible) {\n              const oldOnScroll = self.onScroll;\n\n              self.onScroll = function () {\n                oldOnScroll.apply(self);\n\n                if (!self.videoError && (self.options.videoLoop || !self.options.videoLoop && !self.videoEnded)) {\n                  if (self.isVisible()) {\n                    video.play();\n                  } else {\n                    video.pause();\n                  }\n                }\n              };\n            } else {\n              video.play();\n            }\n          });\n          video.on('started', () => {\n            self.image.$default_item = self.image.$item;\n            self.image.$item = self.$video; // set video width and height\n\n            self.image.width = self.video.videoWidth || 1280;\n            self.image.height = self.video.videoHeight || 720;\n            self.coverImage();\n            self.onScroll(); // hide image\n\n            if (self.image.$default_item) {\n              self.image.$default_item.style.display = 'none';\n            }\n          });\n          video.on('ended', () => {\n            self.videoEnded = true;\n\n            if (!self.options.videoLoop) {\n              // show default image if Loop disabled.\n              resetDefaultImage();\n            }\n          });\n          video.on('error', () => {\n            self.videoError = true; // show default image if video loading error.\n\n            resetDefaultImage();\n          });\n          self.video = video; // set image if not exists\n\n          if (!self.defaultInitImgResult) {\n            // set empty image on self-hosted video if not defined\n            self.image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n\n            if ('local' !== video.type) {\n              video.getImageURL(url => {\n                self.image.bgImage = `url(\"${url}\")`;\n                self.init();\n              });\n              return false;\n            }\n          }\n        }\n      }\n\n      return defaultResult;\n    }; // Destroy video parallax\n\n\n    const defDestroy = Jarallax.prototype.destroy;\n\n    Jarallax.prototype.destroy = function () {\n      const self = this;\n\n      if (self.image.$default_item) {\n        self.image.$item = self.image.$default_item;\n        delete self.image.$default_item;\n      }\n\n      defDestroy.apply(self);\n    };\n  }\n\n  jarallaxVideo(); // data-jarallax-video initialization\n\n  ready(() => {\n    if ('undefined' !== typeof global$1.jarallax) {\n      global$1.jarallax(document.querySelectorAll('[data-jarallax-video]'));\n    }\n  }); // We should add VideoWorker globally, since some project uses it.\n\n  if (!global$1.VideoWorker) {\n    global$1.VideoWorker = VideoWorker;\n  }\n\n  return jarallaxVideo;\n\n}));\n//# sourceMappingURL=jarallax-video.js.map\n"}
}});